@progress/kendo-angular-pdfviewer 17.0.0-develop.4 → 17.0.0-develop.41

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 (35) hide show
  1. package/README.md +33 -18
  2. package/{esm2020 → esm2022}/loader/loader.component.mjs +8 -9
  3. package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +7 -6
  4. package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
  5. package/esm2022/localization/messages.mjs +171 -0
  6. package/{esm2020 → esm2022}/models/events.mjs +16 -0
  7. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  8. package/{esm2020 → esm2022}/pdfviewer.component.mjs +144 -118
  9. package/{esm2020 → esm2022}/pdfviewer.module.mjs +8 -8
  10. package/{esm2020 → esm2022}/toolbar/input-wrapper.component.mjs +9 -6
  11. package/{esm2020 → esm2022}/toolbar/search.component.mjs +24 -19
  12. package/{esm2020 → esm2022}/toolbar/toolbar-combobox.directive.mjs +17 -14
  13. package/{esm2020 → esm2022}/toolbar/toolbar-focusable.directive.mjs +6 -3
  14. package/{esm2020 → esm2022}/toolbar/toolbar-navigation.service.mjs +6 -5
  15. package/{esm2020 → esm2022}/toolbar/toolbar.component.mjs +98 -50
  16. package/{fesm2020 → fesm2022}/progress-kendo-angular-pdfviewer.mjs +459 -253
  17. package/loader/loader.component.d.ts +1 -1
  18. package/localization/messages.d.ts +1 -1
  19. package/models/toolbar-tool.d.ts +1 -1
  20. package/package.json +21 -27
  21. package/pdfviewer.component.d.ts +1 -1
  22. package/schematics/ngAdd/index.js +2 -2
  23. package/toolbar/input-wrapper.component.d.ts +1 -1
  24. package/toolbar/search.component.d.ts +1 -1
  25. package/toolbar/toolbar.component.d.ts +2 -2
  26. package/esm2020/localization/messages.mjs +0 -71
  27. package/fesm2015/progress-kendo-angular-pdfviewer.mjs +0 -2022
  28. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  29. /package/{esm2020 → esm2022}/index.mjs +0 -0
  30. /package/{esm2020 → esm2022}/models/loader-settings.mjs +0 -0
  31. /package/{esm2020 → esm2022}/models/pdfviewer-context.mjs +0 -0
  32. /package/{esm2020 → esm2022}/models/toolbar-tool.mjs +0 -0
  33. /package/{esm2020 → esm2022}/models/zoom-level.mjs +0 -0
  34. /package/{esm2020 → esm2022}/progress-kendo-angular-pdfviewer.mjs +0 -0
  35. /package/{esm2020 → esm2022}/util.mjs +0 -0
