@progress/kendo-angular-pdfviewer 22.0.1 → 22.1.0-develop.2
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/directives.d.ts +2 -1
- package/fesm2022/progress-kendo-angular-pdfviewer.mjs +189 -14
- package/index.d.ts +1 -0
- package/localization/messages.d.ts +13 -1
- package/package-metadata.mjs +2 -2
- package/package.json +15 -14
- package/pdfviewer.component.d.ts +24 -1
- package/pdfviewer.module.d.ts +2 -1
- package/schematics/ngAdd/index.js +2 -2
- package/templates/blank-page-template.directive.d.ts +28 -0
package/directives.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { PDFViewerCustomMessagesComponent } from "./localization/custom-messages.component";
|
|
6
6
|
import { PDFViewerComponent } from "./pdfviewer.component";
|
|
7
|
+
import { BlankPageTemplateDirective } from "./templates/blank-page-template.directive";
|
|
7
8
|
/**
|
|
8
9
|
* Use the `KENDO_PDFVIEWER` utility array to add all `@progress/kendo-angular-pdf-viewer`-related components and directives to a standalone Angular component.
|
|
9
10
|
*
|
|
@@ -21,4 +22,4 @@ import { PDFViewerComponent } from "./pdfviewer.component";
|
|
|
21
22
|
* export class AppComponent {}
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
export declare const KENDO_PDFVIEWER: readonly [typeof PDFViewerComponent, typeof PDFViewerCustomMessagesComponent];
|
|
25
|
+
export declare const KENDO_PDFVIEWER: readonly [typeof PDFViewerComponent, typeof PDFViewerCustomMessagesComponent, typeof BlankPageTemplateDirective];
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Input, Directive, forwardRef, Component, Injectable, HostBinding, EventEmitter, Output, ViewChild, ElementRef, HostListener, isDevMode, ViewContainerRef, NgModule } from '@angular/core';
|
|
6
|
+
import { Input, Directive, forwardRef, Component, Injectable, HostBinding, EventEmitter, Output, ViewChild, ElementRef, HostListener, isDevMode, ViewContainerRef, ContentChild, NgModule } from '@angular/core';
|
|
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
10
|
import { PdfViewerInteractionMode, removeChildren, PdfViewer } from '@progress/kendo-pdfviewer-common';
|
|
11
11
|
import { PreventableEvent, Keys, normalizeKeys, focusableSelector, getLicenseMessage, shouldShowValidationUI, hasObservers, EventsOutsideAngularDirective, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
12
|
+
import { FileSelectComponent, UploadDropZoneComponent, CustomMessagesComponent as CustomMessagesComponent$1 } from '@progress/kendo-angular-upload';
|
|
12
13
|
import { Subscription } from 'rxjs';
|
|
13
14
|
import { PagerComponent, CustomMessagesComponent } from '@progress/kendo-angular-pager';
|
|
14
15
|
import { zoomInIcon, zoomOutIcon, handIcon, pointerIcon, searchIcon, folderOpenIcon, downloadIcon, printIcon, trackChangesIcon, highlightIcon, freeTextIcon, xIcon, convertLowercaseIcon, arrowUpIcon, arrowDownIcon, paletteIcon, trashIcon, checkIcon } from '@progress/kendo-svg-icons';
|
|
@@ -25,6 +26,7 @@ import * as i2$1 from '@progress/kendo-angular-popup';
|
|
|
25
26
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
26
27
|
import * as i1$2 from '@progress/kendo-angular-dialog';
|
|
27
28
|
import { DialogService } from '@progress/kendo-angular-dialog';
|
|
29
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
28
30
|
import { IconsService } from '@progress/kendo-angular-icons';
|
|
29
31
|
|
|
30
32
|
/**
|
|
@@ -183,8 +185,20 @@ class Messages extends ComponentMessages {
|
|
|
183
185
|
* Sets the label for the PDF viewer canvas container.
|
|
184
186
|
*/
|
|
185
187
|
canvasLabel;
|
|
188
|
+
/**
|
|
189
|
+
* Sets the text for the FileSelect drop zone hint when no file is being dragged.
|
|
190
|
+
*/
|
|
191
|
+
blankPageDropFilesHere;
|
|
192
|
+
/**
|
|
193
|
+
* Sets the text for the FileSelect external drop zone hint when no file is being dragged.
|
|
194
|
+
*/
|
|
195
|
+
blankPageExternalDropFilesHere;
|
|
196
|
+
/**
|
|
197
|
+
* Sets the text for the FileSelect button in the blank page drop zone.
|
|
198
|
+
*/
|
|
199
|
+
blankPageSelect;
|
|
186
200
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
187
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: Messages, isStandalone: true, 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", annotationsTitle: "annotationsTitle", annotationEditorTitle: "annotationEditorTitle", deleteAnnotationTitle: "deleteAnnotationTitle", highlightAnnotationTitle: "highlightAnnotationTitle", freeTextAnnotationTitle: "freeTextAnnotationTitle", closeAnnotationsToolbarTitle: "closeAnnotationsToolbarTitle", deleteAnnotationConfirmationDialogTitle: "deleteAnnotationConfirmationDialogTitle", deleteAnnotationConfirmationDialogContent: "deleteAnnotationConfirmationDialogContent", deleteAnnotationConfirmationDialogConfirmText: "deleteAnnotationConfirmationDialogConfirmText", deleteAnnotationConfirmationDialogRejectText: "deleteAnnotationConfirmationDialogRejectText", annotationEditorFontSizeTitle: "annotationEditorFontSizeTitle", annotationEditorColorTitle: "annotationEditorColorTitle", canvasLabel: "canvasLabel" }, usesInheritance: true, ngImport: i0 });
|
|
201
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: Messages, isStandalone: true, 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", annotationsTitle: "annotationsTitle", annotationEditorTitle: "annotationEditorTitle", deleteAnnotationTitle: "deleteAnnotationTitle", highlightAnnotationTitle: "highlightAnnotationTitle", freeTextAnnotationTitle: "freeTextAnnotationTitle", closeAnnotationsToolbarTitle: "closeAnnotationsToolbarTitle", deleteAnnotationConfirmationDialogTitle: "deleteAnnotationConfirmationDialogTitle", deleteAnnotationConfirmationDialogContent: "deleteAnnotationConfirmationDialogContent", deleteAnnotationConfirmationDialogConfirmText: "deleteAnnotationConfirmationDialogConfirmText", deleteAnnotationConfirmationDialogRejectText: "deleteAnnotationConfirmationDialogRejectText", annotationEditorFontSizeTitle: "annotationEditorFontSizeTitle", annotationEditorColorTitle: "annotationEditorColorTitle", canvasLabel: "canvasLabel", blankPageDropFilesHere: "blankPageDropFilesHere", blankPageExternalDropFilesHere: "blankPageExternalDropFilesHere", blankPageSelect: "blankPageSelect" }, usesInheritance: true, ngImport: i0 });
|
|
188
202
|
}
|
|
189
203
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: Messages, decorators: [{
|
|
190
204
|
type: Directive,
|
|
@@ -268,6 +282,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
268
282
|
type: Input
|
|
269
283
|
}], canvasLabel: [{
|
|
270
284
|
type: Input
|
|
285
|
+
}], blankPageDropFilesHere: [{
|
|
286
|
+
type: Input
|
|
287
|
+
}], blankPageExternalDropFilesHere: [{
|
|
288
|
+
type: Input
|
|
289
|
+
}], blankPageSelect: [{
|
|
290
|
+
type: Input
|
|
271
291
|
}] } });
|
|
272
292
|
|
|
273
293
|
/**
|
|
@@ -322,7 +342,7 @@ const packageMetadata = {
|
|
|
322
342
|
productCode: 'KENDOUIANGULAR',
|
|
323
343
|
productCodes: ['KENDOUIANGULAR'],
|
|
324
344
|
publishDate: 0,
|
|
325
|
-
version: '22.0.
|
|
345
|
+
version: '22.1.0-develop.2',
|
|
326
346
|
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',
|
|
327
347
|
};
|
|
328
348
|
|
|
@@ -1621,6 +1641,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1621
1641
|
}]
|
|
1622
1642
|
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
1623
1643
|
|
|
1644
|
+
/**
|
|
1645
|
+
* Renders the content of the blank page in the PDFViewer component.
|
|
1646
|
+
*
|
|
1647
|
+
* To define a blank page template, nest an `<ng-template>` tag with the `kendoPdfViewerBlankPageTemplate` directive inside the `<kendo-pdfviewer>` tag.
|
|
1648
|
+
*
|
|
1649
|
+
* @example
|
|
1650
|
+
* ```html
|
|
1651
|
+
* <kendo-pdfviewer>
|
|
1652
|
+
* <ng-template kendoPdfViewerBlankPageTemplate>
|
|
1653
|
+
* <div class="custom-blank-page">
|
|
1654
|
+
* <p>Drop a PDF file here or click to select</p>
|
|
1655
|
+
* </div>
|
|
1656
|
+
* </ng-template>
|
|
1657
|
+
* </kendo-pdfviewer>
|
|
1658
|
+
* ```
|
|
1659
|
+
*/
|
|
1660
|
+
class BlankPageTemplateDirective {
|
|
1661
|
+
templateRef;
|
|
1662
|
+
constructor(templateRef) {
|
|
1663
|
+
this.templateRef = templateRef;
|
|
1664
|
+
}
|
|
1665
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BlankPageTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1666
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: BlankPageTemplateDirective, isStandalone: true, selector: "[kendoPdfViewerBlankPageTemplate]", ngImport: i0 });
|
|
1667
|
+
}
|
|
1668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: BlankPageTemplateDirective, decorators: [{
|
|
1669
|
+
type: Directive,
|
|
1670
|
+
args: [{
|
|
1671
|
+
selector: '[kendoPdfViewerBlankPageTemplate]',
|
|
1672
|
+
standalone: true
|
|
1673
|
+
}]
|
|
1674
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1675
|
+
|
|
1624
1676
|
/**
|
|
1625
1677
|
* @hidden
|
|
1626
1678
|
*/
|
|
@@ -1956,6 +2008,10 @@ class PDFViewerComponent {
|
|
|
1956
2008
|
* @default true
|
|
1957
2009
|
*/
|
|
1958
2010
|
removeAnnotationConfirmation = true;
|
|
2011
|
+
/**
|
|
2012
|
+
* Fires when the user selects a file, from the blank page, to be loaded in the PDFViewer.
|
|
2013
|
+
*/
|
|
2014
|
+
fileSelect = new EventEmitter();
|
|
1959
2015
|
/**
|
|
1960
2016
|
* Fires when the component loads a PDF document successfully.
|
|
1961
2017
|
*/
|
|
@@ -1979,6 +2035,11 @@ class PDFViewerComponent {
|
|
|
1979
2035
|
pagesContainer;
|
|
1980
2036
|
pagesContainerViewContainerRef;
|
|
1981
2037
|
dialogContainerViewContainerRef;
|
|
2038
|
+
/**
|
|
2039
|
+
* The template for the blank page displayed before a PDF document is loaded.
|
|
2040
|
+
* Use this to customize the appearance of the blank page.
|
|
2041
|
+
*/
|
|
2042
|
+
blankPageTemplate;
|
|
1982
2043
|
/**
|
|
1983
2044
|
* Returns the current page number of the loaded PDF document.
|
|
1984
2045
|
*/
|
|
@@ -2025,6 +2086,12 @@ class PDFViewerComponent {
|
|
|
2025
2086
|
get annotationsToolId() {
|
|
2026
2087
|
return `k-pdfviewer-${counter}-annotations-button`;
|
|
2027
2088
|
}
|
|
2089
|
+
/**
|
|
2090
|
+
* @hidden
|
|
2091
|
+
*/
|
|
2092
|
+
get pdfId() {
|
|
2093
|
+
return `k-pdfviewer-${counter}`;
|
|
2094
|
+
}
|
|
2028
2095
|
loading = false;
|
|
2029
2096
|
searchActive = false;
|
|
2030
2097
|
matchCase = false;
|
|
@@ -2046,6 +2113,12 @@ class PDFViewerComponent {
|
|
|
2046
2113
|
get enabledSelection() {
|
|
2047
2114
|
return this._enabledSelection;
|
|
2048
2115
|
}
|
|
2116
|
+
/**
|
|
2117
|
+
* @hidden
|
|
2118
|
+
*/
|
|
2119
|
+
get isBlankPage() {
|
|
2120
|
+
return !this.pdfContext?.pdfPages?.length && !this.loading;
|
|
2121
|
+
}
|
|
2049
2122
|
/**
|
|
2050
2123
|
* @hidden
|
|
2051
2124
|
*/
|
|
@@ -2089,6 +2162,9 @@ class PDFViewerComponent {
|
|
|
2089
2162
|
}
|
|
2090
2163
|
ngOnInit() {
|
|
2091
2164
|
this.subs.add(this.localizationService.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
|
|
2165
|
+
if (this.isBlankPage) {
|
|
2166
|
+
this.enabledSelection = true;
|
|
2167
|
+
}
|
|
2092
2168
|
}
|
|
2093
2169
|
ngOnDestroy() {
|
|
2094
2170
|
this.subs.unsubscribe();
|
|
@@ -2287,6 +2363,31 @@ class PDFViewerComponent {
|
|
|
2287
2363
|
this.pdfViewerWidget?.goToPreviousSearchMatch();
|
|
2288
2364
|
this.currentMatch = this.currentMatch - 1 < 1 ? this.currentMatches.length : this.currentMatch - 1;
|
|
2289
2365
|
}
|
|
2366
|
+
/**
|
|
2367
|
+
* @hidden
|
|
2368
|
+
*/
|
|
2369
|
+
onSelectFile(e) {
|
|
2370
|
+
if (!e.files?.length) {
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
this.fileSelect.emit(e);
|
|
2374
|
+
const file = e.files[0].rawFile;
|
|
2375
|
+
if (file.name.toLowerCase().endsWith('.pdf')) {
|
|
2376
|
+
const reader = new FileReader();
|
|
2377
|
+
this.loading = true;
|
|
2378
|
+
reader.onload = () => {
|
|
2379
|
+
const base64Data = reader.result;
|
|
2380
|
+
this.loadPdf('data', base64Data);
|
|
2381
|
+
this.loading = false;
|
|
2382
|
+
this.enabledSelection = false;
|
|
2383
|
+
};
|
|
2384
|
+
reader.onerror = (error) => {
|
|
2385
|
+
this.zoneAwareEmitter('error', { error: error, context: this.pdfContext });
|
|
2386
|
+
this.loading = false;
|
|
2387
|
+
};
|
|
2388
|
+
reader.readAsDataURL(file);
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2290
2391
|
/**
|
|
2291
2392
|
* @hidden
|
|
2292
2393
|
*/
|
|
@@ -2470,13 +2571,13 @@ class PDFViewerComponent {
|
|
|
2470
2571
|
return observer;
|
|
2471
2572
|
};
|
|
2472
2573
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFViewerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i2$1.PopupService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: PDFViewerComponent, isStandalone: true, selector: "kendo-pdfviewer", inputs: { tools: "tools", loaderSettings: "loaderSettings", renderForms: "renderForms", saveFileName: "saveFileName", saveOptions: "saveOptions", url: "url", data: "data", arrayBuffer: "arrayBuffer", typedArray: "typedArray", zoom: "zoom", zoomRate: "zoomRate", minZoom: "minZoom", maxZoom: "maxZoom", loadOnDemand: "loadOnDemand", loadOnDemandPageSize: "loadOnDemandPageSize", removeAnnotationConfirmation: "removeAnnotationConfirmation" }, outputs: { load: "load", error: "error", download: "download", pageChange: "pageChange", zoomLevelChange: "zoomLevelChange" }, host: { properties: { "class.k-pdf-viewer": "this.hostClass", "attr.dir": "this.direction", "attr.display": "this.display" } }, providers: [
|
|
2574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: PDFViewerComponent, isStandalone: true, selector: "kendo-pdfviewer", inputs: { tools: "tools", loaderSettings: "loaderSettings", renderForms: "renderForms", saveFileName: "saveFileName", saveOptions: "saveOptions", url: "url", data: "data", arrayBuffer: "arrayBuffer", typedArray: "typedArray", zoom: "zoom", zoomRate: "zoomRate", minZoom: "minZoom", maxZoom: "maxZoom", loadOnDemand: "loadOnDemand", loadOnDemandPageSize: "loadOnDemandPageSize", removeAnnotationConfirmation: "removeAnnotationConfirmation" }, outputs: { fileSelect: "fileSelect", load: "load", error: "error", download: "download", pageChange: "pageChange", zoomLevelChange: "zoomLevelChange" }, host: { properties: { "class.k-pdf-viewer": "this.hostClass", "attr.dir": "this.direction", "attr.display": "this.display" } }, providers: [
|
|
2474
2575
|
LocalizationService,
|
|
2475
2576
|
{
|
|
2476
2577
|
provide: L10N_PREFIX,
|
|
2477
2578
|
useValue: 'kendo.pdfviewer'
|
|
2478
2579
|
}
|
|
2479
|
-
], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }, { propertyName: "pagesContainerViewContainerRef", first: true, predicate: ["pagesContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dialogContainerViewContainerRef", first: true, predicate: ["dialogContainer"], descendants: true, read: ViewContainerRef }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
|
|
2580
|
+
], queries: [{ propertyName: "blankPageTemplate", first: true, predicate: BlankPageTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "pagesContainer", first: true, predicate: ["pagesContainer"], descendants: true }, { propertyName: "pagesContainerViewContainerRef", first: true, predicate: ["pagesContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dialogContainerViewContainerRef", first: true, predicate: ["dialogContainer"], descendants: true, read: ViewContainerRef }], exportAs: ["kendo-pdfviewer"], usesOnChanges: true, ngImport: i0, template: `
|
|
2480
2581
|
<ng-container kendoPDFViewerLocalizedMessages
|
|
2481
2582
|
i18n-pagerFirstPage="kendo.pdfviewer.pagerFirstPage|The label for the first page button in the Pager"
|
|
2482
2583
|
pagerFirstPage="Go to the first page"
|
|
@@ -2590,7 +2691,16 @@ class PDFViewerComponent {
|
|
|
2590
2691
|
annotationEditorColorTitle="Color"
|
|
2591
2692
|
|
|
2592
2693
|
i18n-canvasLabel="kendo.pdfviewer.canvasLabel|The label for the PDF viewer canvas container."
|
|
2593
|
-
canvasLabel="PDF document"
|
|
2694
|
+
canvasLabel="PDF document"
|
|
2695
|
+
|
|
2696
|
+
i18n-blankPageDropFilesHere="kendo.pdfviewer.blankPageDropFilesHere|The FileSelect drop zone hint for the blank page."
|
|
2697
|
+
blankPageDropFilesHere="Drop files here to upload"
|
|
2698
|
+
|
|
2699
|
+
i18n-blankPageExternalDropFilesHere="kendo.pdfviewer.blankPageExternalDropFilesHere|The external FileSelect drop zone hint for the blank page."
|
|
2700
|
+
blankPageExternalDropFilesHere="Drag and drop files here to upload"
|
|
2701
|
+
|
|
2702
|
+
i18n-blankPageSelect="kendo.pdfviewer.blankPageSelect|The FileSelect button text for the blank page."
|
|
2703
|
+
blankPageSelect="Select files...">
|
|
2594
2704
|
</ng-container>
|
|
2595
2705
|
@if (loading) {
|
|
2596
2706
|
<div kendoPDFViewerLoader
|
|
@@ -2662,14 +2772,39 @@ class PDFViewerComponent {
|
|
|
2662
2772
|
wheel: stopPropagation
|
|
2663
2773
|
}"
|
|
2664
2774
|
class="k-pdf-viewer-pages"
|
|
2665
|
-
[attr.id]="pagesContainerId"
|
|
2775
|
+
[attr.id]="pagesContainerId">
|
|
2776
|
+
@if (isBlankPage) {
|
|
2777
|
+
<div class="k-page k-blank-page">
|
|
2778
|
+
@if (blankPageTemplate) {
|
|
2779
|
+
<ng-template [ngTemplateOutlet]="blankPageTemplate.templateRef"></ng-template>
|
|
2780
|
+
} @else {
|
|
2781
|
+
<kendo-uploaddropzone [zoneId]="pdfId">
|
|
2782
|
+
<kendo-uploaddropzone-messages
|
|
2783
|
+
[externalDropFilesHere]="messageFor('blankPageExternalDropFilesHere')">
|
|
2784
|
+
</kendo-uploaddropzone-messages>
|
|
2785
|
+
</kendo-uploaddropzone>
|
|
2786
|
+
<kendo-fileselect
|
|
2787
|
+
[zoneId]="pdfId"
|
|
2788
|
+
(select)="onSelectFile($event)"
|
|
2789
|
+
[multiple]="false"
|
|
2790
|
+
[showFileList]="false"
|
|
2791
|
+
[restrictions]="{ allowedExtensions: ['.pdf'] }">
|
|
2792
|
+
<kendo-upload-messages
|
|
2793
|
+
[dropFilesHere]="messageFor('blankPageDropFilesHere')"
|
|
2794
|
+
[select]="messageFor('blankPageSelect')">
|
|
2795
|
+
</kendo-upload-messages>
|
|
2796
|
+
</kendo-fileselect>
|
|
2797
|
+
}
|
|
2798
|
+
</div>
|
|
2799
|
+
}
|
|
2800
|
+
</div>
|
|
2666
2801
|
</div>
|
|
2667
2802
|
|
|
2668
2803
|
<div #dialogContainer></div>
|
|
2669
2804
|
@if (showLicenseWatermark) {
|
|
2670
2805
|
<div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
|
|
2671
2806
|
}
|
|
2672
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedPDFViewerMessagesDirective, selector: "[kendoPDFViewerLocalizedMessages]" }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { 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", "type", "wrapperId", "isAnnotationsToolbarVisible", "annotationsToolId", "isSelectionEnabled"], outputs: ["fileSelect", "fileSelectStart", "fileSelectError", "download", "selectionEnabled", "panningEnabled", "pageChange", "zoomIn", "zoomOut", "zoomLevelChange", "print", "search", "toggleAnnotationsToolbar", "setAnnotationMode"] }, { kind: "component", type: PDFViewerSearchComponent, selector: "[kendoPDFViewerSearch]", inputs: ["matches", "currentMatch"], outputs: ["searchChange", "prevMatch", "nextMatch", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }] });
|
|
2807
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedPDFViewerMessagesDirective, selector: "[kendoPDFViewerLocalizedMessages]" }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { 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", "type", "wrapperId", "isAnnotationsToolbarVisible", "annotationsToolId", "isSelectionEnabled"], outputs: ["fileSelect", "fileSelectStart", "fileSelectError", "download", "selectionEnabled", "panningEnabled", "pageChange", "zoomIn", "zoomOut", "zoomLevelChange", "print", "search", "toggleAnnotationsToolbar", "setAnnotationMode"] }, { kind: "component", type: PDFViewerSearchComponent, selector: "[kendoPDFViewerSearch]", inputs: ["matches", "currentMatch"], outputs: ["searchChange", "prevMatch", "nextMatch", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }, { kind: "component", type: FileSelectComponent, selector: "kendo-fileselect", inputs: ["name"], outputs: ["valueChange"], exportAs: ["kendoFileSelect"] }, { kind: "component", type: UploadDropZoneComponent, selector: "kendo-uploaddropzone", inputs: ["zoneId", "icon", "iconClass", "svgIcon"], exportAs: ["kendoUploadDropZone"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CustomMessagesComponent$1, selector: "kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages" }] });
|
|
2673
2808
|
}
|
|
2674
2809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFViewerComponent, decorators: [{
|
|
2675
2810
|
type: Component,
|
|
@@ -2797,7 +2932,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2797
2932
|
annotationEditorColorTitle="Color"
|
|
2798
2933
|
|
|
2799
2934
|
i18n-canvasLabel="kendo.pdfviewer.canvasLabel|The label for the PDF viewer canvas container."
|
|
2800
|
-
canvasLabel="PDF document"
|
|
2935
|
+
canvasLabel="PDF document"
|
|
2936
|
+
|
|
2937
|
+
i18n-blankPageDropFilesHere="kendo.pdfviewer.blankPageDropFilesHere|The FileSelect drop zone hint for the blank page."
|
|
2938
|
+
blankPageDropFilesHere="Drop files here to upload"
|
|
2939
|
+
|
|
2940
|
+
i18n-blankPageExternalDropFilesHere="kendo.pdfviewer.blankPageExternalDropFilesHere|The external FileSelect drop zone hint for the blank page."
|
|
2941
|
+
blankPageExternalDropFilesHere="Drag and drop files here to upload"
|
|
2942
|
+
|
|
2943
|
+
i18n-blankPageSelect="kendo.pdfviewer.blankPageSelect|The FileSelect button text for the blank page."
|
|
2944
|
+
blankPageSelect="Select files...">
|
|
2801
2945
|
</ng-container>
|
|
2802
2946
|
@if (loading) {
|
|
2803
2947
|
<div kendoPDFViewerLoader
|
|
@@ -2869,7 +3013,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2869
3013
|
wheel: stopPropagation
|
|
2870
3014
|
}"
|
|
2871
3015
|
class="k-pdf-viewer-pages"
|
|
2872
|
-
[attr.id]="pagesContainerId"
|
|
3016
|
+
[attr.id]="pagesContainerId">
|
|
3017
|
+
@if (isBlankPage) {
|
|
3018
|
+
<div class="k-page k-blank-page">
|
|
3019
|
+
@if (blankPageTemplate) {
|
|
3020
|
+
<ng-template [ngTemplateOutlet]="blankPageTemplate.templateRef"></ng-template>
|
|
3021
|
+
} @else {
|
|
3022
|
+
<kendo-uploaddropzone [zoneId]="pdfId">
|
|
3023
|
+
<kendo-uploaddropzone-messages
|
|
3024
|
+
[externalDropFilesHere]="messageFor('blankPageExternalDropFilesHere')">
|
|
3025
|
+
</kendo-uploaddropzone-messages>
|
|
3026
|
+
</kendo-uploaddropzone>
|
|
3027
|
+
<kendo-fileselect
|
|
3028
|
+
[zoneId]="pdfId"
|
|
3029
|
+
(select)="onSelectFile($event)"
|
|
3030
|
+
[multiple]="false"
|
|
3031
|
+
[showFileList]="false"
|
|
3032
|
+
[restrictions]="{ allowedExtensions: ['.pdf'] }">
|
|
3033
|
+
<kendo-upload-messages
|
|
3034
|
+
[dropFilesHere]="messageFor('blankPageDropFilesHere')"
|
|
3035
|
+
[select]="messageFor('blankPageSelect')">
|
|
3036
|
+
</kendo-upload-messages>
|
|
3037
|
+
</kendo-fileselect>
|
|
3038
|
+
}
|
|
3039
|
+
</div>
|
|
3040
|
+
}
|
|
3041
|
+
</div>
|
|
2873
3042
|
</div>
|
|
2874
3043
|
|
|
2875
3044
|
<div #dialogContainer></div>
|
|
@@ -2878,7 +3047,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2878
3047
|
}
|
|
2879
3048
|
`,
|
|
2880
3049
|
standalone: true,
|
|
2881
|
-
imports: [LocalizedPDFViewerMessagesDirective, EventsOutsideAngularDirective, LoaderComponent, ToolbarComponent, PDFViewerSearchComponent, WatermarkOverlayComponent]
|
|
3050
|
+
imports: [LocalizedPDFViewerMessagesDirective, EventsOutsideAngularDirective, LoaderComponent, ToolbarComponent, PDFViewerSearchComponent, WatermarkOverlayComponent, FileSelectComponent, UploadDropZoneComponent, BlankPageTemplateDirective, NgTemplateOutlet, CustomMessagesComponent$1],
|
|
2882
3051
|
}]
|
|
2883
3052
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i2$1.PopupService }], propDecorators: { hostClass: [{
|
|
2884
3053
|
type: HostBinding,
|
|
@@ -2921,6 +3090,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2921
3090
|
type: Input
|
|
2922
3091
|
}], removeAnnotationConfirmation: [{
|
|
2923
3092
|
type: Input
|
|
3093
|
+
}], fileSelect: [{
|
|
3094
|
+
type: Output
|
|
2924
3095
|
}], load: [{
|
|
2925
3096
|
type: Output
|
|
2926
3097
|
}], error: [{
|
|
@@ -2940,6 +3111,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2940
3111
|
}], dialogContainerViewContainerRef: [{
|
|
2941
3112
|
type: ViewChild,
|
|
2942
3113
|
args: ['dialogContainer', { read: ViewContainerRef }]
|
|
3114
|
+
}], blankPageTemplate: [{
|
|
3115
|
+
type: ContentChild,
|
|
3116
|
+
args: [BlankPageTemplateDirective]
|
|
2943
3117
|
}] } });
|
|
2944
3118
|
|
|
2945
3119
|
/**
|
|
@@ -2961,7 +3135,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2961
3135
|
*/
|
|
2962
3136
|
const KENDO_PDFVIEWER = [
|
|
2963
3137
|
PDFViewerComponent,
|
|
2964
|
-
PDFViewerCustomMessagesComponent
|
|
3138
|
+
PDFViewerCustomMessagesComponent,
|
|
3139
|
+
BlankPageTemplateDirective
|
|
2965
3140
|
];
|
|
2966
3141
|
|
|
2967
3142
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
@@ -2985,7 +3160,7 @@ const KENDO_PDFVIEWER = [
|
|
|
2985
3160
|
*/
|
|
2986
3161
|
class PDFViewerModule {
|
|
2987
3162
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2988
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: PDFViewerModule, imports: [PDFViewerComponent, PDFViewerCustomMessagesComponent], exports: [PDFViewerComponent, PDFViewerCustomMessagesComponent] });
|
|
3163
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: PDFViewerModule, imports: [PDFViewerComponent, PDFViewerCustomMessagesComponent, BlankPageTemplateDirective], exports: [PDFViewerComponent, PDFViewerCustomMessagesComponent, BlankPageTemplateDirective] });
|
|
2989
3164
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PDFViewerModule, providers: [
|
|
2990
3165
|
IconsService,
|
|
2991
3166
|
PopupService,
|
|
@@ -3009,5 +3184,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3009
3184
|
* Generated bundle index. Do not edit.
|
|
3010
3185
|
*/
|
|
3011
3186
|
|
|
3012
|
-
export { KENDO_PDFVIEWER, LoaderComponent, LocalizedPDFViewerMessagesDirective, PDFViewerComponent, PDFViewerCustomMessagesComponent, PDFViewerDownloadEvent, PDFViewerModule, PDFViewerSearchComponent, ToolbarComboBoxDirective, ToolbarComponent, ToolbarFocusableDirective, ToolbarInputWrapperComponent };
|
|
3187
|
+
export { BlankPageTemplateDirective, KENDO_PDFVIEWER, LoaderComponent, LocalizedPDFViewerMessagesDirective, PDFViewerComponent, PDFViewerCustomMessagesComponent, PDFViewerDownloadEvent, PDFViewerModule, PDFViewerSearchComponent, ToolbarComboBoxDirective, ToolbarComponent, ToolbarFocusableDirective, ToolbarInputWrapperComponent };
|
|
3013
3188
|
|
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { PDFViewerErrorEvent, PDFViewerLoadEvent, PDFViewerDownloadEvent, PDFVie
|
|
|
13
13
|
export { LoaderSettings } from './models/loader-settings';
|
|
14
14
|
export { PDFViewerCustomMessagesComponent } from './localization/custom-messages.component';
|
|
15
15
|
export { LocalizedPDFViewerMessagesDirective } from './localization/localized-messages.directive';
|
|
16
|
+
export { BlankPageTemplateDirective } from './templates/blank-page-template.directive';
|
|
16
17
|
export { ToolbarFocusableDirective } from './toolbar/toolbar-focusable.directive';
|
|
17
18
|
export { ToolbarInputWrapperComponent } from './toolbar/input-wrapper.component';
|
|
18
19
|
export { ToolbarComboBoxDirective } from './toolbar/toolbar-combobox.directive';
|
|
@@ -160,6 +160,18 @@ export declare class Messages extends ComponentMessages {
|
|
|
160
160
|
* Sets the label for the PDF viewer canvas container.
|
|
161
161
|
*/
|
|
162
162
|
canvasLabel: string;
|
|
163
|
+
/**
|
|
164
|
+
* Sets the text for the FileSelect drop zone hint when no file is being dragged.
|
|
165
|
+
*/
|
|
166
|
+
blankPageDropFilesHere: string;
|
|
167
|
+
/**
|
|
168
|
+
* Sets the text for the FileSelect external drop zone hint when no file is being dragged.
|
|
169
|
+
*/
|
|
170
|
+
blankPageExternalDropFilesHere: string;
|
|
171
|
+
/**
|
|
172
|
+
* Sets the text for the FileSelect button in the blank page drop zone.
|
|
173
|
+
*/
|
|
174
|
+
blankPageSelect: string;
|
|
163
175
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
|
164
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-pdfviewer-messages-base", never, { "zoomInTitle": { "alias": "zoomInTitle"; "required": false; }; "zoomOutTitle": { "alias": "zoomOutTitle"; "required": false; }; "selectionTitle": { "alias": "selectionTitle"; "required": false; }; "panningTitle": { "alias": "panningTitle"; "required": false; }; "searchTitle": { "alias": "searchTitle"; "required": false; }; "openTitle": { "alias": "openTitle"; "required": false; }; "downloadTitle": { "alias": "downloadTitle"; "required": false; }; "printTitle": { "alias": "printTitle"; "required": false; }; "pagerInputLabel": { "alias": "pagerInputLabel"; "required": false; }; "pagerInputTitle": { "alias": "pagerInputTitle"; "required": false; }; "pagerFirstPage": { "alias": "pagerFirstPage"; "required": false; }; "pagerPreviousPage": { "alias": "pagerPreviousPage"; "required": false; }; "pagerNextPage": { "alias": "pagerNextPage"; "required": false; }; "pagerLastPage": { "alias": "pagerLastPage"; "required": false; }; "pagerOf": { "alias": "pagerOf"; "required": false; }; "pagerPage": { "alias": "pagerPage"; "required": false; }; "fitToPage": { "alias": "fitToPage"; "required": false; }; "fitToWidth": { "alias": "fitToWidth"; "required": false; }; "searchInputPlaceholder": { "alias": "searchInputPlaceholder"; "required": false; }; "searchMatchesOf": { "alias": "searchMatchesOf"; "required": false; }; "searchPreviousMatchTitle": { "alias": "searchPreviousMatchTitle"; "required": false; }; "searchNextMatchTitle": { "alias": "searchNextMatchTitle"; "required": false; }; "searchCloseTitle": { "alias": "searchCloseTitle"; "required": false; }; "searchMatchCaseTitle": { "alias": "searchMatchCaseTitle"; "required": false; }; "zoomInputPlaceholder": { "alias": "zoomInputPlaceholder"; "required": false; }; "annotationsTitle": { "alias": "annotationsTitle"; "required": false; }; "annotationEditorTitle": { "alias": "annotationEditorTitle"; "required": false; }; "deleteAnnotationTitle": { "alias": "deleteAnnotationTitle"; "required": false; }; "highlightAnnotationTitle": { "alias": "highlightAnnotationTitle"; "required": false; }; "freeTextAnnotationTitle": { "alias": "freeTextAnnotationTitle"; "required": false; }; "closeAnnotationsToolbarTitle": { "alias": "closeAnnotationsToolbarTitle"; "required": false; }; "deleteAnnotationConfirmationDialogTitle": { "alias": "deleteAnnotationConfirmationDialogTitle"; "required": false; }; "deleteAnnotationConfirmationDialogContent": { "alias": "deleteAnnotationConfirmationDialogContent"; "required": false; }; "deleteAnnotationConfirmationDialogConfirmText": { "alias": "deleteAnnotationConfirmationDialogConfirmText"; "required": false; }; "deleteAnnotationConfirmationDialogRejectText": { "alias": "deleteAnnotationConfirmationDialogRejectText"; "required": false; }; "annotationEditorFontSizeTitle": { "alias": "annotationEditorFontSizeTitle"; "required": false; }; "annotationEditorColorTitle": { "alias": "annotationEditorColorTitle"; "required": false; }; "canvasLabel": { "alias": "canvasLabel"; "required": false; }; }, {}, never, never, true, never>;
|
|
176
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-pdfviewer-messages-base", never, { "zoomInTitle": { "alias": "zoomInTitle"; "required": false; }; "zoomOutTitle": { "alias": "zoomOutTitle"; "required": false; }; "selectionTitle": { "alias": "selectionTitle"; "required": false; }; "panningTitle": { "alias": "panningTitle"; "required": false; }; "searchTitle": { "alias": "searchTitle"; "required": false; }; "openTitle": { "alias": "openTitle"; "required": false; }; "downloadTitle": { "alias": "downloadTitle"; "required": false; }; "printTitle": { "alias": "printTitle"; "required": false; }; "pagerInputLabel": { "alias": "pagerInputLabel"; "required": false; }; "pagerInputTitle": { "alias": "pagerInputTitle"; "required": false; }; "pagerFirstPage": { "alias": "pagerFirstPage"; "required": false; }; "pagerPreviousPage": { "alias": "pagerPreviousPage"; "required": false; }; "pagerNextPage": { "alias": "pagerNextPage"; "required": false; }; "pagerLastPage": { "alias": "pagerLastPage"; "required": false; }; "pagerOf": { "alias": "pagerOf"; "required": false; }; "pagerPage": { "alias": "pagerPage"; "required": false; }; "fitToPage": { "alias": "fitToPage"; "required": false; }; "fitToWidth": { "alias": "fitToWidth"; "required": false; }; "searchInputPlaceholder": { "alias": "searchInputPlaceholder"; "required": false; }; "searchMatchesOf": { "alias": "searchMatchesOf"; "required": false; }; "searchPreviousMatchTitle": { "alias": "searchPreviousMatchTitle"; "required": false; }; "searchNextMatchTitle": { "alias": "searchNextMatchTitle"; "required": false; }; "searchCloseTitle": { "alias": "searchCloseTitle"; "required": false; }; "searchMatchCaseTitle": { "alias": "searchMatchCaseTitle"; "required": false; }; "zoomInputPlaceholder": { "alias": "zoomInputPlaceholder"; "required": false; }; "annotationsTitle": { "alias": "annotationsTitle"; "required": false; }; "annotationEditorTitle": { "alias": "annotationEditorTitle"; "required": false; }; "deleteAnnotationTitle": { "alias": "deleteAnnotationTitle"; "required": false; }; "highlightAnnotationTitle": { "alias": "highlightAnnotationTitle"; "required": false; }; "freeTextAnnotationTitle": { "alias": "freeTextAnnotationTitle"; "required": false; }; "closeAnnotationsToolbarTitle": { "alias": "closeAnnotationsToolbarTitle"; "required": false; }; "deleteAnnotationConfirmationDialogTitle": { "alias": "deleteAnnotationConfirmationDialogTitle"; "required": false; }; "deleteAnnotationConfirmationDialogContent": { "alias": "deleteAnnotationConfirmationDialogContent"; "required": false; }; "deleteAnnotationConfirmationDialogConfirmText": { "alias": "deleteAnnotationConfirmationDialogConfirmText"; "required": false; }; "deleteAnnotationConfirmationDialogRejectText": { "alias": "deleteAnnotationConfirmationDialogRejectText"; "required": false; }; "annotationEditorFontSizeTitle": { "alias": "annotationEditorFontSizeTitle"; "required": false; }; "annotationEditorColorTitle": { "alias": "annotationEditorColorTitle"; "required": false; }; "canvasLabel": { "alias": "canvasLabel"; "required": false; }; "blankPageDropFilesHere": { "alias": "blankPageDropFilesHere"; "required": false; }; "blankPageExternalDropFilesHere": { "alias": "blankPageExternalDropFilesHere"; "required": false; }; "blankPageSelect": { "alias": "blankPageSelect"; "required": false; }; }, {}, never, never, true, never>;
|
|
165
177
|
}
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "22.0.
|
|
10
|
+
"publishDate": 1768577588,
|
|
11
|
+
"version": "22.1.0-develop.2",
|
|
12
12
|
"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"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-pdfviewer",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.1.0-develop.2",
|
|
4
4
|
"description": "Kendo UI PDFViewer for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"package": {
|
|
20
20
|
"productName": "Kendo UI for Angular",
|
|
21
21
|
"productCode": "KENDOUIANGULAR",
|
|
22
|
-
"publishDate":
|
|
22
|
+
"publishDate": 1768577588,
|
|
23
23
|
"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"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -29,22 +29,23 @@
|
|
|
29
29
|
"@angular/core": "19 - 21",
|
|
30
30
|
"@angular/platform-browser": "19 - 21",
|
|
31
31
|
"@progress/kendo-licensing": "^1.7.0",
|
|
32
|
-
"@progress/kendo-angular-buttons": "22.0.
|
|
33
|
-
"@progress/kendo-angular-common": "22.0.
|
|
34
|
-
"@progress/kendo-angular-dialog": "22.0.
|
|
35
|
-
"@progress/kendo-angular-dropdowns": "22.0.
|
|
36
|
-
"@progress/kendo-angular-inputs": "22.0.
|
|
37
|
-
"@progress/kendo-angular-intl": "22.0.
|
|
38
|
-
"@progress/kendo-angular-l10n": "22.0.
|
|
39
|
-
"@progress/kendo-angular-icons": "22.0.
|
|
40
|
-
"@progress/kendo-angular-indicators": "22.0.
|
|
41
|
-
"@progress/kendo-angular-pager": "22.0.
|
|
42
|
-
"@progress/kendo-angular-popup": "22.0.
|
|
32
|
+
"@progress/kendo-angular-buttons": "22.1.0-develop.2",
|
|
33
|
+
"@progress/kendo-angular-common": "22.1.0-develop.2",
|
|
34
|
+
"@progress/kendo-angular-dialog": "22.1.0-develop.2",
|
|
35
|
+
"@progress/kendo-angular-dropdowns": "22.1.0-develop.2",
|
|
36
|
+
"@progress/kendo-angular-inputs": "22.1.0-develop.2",
|
|
37
|
+
"@progress/kendo-angular-intl": "22.1.0-develop.2",
|
|
38
|
+
"@progress/kendo-angular-l10n": "22.1.0-develop.2",
|
|
39
|
+
"@progress/kendo-angular-icons": "22.1.0-develop.2",
|
|
40
|
+
"@progress/kendo-angular-indicators": "22.1.0-develop.2",
|
|
41
|
+
"@progress/kendo-angular-pager": "22.1.0-develop.2",
|
|
42
|
+
"@progress/kendo-angular-popup": "22.1.0-develop.2",
|
|
43
|
+
"@progress/kendo-angular-upload": "22.1.0-develop.2",
|
|
43
44
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"tslib": "^2.3.1",
|
|
47
|
-
"@progress/kendo-angular-schematics": "22.0.
|
|
48
|
+
"@progress/kendo-angular-schematics": "22.1.0-develop.2",
|
|
48
49
|
"@progress/kendo-file-saver": "^1.0.1",
|
|
49
50
|
"@progress/kendo-pdfviewer-common": "0.6.2"
|
|
50
51
|
},
|
package/pdfviewer.component.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
10
10
|
import { PDFViewerDownloadEvent, PDFViewerErrorEvent, PDFViewerLoadEvent, PDFViewerPageChangeEvent, PDFViewerZoomChangeEvent } from './models/events';
|
|
11
11
|
import { SaveOptions } from '@progress/kendo-file-saver';
|
|
12
12
|
import { PageChangeEvent } from '@progress/kendo-angular-pager';
|
|
13
|
+
import { SelectEvent } from '@progress/kendo-angular-upload';
|
|
13
14
|
import { ZoomLevel } from './models/zoom-level';
|
|
14
15
|
import { PDFViewerTool } from './models/toolbar-tool';
|
|
15
16
|
import { ToolbarComponent } from './toolbar/toolbar.component';
|
|
17
|
+
import { BlankPageTemplateDirective } from './templates/blank-page-template.directive';
|
|
16
18
|
import 'pdfjs-dist/build/pdf.worker.min.mjs';
|
|
17
19
|
import { AnnotationEditorType } from './models/annotation-editor.type';
|
|
18
20
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
@@ -130,6 +132,10 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
130
132
|
* @default true
|
|
131
133
|
*/
|
|
132
134
|
removeAnnotationConfirmation: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Fires when the user selects a file, from the blank page, to be loaded in the PDFViewer.
|
|
137
|
+
*/
|
|
138
|
+
fileSelect: EventEmitter<SelectEvent>;
|
|
133
139
|
/**
|
|
134
140
|
* Fires when the component loads a PDF document successfully.
|
|
135
141
|
*/
|
|
@@ -153,6 +159,11 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
153
159
|
private pagesContainer;
|
|
154
160
|
private pagesContainerViewContainerRef;
|
|
155
161
|
private dialogContainerViewContainerRef;
|
|
162
|
+
/**
|
|
163
|
+
* The template for the blank page displayed before a PDF document is loaded.
|
|
164
|
+
* Use this to customize the appearance of the blank page.
|
|
165
|
+
*/
|
|
166
|
+
blankPageTemplate: BlankPageTemplateDirective;
|
|
156
167
|
/**
|
|
157
168
|
* Returns the current page number of the loaded PDF document.
|
|
158
169
|
*/
|
|
@@ -178,6 +189,10 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
178
189
|
* @hidden
|
|
179
190
|
*/
|
|
180
191
|
get annotationsToolId(): string;
|
|
192
|
+
/**
|
|
193
|
+
* @hidden
|
|
194
|
+
*/
|
|
195
|
+
get pdfId(): string;
|
|
181
196
|
loading: boolean;
|
|
182
197
|
searchActive: boolean;
|
|
183
198
|
matchCase: boolean;
|
|
@@ -192,6 +207,10 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
192
207
|
* @hidden
|
|
193
208
|
*/
|
|
194
209
|
get enabledSelection(): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* @hidden
|
|
212
|
+
*/
|
|
213
|
+
get isBlankPage(): boolean;
|
|
195
214
|
/**
|
|
196
215
|
* @hidden
|
|
197
216
|
*/
|
|
@@ -308,6 +327,10 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
308
327
|
* @hidden
|
|
309
328
|
*/
|
|
310
329
|
onPreviousMatch(): void;
|
|
330
|
+
/**
|
|
331
|
+
* @hidden
|
|
332
|
+
*/
|
|
333
|
+
onSelectFile(e: SelectEvent): void;
|
|
311
334
|
/**
|
|
312
335
|
* @hidden
|
|
313
336
|
*/
|
|
@@ -328,5 +351,5 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
328
351
|
private zoneAwareEmitter;
|
|
329
352
|
private classMutationObserver;
|
|
330
353
|
static ɵfac: i0.ɵɵFactoryDeclaration<PDFViewerComponent, never>;
|
|
331
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PDFViewerComponent, "kendo-pdfviewer", ["kendo-pdfviewer"], { "tools": { "alias": "tools"; "required": false; }; "loaderSettings": { "alias": "loaderSettings"; "required": false; }; "renderForms": { "alias": "renderForms"; "required": false; }; "saveFileName": { "alias": "saveFileName"; "required": false; }; "saveOptions": { "alias": "saveOptions"; "required": false; }; "url": { "alias": "url"; "required": false; }; "data": { "alias": "data"; "required": false; }; "arrayBuffer": { "alias": "arrayBuffer"; "required": false; }; "typedArray": { "alias": "typedArray"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "zoomRate": { "alias": "zoomRate"; "required": false; }; "minZoom": { "alias": "minZoom"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "loadOnDemand": { "alias": "loadOnDemand"; "required": false; }; "loadOnDemandPageSize": { "alias": "loadOnDemandPageSize"; "required": false; }; "removeAnnotationConfirmation": { "alias": "removeAnnotationConfirmation"; "required": false; }; }, { "load": "load"; "error": "error"; "download": "download"; "pageChange": "pageChange"; "zoomLevelChange": "zoomLevelChange"; },
|
|
354
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PDFViewerComponent, "kendo-pdfviewer", ["kendo-pdfviewer"], { "tools": { "alias": "tools"; "required": false; }; "loaderSettings": { "alias": "loaderSettings"; "required": false; }; "renderForms": { "alias": "renderForms"; "required": false; }; "saveFileName": { "alias": "saveFileName"; "required": false; }; "saveOptions": { "alias": "saveOptions"; "required": false; }; "url": { "alias": "url"; "required": false; }; "data": { "alias": "data"; "required": false; }; "arrayBuffer": { "alias": "arrayBuffer"; "required": false; }; "typedArray": { "alias": "typedArray"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "zoomRate": { "alias": "zoomRate"; "required": false; }; "minZoom": { "alias": "minZoom"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "loadOnDemand": { "alias": "loadOnDemand"; "required": false; }; "loadOnDemandPageSize": { "alias": "loadOnDemandPageSize"; "required": false; }; "removeAnnotationConfirmation": { "alias": "removeAnnotationConfirmation"; "required": false; }; }, { "fileSelect": "fileSelect"; "load": "load"; "error": "error"; "download": "download"; "pageChange": "pageChange"; "zoomLevelChange": "zoomLevelChange"; }, ["blankPageTemplate"], never, true, never>;
|
|
332
355
|
}
|
package/pdfviewer.module.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "./pdfviewer.component";
|
|
7
7
|
import * as i2 from "./localization/custom-messages.component";
|
|
8
|
+
import * as i3 from "./templates/blank-page-template.directive";
|
|
8
9
|
/**
|
|
9
10
|
* Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) definition for the PDFViewer component.
|
|
10
11
|
*
|
|
@@ -25,6 +26,6 @@ import * as i2 from "./localization/custom-messages.component";
|
|
|
25
26
|
*/
|
|
26
27
|
export declare class PDFViewerModule {
|
|
27
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<PDFViewerModule, never>;
|
|
28
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PDFViewerModule, never, [typeof i1.PDFViewerComponent, typeof i2.PDFViewerCustomMessagesComponent], [typeof i1.PDFViewerComponent, typeof i2.PDFViewerCustomMessagesComponent]>;
|
|
29
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PDFViewerModule, never, [typeof i1.PDFViewerComponent, typeof i2.PDFViewerCustomMessagesComponent, typeof i3.BlankPageTemplateDirective], [typeof i1.PDFViewerComponent, typeof i2.PDFViewerCustomMessagesComponent, typeof i3.BlankPageTemplateDirective]>;
|
|
29
30
|
static ɵinj: i0.ɵɵInjectorDeclaration<PDFViewerModule>;
|
|
30
31
|
}
|
|
@@ -9,8 +9,8 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
9
9
|
function default_1(options) {
|
|
10
10
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'PDFViewerModule', package: 'pdfviewer', peerDependencies: {
|
|
11
11
|
// peers of the dropdowns
|
|
12
|
-
'@progress/kendo-angular-navigation': '22.0.
|
|
13
|
-
'@progress/kendo-angular-treeview': '22.0.
|
|
12
|
+
'@progress/kendo-angular-navigation': '22.1.0-develop.2',
|
|
13
|
+
'@progress/kendo-angular-treeview': '22.1.0-develop.2'
|
|
14
14
|
} });
|
|
15
15
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
16
16
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { TemplateRef } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Renders the content of the blank page in the PDFViewer component.
|
|
9
|
+
*
|
|
10
|
+
* To define a blank page template, nest an `<ng-template>` tag with the `kendoPdfViewerBlankPageTemplate` directive inside the `<kendo-pdfviewer>` tag.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <kendo-pdfviewer>
|
|
15
|
+
* <ng-template kendoPdfViewerBlankPageTemplate>
|
|
16
|
+
* <div class="custom-blank-page">
|
|
17
|
+
* <p>Drop a PDF file here or click to select</p>
|
|
18
|
+
* </div>
|
|
19
|
+
* </ng-template>
|
|
20
|
+
* </kendo-pdfviewer>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class BlankPageTemplateDirective {
|
|
24
|
+
templateRef: TemplateRef<any>;
|
|
25
|
+
constructor(templateRef: TemplateRef<any>);
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlankPageTemplateDirective, never>;
|
|
27
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BlankPageTemplateDirective, "[kendoPdfViewerBlankPageTemplate]", never, {}, {}, never, never, true, never>;
|
|
28
|
+
}
|