@progress/kendo-angular-pdfviewer 24.0.0-develop.24 → 24.0.0-develop.26
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.
|
@@ -7,7 +7,7 @@ import { Input, Directive, 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 { PdfViewerInteractionMode,
|
|
10
|
+
import { PdfViewerInteractionMode, 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
12
|
import { FileSelectComponent, UploadDropZoneComponent, CustomMessagesComponent as CustomMessagesComponent$1 } from '@progress/kendo-angular-upload';
|
|
13
13
|
import { Subscription } from 'rxjs';
|
|
@@ -340,8 +340,8 @@ const packageMetadata = {
|
|
|
340
340
|
productName: 'Kendo UI for Angular',
|
|
341
341
|
productCode: 'KENDOUIANGULAR',
|
|
342
342
|
productCodes: ['KENDOUIANGULAR'],
|
|
343
|
-
publishDate:
|
|
344
|
-
version: '24.0.0-develop.
|
|
343
|
+
publishDate: 1778594888,
|
|
344
|
+
version: '24.0.0-develop.26',
|
|
345
345
|
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',
|
|
346
346
|
};
|
|
347
347
|
|
|
@@ -2058,7 +2058,7 @@ class PDFViewerComponent {
|
|
|
2058
2058
|
if (!this.pdfContext?.pdfPages.length) {
|
|
2059
2059
|
return;
|
|
2060
2060
|
}
|
|
2061
|
-
return this.pagesContainer.nativeElement.querySelectorAll('.k-page')[this.skip]?.getAttribute('id');
|
|
2061
|
+
return this.pagesContainer.nativeElement.querySelectorAll('.k-page:not(.k-blank-page)')[this.skip]?.getAttribute('id');
|
|
2062
2062
|
}
|
|
2063
2063
|
/**
|
|
2064
2064
|
* @hidden
|
|
@@ -2192,6 +2192,20 @@ class PDFViewerComponent {
|
|
|
2192
2192
|
scrollToPage(page) {
|
|
2193
2193
|
this.pdfViewerWidget?.scrollToPage({ pageNumber: page });
|
|
2194
2194
|
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Clears the currently loaded PDF document and displays the blank page.
|
|
2197
|
+
*/
|
|
2198
|
+
clear() {
|
|
2199
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2200
|
+
this.pdfViewerWidget?.destroy();
|
|
2201
|
+
this.removePdfPageElements();
|
|
2202
|
+
});
|
|
2203
|
+
this.pdfContext = null;
|
|
2204
|
+
this.loading = false;
|
|
2205
|
+
this.skip = 0;
|
|
2206
|
+
this._enabledSelection = true;
|
|
2207
|
+
this.cdr.markForCheck();
|
|
2208
|
+
}
|
|
2195
2209
|
/**
|
|
2196
2210
|
* @hidden
|
|
2197
2211
|
*/
|
|
@@ -2399,8 +2413,7 @@ class PDFViewerComponent {
|
|
|
2399
2413
|
this.emitLoad = true;
|
|
2400
2414
|
this.skip = 0;
|
|
2401
2415
|
this.ngZone.runOutsideAngular(() => {
|
|
2402
|
-
|
|
2403
|
-
this.pagesContainer && removeChildren(this.pagesContainer.nativeElement);
|
|
2416
|
+
this.removePdfPageElements();
|
|
2404
2417
|
const file = dataType === 'url' || dataType === 'data' ? { [dataType]: data } : { data };
|
|
2405
2418
|
this.pdfViewerWidget = new PdfViewer(this.host.nativeElement, {
|
|
2406
2419
|
loadOnDemand: this.loadOnDemand,
|
|
@@ -2426,8 +2439,15 @@ class PDFViewerComponent {
|
|
|
2426
2439
|
});
|
|
2427
2440
|
});
|
|
2428
2441
|
}
|
|
2442
|
+
removePdfPageElements() {
|
|
2443
|
+
const container = this.pagesContainer?.nativeElement;
|
|
2444
|
+
if (!container) {
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
Array.from(container.children).forEach((node) => container.removeChild(node));
|
|
2448
|
+
}
|
|
2429
2449
|
assignPageIds() {
|
|
2430
|
-
this.pagesContainer.nativeElement.querySelectorAll('.k-page').forEach((pageElement, index) => {
|
|
2450
|
+
this.pagesContainer.nativeElement.querySelectorAll('.k-page:not(.k-blank-page)').forEach((pageElement, index) => {
|
|
2431
2451
|
const id = `k-pdfviewer-${counter}-page-${index + 1}`;
|
|
2432
2452
|
this.renderer.setAttribute(pageElement, 'id', id);
|
|
2433
2453
|
});
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "24.0.0-develop.
|
|
10
|
+
"publishDate": 1778594888,
|
|
11
|
+
"version": "24.0.0-develop.26",
|
|
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": "24.0.0-develop.
|
|
3
|
+
"version": "24.0.0-develop.26",
|
|
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": 1778594888,
|
|
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,23 +29,23 @@
|
|
|
29
29
|
"@angular/core": "19 - 21",
|
|
30
30
|
"@angular/platform-browser": "19 - 21",
|
|
31
31
|
"@progress/kendo-licensing": "^1.11.0",
|
|
32
|
-
"@progress/kendo-angular-buttons": "24.0.0-develop.
|
|
33
|
-
"@progress/kendo-angular-common": "24.0.0-develop.
|
|
34
|
-
"@progress/kendo-angular-dialog": "24.0.0-develop.
|
|
35
|
-
"@progress/kendo-angular-dropdowns": "24.0.0-develop.
|
|
36
|
-
"@progress/kendo-angular-inputs": "24.0.0-develop.
|
|
37
|
-
"@progress/kendo-angular-intl": "24.0.0-develop.
|
|
38
|
-
"@progress/kendo-angular-l10n": "24.0.0-develop.
|
|
39
|
-
"@progress/kendo-angular-icons": "24.0.0-develop.
|
|
40
|
-
"@progress/kendo-angular-indicators": "24.0.0-develop.
|
|
41
|
-
"@progress/kendo-angular-pager": "24.0.0-develop.
|
|
42
|
-
"@progress/kendo-angular-popup": "24.0.0-develop.
|
|
43
|
-
"@progress/kendo-angular-upload": "24.0.0-develop.
|
|
32
|
+
"@progress/kendo-angular-buttons": "24.0.0-develop.26",
|
|
33
|
+
"@progress/kendo-angular-common": "24.0.0-develop.26",
|
|
34
|
+
"@progress/kendo-angular-dialog": "24.0.0-develop.26",
|
|
35
|
+
"@progress/kendo-angular-dropdowns": "24.0.0-develop.26",
|
|
36
|
+
"@progress/kendo-angular-inputs": "24.0.0-develop.26",
|
|
37
|
+
"@progress/kendo-angular-intl": "24.0.0-develop.26",
|
|
38
|
+
"@progress/kendo-angular-l10n": "24.0.0-develop.26",
|
|
39
|
+
"@progress/kendo-angular-icons": "24.0.0-develop.26",
|
|
40
|
+
"@progress/kendo-angular-indicators": "24.0.0-develop.26",
|
|
41
|
+
"@progress/kendo-angular-pager": "24.0.0-develop.26",
|
|
42
|
+
"@progress/kendo-angular-popup": "24.0.0-develop.26",
|
|
43
|
+
"@progress/kendo-angular-upload": "24.0.0-develop.26",
|
|
44
44
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"tslib": "^2.3.1",
|
|
48
|
-
"@progress/kendo-angular-schematics": "24.0.0-develop.
|
|
48
|
+
"@progress/kendo-angular-schematics": "24.0.0-develop.26",
|
|
49
49
|
"@progress/kendo-file-saver": "^1.0.1",
|
|
50
50
|
"@progress/kendo-pdfviewer-common": "0.6.4"
|
|
51
51
|
},
|
package/pdfviewer.component.d.ts
CHANGED
|
@@ -257,6 +257,10 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
257
257
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/pdfviewer/tools#programmatically-scrolling-the-pdfviewer)).
|
|
258
258
|
*/
|
|
259
259
|
scrollToPage(page: number): void;
|
|
260
|
+
/**
|
|
261
|
+
* Clears the currently loaded PDF document and displays the blank page.
|
|
262
|
+
*/
|
|
263
|
+
clear(): void;
|
|
260
264
|
/**
|
|
261
265
|
* @hidden
|
|
262
266
|
*/
|
|
@@ -337,6 +341,7 @@ export declare class PDFViewerComponent implements OnInit, OnDestroy {
|
|
|
337
341
|
*/
|
|
338
342
|
toggleAnnotationsToolbar(): void;
|
|
339
343
|
private loadPdf;
|
|
344
|
+
private removePdfPageElements;
|
|
340
345
|
private assignPageIds;
|
|
341
346
|
private setZoomLevel;
|
|
342
347
|
private verifySettings;
|
|
@@ -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': '24.0.0-develop.
|
|
13
|
-
'@progress/kendo-angular-treeview': '24.0.0-develop.
|
|
12
|
+
'@progress/kendo-angular-navigation': '24.0.0-develop.26',
|
|
13
|
+
'@progress/kendo-angular-treeview': '24.0.0-develop.26'
|
|
14
14
|
} });
|
|
15
15
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
16
16
|
}
|