@progress/kendo-angular-pdfviewer 19.3.0-develop.37 → 19.3.0-develop.39

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,10 +7,6 @@ import { PreventableEvent } from "@progress/kendo-angular-common";
7
7
  * Represents the arguments for the PDFViewer `download` event. The event fires when the user clicks the **Download** tool. Canceling the event prevents the download.
8
8
  */
9
9
  export class PDFViewerDownloadEvent extends PreventableEvent {
10
- /**
11
- * Provides the Blob object to be saved.
12
- */
13
- blob;
14
10
  /**
15
11
  * Provides the file name for saving.
16
12
  */
@@ -26,9 +22,8 @@ export class PDFViewerDownloadEvent extends PreventableEvent {
26
22
  /**
27
23
  * @hidden
28
24
  */
29
- constructor(blob, fileName, saveOptions, context) {
25
+ constructor(fileName, saveOptions, context) {
30
26
  super();
31
- this.blob = blob;
32
27
  this.fileName = fileName;
33
28
  this.saveOptions = saveOptions;
34
29
  this.context = context;
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1754920129,
14
- version: '19.3.0-develop.37',
13
+ publishDate: 1754987021,
14
+ version: '19.3.0-develop.39',
15
15
  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',
16
16
  };
@@ -10,7 +10,6 @@ import { PdfViewer, removeChildren, PdfViewerInteractionMode, } from '@progress/
10
10
  import { EventsOutsideAngularDirective, hasObservers, shouldShowValidationUI, getLicenseMessage, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
11
11
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
12
12
  import { PDFViewerDownloadEvent } from './models/events';
13
- import { saveAs } from '@progress/kendo-file-saver';
14
13
  import { Subscription } from 'rxjs';
15
14
  import { ToolbarComponent } from './toolbar/toolbar.component';
16
15
  import { PDFViewerSearchComponent } from './toolbar/search.component';
@@ -361,18 +360,15 @@ export class PDFViewerComponent {
361
360
  * @hidden
362
361
  */
363
362
  onDownload() {
364
- this.ngZone.runOutsideAngular(() => this.pdfContext.pdfDoc.getData()
365
- .then((data) => new Blob([data], { type: 'application/pdf' }))
366
- .then((blob) => {
367
- const downloadEvent = new PDFViewerDownloadEvent(blob, this.saveFileName, this.saveOptions, this.pdfContext);
368
- this.zoneAwareEmitter('download', downloadEvent);
369
- if (!downloadEvent.isDefaultPrevented()) {
370
- saveAs(blob, this.saveFileName, this.saveOptions);
371
- }
372
- })
373
- .catch((reason) => {
374
- this.zoneAwareEmitter('error', { error: reason, context: this.pdfContext });
375
- }));
363
+ if (!this.pdfContext?.pdfDoc) {
364
+ this.zoneAwareEmitter('error', { error: 'No document to export.', context: this.pdfContext });
365
+ return;
366
+ }
367
+ const downloadEvent = new PDFViewerDownloadEvent(this.saveFileName, this.saveOptions, this.pdfContext);
368
+ this.zoneAwareEmitter('download', downloadEvent);
369
+ if (!downloadEvent.isDefaultPrevented()) {
370
+ this.ngZone.runOutsideAngular(() => this.pdfViewerWidget?.downloadFile({ fileName: this.saveFileName, saveOptions: this.saveOptions }));
371
+ }
376
372
  }
377
373
  /**
378
374
  * @hidden
@@ -9,7 +9,6 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { PdfViewerInteractionMode, removeChildren, PdfViewer } from '@progress/kendo-pdfviewer-common';
11
11
  import { PreventableEvent, Keys, normalizeNumpadKeys, focusableSelector, getLicenseMessage, shouldShowValidationUI, hasObservers, EventsOutsideAngularDirective, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
12
- import { saveAs } from '@progress/kendo-file-saver';
13
12
  import { Subscription } from 'rxjs';
14
13
  import { PagerComponent, CustomMessagesComponent } from '@progress/kendo-angular-pager';
15
14
  import { zoomInIcon, zoomOutIcon, handIcon, pointerIcon, searchIcon, folderOpenIcon, downloadIcon, printIcon, trackChangesIcon, highlightIcon, freeTextIcon, xIcon, convertLowercaseIcon, arrowUpIcon, arrowDownIcon, paletteIcon, trashIcon, checkIcon } from '@progress/kendo-svg-icons';
@@ -317,8 +316,8 @@ const packageMetadata = {
317
316
  productName: 'Kendo UI for Angular',
318
317
  productCode: 'KENDOUIANGULAR',
319
318
  productCodes: ['KENDOUIANGULAR'],
320
- publishDate: 1754920129,
321
- version: '19.3.0-develop.37',
319
+ publishDate: 1754987021,
320
+ version: '19.3.0-develop.39',
322
321
  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',
323
322
  };
324
323
 
@@ -406,10 +405,6 @@ const fontSizes = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72]
406
405
  * Represents the arguments for the PDFViewer `download` event. The event fires when the user clicks the **Download** tool. Canceling the event prevents the download.
407
406
  */
408
407
  class PDFViewerDownloadEvent extends PreventableEvent {
409
- /**
410
- * Provides the Blob object to be saved.
411
- */
412
- blob;
413
408
  /**
414
409
  * Provides the file name for saving.
415
410
  */
@@ -425,9 +420,8 @@ class PDFViewerDownloadEvent extends PreventableEvent {
425
420
  /**
426
421
  * @hidden
427
422
  */
428
- constructor(blob, fileName, saveOptions, context) {
423
+ constructor(fileName, saveOptions, context) {
429
424
  super();
430
- this.blob = blob;
431
425
  this.fileName = fileName;
432
426
  this.saveOptions = saveOptions;
433
427
  this.context = context;
@@ -2119,18 +2113,15 @@ class PDFViewerComponent {
2119
2113
  * @hidden
2120
2114
  */
2121
2115
  onDownload() {
2122
- this.ngZone.runOutsideAngular(() => this.pdfContext.pdfDoc.getData()
2123
- .then((data) => new Blob([data], { type: 'application/pdf' }))
2124
- .then((blob) => {
2125
- const downloadEvent = new PDFViewerDownloadEvent(blob, this.saveFileName, this.saveOptions, this.pdfContext);
2126
- this.zoneAwareEmitter('download', downloadEvent);
2127
- if (!downloadEvent.isDefaultPrevented()) {
2128
- saveAs(blob, this.saveFileName, this.saveOptions);
2129
- }
2130
- })
2131
- .catch((reason) => {
2132
- this.zoneAwareEmitter('error', { error: reason, context: this.pdfContext });
2133
- }));
2116
+ if (!this.pdfContext?.pdfDoc) {
2117
+ this.zoneAwareEmitter('error', { error: 'No document to export.', context: this.pdfContext });
2118
+ return;
2119
+ }
2120
+ const downloadEvent = new PDFViewerDownloadEvent(this.saveFileName, this.saveOptions, this.pdfContext);
2121
+ this.zoneAwareEmitter('download', downloadEvent);
2122
+ if (!downloadEvent.isDefaultPrevented()) {
2123
+ this.ngZone.runOutsideAngular(() => this.pdfViewerWidget?.downloadFile({ fileName: this.saveFileName, saveOptions: this.saveOptions }));
2124
+ }
2134
2125
  }
2135
2126
  /**
2136
2127
  * @hidden
@@ -31,10 +31,6 @@ export interface PDFViewerErrorEvent {
31
31
  * Represents the arguments for the PDFViewer `download` event. The event fires when the user clicks the **Download** tool. Canceling the event prevents the download.
32
32
  */
33
33
  export declare class PDFViewerDownloadEvent extends PreventableEvent {
34
- /**
35
- * Provides the Blob object to be saved.
36
- */
37
- readonly blob: Blob;
38
34
  /**
39
35
  * Provides the file name for saving.
40
36
  */
@@ -50,7 +46,7 @@ export declare class PDFViewerDownloadEvent extends PreventableEvent {
50
46
  /**
51
47
  * @hidden
52
48
  */
53
- constructor(blob: Blob, fileName: string, saveOptions: SaveOptions, context: PDFViewerContext);
49
+ constructor(fileName: string, saveOptions: SaveOptions, context: PDFViewerContext);
54
50
  }
55
51
  /**
56
52
  * Represents the data object of the `PDFViewerPageChangeEvent`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-pdfviewer",
3
- "version": "19.3.0-develop.37",
3
+ "version": "19.3.0-develop.39",
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": 1754920129,
22
+ "publishDate": 1754987021,
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,22 @@
29
29
  "@angular/core": "16 - 20",
30
30
  "@angular/platform-browser": "16 - 20",
31
31
  "@progress/kendo-licensing": "^1.7.0",
32
- "@progress/kendo-angular-buttons": "19.3.0-develop.37",
33
- "@progress/kendo-angular-common": "19.3.0-develop.37",
34
- "@progress/kendo-angular-dialog": "19.3.0-develop.37",
35
- "@progress/kendo-angular-dropdowns": "19.3.0-develop.37",
36
- "@progress/kendo-angular-inputs": "19.3.0-develop.37",
37
- "@progress/kendo-angular-intl": "19.3.0-develop.37",
38
- "@progress/kendo-angular-l10n": "19.3.0-develop.37",
39
- "@progress/kendo-angular-icons": "19.3.0-develop.37",
40
- "@progress/kendo-angular-indicators": "19.3.0-develop.37",
41
- "@progress/kendo-angular-pager": "19.3.0-develop.37",
42
- "@progress/kendo-angular-popup": "19.3.0-develop.37",
32
+ "@progress/kendo-angular-buttons": "19.3.0-develop.39",
33
+ "@progress/kendo-angular-common": "19.3.0-develop.39",
34
+ "@progress/kendo-angular-dialog": "19.3.0-develop.39",
35
+ "@progress/kendo-angular-dropdowns": "19.3.0-develop.39",
36
+ "@progress/kendo-angular-inputs": "19.3.0-develop.39",
37
+ "@progress/kendo-angular-intl": "19.3.0-develop.39",
38
+ "@progress/kendo-angular-l10n": "19.3.0-develop.39",
39
+ "@progress/kendo-angular-icons": "19.3.0-develop.39",
40
+ "@progress/kendo-angular-indicators": "19.3.0-develop.39",
41
+ "@progress/kendo-angular-pager": "19.3.0-develop.39",
42
+ "@progress/kendo-angular-popup": "19.3.0-develop.39",
43
43
  "rxjs": "^6.5.3 || ^7.0.0"
44
44
  },
45
45
  "dependencies": {
46
46
  "tslib": "^2.3.1",
47
- "@progress/kendo-angular-schematics": "19.3.0-develop.37",
47
+ "@progress/kendo-angular-schematics": "19.3.0-develop.39",
48
48
  "@progress/kendo-file-saver": "^1.0.1",
49
49
  "@progress/kendo-pdfviewer-common": "0.5.0"
50
50
  },
@@ -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': '19.3.0-develop.37',
8
- '@progress/kendo-angular-treeview': '19.3.0-develop.37'
7
+ '@progress/kendo-angular-navigation': '19.3.0-develop.39',
8
+ '@progress/kendo-angular-treeview': '19.3.0-develop.39'
9
9
  } });
10
10
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
11
11
  }