@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
@@ -25,115 +25,63 @@ let counter = 0;
25
25
  * Represents the [Kendo UI PDFViewer component for Angular]({% slug overview_pdfviewer %}).
26
26
  */
27
27
  export class PDFViewerComponent {
28
- constructor(ngZone, renderer, localizationService, cdr) {
29
- this.ngZone = ngZone;
30
- this.renderer = renderer;
31
- this.localizationService = localizationService;
32
- this.cdr = cdr;
33
- this.hostClass = true;
34
- /**
35
- * Represents the tools collection rendered in the toolbar.
36
- * @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print' ]
37
- */
38
- this.tools = [
39
- 'pager',
40
- 'spacer',
41
- 'zoomInOut',
42
- 'zoom',
43
- 'selection',
44
- 'spacer',
45
- 'search',
46
- 'open',
47
- 'download',
48
- 'print'
49
- ];
50
- /**
51
- * The configuration of the internal Loader component.
52
- * @default { size: 'large', type: 'pulsing', themeColor: 'primary' }
53
- */
54
- this.loaderSettings = {
55
- size: 'large',
56
- type: 'pulsing',
57
- themeColor: 'primary'
58
- };
59
- /**
60
- * The name of the file that will be saved when the end user clicks the Download tool.
61
- * @default 'Download'
62
- */
63
- this.saveFileName = 'Download';
64
- /**
65
- * Represents the options for saving the file when the end user clicks the Download tool.
66
- * @default {}
67
- */
68
- this.saveOptions = {};
69
- /**
70
- * Represents the step the zoom level will be changed with when using the ZoomIn and ZoomOut tools.
71
- * @default 0.25
72
- */
73
- this.zoomRate = 0.25;
74
- /**
75
- * Represents minimum allowed zoom value.
76
- * @default 0.5
77
- */
78
- this.minZoom = 0.5;
79
- /**
80
- * Represents maximum allowed zoom value.
81
- * @default 4
82
- */
83
- this.maxZoom = 4;
84
- /**
85
- * The event fired when a PDF document is successfully loaded in the `PDFViewer` component.
86
- */
87
- this.load = new EventEmitter();
88
- /**
89
- * The event fired when an error occurs during the loading or downloading of the PDF document.
90
- */
91
- this.error = new EventEmitter();
92
- /**
93
- * The event fired when an error occurs during the loading of the PDF document.
94
- */
95
- this.download = new EventEmitter();
96
- /**
97
- * The event fired when the end user changes the page of the loaded PDF document.
98
- */
99
- this.pageChange = new EventEmitter();
100
- /**
101
- * The event fired when the end user changes the zoom level of the loaded PDF document.
102
- */
103
- this.zoomLevelChange = new EventEmitter();
104
- this.loading = false;
105
- this.searchActive = false;
106
- this.matchCase = false;
107
- this.currentMatches = [];
108
- /**
109
- * @hidden
110
- */
111
- this.showLicenseWatermark = false;
112
- this.skip = 0;
113
- this.zoomOptionsData = zoomOptionsData;
114
- this.zoomLevel = this.zoomOptionsData[5];
115
- this._pdfContext = null;
116
- this._enabledSelection = false;
117
- this._zoom = INITIAL_ZOOM_LEVEL;
118
- this._zoomToFit = false;
119
- this.subs = new Subscription();
120
- this.scrollListener = (e) => {
121
- const nextPage = currentPage(e.target.parentNode);
122
- if (nextPage !== this.skip) {
123
- this.ngZone.run(() => {
124
- hasObservers(this.pageChange) && this.pageChange.emit({
125
- previousPage: this.currentPage,
126
- currentPage: nextPage + 1
127
- });
128
- this.skip = nextPage;
129
- });
130
- }
131
- };
132
- const isValid = validatePackage(packageMetadata);
133
- this.showLicenseWatermark = shouldShowValidationUI(isValid);
134
- this.direction = localizationService.rtl ? 'rtl' : 'ltr';
135
- counter++;
136
- }
28
+ ngZone;
29
+ renderer;
30
+ localizationService;
31
+ cdr;
32
+ hostClass = true;
33
+ direction;
34
+ /**
35
+ * Represents the tools collection rendered in the toolbar.
36
+ * @default ['pager', 'spacer', 'zoomInOut', 'zoom', 'selection', 'spacer', 'search', 'open', 'download', 'print' ]
37
+ */
38
+ tools = [
39
+ 'pager',
40
+ 'spacer',
41
+ 'zoomInOut',
42
+ 'zoom',
43
+ 'selection',
44
+ 'spacer',
45
+ 'search',
46
+ 'open',
47
+ 'download',
48
+ 'print'
49
+ ];
50
+ /**
51
+ * The configuration of the internal Loader component.
52
+ * @default { size: 'large', type: 'pulsing', themeColor: 'primary' }
53
+ */
54
+ loaderSettings = {
55
+ size: 'large',
56
+ type: 'pulsing',
57
+ themeColor: 'primary'
58
+ };
59
+ /**
60
+ * The name of the file that will be saved when the end user clicks the Download tool.
61
+ * @default 'Download'
62
+ */
63
+ saveFileName = 'Download';
64
+ /**
65
+ * Represents the options for saving the file when the end user clicks the Download tool.
66
+ * @default {}
67
+ */
68
+ saveOptions = {};
69
+ /**
70
+ * Represents the url of the PDF file.
71
+ */
72
+ url;
73
+ /**
74
+ * Represents the data of the PDF file in [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).
75
+ */
76
+ data;
77
+ /**
78
+ * Represents the raw [binary data buffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) of the PDF file.
79
+ */
80
+ arrayBuffer;
81
+ /**
82
+ * Represents the data of the PDF file in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) format.
83
+ */
84
+ typedArray;
137
85
  /**
138
86
  * The initial zoom level of the PDF document
139
87
  * ([see example](slug:tools_pdfviewer#zooming-tools)).
@@ -155,6 +103,42 @@ export class PDFViewerComponent {
155
103
  get zoom() {
156
104
  return this._zoom;
157
105
  }
106
+ /**
107
+ * Represents the step the zoom level will be changed with when using the ZoomIn and ZoomOut tools.
108
+ * @default 0.25
109
+ */
110
+ zoomRate = 0.25;
111
+ /**
112
+ * Represents minimum allowed zoom value.
113
+ * @default 0.5
114
+ */
115
+ minZoom = 0.5;
116
+ /**
117
+ * Represents maximum allowed zoom value.
118
+ * @default 4
119
+ */
120
+ maxZoom = 4;
121
+ /**
122
+ * The event fired when a PDF document is successfully loaded in the `PDFViewer` component.
123
+ */
124
+ load = new EventEmitter();
125
+ /**
126
+ * The event fired when an error occurs during the loading or downloading of the PDF document.
127
+ */
128
+ error = new EventEmitter();
129
+ /**
130
+ * The event fired when an error occurs during the loading of the PDF document.
131
+ */
132
+ download = new EventEmitter();
133
+ /**
134
+ * The event fired when the end user changes the page of the loaded PDF document.
135
+ */
136
+ pageChange = new EventEmitter();
137
+ /**
138
+ * The event fired when the end user changes the zoom level of the loaded PDF document.
139
+ */
140
+ zoomLevelChange = new EventEmitter();
141
+ pagesContainer;
158
142
  /**
159
143
  * Returns the current page number of the loaded PDF document.
160
144
  */
@@ -189,6 +173,11 @@ export class PDFViewerComponent {
189
173
  }
190
174
  return `k-pdfviewer-${counter}-pages-container`;
191
175
  }
