@webilix/ngx-helper-m3 0.0.33 → 0.0.35

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/index.d.ts CHANGED
@@ -599,6 +599,13 @@ declare class NgxHelperHttpService {
599
599
  download(path: string, title: string, config: Partial<INgxHelperHttpDownloadConfig>): void;
600
600
  upload<R, E>(file: File, url: string, onSuccess: (response: R | undefined, status: HttpStatusCode) => void, onError: (error: E | undefined, status: HttpStatusCode) => void): void;
601
601
  upload<R, E>(file: File, url: string, config: Partial<INgxHelperHttpUploadConfig>, onSuccess: (response: R, status: HttpStatusCode) => void, onError: (error: E, status: HttpStatusCode) => void): void;
602
+ getPDF: (data: string | ArrayBuffer | Blob, config?: Partial<INgxHelperHttpDownloadConfig>) => Promise<Blob>;
603
+ showPDF(url: string): void;
604
+ showPDF(url: string, config: Partial<INgxHelperHttpDownloadConfig>): void;
605
+ showPDF(buffer: ArrayBuffer): void;
606
+ showPDF(buffer: ArrayBuffer, config: Partial<INgxHelperHttpDownloadConfig>): void;
607
+ showPDF(blob: Blob): void;
608
+ showPDF(blob: Blob, config: Partial<INgxHelperHttpDownloadConfig>): void;
602
609
  printPDF(url: string): void;
603
610
  printPDF(url: string, config: Partial<INgxHelperHttpDownloadConfig>): void;
604
611
  printPDF(buffer: ArrayBuffer): void;
package/ngx-helper-m3.css CHANGED
@@ -375,7 +375,7 @@
375
375
  }
376
376
  }
377
377
 
378
- /* NGX HELPER HTTP (UPLOAD / DOWNLOAD) */
378
+ /* NGX HELPER HTTP (UPLOAD / DOWNLOAD / PDF) */
379
379
  .ngx-helper-m3-http {
380
380
  position: fixed;
381
381
  left: 1rem;
@@ -445,6 +445,58 @@
445
445
  }
446
446
  }
447
447
 
448
+ .ngx-helper-m3-pdf {
449
+ display: flex;
450
+ align-items: center;
451
+ justify-content: center;
452
+
453
+ position: fixed;
454
+ top: 0;
455
+ right: 0;
456
+ bottom: 0;
457
+ left: 0;
458
+
459
+ z-index: 1000;
460
+
461
+ .background {
462
+ position: fixed;
463
+ top: 0;
464
+ right: 0;
465
+ bottom: 0;
466
+ left: 0;
467
+
468
+ background-color: var(--background);
469
+ opacity: 0.9;
470
+ }
471
+
472
+ .close {
473
+ position: fixed;
474
+ top: 1rem;
475
+ left: 1rem;
476
+
477
+ background-color: var(--outline-variant);
478
+ display: flex;
479
+ align-items: center;
480
+ justify-content: center;
481
+ z-index: 2;
482
+ border-radius: 0;
483
+
484
+ mat-icon {
485
+ display: flex;
486
+ align-items: center;
487
+ justify-content: center;
488
+ font-size: 125%;
489
+ }
490
+ }
491
+
492
+ pdf-viewer {
493
+ position: relative;
494
+ display: block;
495
+ width: calc(100% - 2rem);
496
+ height: calc(100% - 2rem);
497
+ }
498
+ }
499
+
448
500
  /* NGX HELPER IMAGE */
449
501
  .ngx-helper-m3-image {
450
502
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webilix/ngx-helper-m3",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "author": "Ali Amirnezhad",
5
5
  "description": "Helper library for Angular and Material 3",
6
6
  "repository": {
@@ -25,6 +25,7 @@
25
25
  "@angular/material": ">=20.0.1",
26
26
  "@webilix/helper-library": ">=6.1.5",
27
27
  "@webilix/jalali-date-time": ">=2.0.7",
28
+ "ng2-pdf-viewer": ">=10.4.0",
28
29
  "ngx-mask": ">=19.0.6",
29
30
  "ol": ">=10.5.0"
30
31
  },