ng2-pdf-viewer
Advanced tools
Comparing version 9.1.5 to 10.0.0
{ | ||
"name": "ng2-pdf-viewer", | ||
"version": "9.1.5", | ||
"version": "10.0.0", | ||
"description": "Angular 5+ component for rendering PDF", | ||
@@ -27,14 +27,10 @@ "license": "MIT", | ||
"dependencies": { | ||
"pdfjs-dist": "~2.14.305", | ||
"tslib": "^2.3.1" | ||
"pdfjs-dist": "~2.16.105", | ||
"tslib": "^2.3.0" | ||
}, | ||
"peerDependencies": { | ||
"pdfjs-dist": "~2.14.305" | ||
"pdfjs-dist": "~2.16.105" | ||
}, | ||
"module": "fesm2015/ng2-pdf-viewer.mjs", | ||
"es2020": "fesm2020/ng2-pdf-viewer.mjs", | ||
"esm2020": "esm2020/ng2-pdf-viewer.mjs", | ||
"fesm2020": "fesm2020/ng2-pdf-viewer.mjs", | ||
"fesm2015": "fesm2015/ng2-pdf-viewer.mjs", | ||
"typings": "ng2-pdf-viewer.d.ts", | ||
"module": "fesm2022/ng2-pdf-viewer.mjs", | ||
"typings": "index.d.ts", | ||
"exports": { | ||
@@ -45,8 +41,6 @@ "./package.json": { | ||
".": { | ||
"types": "./ng2-pdf-viewer.d.ts", | ||
"esm2020": "./esm2020/ng2-pdf-viewer.mjs", | ||
"es2020": "./fesm2020/ng2-pdf-viewer.mjs", | ||
"es2015": "./fesm2015/ng2-pdf-viewer.mjs", | ||
"node": "./fesm2015/ng2-pdf-viewer.mjs", | ||
"default": "./fesm2020/ng2-pdf-viewer.mjs" | ||
"types": "./index.d.ts", | ||
"esm2022": "./esm2022/ng2-pdf-viewer.mjs", | ||
"esm": "./esm2022/ng2-pdf-viewer.mjs", | ||
"default": "./fesm2022/ng2-pdf-viewer.mjs" | ||
} | ||
@@ -53,0 +47,0 @@ }, |
@@ -512,3 +512,3 @@ <h1 align="center">Angular PDF Viewer</h1> | ||
By default the `worker` is loaded from `cdnjs.cloudflare.com`. | ||
By default the `worker` is loaded from `cdn.jsdelivr.net`. | ||
@@ -515,0 +515,0 @@ In your code update `path` to the worker to be for example `/pdf.worker.js` |
@@ -6,3 +6,3 @@ /** | ||
import * as PDFJSViewer from 'pdfjs-dist/web/pdf_viewer'; | ||
import type { PDFSource, PDFProgressData } from './typings'; | ||
import type { PDFSource, PDFProgressData, ZoomScale } from './typings'; | ||
import { PDFSinglePageViewer } from 'pdfjs-dist/web/pdf_viewer'; | ||
@@ -20,3 +20,3 @@ import * as i0 from "@angular/core"; | ||
static BORDER_WIDTH: number; | ||
pdfViewerContainer: any; | ||
pdfViewerContainer: ElementRef<HTMLDivElement>; | ||
eventBus: PDFJSViewer.EventBus; | ||
@@ -48,3 +48,3 @@ pdfLinkService: PDFJSViewer.PDFLinkService; | ||
private isInitialized; | ||
private loadingTask; | ||
private loadingTask?; | ||
private destroy$; | ||
@@ -58,5 +58,5 @@ afterLoadComplete: EventEmitter<import("pdfjs-dist/types/src/display/api").PDFDocumentProxy>; | ||
pageChange: EventEmitter<number>; | ||
src: string | Uint8Array | PDFSource; | ||
src?: string | Uint8Array | PDFSource; | ||
set cMapsUrl(cMapsUrl: string); | ||
set page(_page: any); | ||
set page(_page: number | string | any); | ||
set renderText(renderText: boolean); | ||
@@ -69,4 +69,4 @@ set renderTextMode(renderTextMode: RenderTextMode); | ||
get zoom(): number; | ||
set zoomScale(value: 'page-height' | 'page-fit' | 'page-width'); | ||
get zoomScale(): 'page-height' | 'page-fit' | 'page-width'; | ||
set zoomScale(value: ZoomScale); | ||
get zoomScale(): ZoomScale; | ||
set rotation(value: number); | ||
@@ -100,3 +100,3 @@ set externalLinkTarget(value: string); | ||
static ɵfac: i0.ɵɵFactoryDeclaration<PdfViewerComponent, never>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<PdfViewerComponent, "pdf-viewer", never, { "src": "src"; "cMapsUrl": "c-maps-url"; "page": "page"; "renderText": "render-text"; "renderTextMode": "render-text-mode"; "originalSize": "original-size"; "showAll": "show-all"; "stickToPage": "stick-to-page"; "zoom": "zoom"; "zoomScale": "zoom-scale"; "rotation": "rotation"; "externalLinkTarget": "external-link-target"; "autoresize": "autoresize"; "fitToPage": "fit-to-page"; "showBorders": "show-borders"; }, { "afterLoadComplete": "after-load-complete"; "pageRendered": "page-rendered"; "pageInitialized": "pages-initialized"; "textLayerRendered": "text-layer-rendered"; "onError": "error"; "onProgress": "on-progress"; "pageChange": "pageChange"; }, never, never>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<PdfViewerComponent, "pdf-viewer", never, { "src": { "alias": "src"; "required": false; }; "cMapsUrl": { "alias": "c-maps-url"; "required": false; }; "page": { "alias": "page"; "required": false; }; "renderText": { "alias": "render-text"; "required": false; }; "renderTextMode": { "alias": "render-text-mode"; "required": false; }; "originalSize": { "alias": "original-size"; "required": false; }; "showAll": { "alias": "show-all"; "required": false; }; "stickToPage": { "alias": "stick-to-page"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "zoomScale": { "alias": "zoom-scale"; "required": false; }; "rotation": { "alias": "rotation"; "required": false; }; "externalLinkTarget": { "alias": "external-link-target"; "required": false; }; "autoresize": { "alias": "autoresize"; "required": false; }; "fitToPage": { "alias": "fit-to-page"; "required": false; }; "showBorders": { "alias": "show-borders"; "required": false; }; }, { "afterLoadComplete": "after-load-complete"; "pageRendered": "page-rendered"; "pageInitialized": "pages-initialized"; "textLayerRendered": "text-layer-rendered"; "onError": "error"; "onProgress": "on-progress"; "pageChange": "pageChange"; }, never, never, false, never, false>; | ||
} |
@@ -1,6 +0,6 @@ | ||
export declare type PDFPageProxy = import('pdfjs-dist/types/src/display/api').PDFPageProxy; | ||
export declare type PDFSource = import('pdfjs-dist/types/src/display/api').DocumentInitParameters; | ||
export declare type PDFDocumentProxy = import('pdfjs-dist/types/src/display/api').PDFDocumentProxy; | ||
export declare type PDFDocumentLoadingTask = import('pdfjs-dist/types/src/display/api').PDFDocumentLoadingTask; | ||
export declare type PDFViewerOptions = import('pdfjs-dist/types/web/base_viewer').PDFViewerOptions; | ||
export type PDFPageProxy = import('pdfjs-dist/types/src/display/api').PDFPageProxy; | ||
export type PDFSource = import('pdfjs-dist/types/src/display/api').DocumentInitParameters; | ||
export type PDFDocumentProxy = import('pdfjs-dist/types/src/display/api').PDFDocumentProxy; | ||
export type PDFDocumentLoadingTask = import('pdfjs-dist/types/src/display/api').PDFDocumentLoadingTask; | ||
export type PDFViewerOptions = import('pdfjs-dist/types/web/base_viewer').PDFViewerOptions; | ||
export interface PDFProgressData { | ||
@@ -10,1 +10,2 @@ loaded: number; | ||
} | ||
export type ZoomScale = 'page-height' | 'page-fit' | 'page-width'; |
import { Subject } from 'rxjs'; | ||
interface EventBus { | ||
on(eventName: string, listener: Function): void; | ||
off(eventName: string, listener: Function): void; | ||
_listeners: any; | ||
dispatch(eventName: string, data: Object): void; | ||
_on(eventName: any, listener: any, options?: null): void; | ||
_off(eventName: any, listener: any, options?: null): void; | ||
} | ||
import type { EventBus } from 'pdfjs-dist/web/pdf_viewer'; | ||
export declare function createEventBus(pdfJsViewer: any, destroy$: Subject<void>): EventBus; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
export declare function assign(obj: Object, prop: string, value: any): void; | ||
export declare function assign(obj: any, prop: string, value: any): void; | ||
export declare function isSSR(): boolean; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
4
276482
18
1924
1
+ Addedpdfjs-dist@2.16.105(transitive)
- Removedpdfjs-dist@2.14.305(transitive)
Updatedpdfjs-dist@~2.16.105
Updatedtslib@^2.3.0