176
+ loading = false;
177
+ searchActive = false;
178
+ matchCase = false;
179
+ currentMatches = [];
180
+ currentMatch;
192
181
  /**
193
182
  * @hidden
194
183
  */
@@ -204,6 +193,31 @@ export class PDFViewerComponent {
204
193
  get enabledSelection() {
205
194
  return this._enabledSelection;
206
195
  }
196
+ /**
197
+ * @hidden
198
+ */
199
+ showLicenseWatermark = false;
200
+ skip = 0;
201
+ zoomOptionsData = zoomOptionsData;
202
+ zoomLevel = this.zoomOptionsData[5];
203
+ _pdfContext = null;
204
+ _enabledSelection = false;
205
+ _zoom = INITIAL_ZOOM_LEVEL;
206
+ _fitType;
207
+ _zoomToFit = false;
208
+ pdfScroller;
209
+ searchService;
210
+ subs = new Subscription();
211
+ constructor(ngZone, renderer, localizationService, cdr) {
212
+ this.ngZone = ngZone;
213
+ this.renderer = renderer;
214
+ this.localizationService = localizationService;
215
+ this.cdr = cdr;
216
+ const isValid = validatePackage(packageMetadata);
217
+ this.showLicenseWatermark = shouldShowValidationUI(isValid);
218
+ this.direction = localizationService.rtl ? 'rtl' : 'ltr';
219
+ counter++;
220
+ }
207
221
  ngOnInit() {
208
222
  this.subs.add(this.localizationService.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
209
223
  }
@@ -508,15 +522,26 @@ export class PDFViewerComponent {
508
522
  isSet(changes, source) {
509
523
  return this[source] || (changes[source] && changes[source].currentValue);
510
524
  }
511
- }
512
- 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 });
513
- 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: [
514
- LocalizationService,
515
- {
516
- provide: L10N_PREFIX,
517
- useValue: 'kendo.pdfviewer'
525
+ scrollListener = (e) => {
526
+ const nextPage = currentPage(e.target.parentNode);
527
+ if (nextPage !== this.skip) {
528
+ this.ngZone.run(() => {
529
+ hasObservers(this.pageChange) && this.pageChange.emit({
530
+ previousPage: this.currentPage,
531
+ currentPage: nextPage + 1
532
+ });
533
+ this.skip = nextPage;
534
+ });
518
535
  }
519
- ], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
536
+ };
537
+ 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 });
538
+ 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: [
539
+ LocalizationService,
540
+ {
541
+ provide: L10N_PREFIX,
542
+ useValue: 'kendo.pdfviewer'
543
+ }
544
+ ], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
520
545
  <ng-container kendoPDFViewerLocalizedMessages