@@ -1,2022 +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: 1728985453,
130
- version: '17.0.0-develop.4',
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.toolbarClass = 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.toolbarClass", "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
- [navigable]="false">
541
- <button
542
- type="button"
543
- kendoButton
544
- kendoPDFViewerToolbarFocusable
545
- icon="zoom-out"
546
- [disabled]="disabledTools || zoomOutDisabled"
547
- [svgIcon]="zoomOutIcon"
548
- [attr.title]="messageFor('zoomOutTitle')"
549
- [attr.aria-label]="messageFor('zoomOutTitle')"
550
- (click)="zoomOut.emit()"></button>
551
- <button
552
- type="button"
553
- kendoButton
554
- kendoPDFViewerToolbarFocusable
555
- icon="zoom-in"
556
- [disabled]="disabledTools || zoomInDisabled"
557
- [svgIcon]="zoomInIcon"
558
- [attr.title]="messageFor('zoomInTitle')"
559
- [attr.aria-label]="messageFor('zoomInTitle')"
560
- (click)="zoomIn.emit()"></button>
561
- </kendo-buttongroup>
562
- <kendo-toolbar-input-wrapper
563
- *ngSwitchCase="'zoom'"
564
- kendoPDFViewerToolbarFocusable
565
- [toolbarTool]="combobox">
566
- <kendo-combobox
567
- #combobox
568
- kendoPDFViewerComboBox
569
- [attr.aria-controls]="pagesContainerId"
570
- [tabindex]="-1"
571
- [data]="zoomOptionsData"
572
- [disabled]="disabledTools"
573
- [placeholder]="messageFor('zoomInputPlaceholder')"
574
- textField="displayValue"
575
- valueField="id"
576
- [value]="zoomLevelChooserValue"
577
- [allowCustom]="true"
578
- [valueNormalizer]="valueNormalizer"
579
- [clearButton]="false"
580
- (valueChange)="onZoomLevelChooserValueChange($event)">
581
- <ng-template kendoComboBoxItemTemplate let-dataItem>
582
- {{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
583
- </ng-template>
584
- </kendo-combobox>
585
- </kendo-toolbar-input-wrapper>
586
- <kendo-buttongroup
587
- *ngSwitchCase="'selection'"
588
- [attr.aria-controls]="pagesContainerId"
589
- [navigable]="false"
590
- selection="single">
591
- <button
592
- type="button"
593
- kendoButton
594
- kendoPDFViewerToolbarFocusable
595
- icon="pointer"
596
- [toggleable]="true"
597
- [svgIcon]="pointerIcon"
598
- [attr.title]="messageFor('selectionTitle')"
599
- [attr.aria-label]="messageFor('selectionTitle')"
600
- (click)="selectionEnabled.emit()"></button>
601
- <button
602
- type="button"
603
- kendoButton
604
- kendoPDFViewerToolbarFocusable
605
- icon="hand"
606
- [svgIcon]="handIcon"
607
- [toggleable]="true"
608
- [selected]="true"
609
- [attr.title]="messageFor('panningTitle')"
610
- [attr.aria-label]="messageFor('panningTitle')"
611
- (click)="panningEnabled.emit()"></button>
612
- </kendo-buttongroup>
613
- <button
614
- *ngSwitchCase="'search'"
615
- type="button"
616
- kendoPDFViewerToolbarFocusable
617
- kendoButton
618
- icon="search"
619
- [disabled]="disabledTools"
620
- [attr.title]="messageFor('searchTitle')"
621
- [attr.aria-label]="messageFor('searchTitle')"
622
- aria-haspopup="dialog"
623
- [svgIcon]="searchIcon"
624
- (click)="search.emit()"></button>
625
- <button
626
- *ngSwitchCase="'open'"
627
- type="button"
628
- kendoPDFViewerToolbarFocusable
629
- kendoButton
630
- icon="folder-open"
631
- [svgIcon]="folderOpenIcon"
632
- [attr.title]="messageFor('openTitle')"
633
- [attr.aria-label]="messageFor('openTitle')"
634
- [attr.aria-controls]="pagesContainerId"
635
- (click)="fileSelectEl?.nativeElement.click()">
636
- </button>
637
- <button
638
- *ngSwitchCase="'download'"
639
- type="button"
640
- kendoPDFViewerToolbarFocusable
641
- kendoButton
642
- icon="download"
643
- [svgIcon]="downloadIcon"
644
- [disabled]="disabledTools"
645
- [attr.title]="messageFor('downloadTitle')"
646
- [attr.aria-label]="messageFor('downloadTitle')"
647
- (click)="download.emit()"></button>
648
- <button
649
- *ngSwitchCase="'print'"
650
- type="button"
651
- kendoPDFViewerToolbarFocusable
652
- kendoButton
653
- icon="print"
654
- [svgIcon]="printIcon"
655
- [disabled]="disabledTools"
656
- [attr.title]="messageFor('printTitle')"
657
- [attr.aria-label]="messageFor('printTitle')"
658
- (click)="print.emit()"></button>
659
- </ng-container>
660
- </ng-container>
661
- <input
662
- #fileSelectEl
663
- *ngIf="tools?.indexOf('open') > -1;"
664
- type="file"
665
- [style.display]="'none'"
666
- aria-hidden="true"
667
- accept=".pdf, .PDF"
668
- (change)="onFileSelect($event)" />
669
- `, 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], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "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"] }] });
670
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComponent, decorators: [{
671
- type: Component,
672
- args: [{
673
- selector: '[kendoPDFViewerToolbar]',
674
- providers: [ToolbarNavigationService],
675
- template: `
676
- <ng-container *ngFor="let tool of tools">
677
- <ng-container [ngSwitch]="tool">
678
- <kendo-toolbar-input-wrapper
679
- *ngSwitchCase="'pager'"
680
- kendoPDFViewerToolbarFocusable
681
- [toolbarTool]="pager">
682
- <kendo-datapager
683
- #pager
684
- [attr.aria-controls]="pagesContainerId"
685
- [attr.aria-label]="messageFor('page') + ' ' + (skip + 1) + ' ' + messageFor('of') + total"
686
- [class.k-disabled]="disabledTools"
687
- [navigable]="true"
688
- [pageSize]="pageSize"
689
- [skip]="skip"
690
- [total]="total"
691
- [pageSizeValues]="false"
692
- [info]="false"
693
- [type]="pagerType"
694
- (pageChange)="pageChange.emit($event)">
695
- <kendo-datapager-messages
696
- [firstPage]="messageFor('pagerFirstPage')"
697
- [previousPage]="messageFor('pagerPreviousPage')"
698
- [nextPage]="messageFor('pagerNextPage')"
699
- [lastPage]="messageFor('pagerLastPage')"
700
- [inputLabel]="messageFor('pagerInputLabel')"
701
- [pageNumberInputTitle]="messageFor('pagerInputTitle')"
702
- [of]="messageFor('pagerOf')"
703
- [page]="messageFor('pagerPage')"></kendo-datapager-messages>
704
- </kendo-datapager>
705
- </kendo-toolbar-input-wrapper>
706
- <span
707
- *ngSwitchCase="'spacer'"
708
- class="k-spacer"></span>
709
- <kendo-buttongroup
710
- *ngSwitchCase="'zoomInOut'"
711
- [attr.aria-controls]="pagesContainerId"
712
- [navigable]="false">
713
- <button
714
- type="button"
715
- kendoButton
716
- kendoPDFViewerToolbarFocusable
717
- icon="zoom-out"
718
- [disabled]="disabledTools || zoomOutDisabled"
719
- [svgIcon]="zoomOutIcon"
720
- [attr.title]="messageFor('zoomOutTitle')"
721
- [attr.aria-label]="messageFor('zoomOutTitle')"
722
- (click)="zoomOut.emit()"></button>
723
- <button
724
- type="button"
725
- kendoButton
726
- kendoPDFViewerToolbarFocusable
727
- icon="zoom-in"
728
- [disabled]="disabledTools || zoomInDisabled"
729
- [svgIcon]="zoomInIcon"
730
- [attr.title]="messageFor('zoomInTitle')"
731
- [attr.aria-label]="messageFor('zoomInTitle')"
732
- (click)="zoomIn.emit()"></button>
733
- </kendo-buttongroup>
734
- <kendo-toolbar-input-wrapper
735
- *ngSwitchCase="'zoom'"
736
- kendoPDFViewerToolbarFocusable
737
- [toolbarTool]="combobox">
738
- <kendo-combobox
739
- #combobox
740
- kendoPDFViewerComboBox
741
- [attr.aria-controls]="pagesContainerId"
742
- [tabindex]="-1"
743
- [data]="zoomOptionsData"
744
- [disabled]="disabledTools"
745
- [placeholder]="messageFor('zoomInputPlaceholder')"
746
- textField="displayValue"
747
- valueField="id"
748
- [value]="zoomLevelChooserValue"
749
- [allowCustom]="true"
750
- [valueNormalizer]="valueNormalizer"
751
- [clearButton]="false"
752
- (valueChange)="onZoomLevelChooserValueChange($event)">
753
- <ng-template kendoComboBoxItemTemplate let-dataItem>
754
- {{ dataItem.type ? messageFor('f' + dataItem.type.slice(1)) : dataItem.text }}
755
- </ng-template>
756
- </kendo-combobox>
757
- </kendo-toolbar-input-wrapper>
758
- <kendo-buttongroup
759
- *ngSwitchCase="'selection'"
760
- [attr.aria-controls]="pagesContainerId"
761
- [navigable]="false"
762
- selection="single">
763
- <button
764
- type="button"
765
- kendoButton
766
- kendoPDFViewerToolbarFocusable
767
- icon="pointer"
768
- [toggleable]="true"
769
- [svgIcon]="pointerIcon"
770
- [attr.title]="messageFor('selectionTitle')"
771
- [attr.aria-label]="messageFor('selectionTitle')"
772
- (click)="selectionEnabled.emit()"></button>
773
- <button
774
- type="button"
775
- kendoButton
776
- kendoPDFViewerToolbarFocusable
777
- icon="hand"
778
- [svgIcon]="handIcon"
779
- [toggleable]="true"
780
- [selected]="true"
781
- [attr.title]="messageFor('panningTitle')"
782
- [attr.aria-label]="messageFor('panningTitle')"
783
- (click)="panningEnabled.emit()"></button>
784
- </kendo-buttongroup>
785
- <button
786
- *ngSwitchCase="'search'"
787
- type="button"
788
- kendoPDFViewerToolbarFocusable
789
- kendoButton
790
- icon="search"
791
- [disabled]="disabledTools"
792
- [attr.title]="messageFor('searchTitle')"
793
- [attr.aria-label]="messageFor('searchTitle')"
794
- aria-haspopup="dialog"
795
- [svgIcon]="searchIcon"
796
- (click)="search.emit()"></button>
797
- <button
798
- *ngSwitchCase="'open'"
799
- type="button"
800
- kendoPDFViewerToolbarFocusable
801
- kendoButton
802
- icon="folder-open"
803
- [svgIcon]="folderOpenIcon"
804
- [attr.title]="messageFor('openTitle')"
805
- [attr.aria-label]="messageFor('openTitle')"
806
- [attr.aria-controls]="pagesContainerId"
807
- (click)="fileSelectEl?.nativeElement.click()">
808
- </button>
809
- <button
810
- *ngSwitchCase="'download'"
811
- type="button"
812
- kendoPDFViewerToolbarFocusable
813
- kendoButton
814
- icon="download"
815
- [svgIcon]="downloadIcon"
816
- [disabled]="disabledTools"
817
- [attr.title]="messageFor('downloadTitle')"
818
- [attr.aria-label]="messageFor('downloadTitle')"
819
- (click)="download.emit()"></button>
820
- <button
821
- *ngSwitchCase="'print'"
822
- type="button"
823
- kendoPDFViewerToolbarFocusable
824
- kendoButton
825
- icon="print"
826
- [svgIcon]="printIcon"
827
- [disabled]="disabledTools"
828
- [attr.title]="messageFor('printTitle')"
829
- [attr.aria-label]="messageFor('printTitle')"
830
- (click)="print.emit()"></button>
831
- </ng-container>
832
- </ng-container>
833
- <input
834
- #fileSelectEl
835
- *ngIf="tools?.indexOf('open') > -1;"
836
- type="file"
837
- [style.display]="'none'"
838
- aria-hidden="true"
839
- accept=".pdf, .PDF"
840
- (change)="onFileSelect($event)" />
841
- `,
842
- standalone: true,
843
- imports: [NgFor, NgSwitch, NgSwitchCase, ToolbarInputWrapperComponent, ToolbarFocusableDirective, PagerComponent, CustomMessagesComponent, ButtonGroupComponent, ButtonComponent, ComboBoxComponent, ToolbarComboBoxDirective, ItemTemplateDirective, NgIf]
844
- }]
845
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolbarNavigationService }]; }, propDecorators: { toolbarClass: [{
846
- type: HostBinding,
847
- args: ['class.k-toolbar']
848
- }], toolbarSizeClass: [{
849
- type: HostBinding,
850
- args: ['class.k-toolbar-md']
851
- }], fileSelectEl: [{
852
- type: ViewChild,
853
- args: ['fileSelectEl']
854
- }], zoomLevel: [{
855
- type: Input
856
- }], calculatedComboBoxValue: [{
857
- type: Input
858
- }], skip: [{
859
- type: Input
860
- }], pageSize: [{
861
- type: Input
862
- }], total: [{
863
- type: Input
864
- }], zoomInDisabled: [{
865
- type: Input
866
- }], zoomOutDisabled: [{
867
- type: Input
868
- }], disabledTools: [{
869
- type: Input
870
- }], zoomLevelChooserValue: [{
871
- type: Input
872
- }], zoomOptionsData: [{
873
- type: Input
874
- }], pagesContainerId: [{
875
- type: Input
876
- }], tools: [{
877
- type: Input
878
- }], fileSelect: [{
879
- type: Output
880
- }], fileSelectStart: [{
881
- type: Output
882
- }], fileSelectError: [{
883
- type: Output
884
- }], download: [{
885
- type: Output
886
- }], selectionEnabled: [{
887
- type: Output
888
- }], panningEnabled: [{
889
- type: Output
890
- }], pageChange: [{
891
- type: Output
892
- }], zoomIn: [{
893
- type: Output
894
- }], zoomOut: [{
895
- type: Output
896
- }], zoomLevelChange: [{
897
- type: Output
898
- }], print: [{
899
- type: Output
900
- }], search: [{
901
- type: Output
902
- }] } });
903
-
904
- /**
905
- * @hidden
906
- */
907
- class PDFViewerSearchComponent {
908
- constructor(localization) {
909
- this.localization = localization;
910
- this.ariaRole = 'dialog';
911
- this.searchChange = new EventEmitter();
912
- this.prevMatch = new EventEmitter();
913
- this.nextMatch = new EventEmitter();
914
- this.close = new EventEmitter();
915
- this.convertLowercaseIcon = convertLowercaseIcon;
916
- this.arrowUpIcon = arrowUpIcon;
917
- this.arrowDownIcon = arrowDownIcon;
918
- this.xIcon = xIcon;
919
- this.value = null;
920
- this.matchCase = false;
921
- }
922
- onEscape() {
923
- this.close.emit();
924
- }
925
- ngAfterViewInit() {
926
- this.textbox.focus();
927
- }
928
- messageFor(key) {
929
- return this.localization.get(key);
930
- }
931
- onShiftTab(e) {
932
- if (e.target.matches('.k-input-inner')) {
933
- e.preventDefault();
934
- this.closeButton.nativeElement.focus();
935
- }
936
- }
937
- }
938
- PDFViewerSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerSearchComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
939
- 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: `
940
- <kendo-textbox
941
- #textbox
942
- [placeholder]="messageFor('searchInputPlaceholder')"
943
- [value]="value"
944
- (valueChange)="value = $event; searchChange.emit({text: $event, matchCase})"
945
- (keydown.shift.tab)="onShiftTab($event)">
946
- <ng-template kendoTextBoxSuffixTemplate>
947
- <button
948
- type="button"
949
- kendoButton
950
- [attr.title]="messageFor('searchMatchCaseTitle')"
951
- fillMode="flat"
952
- [togglable]="true"
953
- (click)="matchCase = !matchCase; searchChange.emit({text: value, matchCase})"
954
- icon="convert-lowercase"
955
- [svgIcon]="convertLowercaseIcon"></button>
956
- </ng-template>
957
- </kendo-textbox>
958
- <span class="k-search-matches">
959
- <span>{{currentMatch}}</span> {{messageFor('searchMatchesOf')}} <span>{{matches}}</span>
960
- </span>
961
- <button
962
- type="button"
963
- kendoButton
964
- [attr.title]="messageFor('searchPreviousMatchTitle')"
965
- fillMode="flat"
966
- [disabled]="matches === 0"
967
- (click)="prevMatch.emit()"
968
- icon='arrow-up'
969
- [svgIcon]="arrowUpIcon"></button>
970
- <button
971
- type="button"
972
- kendoButton
973
- [attr.title]="messageFor('searchNextMatchTitle')"
974
- fillMode="flat"
975
- [disabled]="matches === 0"
976
- (click)="nextMatch.emit()"
977
- icon='arrow-down'
978
- [svgIcon]="arrowDownIcon"></button>
979
- <button
980
- type="button"
981
- #closeButton
982
- kendoButton
983
- [attr.title]="messageFor('searchCloseTitle')"
984
- fillMode="flat"
985
- (click)="close.emit()"
986
- (keydown.tab)="$event.preventDefault(); textbox.focus();"
987
- icon='x'
988
- [svgIcon]="xIcon"></button>
989
- `, 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], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerSearchComponent, decorators: [{
991
- type: Component,
992
- args: [{
993
- selector: '[kendoPDFViewerSearch]',
994
- template: `
995
- <kendo-textbox
996
- #textbox
997
- [placeholder]="messageFor('searchInputPlaceholder')"
998
- [value]="value"
999
- (valueChange)="value = $event; searchChange.emit({text: $event, matchCase})"
1000
- (keydown.shift.tab)="onShiftTab($event)">
1001
- <ng-template kendoTextBoxSuffixTemplate>
1002
- <button
1003
- type="button"
1004
- kendoButton
1005
- [attr.title]="messageFor('searchMatchCaseTitle')"
1006
- fillMode="flat"
1007
- [togglable]="true"
1008
- (click)="matchCase = !matchCase; searchChange.emit({text: value, matchCase})"
1009
- icon="convert-lowercase"
1010
- [svgIcon]="convertLowercaseIcon"></button>
1011
- </ng-template>
1012
- </kendo-textbox>
1013
- <span class="k-search-matches">
1014
- <span>{{currentMatch}}</span> {{messageFor('searchMatchesOf')}} <span>{{matches}}</span>
1015
- </span>
1016
- <button
1017
- type="button"
1018
- kendoButton
1019
- [attr.title]="messageFor('searchPreviousMatchTitle')"
1020
- fillMode="flat"
1021
- [disabled]="matches === 0"
1022
- (click)="prevMatch.emit()"
1023
- icon='arrow-up'
1024
- [svgIcon]="arrowUpIcon"></button>
1025
- <button
1026
- type="button"
1027
- kendoButton
1028
- [attr.title]="messageFor('searchNextMatchTitle')"
1029
- fillMode="flat"
1030
- [disabled]="matches === 0"
1031
- (click)="nextMatch.emit()"
1032
- icon='arrow-down'
1033
- [svgIcon]="arrowDownIcon"></button>
1034
- <button
1035
- type="button"
1036
- #closeButton
1037
- kendoButton
1038
- [attr.title]="messageFor('searchCloseTitle')"
1039
- fillMode="flat"
1040
- (click)="close.emit()"
1041
- (keydown.tab)="$event.preventDefault(); textbox.focus();"
1042
- icon='x'
1043
- [svgIcon]="xIcon"></button>
1044
- `,
1045
- standalone: true,
1046
- imports: [TextBoxComponent, TextBoxSuffixTemplateDirective, ButtonComponent]
1047
- }]
1048
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { textbox: [{
1049
- type: ViewChild,
1050
- args: ['textbox']
1051
- }], closeButton: [{
1052
- type: ViewChild,
1053
- args: ['closeButton', { read: ElementRef }]
1054
- }], ariaRole: [{
1055
- type: HostBinding,
1056
- args: ['attr.role']
1057
- }], onEscape: [{
1058
- type: HostListener,
1059
- args: ['keydown.escape']
1060
- }], matches: [{
1061
- type: Input
1062
- }], currentMatch: [{
1063
- type: Input
1064
- }], searchChange: [{
1065
- type: Output
1066
- }], prevMatch: [{
1067
- type: Output
1068
- }], nextMatch: [{
1069
- type: Output
1070
- }], close: [{
1071
- type: Output
1072
- }] } });
1073
-
1074
- /**
1075
- * @hidden
1076
- */
1077
- class LoaderComponent {
1078
- constructor() {
1079
- this.loaderContainerClass = true;
1080
- this.loaderContainerSizingClass = true;
1081
- this.loaderPositionClass = true;
1082
- }
1083
- }
1084
- LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1085
- 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: `
1086
- <div class="k-loader-container-overlay k-overlay-light"></div>
1087
- <div class="k-loader-container-inner">
1088
- <kendo-loader
1089
- [size]="settings?.size"
1090
- [type]="settings?.type"
1091
- [themeColor]="settings?.themeColor"></kendo-loader>
1092
- </div>
1093
- `, isInline: true, dependencies: [{ kind: "component", type: LoaderComponent$1, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }] });
1094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoaderComponent, decorators: [{
1095
- type: Component,
1096
- args: [{
1097
- selector: '[kendoPDFViewerLoader]',
1098
- template: `
1099
- <div class="k-loader-container-overlay k-overlay-light"></div>
1100
- <div class="k-loader-container-inner">
1101
- <kendo-loader
1102
- [size]="settings?.size"
1103
- [type]="settings?.type"
1104
- [themeColor]="settings?.themeColor"></kendo-loader>
1105
- </div>
1106
- `,
1107
- standalone: true,
1108
- imports: [LoaderComponent$1]
1109
- }]
1110
- }], propDecorators: { settings: [{
1111
- type: Input
1112
- }], loaderContainerClass: [{
1113
- type: HostBinding,
1114
- args: ['class.k-loader-container']
1115
- }], loaderContainerSizingClass: [{
1116
- type: HostBinding,
1117
- args: ['class.k-loader-container-md']
1118
- }], loaderPositionClass: [{
1119
- type: HostBinding,
1120
- args: ['class.k-loader-top']
1121
- }] } });
1122
-
1123
- /**
1124
- * @hidden
1125
- */
1126
- class LocalizedPDFViewerMessagesDirective extends Messages {
1127
- constructor(service) {
1128
- super();
1129
- this.service = service;
1130
- }
1131
- }
1132
- LocalizedPDFViewerMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedPDFViewerMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
1133
- LocalizedPDFViewerMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedPDFViewerMessagesDirective, isStandalone: true, selector: "[kendoPDFViewerLocalizedMessages]", providers: [
1134
- {
1135
- provide: Messages,
1136
- useExisting: forwardRef(() => LocalizedPDFViewerMessagesDirective)
1137
- }
1138
- ], usesInheritance: true, ngImport: i0 });
1139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedPDFViewerMessagesDirective, decorators: [{
1140
- type: Directive,
1141
- args: [{
1142
- providers: [
1143
- {
1144
- provide: Messages,
1145
- useExisting: forwardRef(() => LocalizedPDFViewerMessagesDirective)
1146
- }
1147
- ],
1148
- selector: '[kendoPDFViewerLocalizedMessages]',
1149
- standalone: true
1150
- }]
1151
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1152
-
1153
- let counter = 0;
1154
- /**
1155
- * Represents the [Kendo UI PDFViewer component for Angular]({% slug overview_pdfviewer %}).
1156
- */
1157
- class PDFViewerComponent {
1158
- constructor(ngZone, renderer, localizationService, cdr) {
1159
- this.ngZone = ngZone;
1160
- this.renderer = renderer;
1161
- this.localizationService = localizationService;
1162
- this.cdr = cdr;
1163
- this.hostClass = true;
1164
- /**
1165
- * Represents the tools collection rendered in the toolbar.
1166
- * @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print' ]
1167
- */
1168
- this.tools = [
1169
- 'pager',
1170
- 'spacer',
1171
- 'zoomInOut',
1172
- 'zoom',
1173
- 'selection',
1174
- 'spacer',
1175
- 'search',
1176
- 'open',
1177
- 'download',
1178
- 'print'
1179
- ];
1180
- /**
1181
- * The configuration of the internal Loader component.
1182
- * @default { size: 'large', type: 'pulsing', themeColor: 'primary' }
1183
- */
1184
- this.loaderSettings = {
1185
- size: 'large',
1186
- type: 'pulsing',
1187
- themeColor: 'primary'
1188
- };
1189
- /**
1190
- * The name of the file that will be saved when the end user clicks the Download tool.
1191
- * @default 'Download'
1192
- */
1193
- this.saveFileName = 'Download';
1194
- /**
1195
- * Represents the options for saving the file when the end user clicks the Download tool.
1196
- * @default {}
1197
- */
1198
- this.saveOptions = {};
1199
- /**
1200
- * Represents the step the zoom level will be changed with when using the ZoomIn and ZoomOut tools.
1201
- * @default 0.25
1202
- */
1203
- this.zoomRate = 0.25;
1204
- /**
1205
- * Represents minimum allowed zoom value.
1206
- * @default 0.5
1207
- */
1208
- this.minZoom = 0.5;
1209
- /**
1210
- * Represents maximum allowed zoom value.
1211
- * @default 4
1212
- */
1213
- this.maxZoom = 4;
1214
- /**
1215
- * The event fired when a PDF document is successfully loaded in the `PDFViewer` component.
1216
- */
1217
- this.load = new EventEmitter();
1218
- /**
1219
- * The event fired when an error occurs during the loading or downloading of the PDF document.
1220
- */
1221
- this.error = new EventEmitter();
1222
- /**
1223
- * The event fired when an error occurs during the loading of the PDF document.
1224
- */
1225
- this.download = new EventEmitter();
1226
- /**
1227
- * The event fired when the end user changes the page of the loaded PDF document.
1228
- */
1229
- this.pageChange = new EventEmitter();
1230
- /**
1231
- * The event fired when the end user changes the zoom level of the loaded PDF document.
1232
- */
1233
- this.zoomLevelChange = new EventEmitter();
1234
- this.loading = false;
1235
- this.searchActive = false;
1236
- this.matchCase = false;
1237
- this.currentMatches = [];
1238
- /**
1239
- * @hidden
1240
- */
1241
- this.showLicenseWatermark = false;
1242
- this.skip = 0;
1243
- this.zoomOptionsData = zoomOptionsData;
1244
- this.zoomLevel = this.zoomOptionsData[5];
1245
- this._pdfContext = null;
1246
- this._enabledSelection = false;
1247
- this._zoom = INITIAL_ZOOM_LEVEL;
1248
- this._zoomToFit = false;
1249
- this.subs = new Subscription();
1250
- this.scrollListener = (e) => {
1251
- const nextPage = currentPage(e.target.parentNode);
1252
- if (nextPage !== this.skip) {
1253
- this.ngZone.run(() => {
1254
- hasObservers(this.pageChange) && this.pageChange.emit({
1255
- previousPage: this.currentPage,
1256
- currentPage: nextPage + 1
1257
- });
1258
- this.skip = nextPage;
1259
- });
1260
- }
1261
- };
1262
- const isValid = validatePackage(packageMetadata);
1263
- this.showLicenseWatermark = shouldShowValidationUI(isValid);
1264
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
1265
- counter++;
1266
- }
1267
- /**
1268
- * The initial zoom level of the PDF document
1269
- * ([see example](slug:tools_pdfviewer#zooming-tools)).
1270
- *
1271
- * @default 1.25
1272
- */
1273
- set zoom(value) {
1274
- if (typeof value === 'number') {
1275
- this._zoom = value;
1276
- this._fitType = null;
1277
- this.setZoomLevel(value);
1278
- }
1279
- else {
1280
- this._zoom = 1;
1281
- this._fitType = zoomToFitOptions[value];
1282
- }
1283
- this._zoomToFit = typeof value !== 'number';
1284
- }
1285
- get zoom() {
1286
- return this._zoom;
1287
- }
1288
- /**
1289
- * Returns the current page number of the loaded PDF document.
1290
- */
1291
- get currentPage() {
1292
- var _a;
1293
- const isDocumentLoaded = this.pagesContainer && ((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.pdfDoc);
1294
- return isDocumentLoaded ? this.skip + 1 : null;
1295
- }
1296
- set pdfContext(doc) {
1297
- this._pdfContext = doc;
1298
- }
1299
- /**
1300
- * Exposes the currently loaded `PDF.js` document, its pages, and their DOM element wrapper.
1301
- */
1302
- get pdfContext() {
1303
- return this._pdfContext;
1304
- }
1305
- /**
1306
- * @hidden
1307
- */
1308
- get activePageId() {
1309
- var _a, _b;
1310
- if (!((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.pdfPages.length)) {
1311
- return;
1312
- }
1313
- return (_b = this.pagesContainer.nativeElement.querySelectorAll('.k-page')[this.skip]) === null || _b === void 0 ? void 0 : _b.getAttribute('id');
1314
- }
1315
- /**
1316
- * @hidden
1317
- */
1318
- get pagesContainerId() {
1319
- var _a;
1320
- if (!((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.pdfPages.length)) {
1321
- return;
1322
- }
1323
- return `k-pdfviewer-${counter}-pages-container`;
1324
- }
1325
- /**
1326
- * @hidden
1327
- */
1328
- set enabledSelection(value) {
1329
- if (this.pdfScroller) {
1330
- value ? this.pdfScroller.disablePanEventsTracking() : this.pdfScroller.enablePanEventsTracking();
1331
- }
1332
- this._enabledSelection = value;
1333
- }
1334
- /**
1335
- * @hidden
1336
- */
1337
- get enabledSelection() {
1338
- return this._enabledSelection;
1339
- }
1340
- ngOnInit() {
1341
- this.subs.add(this.localizationService.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
1342
- }
1343
- ngAfterViewInit() {
1344
- const pagesContainer = this.pagesContainer.nativeElement.parentNode;
1345
- this.ngZone.runOutsideAngular(() => this.subs.add(this.renderer.listen(pagesContainer, 'scroll', this.scrollListener)));
1346
- }
1347
- ngOnDestroy() {
1348
- this.subs.unsubscribe();
1349
- removeChildren(this.pagesContainer.nativeElement);
1350
- if (this.pdfScroller) {
1351
- this.pdfScroller.destroy();
1352
- this.pdfScroller = null;
1353
- }
1354
- if (this.searchService) {
1355
- this.searchService.destroy();
1356
- this.searchService = null;
1357
- }
1358
- this.pdfContext = null;
1359
- }
1360
- ngOnChanges(changes) {
1361
- const newBase64Data = changes['data'] && this.data;
1362
- const newUrl = changes['url'] && this.url;
1363
- const newArrayBuffer = changes['arrayBuffer'] && this.arrayBuffer;
1364
- const newTypedArray = changes['typedArray'] && this.typedArray;
1365
- this.verifySettings(changes);
1366
- const source = newUrl ? 'url' : newArrayBuffer ? 'arrayBuffer' : newBase64Data ? 'data' : 'typedArray';
1367
- if (newUrl || newArrayBuffer || newBase64Data || newTypedArray) {
1368
- this.loadPdf(source, this[source]);
1369
- }
1370
- }
1371
- /**
1372
- * Scrolls the PDFViewer document to the specified page number, treating 0 as the first page
1373
- * ([see example](slug:tools_pdfviewer#programmatically-scrolling-the-pdfviewer)).
1374
- */
1375
- scrollToPage(page) {
1376
- scrollToPage(this.pagesContainer.nativeElement, page);
1377
- }
1378
- /**
1379
- * @hidden
1380
- */
1381
- onFileSelect(e) {
1382
- this.loadPdf('data', e);
1383
- }
1384
- /**
1385
- * @hidden
1386
- */
1387
- onFileSelectError(e) {
1388
- hasObservers(this.error) && this.error.emit({ error: e, context: this.pdfContext });
1389
- }
1390
- /**
1391
- * @hidden
1392
- */
1393
- onPageChange(e) {
1394
- this.scrollToPage(e.skip);
1395
- hasObservers(this.pageChange) && this.pageChange.emit({
1396
- previousPage: this.skip + 1,
1397
- currentPage: e.skip + 1
1398
- });
1399
- this.skip = e.skip;
1400
- }
1401
- /**
1402
- * @hidden
1403
- */
1404
- onDownload() {
1405
- this.ngZone.runOutsideAngular(() => this.pdfContext.pdfDoc.getData()
1406
- .then((data) => new Blob([data], { type: 'application/pdf' }))
1407
- .then((blob) => {
1408
- const downloadEvent = new PDFViewerDownloadEvent(blob, this.saveFileName, this.saveOptions, this.pdfContext);
1409
- this.ngZone.run(() => this.download.emit(downloadEvent));
1410
- if (!downloadEvent.isDefaultPrevented()) {
1411
- saveAs(blob, this.saveFileName, this.saveOptions);
1412
- }
1413
- })
1414
- .catch((reason) => {
1415
- if (hasObservers(this.error)) {
1416
- this.ngZone.run(() => this.error.emit({
1417
- error: reason,
1418
- context: this.pdfContext
1419
- }));
1420
- }
1421
- }));
1422
- }
1423
- /**
1424
- * @hidden
1425
- */
1426
- onZoomIn() {
1427
- const newZoom = Math.min(this.pdfContext.zoom + this.zoomRate, this.maxZoom);
1428
- if (newZoom !== this.pdfContext.zoom && this.pdfContext.pdfDoc) {
1429
- if (hasObservers(this.zoomLevelChange)) {
1430
- this.zoomLevelChange.emit({
1431
- previousZoomLevel: this.zoom,
1432
- currentZoomLevel: newZoom
1433
- });
1434
- }
1435
- this.zoom = this.pdfContext.zoom = newZoom;
1436
- this.setZoomLevel(newZoom);
1437
- this.ngZone.runOutsideAngular(() => this.reloadDocument());
1438
- }
1439
- }
1440
- /**
1441
- * @hidden
1442
- */
1443
- onZoomOut() {
1444
- const newZoom = Math.max(this.pdfContext.zoom - this.zoomRate, this.minZoom);
1445
- if (newZoom !== this.pdfContext.zoom && this.pdfContext.pdfDoc) {
1446
- if (hasObservers(this.zoomLevelChange)) {
1447
- this.zoomLevelChange.emit({
1448
- previousZoomLevel: this.zoom,
1449
- currentZoomLevel: newZoom
1450
- });
1451
- }
1452
- this.zoom = this.pdfContext.zoom = newZoom;
1453
- this.setZoomLevel(newZoom);
1454
- this.ngZone.runOutsideAngular(() => this.reloadDocument());
1455
- }
1456
- }
1457
- /**
1458
- * @hidden
1459
- */
1460
- onZoomLevelChange(zoomLevel, emit = true) {
1461
- if (!zoomLevel) {
1462
- zoomLevel = {
1463
- value: 1,
1464
- displayValue: '100%',
1465
- text: '100%'
1466
- };
1467
- }
1468
- let newZoom = calculateZoomLevel(zoomLevel.value, zoomLevel.type, this.pdfContext.zoom, this.pagesContainer.nativeElement);
1469
- newZoom = Math.round(newZoom * 100) / 100;
1470
- const sameZoom = this.zoom === newZoom;
1471
- if (!sameZoom && emit && hasObservers(this.zoomLevelChange)) {
1472
- this.zoomLevelChange.emit({
1473
- previousZoomLevel: this.zoom,
1474
- currentZoomLevel: newZoom
1475
- });
1476
- }
1477
- this.zoom = this.pdfContext.zoom = newZoom;
1478
- this.setZoomLevel(newZoom);
1479
- this.ngZone.runOutsideAngular(() => this.reloadDocument());
1480
- }
1481
- /**
1482
- * @hidden
1483
- */
1484
- onSearch() {
1485
- this.searchActive = true;
1486
- this.ngZone.runOutsideAngular(() => {
1487
- const pagesTextLayers = Array.from(this.pagesContainer.nativeElement.querySelectorAll('.k-text-layer'));
1488
- this.searchService = new SearchService({
1489
- textContainers: pagesTextLayers || [],
1490
- highlightClass: 'k-search-highlight',
1491
- highlightMarkClass: 'k-search-highlight-mark',
1492
- charClass: 'k-text-char'
1493
- });
1494
- });
1495
- }
1496
- /**
1497
- * @hidden
1498
- */
1499
- onPrint() {
1500
- this.loading = true;
1501
- const onError = (e) => {
1502
- this.loading = false;
1503
- if (hasObservers(this.error)) {
1504
- this.error.emit(e);
1505
- }
1506
- };
1507
- const onDone = () => {
1508
- this.loading = false;
1509
- };
1510
- print(this.pdfContext.pdfPages, onDone, onError);
1511
- }
1512
- /**
1513
- * @hidden
1514
- */
1515
- onSearchChange(e) {
1516
- this.currentMatches = this.searchService.search(Object.assign({}, e));
1517
- this.currentMatch = this.currentMatches.length ? 1 : 0;
1518
- }
1519
- /**
1520
- * @hidden
1521
- */
1522
- closeSearch(toolbar) {
1523
- this.searchActive = false;
1524
- this.searchService.destroy();
1525
- this.currentMatches = [];
1526
- this.currentMatch = null;
1527
- toolbar.focus();
1528
- }
1529
- /**
1530
- * @hidden
1531
- */
1532
- onNextMatch() {
1533
- goToNextSearchMatch({ search: this.searchService, scroller: this.pdfScroller });
1534
- this.currentMatch = this.currentMatch + 1 > this.currentMatches.length ? 1 : this.currentMatch + 1;
1535
- }
1536
- /**
1537
- * @hidden
1538
- */
1539
- onPreviousMatch() {
1540
- goToPreviousSearchMatch({ search: this.searchService, scroller: this.pdfScroller });
1541
- this.currentMatch = this.currentMatch - 1 < 1 ? this.currentMatches.length : this.currentMatch - 1;
1542
- }
1543
- loadPdf(dataType, data) {
1544
- this.loading = true;
1545
- this.ngZone.runOutsideAngular(() => setTimeout(() => {
1546
- var _a;
1547
- removeChildren(this.pagesContainer.nativeElement);
1548
- loadPDF({
1549
- [dataType]: data,
1550
- dom: this.pagesContainer.nativeElement,
1551
- zoom: ((_a = this.pdfContext) === null || _a === void 0 ? void 0 : _a.zoom) || this.zoom,
1552
- done: (e) => {
1553
- if (!this._zoomToFit) {
1554
- this.ngZone.run(() => {
1555
- this.pdfContext = Object.assign(Object.assign({}, e), { element: this.pagesContainer.nativeElement });
1556
- this.loading = false;
1557
- this.cdr.markForCheck();
1558
- });
1559
- }
1560
- else {
1561
- const zoomLevelOption = this.zoomOptionsData.find(item => item.type === this._fitType);
1562
- this.pdfContext = Object.assign(Object.assign({}, e), { element: this.pagesContainer.nativeElement });
1563
- this.onZoomLevelChange(zoomLevelOption, false);
1564
- this.cdr.markForCheck();
1565
- }
1566
- if (this.pdfScroller) {
1567
- this.pdfScroller.destroy();
1568
- }
1569
- this.pdfScroller = this.pdfScroller = new Scroller(this.pagesContainer.nativeElement.parentNode, {
1570
- filter: '.k-page',
1571
- events: {}
1572
- });
1573
- this.pdfScroller.enablePanEventsTracking();
1574
- this.assignPageIds();
1575
- if (hasObservers(this.load)) {
1576
- this.ngZone.run(() => this.load.emit({ context: this.pdfContext }));
1577
- }
1578
- },
1579
- error: (e) => {
1580
- this.ngZone.run(() => this.loading = false);
1581
- this.pdfContext = null;
1582
- if (hasObservers(this.error)) {
1583
- this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
1584
- }
1585
- }
1586
- });
1587
- }));
1588
- }
1589
- reloadDocument() {
1590
- var _a, _b;
1591
- if ((_a = this.pagesContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
1592
- this.ngZone.run(() => this.loading = true);
1593
- removeChildren(this.pagesContainer.nativeElement);
1594
- reloadDocument({
1595
- pdfDoc: (_b = this.pdfContext) === null || _b === void 0 ? void 0 : _b.pdfDoc,
1596
- zoom: this.zoom,
1597
- dom: this.pagesContainer.nativeElement,
1598
- done: (pdfPages) => {
1599
- this.pdfContext.pdfPages = pdfPages;
1600
- this.ngZone.run(() => {
1601
- this.loading = false;
1602
- this.cdr.markForCheck();
1603
- });
1604
- this.assignPageIds();
1605
- },
1606
- error: (e) => {
1607
- if (this.pdfScroller) {
1608
- this.pdfScroller.destroy();
1609
- this.pdfScroller = null;
1610
- }
1611
- this.pdfContext = null;
1612
- if (hasObservers(this.error)) {
1613
- this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
1614
- }
1615
- }
1616
- });
1617
- }
1618
- }
1619
- assignPageIds() {
1620
- this.pagesContainer.nativeElement.querySelectorAll('.k-page').forEach((pageElement, index) => {
1621
- const id = `k-pdfviewer-${counter}-page-${index + 1}`;
1622
- this.renderer.setAttribute(pageElement, 'id', id);
1623
- });
1624
- }
1625
- setZoomLevel(zoom) {
1626
- const option = this.zoomOptionsData.find(item => !item.type && item.value === zoom);
1627
- this.zoomLevel = option ? Object.assign({}, option) : {
1628
- value: zoom,
1629
- displayValue: `${Math.round(zoom * 100)}%`,
1630
- text: `${Math.round(zoom * 100)}%`
1631
- };
1632
- }
1633
- verifySettings(changes) {
1634
- const sourceTypes = ['url', 'arrayBuffer', 'data', 'typedArray'];
1635
- const setTypes = sourceTypes.map(item => this.isSet(changes, item)).filter(item => item);
1636
- if (isDevMode() && setTypes.length > 1) {
1637
- console.warn(`
1638
- Setting more than one source of data simultaneously is not supported.
1639
- Only one of 'url', 'arrayBuffer', 'data', or 'typedArray' can be set.
1640
- `);
1641
- }
1642
- }
1643
- isSet(changes, source) {
1644
- return this[source] || (changes[source] && changes[source].currentValue);
1645
- }
1646
- }
1647
- 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 });
1648
- 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: [
1649
- LocalizationService,
1650
- {
1651
- provide: L10N_PREFIX,
1652
- useValue: 'kendo.pdfviewer'
1653
- }
1654
- ], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
1655
- <ng-container kendoPDFViewerLocalizedMessages
1656
- i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
1657
- pagerFirstPage="Go to the first page"
1658
-
1659
- i18n-pagerPreviousPage="kendo.pdfviewer.pagerPreviousPage|The label for the previous page button in the Pager"
1660
- pagerPreviousPage="Go to the previous page"
1661
-
1662
- i18n-pagerNextPage="kendo.pdfviewer.pagerNextPage|The label for the next page button in the Pager"
1663
- pagerNextPage="Go to the next page"
1664
-
1665
- i18n-pagerLastPage="kendo.pdfviewer.pagerLastPage|The label for the last page button in the Pager"
1666
- pagerLastPage="Go to the last page"
1667
-
1668
- i18n-pagerPage="kendo.pdfviewer.pagerPage|The text before the current page number in the Pager"
1669
- pagerPage="Page"
1670
-
1671
- i18n-pagerOf="kendo.pdfviewer.pagerOf|The text before the total pages number in the Pager"
1672
- pagerOf="of"
1673
-
1674
- i18n-pagerInputTitle="kendo.pdfviewer.pagerInputTitle|The label of the pager input element"
1675
- pagerInputTitle="Page Number"
1676
-
1677
- i18n-pagerInputLabel="kendo.pdfviewer.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number."
1678
- pagerInputLabel="Type a page number"
1679
-
1680
- i18n-zoomInTitle="kendo.pdfviewer.zoomInTitle|The ZoomIn tool title and label."
1681
- zoomInTitle="Zoom in"
1682
-
1683
- i18n-zoomOutTitle="kendo.pdfviewer.zoomOutTitle|The ZoomOut tool title and label."
1684
- zoomOutTitle="Zoom out"
1685
-
1686
- i18n-selectionTitle="kendo.pdfviewer.selectionTitle|The Selection tool title and label."
1687
- selectionTitle="Enable selection"
1688
-
1689
- i18n-panningTitle="kendo.pdfviewer.panningTitle|The Panning tool title and label."
1690
- panningTitle="Enable panning"
1691
-
1692
- i18n-searchTitle="kendo.pdfviewer.searchTitle|The Search tool title and label."
1693
- searchTitle="Search"
1694
-
1695
- i18n-openTitle="kendo.pdfviewer.openTitle|The Open tool title and label."
1696
- openTitle="Open"
1697
-
1698
- i18n-downloadTitle="kendo.pdfviewer.downloadTitle|The Download tool title and label."
1699
- downloadTitle="Download"
1700
-
1701
- i18n-printTitle="kendo.pdfviewer.printTitle|The Print tool title and label."
1702
- printTitle="Print"
1703
-
1704
- i18n-fitToPage="kendo.pdfviewer.fitToPage|The text for the zoom level chooser Fit to page option."
1705
- fitToPage="Fit to page"
1706
-
1707
- i18n-fitToWidth="kendo.pdfviewer.fitToWidth|The text for the zoom level chooser Fit to width option."
1708
- fitToWidth="Fit to width"
1709
-
1710
- i18n-searchInputPlaceholder="kendo.pdfviewer.searchInputPlaceholder|The text for the search input placeholder."
1711
- searchInputPlaceholder="Search"
1712
-
1713
- i18n-searchMatchesOf="kendo.pdfviewer.searchMatchesOf|The text before the total number of matches in the Search tool."
1714
- searchMatchesOf="of"
1715
-
1716
- i18n-searchPreviousMatchTitle="kendo.pdfviewer.searchPreviousMatchTitle|The title of the Search tool previous match button."
1717
- searchPreviousMatchTitle="Previous match"
1718
-
1719
- i18n-searchNextMatchTitle="kendo.pdfviewer.searchNextMatchTitle|The title of the Search tool next match button."
1720
- searchNextMatchTitle="Next match"
1721
-
1722
- i18n-searchCloseTitle="kendo.pdfviewer.searchCloseTitle|The title of the Search tool close button."
1723
- searchCloseTitle="Close"
1724
-
1725
- i18n-searchMatchCaseTitle="kendo.pdfviewer.searchMatchCaseTitle|The title of the Search tool match case button."
1726
- searchMatchCaseTitle="Match case"
1727
-
1728
- i18n-zoomInputPlaceholder="kendo.pdfviewer.zoomInputPlaceholder|The text for the zoom tool input placeholder."
1729
- zoomInputPlaceholder="Choose zoom level">
1730
- </ng-container>
1731
- <div kendoPDFViewerLoader
1732
- *ngIf="loading"
1733
- [settings]="loaderSettings"></div>
1734
- <div kendoPDFViewerToolbar
1735
- #toolbar
1736
- role="toolbar"
1737
- [attr.aria-controls]="pagesContainerId"
1738
- [tools]="tools"
1739
- [skip]="skip"
1740
- [total]="pdfContext?.pdfPages.length ? pdfContext?.pdfPages.length : 1"
1741
- [pageSize]="1"
1742
- [zoomInDisabled]="zoom >= maxZoom || !pdfContext?.pdfDoc"
1743
- [zoomOutDisabled]="zoom <= minZoom || !pdfContext?.pdfDoc"
1744
- [zoomOptionsData]="zoomOptionsData"
1745
- [zoomLevelChooserValue]="zoomLevel"
1746
- [disabledTools]="!pdfContext?.pdfDoc"
1747
- (pageChange)="onPageChange($event)"
1748
- (fileSelect)="onFileSelect($event)"
1749
- (fileSelectStart)="loading = true;"
1750
- (fileSelectError)="onFileSelectError($event)"
1751
- (download)="onDownload()"
1752
- (panningEnabled)="enabledSelection = false;"
1753
- (selectionEnabled)="enabledSelection = true;"
1754
- (zoomIn)="onZoomIn()"
1755
- (zoomOut)="onZoomOut()"
1756
- (zoomLevelChange)="onZoomLevelChange($event)"
1757
- (print)="onPrint()"
1758
- (search)="onSearch()"></div>
1759
- <div
1760
- class="k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto"
1761
- [class.k-enable-text-select]="enabledSelection"
1762
- [class.k-enable-panning]="!enabledSelection"
1763
- [attr.aria-describedby]="activePageId"
1764
- tabindex="0">
1765
- <div
1766
- kendoPDFViewerSearch
1767
- *ngIf="searchActive"
1768
- [currentMatch]="currentMatch"
1769
- [matches]="currentMatches.length"
1770
- class="k-search-panel k-pos-sticky k-top-center"
1771
- (searchChange)="onSearchChange($event)"
1772
- (prevMatch)="onPreviousMatch()"
1773
- (nextMatch)="onNextMatch()"
1774
- (close)="closeSearch(toolbar)"></div>
1775
- <div
1776
- #pagesContainer
1777
- class="k-pdf-viewer-pages"
1778
- [style.--scale-factor]="zoom"
1779
- [attr.id]="pagesContainerId">
1780
- <div class="k-page">
1781
- <div class="k-text-layer"></div>
1782
- </div>
1783
- </div>
1784
- </div>
1785
-
1786
- <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
1787
- `, 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]" }] });
1788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerComponent, decorators: [{
1789
- type: Component,
1790
- args: [{
1791
- exportAs: 'kendo-pdfviewer',
1792
- selector: 'kendo-pdfviewer',
1793
- providers: [
1794
- LocalizationService,
1795
- {
1796
- provide: L10N_PREFIX,
1797
- useValue: 'kendo.pdfviewer'
1798
- }
1799
- ],
1800
- template: `
1801
- <ng-container kendoPDFViewerLocalizedMessages
1802
- i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
1803
- pagerFirstPage="Go to the first page"
1804
-
1805
- i18n-pagerPreviousPage="kendo.pdfviewer.pagerPreviousPage|The label for the previous page button in the Pager"
1806
- pagerPreviousPage="Go to the previous page"
1807
-
1808
- i18n-pagerNextPage="kendo.pdfviewer.pagerNextPage|The label for the next page button in the Pager"
1809
- pagerNextPage="Go to the next page"
1810
-
1811
- i18n-pagerLastPage="kendo.pdfviewer.pagerLastPage|The label for the last page button in the Pager"
1812
- pagerLastPage="Go to the last page"
1813
-
1814
- i18n-pagerPage="kendo.pdfviewer.pagerPage|The text before the current page number in the Pager"
1815
- pagerPage="Page"
1816
-
1817
- i18n-pagerOf="kendo.pdfviewer.pagerOf|The text before the total pages number in the Pager"
1818
- pagerOf="of"
1819
-
1820
- i18n-pagerInputTitle="kendo.pdfviewer.pagerInputTitle|The label of the pager input element"
1821
- pagerInputTitle="Page Number"
1822
-
1823
- i18n-pagerInputLabel="kendo.pdfviewer.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number."
1824
- pagerInputLabel="Type a page number"
1825
-
1826
- i18n-zoomInTitle="kendo.pdfviewer.zoomInTitle|The ZoomIn tool title and label."
1827
- zoomInTitle="Zoom in"
1828
-
1829
- i18n-zoomOutTitle="kendo.pdfviewer.zoomOutTitle|The ZoomOut tool title and label."
1830
- zoomOutTitle="Zoom out"
1831
-
1832
- i18n-selectionTitle="kendo.pdfviewer.selectionTitle|The Selection tool title and label."
1833
- selectionTitle="Enable selection"
1834
-
1835
- i18n-panningTitle="kendo.pdfviewer.panningTitle|The Panning tool title and label."
1836
- panningTitle="Enable panning"
1837
-
1838
- i18n-searchTitle="kendo.pdfviewer.searchTitle|The Search tool title and label."
1839
- searchTitle="Search"
1840
-
1841
- i18n-openTitle="kendo.pdfviewer.openTitle|The Open tool title and label."
1842
- openTitle="Open"
1843
-
1844
- i18n-downloadTitle="kendo.pdfviewer.downloadTitle|The Download tool title and label."
1845
- downloadTitle="Download"
1846
-
1847
- i18n-printTitle="kendo.pdfviewer.printTitle|The Print tool title and label."
1848
- printTitle="Print"
1849
-
1850
- i18n-fitToPage="kendo.pdfviewer.fitToPage|The text for the zoom level chooser Fit to page option."
1851
- fitToPage="Fit to page"
1852
-
1853
- i18n-fitToWidth="kendo.pdfviewer.fitToWidth|The text for the zoom level chooser Fit to width option."
1854
- fitToWidth="Fit to width"
1855
-
1856
- i18n-searchInputPlaceholder="kendo.pdfviewer.searchInputPlaceholder|The text for the search input placeholder."
1857
- searchInputPlaceholder="Search"
1858
-
1859
- i18n-searchMatchesOf="kendo.pdfviewer.searchMatchesOf|The text before the total number of matches in the Search tool."
1860
- searchMatchesOf="of"
1861
-
1862
- i18n-searchPreviousMatchTitle="kendo.pdfviewer.searchPreviousMatchTitle|The title of the Search tool previous match button."
1863
- searchPreviousMatchTitle="Previous match"
1864
-
1865
- i18n-searchNextMatchTitle="kendo.pdfviewer.searchNextMatchTitle|The title of the Search tool next match button."
1866
- searchNextMatchTitle="Next match"
1867
-
1868
- i18n-searchCloseTitle="kendo.pdfviewer.searchCloseTitle|The title of the Search tool close button."
1869
- searchCloseTitle="Close"
1870
-
1871
- i18n-searchMatchCaseTitle="kendo.pdfviewer.searchMatchCaseTitle|The title of the Search tool match case button."
1872
- searchMatchCaseTitle="Match case"
1873
-
1874
- i18n-zoomInputPlaceholder="kendo.pdfviewer.zoomInputPlaceholder|The text for the zoom tool input placeholder."
1875
- zoomInputPlaceholder="Choose zoom level">
1876
- </ng-container>
1877
- <div kendoPDFViewerLoader
1878
- *ngIf="loading"
1879
- [settings]="loaderSettings"></div>
1880
- <div kendoPDFViewerToolbar
1881
- #toolbar
1882
- role="toolbar"
1883
- [attr.aria-controls]="pagesContainerId"
1884
- [tools]="tools"
1885
- [skip]="skip"
1886
- [total]="pdfContext?.pdfPages.length ? pdfContext?.pdfPages.length : 1"
1887
- [pageSize]="1"
1888
- [zoomInDisabled]="zoom >= maxZoom || !pdfContext?.pdfDoc"
1889
- [zoomOutDisabled]="zoom <= minZoom || !pdfContext?.pdfDoc"
1890
- [zoomOptionsData]="zoomOptionsData"
1891
- [zoomLevelChooserValue]="zoomLevel"
1892
- [disabledTools]="!pdfContext?.pdfDoc"
1893
- (pageChange)="onPageChange($event)"
1894
- (fileSelect)="onFileSelect($event)"
1895
- (fileSelectStart)="loading = true;"
1896
- (fileSelectError)="onFileSelectError($event)"
1897
- (download)="onDownload()"
1898
- (panningEnabled)="enabledSelection = false;"
1899
- (selectionEnabled)="enabledSelection = true;"
1900
- (zoomIn)="onZoomIn()"
1901
- (zoomOut)="onZoomOut()"
1902
- (zoomLevelChange)="onZoomLevelChange($event)"
1903
- (print)="onPrint()"
1904
- (search)="onSearch()"></div>
1905
- <div
1906
- class="k-canvas k-pdf-viewer-canvas k-pos-relative k-overflow-auto"
1907
- [class.k-enable-text-select]="enabledSelection"
1908
- [class.k-enable-panning]="!enabledSelection"
1909
- [attr.aria-describedby]="activePageId"
1910
- tabindex="0">
1911
- <div
1912
- kendoPDFViewerSearch
1913
- *ngIf="searchActive"
1914
- [currentMatch]="currentMatch"
1915
- [matches]="currentMatches.length"
1916
- class="k-search-panel k-pos-sticky k-top-center"
1917
- (searchChange)="onSearchChange($event)"
1918
- (prevMatch)="onPreviousMatch()"
1919
- (nextMatch)="onNextMatch()"
1920
- (close)="closeSearch(toolbar)"></div>
1921
- <div
1922
- #pagesContainer
1923
- class="k-pdf-viewer-pages"
1924
- [style.--scale-factor]="zoom"
1925
- [attr.id]="pagesContainerId">
1926
- <div class="k-page">
1927
- <div class="k-text-layer"></div>
1928
- </div>
1929
- </div>
1930
- </div>
1931
-
1932
- <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
1933
- `,
1934
- standalone: true,
1935
- imports: [LocalizedPDFViewerMessagesDirective, NgIf, LoaderComponent, ToolbarComponent, PDFViewerSearchComponent, WatermarkOverlayComponent]
1936
- }]
1937
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
1938
- type: HostBinding,
1939
- args: ['class.k-pdf-viewer']
1940
- }], direction: [{
1941
- type: HostBinding,
1942
- args: ['attr.dir']
1943
- }], tools: [{
1944
- type: Input
1945
- }], loaderSettings: [{
1946
- type: Input
1947
- }], saveFileName: [{
1948
- type: Input
1949
- }], saveOptions: [{
1950
- type: Input
1951
- }], url: [{
1952
- type: Input
1953
- }], data: [{
1954
- type: Input
1955
- }], arrayBuffer: [{
1956
- type: Input
1957
- }], typedArray: [{
1958
- type: Input
1959
- }], zoom: [{
1960
- type: Input
1961
- }], zoomRate: [{
1962
- type: Input
1963
- }], minZoom: [{
1964
- type: Input
1965
- }], maxZoom: [{
1966
- type: Input
1967
- }], load: [{
1968
- type: Output
1969
- }], error: [{
1970
- type: Output
1971
- }], download: [{
1972
- type: Output
1973
- }], pageChange: [{
1974
- type: Output
1975
- }], zoomLevelChange: [{
1976
- type: Output
1977
- }], pagesContainer: [{
1978
- type: ViewChild,
1979
- args: ['pagesContainer']
1980
- }] } });
1981
-
1982
- /**
1983
- * Utility array that contains all `@progress/kendo-angular-pdfviewer` related components and directives
1984
- */
1985
- const KENDO_PDFVIEWER = [
1986
- PDFViewerComponent,
1987
- PDFViewerCustomMessagesComponent
1988
- ];
1989
-
1990
- // IMPORTANT: NgModule export kept for backwards compatibility
1991
- /**
1992
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
1993
- * definition for the PDFViewer component.
1994
- */
1995
- class PDFViewerModule {
1996
- }
1997
- PDFViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1998
- PDFViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, imports: [PDFViewerComponent, PDFViewerCustomMessagesComponent], exports: [PDFViewerComponent, PDFViewerCustomMessagesComponent] });
1999
- PDFViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, providers: [
2000
- IconsService,
2001
- PopupService,
2002
- ResizeBatchService
2003
- ], imports: [KENDO_PDFVIEWER] });
2004
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, decorators: [{
2005
- type: NgModule,
2006
- args: [{
2007
- exports: [...KENDO_PDFVIEWER],
2008
- imports: [...KENDO_PDFVIEWER],
2009
- providers: [
2010
- IconsService,
2011
- PopupService,
2012
- ResizeBatchService
2013
- ]
2014
- }]
2015
- }] });
2016
-
2017
- /**
2018
- * Generated bundle index. Do not edit.
2019
- */
2020
-
2021
- export { KENDO_PDFVIEWER, LoaderComponent, LocalizedPDFViewerMessagesDirective, PDFViewerComponent, PDFViewerCustomMessagesComponent, PDFViewerDownloadEvent, PDFViewerModule, PDFViewerSearchComponent, ToolbarComboBoxDirective, ToolbarComponent, ToolbarFocusableDirective, ToolbarInputWrapperComponent };
2022
-