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.2.0 to 0.3.0

129

bundles/ngx-printer.umd.js

@@ -236,2 +236,3 @@ (function (global, factory) {

this.$printWindowOpen = this.printWindowOpen.asObservable();
this.eventadded = [];
this.setRootConfigOptions(config);

@@ -469,3 +470,3 @@ }

function (printContent, printOpenWindow) {
if (printOpenWindow) {
if (printOpenWindow === true) {
/** @type {?} */

@@ -475,3 +476,3 @@ var printContentClone = printContent.cloneNode(true);

}
else {
if (printOpenWindow === false) {
/** @type {?} */

@@ -519,3 +520,3 @@ var printContentClone = printContent.cloneNode(true);

*/
function () { return _this.printWindow(printWindow, printWindowDoc); }), this.timeToWaitRender);
function () { return _this.printTabWindow(printWindow, printWindowDoc); }), this.timeToWaitRender);
};

@@ -532,3 +533,3 @@ /**

*/
NgxPrinterService.prototype.printWindow = /**
NgxPrinterService.prototype.printTabWindow = /**
* Print window in new tab

@@ -541,15 +542,8 @@ * @private

function (printWindow, printWindowDoc) {
var _this = this;
this.registerPrintEvent(printWindow, true);
this.printWindowOpen.next(true);
printWindowDoc.close(); // necessary for IE >= 10
printWindow.focus(); // necessary for IE >= 10*/
if (printWindow.document.execCommand('print') === false) {
if (printWindowDoc.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
function () { printWindow.close(); _this.printWindowOpen.next(false); }), 20);
};