521
546
  i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
522
547
  pagerFirstPage="Go to the first page"
@@ -650,7 +675,8 @@ PDFViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
650
675
 
651
676
  <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
652
677
  `, 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]" }] });
653
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerComponent, decorators: [{
678
+ }
679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, decorators: [{
654
680
  type: Component,
655
681
  args: [{
656
682
  exportAs: 'kendo-pdfviewer',
@@ -16,15 +16,15 @@ import * as i2 from "./localization/custom-messages.component";
16
16
  * definition for the PDFViewer component.
17
17
  */
18
18
  export class PDFViewerModule {
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, imports: [i1.PDFViewerComponent, i2.PDFViewerCustomMessagesComponent], exports: [i1.PDFViewerComponent, i2.PDFViewerCustomMessagesComponent] });
21
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, providers: [
22
+ IconsService,
23
+ PopupService,
24
+ ResizeBatchService
25
+ ], imports: [i1.PDFViewerComponent] });
19
26
  }
20
- PDFViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
- PDFViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, imports: [i1.PDFViewerComponent, i2.PDFViewerCustomMessagesComponent], exports: [i1.PDFViewerComponent, i2.PDFViewerCustomMessagesComponent] });
22
- PDFViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, providers: [
23
- IconsService,
24
- PopupService,
25
- ResizeBatchService
26
- ], imports: [KENDO_PDFVIEWER] });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerModule, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerModule, decorators: [{
28
28
  type: NgModule,
29
29
  args: [{
30
30
  exports: [...KENDO_PDFVIEWER],
@@ -10,11 +10,14 @@ import * as i0 from "@angular/core";
10
10
  * @hidden
11
11
  */
12
12
  export class ToolbarInputWrapperComponent {
13
+ host;
14
+ renderer;
15
+ toolbarTool;
16
+ hostClass = true;
17
+ subs = new Subscription();
13
18
  constructor(host, renderer) {
14
19
  this.host = host;
15
20
  this.renderer = renderer;
16
- this.hostClass = true;
17
- this.subs = new Subscription();
18
21
  }
19
22
  ngAfterViewInit() {
20
23
  this.subs.add(this.renderer.listen(this.host.nativeElement, 'keydown.enter', () => {
@@ -41,12 +44,12 @@ export class ToolbarInputWrapperComponent {
41
44
  ngOnDestroy() {
42
45
  this.subs.unsubscribe();
43
46
  }
44
- }
45
- 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 });
46
- 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: `
47
+ 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 });
48
+ 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: `
47
49
  <ng-content></ng-content>
48
50
  `, isInline: true });
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarInputWrapperComponent, decorators: [{
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarInputWrapperComponent, decorators: [{
50
53
  type: Component,
51
54
  args: [{
52
55
  selector: 'kendo-toolbar-input-wrapper',
@@ -13,23 +13,28 @@ import * as i1 from "@progress/kendo-angular-l10n";
13
13
  * @hidden
14
14
  */
15
15
  export class PDFViewerSearchComponent {
16
- constructor(localization) {
17
- this.localization = localization;
18
- this.ariaRole = 'dialog';
19
- this.searchChange = new EventEmitter();
20
- this.prevMatch = new EventEmitter();
21
- this.nextMatch = new EventEmitter();
22
- this.close = new EventEmitter();
23
- this.convertLowercaseIcon = convertLowercaseIcon;
24
- this.arrowUpIcon = arrowUpIcon;
25
- this.arrowDownIcon = arrowDownIcon;
26
- this.xIcon = xIcon;
27
- this.value = null;
28
- this.matchCase = false;
29
- }
16
+ localization;
17
+ textbox;
18
+ closeButton;
19
+ ariaRole = 'dialog';
30
20
  onEscape() {
31
21
  this.close.emit();
32
22
  }
23
+ matches;
24
+ currentMatch;
25
+ searchChange = new EventEmitter();
26
+ prevMatch = new EventEmitter();
27
+ nextMatch = new EventEmitter();
28
+ close = new EventEmitter();
29
+ convertLowercaseIcon = convertLowercaseIcon;
30
+ arrowUpIcon = arrowUpIcon;
31
+ arrowDownIcon = arrowDownIcon;
32
+ xIcon = xIcon;
33
+ value = null;
34
+ matchCase = false;
35
+ constructor(localization) {
36
+ this.localization = localization;
37
+ }
33
38
  ngAfterViewInit() {
34
39
  this.textbox.focus();
35
40
  }
@@ -42,9 +47,8 @@ export class PDFViewerSearchComponent {
42
47
  this.closeButton.nativeElement.focus();
43
48
  }
44
49
  }
45
- }
46
- PDFViewerSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerSearchComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
47
- 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: `
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerSearchComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
51
+ 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: `
48
52
  <kendo-textbox
49
53
  #textbox
50
54
  [placeholder]="messageFor('searchInputPlaceholder')"
@@ -94,8 +98,9 @@ PDFViewerSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
94
98
  (keydown.tab)="$event.preventDefault(); textbox.focus();"
95
99
  icon='x'
96
100
  [svgIcon]="xIcon"></button>
97
- `, 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"] }] });
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PDFViewerSearchComponent, decorators: [{
101
+ `, 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"] }] });
102
+ }
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerSearchComponent, decorators: [{
99
104
  type: Component,
100
105
  args: [{
101
106
  selector: '[kendoPDFViewerSearch]',
@@ -11,20 +11,12 @@ import * as i1 from "@progress/kendo-angular-dropdowns";
11
11
  * @hidden
12
12
  */
13
13
  export class ToolbarComboBoxDirective {
14
+ combo;
15
+ hostEl;
16
+ inputElement;
14
17
  constructor(combo, hostEl) {
15
18
  this.combo = combo;
16
19
  this.hostEl = hostEl;
17
- this.keydownHandler = (e) => {
18
- if (e.keyCode === Keys.Escape) {
19
- e.stopPropagation();
20
- if (this.combo.isOpen) {
21
- this.combo.toggle(false);
22
- }
23
- else {
24
- this.hostEl.nativeElement.parentElement.focus();
25
- }
26
- }
27
- };
28
20
  }
29
21
  ngAfterViewInit() {
30
22
  this.inputElement = this.combo.searchbar.input.nativeElement;
@@ -34,10 +26,21 @@ export class ToolbarComboBoxDirective {
34
26
  ngOnDestroy() {
35
27
  this.inputElement.removeEventListener('keydown', this.keydownHandler);
36
28
  }
29
+ keydownHandler = (e) => {
30
+ if (e.keyCode === Keys.Escape) {
31
+ e.stopPropagation();
32
+ if (this.combo.isOpen) {
33
+ this.combo.toggle(false);
34
+ }
35
+ else {
36
+ this.hostEl.nativeElement.parentElement.focus();
37
+ }
38
+ }
39
+ };
40
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComboBoxDirective, deps: [{ token: i1.ComboBoxComponent }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
41
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarComboBoxDirective, isStandalone: true, selector: "[kendoPDFViewerComboBox]", ngImport: i0 });
37
42
  }
38
- ToolbarComboBoxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComboBoxDirective, deps: [{ token: i1.ComboBoxComponent }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
39
- ToolbarComboBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ToolbarComboBoxDirective, isStandalone: true, selector: "[kendoPDFViewerComboBox]", ngImport: i0 });
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarComboBoxDirective, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarComboBoxDirective, decorators: [{
41
44
  type: Directive,
42
45
  args: [{
43
46
  selector: '[kendoPDFViewerComboBox]',
@@ -13,6 +13,9 @@ const { signal } = controller;
13
13
  * @hidden
14
14
  */
15
15
  export class ToolbarFocusableDirective {
16
+ host;
17
+ navigationService;
18
+ renderer;
16
19
  constructor(host, navigationService, renderer) {
17
20
  this.host = host;
18
21
  this.navigationService = navigationService;
@@ -54,10 +57,10 @@ export class ToolbarFocusableDirective {
54
57
  this.renderer.setAttribute(element, 'tabindex', '0');
55
58
  element.focus();
56
59
  }
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
61
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarFocusableDirective, isStandalone: true, selector: "[kendoPDFViewerToolbarFocusable]", ngImport: i0 });
57
62
  }
58
- ToolbarFocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: i1.ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
59
- ToolbarFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ToolbarFocusableDirective, isStandalone: true, selector: "[kendoPDFViewerToolbarFocusable]", ngImport: i0 });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarFocusableDirective, decorators: [{
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarFocusableDirective, decorators: [{
61
64
  type: Directive,
62
65
  args: [{
63
66
  selector: '[kendoPDFViewerToolbarFocusable]',
@@ -10,10 +10,11 @@ import * as i1 from "@progress/kendo-angular-l10n";
10
10
  * @hidden
11
11
  */
12
12
  export class ToolbarNavigationService {
13
+ localizationService;
14
+ focusableTools = [];
15
+ currentFocusIndex = 0;
13
16
  constructor(localizationService) {
14
17
  this.localizationService = localizationService;
15
- this.focusableTools = [];
16
- this.currentFocusIndex = 0;
17
18
  }
18
19
  register(tool) {
19
20
  if (!this.focusableTools.some(el => el === tool)) {
@@ -44,9 +45,9 @@ export class ToolbarNavigationService {
44
45
  }
45
46
  this.focusableTools[this.currentFocusIndex].activate();
46
47
  }
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
49
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService });
47
50
  }
48
- ToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
49
- ToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService });
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, decorators: [{
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, decorators: [{
51
52
  type: Injectable
52
53
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });