@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.
- package/README.md +33 -18
- package/{esm2020 → esm2022}/loader/loader.component.mjs +8 -9
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +7 -6
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/esm2022/localization/messages.mjs +171 -0
- package/{esm2020 → esm2022}/models/events.mjs +16 -0
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/pdfviewer.component.mjs +144 -118
- package/{esm2020 → esm2022}/pdfviewer.module.mjs +8 -8
- package/{esm2020 → esm2022}/toolbar/input-wrapper.component.mjs +9 -6
- package/{esm2020 → esm2022}/toolbar/search.component.mjs +24 -19
- package/{esm2020 → esm2022}/toolbar/toolbar-combobox.directive.mjs +17 -14
- package/{esm2020 → esm2022}/toolbar/toolbar-focusable.directive.mjs +6 -3
- package/{esm2020 → esm2022}/toolbar/toolbar-navigation.service.mjs +6 -5
- package/{esm2020 → esm2022}/toolbar/toolbar.component.mjs +98 -50
- package/{fesm2020 → fesm2022}/progress-kendo-angular-pdfviewer.mjs +459 -253
- package/loader/loader.component.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/models/toolbar-tool.d.ts +1 -1
- package/package.json +21 -27
- package/pdfviewer.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +2 -2
- package/toolbar/input-wrapper.component.d.ts +1 -1
- package/toolbar/search.component.d.ts +1 -1
- package/toolbar/toolbar.component.d.ts +2 -2
- package/esm2020/localization/messages.mjs +0 -71
- package/fesm2015/progress-kendo-angular-pdfviewer.mjs +0 -2022
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/models/loader-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/models/pdfviewer-context.mjs +0 -0
- /package/{esm2020 → esm2022}/models/toolbar-tool.mjs +0 -0
- /package/{esm2020 → esm2022}/models/zoom-level.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-pdfviewer.mjs +0 -0
- /package/{esm2020 → esm2022}/util.mjs +0 -0
@@ -7,8 +7,8 @@ import { Directive, Input, forwardRef, Component, Injectable, HostBinding, Event
|
|
7
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
8
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
10
|
-
import {
|
11
|
-
import { PreventableEvent, Keys, focusableSelector,
|
10
|
+
import { removeChildren, scrollToPage, calculateZoomLevel, SearchService, print, goToNextSearchMatch, goToPreviousSearchMatch, loadPDF, Scroller, reloadDocument, currentPage } from '@progress/kendo-pdfviewer-common';
|
11
|
+
import { PreventableEvent, Keys, focusableSelector, shouldShowValidationUI, hasObservers, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
12
12
|
import { saveAs } from '@progress/kendo-file-saver';
|
13
13
|
import { Subscription } from 'rxjs';
|
14
14
|
import { PagerComponent, CustomMessagesComponent } from '@progress/kendo-angular-pager';
|
@@ -28,10 +28,110 @@ import { PopupService } from '@progress/kendo-angular-popup';
|
|
28
28
|
* @hidden
|
29
29
|
*/
|
30
30
|
class Messages extends ComponentMessages {
|
31
|
+
/**
|
32
|
+
* The ZoomIn tool title and label.
|
33
|
+
*/
|
34
|
+
zoomInTitle;
|
35
|
+
/**
|
36
|
+
* The ZoomOut tool titla and label.
|
37
|
+
*/
|
38
|
+
zoomOutTitle;
|
39
|
+
/**
|
40
|
+
* The Selection tool title and label.
|
41
|
+
*/
|
42
|
+
selectionTitle;
|
43
|
+
/**
|
44
|
+
* The Panning tool title and label.
|
45
|
+
*/
|
46
|
+
panningTitle;
|
47
|
+
/**
|
48
|
+
* The Search tool title and label.
|
49
|
+
*/
|
50
|
+
searchTitle;
|
51
|
+
/**
|
52
|
+
* The Open tool title and label.
|
53
|
+
*/
|
54
|
+
openTitle;
|
55
|
+
/**
|
56
|
+
* The Download tool title and label.
|
57
|
+
*/
|
58
|
+
downloadTitle;
|
59
|
+
/**
|
60
|
+
* The Print tool title and label.
|
61
|
+
*/
|
62
|
+
printTitle;
|
63
|
+
/**
|
64
|
+
* The `aria-label` attribute of the Pager input element.
|
65
|
+
*/
|
66
|
+
pagerInputLabel;
|
67
|
+
/**
|
68
|
+
* The `title` attribute of the Pager input element.
|
69
|
+
*/
|
70
|
+
pagerInputTitle;
|
71
|
+
/**
|
72
|
+
* The Pager **First page** button label.
|
73
|
+
*/
|
74
|
+
pagerFirstPage;
|
75
|
+
/**
|
76
|
+
* The Pager **Previous page** button label.
|
77
|
+
*/
|
78
|
+
pagerPreviousPage;
|
79
|
+
/**
|
80
|
+
* The Pager **Next page** button label.
|
81
|
+
*/
|
82
|
+
pagerNextPage;
|
83
|
+
/**
|
84
|
+
* The Pager **Last page** button label.
|
85
|
+
*/
|
86
|
+
pagerLastPage;
|
87
|
+
/**
|
88
|
+
* The text before the Pager total-page number.
|
89
|
+
*/
|
90
|
+
pagerOf;
|
91
|
+
/**
|
92
|
+
* The text displayed before the Pager input.
|
93
|
+
*/
|
94
|
+
pagerPage;
|
95
|
+
/**
|
96
|
+
* The text for the zoom level chooser Fit to page option.
|
97
|
+
*/
|
98
|
+
fitToPage;
|
99
|
+
/**
|
100
|
+
* The text for the zoom level chooser Fit to width option.
|
101
|
+
*/
|
102
|
+
fitToWidth;
|
103
|
+
/**
|
104
|
+
* The text for the search input placeholder.
|
105
|
+
*/
|
106
|
+
searchInputPlaceholder;
|
107
|
+
/**
|
108
|
+
* The text before the total number of matches in the Search tool.
|
109
|
+
*/
|
110
|
+
searchMatchesOf;
|
111
|
+
/**
|
112
|
+
* The title of the Search previous match button.
|
113
|
+
*/
|
114
|
+
searchPreviousMatchTitle;
|
115
|
+
/**
|
116
|
+
* The title of the Search next match button.
|
117
|
+
*/
|
118
|
+
searchNextMatchTitle;
|
119
|
+
/**
|
120
|
+
* The title of the Search close button.
|
121
|
+
*/
|
122
|
+
searchCloseTitle;
|
123
|
+
/**
|
124
|
+
* The title of the Search match case button.
|
125
|
+
*/
|
126
|
+
searchMatchCaseTitle;
|
127
|
+
/**
|
128
|
+
* The text for the zoom tool input placeholder.
|
129
|
+
*/
|
130
|
+
zoomInputPlaceholder;
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
132
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.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 });
|
31
133
|
}
|
32
|
-
|
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: [{
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
|
35
135
|
type: Directive,
|
36
136
|
args: [{
|
37
137
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
@@ -93,6 +193,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
93
193
|
* Custom component messages override default component messages.
|
94
194
|
*/
|
95
195
|
class PDFViewerCustomMessagesComponent extends Messages {
|
196
|
+
service;
|
96
197
|
constructor(service) {
|
97
198
|
super();
|
98
199
|
this.service = service;
|
@@ -100,13 +201,13 @@ class PDFViewerCustomMessagesComponent extends Messages {
|
|
100
201
|
get override() {
|
101
202
|
return true;
|
102
203
|
}
|
204
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
205
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PDFViewerCustomMessagesComponent, isStandalone: true, selector: "kendo-pdfviewer-messages", providers: [{
|
206
|
+
provide: Messages,
|
207
|
+
useExisting: forwardRef(() => PDFViewerCustomMessagesComponent)
|
208
|
+
}], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
103
209
|
}
|
104
|
-
|
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: [{
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerCustomMessagesComponent, decorators: [{
|
110
211
|
type: Component,
|
111
212
|
args: [{
|
112
213
|
providers: [{
|
@@ -126,8 +227,8 @@ const packageMetadata = {
|
|
126
227
|
name: '@progress/kendo-angular-pdfviewer',
|
127
228
|
productName: 'Kendo UI for Angular',
|
128
229
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
129
|
-
publishDate:
|
130
|
-
version: '17.0.0-develop.
|
230
|
+
publishDate: 1730818525,
|
231
|
+
version: '17.0.0-develop.41',
|
131
232
|
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
233
|
};
|
133
234
|
|
@@ -212,6 +313,22 @@ const zoomToFitOptions = {
|
|
212
313
|
* If you cancel the event, the downloading of the file is prevented.
|
213
314
|
*/
|
214
315
|
class PDFViewerDownloadEvent extends PreventableEvent {
|
316
|
+
/**
|
317
|
+
* The Blob object.
|
318
|
+
*/
|
319
|
+
blob;
|
320
|
+
/**
|
321
|
+
* The name which will be used for saving the file.
|
322
|
+
*/
|
323
|
+
fileName;
|
324
|
+
/**
|
325
|
+
* The options which will be used for saving the file.
|
326
|
+
*/
|
327
|
+
saveOptions;
|
328
|
+
/**
|
329
|
+
* Represents the currently loaded `PDF.js` document, its pages, and their DOM element wrapper.
|
330
|
+
*/
|
331
|
+
context;
|
215
332
|
/**
|
216
333
|
* @hidden
|
217
334
|
*/
|
@@ -228,10 +345,11 @@ class PDFViewerDownloadEvent extends PreventableEvent {
|
|
228
345
|
* @hidden
|
229
346
|
*/
|
230
347
|
class ToolbarNavigationService {
|
348
|
+
localizationService;
|
349
|
+
focusableTools = [];
|
350
|
+
currentFocusIndex = 0;
|
231
351
|
constructor(localizationService) {
|
232
352
|
this.localizationService = localizationService;
|
233
|
-
this.focusableTools = [];
|
234
|
-
this.currentFocusIndex = 0;
|
235
353
|
}
|
236
354
|
register(tool) {
|
237
355
|
if (!this.focusableTools.some(el => el === tool)) {
|
@@ -262,10 +380,10 @@ class ToolbarNavigationService {
|
|
262
380
|
}
|
263
381
|
this.focusableTools[this.currentFocusIndex].activate();
|
264
382
|
}
|
383
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
384
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService });
|
265
385
|
}
|
266
|
-
|
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: [{
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
269
387
|
type: Injectable
|
270
388
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
271
389
|
|
@@ -273,20 +391,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
273
391
|
* @hidden
|
274
392
|
*/
|
275
393
|
class ToolbarComboBoxDirective {
|
394
|
+
combo;
|
395
|
+
hostEl;
|
396
|
+
inputElement;
|
276
397
|
constructor(combo, hostEl) {
|
277
398
|
this.combo = combo;
|
278
399
|
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
400
|
}
|
291
401
|
ngAfterViewInit() {
|
292
402
|
this.inputElement = this.combo.searchbar.input.nativeElement;
|
@@ -296,10 +406,21 @@ class ToolbarComboBoxDirective {
|
|
296
406
|
ngOnDestroy() {
|
297
407
|
this.inputElement.removeEventListener('keydown', this.keydownHandler);
|
298
408
|
}
|
409
|
+
keydownHandler = (e) => {
|
410
|
+
if (e.keyCode === Keys.Escape) {
|
411
|
+
e.stopPropagation();
|
412
|
+
if (this.combo.isOpen) {
|
413
|
+
this.combo.toggle(false);
|
414
|
+
}
|
415
|
+
else {
|
416
|
+
this.hostEl.nativeElement.parentElement.focus();
|
417
|
+
}
|
418
|
+
}
|
419
|
+
};
|
420
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComboBoxDirective, deps: [{ token: i1$1.ComboBoxComponent }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
421
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarComboBoxDirective, isStandalone: true, selector: "[kendoPDFViewerComboBox]", ngImport: i0 });
|
299
422
|
}
|
300
|
-
|
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: [{
|
423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComboBoxDirective, decorators: [{
|
303
424
|
type: Directive,
|
304
425
|
args: [{
|
305
426
|
selector: '[kendoPDFViewerComboBox]',
|
@@ -313,6 +434,9 @@ const { signal } = controller;
|
|
313
434
|
* @hidden
|
314
435
|
*/
|
315
436
|
class ToolbarFocusableDirective {
|
437
|
+
host;
|
438
|
+
navigationService;
|
439
|
+
renderer;
|
316
440
|
constructor(host, navigationService, renderer) {
|
317
441
|
this.host = host;
|
318
442
|
this.navigationService = navigationService;
|
@@ -354,10 +478,10 @@ class ToolbarFocusableDirective {
|
|
354
478
|
this.renderer.setAttribute(element, 'tabindex', '0');
|
355
479
|
element.focus();
|
356
480
|
}
|
481
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
482
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarFocusableDirective, isStandalone: true, selector: "[kendoPDFViewerToolbarFocusable]", ngImport: i0 });
|
357
483
|
}
|
358
|
-
|
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: [{
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarFocusableDirective, decorators: [{
|
361
485
|
type: Directive,
|
362
486
|
args: [{
|
363
487
|
selector: '[kendoPDFViewerToolbarFocusable]',
|
@@ -369,11 +493,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
369
493
|
* @hidden
|
370
494
|
*/
|
371
495
|
class ToolbarInputWrapperComponent {
|
496
|
+
host;
|
497
|
+
renderer;
|
498
|
+
toolbarTool;
|
499
|
+
hostClass = true;
|
500
|
+
subs = new Subscription();
|
372
501
|
constructor(host, renderer) {
|
373
502
|
this.host = host;
|
374
503
|
this.renderer = renderer;
|
375
|
-
this.hostClass = true;
|
376
|
-
this.subs = new Subscription();
|
377
504
|
}
|
378
505
|
ngAfterViewInit() {
|
379
506
|
this.subs.add(this.renderer.listen(this.host.nativeElement, 'keydown.enter', () => {
|
@@ -400,12 +527,12 @@ class ToolbarInputWrapperComponent {
|
|
400
527
|
ngOnDestroy() {
|
401
528
|
this.subs.unsubscribe();
|
402
529
|
}
|
403
|
-
}
|
404
|
-
|
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: `
|
530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarInputWrapperComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarInputWrapperComponent, isStandalone: true, selector: "kendo-toolbar-input-wrapper", inputs: { toolbarTool: "toolbarTool" }, host: { properties: { "class.k-toolbar-item": "this.hostClass" } }, ngImport: i0, template: `
|
406
532
|
<ng-content></ng-content>
|
407
533
|
`, isInline: true });
|
408
|
-
|
534
|
+
}
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarInputWrapperComponent, decorators: [{
|
409
536
|
type: Component,
|
410
537
|
args: [{
|
411
538
|
selector: 'kendo-toolbar-input-wrapper',
|
@@ -426,53 +553,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
426
553
|
* @hidden
|
427
554
|
*/
|
428
555
|
class ToolbarComponent {
|
556
|
+
localization;
|
557
|
+
navigationService;
|
558
|
+
toolbarClasses = true;
|
559
|
+
toolbarSizeClass = true;
|
560
|
+
fileSelectEl;
|
561
|
+
zoomLevel = {
|
562
|
+
text: '125%',
|
563
|
+
displayValue: '125%',
|
564
|
+
value: 1.25
|
565
|
+
};
|
566
|
+
calculatedComboBoxValue = {
|
567
|
+
text: 'Fit to width',
|
568
|
+
displayValue: null,
|
569
|
+
value: null
|
570
|
+
};
|
571
|
+
skip = 0;
|
572
|
+
pageSize = 1;
|
573
|
+
total;
|
574
|
+
zoomInDisabled;
|
575
|
+
zoomOutDisabled;
|
576
|
+
disabledTools;
|
577
|
+
zoomLevelChooserValue;
|
578
|
+
zoomOptionsData;
|
579
|
+
pagesContainerId;
|
580
|
+
tools;
|
581
|
+
fileSelect = new EventEmitter();
|
582
|
+
fileSelectStart = new EventEmitter();
|
583
|
+
fileSelectError = new EventEmitter();
|
584
|
+
download = new EventEmitter();
|
585
|
+
selectionEnabled = new EventEmitter();
|
586
|
+
panningEnabled = new EventEmitter();
|
587
|
+
pageChange = new EventEmitter();
|
588
|
+
zoomIn = new EventEmitter();
|
589
|
+
zoomOut = new EventEmitter();
|
590
|
+
zoomLevelChange = new EventEmitter();
|
591
|
+
print = new EventEmitter();
|
592
|
+
search = new EventEmitter();
|
593
|
+
zoomInIcon = zoomInIcon;
|
594
|
+
zoomOutIcon = zoomOutIcon;
|
595
|
+
handIcon = handIcon;
|
596
|
+
pointerIcon = pointerIcon;
|
597
|
+
searchIcon = searchIcon;
|
598
|
+
folderOpenIcon = folderOpenIcon;
|
599
|
+
downloadIcon = downloadIcon;
|
600
|
+
printIcon = printIcon;
|
601
|
+
pagerType = 'input';
|
429
602
|
constructor(localization, navigationService) {
|
430
603
|
this.localization = localization;
|
431
604
|
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
605
|
}
|
477
606
|
messageFor(key) {
|
478
607
|
return this.localization.get(key);
|
@@ -498,9 +627,17 @@ class ToolbarComponent {
|
|
498
627
|
focus() {
|
499
628
|
this.navigationService.focusableTools[this.navigationService.currentFocusIndex].activate();
|
500
629
|
}
|
501
|
-
|
502
|
-
|
503
|
-
|
630
|
+
valueNormalizer = (text) => text.pipe(map((value) => {
|
631
|
+
const parsedValue = parseFloat(value);
|
632
|
+
const newValue = Number.isNaN(parsedValue) ? 1 : parsedValue / 100;
|
633
|
+
return {
|
634
|
+
value: newValue,
|
635
|
+
displayValue: `${Math.round(newValue * 100)}%`,
|
636
|
+
text: `${Math.round(newValue * 100)}%`
|
637
|
+
};
|
638
|
+
}));
|
639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.LocalizationService }, { token: ToolbarNavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarComponent, isStandalone: true, selector: "[kendoPDFViewerToolbar]", inputs: { zoomLevel: "zoomLevel", calculatedComboBoxValue: "calculatedComboBoxValue", skip: "skip", pageSize: "pageSize", total: "total", zoomInDisabled: "zoomInDisabled", zoomOutDisabled: "zoomOutDisabled", disabledTools: "disabledTools", zoomLevelChooserValue: "zoomLevelChooserValue", zoomOptionsData: "zoomOptionsData", pagesContainerId: "pagesContainerId", tools: "tools" }, outputs: { fileSelect: "fileSelect", fileSelectStart: "fileSelectStart", fileSelectError: "fileSelectError", download: "download", selectionEnabled: "selectionEnabled", panningEnabled: "panningEnabled", pageChange: "pageChange", zoomIn: "zoomIn", zoomOut: "zoomOut", zoomLevelChange: "zoomLevelChange", print: "print", search: "search" }, host: { properties: { "class.k-toolbar": "this.toolbarClasses", "class.k-toolbar-flat": "this.toolbarClasses", "class.k-toolbar-md": "this.toolbarSizeClass" } }, providers: [ToolbarNavigationService], viewQueries: [{ propertyName: "fileSelectEl", first: true, predicate: ["fileSelectEl"], descendants: true }], ngImport: i0, template: `
|
504
641
|
<ng-container *ngFor="let tool of tools">
|
505
642
|
<ng-container [ngSwitch]="tool">
|
506
643
|
<kendo-toolbar-input-wrapper
|
@@ -537,10 +674,12 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
537
674
|
<kendo-buttongroup
|
538
675
|
*ngSwitchCase="'zoomInOut'"
|
539
676
|
[attr.aria-controls]="pagesContainerId"
|
677
|
+
class="k-button-group-flat k-toolbar-button-group"
|
540
678
|
[navigable]="false">
|
541
679
|
<button
|
542
680
|
type="button"
|
543
681
|
kendoButton
|
682
|
+
fillMode="flat"
|
544
683
|
kendoPDFViewerToolbarFocusable
|
545
684
|
icon="zoom-out"
|
546
685
|
[disabled]="disabledTools || zoomOutDisabled"
|
@@ -551,6 +690,7 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
551
690
|
<button
|
552
691
|
type="button"
|
553
692
|
kendoButton
|
693
|
+
fillMode="flat"
|
554
694
|
kendoPDFViewerToolbarFocusable
|
555
695
|
icon="zoom-in"
|
556
696
|
[disabled]="disabledTools || zoomInDisabled"
|
@@ -566,6 +706,8 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
566
706
|
<kendo-combobox
|
567
707
|
#combobox
|
568
708
|
kendoPDFViewerComboBox
|
709
|
+
class="k-toolbar-combobox"
|
710
|
+
fillMode="flat"
|
569
711
|
[attr.aria-controls]="pagesContainerId"
|
570
712
|
[tabindex]="-1"
|
571
713
|
[data]="zoomOptionsData"
|
@@ -587,11 +729,13 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
587
729
|
*ngSwitchCase="'selection'"
|
588
730
|
[attr.aria-controls]="pagesContainerId"
|
589
731
|
[navigable]="false"
|
732
|
+
class="k-button-group-flat k-toolbar-button-group"
|
590
733
|
selection="single">
|
591
734
|
<button
|
592
735
|
type="button"
|
593
736
|
kendoButton
|
594
737
|
kendoPDFViewerToolbarFocusable
|
738
|
+
fillMode="flat"
|
595
739
|
icon="pointer"
|
596
740
|
[toggleable]="true"
|
597
741
|
[svgIcon]="pointerIcon"
|
@@ -602,6 +746,7 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
602
746
|
type="button"
|
603
747
|
kendoButton
|
604
748
|
kendoPDFViewerToolbarFocusable
|
749
|
+
fillMode="flat"
|
605
750
|
icon="hand"
|
606
751
|
[svgIcon]="handIcon"
|
607
752
|
[toggleable]="true"
|
@@ -615,6 +760,8 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
615
760
|
type="button"
|
616
761
|
kendoPDFViewerToolbarFocusable
|
617
762
|
kendoButton
|
763
|
+
class="k-toolbar-button"
|
764
|
+
fillMode="flat"
|
618
765
|
icon="search"
|
619
766
|
[disabled]="disabledTools"
|
620
767
|
[attr.title]="messageFor('searchTitle')"
|
@@ -625,8 +772,11 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
625
772
|
<button
|
626
773
|
*ngSwitchCase="'open'"
|
627
774
|
type="button"
|
775
|
+
fillMode="flat"
|
628
776
|
kendoPDFViewerToolbarFocusable
|
629
777
|
kendoButton
|
778
|
+
class="k-toolbar-button"
|
779
|
+
fillMode="flat"
|
630
780
|
icon="folder-open"
|
631
781
|
[svgIcon]="folderOpenIcon"
|
632
782
|
[attr.title]="messageFor('openTitle')"
|
@@ -637,8 +787,10 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
637
787
|
<button
|
638
788
|
*ngSwitchCase="'download'"
|
639
789
|
type="button"
|
790
|
+
fillMode="flat"
|
640
791
|
kendoPDFViewerToolbarFocusable
|
641
792
|
kendoButton
|
793
|
+
class="k-toolbar-button"
|
642
794
|
icon="download"
|
643
795
|
[svgIcon]="downloadIcon"
|
644
796
|
[disabled]="disabledTools"
|
@@ -648,8 +800,10 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
648
800
|
<button
|
649
801
|
*ngSwitchCase="'print'"
|
650
802
|
type="button"
|
803
|
+
fillMode="flat"
|
651
804
|
kendoPDFViewerToolbarFocusable
|
652
805
|
kendoButton
|
806
|
+
class="k-toolbar-button"
|
653
807
|
icon="print"
|
654
808
|
[svgIcon]="printIcon"
|
655
809
|
[disabled]="disabledTools"
|
@@ -666,8 +820,9 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
666
820
|
aria-hidden="true"
|
667
821
|
accept=".pdf, .PDF"
|
668
822
|
(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]
|
670
|
-
|
823
|
+
`, 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, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive"], outputs: ["pageChange", "pageSizeChange"], exportAs: ["kendoDataPager", "kendoPager"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-datapager-messages, kendo-pager-messages" }, { kind: "component", type: ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ComboBoxComponent, selector: "kendo-combobox", inputs: ["icon", "svgIcon", "inputAttributes", "showStickyHeader", "focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "adaptiveMode", "title", "subtitle", "popupSettings", "listHeight", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "escape"], exportAs: ["kendoComboBox"] }, { kind: "directive", type: ToolbarComboBoxDirective, selector: "[kendoPDFViewerComboBox]" }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
824
|
+
}
|
825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComponent, decorators: [{
|
671
826
|
type: Component,
|
672
827
|
args: [{
|
673
828
|
selector: '[kendoPDFViewerToolbar]',
|
@@ -709,10 +864,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
709
864
|
<kendo-buttongroup
|
710
865
|
*ngSwitchCase="'zoomInOut'"
|
711
866
|
[attr.aria-controls]="pagesContainerId"
|
867
|
+
class="k-button-group-flat k-toolbar-button-group"
|
712
868
|
[navigable]="false">
|
713
869
|
<button
|
714
870
|
type="button"
|
715
871
|
kendoButton
|
872
|
+
fillMode="flat"
|
716
873
|
kendoPDFViewerToolbarFocusable
|
717
874
|
icon="zoom-out"
|
718
875
|
[disabled]="disabledTools || zoomOutDisabled"
|
@@ -723,6 +880,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
723
880
|
<button
|
724
881
|
type="button"
|
725
882
|
kendoButton
|
883
|
+
fillMode="flat"
|
726
884
|
kendoPDFViewerToolbarFocusable
|
727
885
|
icon="zoom-in"
|
728
886
|
[disabled]="disabledTools || zoomInDisabled"
|
@@ -738,6 +896,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
738
896
|
<kendo-combobox
|
739
897
|
#combobox
|
740
898
|
kendoPDFViewerComboBox
|
899
|
+
class="k-toolbar-combobox"
|
900
|
+
fillMode="flat"
|
741
901
|
[attr.aria-controls]="pagesContainerId"
|
742
902
|
[tabindex]="-1"
|
743
903
|
[data]="zoomOptionsData"
|
@@ -759,11 +919,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
759
919
|
*ngSwitchCase="'selection'"
|
760
920
|
[attr.aria-controls]="pagesContainerId"
|
761
921
|
[navigable]="false"
|
922
|
+
class="k-button-group-flat k-toolbar-button-group"
|
762
923
|
selection="single">
|
763
924
|
<button
|
764
925
|
type="button"
|
765
926
|
kendoButton
|
766
927
|
kendoPDFViewerToolbarFocusable
|
928
|
+
fillMode="flat"
|
767
929
|
icon="pointer"
|
768
930
|
[toggleable]="true"
|
769
931
|
[svgIcon]="pointerIcon"
|
@@ -774,6 +936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
774
936
|
type="button"
|
775
937
|
kendoButton
|
776
938
|
kendoPDFViewerToolbarFocusable
|
939
|
+
fillMode="flat"
|
777
940
|
icon="hand"
|
778
941
|
[svgIcon]="handIcon"
|
779
942
|
[toggleable]="true"
|
@@ -787,6 +950,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
787
950
|
type="button"
|
788
951
|
kendoPDFViewerToolbarFocusable
|
789
952
|
kendoButton
|
953
|
+
class="k-toolbar-button"
|
954
|
+
fillMode="flat"
|
790
955
|
icon="search"
|
791
956
|
[disabled]="disabledTools"
|
792
957
|
[attr.title]="messageFor('searchTitle')"
|
@@ -797,8 +962,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
797
962
|
<button
|
798
963
|
*ngSwitchCase="'open'"
|
799
964
|
type="button"
|
965
|
+
fillMode="flat"
|
800
966
|
kendoPDFViewerToolbarFocusable
|
801
967
|
kendoButton
|
968
|
+
class="k-toolbar-button"
|
969
|
+
fillMode="flat"
|
802
970
|
icon="folder-open"
|
803
971
|
[svgIcon]="folderOpenIcon"
|
804
972
|
[attr.title]="messageFor('openTitle')"
|
@@ -809,8 +977,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
809
977
|
<button
|
810
978
|
*ngSwitchCase="'download'"
|
811
979
|
type="button"
|
980
|
+
fillMode="flat"
|
812
981
|
kendoPDFViewerToolbarFocusable
|
813
982
|
kendoButton
|
983
|
+
class="k-toolbar-button"
|
814
984
|
icon="download"
|
815
985
|
[svgIcon]="downloadIcon"
|
816
986
|
[disabled]="disabledTools"
|
@@ -820,8 +990,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
820
990
|
<button
|
821
991
|
*ngSwitchCase="'print'"
|
822
992
|
type="button"
|
993
|
+
fillMode="flat"
|
823
994
|
kendoPDFViewerToolbarFocusable
|
824
995
|
kendoButton
|
996
|
+
class="k-toolbar-button"
|
825
997
|
icon="print"
|
826
998
|
[svgIcon]="printIcon"
|
827
999
|
[disabled]="disabledTools"
|
@@ -842,9 +1014,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
842
1014
|
standalone: true,
|
843
1015
|
imports: [NgFor, NgSwitch, NgSwitchCase, ToolbarInputWrapperComponent, ToolbarFocusableDirective, PagerComponent, CustomMessagesComponent, ButtonGroupComponent, ButtonComponent, ComboBoxComponent, ToolbarComboBoxDirective, ItemTemplateDirective, NgIf]
|
844
1016
|
}]
|
845
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolbarNavigationService }]; }, propDecorators: {
|
1017
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolbarNavigationService }]; }, propDecorators: { toolbarClasses: [{
|
846
1018
|
type: HostBinding,
|
847
1019
|
args: ['class.k-toolbar']
|
1020
|
+
}, {
|
1021
|
+
type: HostBinding,
|
1022
|
+
args: ['class.k-toolbar-flat']
|
848
1023
|
}], toolbarSizeClass: [{
|
849
1024
|
type: HostBinding,
|
850
1025
|
args: ['class.k-toolbar-md']
|
@@ -905,23 +1080,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
905
1080
|
* @hidden
|
906
1081
|
*/
|
907
1082
|
class PDFViewerSearchComponent {
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
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
|
-
}
|
1083
|
+
localization;
|
1084
|
+
textbox;
|
1085
|
+
closeButton;
|
1086
|
+
ariaRole = 'dialog';
|
922
1087
|
onEscape() {
|
923
1088
|
this.close.emit();
|
924
1089
|
}
|
1090
|
+
matches;
|
1091
|
+
currentMatch;
|
1092
|
+
searchChange = new EventEmitter();
|
1093
|
+
prevMatch = new EventEmitter();
|
1094
|
+
nextMatch = new EventEmitter();
|
1095
|
+
close = new EventEmitter();
|
1096
|
+
convertLowercaseIcon = convertLowercaseIcon;
|
1097
|
+
arrowUpIcon = arrowUpIcon;
|
1098
|
+
arrowDownIcon = arrowDownIcon;
|
1099
|
+
xIcon = xIcon;
|
1100
|
+
value = null;
|
1101
|
+
matchCase = false;
|
1102
|
+
constructor(localization) {
|
1103
|
+
this.localization = localization;
|
1104
|
+
}
|
925
1105
|
ngAfterViewInit() {
|
926
1106
|
this.textbox.focus();
|
927
1107
|
}
|
@@ -934,9 +1114,8 @@ class PDFViewerSearchComponent {
|
|
934
1114
|
this.closeButton.nativeElement.focus();
|
935
1115
|
}
|
936
1116
|
}
|
937
|
-
}
|
938
|
-
|
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: `
|
1117
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerSearchComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
1118
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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
1119
|
<kendo-textbox
|
941
1120
|
#textbox
|
942
1121
|
[placeholder]="messageFor('searchInputPlaceholder')"
|
@@ -986,8 +1165,9 @@ PDFViewerSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
986
1165
|
(keydown.tab)="$event.preventDefault(); textbox.focus();"
|
987
1166
|
icon='x'
|
988
1167
|
[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]
|
990
|
-
|
1168
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
1169
|
+
}
|
1170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerSearchComponent, decorators: [{
|
991
1171
|
type: Component,
|
992
1172
|
args: [{
|
993
1173
|
selector: '[kendoPDFViewerSearch]',
|
@@ -1075,14 +1255,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1075
1255
|
* @hidden
|
1076
1256
|
*/
|
1077
1257
|
class LoaderComponent {
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
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: `
|
1258
|
+
settings;
|
1259
|
+
loaderContainerClass = true;
|
1260
|
+
loaderContainerSizingClass = true;
|
1261
|
+
loaderPositionClass = true;
|
1262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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
1264
|
<div class="k-loader-container-overlay k-overlay-light"></div>
|
1087
1265
|
<div class="k-loader-container-inner">
|
1088
1266
|
<kendo-loader
|
@@ -1091,7 +1269,8 @@ LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
1091
1269
|
[themeColor]="settings?.themeColor"></kendo-loader>
|
1092
1270
|
</div>
|
1093
1271
|
`, isInline: true, dependencies: [{ kind: "component", type: LoaderComponent$1, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }] });
|
1094
|
-
|
1272
|
+
}
|
1273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoaderComponent, decorators: [{
|
1095
1274
|
type: Component,
|
1096
1275
|
args: [{
|
1097
1276
|
selector: '[kendoPDFViewerLoader]',
|
@@ -1124,19 +1303,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1124
1303
|
* @hidden
|
1125
1304
|
*/
|
1126
1305
|
class LocalizedPDFViewerMessagesDirective extends Messages {
|
1306
|
+
service;
|
1127
1307
|
constructor(service) {
|
1128
1308
|
super();
|
1129
1309
|
this.service = service;
|
1130
1310
|
}
|
1311
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedPDFViewerMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
1312
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedPDFViewerMessagesDirective, isStandalone: true, selector: "[kendoPDFViewerLocalizedMessages]", providers: [
|
1313
|
+
{
|
1314
|
+
provide: Messages,
|
1315
|
+
useExisting: forwardRef(() => LocalizedPDFViewerMessagesDirective)
|
1316
|
+
}
|
1317
|
+
], usesInheritance: true, ngImport: i0 });
|
1131
1318
|
}
|
1132
|
-
|
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: [{
|
1319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedPDFViewerMessagesDirective, decorators: [{
|
1140
1320
|
type: Directive,
|
1141
1321
|
args: [{
|
1142
1322
|
providers: [
|
@@ -1155,115 +1335,63 @@ let counter = 0;
|
|
1155
1335
|
* Represents the [Kendo UI PDFViewer component for Angular]({% slug overview_pdfviewer %}).
|
1156
1336
|
*/
|
1157
1337
|
class PDFViewerComponent {
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
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
|
-
}
|
1338
|
+
ngZone;
|
1339
|
+
renderer;
|
1340
|
+
localizationService;
|
1341
|
+
cdr;
|
1342
|
+
hostClass = true;
|
1343
|
+
direction;
|
1344
|
+
/**
|
1345
|
+
* Represents the tools collection rendered in the toolbar.
|
1346
|
+
* @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print' ]
|
1347
|
+
*/
|
1348
|
+
tools = [
|
1349
|
+
'pager',
|
1350
|
+
'spacer',
|
1351
|
+
'zoomInOut',
|
1352
|
+
'zoom',
|
1353
|
+
'selection',
|
1354
|
+
'spacer',
|
1355
|
+
'search',
|
1356
|
+
'open',
|
1357
|
+
'download',
|
1358
|
+
'print'
|
1359
|
+
];
|
1360
|
+
/**
|
1361
|
+
* The configuration of the internal Loader component.
|
1362
|
+
* @default { size: 'large', type: 'pulsing', themeColor: 'primary' }
|
1363
|
+
*/
|
1364
|
+
loaderSettings = {
|
1365
|
+
size: 'large',
|
1366
|
+
type: 'pulsing',
|
1367
|
+
themeColor: 'primary'
|
1368
|
+
};
|
1369
|
+
/**
|
1370
|
+
* The name of the file that will be saved when the end user clicks the Download tool.
|
1371
|
+
* @default 'Download'
|
1372
|
+
*/
|
1373
|
+
saveFileName = 'Download';
|
1374
|
+
/**
|
1375
|
+
* Represents the options for saving the file when the end user clicks the Download tool.
|
1376
|
+
* @default {}
|
1377
|
+
*/
|
1378
|
+
saveOptions = {};
|
1379
|
+
/**
|
1380
|
+
* Represents the url of the PDF file.
|
1381
|
+
*/
|
1382
|
+
url;
|
1383
|
+
/**
|
1384
|
+
* Represents the data of the PDF file in [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).
|
1385
|
+
*/
|
1386
|
+
data;
|
1387
|
+
/**
|
1388
|
+
* Represents the raw [binary data buffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) of the PDF file.
|
1389
|
+
*/
|
1390
|
+
arrayBuffer;
|
1391
|
+
/**
|
1392
|
+
* Represents the data of the PDF file in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) format.
|
1393
|
+
*/
|
1394
|
+
typedArray;
|
1267
1395
|
/**
|
1268
1396
|
* The initial zoom level of the PDF document
|
1269
1397
|
* ([see example](slug:tools_pdfviewer#zooming-tools)).
|
@@ -1285,6 +1413,42 @@ class PDFViewerComponent {
|
|
1285
1413
|
get zoom() {
|
1286
1414
|
return this._zoom;
|
1287
1415
|
}
|
1416
|
+
/**
|
1417
|
+
* Represents the step the zoom level will be changed with when using the ZoomIn and ZoomOut tools.
|
1418
|
+
* @default 0.25
|
1419
|
+
*/
|
1420
|
+
zoomRate = 0.25;
|
1421
|
+
/**
|
1422
|
+
* Represents minimum allowed zoom value.
|
1423
|
+
* @default 0.5
|
1424
|
+
*/
|
1425
|
+
minZoom = 0.5;
|
1426
|
+
/**
|
1427
|
+
* Represents maximum allowed zoom value.
|
1428
|
+
* @default 4
|
1429
|
+
*/
|
1430
|
+
maxZoom = 4;
|
1431
|
+
/**
|
1432
|
+
* The event fired when a PDF document is successfully loaded in the `PDFViewer` component.
|
1433
|
+
*/
|
1434
|
+
load = new EventEmitter();
|
1435
|
+
/**
|
1436
|
+
* The event fired when an error occurs during the loading or downloading of the PDF document.
|
1437
|
+
*/
|
1438
|
+
error = new EventEmitter();
|
1439
|
+
/**
|
1440
|
+
* The event fired when an error occurs during the loading of the PDF document.
|
1441
|
+
*/
|
1442
|
+
download = new EventEmitter();
|
1443
|
+
/**
|
1444
|
+
* The event fired when the end user changes the page of the loaded PDF document.
|
1445
|
+
*/
|
1446
|
+
pageChange = new EventEmitter();
|
1447
|
+
/**
|
1448
|
+
* The event fired when the end user changes the zoom level of the loaded PDF document.
|
1449
|
+
*/
|
1450
|
+
zoomLevelChange = new EventEmitter();
|
1451
|
+
pagesContainer;
|
1288
1452
|
/**
|
1289
1453
|
* Returns the current page number of the loaded PDF document.
|
1290
1454
|
*/
|
@@ -1319,6 +1483,11 @@ class PDFViewerComponent {
|
|
1319
1483
|
}
|
1320
1484
|
return `k-pdfviewer-${counter}-pages-container`;
|
1321
1485
|
}
|
1486
|
+
loading = false;
|
1487
|
+
searchActive = false;
|
1488
|
+
matchCase = false;
|
1489
|
+
currentMatches = [];
|
1490
|
+
currentMatch;
|
1322
1491
|
/**
|
1323
1492
|
* @hidden
|
1324
1493
|
*/
|
@@ -1334,6 +1503,31 @@ class PDFViewerComponent {
|
|
1334
1503
|
get enabledSelection() {
|
1335
1504
|
return this._enabledSelection;
|
1336
1505
|
}
|
1506
|
+
/**
|
1507
|
+
* @hidden
|
1508
|
+
*/
|
1509
|
+
showLicenseWatermark = false;
|
1510
|
+
skip = 0;
|
1511
|
+
zoomOptionsData = zoomOptionsData;
|
1512
|
+
zoomLevel = this.zoomOptionsData[5];
|
1513
|
+
_pdfContext = null;
|
1514
|
+
_enabledSelection = false;
|
1515
|
+
_zoom = INITIAL_ZOOM_LEVEL;
|
1516
|
+
_fitType;
|
1517
|
+
_zoomToFit = false;
|
1518
|
+
pdfScroller;
|
1519
|
+
searchService;
|
1520
|
+
subs = new Subscription();
|
1521
|
+
constructor(ngZone, renderer, localizationService, cdr) {
|
1522
|
+
this.ngZone = ngZone;
|
1523
|
+
this.renderer = renderer;
|
1524
|
+
this.localizationService = localizationService;
|
1525
|
+
this.cdr = cdr;
|
1526
|
+
const isValid = validatePackage(packageMetadata);
|
1527
|
+
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
1528
|
+
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
1529
|
+
counter++;
|
1530
|
+
}
|
1337
1531
|
ngOnInit() {
|
1338
1532
|
this.subs.add(this.localizationService.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
1339
1533
|
}
|
@@ -1638,15 +1832,26 @@ class PDFViewerComponent {
|
|
1638
1832
|
isSet(changes, source) {
|
1639
1833
|
return this[source] || (changes[source] && changes[source].currentValue);
|
1640
1834
|
}
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1835
|
+
scrollListener = (e) => {
|
1836
|
+
const nextPage = currentPage(e.target.parentNode);
|
1837
|
+
if (nextPage !== this.skip) {
|
1838
|
+
this.ngZone.run(() => {
|
1839
|
+
hasObservers(this.pageChange) && this.pageChange.emit({
|
1840
|
+
previousPage: this.currentPage,
|
1841
|
+
currentPage: nextPage + 1
|
1842
|
+
});
|
1843
|
+
this.skip = nextPage;
|
1844
|
+
});
|
1648
1845
|
}
|
1649
|
-
|
1846
|
+
};
|
1847
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
1848
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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: [
|
1849
|
+
LocalizationService,
|
1850
|
+
{
|
1851
|
+
provide: L10N_PREFIX,
|
1852
|
+
useValue: 'kendo.pdfviewer'
|
1853
|
+
}
|
1854
|
+
], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
|
1650
1855
|
<ng-container kendoPDFViewerLocalizedMessages
|
1651
1856
|
i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
|
1652
1857
|
pagerFirstPage="Go to the first page"
|
@@ -1780,7 +1985,8 @@ PDFViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
1780
1985
|
|
1781
1986
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
1782
1987
|
`, 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]" }] });
|
1783
|
-
|
1988
|
+
}
|
1989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, decorators: [{
|
1784
1990
|
type: Component,
|
1785
1991
|
args: [{
|
1786
1992
|
exportAs: 'kendo-pdfviewer',
|
@@ -1988,15 +2194,15 @@ const KENDO_PDFVIEWER = [
|
|
1988
2194
|
* definition for the PDFViewer component.
|
1989
2195
|
*/
|
1990
2196
|
class PDFViewerModule {
|
2197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2198
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, imports: [PDFViewerComponent, PDFViewerCustomMessagesComponent], exports: [PDFViewerComponent, PDFViewerCustomMessagesComponent] });
|
2199
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, providers: [
|
2200
|
+
IconsService,
|
2201
|
+
PopupService,
|
2202
|
+
ResizeBatchService
|
2203
|
+
], imports: [PDFViewerComponent] });
|
1991
2204
|
}
|
1992
|
-
|
1993
|
-
PDFViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, imports: [PDFViewerComponent, PDFViewerCustomMessagesComponent], exports: [PDFViewerComponent, PDFViewerCustomMessagesComponent] });
|
1994
|
-
PDFViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, providers: [
|
1995
|
-
IconsService,
|
1996
|
-
PopupService,
|
1997
|
-
ResizeBatchService
|
1998
|
-
], imports: [KENDO_PDFVIEWER] });
|
1999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, decorators: [{
|
2205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, decorators: [{
|
2000
2206
|
type: NgModule,
|
2001
2207
|
args: [{
|
2002
2208
|
exports: [...KENDO_PDFVIEWER],
|