@@ -569,2 +563,3 @@ /**

var _this = this;
this.registerPrintEvent(window, false);
setTimeout((/**

@@ -578,8 +573,108 @@ * @return {?}

}
document.body.removeChild(_this.openNgxPrinter);
_this.printWindowOpen.next(false);
}), this.timeToWaitRender);
};
/**
* Listen to print event of window
* @param printWindow
*/
/**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
NgxPrinterService.prototype.registerPrintEvent = /**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
function (printWindow, printWithOpenInNewWindow) {
var _this = this;
/** @type {?} */
var that = this;
printWindow.focus(); // necessary for IE >= 10*/
if (that.eventadded[printWindow.name]) {
return;
}
printWindow.addEventListener('afterprint', (/**
* @return {?}
*/
function () {
_this.eventadded[printWindow.name] = true;
// console.log('afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}));
/*
let mediaQueryList: MediaQueryList = null;
if (window.matchMedia) {
mediaQueryList = printWindow.matchMedia('print') as MediaQueryList;
this.eventadded[printWindow.name] = true;
mediaQueryList.addListener(function(mql) {
console.log(mql);
if (mql.matches) {
console.log('webkit equivalent of onbeforeprint');
}
if (!mql.matches) {
console.log('webkit equivalent of afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}
});
} */
};
/**
* Close tab or clean up dom
* @internal
*/
/**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
NgxPrinterService.prototype.cleanUp = /**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
function (printWindow, printOpenWindow) {
if (printOpenWindow === true) {
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
function () {
printWindow.close();
}), 20);
}
if (printOpenWindow === false) {
if (this.openNgxPrinter) {
document.body.removeChild(this.openNgxPrinter);
}
}
};
/**
* Create node or angular component
* @param content
* @internal
*/
/**
* Create node or angular component
* \@internal
* @private
* @template T

@@ -590,2 +685,4 @@ * @param {?} content

NgxPrinterService.prototype.resolveNgContent = /**
* Create node or angular component
* \@internal
* @private

@@ -746,2 +843,4 @@ * @template T

NgxPrinterService.prototype.$printWindowOpen;
/** @type {?} */
NgxPrinterService.prototype.eventadded;
/**

@@ -748,0 +847,0 @@ * @type {?}

2

bundles/ngx-printer.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-printer",["exports","@angular/core","rxjs"],t):t((e=e||self)["ngx-printer"]={},e.ng.core,e.rxjs)}(this,function(e,t,n){"use strict";var i=function(){function e(e,n){this.elementRef=e,this.renderer=n,this._renderClass="default",this._imgSrc="default",this.completed=new t.EventEmitter}return Object.defineProperty(e.prototype,"renderClass",{get:function(){return this._renderClass},set:function(e){this._renderClass=e,this.setCustomClass()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imgSrc",{get:function(){return this._imgSrc},set:function(e){this._imgSrc=e,this.addImage(this._imgSrc)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.setCustomClass=function(){var e=this.elementRef.nativeElement;this.renderer.removeClass(e,"default"),this.renderer.addClass(e,this._renderClass)},e.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)},e.decorators=[{type:t.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}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={completed:[{type:t.Output}]},e}();var r=function(){this.printOpenWindow=!0,this.timeToWaitRender=200};var o=function(){function e(e,t,i){this.resolver=t,this.injector=i,this.printWindowOpen=new n.BehaviorSubject(!1),this._printItems=new n.BehaviorSubject([]),this.$printItems=this._printItems.asObservable(),this.timeToWaitRender=200,this.renderClass="default",this.printOpenWindow=!0,this.$printWindowOpen=this.printWindowOpen.asObservable(),this.setRootConfigOptions(e)}return e.prototype.setRootConfigOptions=function(e){e&&(e.printOpenWindow&&(this.printOpenWindow=e.printOpenWindow),e.timeToWaitRender&&(this.timeToWaitRender=e.timeToWaitRender),e.renderClass&&(this.renderClass=e.renderClass))},e.prototype.printDiv=function(e){var t=document.getElementById(e);t?this.print(t,this.printOpenWindow):console.log("div with id ${divID} not found..")},e.prototype.printByClassName=function(e){var t=document.getElementsByClassName(e);t&&t.length>0?this.print(t[0],this.printOpenWindow):console.log("element with id ${className} not found..")},e.prototype.printAngular=function(e){var t=this.createComponent(e);this.print(t.nativeElement,this.printOpenWindow)},e.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)})},e.prototype.printHTMLElement=function(e){this.print(e,this.printOpenWindow)},e.prototype.createComponent=function(e,t){var n,r=this.resolver.resolveComponentFactory(i);if(e){var o=this.resolveNgContent(e);n=r.create(this.injector,o)}else n=r.create(this.injector);return n.instance.renderClass=this.renderClass,t?(n.instance.imgSrc=t,n):(n.hostView.detectChanges(),n.location)},e.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()}},e.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)},e.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)},e.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)},e.prototype.resolveNgContent=function(e){if("string"==typeof e)return[[document.createTextNode(e)]];if(e instanceof t.TemplateRef)return[e.createEmbeddedView(null).rootNodes];if(e instanceof HTMLElement)return[[e]];var n=this.resolver.resolveComponentFactory(e).create(this.injector);return n.changeDetectorRef.detectChanges(),[[n.location.nativeElement]]},e.prototype.addPrintItem=function(e){var t=this._printItems.getValue();t.push(e),this._printItems.next(t)},e.prototype.removePrintItem=function(e){var t=this._printItems.getValue().filter(function(t){return t.id!==e});this._printItems.next(t)},e.prototype.printPrintItem=function(e){this.printHTMLElement(e.nativeElement)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:r,decorators:[{type:t.Optional}]},{type:t.ComponentFactoryResolver},{type:t.Injector}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(r,8),t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(t.INJECTOR))},token:e,providedIn:"root"}),e}();var s=function(){};var p=function(){function e(e,t){this.el=e,this.printerService=t}return e.prototype.ngOnInit=function(){if(this.el.nativeElement.id){var e=new s;e.id=this.el.nativeElement.id,e.nativeElement=this.el.nativeElement,this.printerService.addPrintItem(e)}},e.prototype.ngOnDestroy=function(){this.el.nativeElement.id&&this.printerService.removePrintItem(this.el.nativeElement.id)},e.decorators=[{type:t.Directive,args:[{selector:"[ngxPrintItem]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:o}]},e.propDecorators={printName:[{type:t.Input}]},e}();var c=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:r,useValue:t}]}},e.decorators=[{type:t.NgModule,args:[{declarations:[i,p],imports:[],exports:[i,p],entryComponents:[i]}]}],e}();e.NgxPrinterComponent=i,e.NgxPrinterModule=c,e.NgxPrinterService=o,e.PrintItem=s,e.PrintItemDirective=p,e.PrintServiceConfig=r,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-printer",["exports","@angular/core","rxjs"],t):t((e=e||self)["ngx-printer"]={},e.ng.core,e.rxjs)}(this,function(e,t,n){"use strict";var i=function(){function e(e,n){this.elementRef=e,this.renderer=n,this._renderClass="default",this._imgSrc="default",this.completed=new t.EventEmitter}return Object.defineProperty(e.prototype,"renderClass",{get:function(){return this._renderClass},set:function(e){this._renderClass=e,this.setCustomClass()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imgSrc",{get:function(){return this._imgSrc},set:function(e){this._imgSrc=e,this.addImage(this._imgSrc)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.setCustomClass=function(){var e=this.elementRef.nativeElement;this.renderer.removeClass(e,"default"),this.renderer.addClass(e,this._renderClass)},e.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)},e.decorators=[{type:t.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}"]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={completed:[{type:t.Output}]},e}();var r=function(){this.printOpenWindow=!0,this.timeToWaitRender=200};var o=function(){function e(e,t,i){this.resolver=t,this.injector=i,this.printWindowOpen=new n.BehaviorSubject(!1),this._printItems=new n.BehaviorSubject([]),this.$printItems=this._printItems.asObservable(),this.timeToWaitRender=200,this.renderClass="default",this.printOpenWindow=!0,this.$printWindowOpen=this.printWindowOpen.asObservable(),this.eventadded=[],this.setRootConfigOptions(e)}return e.prototype.setRootConfigOptions=function(e){e&&(e.printOpenWindow&&(this.printOpenWindow=e.printOpenWindow),e.timeToWaitRender&&(this.timeToWaitRender=e.timeToWaitRender),e.renderClass&&(this.renderClass=e.renderClass))},e.prototype.printDiv=function(e){var t=document.getElementById(e);t?this.print(t,this.printOpenWindow):console.log("div with id ${divID} not found..")},e.prototype.printByClassName=function(e){var t=document.getElementsByClassName(e);t&&t.length>0?this.print(t[0],this.printOpenWindow):console.log("element with id ${className} not found..")},e.prototype.printAngular=function(e){var t=this.createComponent(e);this.print(t.nativeElement,this.printOpenWindow)},e.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)})},e.prototype.printHTMLElement=function(e){this.print(e,this.printOpenWindow)},e.prototype.createComponent=function(e,t){var n,r=this.resolver.resolveComponentFactory(i);if(e){var o=this.resolveNgContent(e);n=r.create(this.injector,o)}else n=r.create(this.injector);return n.instance.renderClass=this.renderClass,t?(n.instance.imgSrc=t,n):(n.hostView.detectChanges(),n.location)},e.prototype.print=function(e,t){if(!0===t){var n=e.cloneNode(!0);this.printInNewWindow(n)}if(!1===t){n=e.cloneNode(!0);var i=this.createComponent(n).nativeElement;this.openNgxPrinter=i,document.body.appendChild(this.openNgxPrinter),this.printCurrentWindow()}},e.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.printTabWindow(n,r)},this.timeToWaitRender)},e.prototype.printTabWindow=function(e,t){this.registerPrintEvent(e,!0),this.printWindowOpen.next(!0),e.focus(),!1===t.execCommand("print")&&e.print()},e.prototype.printCurrentWindow=function(){var e=this;this.registerPrintEvent(window,!1),setTimeout(function(){e.printWindowOpen.next(!0),!1===document.execCommand("print")&&window.print()},this.timeToWaitRender)},e.prototype.registerPrintEvent=function(e,t){var n=this,i=this;e.focus(),i.eventadded[e.name]||e.addEventListener("afterprint",function(){n.eventadded[e.name]=!0,t&&(i.eventadded[e.name]=!1),i.cleanUp(e,t),i.printWindowOpen.next(!1)})},e.prototype.cleanUp=function(e,t){!0===t&&(console.log("close print window"),e.close(),setTimeout(function(){e.close()},20)),!1===t&&this.openNgxPrinter&&document.body.removeChild(this.openNgxPrinter)},e.prototype.resolveNgContent=function(e){if("string"==typeof e)return[[document.createTextNode(e)]];if(e instanceof t.TemplateRef)return[e.createEmbeddedView(null).rootNodes];if(e instanceof HTMLElement)return[[e]];var n=this.resolver.resolveComponentFactory(e).create(this.injector);return n.changeDetectorRef.detectChanges(),[[n.location.nativeElement]]},e.prototype.addPrintItem=function(e){var t=this._printItems.getValue();t.push(e),this._printItems.next(t)},e.prototype.removePrintItem=function(e){var t=this._printItems.getValue().filter(function(t){return t.id!==e});this._printItems.next(t)},e.prototype.printPrintItem=function(e){this.printHTMLElement(e.nativeElement)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:r,decorators:[{type:t.Optional}]},{type:t.ComponentFactoryResolver},{type:t.Injector}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(r,8),t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(t.INJECTOR))},token:e,providedIn:"root"}),e}();var s=function(){};var p=function(){function e(e,t){this.el=e,this.printerService=t}return e.prototype.ngOnInit=function(){if(this.el.nativeElement.id){var e=new s;e.id=this.el.nativeElement.id,e.nativeElement=this.el.nativeElement,this.printerService.addPrintItem(e)}},e.prototype.ngOnDestroy=function(){this.el.nativeElement.id&&this.printerService.removePrintItem(this.el.nativeElement.id)},e.decorators=[{type:t.Directive,args:[{selector:"[ngxPrintItem]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:o}]},e.propDecorators={printName:[{type:t.Input}]},e}();var a=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:r,useValue:t}]}},e.decorators=[{type:t.NgModule,args:[{declarations:[i,p],imports:[],exports:[i,p],entryComponents:[i]}]}],e}();e.NgxPrinterComponent=i,e.NgxPrinterModule=a,e.NgxPrinterService=o,e.PrintItem=s,e.PrintItemDirective=p,e.PrintServiceConfig=r,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-printer.umd.min.js.map

@@ -44,2 +44,3 @@ /**

this.$printWindowOpen = this.printWindowOpen.asObservable();
this.eventadded = [];
this.setRootConfigOptions(config);

@@ -129,3 +130,3 @@ }

*/
(val) => {
val => {
compRef.hostView.detectChanges();

@@ -183,3 +184,3 @@ console.log('completed:', val);

print(printContent, printOpenWindow) {
if (printOpenWindow) {
if (printOpenWindow === true) {
/** @type {?} */

@@ -189,3 +190,3 @@ const printContentClone = printContent.cloneNode(true);

}
else {
if (printOpenWindow === false) {
/** @type {?} */

@@ -222,3 +223,3 @@ const printContentClone = printContent.cloneNode(true);

*/
() => this.printWindow(printWindow, printWindowDoc)), this.timeToWaitRender);
() => this.printTabWindow(printWindow, printWindowDoc)), this.timeToWaitRender);
}

@@ -232,15 +233,9 @@ /**

*/
printWindow(printWindow, printWindowDoc) {
printTabWindow(printWindow, printWindowDoc) {
this.registerPrintEvent(printWindow, true);
this.printWindowOpen.next(true);
printWindowDoc.close(); // necessary for IE >= 10
printWindow.focus(); // necessary for IE >= 10*/
if (printWindow.document.execCommand('print') === false) {
if (printWindowDoc.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
() => { printWindow.close(); this.printWindowOpen.next(false); }), 20);
}

@@ -252,2 +247,3 @@ /**

printCurrentWindow() {
this.registerPrintEvent(window, false);
setTimeout((/**

@@ -261,8 +257,80 @@ * @return {?}

}
document.body.removeChild(this.openNgxPrinter);
this.printWindowOpen.next(false);
}), this.timeToWaitRender);
}
/**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
registerPrintEvent(printWindow, printWithOpenInNewWindow) {
/** @type {?} */
const that = this;
printWindow.focus(); // necessary for IE >= 10*/
if (that.eventadded[printWindow.name]) {
return;
}
printWindow.addEventListener('afterprint', (/**
* @return {?}
*/
() => {
this.eventadded[printWindow.name] = true;
// console.log('afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}));
/*
let mediaQueryList: MediaQueryList = null;
if (window.matchMedia) {
mediaQueryList = printWindow.matchMedia('print') as MediaQueryList;
this.eventadded[printWindow.name] = true;
mediaQueryList.addListener(function(mql) {
console.log(mql);
if (mql.matches) {
console.log('webkit equivalent of onbeforeprint');
}
if (!mql.matches) {
console.log('webkit equivalent of afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}
});
} */
}
/**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
cleanUp(printWindow, printOpenWindow) {
if (printOpenWindow === true) {
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
() => {
printWindow.close();
}), 20);
}
if (printOpenWindow === false) {
if (this.openNgxPrinter) {
document.body.removeChild(this.openNgxPrinter);
}
}
}
/**
* Create node or angular component
* \@internal
* @private
* @template T

@@ -386,2 +454,4 @@ * @param {?} content

NgxPrinterService.prototype.$printWindowOpen;
/** @type {?} */
NgxPrinterService.prototype.eventadded;
/**

@@ -398,2 +468,2 @@ * @type {?}

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOi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xuICAgKi9cclxuICByZW5kZXJDbGFzcyA9ICdkZWZhdWx0JztcclxuXHJcbiAgLyoqXHJcbiAgICogT3BlbiBuZXcgd2luZG93IHRvIHByaW50IG9yIG5vdFxyXG4gICAqIERlZmF1bHQgaXMgdHJ1ZVxyXG4gICAqL1xyXG4gIHByaW50T3BlbldpbmRvdyA9IHRydWU7XHJcblxyXG4gICRwcmludFdpbmRvd09wZW4gPSB0aGlzLnByaW50V2luZG93T3Blbi5hc09ic2VydmFibGUoKTtcclxuXHJcbiAgY29uc3RydWN0b3IoXHJcbiAgICBAT3B0aW9uYWwoKSBjb25maWc6IFByaW50U2VydmljZUNvbmZpZyxcclxuICAgIHByaXZhdGUgcmVzb2x2ZXI6IENvbXBvbmVudEZhY3RvcnlSZXNvbHZlcixcclxuICAgIHByaXZhdGUgaW5qZWN0b3I6IEluamVjdG9yXHJcbiAgKSB7XHJcbiAgICB0aGlzLnNldFJvb3RDb25maWdPcHRpb25zKGNvbmZpZyk7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBTZXQgY29uZmlnIGZyb20gZm9yUm9vdFxyXG4gICAqIEBwYXJhbSBjb25maWcgXHJcbiAgICovXHJcbiAgcHJpdmF0ZSBzZXRSb290Q29uZmlnT3B0aW9ucyhjb25maWc6IFByaW50U2VydmljZUNvbmZpZykge1xyXG4gICAgaWYgKGNvbmZpZykge1xyXG4gICAgICBpZiAoY29uZmlnLnByaW50T3BlbldpbmRvdykge1xyXG4gICAgICAgIHRoaXMucHJpbnRPcGVuV2luZG93ID0gY29uZmlnLnByaW50T3BlbldpbmRvdztcclxuICAgICAgfVxyXG4gICAgICBpZiAoY29uZmlnLnRpbWVUb1dhaXRSZW5kZXIpIHtcclxuICAgICAgICB0aGlzLnRpbWVUb1dhaXRSZW5kZXIgPSBjb25maWcudGltZVRvV2FpdFJlbmRlcjtcclxuICAgICAgfVxyXG4gICAgICBpZiAoY29uZmlnLnJlbmRlckNsYXNzKSB7XHJcbiAgICAgICAgd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ZhY3RvcnlSZXNvbHZlcixcclxuICAgIHByaXZhdGUgaW5qZWN0b3I6IEluamVjdG9yXHJcbiAgKSB7XHJcbiAgICB0aGlzLnNldFJvb3RDb25maWdPcHRpb25zKGNvbmZpZyk7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBTZXQgY29uZmlnIGZyb20gZm9yUm9vdFxyXG4gICAqIEBwYXJhbSBjb25maWdcclxuICAgKi9cclxuICBwcml2YXRlIHNldFJvb3RDb25maWdPcHRpb25zKGNvbmZpZzogUHJpbnRTZXJ2aWNlQ29uZmlnKSB7XHJcbiAgICBpZiAoY29uZmlnKSB7XHJcbiAgICAgIGlmIChjb25maWcucHJpbnRPcGVuV2luZG93KSB7XHJcbiAgICAgICAgdGhpcy5wcmludE9wZW5XaW5kb3cgPSBjb25maWcucHJpbnRPcGVuV2luZG93O1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChjb25maWcudGltZVRvV2FpdFJlbmRlcikge1xyXG4gICAgICAgIHRoaXMudGltZVRvV2FpdFJlbmRlciA9IGNvbmZpZy50aW1lVG9XYWl0UmVuZGVyO1xyXG4gICAgICB9XHJcbiAgICAgIGlmIChjb25maWcucmVuZGVyQ2xhc3MpIHtcclxuICAgICAgICB0aGlzLnJlbmRlckNsYXNzID0gY29uZmlnLnJlbmRlckNsYXNzO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKioqXHJcbiAgICogUHJpbnQgYSBkaXYgaWRlbnRpZmllZCBieSBpdHMgaWRcclxuICAgKiBAZXhhbXBsZVxyXG4gICAqIHRoaXMucHJpbnRlclNlcnZpY2UucHJpbnREaXYoJ3ByaW50RGl2Jyk7XHJcbiAgICovXHJcbiAgcHVibGljIHByaW50RGl2KGRpdklEOiBzdHJpbmcpIHtcclxuICAgIGNvbnN0IGRpdlRvUHJpbnQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChkaXZJRCk7XHJcblxyXG4gICAgaWYgKGRpdlRvUH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biAgICAgIHRoaXMudGltZVRvV2FpdFJlbmRlclxyXG4gICAgKTtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIFByaW50IHdpbmRvdyBpbiBuZXcgdGFiXHJcbiAgICovXHJcbiAgcHJpdmF0ZSBwcmludFRhYldpbmRvdyhwcmludFdpbmRvdzogV2luZG93LCBwcmludFdpbmRvd0RvYzogRG9jdW1lbnQpIHtcclxuICAgIHRoaXMucmVnaXN0ZXJQcmludEV2ZW50KHByaW50V2luZG93LCB0cnVlKTtcclxuICAgIHRoaXMucHJpbnRXaW5kb3dPcGVuLm5leHQodHJ1ZSk7XHJcbiAgICBwcmludFdpbmRvdy5mb2N1cygpOyAvLyBuZWNlc3NhcnkgZm9yIElFID49IDEwKi9cclxuICAgIGlmIChwcmludFdpbmRvd0RvYy5leGVjQ29tbWFuZCgncHJpbnQnKSA9PT0gZmFsc2UpIHtcclxuICAgICAgcHJpbnRXaW5kb3cucHJpbnQoKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIFByaW50IHRoZSB3aG9sZSBjdXJyZW50IHdpbmRvd1xyXG4gICAqL1xyXG4gIHByaW50Q3VycmVudFdpbmRvdygpIHtcclxuICAgIHRoaXMucmVnaXN0ZXJQcmludEV2ZW50KHdpbmRvdywgZmFsc2UpO1xyXG4gICAgc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgIHRoaXMucHJpbnRXaW5kb3dPcGVuLm5leHQodHJ1ZSk7XHJcbiAgICAgIGlmIChkb2N1bWVudC5leGVjQ29tbWFuZCgncHJpbnQnKSA9PT0gZmFsc2UpIHtcclxuICAgICAgICB3aW5kb3cucHJpbnQoKTtcclxuICAgICAgfVxyXG4gICAgfSwgdGhpcy50aW1lVG9XYWl0UmVuZGVyKTtcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIExpc3RlbiB0byBwcmludCBldmVudCBvZiB3aW5kb3dcclxuICAgKiBAcGFyYW0gcHJpbnRXaW5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oaXMuX3ByaW50SXRlbXMuZ2V0VmFsdWUoKTtcclxuICAgIGNvbnN0IG5ld0lpdGVtcyA9IHRtcEl0ZW1zLmZpbHRlcihpdGVtID0+IGl0ZW0uaWQgIT09IGlkT2ZJdGVtVG9SZW1vdmUpO1xyXG4gICAgdGhpcy5fcHJpbnRJdGVtcy5uZXh0KG5ld0lpdGVtcyk7XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBQcmludCBhIHByaW50IEl0ZW1cclxuICAgKiBAcGFyYW0gcHJpbnRJdGVtVG9QcmludFxyXG4gICAqL1xyXG4gIHB1YmxpYyBwcmludFByaW50SXRlbShwcmludEl0ZW1Ub1ByaW50OiBQcmludEl0ZW0pOiB2b2lkIHtcclxuICAgIHRoaXMucHJpbnRIVE1MRWxlbWVudChwcmludEl0ZW1Ub1ByaW50Lm5hdGl2ZUVsZW1lbnQpO1xyXG4gIH1cclxufVxyXG4iXX0=

@@ -39,2 +39,3 @@ /**

this.$printWindowOpen = this.printWindowOpen.asObservable();
this.eventadded = [];
this.setRootConfigOptions(config);

@@ -272,3 +273,3 @@ }

function (printContent, printOpenWindow) {
if (printOpenWindow) {
if (printOpenWindow === true) {
/** @type {?} */

@@ -278,3 +279,3 @@ var printContentClone = printContent.cloneNode(true);

}
else {
if (printOpenWindow === false) {
/** @type {?} */

@@ -322,3 +323,3 @@ var printContentClone = printContent.cloneNode(true);

*/
function () { return _this.printWindow(printWindow, printWindowDoc); }), this.timeToWaitRender);
function () { return _this.printTabWindow(printWindow, printWindowDoc); }), this.timeToWaitRender);
};

@@ -335,3 +336,3 @@ /**

*/
NgxPrinterService.prototype.printWindow = /**
NgxPrinterService.prototype.printTabWindow = /**
* Print window in new tab

@@ -344,15 +345,8 @@ * @private

function (printWindow, printWindowDoc) {
var _this = this;
this.registerPrintEvent(printWindow, true);
this.printWindowOpen.next(true);
printWindowDoc.close(); // necessary for IE >= 10
printWindow.focus(); // necessary for IE >= 10*/
if (printWindow.document.execCommand('print') === false) {
if (printWindowDoc.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
function () { printWindow.close(); _this.printWindowOpen.next(false); }), 20);
};

@@ -372,2 +366,3 @@ /**

var _this = this;
this.registerPrintEvent(window, false);
setTimeout((/**

@@ -381,8 +376,108 @@ * @return {?}

}
document.body.removeChild(_this.openNgxPrinter);
_this.printWindowOpen.next(false);
}), this.timeToWaitRender);
};
/**
* Listen to print event of window
* @param printWindow
*/
/**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
NgxPrinterService.prototype.registerPrintEvent = /**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
function (printWindow, printWithOpenInNewWindow) {
var _this = this;
/** @type {?} */
var that = this;
printWindow.focus(); // necessary for IE >= 10*/
if (that.eventadded[printWindow.name]) {
return;
}
printWindow.addEventListener('afterprint', (/**
* @return {?}
*/
function () {
_this.eventadded[printWindow.name] = true;
// console.log('afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}));
/*
let mediaQueryList: MediaQueryList = null;
if (window.matchMedia) {
mediaQueryList = printWindow.matchMedia('print') as MediaQueryList;
this.eventadded[printWindow.name] = true;
mediaQueryList.addListener(function(mql) {
console.log(mql);
if (mql.matches) {
console.log('webkit equivalent of onbeforeprint');
}
if (!mql.matches) {
console.log('webkit equivalent of afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}
});
} */
};
/**
* Close tab or clean up dom
* @internal
*/
/**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
NgxPrinterService.prototype.cleanUp = /**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
function (printWindow, printOpenWindow) {
if (printOpenWindow === true) {
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
function () {
printWindow.close();
}), 20);
}
if (printOpenWindow === false) {
if (this.openNgxPrinter) {
document.body.removeChild(this.openNgxPrinter);
}
}
};
/**
* Create node or angular component
* @param content
* @internal
*/
/**
* Create node or angular component
* \@internal
* @private
* @template T

@@ -393,2 +488,4 @@ * @param {?} content

NgxPrinterService.prototype.resolveNgContent = /**
* Create node or angular component
* \@internal
* @private

@@ -550,2 +647,4 @@ * @template T

NgxPrinterService.prototype.$printWindowOpen;
/** @type {?} */
NgxPrinterService.prototype.eventadded;
/**

@@ -562,2 +661,2 @@ * @type {?}

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1wcmludGVyLyIsInNvdXJjZXMiOlsibGliL25neC1wcmludGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFDTCxVQUFVLEVBQ1YsV0FBVyxFQUNYLHdCQUF3QixFQUN4QixRQUFRLEVBQ1IsUUFBUSxFQUVULE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBYyxlQUFlLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDbkQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7Ozs7OztBQU81RDtJQWlDRSwyQkFDYyxNQUEwQixFQUM5QixRQUFrQyxFQUNsQyxRQUFrQjtRQURsQixhQUFRLEdBQVIsUUFBUSxDQUEwQjtRQUNsQyxhQUFRLEdBQVIsUUFBUSxDQUFVO1FBaENwQixvQkFBZSxHQUFHLElBQUks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pcy5wcmludEluTmV3V2luZG93KHByaW50Q29udGVudENsb25lKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIGNvbnN0IHByaW50Q29udGVudENsb25lID0gcHJpbnRDb250ZW50LmNsb25lTm9kZSh0cnVlKTtcclxuICAgICAgY29uc3QgbmF0aXZlRWwgPSB0aGlzLmNyZWF0ZUNvbXBvbmVudChwcmludENvbnRlbnRDbG9uZSkubmF0aXZlRWxlbWVudDtcclxuICAgICAgdGhpcy5vcGVuTmd4UHJpbnRlciA9IG5hdGl2ZUVsO1xyXG4gICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHRoaXMub3Blbk5neFByaW50ZXIpO1xyXG4gICAgICB0aGlzLnByaW50Q3VycmVudFdpbmRvdygpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICogUHJpbnQgdXNpbmcgYSBuZXcgd2luZG93IC8gdGFiXHJcbiAgICogQHBhcmFtIGRpdlRvUHJpbnRcclxuICAgKi9cclxuICBwcml2YXRlIHByaW50SW5OZXdXaW5kb3coZGl2VG9QcmludDogSFRNTEVsZW1lbnQpIHtcclxuICAgIGNvbnN0IHByaW50V2luZG93ID0gd2luZG93Lm9wZW4oJycsICdQUklOVCcpO1xyXG4gICAgbGV0IHRpdGxlID0gZG9jdW1lbnQudGl0bGU7XHJcblxyXG4gICAgcHJpbnRXaW5kb3cuZG9jdW1lbnQud3JpdGUoJzxIVE1MPjxIRUFEPjxUSVRMRT4nICsgdGl0bGUgKyAnPC9USVRMRT48L0hFQUQ+PEJPRFk+PC9CT0RZPjwvSFRNTD4nKTtcclxuICAgIC8vIHByaW50V2luZG93LmRvY3VtZW50LndyaXRlKGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5pbm5lckhUTUwpO1xyXG5cclxuICAgIGNvbnN0IHByaW50V2luZG93RG9jID0gcHJpbnRXaW5kb3cuZG9jdW1lbnQ7XHJcbiAgICBwcmludFdpbmRvd0RvYy5ib2R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xuICBwcml2YXRlIHByaW50KHByaW50Q29udGVudDogYW55LCBwcmludE9wZW5XaW5kb3c6IGJvb2xlYW4pIHtcclxuICAgIGlmIChwcmludE9wZW5XaW5kb3cgPT09IHRydWUpIHtcclxuICAgICAgY29uc3QgcHJpbnRDb250ZW50Q2xvbmUgPSBwcmludENvbnRlbnQuY2xvbmVOb2RlKHRydWUpO1xyXG4gICAgICB0aGlzLnByaW50SW5OZXdXaW5kb3cocHJpbnRDb250ZW50Q2xvbmUpO1xyXG4gICAgfVxyXG4gICAgaWYgKHByaW50T3BlbldpbmRvdyA9PT0gZmFsc2UpIHtcclxuICAgICAgY29uc3QgcHJpbnRDb250ZW50Q2xvbmUgPSBwcmludENvbnRlbnQuY2xvbmVOb2RlKHRydWUpO1xyXG4gICAgICBjb25zdCBuYXRpdmVFbCA9IHRoaXMuY3JlYXRlQ29tcG9uZW50KHByaW50Q29udGVudENsb25lKS5uYXRpdmVFbGVtZW50O1xyXG4gICAgICB0aGlzLm9wZW5OZ3hQcmludGVyID0gbmF0aXZlRWw7XHJcbiAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodGhpcy5vcGVuTmd4UHJpbnRlcik7XHJcbiAgICAgIHRoaXMucHJpbnRDdXJyZW50V2luZG93KCk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBQcmludCB1c2luZyBhIG5ldyB3aW5kb3cgLyB0YWJcclxuICAgKiBAcGFyYW0gZGl2VG9QcmludFxyXG4gICAqL1xyXG4gIHByaXZhdGUgcHJpbnRJbk5ld1dpbmRvdyhkaXZUb1ByaW50OiBIVE1MRWxlbWVudCkge1xyXG4gICAgY29uc3QgcHJpbnRXaW5kb3cgPSB3aW5kb3cub3BlbignJywgJ1BSSU5UJyk7XHJcbiAgICBsZXQgdGl0bGUgPSBkb2N1bWVudC50aXRsZTtcclxuXHJcbiAgICBwcmludFdpbmRvdy5kb2N1bWVudC53cml0ZShcclxuICAgICAgJzxIV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SW5OZXdXaW5kb3cpIHtcclxuICAgICAgICAgICAgICB0aGF0LmV2ZW50YWRkZWRbcHJpbnRXaW5kb3cubmFtZV0gPSBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGF0LmNsZWFuVXAocHJpbnRXaW5kb3csIHByaW50V2l0aE9wZW5Jbk5ld1dpbmRvdyk7XHJcbiAgICAgICAgICAgIHRoYXQucHJpbnRXaW5kb3dPcGVuLm5leHQoZmFsc2UpO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICB9ICovXHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBDbG9zZSB0YWIgb3IgY2xlYW4gdXAgZG9tXHJcbiAgICogQGludGVybmFsXHJcbiAgICovXHJcbiAgcHJpdmF0ZSBjbGVhblVwKHByaW50V2luZG93OiBXaW5kb3csIHByaW50T3BlbldpbmRvdzogYm9vbGVhbikge1xyXG4gICAgaWYgKHByaW50T3BlbldpbmRvdyA9PT0gdHJ1ZSkge1xyXG4gICAgICBjb25zb2xlLmxvZygnY2xvc2UgcHJpbnQgd2luZG93Jyk7XHJcbiAgICAgIHByaW50V2luZG93LmNsb3NlKCk7XHJcbiAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgIHByaW50V2luZG93LmNsb3NlKCk7XHJcbiAgICAgIH0sIDIwKTtcclxuICAgIH1cclxuICAgIGlmIChwcmludE9wZW5XaW5kb3cgPT09IGZhbHNlKSB7XHJcbiAgICAgIGlmICh0aGlzLm9wZW5OZ3hQcmludGVyKSB7XHJcbiAgICAgICAgZG9jdW1lbnQuYm9keS5yZW1vdmVDaGlsZCh0aGlzLm9wZW5OZ3hQcmludGVyKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICogQ3JlYXRlIG5vZGUgb3IgYW5ndWxhciBjb21wb25lbnRcclxuICAgKiBAcGFyYW0gY29udGVudFxyXG4gICA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l0ZW1Ub1ByaW50Lm5hdGl2ZUVsZW1lbnQpO1xyXG4gIH1cclxufVxyXG4iXX0=

@@ -209,2 +209,3 @@ import { EventEmitter, Component, ElementRef, Renderer2, Output, TemplateRef, Injectable, Optional, ComponentFactoryResolver, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Directive, Input, NgModule } from '@angular/core';

this.$printWindowOpen = this.printWindowOpen.asObservable();
this.eventadded = [];
this.setRootConfigOptions(config);

@@ -294,3 +295,3 @@ }

*/
(val) => {
val => {
compRef.hostView.detectChanges();

@@ -348,3 +349,3 @@ console.log('completed:', val);

print(printContent, printOpenWindow) {
if (printOpenWindow) {
if (printOpenWindow === true) {
/** @type {?} */

@@ -354,3 +355,3 @@ const printContentClone = printContent.cloneNode(true);

}
else {
if (printOpenWindow === false) {
/** @type {?} */

@@ -387,3 +388,3 @@ const printContentClone = printContent.cloneNode(true);

*/
() => this.printWindow(printWindow, printWindowDoc)), this.timeToWaitRender);
() => this.printTabWindow(printWindow, printWindowDoc)), this.timeToWaitRender);
}

@@ -397,15 +398,9 @@ /**

*/
printWindow(printWindow, printWindowDoc) {
printTabWindow(printWindow, printWindowDoc) {
this.registerPrintEvent(printWindow, true);
this.printWindowOpen.next(true);
printWindowDoc.close(); // necessary for IE >= 10
printWindow.focus(); // necessary for IE >= 10*/
if (printWindow.document.execCommand('print') === false) {
if (printWindowDoc.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
() => { printWindow.close(); this.printWindowOpen.next(false); }), 20);
}

@@ -417,2 +412,3 @@ /**

printCurrentWindow() {
this.registerPrintEvent(window, false);
setTimeout((/**

@@ -426,8 +422,80 @@ * @return {?}

}
document.body.removeChild(this.openNgxPrinter);
this.printWindowOpen.next(false);
}), this.timeToWaitRender);
}
/**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
registerPrintEvent(printWindow, printWithOpenInNewWindow) {
/** @type {?} */
const that = this;
printWindow.focus(); // necessary for IE >= 10*/
if (that.eventadded[printWindow.name]) {
return;
}
printWindow.addEventListener('afterprint', (/**
* @return {?}
*/
() => {
this.eventadded[printWindow.name] = true;
// console.log('afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}));
/*
let mediaQueryList: MediaQueryList = null;
if (window.matchMedia) {
mediaQueryList = printWindow.matchMedia('print') as MediaQueryList;
this.eventadded[printWindow.name] = true;
mediaQueryList.addListener(function(mql) {
console.log(mql);
if (mql.matches) {
console.log('webkit equivalent of onbeforeprint');
}
if (!mql.matches) {
console.log('webkit equivalent of afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}
});
} */
}
/**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
cleanUp(printWindow, printOpenWindow) {
if (printOpenWindow === true) {
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
() => {
printWindow.close();
}), 20);
}
if (printOpenWindow === false) {
if (this.openNgxPrinter) {
document.body.removeChild(this.openNgxPrinter);
}
}
}
/**
* Create node or angular component
* \@internal
* @private
* @template T

@@ -551,2 +619,4 @@ * @param {?} content

NgxPrinterService.prototype.$printWindowOpen;
/** @type {?} */
NgxPrinterService.prototype.eventadded;
/**

@@ -553,0 +623,0 @@ * @type {?}

@@ -233,2 +233,3 @@ import { EventEmitter, Component, ElementRef, Renderer2, Output, TemplateRef, Injectable, Optional, ComponentFactoryResolver, Injector, ɵɵdefineInjectable, ɵɵinject, INJECTOR, Directive, Input, NgModule } from '@angular/core';

this.$printWindowOpen = this.printWindowOpen.asObservable();
this.eventadded = [];
this.setRootConfigOptions(config);

@@ -466,3 +467,3 @@ }

function (printContent, printOpenWindow) {
if (printOpenWindow) {
if (printOpenWindow === true) {
/** @type {?} */

@@ -472,3 +473,3 @@ var printContentClone = printContent.cloneNode(true);

}
else {
if (printOpenWindow === false) {
/** @type {?} */

@@ -516,3 +517,3 @@ var printContentClone = printContent.cloneNode(true);

*/
function () { return _this.printWindow(printWindow, printWindowDoc); }), this.timeToWaitRender);
function () { return _this.printTabWindow(printWindow, printWindowDoc); }), this.timeToWaitRender);
};

@@ -529,3 +530,3 @@ /**

*/
NgxPrinterService.prototype.printWindow = /**
NgxPrinterService.prototype.printTabWindow = /**
* Print window in new tab

@@ -538,15 +539,8 @@ * @private

function (printWindow, printWindowDoc) {
var _this = this;
this.registerPrintEvent(printWindow, true);
this.printWindowOpen.next(true);
printWindowDoc.close(); // necessary for IE >= 10
printWindow.focus(); // necessary for IE >= 10*/
if (printWindow.document.execCommand('print') === false) {
if (printWindowDoc.execCommand('print') === false) {
printWindow.print();
}
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
function () { printWindow.close(); _this.printWindowOpen.next(false); }), 20);
};

@@ -566,2 +560,3 @@ /**

var _this = this;
this.registerPrintEvent(window, false);
setTimeout((/**

@@ -575,8 +570,108 @@ * @return {?}

}
document.body.removeChild(_this.openNgxPrinter);
_this.printWindowOpen.next(false);
}), this.timeToWaitRender);
};
/**
* Listen to print event of window
* @param printWindow
*/
/**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
NgxPrinterService.prototype.registerPrintEvent = /**
* Listen to print event of window
* @param {?} printWindow
* @param {?} printWithOpenInNewWindow
* @return {?}
*/
function (printWindow, printWithOpenInNewWindow) {
var _this = this;
/** @type {?} */
var that = this;
printWindow.focus(); // necessary for IE >= 10*/
if (that.eventadded[printWindow.name]) {
return;
}
printWindow.addEventListener('afterprint', (/**
* @return {?}
*/
function () {
_this.eventadded[printWindow.name] = true;
// console.log('afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}));
/*
let mediaQueryList: MediaQueryList = null;
if (window.matchMedia) {
mediaQueryList = printWindow.matchMedia('print') as MediaQueryList;
this.eventadded[printWindow.name] = true;
mediaQueryList.addListener(function(mql) {
console.log(mql);
if (mql.matches) {
console.log('webkit equivalent of onbeforeprint');
}
if (!mql.matches) {
console.log('webkit equivalent of afterprint');
if (printWithOpenInNewWindow) {
that.eventadded[printWindow.name] = false;
}
that.cleanUp(printWindow, printWithOpenInNewWindow);
that.printWindowOpen.next(false);
}
});
} */
};
/**
* Close tab or clean up dom
* @internal
*/
/**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
NgxPrinterService.prototype.cleanUp = /**
* Close tab or clean up dom
* \@internal
* @private
* @param {?} printWindow
* @param {?} printOpenWindow
* @return {?}
*/
function (printWindow, printOpenWindow) {
if (printOpenWindow === true) {
console.log('close print window');
printWindow.close();
setTimeout((/**
* @return {?}
*/
function () {
printWindow.close();
}), 20);
}
if (printOpenWindow === false) {
if (this.openNgxPrinter) {
document.body.removeChild(this.openNgxPrinter);
}
}
};
/**
* Create node or angular component
* @param content
* @internal
*/
/**
* Create node or angular component
* \@internal
* @private
* @template T

@@ -587,2 +682,4 @@ * @param {?} content

NgxPrinterService.prototype.resolveNgContent = /**
* Create node or angular component
* \@internal
* @private

@@ -743,2 +840,4 @@ * @template T

NgxPrinterService.prototype.$printWindowOpen;
/** @type {?} */
NgxPrinterService.prototype.eventadded;
/**

@@ -745,0 +844,0 @@ * @type {?}

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

$printWindowOpen: Observable<boolean>;
eventadded: any[];
constructor(config: PrintServiceConfig, resolver: ComponentFactoryResolver, injector: Injector);

@@ -90,3 +91,3 @@ /**

*/
private printWindow;
private printTabWindow;
/**

@@ -96,2 +97,17 @@ * Print the whole current window

printCurrentWindow(): void;
/**
* Listen to print event of window
* @param printWindow
*/
registerPrintEvent(printWindow: Window, printWithOpenInNewWindow: boolean): void;
/**
* Close tab or clean up dom
* @internal
*/
private cleanUp;
/**
* Create node or angular component
* @param content
* @internal
*/
private resolveNgContent;

@@ -98,0 +114,0 @@ /**

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

{"__symbolic":"module","version":4,"metadata":{"Content":{"__symbolic":"interface"},"NgxPrinterService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":52,"character":5}}],null,null],"parameters":[{"__symbolic":"reference","name":"PrintServiceConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":53,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":54,"character":22}]}],"setRootConfigOptions":[{"__symbolic":"method"}],"printDiv":[{"__symbolic":"method"}],"printByClassName":[{"__symbolic":"method"}],"printAngular":[{"__symbolic":"method"}],"printImg":[{"__symbolic":"method"}],"printHTMLElement":[{"__symbolic":"method"}],"createComponent":[{"__symbolic":"method"}],"print":[{"__symbolic":"method"}],"printInNewWindow":[{"__symbolic":"method"}],"printWindow":[{"__symbolic":"method"}],"printCurrentWindow":[{"__symbolic":"method"}],"resolveNgContent":[{"__symbolic":"method"}],"addPrintItem":[{"__symbolic":"method"}],"removePrintItem":[{"__symbolic":"method"}],"printPrintItem":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"NgxPrinterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"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}"]}]}],"members":{"completed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":44,"character":34},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":44,"character":64}]}],"ngOnInit":[{"__symbolic":"method"}],"setCustomClass":[{"__symbolic":"method"}],"addImage":[{"__symbolic":"method"}]}},"NgxPrinterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxPrinterComponent"},{"__symbolic":"reference","name":"PrintItemDirective"}],"imports":[],"exports":[{"__symbolic":"reference","name":"NgxPrinterComponent"},{"__symbolic":"reference","name":"PrintItemDirective"}],"entryComponents":[{"__symbolic":"reference","name":"NgxPrinterComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxPrinterModule"},"providers":[{"provide":{"__symbolic":"reference","name":"PrintServiceConfig"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"PrintItem":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}]}},"PrintItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":9,"character":1},"arguments":[{"selector":"[ngxPrintItem]"}]}],"members":{"printName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":20,"character":26},{"__symbolic":"reference","name":"NgxPrinterService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"PrintServiceConfig":{"__symbolic":"class","members":{}}},"origins":{"Content":"./lib/ngx-printer.service","NgxPrinterService":"./lib/ngx-printer.service","NgxPrinterComponent":"./lib/ngx-printer.component","NgxPrinterModule":"./lib/ngx-printer.module","PrintItem":"./lib/print-item","PrintItemDirective":"./lib/print-item.directive","PrintServiceConfig":"./lib/print-service-config"},"importAs":"ngx-printer"}
{"__symbolic":"module","version":4,"metadata":{"Content":{"__symbolic":"interface"},"NgxPrinterService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":53,"character":5}}],null,null],"parameters":[{"__symbolic":"reference","name":"PrintServiceConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":54,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":55,"character":22}]}],"setRootConfigOptions":[{"__symbolic":"method"}],"printDiv":[{"__symbolic":"method"}],"printByClassName":[{"__symbolic":"method"}],"printAngular":[{"__symbolic":"method"}],"printImg":[{"__symbolic":"method"}],"printHTMLElement":[{"__symbolic":"method"}],"createComponent":[{"__symbolic":"method"}],"print":[{"__symbolic":"method"}],"printInNewWindow":[{"__symbolic":"method"}],"printTabWindow":[{"__symbolic":"method"}],"printCurrentWindow":[{"__symbolic":"method"}],"registerPrintEvent":[{"__symbolic":"method"}],"cleanUp":[{"__symbolic":"method"}],"resolveNgContent":[{"__symbolic":"method"}],"addPrintItem":[{"__symbolic":"method"}],"removePrintItem":[{"__symbolic":"method"}],"printPrintItem":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"NgxPrinterComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"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}"]}]}],"members":{"completed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":44,"character":34},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":44,"character":64}]}],"ngOnInit":[{"__symbolic":"method"}],"setCustomClass":[{"__symbolic":"method"}],"addImage":[{"__symbolic":"method"}]}},"NgxPrinterModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"NgxPrinterComponent"},{"__symbolic":"reference","name":"PrintItemDirective"}],"imports":[],"exports":[{"__symbolic":"reference","name":"NgxPrinterComponent"},{"__symbolic":"reference","name":"PrintItemDirective"}],"entryComponents":[{"__symbolic":"reference","name":"NgxPrinterComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxPrinterModule"},"providers":[{"provide":{"__symbolic":"reference","name":"PrintServiceConfig"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"PrintItem":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}]}},"PrintItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":9,"character":1},"arguments":[{"selector":"[ngxPrintItem]"}]}],"members":{"printName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":20,"character":26},{"__symbolic":"reference","name":"NgxPrinterService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"PrintServiceConfig":{"__symbolic":"class","members":{}}},"origins":{"Content":"./lib/ngx-printer.service","NgxPrinterService":"./lib/ngx-printer.service","NgxPrinterComponent":"./lib/ngx-printer.component","NgxPrinterModule":"./lib/ngx-printer.module","PrintItem":"./lib/print-item","PrintItemDirective":"./lib/print-item.directive","PrintServiceConfig":"./lib/print-service-config"},"importAs":"ngx-printer"}
{
"name": "ngx-printer",
"version": "0.2.0",
"version": "0.3.0",
"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