@progress/kendo-angular-pdfviewer 13.0.0-develop.10

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