Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-printer

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-printer - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

20

bundles/ngx-printer.umd.js

@@ -376,2 +376,8 @@ (function (global, factory) {

/**
* Main print function
* @param printContent
*/
/**
* Main print function
* @private
* @param {?} printContent

@@ -382,2 +388,4 @@ * @param {?} printOpenWindow

NgxPrinterService.prototype.print = /**
* Main print function
* @private
* @param {?} printContent

@@ -389,3 +397,5 @@ * @param {?} printOpenWindow

if (printOpenWindow) {
this.printInNewWindow(printContent);
/** @type {?} */
var printContentClone = printContent.cloneNode(true);
this.printInNewWindow(printContentClone);
}

@@ -458,3 +468,5 @@ else {

printWindow.focus(); // necessary for IE >= 10*/
printWindow.print();
if (printWindow.document.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');

@@ -483,3 +495,5 @@ printWindow.close();

_this.printWindowOpen.next(true);
window.print();
if (document.execCommand('print') === false) {
window.print();
}
document.body.removeChild(_this.openNgxPrinter);

@@ -486,0 +500,0 @@ _this.printWindowOpen.next(false);

2

bundles/ngx-printer.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-printer",["exports","rxjs","@angular/core"],t):t(e["ngx-printer"]={},e.rxjs,e.ng.core)}(this,function(e,i,n){"use strict";var o=(Object.defineProperty(t.prototype,"renderClass",{get:function(){return this._renderClass},set:function(e){this._renderClass=e,this.setCustomClass()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imgSrc",{get:function(){return this._imgSrc},set:function(e){this._imgSrc=e,this.addImage(this._imgSrc)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.setCustomClass=function(){var e=this.elementRef.nativeElement;this.renderer.removeClass(e,"default"),this.renderer.addClass(e,this._renderClass)},t.prototype.addImage=function(e){var t=this,n=this.elementRef.nativeElement,i=this.renderer.createElement("img");this.renderer.setAttribute(i,"src",e),this.renderer.listen(i,"load",function(e){console.log("loading completed",e),t.completed.emit(!0)}),this.renderer.appendChild(n,i)},t.decorators=[{type:n.Component,args:[{selector:"ngx-printer",template:"\n <ng-content></ng-content>\n ",styles:[":host.default{background-color:#fff;height:100%;width:100%;position:fixed;top:0;left:0;margin:0;z-index:1000000}"]}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2}]},t.propDecorators={completed:[{type:n.Output}]},t);function t(e,t){this.elementRef=e,this.renderer=t,this._renderClass="default",this._imgSrc="default",this.completed=new n.EventEmitter}function r(){this.printOpenWindow=!0,this.timeToWaitRender=200}var s=(p.prototype.setRootConfigOptions=function(e){e&&(e.printOpenWindow&&(this.printOpenWindow=e.printOpenWindow),e.timeToWaitRender&&(this.timeToWaitRender=e.timeToWaitRender),e.renderClass&&(this.renderClass=e.renderClass))},p.prototype.printDiv=function(e){var t=document.getElementById(e);t?this.print(t,this.printOpenWindow):console.log("div with id ${divID} not found..")},p.prototype.printByClassName=function(e){var t=document.getElementsByClassName(e);t&&0<t.length?this.print(t[0],this.printOpenWindow):console.log("element with id ${className} not found..")},p.prototype.printAngular=function(e){var t=this.createComponent(e);this.print(t.nativeElement,this.printOpenWindow)},p.prototype.printImg=function(e){var t=this,n=this.createComponent(null,e),i=this.printOpenWindow;n.instance.completed.subscribe(function(e){n.hostView.detectChanges(),console.log("completed:",e),t.print(n.location.nativeElement,i)})},p.prototype.printHTMLElement=function(e){this.print(e,this.printOpenWindow)},p.prototype.createComponent=function(e,t){var n,i=this.resolver.resolveComponentFactory(o);if(e){var r=this.resolveNgContent(e);n=i.create(this.injector,r)}else n=i.create(this.injector);return n.instance.renderClass=this.renderClass,t?(n.instance.imgSrc=t,n):(n.hostView.detectChanges(),n.location)},p.prototype.print=function(e,t){if(t)this.printInNewWindow(e);else{var n=e.cloneNode(!0),i=this.createComponent(n).nativeElement;this.openNgxPrinter=i,document.body.appendChild(this.openNgxPrinter),this.printCurrentWindow()}},p.prototype.printInNewWindow=function(e){var t=this,n=window.open("","PRINT"),i=document.title;n.document.write("<HTML><HEAD><TITLE>"+i+"</TITLE></HEAD><BODY></BODY></HTML>");var r=n.document;r.body.style.margin="0 0",r.body.appendChild(e),n.document.close(),setTimeout(function(){return t.printWindow(n,r)},this.timeToWaitRender)},p.prototype.printWindow=function(e,t){var n=this;this.printWindowOpen.next(!0),t.close(),e.focus(),e.print(),console.log("close print window"),e.close(),setTimeout(function(){e.close(),n.printWindowOpen.next(!1)},20)},p.prototype.printCurrentWindow=function(){var e=this;setTimeout(function(){e.printWindowOpen.next(!0),window.print(),document.body.removeChild(e.openNgxPrinter),e.printWindowOpen.next(!1)},this.timeToWaitRender)},p.prototype.resolveNgContent=function(e){if("string"==typeof e)return[[document.createTextNode(e)]];if(e instanceof n.TemplateRef)return[e.createEmbeddedView(null).rootNodes];if(e instanceof HTMLElement)return[[e]];var t=this.resolver.resolveComponentFactory(e).create(this.injector);return t.changeDetectorRef.detectChanges(),[[t.location.nativeElement]]},p.prototype.addPrintItem=function(e){var t=this._printItems.getValue();t.push(e),this._printItems.next(t)},p.prototype.removePrintItem=function(t){var e=this._printItems.getValue().filter(function(e){return e.id!==t});this._printItems.next(e)},p.prototype.printPrintItem=function(e){this.printHTMLElement(e.nativeElement)},p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[{type:r,decorators:[{type:n.Optional}]},{type:n.ComponentFactoryResolver},{type:n.Injector}]},p.ngInjectableDef=n.defineInjectable({factory:function(){return new p(n.inject(r,8),n.inject(n.ComponentFactoryResolver),n.inject(n.INJECTOR))},token:p,providedIn:"root"}),p);function p(e,t,n){this.resolver=t,this.injector=n,this.printWindowOpen=new i.BehaviorSubject(!1),this._printItems=new i.BehaviorSubject([]),this.$printItems=this._printItems.asObservable(),this.timeToWaitRender=200,this.renderClass="default",this.printOpenWindow=!0,this.$printWindowOpen=this.printWindowOpen.asObservable(),this.setRootConfigOptions(e)}var a=function m(){},c=(d.prototype.ngOnInit=function(){if(this.el.nativeElement.id){var e=new a;e.id=this.el.nativeElement.id,e.nativeElement=this.el.nativeElement,this.printerService.addPrintItem(e)}},d.prototype.ngOnDestroy=function(){this.el.nativeElement.id&&this.printerService.removePrintItem(this.el.nativeElement.id)},d.decorators=[{type:n.Directive,args:[{selector:"[ngxPrintItem]"}]}],d.ctorParameters=function(){return[{type:n.ElementRef},{type:s}]},d.propDecorators={printName:[{type:n.Input}]},d);function d(e,t){this.el=e,this.printerService=t}var l=(u.forRoot=function(e){return{ngModule:u,providers:[{provide:r,useValue:e}]}},u.decorators=[{type:n.NgModule,args:[{declarations:[o,c],imports:[],exports:[o,c],entryComponents:[o]}]}],u);function u(){}e.NgxPrinterService=s,e.NgxPrinterComponent=o,e.NgxPrinterModule=l,e.PrintItem=a,e.PrintItemDirective=c,e.PrintServiceConfig=r,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-printer",["exports","rxjs","@angular/core"],t):t(e["ngx-printer"]={},e.rxjs,e.ng.core)}(this,function(e,i,n){"use strict";var o=(Object.defineProperty(t.prototype,"renderClass",{get:function(){return this._renderClass},set:function(e){this._renderClass=e,this.setCustomClass()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imgSrc",{get:function(){return this._imgSrc},set:function(e){this._imgSrc=e,this.addImage(this._imgSrc)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.setCustomClass=function(){var e=this.elementRef.nativeElement;this.renderer.removeClass(e,"default"),this.renderer.addClass(e,this._renderClass)},t.prototype.addImage=function(e){var t=this,n=this.elementRef.nativeElement,i=this.renderer.createElement("img");this.renderer.setAttribute(i,"src",e),this.renderer.listen(i,"load",function(e){console.log("loading completed",e),t.completed.emit(!0)}),this.renderer.appendChild(n,i)},t.decorators=[{type:n.Component,args:[{selector:"ngx-printer",template:"\n <ng-content></ng-content>\n ",styles:[":host.default{background-color:#fff;height:100%;width:100%;position:fixed;top:0;left:0;margin:0;z-index:1000000}"]}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.Renderer2}]},t.propDecorators={completed:[{type:n.Output}]},t);function t(e,t){this.elementRef=e,this.renderer=t,this._renderClass="default",this._imgSrc="default",this.completed=new n.EventEmitter}function r(){this.printOpenWindow=!0,this.timeToWaitRender=200}var s=(p.prototype.setRootConfigOptions=function(e){e&&(e.printOpenWindow&&(this.printOpenWindow=e.printOpenWindow),e.timeToWaitRender&&(this.timeToWaitRender=e.timeToWaitRender),e.renderClass&&(this.renderClass=e.renderClass))},p.prototype.printDiv=function(e){var t=document.getElementById(e);t?this.print(t,this.printOpenWindow):console.log("div with id ${divID} not found..")},p.prototype.printByClassName=function(e){var t=document.getElementsByClassName(e);t&&0<t.length?this.print(t[0],this.printOpenWindow):console.log("element with id ${className} not found..")},p.prototype.printAngular=function(e){var t=this.createComponent(e);this.print(t.nativeElement,this.printOpenWindow)},p.prototype.printImg=function(e){var t=this,n=this.createComponent(null,e),i=this.printOpenWindow;n.instance.completed.subscribe(function(e){n.hostView.detectChanges(),console.log("completed:",e),t.print(n.location.nativeElement,i)})},p.prototype.printHTMLElement=function(e){this.print(e,this.printOpenWindow)},p.prototype.createComponent=function(e,t){var n,i=this.resolver.resolveComponentFactory(o);if(e){var r=this.resolveNgContent(e);n=i.create(this.injector,r)}else n=i.create(this.injector);return n.instance.renderClass=this.renderClass,t?(n.instance.imgSrc=t,n):(n.hostView.detectChanges(),n.location)},p.prototype.print=function(e,t){if(t){var n=e.cloneNode(!0);this.printInNewWindow(n)}else{n=e.cloneNode(!0);var i=this.createComponent(n).nativeElement;this.openNgxPrinter=i,document.body.appendChild(this.openNgxPrinter),this.printCurrentWindow()}},p.prototype.printInNewWindow=function(e){var t=this,n=window.open("","PRINT"),i=document.title;n.document.write("<HTML><HEAD><TITLE>"+i+"</TITLE></HEAD><BODY></BODY></HTML>");var r=n.document;r.body.style.margin="0 0",r.body.appendChild(e),n.document.close(),setTimeout(function(){return t.printWindow(n,r)},this.timeToWaitRender)},p.prototype.printWindow=function(e,t){var n=this;this.printWindowOpen.next(!0),t.close(),e.focus(),!1===e.document.execCommand("print")&&e.print(),console.log("close print window"),e.close(),setTimeout(function(){e.close(),n.printWindowOpen.next(!1)},20)},p.prototype.printCurrentWindow=function(){var e=this;setTimeout(function(){e.printWindowOpen.next(!0),!1===document.execCommand("print")&&window.print(),document.body.removeChild(e.openNgxPrinter),e.printWindowOpen.next(!1)},this.timeToWaitRender)},p.prototype.resolveNgContent=function(e){if("string"==typeof e)return[[document.createTextNode(e)]];if(e instanceof n.TemplateRef)return[e.createEmbeddedView(null).rootNodes];if(e instanceof HTMLElement)return[[e]];var t=this.resolver.resolveComponentFactory(e).create(this.injector);return t.changeDetectorRef.detectChanges(),[[t.location.nativeElement]]},p.prototype.addPrintItem=function(e){var t=this._printItems.getValue();t.push(e),this._printItems.next(t)},p.prototype.removePrintItem=function(t){var e=this._printItems.getValue().filter(function(e){return e.id!==t});this._printItems.next(e)},p.prototype.printPrintItem=function(e){this.printHTMLElement(e.nativeElement)},p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[{type:r,decorators:[{type:n.Optional}]},{type:n.ComponentFactoryResolver},{type:n.Injector}]},p.ngInjectableDef=n.defineInjectable({factory:function(){return new p(n.inject(r,8),n.inject(n.ComponentFactoryResolver),n.inject(n.INJECTOR))},token:p,providedIn:"root"}),p);function p(e,t,n){this.resolver=t,this.injector=n,this.printWindowOpen=new i.BehaviorSubject(!1),this._printItems=new i.BehaviorSubject([]),this.$printItems=this._printItems.asObservable(),this.timeToWaitRender=200,this.renderClass="default",this.printOpenWindow=!0,this.$printWindowOpen=this.printWindowOpen.asObservable(),this.setRootConfigOptions(e)}var c=function u(){},a=(d.prototype.ngOnInit=function(){if(this.el.nativeElement.id){var e=new c;e.id=this.el.nativeElement.id,e.nativeElement=this.el.nativeElement,this.printerService.addPrintItem(e)}},d.prototype.ngOnDestroy=function(){this.el.nativeElement.id&&this.printerService.removePrintItem(this.el.nativeElement.id)},d.decorators=[{type:n.Directive,args:[{selector:"[ngxPrintItem]"}]}],d.ctorParameters=function(){return[{type:n.ElementRef},{type:s}]},d.propDecorators={printName:[{type:n.Input}]},d);function d(e,t){this.el=e,this.printerService=t}var l=(m.forRoot=function(e){return{ngModule:m,providers:[{provide:r,useValue:e}]}},m.decorators=[{type:n.NgModule,args:[{declarations:[o,a],imports:[],exports:[o,a],entryComponents:[o]}]}],m);function m(){}e.NgxPrinterService=s,e.NgxPrinterComponent=o,e.NgxPrinterModule=l,e.PrintItem=c,e.PrintItemDirective=a,e.PrintServiceConfig=r,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-printer.umd.min.js.map

@@ -163,2 +163,4 @@ /**

/**
* Main print function
* @private
* @param {?} printContent

@@ -170,3 +172,5 @@ * @param {?} printOpenWindow

if (printOpenWindow) {
this.printInNewWindow(printContent);
/** @type {?} */
const printContentClone = printContent.cloneNode(true);
this.printInNewWindow(printContentClone);
}

@@ -218,3 +222,5 @@ else {

printWindow.focus(); // necessary for IE >= 10*/
printWindow.print();
if (printWindow.document.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');

@@ -237,3 +243,5 @@ printWindow.close();

this.printWindowOpen.next(true);
window.print();
if (document.execCommand('print') === false) {
window.print();
}
document.body.removeChild(this.openNgxPrinter);

@@ -359,9 +367,3 @@ this.printWindowOpen.next(false);

/**
* Main print function
* \@param printContent
* @type {?}
*/
NgxPrinterService.prototype.private;
/**
* @type {?}
* @private

@@ -376,2 +378,2 @@ */

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXI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KTtcclxuICAgIHJldHVybiBjb21wb25lbnRSZWYubG9jYXRpb247IC8vIGxvY2F0aW9uIGlzIG5hdGl2ZSBlbGVtZW50XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBNYWluIHByaW50IGZ1bmN0aW9uXHJcbiAgICogQHBhcmFtIHByaW50Q29udGVudCBcclxuICAgKi9cclxuICBwcml2YXRlIFxyXG4gIHByaW50KHByaW50Q29udGVudDogYW55LCBwcmludE9wZW5XaW5kb3c6IGJvb2xlYW4pIHtcclxuICAgIGlmIChwcmludE9wZW5XaW5kb3cpIHtcclxuICAgICAgdGhpcy5wcmludEluTmV3V2luZG93KHByaW50Q29udGVudCk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBjb25zdCBwcmludENvbnRlbnRDbG9uZSA9IHByaW50Q29udGVudC5jbG9uZU5vZGUodHJ1ZSk7XHJcbiAgICAgIGNvbnN0IG5hdGl2ZUVsID0gdGhpcy5jcmVhdGVDb21wb25lbnQocHJpbnRDb250ZW50Q2xvbmUpLm5hdGl2ZUVsZW1lbnQ7XHJcbiAgICAgIHRoaXMub3Blbk5neFByaW50ZXIgPSBuYXRpdmVFbDtcclxuICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZCh0aGlzLm9wZW5OZ3hQcmludGVyKTtcclxuICAgICAgdGhpcy5wcmludEN1cnJlbnRXaW5kb3coKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIFByaW50IHVzaW5nIGEgbmV3IHdpbmRvdyAvIHRhYlxyXG4gICAqIEBwYXJhbSBkaXZUb1ByaW50XHJcbiAgICovXHJcbiAgcHJpdmF0ZSBwcmludEluTmV3V2luZG93KGRpdlRvUHJpbnQ6IEhUTUxFbGVtZW50KSB7XHJcbiAgICBjb25zdCBwcmludFdpbmRvdyA9IHdpbmRvdy5vcGVuKCcnLCAnUFJJTlQnKTtcclxuICAgIGxldCB0aXRsZSA9IGRvY3VtZW50LnRpdGxlO1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ENvbXBvbmVudEZhY3RvcnlSZXNvbHZlcixcclxuICAgIHByaXZhdGUgaW5qZWN0b3I6IEluamVjdG9yXHJcbiAgKSB7XHJcbiAgICB0aGlzLnNldFJvb3RDb25maWdPcHRpb25zKGNvbmZpZyk7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBTZXQgY29uZmlnIGZyb20gZm9yUm9vdFxyXG4gICAqIEBwYXJhbSBjb25maWcgXHJcbiAgICovXHJcbiAgcHJpdmF0ZSBzZXRSb290Q29uZmlnT3B0aW9ucyhjb25maWc6IFByaW50U2VydmljZUNvbmZpZykge1xyXG4gICAgaWYgKGNvbmZpZykge1xyXG4gICAgICBpZiAoY29uZmlnLnByaW50T3BlbldpbmRvdykge1xyXG4gICAgICAgIHRoaXMucHJpbnRPcGVuV2luZG93ID0gY29uZmlnLnByaW50T3BlbldpbmRvdztcclxuICAgICAgfVxyXG4gICAgICBpZiAoY29uZmlnLnRpbWVUb1dhaXRSZW5kZXIpIHtcclxuICAgICAgICB0aGlzLnRpbWVUb1dhaXRSZW5kZXIgPSBjb25maWcudGltZVRvV2FpdFJlbmRlcjtcclxuICAgICAgfVxyXG4gICAgICBpZiAoY29uZmlnLnJlbmRlckNsYXNzKSB7XHJcbiAgICAgICAgdGhpcy5yZW5kZXJDbGFzcyA9IGNvbmZpZy5yZW5kZXJDbGFzcztcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLyoqKlxyXG4gICAqIFByaW50IGEgZGl2IGlkZW50aWZpZWQgYnkgaXRzIGlkXHJcbiAgICovXHJcbiAgcHVibGljIHByaW50RGl2KGRpdklEOiBzdHJpbmcpIHtcclxuICAgIGNvbnN0IGRpdlRvUHJpbnQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChkaXZJRCk7XHJcblxyXG4gICAgaWYgKGRpdlRvUHJpbnQpIHtcclxuICAgICAgdGhpcy5wcmludChkaXZUb1ByaW50LCB0aGlzLnByaW50T3BlbldpbmRvd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iAgcHJpdmF0ZSBwcmludChwcmludENvbnRlbnQ6IGFueSwgcHJpbnRPcGVuV2luZG93OiBib29sZWFuKSB7XHJcbiAgICBpZiAocHJpbnRPcGVuV2luZG93KSB7XHJcbiAgICAgIGNvbnN0IHByaW50Q29udGVudENsb25lID0gcHJpbnRDb250ZW50LmNsb25lTm9kZSh0cnVlKTtcclxuICAgICAgdGhpcy5wcmludEluTmV3V2luZG93KHByaW50Q29udGVudENsb25lKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIGNvbnN0IHByaW50Q29udGVudENsb25lID0gcHJpbnRDb250ZW50LmNsb25lTm9kZSh0cnVlKTtcclxuICAgICAgY29uc3QgbmF0aXZlRWwgPSB0aGlzLmNyZWF0ZUNvbXBvbmVudChwcmludENvbnRlbnRDbG9uZSkubmF0aXZlRWxlbWVudDtcclxuICAgICAgdGhpcy5vcGVuTmd4UHJpbnRlciA9IG5hdGl2ZUVsO1xyXG4gICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHRoaXMub3Blbk5neFByaW50ZXIpO1xyXG4gICAgICB0aGlzLnByaW50Q3VycmVudFdpbmRvdygpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICogUHJpbnQgdXNpbmcgYSBuZXcgd2luZG93IC8gdGFiXHJcbiAgICogQHBhcmFtIGRpdlRvUHJpbnRcclxuICAgKi9cclxuICBwcml2YXRlIHByaW50SW5OZXdXaW5kb3coZGl2VG9QcmludDogSFRNTEVsZW1lbnQpIHtcclxuICAgIGNvbnN0IHByaW50V2luZG93ID0gd2luZG93Lm9wZW4oJycsICdQUklOVCcpO1xyXG4gICAgbGV0IHRpdGxlID0gZG9jdW1lbnQudGl0bGU7XHJcblxyXG4gICAgcHJpbnRXaW5kb3cuZG9jdW1lbnQud3JpdGUoJzxIVE1MPjxIRUFEPjxUSVRMRT4nICsgdGl0bGUgKyAnPC9USVRMRT48L0hFQUQ+PEJPRFk+PC9CT0RZPjw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Ki9cclxuICBwdWJsaWMgcmVtb3ZlUHJpbnRJdGVtKGlkT2ZJdGVtVG9SZW1vdmU6IHN0cmluZyk6IHZvaWQge1xyXG4gICAgY29uc3QgdG1wSXRlbXMgPSB0aGlzLl9wcmludEl0ZW1zLmdldFZhbHVlKCk7XHJcbiAgICBjb25zdCBuZXdJaXRlbXMgPSB0bXBJdGVtcy5maWx0ZXIoaXRlbSA9PiBpdGVtLmlkICE9PSBpZE9mSXRlbVRvUmVtb3ZlKTtcclxuICAgIHRoaXMuX3ByaW50SXRlbXMubmV4dChuZXdJaXRlbXMpO1xyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICogUHJpbnQgYSBwcmludCBJdGVtXHJcbiAgICogQHBhcmFtIHByaW50SXRlbVRvUHJpbnQgXHJcbiAgICovXHJcbiAgcHVibGljIHByaW50UHJpbnRJdGVtKHByaW50SXRlbVRvUHJpbnQ6IFByaW50SXRlbSk6IHZvaWQge1xyXG4gICAgdGhpcy5wcmludEhUTUxFbGVtZW50KHByaW50SXRlbVRvUHJpbnQubmF0aXZlRWxlbWVudCk7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=

@@ -226,2 +226,8 @@ /**

/**
* Main print function
* @param printContent
*/
/**
* Main print function
* @private
* @param {?} printContent

@@ -232,2 +238,4 @@ * @param {?} printOpenWindow

NgxPrinterService.prototype.print = /**
* Main print function
* @private
* @param {?} printContent

@@ -239,3 +247,5 @@ * @param {?} printOpenWindow

if (printOpenWindow) {
this.printInNewWindow(printContent);
/** @type {?} */
var printContentClone = printContent.cloneNode(true);
this.printInNewWindow(printContentClone);
}

@@ -309,3 +319,5 @@ else {

printWindow.focus(); // necessary for IE >= 10*/
printWindow.print();
if (printWindow.document.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');

@@ -336,3 +348,5 @@ printWindow.close();

_this.printWindowOpen.next(true);
window.print();
if (document.execCommand('print') === false) {
window.print();
}
document.body.removeChild(_this.openNgxPrinter);

@@ -493,9 +507,3 @@ _this.printWindowOpen.next(false);

/**
* Main print function
* \@param printContent
* @type {?}
*/
NgxPrinterService.prototype.private;
/**
* @type {?}
* @private

@@ -510,2 +518,2 @@ */

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1wcmludGVyLyIsInNvdXJjZXMiOlsibGliL25neC1wcmludGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFDTCxVQUFVLEVBQ1YsV0FBVyxFQUNYLHdCQUF3QixFQUN4QixRQUFRLEVBQ1IsUUFBUSxFQUVULE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBYyxlQUFlLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDbkQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7Ozs7OztBQU81RDtJQThCRSwyQkFDYyxNQUEwQixFQUM5QixRQUFrQyxFQUNsQyxRQUFrQjtRQURsQixhQUFRLEdBQVIsUUFBUSxDQUEwQjtRQUNsQyxhQUFRLEdBQVIsUUFBUSxDQUFVO1FBN0JwQixvQkFBZSxHQUFHLElBQUksZUFBZSxDQUFVLEtBQUssQ0FBQyxDQUFDO1FBRXRELGdCQUFXLEdBQUcsSUFBSSxlQUFlLENBQWMsRUFBRSxDQUFDLENBQUM7UUFDM0QsZ0JBQVcsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDLFlBQVksRUFBRSxDQUFDOzs7OztRQVE5QyxxQkFBZ0IsR0FBRyxHQUFHLENBQUM7Ozs7UUFLdkIsZ0JBQVcsR0FBRyxTQUFTLENBQUM7Ozs7O1FBTXhCLG9CQUFlLEdBQUcsSUFBSSxDQUFDO1FBRXZ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qIFNldCBjb25maWcgZnJvbSBmb3JSb290XHJcbiAgICogQHBhcmFtIGNvbmZpZyBcclxuICAgKi9cclxuICBwcml2YXRlIHNldFJvb3RDb25maWdPcHRpb25zKGNvbmZpZzogUHJpbnRTZXJ2aWNlQ29uZmlnKSB7XHJcbiAgICBpZiAoY29uZmlnKSB7XHJcbiAgICAgIGlmIChjb25maWcucHJpbnRPcGVuV2luZG93KSB7XHJcbiAgICAgICAgdGhpcy5wcmludE9wZW5XaW5kb3cgPSBjb25maWcucHJpbnRPcGVuV2luZG93O1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChjb25maWcudGltZVRvV2FpdFJlbmRlcikge1xyXG4gICAgICAgIHRoaXMudGltZVRvV2FpdFJlbmRlciA9IGNvbmZpZy50aW1lVG9XYWl0UmVuZGVyO1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChjb25maWcucmVuZGVyQ2xhc3MpIHtcclxuICAgICAgICB0aGlzLnJlbmRlckNsYXNzID0gY29uZmlnLnJlbmRlckNsYXNzO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKioqXHJcbiAgICogUHJpbnQgYSBkaXYgaWRlbnRpZmllZCBieSBpdHMgaWRcclxuICAgKi9cclxuICBwdWJsaWMgcHJpbnREaXYoZGl2SUQ6IHN0cmluZykge1xyXG4gICAgY29uc3QgZGl2VG9QcmludCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGRpdklEKTtcclxuXHJcbiAgICBpZiAoZGl2VG9QcmludCkge1xyXG4gICAgICB0aGlzLnByaW50KGRpdlRvUHJpbnQsIHRoaXMucHJpbnRPcGVuV2luZG93KTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIGNvbnNvbGUubG9nKCdkaXYgd2l0aCBpZCAke2RpdklEfSBub3QgZm91bmQuLicpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLyoqKlxyXG4gICAqIFByaW50IGFuIEVsZW1lbnQgaWRlbnRpZ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55O1xyXG5cclxuICAgIGlmIChjb250ZW50VG9SZW5kZXIpIHtcclxuICAgICAgY29uc3QgbmdDb250ZW50ID0gdGhpcy5yZXNvbHZlTmdDb250ZW50KGNvbnRlbnRUb1JlbmRlcik7XHJcbiAgICAgIGNvbXBvbmVudFJlZiA9IGZhY3RvcnkuY3JlYXRlKHRoaXMuaW5qZWN0b3IsIG5nQ29udGVudCk7IC8vIHRoaXMudmlld0NvbnRhaW5lclJlZi5jcmVhdGVDb21wb25lbnQoZmFjdG9yeSk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBjb21wb25lbnRSZWYgPSBmYWN0b3J5LmNyZWF0ZSh0aGlzLmluamVjdG9yKTtcclxuICAgIH1cclxuICAgIGNvbXBvbmVudFJlZi5pbnN0YW5jZS5yZW5kZXJDbGFzcyA9IHRoaXMucmVuZGVyQ2xhc3M7XHJcbiAgICBpZiAoaW1nU3JjKSB7XHJcbiAgICAgIGNvbXBvbmVudFJlZi5pbnN0YW5jZS5pbWdTcmMgPSBpbWdTcmM7XHJcbiAgICAgIHJldHVybiBjb21wb25lbnRSZWY7XHJcbiAgICB9XHJcblxyXG4gICAgY29tcG9uZW50UmVmLmhvc3RWaWV3LmRldGVjdENoYW5nZXMoKTtcclxuICAgIHJldHVybiBjb21wb25lbnRSZWYubG9jYXRpb247IC8vIGxvY2F0aW9uIGlzIG5hdGl2ZSBlbGVtZW50XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBNYWluIHByaW50IGZ1bmN0aW9uXHJcbiAgICogQHBhcmFtIHByaW50Q29udGVudCBcclxuICAgKi9cclxuICBwcml2YXRlIFxyXG4gIHByaW50KHByaW50Q29udGVudDogYW55LCBwcmludE9wZW5XaW5kb3c6IGJvb2xlYW4pIHtcclxuICAgIGlmIChwcmludE9wZW5XaW5kb3cpIHtcclxuICAgICAgdGhpcy5wcmludEluTmV3V2luZG93KHByaW50Q29udGVudCk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBjb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wZW5kQ2hpbGQoZGl2VG9QcmludCk7XHJcbiAgICBwcmludFdpbmRvdy5kb2N1bWVudC5jbG9zZSgpO1xyXG4gICAgLy8gcHJpbnRXaW5kb3dEb2MuYm9keS5pbm5lckhUTUwgPSBkaXZUb1ByaW50Lm91dGVySFRNTDtcclxuICAgIHNldFRpbWVvdXQoKCkgPT4gdGhpcy5wcmludFdpbmRvdyhwcmludFdpbmRvdywgcHJpbnRXaW5kb3dEb2MpLCB0aGlzLnRpbWVUb1dhaXRSZW5kZXIpO1xyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICogUHJpbnQgd2luZG93IGluIG5ldyB0YWJcclxuICAgKi9cclxuICBwcml2YXRlIHByaW50V2luZG93KHByaW50V2luZG93OiBXaW5kb3csIHByaW50V2luZG93RG9jOiBEb2N1bWVudCkge1xyXG4gICAgdGhpcy5wcmludFdpbmRvd09wZW4ubmV4dCh0cnVlKTtcclxuICAgIHByaW50V2luZG93RG9jLmNsb3NlKCk7IC8vIG5lY2Vzc2FyeSBmb3IgSUUgPj0gMTBcclxuICAgIHByaW50V2luZG93LmZvY3VzKCk7IC8vIG5lY2Vzc2FyeSBmb3IgSUUgPj0gMTAqL1xyXG4gICAgcHJpbnRXaW5kb3cucHJpbnQoKTtcclxuICAgIGNvbnNvbGUubG9nKCdjbG9zZSBwcmludCB3aW5kb3cnKTtcclxuICAgIHByaW50V2luZG93LmNsb3NlKCk7XHJcbiAgICBzZXRUaW1lb3V0KCgpID0+ICB7IHByaW50V2luZG93LmNsb3NlKCk7IHRoaXMucHJpbnRXaW5kb3dPcGVuLm5leHQoZmFsc2UpOyB9LCAyMCk7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBQcmludCB0aGUgd2hvbGUgY3VycmVudCB3aW5kb3dcclxuICAgKi9cclxuICBwcmludEN1cnJlbnRXaW5kb3coKSB7XHJcbiAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgdGhpcy5wcmludFdpbmRvd09wZW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zZXJ2YWJsZSgpO1xyXG5cclxuICBjb25zdHJ1Y3RvcihcclxuICAgIEBPcHRpb25hbCgpIGNvbmZpZzogUHJpbnRTZXJ2aWNlQ29uZmlnLFxyXG4gICAgcHJpdmF0ZSByZXNvbHZlcjogQ29tcG9uZW50RmFjdG9yeVJlc29sdmVyLFxyXG4gICAgcHJpdmF0ZSBpbmplY3RvcjogSW5qZWN0b3JcclxuICApIHtcclxuICAgIHRoaXMuc2V0Um9vdENvbmZpZ09wdGlvbnMoY29uZmlnKTtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIFNldCBjb25maWcgZnJvbSBmb3JSb290XHJcbiAgICogQHBhcmFtIGNvbmZpZyBcclxuICAgKi9cclxuICBwcml2YXRlIHNldFJvb3RDb25maWdPcHRpb25zKGNvbmZpZzogUHJpbnRTZXJ2aWNlQ29uZmlnKSB7XHJcbiAgICBpZiAoY29uZmlnKSB7XHJcbiAgICAgIGlmIChjb25maWcucHJpbnRPcGVuV2luZG93KSB7XHJcbiAgICAgICAgdGhpcy5wcmludE9wZW5XaW5kb3cgPSBjb25maWcucHJpbnRPcGVuV2luZG93O1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChjb25maWcudGltZVRvV2FpdFJlbmRlcikge1xyXG4gICAgICAgIHRoaXMudGltZVRvV2FpdFJlbmRlciA9IGNvbmZpZy50aW1lVG9XYWl0UmVuZGVyO1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChjb25maWcucmVuZGVyQ2xhc3MpIHtcclxuICAgICAgICB0aGlzLnJlbmRlckNsYXNzID0gY29uZmlnLnJlbmRlckNsYXNzO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKioqXHJcbiAgICogUHJpbnQgYSBkaXYgaWRlbnRpZmllZCBieSBpdHMgaWRcclxuICAgKi9cclxuICBwdWJsaWMgcHJpbnREaXYoZGl2SUQ6IHN0cmluZykge1xyXG4gICAgY29uc3QgZGl2VG9QcmludCA9IGRvY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W50XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBNYWluIHByaW50IGZ1bmN0aW9uXHJcbiAgICogQHBhcmFtIHByaW50Q29udGVudCBcclxuICAgKi9cclxuICBwcml2YXRlIHByaW50KHByaW50Q29udGVudDogYW55LCBwcmludE9wZW5XaW5kb3c6IGJvb2xlYW4pIHtcclxuICAgIGlmIChwcmludE9wZW5XaW5kb3cpIHtcclxuICAgICAgY29uc3QgcHJpbnRDb250ZW50Q2xvbmUgPSBwcmludENvbnRlbnQuY2xvbmVOb2RlKHRydWUpO1xyXG4gICAgICB0aGlzLnByaW50SW5OZXdXaW5kb3cocHJpbnRDb250ZW50Q2xvbmUpO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgY29uc3QgcHJpbnRDb250ZW50Q2xvbmUgPSBwcmludENvbnRlbnQuY2xvbmVOb2RlKHRydWUpO1xyXG4gICAgICBjb25zdCBuYXRpdmVFbCA9IHRoaXMuY3JlYXRlQ29tcG9uZW50KHByaW50Q29udGVudENsb25lKS5uYXRpdmVFbGVtZW50O1xyXG4gICAgICB0aGlzLm9wZW5OZ3hQcmludGVyID0gbmF0aXZlRWw7XHJcbiAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodGhpcy5vcGVuTmd4UHJpbnRlcik7XHJcbiAgICAgIHRoaXMucHJpbnRDdXJyZW50V2luZG93KCk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBQcmludCB1c2luZyBhIG5ldyB3aW5kb3cgLyB0YWJcclxuICAgKiBAcGFyYW0gZGl2VG9QcmludFxyXG4gICAqL1xyXG4gIHByaXZhdGUgcHJpbnRJbk5ld1dpbmRvdyhkaXZUb1ByaW50OiBIVE1MRWxlbWVudCkge1xyXG4gICAgY29uc3QgcHJpbnRXaW5kb3cgPSB3aW5kb3cub3BlbignJywgJ1BSSU5UJyk7XHJcbiAgICBsZXQgdGl0bGUgPSBkb2N1bWVudC50aXRsZTtcclxuXH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xyXG5cclxuICAvKipcclxuICAgKiBEZWxldGUgYSBwcmludCBpdGVtIGZyb20gc2VydmljZVxyXG4gICAqIEBwYXJhbSBpZE9mSXRlbVRvUmVtb3ZlIFxyXG4gICAqL1xyXG4gIHB1YmxpYyByZW1vdmVQcmludEl0ZW0oaWRPZkl0ZW1Ub1JlbW92ZTogc3RyaW5nKTogdm9pZCB7XHJcbiAgICBjb25zdCB0bXBJdGVtcyA9IHRoaXMuX3ByaW50SXRlbXMuZ2V0VmFsdWUoKTtcclxuICAgIGNvbnN0IG5ld0lpdGVtcyA9IHRtcEl0ZW1zLmZpbHRlcihpdGVtID0+IGl0ZW0uaWQgIT09IGlkT2ZJdGVtVG9SZW1vdmUpO1xyXG4gICAgdGhpcy5fcHJpbnRJdGVtcy5uZXh0KG5ld0lpdGVtcyk7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBQcmludCBhIHByaW50IEl0ZW1cclxuICAgKiBAcGFyYW0gcHJpbnRJdGVtVG9QcmludCBcclxuICAgKi9cclxuICBwdWJsaWMgcHJpbnRQcmludEl0ZW0ocHJpbnRJdGVtVG9QcmludDogUHJpbnRJdGVtKTogdm9pZCB7XHJcbiAgICB0aGlzLnByaW50SFRNTEVsZW1lbnQocHJpbnRJdGVtVG9QcmludC5uYXRpdmVFbGVtZW50KTtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==

@@ -286,2 +286,4 @@ import { BehaviorSubject } from 'rxjs';

/**
* Main print function
* @private
* @param {?} printContent

@@ -293,3 +295,5 @@ * @param {?} printOpenWindow

if (printOpenWindow) {
this.printInNewWindow(printContent);
/** @type {?} */
const printContentClone = printContent.cloneNode(true);
this.printInNewWindow(printContentClone);
}

@@ -341,3 +345,5 @@ else {

printWindow.focus(); // necessary for IE >= 10*/
printWindow.print();
if (printWindow.document.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');

@@ -360,3 +366,5 @@ printWindow.close();

this.printWindowOpen.next(true);
window.print();
if (document.execCommand('print') === false) {
window.print();
}
document.body.removeChild(this.openNgxPrinter);

@@ -363,0 +371,0 @@ this.printWindowOpen.next(false);

@@ -378,2 +378,8 @@ import { BehaviorSubject } from 'rxjs';

/**
* Main print function
* @param printContent
*/
/**
* Main print function
* @private
* @param {?} printContent

@@ -384,2 +390,4 @@ * @param {?} printOpenWindow

NgxPrinterService.prototype.print = /**
* Main print function
* @private
* @param {?} printContent

@@ -391,3 +399,5 @@ * @param {?} printOpenWindow

if (printOpenWindow) {
this.printInNewWindow(printContent);
/** @type {?} */
var printContentClone = printContent.cloneNode(true);
this.printInNewWindow(printContentClone);
}

@@ -461,3 +471,5 @@ else {

printWindow.focus(); // necessary for IE >= 10*/
printWindow.print();
if (printWindow.document.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');

@@ -488,3 +500,5 @@ printWindow.close();

_this.printWindowOpen.next(true);
window.print();
if (document.execCommand('print') === false) {
window.print();
}
document.body.removeChild(_this.openNgxPrinter);

@@ -491,0 +505,0 @@ _this.printWindowOpen.next(false);

@@ -69,4 +69,3 @@ import { PrintItem } from './print-item';

*/
private: any;
print(printContent: any, printOpenWindow: boolean): void;
private print;
/**

@@ -73,0 +72,0 @@ * Print using a new window / tab

{
"name": "ngx-printer",
"version": "0.1.7",
"version": "0.1.8",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^7.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc