@eui/mobile-core 17.2.0-snapshot-1716538151901 → 17.2.0-snapshot-1716885030476

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.
@@ -1,9 +1,12 @@
1
+ import { SimpleChanges, OnChanges, OnDestroy, OnInit } from '@angular/core';
1
2
  import { PDFDocumentProxy } from 'ng2-pdf-viewer';
2
3
  import { AlertController } from '@ionic/angular';
3
4
  import { PinchZoomComponent, ZoomEvent } from '@mapaxe/ngx-pinch-zoom';
5
+ import { HttpClient } from '@angular/common/http';
4
6
  import * as i0 from "@angular/core";
5
- export declare class EuimPdfViewerComponent {
7
+ export declare class EuimPdfViewerComponent implements OnInit, OnChanges, OnDestroy {
6
8
  private alertService;
9
+ private http;
7
10
  url: string;
8
11
  page: number;
9
12
  pinch: PinchZoomComponent;
@@ -12,8 +15,15 @@ export declare class EuimPdfViewerComponent {
12
15
  errorMessage: string;
13
16
  pdf: PDFDocumentProxy;
14
17
  eventResult?: ZoomEvent;
18
+ protected pdfNumPages: number;
19
+ protected data: Uint8Array;
15
20
  private showDefaultError;
16
- constructor(alertService: AlertController);
21
+ private urlChange$;
22
+ private subscription;
23
+ constructor(alertService: AlertController, http: HttpClient);
24
+ ngOnInit(): void;
25
+ ngOnChanges(changes: SimpleChanges): void;
26
+ ngOnDestroy(): void;
17
27
  zoomChange(event: ZoomEvent): void;
18
28
  onLoaded(pdf: PDFDocumentProxy): void;
19
29
  onError(): void;
@@ -23,7 +33,20 @@ export declare class EuimPdfViewerComponent {
23
33
  onResetZoom(): void;
24
34
  nextPage(): void;
25
35
  prevPage(): void;
26
- private openLink;
36
+ /**
37
+ * Download file from the given data and filename using Blob.
38
+ * It generates an anchor link and clicks on it to download the file.
39
+ * @param data
40
+ * @param filename
41
+ * @private
42
+ */
43
+ private downloadFile;
44
+ /**
45
+ * Fetch PDF data from the given URL and return as Uint8Array.
46
+ * @param url
47
+ * @private
48
+ */
49
+ private getPDFData;
27
50
  static ɵfac: i0.ɵɵFactoryDeclaration<EuimPdfViewerComponent, never>;
28
51
  static ɵcmp: i0.ɵɵComponentDeclaration<EuimPdfViewerComponent, "euim-pdf-viewer", never, { "url": { "alias": "url"; "required": false; }; "page": { "alias": "page"; "required": false; }; }, {}, never, never, false, never>;
29
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"euim-pdf-viewer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/euim-pdf-viewer/euim-pdf-viewer.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;;AAEvE,qBAMa,sBAAsB;IAcnB,OAAO,CAAC,YAAY;IAbvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,SAAM;IAEmB,KAAK,EAAG,kBAAkB,CAAC;IAEjE,IAAI,SAAK;IACT,OAAO,UAAQ;IACf,YAAY,SAAM;IAClB,GAAG,EAAE,gBAAgB,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,OAAO,CAAC,gBAAgB,CAAU;gBAEd,YAAY,EAAE,eAAe;IAWjD,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAKlC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI;IAMrC,OAAO,IAAI,IAAI;IAMf,UAAU,IAAI,IAAI;IAelB,QAAQ,IAAI,IAAI;IAIhB,SAAS,IAAI,IAAI;IAMjB,WAAW,IAAI,IAAI;IAQnB,QAAQ,IAAI,IAAI;IAMhB,QAAQ,IAAG,IAAI;IAMf,OAAO,CAAC,QAAQ;yCAvFP,sBAAsB;2CAAtB,sBAAsB;CAkGlC"}
1
+ {"version":3,"file":"euim-pdf-viewer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/euim-pdf-viewer/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IAMhB,QAAQ,IAAG,IAAI;IAMf;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAcpB;;;;OAIG;IACH,OAAO,CAAC,UAAU;yCAtIT,sBAAsB;2CAAtB,sBAAsB;CAiJlC"}
@@ -6,9 +6,10 @@ import * as i4 from "ng2-pdf-viewer";
6
6
  import * as i5 from "@mapaxe/ngx-pinch-zoom";
7
7
  import * as i6 from "../euim-spinner/euim-spinner.module";
8
8
  import * as i7 from "@ngx-translate/core";
9
+ import * as i8 from "@angular/common/http";
9
10
  export declare class EuimPdfViewerModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<EuimPdfViewerModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<EuimPdfViewerModule, [typeof i1.EuimPdfViewerComponent], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.PdfViewerModule, typeof i5.PinchZoomModule, typeof i6.EuimSpinnerComponentModule, typeof i7.TranslateModule], [typeof i1.EuimPdfViewerComponent]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EuimPdfViewerModule, [typeof i1.EuimPdfViewerComponent], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.PdfViewerModule, typeof i5.PinchZoomModule, typeof i6.EuimSpinnerComponentModule, typeof i7.TranslateModule, typeof i8.HttpClientModule], [typeof i1.EuimPdfViewerComponent]>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<EuimPdfViewerModule>;
13
14
  }
14
15
  //# sourceMappingURL=euim-pdf-viewer.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"euim-pdf-viewer.module.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/euim-pdf-viewer/euim-pdf-viewer.module.ts"],"names":[],"mappings":";;;;;;;;AAaA,qBAiBa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAC/B"}
1
+ {"version":3,"file":"euim-pdf-viewer.module.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/euim-pdf-viewer/euim-pdf-viewer.module.ts"],"names":[],"mappings":";;;;;;;;;AAcA,qBAkBa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAC/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/mobile-core",
3
- "version": "17.2.0-snapshot-1716538151901",
3
+ "version": "17.2.0-snapshot-1716885030476",
4
4
  "tag": "snapshot",
5
5
  "license": "EUPL-1.1",
6
6
  "dependencies": {