@progress/kendo-angular-pdfviewer 17.0.0-develop.21 → 17.0.0-develop.23
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/{esm2020 → esm2022}/loader/loader.component.mjs +8 -9
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +7 -6
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/esm2022/localization/messages.mjs +171 -0
- package/{esm2020 → esm2022}/models/events.mjs +16 -0
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/pdfviewer.component.mjs +144 -118
- package/{esm2020 → esm2022}/pdfviewer.module.mjs +8 -8
- package/{esm2020 → esm2022}/toolbar/input-wrapper.component.mjs +9 -6
- package/{esm2020 → esm2022}/toolbar/search.component.mjs +23 -18
- package/{esm2020 → esm2022}/toolbar/toolbar-combobox.directive.mjs +17 -14
- package/{esm2020 → esm2022}/toolbar/toolbar-focusable.directive.mjs +6 -3
- package/{esm2020 → esm2022}/toolbar/toolbar-navigation.service.mjs +6 -5
- package/{esm2020 → esm2022}/toolbar/toolbar.component.mjs +59 -48
- package/{fesm2020 → fesm2022}/progress-kendo-angular-pdfviewer.mjs +419 -250
- package/loader/loader.component.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/models/toolbar-tool.d.ts +1 -1
- package/package.json +20 -26
- package/pdfviewer.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +2 -2
- package/toolbar/input-wrapper.component.d.ts +1 -1
- package/toolbar/search.component.d.ts +1 -1
- package/toolbar/toolbar.component.d.ts +1 -1
- package/esm2020/localization/messages.mjs +0 -71
- package/fesm2015/progress-kendo-angular-pdfviewer.mjs +0 -2059
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/loader-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/models/pdfviewer-context.mjs +0 -0
- /package/{esm2020 → esm2022}/models/toolbar-tool.mjs +0 -0
- /package/{esm2020 → esm2022}/models/zoom-level.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-pdfviewer.mjs +0 -0
- /package/{esm2020 → esm2022}/util.mjs +0 -0
@@ -1,2059 +0,0 @@
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
5
|
-
import * as i0 from '@angular/core';
|
6
|
-
import { Directive, Input, forwardRef, Component, Injectable, HostBinding, EventEmitter, ViewChild, Output, ElementRef, HostListener, isDevMode, NgModule } from '@angular/core';
|
7
|
-
import * as i1 from '@progress/kendo-angular-l10n';
|
8
|
-
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
9
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
10
|
-
import { currentPage, removeChildren, scrollToPage, calculateZoomLevel, SearchService, print, goToNextSearchMatch, goToPreviousSearchMatch, loadPDF, Scroller, reloadDocument } from '@progress/kendo-pdfviewer-common';
|
11
|
-
import { PreventableEvent, Keys, focusableSelector, hasObservers, shouldShowValidationUI, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
12
|
-
import { saveAs } from '@progress/kendo-file-saver';
|
13
|
-
import { Subscription } from 'rxjs';
|
14
|
-
import { PagerComponent, CustomMessagesComponent } from '@progress/kendo-angular-pager';
|
15
|
-
import { zoomInIcon, zoomOutIcon, handIcon, pointerIcon, searchIcon, folderOpenIcon, downloadIcon, printIcon, convertLowercaseIcon, arrowUpIcon, arrowDownIcon, xIcon } from '@progress/kendo-svg-icons';
|
16
|
-
import * as i1$1 from '@progress/kendo-angular-dropdowns';
|
17
|
-
import { ComboBoxComponent, ItemTemplateDirective } from '@progress/kendo-angular-dropdowns';
|
18
|
-
import { ButtonGroupComponent, ButtonComponent } from '@progress/kendo-angular-buttons';
|
19
|
-
import { NgFor, NgSwitch, NgSwitchCase, NgIf } from '@angular/common';
|
20
|
-
import { map } from 'rxjs/operators';
|
21
|
-
import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@progress/kendo-angular-inputs';
|
22
|
-
import { LoaderComponent as LoaderComponent$1 } from '@progress/kendo-angular-indicators';
|
23
|
-
import 'pdfjs-dist/build/pdf.worker.min.mjs';
|
24
|
-
import { IconsService } from '@progress/kendo-angular-icons';
|
25
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
26
|
-
|
27
|
-
/**
|
28
|
-
* @hidden
|
29
|
-
*/
|
30
|
-
class Messages extends ComponentMessages {
|
31
|
-
}
|
32
|
-
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
33
|
-
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Messages, selector: "kendo-pdfviewer-messages-base", inputs: { zoomInTitle: "zoomInTitle", zoomOutTitle: "zoomOutTitle", selectionTitle: "selectionTitle", panningTitle: "panningTitle", searchTitle: "searchTitle", openTitle: "openTitle", downloadTitle: "downloadTitle", printTitle: "printTitle", pagerInputLabel: "pagerInputLabel", pagerInputTitle: "pagerInputTitle", pagerFirstPage: "pagerFirstPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerLastPage: "pagerLastPage", pagerOf: "pagerOf", pagerPage: "pagerPage", fitToPage: "fitToPage", fitToWidth: "fitToWidth", searchInputPlaceholder: "searchInputPlaceholder", searchMatchesOf: "searchMatchesOf", searchPreviousMatchTitle: "searchPreviousMatchTitle", searchNextMatchTitle: "searchNextMatchTitle", searchCloseTitle: "searchCloseTitle", searchMatchCaseTitle: "searchMatchCaseTitle", zoomInputPlaceholder: "zoomInputPlaceholder" }, usesInheritance: true, ngImport: i0 });
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, decorators: [{
|
35
|
-
type: Directive,
|
36
|
-
args: [{
|
37
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
38
|
-
selector: 'kendo-pdfviewer-messages-base'
|
39
|
-
}]
|
40
|
-
}], propDecorators: { zoomInTitle: [{
|
41
|
-
type: Input
|
42
|
-
}], zoomOutTitle: [{
|
43
|
-
type: Input
|
44
|
-
}], selectionTitle: [{
|
45
|
-
type: Input
|
46
|
-
}], panningTitle: [{
|
47
|
-
type: Input
|
48
|
-
}], searchTitle: [{
|
49
|
-
type: Input
|
50
|
-
}], openTitle: [{
|
51
|
-
type: Input
|
52
|
-
}], downloadTitle: [{
|
53
|
-
type: Input
|
54
|
-
}], printTitle: [{
|
55
|
-
type: Input
|
56
|
-
}], pagerInputLabel: [{
|
57
|
-
type: Input
|
58
|
-
}], pagerInputTitle: [{
|
59
|
-
type: Input
|
60
|
-
}], pagerFirstPage: [{
|
61
|
-
type: Input
|
62
|
-
}], pagerPreviousPage: [{
|
63
|
-
type: Input
|
64
|
-
}], pagerNextPage: [{
|
65
|
-
type: Input
|
66
|
-
}], pagerLastPage: [{
|
67
|
-
type: Input
|
68
|
-
}], pagerOf: [{
|
69
|
-
type: Input
|
70
|
-
}], pagerPage: [{
|
71
|
-
type: Input
|
72
|
-
}], fitToPage: [{
|
73
|
-
type: Input
|
74
|
-
}], fitToWidth: [{
|
75
|
-
type: Input
|
76
|
-
}], searchInputPlaceholder: [{
|
77
|
-
type: Input
|
78
|
-
}], searchMatchesOf: [{
|
79
|
-
type: Input
|
80
|
-
}], searchPreviousMatchTitle: [{
|
81
|
-
type: Input
|
82
|
-
}], searchNextMatchTitle: [{
|
83
|
-
type: Input
|
84
|
-
}], searchCloseTitle: [{
|
85
|
-
type: Input
|
86
|
-
}], searchMatchCaseTitle: [{
|
87
|
-
type: Input
|
88
|
-
}], zoomInputPlaceholder: [{
|
89
|
-
type: Input
|
90
|
-
}] } });
|
91
|
-
|
92
|
-
/**
|
93
|
-
* Custom component messages override default component messages.
|
94
|
-
*/
|
95
|
-
class PDFViewerCustomMessagesComponent extends Messages {
|
96
|
-
constructor(service) {
|
97
|
-
super();
|
98
|
-
this.service = service;
|
99
|
-
}
|
100
|
-
get override() {
|
101
|
-
return true;
|
102
|
-
}
|
103
|
-
}
|
104
|
-
PDFViewerCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
105
|
-
PDFViewerCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PDFViewerCustomMessagesComponent, isStandalone: true, selector: "kendo-pdfviewer-messages", providers: [{
|
106
|
-
provide: Messages,
|
107
|
-
useExisting: forwardRef(() => PDFViewerCustomMessagesComponent)
|
108
|
-
}], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerCustomMessagesComponent, decorators: [{
|
110
|
-
type: Component,
|
111
|
-
args: [{
|
112
|
-
providers: [{
|
113
|
-
provide: Messages,
|
114
|
-
useExisting: forwardRef(() => PDFViewerCustomMessagesComponent)
|
115
|
-
}],
|
116
|
-
selector: 'kendo-pdfviewer-messages',
|
117
|
-
template: ``,
|
118
|
-
standalone: true
|
119
|
-
}]
|
120
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
121
|
-
|
122
|
-
/**
|
123
|
-
* @hidden
|
124
|
-
*/
|
125
|
-
const packageMetadata = {
|
126
|
-
name: '@progress/kendo-angular-pdfviewer',
|
127
|
-
productName: 'Kendo UI for Angular',
|
128
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
129
|
-
publishDate: 1729874517,
|
130
|
-
version: '17.0.0-develop.21',
|
131
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
132
|
-
};
|
133
|
-
|
134
|
-
/**
|
135
|
-
* @hidden
|
136
|
-
*/
|
137
|
-
const INITIAL_ZOOM_LEVEL = 1.25;
|
138
|
-
/**
|
139
|
-
* @hidden
|
140
|
-
*/
|
141
|
-
const MIN_ZOOM_LEVEL = 0.5;
|
142
|
-
/**
|
143
|
-
* @hidden
|
144
|
-
*/
|
145
|
-
const MAX_ZOOM_LEVEL = 4;
|
146
|
-
/**
|
147
|
-
* @hidden
|
148
|
-
*/
|
149
|
-
const zoomOptionsData = [{
|
150
|
-
id: 1,
|
151
|
-
text: 'Fit to width',
|
152
|
-
type: 'FitToWidth',
|
153
|
-
displayValue: '',
|
154
|
-
value: 1
|
155
|
-
}, {
|
156
|
-
id: 2,
|
157
|
-
text: 'Fit to page',
|
158
|
-
type: 'FitToPage',
|
159
|
-
displayValue: '',
|
160
|
-
value: 1
|
161
|
-
}, {
|
162
|
-
id: 3,
|
163
|
-
text: '50%',
|
164
|
-
displayValue: '50%',
|
165
|
-
value: 0.5
|
166
|
-
}, {
|
167
|
-
id: 4,
|
168
|
-
text: '75%',
|
169
|
-
displayValue: '75%',
|
170
|
-
value: 0.75
|
171
|
-
}, {
|
172
|
-
id: 5,
|
173
|
-
text: '100%',
|
174
|
-
displayValue: '100%',
|
175
|
-
value: 1
|
176
|
-
}, {
|
177
|
-
id: 6,
|
178
|
-
text: '125%',
|
179
|
-
displayValue: '125%',
|
180
|
-
value: 1.25
|
181
|
-
}, {
|
182
|
-
id: 7,
|
183
|
-
text: '150%',
|
184
|
-
displayValue: '150%',
|
185
|
-
value: 1.5
|
186
|
-
}, {
|
187
|
-
id: 8,
|
188
|
-
text: '200%',
|
189
|
-
displayValue: '200%',
|
190
|
-
value: 2
|
191
|
-
}, {
|
192
|
-
id: 9,
|
193
|
-
text: '300%',
|
194
|
-
displayValue: '300%',
|
195
|
-
value: 3
|
196
|
-
}, {
|
197
|
-
id: 10,
|
198
|
-
text: '400%',
|
199
|
-
displayValue: '400%',
|
200
|
-
value: 4
|
201
|
-
}];
|
202
|
-
/**
|
203
|
-
* @hidden
|
204
|
-
*/
|
205
|
-
const zoomToFitOptions = {
|
206
|
-
'fitToPage': 'FitToPage',
|
207
|
-
'fitToWidth': 'FitToWidth'
|
208
|
-
};
|
209
|
-
|
210
|
-
/**
|
211
|
-
* Arguments for the `download` event. The event fires when the end user clicks the Download tool.
|
212
|
-
* If you cancel the event, the downloading of the file is prevented.
|
213
|
-
*/
|
214
|
-
class PDFViewerDownloadEvent extends PreventableEvent {
|
215
|
-
/**
|
216
|
-
* @hidden
|
217
|
-
*/
|
218
|
-
constructor(blob, fileName, saveOptions, context) {
|
219
|
-
super();
|
220
|
-
this.blob = blob;
|
221
|
-
this.fileName = fileName;
|
222
|
-
this.saveOptions = saveOptions;
|
223
|
-
this.context = context;
|
224
|
-
}
|
225
|
-
}
|
226
|
-
|
227
|
-
/**
|
228
|
-
* @hidden
|
229
|
-
*/
|
230
|
-
class ToolbarNavigationService {
|
231
|
-
constructor(localizationService) {
|
232
|
-
this.localizationService = localizationService;
|
233
|
-
this.focusableTools = [];
|
234
|
-
this.currentFocusIndex = 0;
|
235
|
-
}
|
236
|
-
register(tool) {
|
237
|
-
if (!this.focusableTools.some(el => el === tool)) {
|
238
|
-
this.focusableTools.push(tool);
|
239
|
-
}
|
240
|
-
}
|
241
|
-
unregister(tool) {
|
242
|
-
this.currentFocusIndex = 0;
|
243
|
-
this.focusableTools = this.focusableTools.filter(el => el !== tool);
|
244
|
-
}
|
245
|
-
isActive(focusable) {
|
246
|
-
return this.focusableTools[this.currentFocusIndex] === focusable;
|
247
|
-
}
|
248
|
-
setActiveIndex(tool) {
|
249
|
-
this.currentFocusIndex = Math.max(this.focusableTools.indexOf(tool), 0);
|
250
|
-
}
|
251
|
-
move(direction) {
|
252
|
-
let delta = direction === 'right' ? 1 : -1;
|
253
|
-
if (this.localizationService.rtl) {
|
254
|
-
delta = -delta;
|
255
|
-
}
|
256
|
-
this.currentFocusIndex += delta;
|
257
|
-
if (this.currentFocusIndex < 0) {
|
258
|
-
this.currentFocusIndex = this.focusableTools.length - 1;
|
259
|
-
}
|
260
|
-
else if (this.currentFocusIndex >= this.focusableTools.length) {
|
261
|
-
this.currentFocusIndex = 0;
|
262
|
-
}
|
263
|
-
this.focusableTools[this.currentFocusIndex].activate();
|
264
|
-
}
|
265
|
-
}
|
266
|
-
ToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
267
|
-
ToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService });
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
269
|
-
type: Injectable
|
270
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
271
|
-
|
272
|
-
/**
|
273
|
-
* @hidden
|
274
|
-
*/
|
275
|
-
class ToolbarComboBoxDirective {
|
276
|
-
constructor(combo, hostEl) {
|
277
|
-
this.combo = combo;
|
278
|
-
this.hostEl = hostEl;
|
279
|
-
this.keydownHandler = (e) => {
|
280
|
-
if (e.keyCode === Keys.Escape) {
|
281
|
-
e.stopPropagation();
|
282
|
-
if (this.combo.isOpen) {
|
283
|
-
this.combo.toggle(false);
|
284
|
-
}
|
285
|
-
else {
|
286
|
-
this.hostEl.nativeElement.parentElement.focus();
|
287
|
-
}
|
288
|
-
}
|
289
|
-
};
|
290
|
-
}
|
291
|
-
ngAfterViewInit() {
|
292
|
-
this.inputElement = this.combo.searchbar.input.nativeElement;
|
293
|
-
this.hostEl.nativeElement.setAttribute('tabindex', '-1');
|
294
|
-
this.inputElement.addEventListener('keydown', this.keydownHandler, true);
|
295
|
-
}
|
296
|
-
ngOnDestroy() {
|
297
|
-
this.inputElement.removeEventListener('keydown', this.keydownHandler);
|
298
|
-
}
|
299
|
-
}
|
300
|
-
ToolbarComboBoxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComboBoxDirective, deps: [{ token: i1$1.ComboBoxComponent }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
301
|
-
ToolbarComboBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ToolbarComboBoxDirective, isStandalone: true, selector: "[kendoPDFViewerComboBox]", ngImport: i0 });
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComboBoxDirective, decorators: [{
|
303
|
-
type: Directive,
|
304
|
-
args: [{
|
305
|
-
selector: '[kendoPDFViewerComboBox]',
|
306
|
-
standalone: true
|
307
|
-
}]
|
308
|
-
}], ctorParameters: function () { return [{ type: i1$1.ComboBoxComponent }, { type: i0.ElementRef }]; } });
|
309
|
-
|
310
|
-
const controller = new AbortController();
|
311
|
-
const { signal } = controller;
|
312
|
-
/**
|
313
|
-
* @hidden
|
314
|
-
*/
|
315
|
-
class ToolbarFocusableDirective {
|
316
|
-
constructor(host, navigationService, renderer) {
|
317
|
-
this.host = host;
|
318
|
-
this.navigationService = navigationService;
|
319
|
-
this.renderer = renderer;
|
320
|
-
navigationService.register(this);
|
321
|
-
}
|
322
|
-
ngAfterViewInit() {
|
323
|
-
const element = this.host.nativeElement;
|
324
|
-
this.renderer.setAttribute(element, 'tabindex', this.navigationService.isActive(this) ? '0' : '-1');
|
325
|
-
element.addEventListener('keydown', (e) => {
|
326
|
-
const targetsSelf = e.target === element;
|
327
|
-
const isLeftArrow = e.keyCode === Keys.ArrowLeft;
|
328
|
-
const isRightArrow = e.keyCode === Keys.ArrowRight;
|
329
|
-
const isArrow = isLeftArrow || isRightArrow;
|
330
|
-
if (!targetsSelf || !isArrow) {
|
331
|
-
return;
|
332
|
-
}
|
333
|
-
this.renderer.setAttribute(element, 'tabindex', '-1');
|
334
|
-
element.querySelectorAll(focusableSelector).forEach(el => {
|
335
|
-
this.renderer.setAttribute(el, 'tabindex', '-1');
|
336
|
-
});
|
337
|
-
if (isRightArrow) {
|
338
|
-
this.navigationService.move('right');
|
339
|
-
}
|
340
|
-
else if (isLeftArrow) {
|
341
|
-
this.navigationService.move('left');
|
342
|
-
}
|
343
|
-
}, { signal, capture: true });
|
344
|
-
element.addEventListener('click', () => {
|
345
|
-
this.navigationService.setActiveIndex(this);
|
346
|
-
}, { signal, capture: true });
|
347
|
-
}
|
348
|
-
ngOnDestroy() {
|
349
|
-
controller.abort();
|
350
|
-
this.navigationService.unregister(this);
|
351
|
-
}
|
352
|
-
activate() {
|
353
|
-
const element = this.host.nativeElement;
|
354
|
-
this.renderer.setAttribute(element, 'tabindex', '0');
|
355
|
-
element.focus();
|
356
|
-
}
|
357
|
-
}
|
358
|
-
ToolbarFocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
359
|
-
ToolbarFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ToolbarFocusableDirective, isStandalone: true, selector: "[kendoPDFViewerToolbarFocusable]", ngImport: i0 });
|
360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarFocusableDirective, decorators: [{
|
361
|
-
type: Directive,
|
362
|
-
args: [{
|
363
|
-
selector: '[kendoPDFViewerToolbarFocusable]',
|
364
|
-
standalone: true
|
365
|
-
}]
|
366
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ToolbarNavigationService }, { type: i0.Renderer2 }]; } });
|
367
|
-
|
368
|
-
/**
|
369
|
-
* @hidden
|
370
|
-
*/
|
371
|
-
class ToolbarInputWrapperComponent {
|
372
|
-
constructor(host, renderer) {
|
373
|
-
this.host = host;
|
374
|
-
this.renderer = renderer;
|
375
|
-
this.hostClass = true;
|
376
|
-
this.subs = new Subscription();
|
377
|
-
}
|
378
|
-
ngAfterViewInit() {
|
379
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'keydown.enter', () => {
|
380
|
-
if (this.toolbarTool.focus) {
|
381
|
-
this.toolbarTool.focus();
|
382
|
-
}
|
383
|
-
else if (this.toolbarTool.element) {
|
384
|
-
this.toolbarTool.element.nativeElement.setAttribute('tabindex', '0');
|
385
|
-
this.toolbarTool.element.nativeElement.focus();
|
386
|
-
}
|
387
|
-
}));
|
388
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'blur', () => this.host.nativeElement.querySelectorAll(focusableSelector).forEach(el => el.setAttribute('tabindex', '-1'))));
|
389
|
-
this.subs.add(this.renderer.listen(this.host.nativeElement, 'keydown.escape', () => {
|
390
|
-
if (this.toolbarTool.blur) {
|
391
|
-
this.toolbarTool.blur();
|
392
|
-
}
|
393
|
-
else if (this.toolbarTool.element) {
|
394
|
-
this.toolbarTool.element.nativeElement.setAttribute('tabindex', '-1');
|
395
|
-
this.toolbarTool.element.nativeElement.blur();
|
396
|
-
}
|
397
|
-
this.host.nativeElement.focus();
|
398
|
-
}));
|
399
|
-
}
|
400
|
-
ngOnDestroy() {
|
401
|
-
this.subs.unsubscribe();
|
402
|
-
}
|
403
|
-
}
|
404
|
-
ToolbarInputWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarInputWrapperComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
405
|
-
ToolbarInputWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ToolbarInputWrapperComponent, isStandalone: true, selector: "kendo-toolbar-input-wrapper", inputs: { toolbarTool: "toolbarTool" }, host: { properties: { "class.k-toolbar-item": "this.hostClass" } }, ngImport: i0, template: `
|
406
|
-
<ng-content></ng-content>
|
407
|
-
`, isInline: true });
|
408
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarInputWrapperComponent, decorators: [{
|
409
|
-
type: Component,
|
410
|
-
args: [{
|
411
|
-
selector: 'kendo-toolbar-input-wrapper',
|
412
|
-
template: `
|
413
|
-
<ng-content></ng-content>
|
414
|
-
`,
|
415
|
-
standalone: true
|
416
|
-
}]
|
417
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { toolbarTool: [{
|
418
|
-
type: Input
|
419
|
-
}], hostClass: [{
|
420
|
-
type: HostBinding,
|
421
|
-
args: ['class.k-toolbar-item']
|
422
|
-
}] } });
|
423
|
-
|
424
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
425
|
-
/**
|
426
|
-
* @hidden
|
427
|
-
*/
|
428
|
-
class ToolbarComponent {
|
429
|
-
constructor(localization, navigationService) {
|
430
|
-
this.localization = localization;
|
431
|
-
this.navigationService = navigationService;
|
432
|
-
this.toolbarClasses = true;
|
433
|
-
this.toolbarSizeClass = true;
|
434
|
-
this.zoomLevel = {
|
435
|
-
text: '125%',
|
436
|
-
displayValue: '125%',
|
437
|
-
value: 1.25
|
438
|
-
};
|
439
|
-
this.calculatedComboBoxValue = {
|
440
|
-
text: 'Fit to width',
|
441
|
-
displayValue: null,
|
442
|
-
value: null
|
443
|
-
};
|
444
|
-
this.skip = 0;
|
445
|
-
this.pageSize = 1;
|
446
|
-
this.fileSelect = new EventEmitter();
|
447
|
-
this.fileSelectStart = new EventEmitter();
|
448
|
-
this.fileSelectError = new EventEmitter();
|
449
|
-
this.download = new EventEmitter();
|
450
|
-
this.selectionEnabled = new EventEmitter();
|
451
|
-
this.panningEnabled = new EventEmitter();
|
452
|
-
this.pageChange = new EventEmitter();
|
453
|
-
this.zoomIn = new EventEmitter();
|
454
|
-
this.zoomOut = new EventEmitter();
|
455
|
-
this.zoomLevelChange = new EventEmitter();
|
456
|
-
this.print = new EventEmitter();
|
457
|
-
this.search = new EventEmitter();
|
458
|
-
this.zoomInIcon = zoomInIcon;
|
459
|
-
this.zoomOutIcon = zoomOutIcon;
|
460
|
-
this.handIcon = handIcon;
|
461
|
-
this.pointerIcon = pointerIcon;
|
462
|
-
this.searchIcon = searchIcon;
|
463
|
-
this.folderOpenIcon = folderOpenIcon;
|
464
|
-
this.downloadIcon = downloadIcon;
|
465
|
-
this.printIcon = printIcon;
|
466
|
-
this.pagerType = 'input';
|
467
|
-
this.valueNormalizer = (text) => text.pipe(map((value) => {
|
468
|
-
const parsedValue = parseFloat(value);
|
469
|
-
const newValue = Number.isNaN(parsedValue) ? 1 : parsedValue / 100;
|
470
|
-
return {
|
471
|
-
value: newValue,
|
472
|
-
displayValue: `${Math.round(newValue * 100)}%`,
|
473
|
-
text: `${Math.round(newValue * 100)}%`
|
474
|
-
};
|
475
|
-
}));
|
476
|
-
}
|
477
|
-
messageFor(key) {
|
478
|
-
return this.localization.get(key);
|
479
|
-
}
|
480
|
-
onFileSelect(e) {
|
481
|
-
const file = e.target.files[0];
|
482
|
-
this.fileSelectStart.emit();
|
483
|
-
if (file) {
|
484
|
-
const reader = new FileReader();
|
485
|
-
reader.onload = (e) => {
|
486
|
-
const data = e.target.result;
|
487
|
-
this.fileSelect.emit(data);
|
488
|
-
};
|
489
|
-
reader.onerror = (e) => {
|
490
|
-
this.fileSelectError.emit(e);
|
491
|
-
};
|
492
|
-
reader.readAsDataURL(file);
|
493
|
-
}
|
494
|
-
}
|
495
|
-
onZoomLevelChooserValueChange(zoomLevel) {
|
496
|
-
this.zoomLevelChange.emit(zoomLevel);
|
497
|
-
}
|
498
|
-
focus() {
|
499
|
-
this.navigationService.focusableTools[this.navigationService.currentFocusIndex].activate();
|
500
|
-
}
|
501
|
-
}
|
502
|
-
ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.LocalizationService }, { token: ToolbarNavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
503
|
-
ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ToolbarComponent, isStandalone: true, selector: "[kendoPDFViewerToolbar]", inputs: { zoomLevel: "zoomLevel", calculatedComboBoxValue: "calculatedComboBoxValue", skip: "skip", pageSize: "pageSize", total: "total", zoomInDisabled: "zoomInDisabled", zoomOutDisabled: "zoomOutDisabled", disabledTools: "disabledTools", zoomLevelChooserValue: "zoomLevelChooserValue", zoomOptionsData: "zoomOptionsData", pagesContainerId: "pagesContainerId", tools: "tools" }, outputs: { fileSelect: "fileSelect", fileSelectStart: "fileSelectStart", fileSelectError: "fileSelectError", download: "download", selectionEnabled: "selectionEnabled", panningEnabled: "panningEnabled", pageChange: "pageChange", zoomIn: "zoomIn", zoomOut: "zoomOut", zoomLevelChange: "zoomLevelChange", print: "print", search: "search" }, host: { properties: { "class.k-toolbar": "this.toolbarClasses", "class.k-toolbar-flat": "this.toolbarClasses", "class.k-toolbar-md": "this.toolbarSizeClass" } }, providers: [ToolbarNavigationService], viewQueries: [{ propertyName: "fileSelectEl", first: true, predicate: ["fileSelectEl"], descendants: true }], ngImport: i0, template: `
|
504
|
-
<ng-container *ngFor="let tool of tools">
|
505
|
-
<ng-container [ngSwitch]="tool">
|
506
|
-
<kendo-toolbar-input-wrapper
|
507
|
-
*ngSwitchCase="'pager'"
|
508
|
-
kendoPDFViewerToolbarFocusable
|
509
|
-
[toolbarTool]="pager">
|
510
|
-
<kendo-datapager
|
511
|
-
#pager
|
512
|
-
[attr.aria-controls]="pagesContainerId"
|
513
|
-
[attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
|
514
|
-
[class.k-disabled]="disabledTools"
|
515
|
-
[navigable]="true"
|
516
|
-
[pageSize]="pageSize"
|
517
|
-
[skip]="skip"
|
518
|
-
[total]="total"
|
519
|
-
[pageSizeValues]="false"
|
520
|
-
[info]="false"
|
521
|
-
[type]="pagerType"
|
522
|
-
(pageChange)="pageChange.emit($event)">
|
523
|
-
<kendo-datapager-messages
|
524
|
-
[firstPage]="messageFor('pagerFirstPage')"
|
525
|
-
[previousPage]="messageFor('pagerPreviousPage')"
|
526
|
-
[nextPage]="messageFor('pagerNextPage')"
|
527
|
-
[lastPage]="messageFor('pagerLastPage')"
|
528
|
-
[inputLabel]="messageFor('pagerInputLabel')"
|
529
|
-
[pageNumberInputTitle]="messageFor('pagerInputTitle')"
|
530
|
-
[of]="messageFor('pagerOf')"
|
531
|
-
[page]="messageFor('pagerPage')"></kendo-datapager-messages>
|
532
|
-
</kendo-datapager>
|
533
|
-
</kendo-toolbar-input-wrapper>
|
534
|
-
<span
|
535
|
-
*ngSwitchCase="'spacer'"
|
536
|
-
class="k-spacer"></span>
|
537
|
-
<kendo-buttongroup
|
538
|
-
*ngSwitchCase="'zoomInOut'"
|
539
|
-
[attr.aria-controls]="pagesContainerId"
|
540
|
-
class="k-button-group-flat k-toolbar-button-group"
|
541
|
-
[navigable]="false">
|
542
|
-
<button
|
543
|
-
type="button"
|
544
|
-
kendoButton
|
545
|
-
fillMode="flat"
|
546
|
-
kendoPDFViewerToolbarFocusable
|
547
|
-
icon="zoom-out"
|
548
|
-
[disabled]="disabledTools || zoomOutDisabled"
|
549
|
-
[svgIcon]="zoomOutIcon"
|
550
|
-
[attr.title]="messageFor('zoomOutTitle')"
|
551
|
-
[attr.aria-label]="messageFor('zoomOutTitle')"
|
552
|
-
(click)="zoomOut.emit()"></button>
|
553
|
-
<button
|
554
|
-
type="button"
|
555
|
-
kendoButton
|
556
|
-
fillMode="flat"
|
557
|
-
kendoPDFViewerToolbarFocusable
|
558
|
-
icon="zoom-in"
|
559
|
-
[disabled]="disabledTools || zoomInDisabled"
|
560
|
-
[svgIcon]="zoomInIcon"
|
561
|
-
[attr.title]="messageFor('zoomInTitle')"
|
562
|
-
[attr.aria-label]="messageFor('zoomInTitle')"
|
563
|
-
(click)="zoomIn.emit()"></button>
|
564
|
-
</kendo-buttongroup>
|
565
|
-
<kendo-toolbar-input-wrapper
|
566
|
-
*ngSwitchCase="'zoom'"
|
567
|
-
kendoPDFViewerToolbarFocusable
|
568
|
-
[toolbarTool]="combobox">
|
569
|
-
<kendo-combobox
|
570
|
-
#combobox
|
571
|
-
kendoPDFViewerComboBox
|
572
|
-
class="k-toolbar-combobox"
|
573
|
-
fillMode="flat"
|
574
|
-
[attr.aria-controls]="pagesContainerId"
|
575
|
-
[tabindex]="-1"
|
576
|
-
[data]="zoomOptionsData"
|
577
|
-
[disabled]="disabledTools"
|
578
|
-
[placeholder]="messageFor('zoomInputPlaceholder')"
|
579
|
-
textField="displayValue"
|
580
|
-
valueField="id"
|
581
|
-
[value]="zoomLevelChooserValue"
|
582
|
-
[allowCustom]="true"
|
583
|
-
[valueNormalizer]="valueNormalizer"
|
584
|
-
[clearButton]="false"
|
585
|
-
(valueChange)="onZoomLevelChooserValueChange($event)">
|
586
|
-
<ng-template kendoComboBoxItemTemplate let-dataItem>
|
587
|
-
{{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
|
588
|
-
</ng-template>
|
589
|
-
</kendo-combobox>
|
590
|
-
</kendo-toolbar-input-wrapper>
|
591
|
-
<kendo-buttongroup
|
592
|
-
*ngSwitchCase="'selection'"
|
593
|
-
[attr.aria-controls]="pagesContainerId"
|
594
|
-
[navigable]="false"
|
595
|
-
class="k-button-group-flat k-toolbar-button-group"
|
596
|
-
selection="single">
|
597
|
-
<button
|
598
|
-
type="button"
|
599
|
-
kendoButton
|
600
|
-
kendoPDFViewerToolbarFocusable
|
601
|
-
fillMode="flat"
|
602
|
-
icon="pointer"
|
603
|
-
[toggleable]="true"
|
604
|
-
[svgIcon]="pointerIcon"
|
605
|
-
[attr.title]="messageFor('selectionTitle')"
|
606
|
-
[attr.aria-label]="messageFor('selectionTitle')"
|
607
|
-
(click)="selectionEnabled.emit()"></button>
|
608
|
-
<button
|
609
|
-
type="button"
|
610
|
-
kendoButton
|
611
|
-
kendoPDFViewerToolbarFocusable
|
612
|
-
fillMode="flat"
|
613
|
-
icon="hand"
|
614
|
-
[svgIcon]="handIcon"
|
615
|
-
[toggleable]="true"
|
616
|
-
[selected]="true"
|
617
|
-
[attr.title]="messageFor('panningTitle')"
|
618
|
-
[attr.aria-label]="messageFor('panningTitle')"
|
619
|
-
(click)="panningEnabled.emit()"></button>
|
620
|
-
</kendo-buttongroup>
|
621
|
-
<button
|
622
|
-
*ngSwitchCase="'search'"
|
623
|
-
type="button"
|
624
|
-
kendoPDFViewerToolbarFocusable
|
625
|
-
kendoButton
|
626
|
-
class="k-toolbar-button"
|
627
|
-
fillMode="flat"
|
628
|
-
icon="search"
|
629
|
-
[disabled]="disabledTools"
|
630
|
-
[attr.title]="messageFor('searchTitle')"
|
631
|
-
[attr.aria-label]="messageFor('searchTitle')"
|
632
|
-
aria-haspopup="dialog"
|
633
|
-
[svgIcon]="searchIcon"
|
634
|
-
(click)="search.emit()"></button>
|
635
|
-
<button
|
636
|
-
*ngSwitchCase="'open'"
|
637
|
-
type="button"
|
638
|
-
fillMode="flat"
|
639
|
-
kendoPDFViewerToolbarFocusable
|
640
|
-
kendoButton
|
641
|
-
class="k-toolbar-button"
|
642
|
-
fillMode="flat"
|
643
|
-
icon="folder-open"
|
644
|
-
[svgIcon]="folderOpenIcon"
|
645
|
-
[attr.title]="messageFor('openTitle')"
|
646
|
-
[attr.aria-label]="messageFor('openTitle')"
|
647
|
-
[attr.aria-controls]="pagesContainerId"
|
648
|
-
(click)="fileSelectEl?.nativeElement.click()">
|
649
|
-
</button>
|
650
|
-
<button
|
651
|
-
*ngSwitchCase="'download'"
|
652
|
-
type="button"
|
653
|
-
fillMode="flat"
|
654
|
-
kendoPDFViewerToolbarFocusable
|
655
|
-
kendoButton
|
656
|
-
class="k-toolbar-button"
|
657
|
-
icon="download"
|
658
|
-
[svgIcon]="downloadIcon"
|
659
|
-
[disabled]="disabledTools"
|
660
|
-
[attr.title]="messageFor('downloadTitle')"
|
661
|
-
[attr.aria-label]="messageFor('downloadTitle')"
|
662
|
-
(click)="download.emit()"></button>
|
663
|
-
<button
|
664
|
-
*ngSwitchCase="'print'"
|
665
|
-
type="button"
|
666
|
-
fillMode="flat"
|
667
|
-
kendoPDFViewerToolbarFocusable
|
668
|
-
kendoButton
|
669
|
-
class="k-toolbar-button"
|
670
|
-
icon="print"
|
671
|
-
[svgIcon]="printIcon"
|
672
|
-
[disabled]="disabledTools"
|
673
|
-
[attr.title]="messageFor('printTitle')"
|
674
|
-
[attr.aria-label]="messageFor('printTitle')"
|
675
|
-
(click)="print.emit()"></button>
|
676
|
-
</ng-container>
|
677
|
-
</ng-container>
|
678
|
-
<input
|
679
|
-
#fileSelectEl
|
680
|
-
*ngIf="tools?.indexOf('open') > -1;"
|
681
|
-
type="file"
|
682
|
-
[style.display]="'none'"
|
683
|
-
aria-hidden="true"
|
684
|
-
accept=".pdf, .PDF"
|
685
|
-
(change)="onFileSelect($event)" />
|
686
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: ToolbarInputWrapperComponent, selector: "kendo-toolbar-input-wrapper", inputs: ["toolbarTool"] }, { kind: "directive", type: ToolbarFocusableDirective, selector: "[kendoPDFViewerToolbarFocusable]" }, { kind: "component", type: PagerComponent, selector: "kendo-datapager", inputs: ["total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size"], outputs: ["pageChange", "pageSizeChange"], exportAs: ["kendoDataPager"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-datapager-messages" }, { kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ComboBoxComponent, selector: "kendo-combobox", inputs: ["icon", "svgIcon", "inputAttributes", "showStickyHeader", "focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "escape"], exportAs: ["kendoComboBox"] }, { kind: "directive", type: ToolbarComboBoxDirective, selector: "[kendoPDFViewerComboBox]" }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComponent, decorators: [{
|
688
|
-
type: Component,
|
689
|
-
args: [{
|
690
|
-
selector: '[kendoPDFViewerToolbar]',
|
691
|
-
providers: [ToolbarNavigationService],
|
692
|
-
template: `
|
693
|
-
<ng-container *ngFor="let tool of tools">
|
694
|
-
<ng-container [ngSwitch]="tool">
|
695
|
-
<kendo-toolbar-input-wrapper
|
696
|
-
*ngSwitchCase="'pager'"
|
697
|
-
kendoPDFViewerToolbarFocusable
|
698
|
-
[toolbarTool]="pager">
|
699
|
-
<kendo-datapager
|
700
|
-
#pager
|
701
|
-
[attr.aria-controls]="pagesContainerId"
|
702
|
-
[attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
|
703
|
-
[class.k-disabled]="disabledTools"
|
704
|
-
[navigable]="true"
|
705
|
-
[pageSize]="pageSize"
|
706
|
-
[skip]="skip"
|
707
|
-
[total]="total"
|
708
|
-
[pageSizeValues]="false"
|
709
|
-
[info]="false"
|
710
|
-
[type]="pagerType"
|
711
|
-
(pageChange)="pageChange.emit($event)">
|
712
|
-
<kendo-datapager-messages
|
713
|
-
[firstPage]="messageFor('pagerFirstPage')"
|
714
|
-
[previousPage]="messageFor('pagerPreviousPage')"
|
715
|
-
[nextPage]="messageFor('pagerNextPage')"
|
716
|
-
[lastPage]="messageFor('pagerLastPage')"
|
717
|
-
[inputLabel]="messageFor('pagerInputLabel')"
|
718
|
-
[pageNumberInputTitle]="messageFor('pagerInputTitle')"
|
719
|
-
[of]="messageFor('pagerOf')"
|
720
|
-
[page]="messageFor('pagerPage')"></kendo-datapager-messages>
|
721
|
-
</kendo-datapager>
|
722
|
-
</kendo-toolbar-input-wrapper>
|
723
|
-
<span
|
724
|
-
*ngSwitchCase="'spacer'"
|
725
|
-
class="k-spacer"></span>
|
726
|
-
<kendo-buttongroup
|
727
|
-
*ngSwitchCase="'zoomInOut'"
|
728
|
-
[attr.aria-controls]="pagesContainerId"
|
729
|
-
class="k-button-group-flat k-toolbar-button-group"
|
730
|
-
[navigable]="false">
|
731
|
-
<button
|
732
|
-
type="button"
|
733
|
-
kendoButton
|
734
|
-
fillMode="flat"
|
735
|
-
kendoPDFViewerToolbarFocusable
|
736
|
-
icon="zoom-out"
|
737
|
-
[disabled]="disabledTools || zoomOutDisabled"
|
738
|
-
[svgIcon]="zoomOutIcon"
|
739
|
-
[attr.title]="messageFor('zoomOutTitle')"
|
740
|
-
[attr.aria-label]="messageFor('zoomOutTitle')"
|
741
|
-
(click)="zoomOut.emit()"></button>
|
742
|
-
<button
|
743
|
-
type="button"
|
744
|
-
kendoButton
|
745
|
-
fillMode="flat"
|
746
|
-
kendoPDFViewerToolbarFocusable
|
747
|
-
icon="zoom-in"
|
748
|
-
[disabled]="disabledTools || zoomInDisabled"
|
749
|
-
[svgIcon]="zoomInIcon"
|
750
|
-
[attr.title]="messageFor('zoomInTitle')"
|
751
|
-
[attr.aria-label]="messageFor('zoomInTitle')"
|
752
|
-
(click)="zoomIn.emit()"></button>
|
753
|
-
</kendo-buttongroup>
|
754
|
-
<kendo-toolbar-input-wrapper
|
755
|
-
*ngSwitchCase="'zoom'"
|
756
|
-
kendoPDFViewerToolbarFocusable
|
757
|
-
[toolbarTool]="combobox">
|
758
|
-
<kendo-combobox
|
759
|
-
#combobox
|
760
|
-
kendoPDFViewerComboBox
|
761
|
-
class="k-toolbar-combobox"
|
762
|
-
fillMode="flat"
|
763
|
-
[attr.aria-controls]="pagesContainerId"
|
764
|
-
[tabindex]="-1"
|
765
|
-
[data]="zoomOptionsData"
|
766
|
-
[disabled]="disabledTools"
|
767
|
-
[placeholder]="messageFor('zoomInputPlaceholder')"
|
768
|
-
textField="displayValue"
|
769
|
-
valueField="id"
|
770
|
-
[value]="zoomLevelChooserValue"
|
771
|
-
[allowCustom]="true"
|
772
|
-
[valueNormalizer]="valueNormalizer"
|
773
|
-
[clearButton]="false"
|
774
|
-
(valueChange)="onZoomLevelChooserValueChange($event)">
|
775
|
-
<ng-template kendoComboBoxItemTemplate let-dataItem>
|
776
|
-
{{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
|
777
|
-
</ng-template>
|
778
|
-
</kendo-combobox>
|
779
|
-
</kendo-toolbar-input-wrapper>
|
780
|
-
<kendo-buttongroup
|
781
|
-
*ngSwitchCase="'selection'"
|
782
|
-
[attr.aria-controls]="pagesContainerId"
|
783
|
-
[navigable]="false"
|
784
|
-
class="k-button-group-flat k-toolbar-button-group"
|
785
|
-
selection="single">
|
786
|
-
<button
|
787
|
-
type="button"
|
788
|
-
kendoButton
|
789
|
-
kendoPDFViewerToolbarFocusable
|
790
|
-
fillMode="flat"
|
791
|
-
icon="pointer"
|
792
|
-
[toggleable]="true"
|
793
|
-
[svgIcon]="pointerIcon"
|
794
|
-
[attr.title]="messageFor('selectionTitle')"
|
795
|
-
[attr.aria-label]="messageFor('selectionTitle')"
|
796
|
-
(click)="selectionEnabled.emit()"></button>
|
797
|
-
<button
|
798
|
-
type="button"
|
799
|
-
kendoButton
|
800
|
-
kendoPDFViewerToolbarFocusable
|
801
|
-
fillMode="flat"
|
802
|
-
icon="hand"
|
803
|
-
[svgIcon]="handIcon"
|
804
|
-
[toggleable]="true"
|
805
|
-
[selected]="true"
|
806
|
-
[attr.title]="messageFor('panningTitle')"
|
807
|
-
[attr.aria-label]="messageFor('panningTitle')"
|
808
|
-
(click)="panningEnabled.emit()"></button>
|
809
|
-
</kendo-buttongroup>
|
810
|
-
<button
|
811
|
-
*ngSwitchCase="'search'"
|
812
|
-
type="button"
|
813
|
-
kendoPDFViewerToolbarFocusable
|
814
|
-
kendoButton
|
815
|
-
class="k-toolbar-button"
|
816
|
-
fillMode="flat"
|
817
|
-
icon="search"
|
818
|
-
[disabled]="disabledTools"
|
819
|
-
[attr.title]="messageFor('searchTitle')"
|
820
|
-
[attr.aria-label]="messageFor('searchTitle')"
|
821
|
-
aria-haspopup="dialog"
|
822
|
-
[svgIcon]="searchIcon"
|
823
|
-
(click)="search.emit()"></button>
|
824
|
-
<button
|
825
|
-
*ngSwitchCase="'open'"
|
826
|
-
type="button"
|
827
|
-
fillMode="flat"
|
828
|
-
kendoPDFViewerToolbarFocusable
|
829
|
-
kendoButton
|
830
|
-
class="k-toolbar-button"
|
831
|
-
fillMode="flat"
|
832
|
-
icon="folder-open"
|
833
|
-
[svgIcon]="folderOpenIcon"
|
834
|
-
[attr.title]="messageFor('openTitle')"
|
835
|
-
[attr.aria-label]="messageFor('openTitle')"
|
836
|
-
[attr.aria-controls]="pagesContainerId"
|
837
|
-
(click)="fileSelectEl?.nativeElement.click()">
|
838
|
-
</button>
|
839
|
-
<button
|
840
|
-
*ngSwitchCase="'download'"
|
841
|
-
type="button"
|
842
|
-
fillMode="flat"
|
843
|
-
kendoPDFViewerToolbarFocusable
|
844
|
-
kendoButton
|
845
|
-
class="k-toolbar-button"
|
846
|
-
icon="download"
|
847
|
-
[svgIcon]="downloadIcon"
|
848
|
-
[disabled]="disabledTools"
|
849
|
-
[attr.title]="messageFor('downloadTitle')"
|
850
|
-
[attr.aria-label]="messageFor('downloadTitle')"
|
851
|
-
(click)="download.emit()"></button>
|
852
|
-
<button
|
853
|
-
*ngSwitchCase="'print'"
|
854
|
-
type="button"
|
855
|
-
fillMode="flat"
|
856
|
-
kendoPDFViewerToolbarFocusable
|
857
|
-
kendoButton
|
858
|
-
class="k-toolbar-button"
|
859
|
-
icon="print"
|
860
|
-
[svgIcon]="printIcon"
|
861
|
-
[disabled]="disabledTools"
|
862
|
-
[attr.title]="messageFor('printTitle')"
|
863
|
-
[attr.aria-label]="messageFor('printTitle')"
|
864
|
-
(click)="print.emit()"></button>
|
865
|
-
</ng-container>
|
866
|
-
</ng-container>
|
867
|
-
<input
|
868
|
-
#fileSelectEl
|
869
|
-
*ngIf="tools?.indexOf('open') > -1;"
|
870
|
-
type="file"
|
871
|
-
[style.display]="'none'"
|
872
|
-
aria-hidden="true"
|
873
|
-
accept=".pdf, .PDF"
|
874
|
-
(change)="onFileSelect($event)" />
|
875
|
-
`,
|
876
|
-
standalone: true,
|
877
|
-
imports: [NgFor, NgSwitch, NgSwitchCase, ToolbarInputWrapperComponent, ToolbarFocusableDirective, PagerComponent, CustomMessagesComponent, ButtonGroupComponent, ButtonComponent, ComboBoxComponent, ToolbarComboBoxDirective, ItemTemplateDirective, NgIf]
|
878
|
-
}]
|
879
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolbarNavigationService }]; }, propDecorators: { toolbarClasses: [{
|
880
|
-
type: HostBinding,
|
881
|
-
args: ['class.k-toolbar']
|
882
|
-
}, {
|
883
|
-
type: HostBinding,
|
884
|
-
args: ['class.k-toolbar-flat']
|
885
|
-
}], toolbarSizeClass: [{
|
886
|
-
type: HostBinding,
|
887
|
-
args: ['class.k-toolbar-md']
|
888
|
-
}], fileSelectEl: [{
|
889
|
-
type: ViewChild,
|
890
|
-
args: ['fileSelectEl']
|
891
|
-
}], zoomLevel: [{
|
892
|
-
type: Input
|
893
|
-
}], calculatedComboBoxValue: [{
|
894
|
-
type: Input
|
895
|
-
}], skip: [{
|
896
|
-
type: Input
|
897
|
-
}], pageSize: [{
|
898
|
-
type: Input
|
899
|
-
}], total: [{
|
900
|
-
type: Input
|
901
|
-
}], zoomInDisabled: [{
|
902
|
-
type: Input
|
903
|
-
}], zoomOutDisabled: [{
|
904
|
-
type: Input
|
905
|
-
}], disabledTools: [{
|
906
|
-
type: Input
|
907
|
-
}], zoomLevelChooserValue: [{
|
908
|
-
type: Input
|
909
|
-
}], zoomOptionsData: [{
|
910
|
-
type: Input
|
911
|
-
}], pagesContainerId: [{
|
912
|
-
type: Input
|
913
|
-
}], tools: [{
|
914
|
-
type: Input
|
915
|
-
}], fileSelect: [{
|
916
|
-
type: Output
|
917
|
-
}], fileSelectStart: [{
|
918
|
-
type: Output
|
919
|
-
}], fileSelectError: [{
|
920
|
-
type: Output
|
921
|
-
}], download: [{
|
922
|
-
type: Output
|
923
|
-
}], selectionEnabled: [{
|
924
|
-
type: Output
|
925
|
-
}], panningEnabled: [{
|
926
|
-
type: Output
|
927
|
-
}], pageChange: [{
|
928
|
-
type: Output
|
929
|
-
}], zoomIn: [{
|
930
|
-
type: Output
|
931
|
-
}], zoomOut: [{
|
932
|
-
type: Output
|
933
|
-
}], zoomLevelChange: [{
|
934
|
-
type: Output
|
935
|
-
}], print: [{
|
936
|
-
type: Output
|
937
|
-
}], search: [{
|
938
|
-
type: Output
|
939
|
-
}] } });
|
940
|
-
|
941
|
-
/**
|
942
|
-
* @hidden
|
943
|
-
*/
|
944
|
-
class PDFViewerSearchComponent {
|
945
|
-
constructor(localization) {
|
946
|
-
this.localization = localization;
|
947
|
-
this.ariaRole = 'dialog';
|
948
|
-
this.searchChange = new EventEmitter();
|
949
|
-
this.prevMatch = new EventEmitter();
|
950
|
-
this.nextMatch = new EventEmitter();
|
951
|
-
this.close = new EventEmitter();
|
952
|
-
this.convertLowercaseIcon = convertLowercaseIcon;
|
953
|
-
this.arrowUpIcon = arrowUpIcon;
|
954
|
-
this.arrowDownIcon = arrowDownIcon;
|
955
|
-
this.xIcon = xIcon;
|
956
|
-
this.value = null;
|
957
|
-
this.matchCase = false;
|
958
|
-
}
|
959
|
-
onEscape() {
|
960
|
-
this.close.emit();
|
961
|
-
}
|
962
|
-
ngAfterViewInit() {
|
963
|
-
this.textbox.focus();
|
964
|
-
}
|
965
|
-
messageFor(key) {
|
966
|
-
return this.localization.get(key);
|
967
|
-
}
|
968
|
-
onShiftTab(e) {
|
969
|
-
if (e.target.matches('.k-input-inner')) {
|
970
|
-
e.preventDefault();
|
971
|
-
this.closeButton.nativeElement.focus();
|
972
|
-
}
|
973
|
-
}
|
974
|
-
}
|
975
|
-
PDFViewerSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerSearchComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
976
|
-
PDFViewerSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PDFViewerSearchComponent, isStandalone: true, selector: "[kendoPDFViewerSearch]", inputs: { matches: "matches", currentMatch: "currentMatch" }, outputs: { searchChange: "searchChange", prevMatch: "prevMatch", nextMatch: "nextMatch", close: "close" }, host: { listeners: { "keydown.escape": "onEscape()" }, properties: { "attr.role": "this.ariaRole" } }, viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textbox"], descendants: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
977
|
-
<kendo-textbox
|
978
|
-
#textbox
|
979
|
-
[placeholder]="messageFor('searchInputPlaceholder')"
|
980
|
-
[value]="value"
|
981
|
-
(valueChange)="value = $event; searchChange.emit({text: $event, matchCase})"
|
982
|
-
(keydown.shift.tab)="onShiftTab($event)">
|
983
|
-
<ng-template kendoTextBoxSuffixTemplate>
|
984
|
-
<button
|
985
|
-
type="button"
|
986
|
-
kendoButton
|
987
|
-
[attr.title]="messageFor('searchMatchCaseTitle')"
|
988
|
-
fillMode="flat"
|
989
|
-
[togglable]="true"
|
990
|
-
(click)="matchCase = !matchCase; searchChange.emit({text: value, matchCase})"
|
991
|
-
icon="convert-lowercase"
|
992
|
-
[svgIcon]="convertLowercaseIcon"></button>
|
993
|
-
</ng-template>
|
994
|
-
</kendo-textbox>
|
995
|
-
<span class="k-search-matches">
|
996
|
-
<span>{{currentMatch}}</span> {{messageFor('searchMatchesOf')}} <span>{{matches}}</span>
|
997
|
-
</span>
|
998
|
-
<button
|
999
|
-
type="button"
|
1000
|
-
kendoButton
|
1001
|
-
[attr.title]="messageFor('searchPreviousMatchTitle')"
|
1002
|
-
fillMode="flat"
|
1003
|
-
[disabled]="matches === 0"
|
1004
|
-
(click)="prevMatch.emit()"
|
1005
|
-
icon='arrow-up'
|
1006
|
-
[svgIcon]="arrowUpIcon"></button>
|
1007
|
-
<button
|
1008
|
-
type="button"
|
1009
|
-
kendoButton
|
1010
|
-
[attr.title]="messageFor('searchNextMatchTitle')"
|
1011
|
-
fillMode="flat"
|
1012
|
-
[disabled]="matches === 0"
|
1013
|
-
(click)="nextMatch.emit()"
|
1014
|
-
icon='arrow-down'
|
1015
|
-
[svgIcon]="arrowDownIcon"></button>
|
1016
|
-
<button
|
1017
|
-
type="button"
|
1018
|
-
#closeButton
|
1019
|
-
kendoButton
|
1020
|
-
[attr.title]="messageFor('searchCloseTitle')"
|
1021
|
-
fillMode="flat"
|
1022
|
-
(click)="close.emit()"
|
1023
|
-
(keydown.tab)="$event.preventDefault(); textbox.focus();"
|
1024
|
-
icon='x'
|
1025
|
-
[svgIcon]="xIcon"></button>
|
1026
|
-
`, isInline: true, dependencies: [{ kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
1027
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerSearchComponent, decorators: [{
|
1028
|
-
type: Component,
|
1029
|
-
args: [{
|
1030
|
-
selector: '[kendoPDFViewerSearch]',
|
1031
|
-
template: `
|
1032
|
-
<kendo-textbox
|
1033
|
-
#textbox
|
1034
|
-
[placeholder]="messageFor('searchInputPlaceholder')"
|
1035
|
-
[value]="value"
|
1036
|
-
(valueChange)="value = $event; searchChange.emit({text: $event, matchCase})"
|
1037
|
-
(keydown.shift.tab)="onShiftTab($event)">
|
1038
|
-
<ng-template kendoTextBoxSuffixTemplate>
|
1039
|
-
<button
|
1040
|
-
type="button"
|
1041
|
-
kendoButton
|
1042
|
-
[attr.title]="messageFor('searchMatchCaseTitle')"
|
1043
|
-
fillMode="flat"
|
1044
|
-
[togglable]="true"
|
1045
|
-
(click)="matchCase = !matchCase; searchChange.emit({text: value, matchCase})"
|
1046
|
-
icon="convert-lowercase"
|
1047
|
-
[svgIcon]="convertLowercaseIcon"></button>
|
1048
|
-
</ng-template>
|
1049
|
-
</kendo-textbox>
|
1050
|
-
<span class="k-search-matches">
|
1051
|
-
<span>{{currentMatch}}</span> {{messageFor('searchMatchesOf')}} <span>{{matches}}</span>
|
1052
|
-
</span>
|
1053
|
-
<button
|
1054
|
-
type="button"
|
1055
|
-
kendoButton
|
1056
|
-
[attr.title]="messageFor('searchPreviousMatchTitle')"
|
1057
|
-
fillMode="flat"
|
1058
|
-
[disabled]="matches === 0"
|
1059
|
-
(click)="prevMatch.emit()"
|
1060
|
-
icon='arrow-up'
|
1061
|
-
[svgIcon]="arrowUpIcon"></button>
|
1062
|
-
<button
|
1063
|
-
type="button"
|
1064
|
-
kendoButton
|
1065
|
-
[attr.title]="messageFor('searchNextMatchTitle')"
|
1066
|
-
fillMode="flat"
|
1067
|
-
[disabled]="matches === 0"
|
1068
|
-
(click)="nextMatch.emit()"
|
1069
|
-
icon='arrow-down'
|
1070
|
-
[svgIcon]="arrowDownIcon"></button>
|
1071
|
-
<button
|
1072
|
-
type="button"
|
1073
|
-
#closeButton
|
1074
|
-
kendoButton
|
1075
|
-
[attr.title]="messageFor('searchCloseTitle')"
|
1076
|
-
fillMode="flat"
|
1077
|
-
(click)="close.emit()"
|
1078
|
-
(keydown.tab)="$event.preventDefault(); textbox.focus();"
|
1079
|
-
icon='x'
|
1080
|
-
[svgIcon]="xIcon"></button>
|
1081
|
-
`,
|
1082
|
-
standalone: true,
|
1083
|
-
imports: [TextBoxComponent, TextBoxSuffixTemplateDirective, ButtonComponent]
|
1084
|
-
}]
|
1085
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { textbox: [{
|
1086
|
-
type: ViewChild,
|
1087
|
-
args: ['textbox']
|
1088
|
-
}], closeButton: [{
|
1089
|
-
type: ViewChild,
|
1090
|
-
args: ['closeButton', { read: ElementRef }]
|
1091
|
-
}], ariaRole: [{
|
1092
|
-
type: HostBinding,
|
1093
|
-
args: ['attr.role']
|
1094
|
-
}], onEscape: [{
|
1095
|
-
type: HostListener,
|
1096
|
-
args: ['keydown.escape']
|
1097
|
-
}], matches: [{
|
1098
|
-
type: Input
|
1099
|
-
}], currentMatch: [{
|
1100
|
-
type: Input
|
1101
|
-
}], searchChange: [{
|
1102
|
-
type: Output
|
1103
|
-
}], prevMatch: [{
|
1104
|
-
type: Output
|
1105
|
-
}], nextMatch: [{
|
1106
|
-
type: Output
|
1107
|
-
}], close: [{
|
1108
|
-
type: Output
|
1109
|
-
}] } });
|
1110
|
-
|
1111
|
-
/**
|
1112
|
-
* @hidden
|
1113
|
-
*/
|
1114
|
-
class LoaderComponent {
|
1115
|
-
constructor() {
|
1116
|
-
this.loaderContainerClass = true;
|
1117
|
-
this.loaderContainerSizingClass = true;
|
1118
|
-
this.loaderPositionClass = true;
|
1119
|
-
}
|
1120
|
-
}
|
1121
|
-
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1122
|
-
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LoaderComponent, isStandalone: true, selector: "[kendoPDFViewerLoader]", inputs: { settings: "settings" }, host: { properties: { "class.k-loader-container": "this.loaderContainerClass", "class.k-loader-container-md": "this.loaderContainerSizingClass", "class.k-loader-top": "this.loaderPositionClass" } }, ngImport: i0, template: `
|
1123
|
-
<div class="k-loader-container-overlay k-overlay-light"></div>
|
1124
|
-
<div class="k-loader-container-inner">
|
1125
|
-
<kendo-loader
|
1126
|
-
[size]="settings?.size"
|
1127
|
-
[type]="settings?.type"
|
1128
|
-
[themeColor]="settings?.themeColor"></kendo-loader>
|
1129
|
-
</div>
|
1130
|
-
`, isInline: true, dependencies: [{ kind: "component", type: LoaderComponent$1, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }] });
|
1131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoaderComponent, decorators: [{
|
1132
|
-
type: Component,
|
1133
|
-
args: [{
|
1134
|
-
selector: '[kendoPDFViewerLoader]',
|
1135
|
-
template: `
|
1136
|
-
<div class="k-loader-container-overlay k-overlay-light"></div>
|
1137
|
-
<div class="k-loader-container-inner">
|
1138
|
-
<kendo-loader
|
1139
|
-
[size]="settings?.size"
|
1140
|
-
[type]="settings?.type"
|
1141
|
-
[themeColor]="settings?.themeColor"></kendo-loader>
|
1142
|
-
</div>
|
1143
|
-
`,
|
1144
|
-
standalone: true,
|
1145
|
-
imports: [LoaderComponent$1]
|
1146
|
-
}]
|
1147
|
-
}], propDecorators: { settings: [{
|
1148
|
-
type: Input
|
1149
|
-
}], loaderContainerClass: [{
|
1150
|
-
type: HostBinding,
|
1151
|
-
args: ['class.k-loader-container']
|
1152
|
-
}], loaderContainerSizingClass: [{
|
1153
|
-
type: HostBinding,
|
1154
|
-
args: ['class.k-loader-container-md']
|
1155
|
-
}], loaderPositionClass: [{
|
1156
|
-
type: HostBinding,
|
1157
|
-
args: ['class.k-loader-top']
|
1158
|
-
}] } });
|
1159
|
-
|
1160
|
-
/**
|
1161
|
-
* @hidden
|
1162
|
-
*/
|
1163
|
-
class LocalizedPDFViewerMessagesDirective extends Messages {
|
1164
|
-
constructor(service) {
|
1165
|
-
super();
|
1166
|
-
this.service = service;
|
1167
|
-
}
|
1168
|
-
}
|
1169
|
-
LocalizedPDFViewerMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedPDFViewerMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
1170
|
-
LocalizedPDFViewerMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedPDFViewerMessagesDirective, isStandalone: true, selector: "[kendoPDFViewerLocalizedMessages]", providers: [
|
1171
|
-
{
|
1172
|
-
provide: Messages,
|
1173
|
-
useExisting: forwardRef(() => LocalizedPDFViewerMessagesDirective)
|
1174
|
-
}
|
1175
|
-
], usesInheritance: true, ngImport: i0 });
|
1176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedPDFViewerMessagesDirective, decorators: [{
|
1177
|
-
type: Directive,
|
1178
|
-
args: [{
|
1179
|
-
providers: [
|
1180
|
-
{
|
1181
|
-
provide: Messages,
|
1182
|
-
useExisting: forwardRef(() => LocalizedPDFViewerMessagesDirective)
|
1183
|
-
}
|
1184
|
-
],
|
1185
|
-
selector: '[kendoPDFViewerLocalizedMessages]',
|
1186
|
-
standalone: true
|
1187
|
-
}]
|
1188
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
1189
|
-
|
1190
|
-
let counter = 0;
|
1191
|
-
/**
|
1192
|
-
* Represents the [Kendo UI PDFViewer component for Angular]({% slug overview_pdfviewer %}).
|
1193
|
-
*/
|
1194
|
-
class PDFViewerComponent {
|
1195
|
-
constructor(ngZone, renderer, localizationService, cdr) {
|
1196
|
-
this.ngZone = ngZone;
|
1197
|
-
this.renderer = renderer;
|
1198
|
-
this.localizationService = localizationService;
|
1199
|
-
this.cdr = cdr;
|
1200
|
-
this.hostClass = true;
|
1201
|
-
/**
|
1202
|
-
* Represents the tools collection rendered in the toolbar.
|
1203
|
-
* @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print' ]
|
1204
|
-
*/
|
1205
|
-
this.tools = [
|
1206
|
-
'pager',
|
1207
|
-
'spacer',
|
1208
|
-
'zoomInOut',
|
1209
|
-
'zoom',
|
1210
|
-
'selection',
|
1211
|
-
'spacer',
|
1212
|
-
'search',
|
1213
|
-
'open',
|
1214
|
-
'download',
|
1215
|
-
'print'
|
1216
|
-
];
|
1217
|
-
/**
|
1218
|
-
* The configuration of the internal Loader component.
|
1219
|
-
* @default { size: 'large', type: 'pulsing', themeColor: 'primary' }
|
1220
|
-
*/
|
1221
|
-
this.loaderSettings = {
|
1222
|
-
size: 'large',
|
1223
|
-
type: 'pulsing',
|
1224
|
-
themeColor: 'primary'
|
1225
|
-
};
|
1226
|
-
/**
|
1227
|
-
* The name of the file that will be saved when the end user clicks the Download tool.
|
1228
|
-
* @default 'Download'
|
1229
|
-
*/
|
1230
|
-
this.saveFileName = 'Download';
|
1231
|
-
/**
|
1232
|
-
* Represents the options for saving the file when the end user clicks the Download tool.
|
1233
|
-
* @default {}
|
1234
|
-
*/
|
1235
|
-
this.saveOptions = {};
|
1236
|
-
/**
|
1237
|
-
* Represents the step the zoom level will be changed with when using the ZoomIn and ZoomOut tools.
|
1238
|
-
* @default 0.25
|
1239
|
-
*/
|
1240
|
-
this.zoomRate = 0.25;
|
1241
|
-
/**
|
1242
|
-
* Represents minimum allowed zoom value.
|
1243
|
-
* @default 0.5
|
1244
|
-
*/
|
1245
|
-
this.minZoom = 0.5;
|
1246
|
-
/**
|
1247
|
-
* Represents maximum allowed zoom value.
|
1248
|
-
* @default 4
|
1249
|
-
*/
|
1250
|
-
this.maxZoom = 4;
|
1251
|
-
/**
|
1252
|
-
* The event fired when a PDF document is successfully loaded in the `PDFViewer` component.
|
1253
|
-
*/
|
1254
|
-
this.load = new EventEmitter();
|
1255
|
-
/**
|
1256
|
-
* The event fired when an error occurs during the loading or downloading of the PDF document.
|
1257
|
-
*/
|
1258
|
-
this.error = new EventEmitter();
|
1259
|
-
/**
|
1260
|
-
* The event fired when an error occurs during the loading of the PDF document.
|
1261
|
-
*/
|
1262
|
-
this.download = new EventEmitter();
|
1263
|
-
/**
|
1264
|
-
* The event fired when the end user changes the page of the loaded PDF document.
|
1265
|
-
*/
|
1266
|
-
this.pageChange = new EventEmitter();
|
1267
|
-
/**
|
1268
|
-
* The event fired when the end user changes the zoom level of the loaded PDF document.
|
1269
|
-
*/
|
1270
|
-
this.zoomLevelChange = new EventEmitter();
|
1271
|
-
this.loading = false;
|
1272
|
-
this.searchActive = false;
|
1273
|
-
this.matchCase = false;
|
1274
|
-
this.currentMatches = [];
|
1275
|
-
/**
|
1276
|
-
* @hidden
|
1277
|
-
*/
|
1278
|
-
this.showLicenseWatermark = false;
|
1279
|
-
this.skip = 0;
|
1280
|
-
this.zoomOptionsData = zoomOptionsData;
|
1281
|
-
this.zoomLevel = this.zoomOptionsData[5];
|
1282
|
-
this._pdfContext = null;
|
1283
|
-
this._enabledSelection = false;
|
1284
|
-
this._zoom = INITIAL_ZOOM_LEVEL;
|
1285
|
-
this._zoomToFit = false;
|
1286
|
-
this.subs = new Subscription();
|
1287
|
-
this.scrollListener = (e) => {
|
1288
|
-
const nextPage = currentPage(e.target.parentNode);
|
1289
|
-
if (nextPage !== this.skip) {
|
1290
|
-
this.ngZone.run(() => {
|
1291
|
-
hasObservers(this.pageChange) && this.pageChange.emit({
|
1292
|
-
previousPage: this.currentPage,
|
1293
|
-
currentPage: nextPage + 1
|
1294
|
-
});
|
1295
|
-
this.skip = nextPage;
|
1296
|
-
});
|
1297
|
-
}
|
1298
|
-
};
|
1299
|
-
const isValid = validatePackage(packageMetadata);
|
1300
|
-
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
1301
|
-
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
1302
|
-
counter++;
|
1303
|
-
}
|
1304
|
-
/**
|
1305
|
-
* The initial zoom level of the PDF document
|
1306
|
-
* ([see example](slug:tools_pdfviewer#zooming-tools)).
|
1307
|
-
*
|
1308
|
-
* @default 1.25
|
1309
|
-
*/
|
1310
|
-
set zoom(value) {
|
1311
|
-
if (typeof value === 'number') {
|
1312
|
-
this._zoom = value;
|
1313
|
-
this._fitType = null;
|
1314
|
-
this.setZoomLevel(value);
|
1315
|
-
}
|
1316
|
-
else {
|
1317
|
-
this._zoom = 1;
|
1318
|
-
this._fitType = zoomToFitOptions[value];
|
1319
|
-
}
|
1320
|
-
this._zoomToFit = typeof value !== 'number';
|
1321
|
-
}
|
1322
|
-
get zoom() {
|
1323
|
-
return this._zoom;
|
1324
|
-
}
|
1325
|
-
/**
|
1326
|
-
* Returns the current page number of the loaded PDF document.
|
1327
|
-
*/
|
1328
|
-
get currentPage() {
|
1329
|
-
var _a;
|
1330
|
-
const isDocumentLoaded = this.pagesContainer && ((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.pdfDoc);
|
1331
|
-
return isDocumentLoaded ? this.skip + 1 : null;
|
1332
|
-
}
|
1333
|
-
set pdfContext(doc) {
|
1334
|
-
this._pdfContext = doc;
|
1335
|
-
}
|
1336
|
-
/**
|
1337
|
-
* Exposes the currently loaded `PDF.js` document, its pages, and their DOM element wrapper.
|
1338
|
-
*/
|
1339
|
-
get pdfContext() {
|
1340
|
-
return this._pdfContext;
|
1341
|
-
}
|
1342
|
-
/**
|
1343
|
-
* @hidden
|
1344
|
-
*/
|
1345
|
-
get activePageId() {
|
1346
|
-
var _a, _b;
|
1347
|
-
if (!((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.pdfPages.length)) {
|
1348
|
-
return;
|
1349
|
-
}
|
1350
|
-
return (_b = this.pagesContainer.nativeElement.querySelectorAll('.k-page')[this.skip]) === null || _b === void 0 ? void 0 : _b.getAttribute('id');
|
1351
|
-
}
|
1352
|
-
/**
|
1353
|
-
* @hidden
|
1354
|
-
*/
|
1355
|
-
get pagesContainerId() {
|
1356
|
-
var _a;
|
1357
|
-
if (!((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.pdfPages.length)) {
|
1358
|
-
return;
|
1359
|
-
}
|
1360
|
-
return `k-pdfviewer-${counter}-pages-container`;
|
1361
|
-
}
|
1362
|
-
/**
|
1363
|
-
* @hidden
|
1364
|
-
*/
|
1365
|
-
set enabledSelection(value) {
|
1366
|
-
if (this.pdfScroller) {
|
1367
|
-
value ? this.pdfScroller.disablePanEventsTracking() : this.pdfScroller.enablePanEventsTracking();
|
1368
|
-
}
|
1369
|
-
this._enabledSelection = value;
|
1370
|
-
}
|
1371
|
-
/**
|
1372
|
-
* @hidden
|
1373
|
-
*/
|
1374
|
-
get enabledSelection() {
|
1375
|
-
return this._enabledSelection;
|
1376
|
-
}
|
1377
|
-
ngOnInit() {
|
1378
|
-
this.subs.add(this.localizationService.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
1379
|
-
}
|
1380
|
-
ngAfterViewInit() {
|
1381
|
-
const pagesContainer = this.pagesContainer.nativeElement.parentNode;
|
1382
|
-
this.ngZone.runOutsideAngular(() => this.subs.add(this.renderer.listen(pagesContainer, 'scroll', this.scrollListener)));
|
1383
|
-
}
|
1384
|
-
ngOnDestroy() {
|
1385
|
-
this.subs.unsubscribe();
|
1386
|
-
removeChildren(this.pagesContainer.nativeElement);
|
1387
|
-
if (this.pdfScroller) {
|
1388
|
-
this.pdfScroller.destroy();
|
1389
|
-
this.pdfScroller = null;
|
1390
|
-
}
|
1391
|
-
if (this.searchService) {
|
1392
|
-
this.searchService.destroy();
|
1393
|
-
this.searchService = null;
|
1394
|
-
}
|
1395
|
-
this.pdfContext = null;
|
1396
|
-
}
|
1397
|
-
ngOnChanges(changes) {
|
1398
|
-
const newBase64Data = changes['data'] && this.data;
|
1399
|
-
const newUrl = changes['url'] && this.url;
|
1400
|
-
const newArrayBuffer = changes['arrayBuffer'] && this.arrayBuffer;
|
1401
|
-
const newTypedArray = changes['typedArray'] && this.typedArray;
|
1402
|
-
this.verifySettings(changes);
|
1403
|
-
const source = newUrl ? 'url' : newArrayBuffer ? 'arrayBuffer' : newBase64Data ? 'data' : 'typedArray';
|
1404
|
-
if (newUrl || newArrayBuffer || newBase64Data || newTypedArray) {
|
1405
|
-
this.loadPdf(source, this[source]);
|
1406
|
-
}
|
1407
|
-
}
|
1408
|
-
/**
|
1409
|
-
* Scrolls the PDFViewer document to the specified page number, treating 0 as the first page
|
1410
|
-
* ([see example](slug:tools_pdfviewer#programmatically-scrolling-the-pdfviewer)).
|
1411
|
-
*/
|
1412
|
-
scrollToPage(page) {
|
1413
|
-
scrollToPage(this.pagesContainer.nativeElement, page);
|
1414
|
-
}
|
1415
|
-
/**
|
1416
|
-
* @hidden
|
1417
|
-
*/
|
1418
|
-
onFileSelect(e) {
|
1419
|
-
this.loadPdf('data', e);
|
1420
|
-
}
|
1421
|
-
/**
|
1422
|
-
* @hidden
|
1423
|
-
*/
|
1424
|
-
onFileSelectError(e) {
|
1425
|
-
hasObservers(this.error) && this.error.emit({ error: e, context: this.pdfContext });
|
1426
|
-
}
|
1427
|
-
/**
|
1428
|
-
* @hidden
|
1429
|
-
*/
|
1430
|
-
onPageChange(e) {
|
1431
|
-
this.scrollToPage(e.skip);
|
1432
|
-
hasObservers(this.pageChange) && this.pageChange.emit({
|
1433
|
-
previousPage: this.skip + 1,
|
1434
|
-
currentPage: e.skip + 1
|
1435
|
-
});
|
1436
|
-
this.skip = e.skip;
|
1437
|
-
}
|
1438
|
-
/**
|
1439
|
-
* @hidden
|
1440
|
-
*/
|
1441
|
-
onDownload() {
|
1442
|
-
this.ngZone.runOutsideAngular(() => this.pdfContext.pdfDoc.getData()
|
1443
|
-
.then((data) => new Blob([data], { type: 'application/pdf' }))
|
1444
|
-
.then((blob) => {
|
1445
|
-
const downloadEvent = new PDFViewerDownloadEvent(blob, this.saveFileName, this.saveOptions, this.pdfContext);
|
1446
|
-
this.ngZone.run(() => this.download.emit(downloadEvent));
|
1447
|
-
if (!downloadEvent.isDefaultPrevented()) {
|
1448
|
-
saveAs(blob, this.saveFileName, this.saveOptions);
|
1449
|
-
}
|
1450
|
-
})
|
1451
|
-
.catch((reason) => {
|
1452
|
-
if (hasObservers(this.error)) {
|
1453
|
-
this.ngZone.run(() => this.error.emit({
|
1454
|
-
error: reason,
|
1455
|
-
context: this.pdfContext
|
1456
|
-
}));
|
1457
|
-
}
|
1458
|
-
}));
|
1459
|
-
}
|
1460
|
-
/**
|
1461
|
-
* @hidden
|
1462
|
-
*/
|
1463
|
-
onZoomIn() {
|
1464
|
-
const newZoom = Math.min(this.pdfContext.zoom + this.zoomRate, this.maxZoom);
|
1465
|
-
if (newZoom !== this.pdfContext.zoom && this.pdfContext.pdfDoc) {
|
1466
|
-
if (hasObservers(this.zoomLevelChange)) {
|
1467
|
-
this.zoomLevelChange.emit({
|
1468
|
-
previousZoomLevel: this.zoom,
|
1469
|
-
currentZoomLevel: newZoom
|
1470
|
-
});
|
1471
|
-
}
|
1472
|
-
this.zoom = this.pdfContext.zoom = newZoom;
|
1473
|
-
this.setZoomLevel(newZoom);
|
1474
|
-
this.ngZone.runOutsideAngular(() => this.reloadDocument());
|
1475
|
-
}
|
1476
|
-
}
|
1477
|
-
/**
|
1478
|
-
* @hidden
|
1479
|
-
*/
|
1480
|
-
onZoomOut() {
|
1481
|
-
const newZoom = Math.max(this.pdfContext.zoom - this.zoomRate, this.minZoom);
|
1482
|
-
if (newZoom !== this.pdfContext.zoom && this.pdfContext.pdfDoc) {
|
1483
|
-
if (hasObservers(this.zoomLevelChange)) {
|
1484
|
-
this.zoomLevelChange.emit({
|
1485
|
-
previousZoomLevel: this.zoom,
|
1486
|
-
currentZoomLevel: newZoom
|
1487
|
-
});
|
1488
|
-
}
|
1489
|
-
this.zoom = this.pdfContext.zoom = newZoom;
|
1490
|
-
this.setZoomLevel(newZoom);
|
1491
|
-
this.ngZone.runOutsideAngular(() => this.reloadDocument());
|
1492
|
-
}
|
1493
|
-
}
|
1494
|
-
/**
|
1495
|
-
* @hidden
|
1496
|
-
*/
|
1497
|
-
onZoomLevelChange(zoomLevel, emit = true) {
|
1498
|
-
if (!zoomLevel) {
|
1499
|
-
zoomLevel = {
|
1500
|
-
value: 1,
|
1501
|
-
displayValue: '100%',
|
1502
|
-
text: '100%'
|
1503
|
-
};
|
1504
|
-
}
|
1505
|
-
let newZoom = calculateZoomLevel(zoomLevel.value, zoomLevel.type, this.pdfContext.zoom, this.pagesContainer.nativeElement);
|
1506
|
-
newZoom = Math.round(newZoom * 100) / 100;
|
1507
|
-
const sameZoom = this.zoom === newZoom;
|
1508
|
-
if (!sameZoom && emit && hasObservers(this.zoomLevelChange)) {
|
1509
|
-
this.zoomLevelChange.emit({
|
1510
|
-
previousZoomLevel: this.zoom,
|
1511
|
-
currentZoomLevel: newZoom
|
1512
|
-
});
|
1513
|
-
}
|
1514
|
-
this.zoom = this.pdfContext.zoom = newZoom;
|
1515
|
-
this.setZoomLevel(newZoom);
|
1516
|
-
this.ngZone.runOutsideAngular(() => this.reloadDocument());
|
1517
|
-
}
|
1518
|
-
/**
|
1519
|
-
* @hidden
|
1520
|
-
*/
|
1521
|
-
onSearch() {
|
1522
|
-
this.searchActive = true;
|
1523
|
-
this.ngZone.runOutsideAngular(() => {
|
1524
|
-
const pagesTextLayers = Array.from(this.pagesContainer.nativeElement.querySelectorAll('.k-text-layer'));
|
1525
|
-
this.searchService = new SearchService({
|
1526
|
-
textContainers: pagesTextLayers || [],
|
1527
|
-
highlightClass: 'k-search-highlight',
|
1528
|
-
highlightMarkClass: 'k-search-highlight-mark',
|
1529
|
-
charClass: 'k-text-char'
|
1530
|
-
});
|
1531
|
-
});
|
1532
|
-
}
|
1533
|
-
/**
|
1534
|
-
* @hidden
|
1535
|
-
*/
|
1536
|
-
onPrint() {
|
1537
|
-
this.loading = true;
|
1538
|
-
const onError = (e) => {
|
1539
|
-
this.loading = false;
|
1540
|
-
if (hasObservers(this.error)) {
|
1541
|
-
this.error.emit(e);
|
1542
|
-
}
|
1543
|
-
};
|
1544
|
-
const onDone = () => {
|
1545
|
-
this.loading = false;
|
1546
|
-
};
|
1547
|
-
print(this.pdfContext.pdfPages, onDone, onError);
|
1548
|
-
}
|
1549
|
-
/**
|
1550
|
-
* @hidden
|
1551
|
-
*/
|
1552
|
-
onSearchChange(e) {
|
1553
|
-
this.currentMatches = this.searchService.search(Object.assign({}, e));
|
1554
|
-
this.currentMatch = this.currentMatches.length ? 1 : 0;
|
1555
|
-
}
|
1556
|
-
/**
|
1557
|
-
* @hidden
|
1558
|
-
*/
|
1559
|
-
closeSearch(toolbar) {
|
1560
|
-
this.searchActive = false;
|
1561
|
-
this.searchService.destroy();
|
1562
|
-
this.currentMatches = [];
|
1563
|
-
this.currentMatch = null;
|
1564
|
-
toolbar.focus();
|
1565
|
-
}
|
1566
|
-
/**
|
1567
|
-
* @hidden
|
1568
|
-
*/
|
1569
|
-
onNextMatch() {
|
1570
|
-
goToNextSearchMatch({ search: this.searchService, scroller: this.pdfScroller });
|
1571
|
-
this.currentMatch = this.currentMatch + 1 > this.currentMatches.length ? 1 : this.currentMatch + 1;
|
1572
|
-
}
|
1573
|
-
/**
|
1574
|
-
* @hidden
|
1575
|
-
*/
|
1576
|
-
onPreviousMatch() {
|
1577
|
-
goToPreviousSearchMatch({ search: this.searchService, scroller: this.pdfScroller });
|
1578
|
-
this.currentMatch = this.currentMatch - 1 < 1 ? this.currentMatches.length : this.currentMatch - 1;
|
1579
|
-
}
|
1580
|
-
loadPdf(dataType, data) {
|
1581
|
-
this.loading = true;
|
1582
|
-
this.ngZone.runOutsideAngular(() => setTimeout(() => {
|
1583
|
-
var _a;
|
1584
|
-
removeChildren(this.pagesContainer.nativeElement);
|
1585
|
-
loadPDF({
|
1586
|
-
[dataType]: data,
|
1587
|
-
dom: this.pagesContainer.nativeElement,
|
1588
|
-
zoom: ((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.zoom) || this.zoom,
|
1589
|
-
done: (e) => {
|
1590
|
-
if (!this._zoomToFit) {
|
1591
|
-
this.ngZone.run(() => {
|
1592
|
-
this.pdfContext = Object.assign(Object.assign({}, e), { element: this.pagesContainer.nativeElement });
|
1593
|
-
this.loading = false;
|
1594
|
-
this.cdr.markForCheck();
|
1595
|
-
});
|
1596
|
-
}
|
1597
|
-
else {
|
1598
|
-
const zoomLevelOption = this.zoomOptionsData.find(item => item.type === this._fitType);
|
1599
|
-
this.pdfContext = Object.assign(Object.assign({}, e), { element: this.pagesContainer.nativeElement });
|
1600
|
-
this.onZoomLevelChange(zoomLevelOption, false);
|
1601
|
-
this.cdr.markForCheck();
|
1602
|
-
}
|
1603
|
-
if (this.pdfScroller) {
|
1604
|
-
this.pdfScroller.destroy();
|
1605
|
-
}
|
1606
|
-
this.pdfScroller = this.pdfScroller = new Scroller(this.pagesContainer.nativeElement.parentNode, {
|
1607
|
-
filter: '.k-page',
|
1608
|
-
events: {}
|
1609
|
-
});
|
1610
|
-
this.pdfScroller.enablePanEventsTracking();
|
1611
|
-
this.assignPageIds();
|
1612
|
-
if (hasObservers(this.load)) {
|
1613
|
-
this.ngZone.run(() => this.load.emit({ context: this.pdfContext }));
|
1614
|
-
}
|
1615
|
-
},
|
1616
|
-
error: (e) => {
|
1617
|
-
this.ngZone.run(() => this.loading = false);
|
1618
|
-
this.pdfContext = null;
|
1619
|
-
if (hasObservers(this.error)) {
|
1620
|
-
this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
|
1621
|
-
}
|
1622
|
-
}
|
1623
|
-
});
|
1624
|
-
}));
|
1625
|
-
}
|
1626
|
-
reloadDocument() {
|
1627
|
-
var _a, _b;
|
1628
|
-
if ((_a = this.pagesContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
1629
|
-
this.ngZone.run(() => this.loading = true);
|
1630
|
-
removeChildren(this.pagesContainer.nativeElement);
|
1631
|
-
reloadDocument({
|
1632
|
-
pdfDoc: (_b = this.pdfContext) === null || _b === void 0 ? void 0 : _b.pdfDoc,
|
1633
|
-
zoom: this.zoom,
|
1634
|
-
dom: this.pagesContainer.nativeElement,
|
1635
|
-
done: (pdfPages) => {
|
1636
|
-
this.pdfContext.pdfPages = pdfPages;
|
1637
|
-
this.ngZone.run(() => {
|
1638
|
-
this.loading = false;
|
1639
|
-
this.cdr.markForCheck();
|
1640
|
-
});
|
1641
|
-
this.assignPageIds();
|
1642
|
-
},
|
1643
|
-
error: (e) => {
|
1644
|
-
if (this.pdfScroller) {
|
1645
|
-
this.pdfScroller.destroy();
|
1646
|
-
this.pdfScroller = null;
|
1647
|
-
}
|
1648
|
-
this.pdfContext = null;
|
1649
|
-
if (hasObservers(this.error)) {
|
1650
|
-
this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
|
1651
|
-
}
|
1652
|
-
}
|
1653
|
-
});
|
1654
|
-
}
|
1655
|
-
}
|
1656
|
-
assignPageIds() {
|
1657
|
-
this.pagesContainer.nativeElement.querySelectorAll('.k-page').forEach((pageElement, index) => {
|
1658
|
-
const id = `k-pdfviewer-${counter}-page-${index + 1}`;
|
1659
|
-
this.renderer.setAttribute(pageElement, 'id', id);
|
1660
|
-
});
|
1661
|
-
}
|
1662
|
-
setZoomLevel(zoom) {
|
1663
|
-
const option = this.zoomOptionsData.find(item => !item.type && item.value === zoom);
|
1664
|
-
this.zoomLevel = option ? Object.assign({}, option) : {
|
1665
|
-
value: zoom,
|
1666
|
-
displayValue: `${Math.round(zoom * 100)}%`,
|
1667
|
-
text: `${Math.round(zoom * 100)}%`
|
1668
|
-
};
|
1669
|
-
}
|
1670
|
-
verifySettings(changes) {
|
1671
|
-
const sourceTypes = ['url', 'arrayBuffer', 'data', 'typedArray'];
|
1672
|
-
const setTypes = sourceTypes.map(item => this.isSet(changes, item)).filter(item => item);
|
1673
|
-
if (isDevMode() && setTypes.length > 1) {
|
1674
|
-
console.warn(`
|
1675
|
-
Setting more than one source of data simultaneously is not supported.
|
1676
|
-
Only one of 'url', 'arrayBuffer', 'data', or 'typedArray' can be set.
|
1677
|
-
`);
|
1678
|
-
}
|
1679
|
-
}
|
1680
|
-
isSet(changes, source) {
|
1681
|
-
return this[source] || (changes[source] && changes[source].currentValue);
|
1682
|
-
}
|
1683
|
-
}
|
1684
|
-
PDFViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
1685
|
-
PDFViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PDFViewerComponent, isStandalone: true, selector: "kendo-pdfviewer", inputs: { tools: "tools", loaderSettings: "loaderSettings", saveFileName: "saveFileName", saveOptions: "saveOptions", url: "url", data: "data", arrayBuffer: "arrayBuffer", typedArray: "typedArray", zoom: "zoom", zoomRate: "zoomRate", minZoom: "minZoom", maxZoom: "maxZoom" }, outputs: { load: "load", error: "error", download: "download", pageChange: "pageChange", zoomLevelChange: "zoomLevelChange" }, host: { properties: { "class.k-pdf-viewer": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
|
1686
|
-
LocalizationService,
|
1687
|
-
{
|
1688
|
-
provide: L10N_PREFIX,
|
1689
|
-
useValue: 'kendo.pdfviewer'
|
1690
|
-
}
|
1691
|
-
], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
|
1692
|
-
<ng-container kendoPDFViewerLocalizedMessages
|
1693
|
-
i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
|
1694
|
-
pagerFirstPage="Go to the first page"
|
1695
|
-
|
1696
|
-
i18n-pagerPreviousPage="kendo.pdfviewer.pagerPreviousPage|The label for the previous page button in the Pager"
|
1697
|
-
pagerPreviousPage="Go to the previous page"
|
1698
|
-
|
1699
|
-
i18n-pagerNextPage="kendo.pdfviewer.pagerNextPage|The label for the next page button in the Pager"
|
1700
|
-
pagerNextPage="Go to the next page"
|
1701
|
-
|
1702
|
-
i18n-pagerLastPage="kendo.pdfviewer.pagerLastPage|The label for the last page button in the Pager"
|
1703
|
-
pagerLastPage="Go to the last page"
|
1704
|
-
|
1705
|
-
i18n-pagerPage="kendo.pdfviewer.pagerPage|The text before the current page number in the Pager"
|
1706
|
-
pagerPage="Page"
|
1707
|
-
|
1708
|
-
i18n-pagerOf="kendo.pdfviewer.pagerOf|The text before the total pages number in the Pager"
|
1709
|
-
pagerOf="of"
|
1710
|
-
|
1711
|
-
i18n-pagerInputTitle="kendo.pdfviewer.pagerInputTitle|The label of the pager input element"
|
1712
|
-
pagerInputTitle="Page Number"
|
1713
|
-
|
1714
|
-
i18n-pagerInputLabel="kendo.pdfviewer.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number."
|
1715
|
-
pagerInputLabel="Type a page number"
|
1716
|
-
|
1717
|
-
i18n-zoomInTitle="kendo.pdfviewer.zoomInTitle|The ZoomIn tool title and label."
|
1718
|
-
zoomInTitle="Zoom in"
|
1719
|
-
|
1720
|
-
i18n-zoomOutTitle="kendo.pdfviewer.zoomOutTitle|The ZoomOut tool title and label."
|
1721
|
-
zoomOutTitle="Zoom out"
|
1722
|
-
|
1723
|
-
i18n-selectionTitle="kendo.pdfviewer.selectionTitle|The Selection tool title and label."
|
1724
|
-
selectionTitle="Enable selection"
|
1725
|
-
|
1726
|
-
i18n-panningTitle="kendo.pdfviewer.panningTitle|The Panning tool title and label."
|
1727
|
-
panningTitle="Enable panning"
|
1728
|
-
|
1729
|
-
i18n-searchTitle="kendo.pdfviewer.searchTitle|The Search tool title and label."
|
1730
|
-
searchTitle="Search"
|
1731
|
-
|
1732
|
-
i18n-openTitle="kendo.pdfviewer.openTitle|The Open tool title and label."
|
1733
|
-
openTitle="Open"
|
1734
|
-
|
1735
|
-
i18n-downloadTitle="kendo.pdfviewer.downloadTitle|The Download tool title and label."
|
1736
|
-
downloadTitle="Download"
|
1737
|
-
|
1738
|
-
i18n-printTitle="kendo.pdfviewer.printTitle|The Print tool title and label."
|
1739
|
-
printTitle="Print"
|
1740
|
-
|
1741
|
-
i18n-fitToPage="kendo.pdfviewer.fitToPage|The text for the zoom level chooser Fit to page option."
|
1742
|
-
fitToPage="Fit to page"
|
1743
|
-
|
1744
|
-
i18n-fitToWidth="kendo.pdfviewer.fitToWidth|The text for the zoom level chooser Fit to width option."
|
1745
|
-
fitToWidth="Fit to width"
|
1746
|
-
|
1747
|
-
i18n-searchInputPlaceholder="kendo.pdfviewer.searchInputPlaceholder|The text for the search input placeholder."
|
1748
|
-
searchInputPlaceholder="Search"
|
1749
|
-
|
1750
|
-
i18n-searchMatchesOf="kendo.pdfviewer.searchMatchesOf|The text before the total number of matches in the Search tool."
|
1751
|
-
searchMatchesOf="of"
|
1752
|
-
|
1753
|
-
i18n-searchPreviousMatchTitle="kendo.pdfviewer.searchPreviousMatchTitle|The title of the Search tool previous match button."
|
1754
|
-
searchPreviousMatchTitle="Previous match"
|
1755
|
-
|
1756
|
-
i18n-searchNextMatchTitle="kendo.pdfviewer.searchNextMatchTitle|The title of the Search tool next match button."
|
1757
|
-
searchNextMatchTitle="Next match"
|
1758
|
-
|
1759
|
-
i18n-searchCloseTitle="kendo.pdfviewer.searchCloseTitle|The title of the Search tool close button."
|
1760
|
-
searchCloseTitle="Close"
|
1761
|
-
|
1762
|
-
i18n-searchMatchCaseTitle="kendo.pdfviewer.searchMatchCaseTitle|The title of the Search tool match case button."
|
1763
|
-
searchMatchCaseTitle="Match case"
|
1764
|
-
|
1765
|
-
i18n-zoomInputPlaceholder="kendo.pdfviewer.zoomInputPlaceholder|The text for the zoom tool input placeholder."
|
1766
|
-
zoomInputPlaceholder="Choose zoom level">
|
1767
|
-
</ng-container>
|
1768
|
-
<div kendoPDFViewerLoader
|
1769
|
-
*ngIf="loading"
|
1770
|
-
[settings]="loaderSettings"></div>
|
1771
|
-
<div kendoPDFViewerToolbar
|
1772
|
-
#toolbar
|
1773
|
-
role="toolbar"
|
1774
|
-
[attr.aria-controls]="pagesContainerId"
|
1775
|
-
[tools]="tools"
|
1776
|
-
[skip]="skip"
|
1777
|
-
[total]="pdfContext?.pdfPages.length ? pdfContext?.pdfPages.length : 1"
|
1778
|
-
[pageSize]="1"
|
1779
|
-
[zoomInDisabled]="zoom >= maxZoom || !pdfContext?.pdfDoc"
|
1780
|
-
[zoomOutDisabled]="zoom <= minZoom || !pdfContext?.pdfDoc"
|
1781
|
-
[zoomOptionsData]="zoomOptionsData"
|
1782
|
-
[zoomLevelChooserValue]="zoomLevel"
|
1783
|
-
[disabledTools]="!pdfContext?.pdfDoc"
|
1784
|
-
(pageChange)="onPageChange($event)"
|
1785
|
-
(fileSelect)="onFileSelect($event)"
|
1786
|
-
(fileSelectStart)="loading = true;"
|
1787
|
-
(fileSelectError)="onFileSelectError($event)"
|
1788
|
-
(download)="onDownload()"
|
1789
|
-
(panningEnabled)="enabledSelection = false;"
|
1790
|
-
(selectionEnabled)="enabledSelection = true;"
|
1791
|
-
(zoomIn)="onZoomIn()"
|
1792
|
-
(zoomOut)="onZoomOut()"
|
1793
|
-
(zoomLevelChange)="onZoomLevelChange($event)"
|
1794
|
-
(print)="onPrint()"
|
1795
|
-
(search)="onSearch()"></div>
|
1796
|
-
<div
|
1797
|
-
class="k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto"
|
1798
|
-
[class.k-enable-text-select]="enabledSelection"
|
1799
|
-
[class.k-enable-panning]="!enabledSelection"
|
1800
|
-
[attr.aria-describedby]="activePageId"
|
1801
|
-
tabindex="0">
|
1802
|
-
<div
|
1803
|
-
kendoPDFViewerSearch
|
1804
|
-
*ngIf="searchActive"
|
1805
|
-
[currentMatch]="currentMatch"
|
1806
|
-
[matches]="currentMatches.length"
|
1807
|
-
class="k-search-panel k-pos-sticky k-top-center"
|
1808
|
-
(searchChange)="onSearchChange($event)"
|
1809
|
-
(prevMatch)="onPreviousMatch()"
|
1810
|
-
(nextMatch)="onNextMatch()"
|
1811
|
-
(close)="closeSearch(toolbar)"></div>
|
1812
|
-
<div
|
1813
|
-
#pagesContainer
|
1814
|
-
class="k-pdf-viewer-pages"
|
1815
|
-
[style.--scale-factor]="zoom"
|
1816
|
-
[attr.id]="pagesContainerId">
|
1817
|
-
<div class="k-page">
|
1818
|
-
<div class="k-text-layer"></div>
|
1819
|
-
</div>
|
1820
|
-
</div>
|
1821
|
-
</div>
|
1822
|
-
|
1823
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
1824
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedPDFViewerMessagesDirective, selector: "[kendoPDFViewerLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoaderComponent, selector: "[kendoPDFViewerLoader]", inputs: ["settings"] }, { kind: "component", type: ToolbarComponent, selector: "[kendoPDFViewerToolbar]", inputs: ["zoomLevel", "calculatedComboBoxValue", "skip", "pageSize", "total", "zoomInDisabled", "zoomOutDisabled", "disabledTools", "zoomLevelChooserValue", "zoomOptionsData", "pagesContainerId", "tools"], outputs: ["fileSelect", "fileSelectStart", "fileSelectError", "download", "selectionEnabled", "panningEnabled", "pageChange", "zoomIn", "zoomOut", "zoomLevelChange", "print", "search"] }, { kind: "component", type: PDFViewerSearchComponent, selector: "[kendoPDFViewerSearch]", inputs: ["matches", "currentMatch"], outputs: ["searchChange", "prevMatch", "nextMatch", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }] });
|
1825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerComponent, decorators: [{
|
1826
|
-
type: Component,
|
1827
|
-
args: [{
|
1828
|
-
exportAs: 'kendo-pdfviewer',
|
1829
|
-
selector: 'kendo-pdfviewer',
|
1830
|
-
providers: [
|
1831
|
-
LocalizationService,
|
1832
|
-
{
|
1833
|
-
provide: L10N_PREFIX,
|
1834
|
-
useValue: 'kendo.pdfviewer'
|
1835
|
-
}
|
1836
|
-
],
|
1837
|
-
template: `
|
1838
|
-
<ng-container kendoPDFViewerLocalizedMessages
|
1839
|
-
i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
|
1840
|
-
pagerFirstPage="Go to the first page"
|
1841
|
-
|
1842
|
-
i18n-pagerPreviousPage="kendo.pdfviewer.pagerPreviousPage|The label for the previous page button in the Pager"
|
1843
|
-
pagerPreviousPage="Go to the previous page"
|
1844
|
-
|
1845
|
-
i18n-pagerNextPage="kendo.pdfviewer.pagerNextPage|The label for the next page button in the Pager"
|
1846
|
-
pagerNextPage="Go to the next page"
|
1847
|
-
|
1848
|
-
i18n-pagerLastPage="kendo.pdfviewer.pagerLastPage|The label for the last page button in the Pager"
|
1849
|
-
pagerLastPage="Go to the last page"
|
1850
|
-
|
1851
|
-
i18n-pagerPage="kendo.pdfviewer.pagerPage|The text before the current page number in the Pager"
|
1852
|
-
pagerPage="Page"
|
1853
|
-
|
1854
|
-
i18n-pagerOf="kendo.pdfviewer.pagerOf|The text before the total pages number in the Pager"
|
1855
|
-
pagerOf="of"
|
1856
|
-
|
1857
|
-
i18n-pagerInputTitle="kendo.pdfviewer.pagerInputTitle|The label of the pager input element"
|
1858
|
-
pagerInputTitle="Page Number"
|
1859
|
-
|
1860
|
-
i18n-pagerInputLabel="kendo.pdfviewer.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number."
|
1861
|
-
pagerInputLabel="Type a page number"
|
1862
|
-
|
1863
|
-
i18n-zoomInTitle="kendo.pdfviewer.zoomInTitle|The ZoomIn tool title and label."
|
1864
|
-
zoomInTitle="Zoom in"
|
1865
|
-
|
1866
|
-
i18n-zoomOutTitle="kendo.pdfviewer.zoomOutTitle|The ZoomOut tool title and label."
|
1867
|
-
zoomOutTitle="Zoom out"
|
1868
|
-
|
1869
|
-
i18n-selectionTitle="kendo.pdfviewer.selectionTitle|The Selection tool title and label."
|
1870
|
-
selectionTitle="Enable selection"
|
1871
|
-
|
1872
|
-
i18n-panningTitle="kendo.pdfviewer.panningTitle|The Panning tool title and label."
|
1873
|
-
panningTitle="Enable panning"
|
1874
|
-
|
1875
|
-
i18n-searchTitle="kendo.pdfviewer.searchTitle|The Search tool title and label."
|
1876
|
-
searchTitle="Search"
|
1877
|
-
|
1878
|
-
i18n-openTitle="kendo.pdfviewer.openTitle|The Open tool title and label."
|
1879
|
-
openTitle="Open"
|
1880
|
-
|
1881
|
-
i18n-downloadTitle="kendo.pdfviewer.downloadTitle|The Download tool title and label."
|
1882
|
-
downloadTitle="Download"
|
1883
|
-
|
1884
|
-
i18n-printTitle="kendo.pdfviewer.printTitle|The Print tool title and label."
|
1885
|
-
printTitle="Print"
|
1886
|
-
|
1887
|
-
i18n-fitToPage="kendo.pdfviewer.fitToPage|The text for the zoom level chooser Fit to page option."
|
1888
|
-
fitToPage="Fit to page"
|
1889
|
-
|
1890
|
-
i18n-fitToWidth="kendo.pdfviewer.fitToWidth|The text for the zoom level chooser Fit to width option."
|
1891
|
-
fitToWidth="Fit to width"
|
1892
|
-
|
1893
|
-
i18n-searchInputPlaceholder="kendo.pdfviewer.searchInputPlaceholder|The text for the search input placeholder."
|
1894
|
-
searchInputPlaceholder="Search"
|
1895
|
-
|
1896
|
-
i18n-searchMatchesOf="kendo.pdfviewer.searchMatchesOf|The text before the total number of matches in the Search tool."
|
1897
|
-
searchMatchesOf="of"
|
1898
|
-
|
1899
|
-
i18n-searchPreviousMatchTitle="kendo.pdfviewer.searchPreviousMatchTitle|The title of the Search tool previous match button."
|
1900
|
-
searchPreviousMatchTitle="Previous match"
|
1901
|
-
|
1902
|
-
i18n-searchNextMatchTitle="kendo.pdfviewer.searchNextMatchTitle|The title of the Search tool next match button."
|
1903
|
-
searchNextMatchTitle="Next match"
|
1904
|
-
|
1905
|
-
i18n-searchCloseTitle="kendo.pdfviewer.searchCloseTitle|The title of the Search tool close button."
|
1906
|
-
searchCloseTitle="Close"
|
1907
|
-
|
1908
|
-
i18n-searchMatchCaseTitle="kendo.pdfviewer.searchMatchCaseTitle|The title of the Search tool match case button."
|
1909
|
-
searchMatchCaseTitle="Match case"
|
1910
|
-
|
1911
|
-
i18n-zoomInputPlaceholder="kendo.pdfviewer.zoomInputPlaceholder|The text for the zoom tool input placeholder."
|
1912
|
-
zoomInputPlaceholder="Choose zoom level">
|
1913
|
-
</ng-container>
|
1914
|
-
<div kendoPDFViewerLoader
|
1915
|
-
*ngIf="loading"
|
1916
|
-
[settings]="loaderSettings"></div>
|
1917
|
-
<div kendoPDFViewerToolbar
|
1918
|
-
#toolbar
|
1919
|
-
role="toolbar"
|
1920
|
-
[attr.aria-controls]="pagesContainerId"
|
1921
|
-
[tools]="tools"
|
1922
|
-
[skip]="skip"
|
1923
|
-
[total]="pdfContext?.pdfPages.length ? pdfContext?.pdfPages.length : 1"
|
1924
|
-
[pageSize]="1"
|
1925
|
-
[zoomInDisabled]="zoom >= maxZoom || !pdfContext?.pdfDoc"
|
1926
|
-
[zoomOutDisabled]="zoom <= minZoom || !pdfContext?.pdfDoc"
|
1927
|
-
[zoomOptionsData]="zoomOptionsData"
|
1928
|
-
[zoomLevelChooserValue]="zoomLevel"
|
1929
|
-
[disabledTools]="!pdfContext?.pdfDoc"
|
1930
|
-
(pageChange)="onPageChange($event)"
|
1931
|
-
(fileSelect)="onFileSelect($event)"
|
1932
|
-
(fileSelectStart)="loading = true;"
|
1933
|
-
(fileSelectError)="onFileSelectError($event)"
|
1934
|
-
(download)="onDownload()"
|
1935
|
-
(panningEnabled)="enabledSelection = false;"
|
1936
|
-
(selectionEnabled)="enabledSelection = true;"
|
1937
|
-
(zoomIn)="onZoomIn()"
|
1938
|
-
(zoomOut)="onZoomOut()"
|
1939
|
-
(zoomLevelChange)="onZoomLevelChange($event)"
|
1940
|
-
(print)="onPrint()"
|
1941
|
-
(search)="onSearch()"></div>
|
1942
|
-
<div
|
1943
|
-
class="k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto"
|
1944
|
-
[class.k-enable-text-select]="enabledSelection"
|
1945
|
-
[class.k-enable-panning]="!enabledSelection"
|
1946
|
-
[attr.aria-describedby]="activePageId"
|
1947
|
-
tabindex="0">
|
1948
|
-
<div
|
1949
|
-
kendoPDFViewerSearch
|
1950
|
-
*ngIf="searchActive"
|
1951
|
-
[currentMatch]="currentMatch"
|
1952
|
-
[matches]="currentMatches.length"
|
1953
|
-
class="k-search-panel k-pos-sticky k-top-center"
|
1954
|
-
(searchChange)="onSearchChange($event)"
|
1955
|
-
(prevMatch)="onPreviousMatch()"
|
1956
|
-
(nextMatch)="onNextMatch()"
|
1957
|
-
(close)="closeSearch(toolbar)"></div>
|
1958
|
-
<div
|
1959
|
-
#pagesContainer
|
1960
|
-
class="k-pdf-viewer-pages"
|
1961
|
-
[style.--scale-factor]="zoom"
|
1962
|
-
[attr.id]="pagesContainerId">
|
1963
|
-
<div class="k-page">
|
1964
|
-
<div class="k-text-layer"></div>
|
1965
|
-
</div>
|
1966
|
-
</div>
|
1967
|
-
</div>
|
1968
|
-
|
1969
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
1970
|
-
`,
|
1971
|
-
standalone: true,
|
1972
|
-
imports: [LocalizedPDFViewerMessagesDirective, NgIf, LoaderComponent, ToolbarComponent, PDFViewerSearchComponent, WatermarkOverlayComponent]
|
1973
|
-
}]
|
1974
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
1975
|
-
type: HostBinding,
|
1976
|
-
args: ['class.k-pdf-viewer']
|
1977
|
-
}], direction: [{
|
1978
|
-
type: HostBinding,
|
1979
|
-
args: ['attr.dir']
|
1980
|
-
}], tools: [{
|
1981
|
-
type: Input
|
1982
|
-
}], loaderSettings: [{
|
1983
|
-
type: Input
|
1984
|
-
}], saveFileName: [{
|
1985
|
-
type: Input
|
1986
|
-
}], saveOptions: [{
|
1987
|
-
type: Input
|
1988
|
-
}], url: [{
|
1989
|
-
type: Input
|
1990
|
-
}], data: [{
|
1991
|
-
type: Input
|
1992
|
-
}], arrayBuffer: [{
|
1993
|
-
type: Input
|
1994
|
-
}], typedArray: [{
|
1995
|
-
type: Input
|
1996
|
-
}], zoom: [{
|
1997
|
-
type: Input
|
1998
|
-
}], zoomRate: [{
|
1999
|
-
type: Input
|
2000
|
-
}], minZoom: [{
|
2001
|
-
type: Input
|
2002
|
-
}], maxZoom: [{
|
2003
|
-
type: Input
|
2004
|
-
}], load: [{
|
2005
|
-
type: Output
|
2006
|
-
}], error: [{
|
2007
|
-
type: Output
|
2008
|
-
}], download: [{
|
2009
|
-
type: Output
|
2010
|
-
}], pageChange: [{
|
2011
|
-
type: Output
|
2012
|
-
}], zoomLevelChange: [{
|
2013
|
-
type: Output
|
2014
|
-
}], pagesContainer: [{
|
2015
|
-
type: ViewChild,
|
2016
|
-
args: ['pagesContainer']
|
2017
|
-
}] } });
|
2018
|
-
|
2019
|
-
/**
|
2020
|
-
* Utility array that contains all `@progress/kendo-angular-pdfviewer` related components and directives
|
2021
|
-
*/
|
2022
|
-
const KENDO_PDFVIEWER = [
|
2023
|
-
PDFViewerComponent,
|
2024
|
-
PDFViewerCustomMessagesComponent
|
2025
|
-
];
|
2026
|
-
|
2027
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
2028
|
-
/**
|
2029
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
2030
|
-
* definition for the PDFViewer component.
|
2031
|
-
*/
|
2032
|
-
class PDFViewerModule {
|
2033
|
-
}
|
2034
|
-
PDFViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2035
|
-
PDFViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, imports: [PDFViewerComponent, PDFViewerCustomMessagesComponent], exports: [PDFViewerComponent, PDFViewerCustomMessagesComponent] });
|
2036
|
-
PDFViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, providers: [
|
2037
|
-
IconsService,
|
2038
|
-
PopupService,
|
2039
|
-
ResizeBatchService
|
2040
|
-
], imports: [KENDO_PDFVIEWER] });
|
2041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, decorators: [{
|
2042
|
-
type: NgModule,
|
2043
|
-
args: [{
|
2044
|
-
exports: [...KENDO_PDFVIEWER],
|
2045
|
-
imports: [...KENDO_PDFVIEWER],
|
2046
|
-
providers: [
|
2047
|
-
IconsService,
|
2048
|
-
PopupService,
|
2049
|
-
ResizeBatchService
|
2050
|
-
]
|
2051
|
-
}]
|
2052
|
-
}] });
|
2053
|
-
|
2054
|
-
/**
|
2055
|
-
* Generated bundle index. Do not edit.
|
2056
|
-
*/
|
2057
|
-
|
2058
|
-
export { KENDO_PDFVIEWER, LoaderComponent, LocalizedPDFViewerMessagesDirective, PDFViewerComponent, PDFViewerCustomMessagesComponent, PDFViewerDownloadEvent, PDFViewerModule, PDFViewerSearchComponent, ToolbarComboBoxDirective, ToolbarComponent, ToolbarFocusableDirective, ToolbarInputWrapperComponent };
|
2059
|
-
|