@progress/kendo-angular-pdfviewer 17.3.0-develop.1 → 18.0.0-develop.1
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.
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
9
9
|
name: '@progress/kendo-angular-pdfviewer',
|
10
10
|
productName: 'Kendo UI for Angular',
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
12
|
-
publishDate:
|
13
|
-
version: '
|
12
|
+
publishDate: 1736250087,
|
13
|
+
version: '18.0.0-develop.1',
|
14
14
|
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',
|
15
15
|
};
|
@@ -244,7 +244,9 @@ export class PDFViewerComponent {
|
|
244
244
|
const newArrayBuffer = changes['arrayBuffer'] && this.arrayBuffer;
|
245
245
|
const newTypedArray = changes['typedArray'] && this.typedArray;
|
246
246
|
this.verifySettings(changes);
|
247
|
-
const
|
247
|
+
const dataOrTypedArray = newBase64Data ? 'data' : 'typedArray';
|
248
|
+
const bufferOrDataOrTypedArray = newArrayBuffer ? 'arrayBuffer' : dataOrTypedArray;
|
249
|
+
const source = newUrl ? 'url' : bufferOrDataOrTypedArray;
|
248
250
|
if (newUrl || newArrayBuffer || newBase64Data || newTypedArray) {
|
249
251
|
this.loadPdf(source, this[source]);
|
250
252
|
}
|
@@ -429,40 +431,8 @@ export class PDFViewerComponent {
|
|
429
431
|
[dataType]: data,
|
430
432
|
dom: this.pagesContainer.nativeElement,
|
431
433
|
zoom: this.pdfContext?.zoom || this.zoom,
|
432
|
-
done:
|
433
|
-
|
434
|
-
this.ngZone.run(() => {
|
435
|
-
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
436
|
-
this.loading = false;
|
437
|
-
this.cdr.markForCheck();
|
438
|
-
});
|
439
|
-
}
|
440
|
-
else {
|
441
|
-
const zoomLevelOption = this.zoomOptionsData.find(item => item.type === this._fitType);
|
442
|
-
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
443
|
-
this.onZoomLevelChange(zoomLevelOption, false);
|
444
|
-
this.cdr.markForCheck();
|
445
|
-
}
|
446
|
-
if (this.pdfScroller) {
|
447
|
-
this.pdfScroller.destroy();
|
448
|
-
}
|
449
|
-
this.pdfScroller = this.pdfScroller = new Scroller(this.pagesContainer.nativeElement.parentNode, {
|
450
|
-
filter: '.k-page',
|
451
|
-
events: {}
|
452
|
-
});
|
453
|
-
this.pdfScroller.enablePanEventsTracking();
|
454
|
-
this.assignPageIds();
|
455
|
-
if (hasObservers(this.load)) {
|
456
|
-
this.ngZone.run(() => this.load.emit({ context: this.pdfContext }));
|
457
|
-
}
|
458
|
-
},
|
459
|
-
error: (e) => {
|
460
|
-
this.ngZone.run(() => this.loading = false);
|
461
|
-
this.pdfContext = null;
|
462
|
-
if (hasObservers(this.error)) {
|
463
|
-
this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
|
464
|
-
}
|
465
|
-
}
|
434
|
+
done: this.loadHandler,
|
435
|
+
error: this.errorHandler
|
466
436
|
});
|
467
437
|
}));
|
468
438
|
}
|
@@ -520,7 +490,7 @@ export class PDFViewerComponent {
|
|
520
490
|
}
|
521
491
|
}
|
522
492
|
isSet(changes, source) {
|
523
|
-
return this[source] ||
|
493
|
+
return this[source] || changes[source]?.currentValue;
|
524
494
|
}
|
525
495
|
scrollListener = (e) => {
|
526
496
|
const nextPage = currentPage(e.target.parentNode);
|
@@ -534,6 +504,40 @@ export class PDFViewerComponent {
|
|
534
504
|
});
|
535
505
|
}
|
536
506
|
};
|
507
|
+
loadHandler = (e) => {
|
508
|
+
if (!this._zoomToFit) {
|
509
|
+
this.ngZone.run(() => {
|
510
|
+
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
511
|
+
this.loading = false;
|
512
|
+
this.cdr.markForCheck();
|
513
|
+
});
|
514
|
+
}
|
515
|
+
else {
|
516
|
+
const zoomLevelOption = this.zoomOptionsData.find(item => item.type === this._fitType);
|
517
|
+
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
518
|
+
this.onZoomLevelChange(zoomLevelOption, false);
|
519
|
+
this.cdr.markForCheck();
|
520
|
+
}
|
521
|
+
if (this.pdfScroller) {
|
522
|
+
this.pdfScroller.destroy();
|
523
|
+
}
|
524
|
+
this.pdfScroller = this.pdfScroller = new Scroller(this.pagesContainer.nativeElement.parentNode, {
|
525
|
+
filter: '.k-page',
|
526
|
+
events: {}
|
527
|
+
});
|
528
|
+
this.pdfScroller.enablePanEventsTracking();
|
529
|
+
this.assignPageIds();
|
530
|
+
if (hasObservers(this.load)) {
|
531
|
+
this.ngZone.run(() => this.load.emit({ context: this.pdfContext }));
|
532
|
+
}
|
533
|
+
};
|
534
|
+
errorHandler = (e) => {
|
535
|
+
this.ngZone.run(() => this.loading = false);
|
536
|
+
this.pdfContext = null;
|
537
|
+
if (hasObservers(this.error)) {
|
538
|
+
this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
|
539
|
+
}
|
540
|
+
};
|
537
541
|
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
542
|
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
543
|
LocalizationService,
|
@@ -7,7 +7,7 @@ import { Directive, Input, forwardRef, Component, Injectable, HostBinding, Event
|
|
7
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
8
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
10
|
-
import { removeChildren, scrollToPage, calculateZoomLevel, SearchService, print, goToNextSearchMatch, goToPreviousSearchMatch, loadPDF,
|
10
|
+
import { removeChildren, scrollToPage, calculateZoomLevel, SearchService, print, goToNextSearchMatch, goToPreviousSearchMatch, loadPDF, reloadDocument, currentPage, Scroller } from '@progress/kendo-pdfviewer-common';
|
11
11
|
import { PreventableEvent, Keys, focusableSelector, shouldShowValidationUI, hasObservers, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
12
12
|
import { saveAs } from '@progress/kendo-file-saver';
|
13
13
|
import { Subscription } from 'rxjs';
|
@@ -227,8 +227,8 @@ const packageMetadata = {
|
|
227
227
|
name: '@progress/kendo-angular-pdfviewer',
|
228
228
|
productName: 'Kendo UI for Angular',
|
229
229
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
230
|
-
publishDate:
|
231
|
-
version: '
|
230
|
+
publishDate: 1736250087,
|
231
|
+
version: '18.0.0-develop.1',
|
232
232
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
233
233
|
};
|
234
234
|
|
@@ -1554,7 +1554,9 @@ class PDFViewerComponent {
|
|
1554
1554
|
const newArrayBuffer = changes['arrayBuffer'] && this.arrayBuffer;
|
1555
1555
|
const newTypedArray = changes['typedArray'] && this.typedArray;
|
1556
1556
|
this.verifySettings(changes);
|
1557
|
-
const
|
1557
|
+
const dataOrTypedArray = newBase64Data ? 'data' : 'typedArray';
|
1558
|
+
const bufferOrDataOrTypedArray = newArrayBuffer ? 'arrayBuffer' : dataOrTypedArray;
|
1559
|
+
const source = newUrl ? 'url' : bufferOrDataOrTypedArray;
|
1558
1560
|
if (newUrl || newArrayBuffer || newBase64Data || newTypedArray) {
|
1559
1561
|
this.loadPdf(source, this[source]);
|
1560
1562
|
}
|
@@ -1739,40 +1741,8 @@ class PDFViewerComponent {
|
|
1739
1741
|
[dataType]: data,
|
1740
1742
|
dom: this.pagesContainer.nativeElement,
|
1741
1743
|
zoom: this.pdfContext?.zoom || this.zoom,
|
1742
|
-
done:
|
1743
|
-
|
1744
|
-
this.ngZone.run(() => {
|
1745
|
-
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
1746
|
-
this.loading = false;
|
1747
|
-
this.cdr.markForCheck();
|
1748
|
-
});
|
1749
|
-
}
|
1750
|
-
else {
|
1751
|
-
const zoomLevelOption = this.zoomOptionsData.find(item => item.type === this._fitType);
|
1752
|
-
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
1753
|
-
this.onZoomLevelChange(zoomLevelOption, false);
|
1754
|
-
this.cdr.markForCheck();
|
1755
|
-
}
|
1756
|
-
if (this.pdfScroller) {
|
1757
|
-
this.pdfScroller.destroy();
|
1758
|
-
}
|
1759
|
-
this.pdfScroller = this.pdfScroller = new Scroller(this.pagesContainer.nativeElement.parentNode, {
|
1760
|
-
filter: '.k-page',
|
1761
|
-
events: {}
|
1762
|
-
});
|
1763
|
-
this.pdfScroller.enablePanEventsTracking();
|
1764
|
-
this.assignPageIds();
|
1765
|
-
if (hasObservers(this.load)) {
|
1766
|
-
this.ngZone.run(() => this.load.emit({ context: this.pdfContext }));
|
1767
|
-
}
|
1768
|
-
},
|
1769
|
-
error: (e) => {
|
1770
|
-
this.ngZone.run(() => this.loading = false);
|
1771
|
-
this.pdfContext = null;
|
1772
|
-
if (hasObservers(this.error)) {
|
1773
|
-
this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
|
1774
|
-
}
|
1775
|
-
}
|
1744
|
+
done: this.loadHandler,
|
1745
|
+
error: this.errorHandler
|
1776
1746
|
});
|
1777
1747
|
}));
|
1778
1748
|
}
|
@@ -1830,7 +1800,7 @@ class PDFViewerComponent {
|
|
1830
1800
|
}
|
1831
1801
|
}
|
1832
1802
|
isSet(changes, source) {
|
1833
|
-
return this[source] ||
|
1803
|
+
return this[source] || changes[source]?.currentValue;
|
1834
1804
|
}
|
1835
1805
|
scrollListener = (e) => {
|
1836
1806
|
const nextPage = currentPage(e.target.parentNode);
|
@@ -1844,6 +1814,40 @@ class PDFViewerComponent {
|
|
1844
1814
|
});
|
1845
1815
|
}
|
1846
1816
|
};
|
1817
|
+
loadHandler = (e) => {
|
1818
|
+
if (!this._zoomToFit) {
|
1819
|
+
this.ngZone.run(() => {
|
1820
|
+
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
1821
|
+
this.loading = false;
|
1822
|
+
this.cdr.markForCheck();
|
1823
|
+
});
|
1824
|
+
}
|
1825
|
+
else {
|
1826
|
+
const zoomLevelOption = this.zoomOptionsData.find(item => item.type === this._fitType);
|
1827
|
+
this.pdfContext = { ...e, element: this.pagesContainer.nativeElement };
|
1828
|
+
this.onZoomLevelChange(zoomLevelOption, false);
|
1829
|
+
this.cdr.markForCheck();
|
1830
|
+
}
|
1831
|
+
if (this.pdfScroller) {
|
1832
|
+
this.pdfScroller.destroy();
|
1833
|
+
}
|
1834
|
+
this.pdfScroller = this.pdfScroller = new Scroller(this.pagesContainer.nativeElement.parentNode, {
|
1835
|
+
filter: '.k-page',
|
1836
|
+
events: {}
|
1837
|
+
});
|
1838
|
+
this.pdfScroller.enablePanEventsTracking();
|
1839
|
+
this.assignPageIds();
|
1840
|
+
if (hasObservers(this.load)) {
|
1841
|
+
this.ngZone.run(() => this.load.emit({ context: this.pdfContext }));
|
1842
|
+
}
|
1843
|
+
};
|
1844
|
+
errorHandler = (e) => {
|
1845
|
+
this.ngZone.run(() => this.loading = false);
|
1846
|
+
this.pdfContext = null;
|
1847
|
+
if (hasObservers(this.error)) {
|
1848
|
+
this.ngZone.run(() => this.error.emit({ error: e, context: this.pdfContext }));
|
1849
|
+
}
|
1850
|
+
};
|
1847
1851
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFViewerComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
1848
1852
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PDFViewerComponent, isStandalone: true, selector: "kendo-pdfviewer", inputs: { tools: "tools", loaderSettings: "loaderSettings", saveFileName: "saveFileName", saveOptions: "saveOptions", url: "url", data: "data", arrayBuffer: "arrayBuffer", typedArray: "typedArray", zoom: "zoom", zoomRate: "zoomRate", minZoom: "minZoom", maxZoom: "maxZoom" }, outputs: { load: "load", error: "error", download: "download", pageChange: "pageChange", zoomLevelChange: "zoomLevelChange" }, host: { properties: { "class.k-pdf-viewer": "this.hostClass", "attr.dir": "this.direction" } }, providers: [
|
1849
1853
|
LocalizationService,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@progress/kendo-angular-pdfviewer",
|
3
|
-
"version": "
|
3
|
+
"version": "18.0.0-develop.1",
|
4
4
|
"description": "Kendo UI PDFViewer for Angular",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "Progress",
|
@@ -23,21 +23,21 @@
|
|
23
23
|
"@angular/core": "16 - 19",
|
24
24
|
"@angular/platform-browser": "16 - 19",
|
25
25
|
"@progress/kendo-licensing": "^1.0.2",
|
26
|
-
"@progress/kendo-angular-buttons": "
|
27
|
-
"@progress/kendo-angular-common": "
|
28
|
-
"@progress/kendo-angular-dropdowns": "
|
29
|
-
"@progress/kendo-angular-inputs": "
|
30
|
-
"@progress/kendo-angular-intl": "
|
31
|
-
"@progress/kendo-angular-l10n": "
|
32
|
-
"@progress/kendo-angular-icons": "
|
33
|
-
"@progress/kendo-angular-indicators": "
|
34
|
-
"@progress/kendo-angular-pager": "
|
35
|
-
"@progress/kendo-angular-popup": "
|
26
|
+
"@progress/kendo-angular-buttons": "18.0.0-develop.1",
|
27
|
+
"@progress/kendo-angular-common": "18.0.0-develop.1",
|
28
|
+
"@progress/kendo-angular-dropdowns": "18.0.0-develop.1",
|
29
|
+
"@progress/kendo-angular-inputs": "18.0.0-develop.1",
|
30
|
+
"@progress/kendo-angular-intl": "18.0.0-develop.1",
|
31
|
+
"@progress/kendo-angular-l10n": "18.0.0-develop.1",
|
32
|
+
"@progress/kendo-angular-icons": "18.0.0-develop.1",
|
33
|
+
"@progress/kendo-angular-indicators": "18.0.0-develop.1",
|
34
|
+
"@progress/kendo-angular-pager": "18.0.0-develop.1",
|
35
|
+
"@progress/kendo-angular-popup": "18.0.0-develop.1",
|
36
36
|
"rxjs": "^6.5.3 || ^7.0.0"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
39
|
"tslib": "^2.3.1",
|
40
|
-
"@progress/kendo-angular-schematics": "
|
40
|
+
"@progress/kendo-angular-schematics": "18.0.0-develop.1",
|
41
41
|
"@progress/kendo-file-saver": "^1.0.1",
|
42
42
|
"@progress/kendo-pdfviewer-common": "0.3.3"
|
43
43
|
},
|
package/pdfviewer.component.d.ts
CHANGED
@@ -234,6 +234,8 @@ export declare class PDFViewerComponent implements OnInit, AfterViewInit, OnDest
|
|
234
234
|
private verifySettings;
|
235
235
|
private isSet;
|
236
236
|
private scrollListener;
|
237
|
+
private loadHandler;
|
238
|
+
private errorHandler;
|
237
239
|
static ɵfac: i0.ɵɵFactoryDeclaration<PDFViewerComponent, never>;
|
238
240
|
static ɵcmp: i0.ɵɵComponentDeclaration<PDFViewerComponent, "kendo-pdfviewer", ["kendo-pdfviewer"], { "tools": { "alias": "tools"; "required": false; }; "loaderSettings": { "alias": "loaderSettings"; "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; }; }, { "load": "load"; "error": "error"; "download": "download"; "pageChange": "pageChange"; "zoomLevelChange": "zoomLevelChange"; }, never, never, true, never>;
|
239
241
|
}
|
@@ -4,8 +4,8 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
4
4
|
function default_1(options) {
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'PDFViewerModule', package: 'pdfviewer', peerDependencies: {
|
6
6
|
// peers of the dropdowns
|
7
|
-
'@progress/kendo-angular-navigation': '
|
8
|
-
'@progress/kendo-angular-treeview': '
|
7
|
+
'@progress/kendo-angular-navigation': '18.0.0-develop.1',
|
8
|
+
'@progress/kendo-angular-treeview': '18.0.0-develop.1'
|
9
9
|
} });
|
10
10
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
11
11
|
}
|