ngx-printer
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -23,2 +23,3 @@ (function (global, factory) { | ||
this._imgSrc = 'default'; | ||
this.completed = new i0.EventEmitter(); | ||
} | ||
@@ -100,2 +101,3 @@ Object.defineProperty(NgxPrinterComponent.prototype, "renderClass", { | ||
function (source) { | ||
var _this = this; | ||
/** @type {?} */ | ||
@@ -106,2 +108,9 @@ var natElement = this.elementRef.nativeElement; | ||
this.renderer.setAttribute(newImgElement, 'src', source); | ||
this.renderer.listen(newImgElement, 'load', ( /** | ||
* @param {?} evt | ||
* @return {?} | ||
*/function (evt) { | ||
console.log('loading completed', evt); | ||
_this.completed.emit(true); | ||
})); | ||
this.renderer.appendChild(natElement, newImgElement); | ||
@@ -123,2 +132,5 @@ }; | ||
}; | ||
NgxPrinterComponent.propDecorators = { | ||
completed: [{ type: i0.Output }] | ||
}; | ||
return NgxPrinterComponent; | ||
@@ -168,3 +180,3 @@ }()); | ||
*/ | ||
this.timeToWaitRender = 400; | ||
this.timeToWaitRender = 200; | ||
/** | ||
@@ -230,3 +242,3 @@ * Class used in component when printing to current window | ||
if (divToPrint) { | ||
this.print(divToPrint); | ||
this.print(divToPrint, this.printOpenWindow); | ||
} | ||
@@ -259,3 +271,3 @@ else { | ||
if (elementToPrint && elementToPrint.length > 0) { | ||
this.print(( /** @type {?} */(elementToPrint[0]))); | ||
this.print(( /** @type {?} */(elementToPrint[0])), this.printOpenWindow); | ||
} | ||
@@ -283,3 +295,3 @@ else { | ||
var nativeEl = this.createComponent(contentToPrint); | ||
this.print(nativeEl.nativeElement); | ||
this.print(nativeEl.nativeElement, this.printOpenWindow); | ||
}; | ||
@@ -300,5 +312,15 @@ /** | ||
function (imgSrc) { | ||
var _this = this; | ||
/** @type {?} */ | ||
var nativeEl = this.createComponent(null, imgSrc); | ||
this.print(nativeEl.nativeElement); | ||
var compRef = this.createComponent(null, imgSrc); | ||
/** @type {?} */ | ||
var openNewWindow = this.printOpenWindow; | ||
compRef.instance.completed.subscribe(( /** | ||
* @param {?} val | ||
* @return {?} | ||
*/function (val) { | ||
compRef.hostView.detectChanges(); | ||
console.log('completed:', val); | ||
_this.print(compRef.location.nativeElement, openNewWindow); | ||
})); | ||
}; | ||
@@ -320,3 +342,3 @@ /** | ||
function (nativeElement) { | ||
this.print(nativeElement); | ||
this.print(nativeElement, this.printOpenWindow); | ||
}; | ||
@@ -358,2 +380,3 @@ /** | ||
componentRef.instance.imgSrc = imgSrc; | ||
return componentRef; | ||
} | ||
@@ -365,2 +388,3 @@ componentRef.hostView.detectChanges(); | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
@@ -370,6 +394,7 @@ */ | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
*/ | ||
function (printContent) { | ||
if (this.printOpenWindow) { | ||
function (printContent, printOpenWindow) { | ||
if (printOpenWindow) { | ||
this.printInNewWindow(printContent); | ||
@@ -407,7 +432,11 @@ } | ||
var printWindow = window.open('', 'PRINT'); | ||
printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
var title = document.title; | ||
printWindow.document.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD><BODY></BODY></HTML>'); | ||
// printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
var printWindowDoc = printWindow.document; | ||
printWindowDoc.body.style.margin = '0 0'; | ||
printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
printWindowDoc.body.appendChild(divToPrint); | ||
// printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
setTimeout(( /** | ||
@@ -414,0 +443,0 @@ * @return {?} |
@@ -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,r,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.elementRef.nativeElement,n=this.renderer.createElement("img");this.renderer.setAttribute(n,"src",e),this.renderer.appendChild(t,n)},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);function t(e,t){this.elementRef=e,this.renderer=t,this._renderClass="default",this._imgSrc="default"}function i(){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):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]):console.log("element with id ${className} not found..")},p.prototype.printAngular=function(e){var t=this.createComponent(e);this.print(t.nativeElement)},p.prototype.printImg=function(e){var t=this.createComponent(null,e);this.print(t.nativeElement)},p.prototype.printHTMLElement=function(e){this.print(e)},p.prototype.createComponent=function(e,t){var n,r=this.resolver.resolveComponentFactory(o);if(e){var i=this.resolveNgContent(e);n=r.create(this.injector,i)}else n=r.create(this.injector);return n.instance.renderClass=this.renderClass,t&&(n.instance.imgSrc=t),n.hostView.detectChanges(),n.location},p.prototype.print=function(e){if(this.printOpenWindow)this.printInNewWindow(e);else{var t=e.cloneNode(!0),n=this.createComponent(t).nativeElement;this.openNgxPrinter=n,document.body.appendChild(this.openNgxPrinter),this.printCurrentWindow()}},p.prototype.printInNewWindow=function(e){var t=this,n=window.open("","PRINT");n.document.write(document.documentElement.innerHTML);var r=n.document;r.body.style.margin="0 0",r.body.innerHTML=e.outerHTML,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:i,decorators:[{type:n.Optional}]},{type:n.ComponentFactoryResolver},{type:n.Injector}]},p.ngInjectableDef=n.defineInjectable({factory:function(){return new p(n.inject(i,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 r.BehaviorSubject(!1),this._printItems=new r.BehaviorSubject([]),this.$printItems=this._printItems.asObservable(),this.timeToWaitRender=400,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:i,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=i,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)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),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})}); | ||
//# sourceMappingURL=ngx-printer.umd.min.js.map |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
import { Component, Renderer2, ElementRef } from '@angular/core'; | ||
import { Component, Renderer2, ElementRef, Output, EventEmitter } from '@angular/core'; | ||
/** | ||
@@ -23,2 +23,3 @@ * Component used to render content when printed to current window | ||
this._imgSrc = 'default'; | ||
this.completed = new EventEmitter(); | ||
} | ||
@@ -80,2 +81,10 @@ /** | ||
this.renderer.setAttribute(newImgElement, 'src', source); | ||
this.renderer.listen(newImgElement, 'load', (/** | ||
* @param {?} evt | ||
* @return {?} | ||
*/ | ||
(evt) => { | ||
console.log('loading completed', evt); | ||
this.completed.emit(true); | ||
})); | ||
this.renderer.appendChild(natElement, newImgElement); | ||
@@ -98,2 +107,5 @@ } | ||
]; | ||
NgxPrinterComponent.propDecorators = { | ||
completed: [{ type: Output }] | ||
}; | ||
if (false) { | ||
@@ -111,2 +123,4 @@ /** | ||
NgxPrinterComponent.prototype._imgSrc; | ||
/** @type {?} */ | ||
NgxPrinterComponent.prototype.completed; | ||
/** | ||
@@ -123,2 +137,2 @@ * @type {?} | ||
} | ||
//# sourceMappingURL=data:application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HRoaXMucmVuZGVyZXIuYXBwZW5kQ2hpbGQobmF0RWxlbWVudCwgbmV3SW1nRWxlbWVudCk7XG4gIH1cbn1cbiJdfQ== |
@@ -30,3 +30,3 @@ /** | ||
*/ | ||
this.timeToWaitRender = 400; | ||
this.timeToWaitRender = 200; | ||
/** | ||
@@ -73,3 +73,3 @@ * Class used in component when printing to current window | ||
if (divToPrint) { | ||
this.print(divToPrint); | ||
this.print(divToPrint, this.printOpenWindow); | ||
} | ||
@@ -91,3 +91,3 @@ else { | ||
if (elementToPrint && elementToPrint.length > 0) { | ||
this.print((/** @type {?} */ (elementToPrint[0]))); | ||
this.print((/** @type {?} */ (elementToPrint[0])), this.printOpenWindow); | ||
} | ||
@@ -106,3 +106,3 @@ else { | ||
const nativeEl = this.createComponent(contentToPrint); | ||
this.print(nativeEl.nativeElement); | ||
this.print(nativeEl.nativeElement, this.printOpenWindow); | ||
} | ||
@@ -116,4 +116,14 @@ /** | ||
/** @type {?} */ | ||
const nativeEl = this.createComponent(null, imgSrc); | ||
this.print(nativeEl.nativeElement); | ||
const compRef = this.createComponent(null, imgSrc); | ||
/** @type {?} */ | ||
const openNewWindow = this.printOpenWindow; | ||
compRef.instance.completed.subscribe((/** | ||
* @param {?} val | ||
* @return {?} | ||
*/ | ||
(val) => { | ||
compRef.hostView.detectChanges(); | ||
console.log('completed:', val); | ||
this.print(compRef.location.nativeElement, openNewWindow); | ||
})); | ||
} | ||
@@ -126,3 +136,3 @@ /** | ||
printHTMLElement(nativeElement) { | ||
this.print(nativeElement); | ||
this.print(nativeElement, this.printOpenWindow); | ||
} | ||
@@ -153,2 +163,3 @@ /** | ||
componentRef.instance.imgSrc = imgSrc; | ||
return componentRef; | ||
} | ||
@@ -160,6 +171,7 @@ componentRef.hostView.detectChanges(); | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
*/ | ||
print(printContent) { | ||
if (this.printOpenWindow) { | ||
print(printContent, printOpenWindow) { | ||
if (printOpenWindow) { | ||
this.printInNewWindow(printContent); | ||
@@ -186,7 +198,11 @@ } | ||
const printWindow = window.open('', 'PRINT'); | ||
printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
let title = document.title; | ||
printWindow.document.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD><BODY></BODY></HTML>'); | ||
// printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
const printWindowDoc = printWindow.document; | ||
printWindowDoc.body.style.margin = '0 0'; | ||
printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
printWindowDoc.body.appendChild(divToPrint); | ||
// printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
setTimeout((/** | ||
@@ -363,2 +379,2 @@ * @return {?} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1wcmludGVyLyIsInNvdXJjZXMiOlsibGliL25neC1wcmludGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFDTCxVQUFVLEVBQ1YsV0FBVyxFQUNYLHdCQUF3QixFQUN4QixRQUFRLEVBQ1IsUUFBUSxFQUVULE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBYyxlQUFlLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDbkQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7Ozs7OztBQVU1RCxNQUFNLE9BQU8saUJBQWlCOzs7Ozs7SUEyQjVCLFlBQ2MsTUFBMEIsRUFDOUIsUUFBa0MsRUFDbEMsUUFBa0I7UUFEbEIsYUFBUSxHQUFSLFFBQVEsQ0FBMEI7UUFDbEMsYUFBUSxHQ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ZW50KTtcbiAgfVxuXG59XG4iXX0= |
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
import { Component, Renderer2, ElementRef } from '@angular/core'; | ||
import { Component, Renderer2, ElementRef, Output, EventEmitter } from '@angular/core'; | ||
/** | ||
@@ -19,2 +19,3 @@ * Component used to render content when printed to current window | ||
this._imgSrc = 'default'; | ||
this.completed = new EventEmitter(); | ||
} | ||
@@ -100,2 +101,3 @@ Object.defineProperty(NgxPrinterComponent.prototype, "renderClass", { | ||
function (source) { | ||
var _this = this; | ||
/** @type {?} */ | ||
@@ -106,2 +108,10 @@ var natElement = this.elementRef.nativeElement; | ||
this.renderer.setAttribute(newImgElement, 'src', source); | ||
this.renderer.listen(newImgElement, 'load', (/** | ||
* @param {?} evt | ||
* @return {?} | ||
*/ | ||
function (evt) { | ||
console.log('loading completed', evt); | ||
_this.completed.emit(true); | ||
})); | ||
this.renderer.appendChild(natElement, newImgElement); | ||
@@ -121,2 +131,5 @@ }; | ||
]; }; | ||
NgxPrinterComponent.propDecorators = { | ||
completed: [{ type: Output }] | ||
}; | ||
return NgxPrinterComponent; | ||
@@ -137,2 +150,4 @@ }()); | ||
NgxPrinterComponent.prototype._imgSrc; | ||
/** @type {?} */ | ||
NgxPrinterComponent.prototype.completed; | ||
/** | ||
@@ -149,2 +164,2 @@ * @type {?} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LXByaW50ZXIvIiwic291cmNlcyI6WyJsaWIvbmd4LXByaW50ZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUVULFNBQVMsRUFDVCxVQUFVLEVBQ1gsTUFBTSxlQUFlLENBQUM7Ozs7QUFLdkI7SUE4QkUsNkJBQW9CLFVBQXNCLEVBQVUs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ToWaitRender = 400; | ||
this.timeToWaitRender = 200; | ||
/** | ||
@@ -87,3 +87,3 @@ * Class used in component when printing to current window | ||
if (divToPrint) { | ||
this.print(divToPrint); | ||
this.print(divToPrint, this.printOpenWindow); | ||
} | ||
@@ -116,3 +116,3 @@ else { | ||
if (elementToPrint && elementToPrint.length > 0) { | ||
this.print((/** @type {?} */ (elementToPrint[0]))); | ||
this.print((/** @type {?} */ (elementToPrint[0])), this.printOpenWindow); | ||
} | ||
@@ -140,3 +140,3 @@ else { | ||
var nativeEl = this.createComponent(contentToPrint); | ||
this.print(nativeEl.nativeElement); | ||
this.print(nativeEl.nativeElement, this.printOpenWindow); | ||
}; | ||
@@ -157,5 +157,16 @@ /** | ||
function (imgSrc) { | ||
var _this = this; | ||
/** @type {?} */ | ||
var nativeEl = this.createComponent(null, imgSrc); | ||
this.print(nativeEl.nativeElement); | ||
var compRef = this.createComponent(null, imgSrc); | ||
/** @type {?} */ | ||
var openNewWindow = this.printOpenWindow; | ||
compRef.instance.completed.subscribe((/** | ||
* @param {?} val | ||
* @return {?} | ||
*/ | ||
function (val) { | ||
compRef.hostView.detectChanges(); | ||
console.log('completed:', val); | ||
_this.print(compRef.location.nativeElement, openNewWindow); | ||
})); | ||
}; | ||
@@ -177,3 +188,3 @@ /** | ||
function (nativeElement) { | ||
this.print(nativeElement); | ||
this.print(nativeElement, this.printOpenWindow); | ||
}; | ||
@@ -215,2 +226,3 @@ /** | ||
componentRef.instance.imgSrc = imgSrc; | ||
return componentRef; | ||
} | ||
@@ -222,2 +234,3 @@ componentRef.hostView.detectChanges(); | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
@@ -227,6 +240,7 @@ */ | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
*/ | ||
function (printContent) { | ||
if (this.printOpenWindow) { | ||
function (printContent, printOpenWindow) { | ||
if (printOpenWindow) { | ||
this.printInNewWindow(printContent); | ||
@@ -264,7 +278,11 @@ } | ||
var printWindow = window.open('', 'PRINT'); | ||
printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
var title = document.title; | ||
printWindow.document.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD><BODY></BODY></HTML>'); | ||
// printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
var printWindowDoc = printWindow.document; | ||
printWindowDoc.body.style.margin = '0 0'; | ||
printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
printWindowDoc.body.appendChild(divToPrint); | ||
// printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
setTimeout((/** | ||
@@ -495,2 +513,2 @@ * @return {?} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXByaW50ZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1wcmludGVyLyIsInNvdXJjZXMiOlsibGliL25neC1wcmludGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFDTCxVQUFVLEVBQ1YsV0FBVyxFQUNYLHdCQUF3QixFQUN4QixRQUFRLEVBQ1IsUUFBUSxFQUVULE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBYyxlQUFlLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDbkQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7Ozs7OztBQU81RDtJQThCRSwyQkFDYyxNQUEwQixFQUM5QixRQUFrQyxFQUNsQyxRQUFrQjtRQURsQixhQUFRLEdBQVIsUUFBUSxDQUEwQjtRQUNsQyxhQUFRLEdBQVIsUUFBUSxDQUFVO1FBN0JwQixvQkFBZSxHQUFHLElBQUksZUFBZSxDQUFVLEtBQUssQ0FBQyxDQUFD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gPSAnMCAwJztcbiAgICBwcmludFdpbmRvd0RvYy5ib2R5LmFwcGVuZENoaWxkKGRpdlRvUHJpbnQpO1xuICAgIC8vIHByaW50V2luZG93RG9jLmJvZHkuaW5uZXJIVE1MID0gZGl2VG9QcmludC5vdXRlckhUTUw7XG4gICAgc2V0VGltZW91dCgoKSA9PiB0aGlzLnByaW50V2luZG93KHByaW50V2luZG93LCBwcmludFdpbmRvd0RvYyksIHRoaXMudGltZVRvV2FpdFJlbmRlcik7XG4gIH1cblxuICAvKipcbiAgICogUHJpbnQgd2luZG93IGluIG5ldyB0YWJcbiAgICovXG4gIHByaXZhdGUgcHJpbnRXaW5kb3cocHJpbnRXaW5kb3c6IFdpbmRvdywgcHJpbnRXaW5kb3dEb2M6IERvY3VtZW50KSB7XG4gICAgdGhpcy5wcmludFdpbmRvd09wZW4ubmV4dCh0cnVlKTtcbiAgICBwcmludFdpbmRvd0RvYy5jbG9zZSgpOyAvLyBuZWNlc3NhcnkgZm9yIElFID49IDEwXG4gICAgcHJpbnRXaW5kb3cuZm9jdXMoKTsgLy8gbmVjZXNzYXJ5IGZvciBJRSA+PSAxMCovXG4gICAgcHJpbnRXaW5kb3cucHJpbnQoKTtcbiAgICBjb25zb2xlLmxvZygnY2xvc2UgcHJpbnQgd2luZG93Jyk7XG4gICAgcHJpbnRXaW5kb3cuY2xvc2UoKTtcbiAgICBzZXRUaW1lb3V0KCgpID0+ICB7IHByaW50V2luZG93LmNsb3NlKCk7IHRoaXMucHJpbnRXaW5kb3dPcGVuLm5leHQoZmFsc2UpOyB9LCAyMCk7XG4gIH1cblxuICAvKipcbiAgICogUHJpbnQgdGhlIHdob2xlIGN1cnJlbnQgd2luZG93XG4gICAqL1xuICBwcmludEN1cnJlbnRXaW5kb3coKSB7XG4gICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICB0aGlzLnByaW50V2luZG93T3Blbi5uZXh0KHRydWUpO1xuICAgICAgd2luZG93LnByaW50KCk7XG4gICAgICBkb2N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KiBBZGQgYSBuZXcgaXRlbSB0byBwcmludFxuICAgKiBAcGFyYW0gbmV3UHJpbnRJdGVtICBIVE1MIGlkXG4gICAqL1xuICBwdWJsaWMgYWRkUHJpbnRJdGVtKG5ld1ByaW50SXRlbTogUHJpbnRJdGVtKTogdm9pZCB7XG4gICAgY29uc3QgdG1wSXRlbXMgPSB0aGlzLl9wcmludEl0ZW1zLmdldFZhbHVlKCk7XG4gICAgdG1wSXRlbXMucHVzaChuZXdQcmludEl0ZW0pO1xuICAgIHRoaXMuX3ByaW50SXRlbXMubmV4dCh0bXBJdGVtcyk7XG4gIH1cblxuICAvKipcbiAgICogRGVsZXRlIGEgcHJpbnQgaXRlbSBmcm9tIHNlcnZpY2VcbiAgICogQHBhcmFtIGlkT2ZJdGVtVG9SZW1vdmUgXG4gICAqL1xuICBwdWJsaWMgcmVtb3ZlUHJpbnRJdGVtKGlkT2ZJdGVtVG9SZW1vdmU6IHN0cmluZyk6IHZvaWQge1xuICAgIGNvbnN0IHRtcEl0ZW1zID0gdGhpcy5fcHJpbnRJdGVtcy5nZXRWYWx1ZSgpO1xuICAgIGNvbnN0IG5ld0lpdGVtcyA9IHRtcEl0ZW1zLmZpbHRlcihpdGVtID0+IGl0ZW0uaWQgIT09IGlkT2ZJdGVtVG9SZW1vdmUpO1xuICAgIHRoaXMuX3ByaW50SXRlbXMubmV4dChuZXdJaXRlbXMpO1xuICB9XG5cbiAgLyoqXG4gICAqIFByaW50IGEgcHJpbnQgSXRlbVxuICAgKiBAcGFyYW0gcHJpbnRJdGVtVG9QcmludCBcbiAgICovXG4gIHB1YmxpYyBwcmludFByaW50SXRlbShwcmludEl0ZW1Ub1ByaW50OiBQcmludEl0ZW0pOiB2b2lkIHtcbiAgICB0aGlzLnByaW50SFRNTEVsZW1lbnQocHJpbnRJdGVtVG9QcmludC5uYXRpdmVFbGVtZW50KTtcbiAgfVxuXG59XG4iXX0= |
import { BehaviorSubject } from 'rxjs'; | ||
import { Component, Renderer2, ElementRef, Injectable, TemplateRef, ComponentFactoryResolver, Injector, Optional, NgModule, Directive, Input, defineInjectable, inject, INJECTOR } from '@angular/core'; | ||
import { Component, Renderer2, ElementRef, Output, EventEmitter, Injectable, TemplateRef, ComponentFactoryResolver, Injector, Optional, NgModule, Directive, Input, defineInjectable, inject, INJECTOR } from '@angular/core'; | ||
@@ -24,2 +24,3 @@ /** | ||
this._imgSrc = 'default'; | ||
this.completed = new EventEmitter(); | ||
} | ||
@@ -81,2 +82,10 @@ /** | ||
this.renderer.setAttribute(newImgElement, 'src', source); | ||
this.renderer.listen(newImgElement, 'load', (/** | ||
* @param {?} evt | ||
* @return {?} | ||
*/ | ||
(evt) => { | ||
console.log('loading completed', evt); | ||
this.completed.emit(true); | ||
})); | ||
this.renderer.appendChild(natElement, newImgElement); | ||
@@ -99,2 +108,5 @@ } | ||
]; | ||
NgxPrinterComponent.propDecorators = { | ||
completed: [{ type: Output }] | ||
}; | ||
@@ -144,3 +156,3 @@ /** | ||
*/ | ||
this.timeToWaitRender = 400; | ||
this.timeToWaitRender = 200; | ||
/** | ||
@@ -187,3 +199,3 @@ * Class used in component when printing to current window | ||
if (divToPrint) { | ||
this.print(divToPrint); | ||
this.print(divToPrint, this.printOpenWindow); | ||
} | ||
@@ -205,3 +217,3 @@ else { | ||
if (elementToPrint && elementToPrint.length > 0) { | ||
this.print((/** @type {?} */ (elementToPrint[0]))); | ||
this.print((/** @type {?} */ (elementToPrint[0])), this.printOpenWindow); | ||
} | ||
@@ -220,3 +232,3 @@ else { | ||
const nativeEl = this.createComponent(contentToPrint); | ||
this.print(nativeEl.nativeElement); | ||
this.print(nativeEl.nativeElement, this.printOpenWindow); | ||
} | ||
@@ -230,4 +242,14 @@ /** | ||
/** @type {?} */ | ||
const nativeEl = this.createComponent(null, imgSrc); | ||
this.print(nativeEl.nativeElement); | ||
const compRef = this.createComponent(null, imgSrc); | ||
/** @type {?} */ | ||
const openNewWindow = this.printOpenWindow; | ||
compRef.instance.completed.subscribe((/** | ||
* @param {?} val | ||
* @return {?} | ||
*/ | ||
(val) => { | ||
compRef.hostView.detectChanges(); | ||
console.log('completed:', val); | ||
this.print(compRef.location.nativeElement, openNewWindow); | ||
})); | ||
} | ||
@@ -240,3 +262,3 @@ /** | ||
printHTMLElement(nativeElement) { | ||
this.print(nativeElement); | ||
this.print(nativeElement, this.printOpenWindow); | ||
} | ||
@@ -267,2 +289,3 @@ /** | ||
componentRef.instance.imgSrc = imgSrc; | ||
return componentRef; | ||
} | ||
@@ -274,6 +297,7 @@ componentRef.hostView.detectChanges(); | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
*/ | ||
print(printContent) { | ||
if (this.printOpenWindow) { | ||
print(printContent, printOpenWindow) { | ||
if (printOpenWindow) { | ||
this.printInNewWindow(printContent); | ||
@@ -300,7 +324,11 @@ } | ||
const printWindow = window.open('', 'PRINT'); | ||
printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
let title = document.title; | ||
printWindow.document.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD><BODY></BODY></HTML>'); | ||
// printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
const printWindowDoc = printWindow.document; | ||
printWindowDoc.body.style.margin = '0 0'; | ||
printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
printWindowDoc.body.appendChild(divToPrint); | ||
// printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
setTimeout((/** | ||
@@ -307,0 +335,0 @@ * @return {?} |
import { BehaviorSubject } from 'rxjs'; | ||
import { Component, Renderer2, ElementRef, Injectable, TemplateRef, ComponentFactoryResolver, Injector, Optional, NgModule, Directive, Input, defineInjectable, inject, INJECTOR } from '@angular/core'; | ||
import { Component, Renderer2, ElementRef, Output, EventEmitter, Injectable, TemplateRef, ComponentFactoryResolver, Injector, Optional, NgModule, Directive, Input, defineInjectable, inject, INJECTOR } from '@angular/core'; | ||
@@ -20,2 +20,3 @@ /** | ||
this._imgSrc = 'default'; | ||
this.completed = new EventEmitter(); | ||
} | ||
@@ -101,2 +102,3 @@ Object.defineProperty(NgxPrinterComponent.prototype, "renderClass", { | ||
function (source) { | ||
var _this = this; | ||
/** @type {?} */ | ||
@@ -107,2 +109,10 @@ var natElement = this.elementRef.nativeElement; | ||
this.renderer.setAttribute(newImgElement, 'src', source); | ||
this.renderer.listen(newImgElement, 'load', (/** | ||
* @param {?} evt | ||
* @return {?} | ||
*/ | ||
function (evt) { | ||
console.log('loading completed', evt); | ||
_this.completed.emit(true); | ||
})); | ||
this.renderer.appendChild(natElement, newImgElement); | ||
@@ -122,2 +132,5 @@ }; | ||
]; }; | ||
NgxPrinterComponent.propDecorators = { | ||
completed: [{ type: Output }] | ||
}; | ||
return NgxPrinterComponent; | ||
@@ -168,3 +181,3 @@ }()); | ||
*/ | ||
this.timeToWaitRender = 400; | ||
this.timeToWaitRender = 200; | ||
/** | ||
@@ -230,3 +243,3 @@ * Class used in component when printing to current window | ||
if (divToPrint) { | ||
this.print(divToPrint); | ||
this.print(divToPrint, this.printOpenWindow); | ||
} | ||
@@ -259,3 +272,3 @@ else { | ||
if (elementToPrint && elementToPrint.length > 0) { | ||
this.print((/** @type {?} */ (elementToPrint[0]))); | ||
this.print((/** @type {?} */ (elementToPrint[0])), this.printOpenWindow); | ||
} | ||
@@ -283,3 +296,3 @@ else { | ||
var nativeEl = this.createComponent(contentToPrint); | ||
this.print(nativeEl.nativeElement); | ||
this.print(nativeEl.nativeElement, this.printOpenWindow); | ||
}; | ||
@@ -300,5 +313,16 @@ /** | ||
function (imgSrc) { | ||
var _this = this; | ||
/** @type {?} */ | ||
var nativeEl = this.createComponent(null, imgSrc); | ||
this.print(nativeEl.nativeElement); | ||
var compRef = this.createComponent(null, imgSrc); | ||
/** @type {?} */ | ||
var openNewWindow = this.printOpenWindow; | ||
compRef.instance.completed.subscribe((/** | ||
* @param {?} val | ||
* @return {?} | ||
*/ | ||
function (val) { | ||
compRef.hostView.detectChanges(); | ||
console.log('completed:', val); | ||
_this.print(compRef.location.nativeElement, openNewWindow); | ||
})); | ||
}; | ||
@@ -320,3 +344,3 @@ /** | ||
function (nativeElement) { | ||
this.print(nativeElement); | ||
this.print(nativeElement, this.printOpenWindow); | ||
}; | ||
@@ -358,2 +382,3 @@ /** | ||
componentRef.instance.imgSrc = imgSrc; | ||
return componentRef; | ||
} | ||
@@ -365,2 +390,3 @@ componentRef.hostView.detectChanges(); | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
@@ -370,6 +396,7 @@ */ | ||
* @param {?} printContent | ||
* @param {?} printOpenWindow | ||
* @return {?} | ||
*/ | ||
function (printContent) { | ||
if (this.printOpenWindow) { | ||
function (printContent, printOpenWindow) { | ||
if (printOpenWindow) { | ||
this.printInNewWindow(printContent); | ||
@@ -407,7 +434,11 @@ } | ||
var printWindow = window.open('', 'PRINT'); | ||
printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
var title = document.title; | ||
printWindow.document.write('<HTML><HEAD><TITLE>' + title + '</TITLE></HEAD><BODY></BODY></HTML>'); | ||
// printWindow.document.write(document.documentElement.innerHTML); | ||
/** @type {?} */ | ||
var printWindowDoc = printWindow.document; | ||
printWindowDoc.body.style.margin = '0 0'; | ||
printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
printWindowDoc.body.appendChild(divToPrint); | ||
// printWindowDoc.body.innerHTML = divToPrint.outerHTML; | ||
setTimeout((/** | ||
@@ -414,0 +445,0 @@ * @return {?} |
@@ -1,2 +0,2 @@ | ||
import { OnInit, Renderer2, ElementRef } from '@angular/core'; | ||
import { OnInit, Renderer2, ElementRef, EventEmitter } from '@angular/core'; | ||
/** | ||
@@ -15,2 +15,3 @@ * Component used to render content when printed to current window | ||
imgSrc: string; | ||
completed: EventEmitter<boolean>; | ||
constructor(elementRef: ElementRef, renderer: Renderer2); | ||
@@ -17,0 +18,0 @@ ngOnInit(): void; |
@@ -70,3 +70,3 @@ import { PrintItem } from './print-item'; | ||
private: any; | ||
print(printContent: any): void; | ||
print(printContent: any, printOpenWindow: boolean): void; | ||
/** | ||
@@ -73,0 +73,0 @@ * Print using a new window / tab |
@@ -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":19,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":50,"character":5}}],null,null],"parameters":[{"__symbolic":"reference","name":"PrintServiceConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":51,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":52,"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":10,"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":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":40,"character":34},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":40,"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":19,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":50,"character":5}}],null,null],"parameters":[{"__symbolic":"reference","name":"PrintServiceConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":51,"character":22},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":52,"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"} |
{ | ||
"name": "ngx-printer", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"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
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
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
272460
3721