ngx-barcode
Advanced tools
Comparing version 0.1.0 to 0.1.2
14
index.js
@@ -12,3 +12,3 @@ import { Component, Input, NgModule, Renderer2, ViewChild } from '@angular/core'; | ||
// @Input() elementType: "svg"|"img"|"canvas"="svg"; | ||
this.cssClass = "barcode"; // this should be done more elegantly | ||
this.cssClass = 'barcode'; // this should be done more elegantly | ||
this.format = 'CODE128'; | ||
@@ -31,4 +31,4 @@ this.lineColor = '#000000'; | ||
this.marginRight = 10; | ||
this.value = ''; | ||
this.valid = function () { return true; }; | ||
this.value = ""; | ||
} | ||
@@ -74,6 +74,8 @@ Object.defineProperty(NgxBarcodeComponent.prototype, "options", { | ||
NgxBarcodeComponent.prototype.createBarcode = function () { | ||
if (!this.value) | ||
if (!this.value) { | ||
return; | ||
var /** @type {?} */ element = (this.renderer.createElement("svg", "svg")); | ||
var /** @type {?} */ bc = jsbarcode(element, this.value, this.options); | ||
} | ||
var /** @type {?} */ element = (this.renderer.createElement('svg', 'svg')); | ||
jsbarcode(element, this.value, this.options); | ||
this.bcElement.nativeElement.innerHTML = element.outerHTML; | ||
@@ -115,5 +117,5 @@ }; | ||
'marginRight': [{ type: Input, args: ['bc-margin-right',] },], | ||
'valid': [{ type: Input, args: ['bc-valid',] },], | ||
'value': [{ type: Input, args: ['bc-value',] },], | ||
'bcElement': [{ type: ViewChild, args: ['bcElement',] },], | ||
'valid': [{ type: Input, args: ['bc-valid',] },], | ||
}; | ||
@@ -120,0 +122,0 @@ |
@@ -22,5 +22,5 @@ import { OnChanges, Renderer2, ElementRef } from '@angular/core'; | ||
marginRight: number; | ||
valid: () => boolean; | ||
value: string; | ||
bcElement: ElementRef; | ||
valid: () => boolean; | ||
readonly options: { | ||
@@ -27,0 +27,0 @@ format: string; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"NgxBarcodeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"NgxBarcodeComponent"}],"exports":[{"__symbolic":"reference","name":"NgxBarcodeComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"NgxBarcodeModule"},"providers":[]}}}},"NgxBarcodeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ngx-barcode","template":"<div #bcElement [class]=\"cssClass\"></div>","styles":[]}]}],"members":{"cssClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-class"]}]}],"format":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-format"]}]}],"lineColor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-line-color"]}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-width"]}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-height"]}]}],"displayValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-display-value"]}]}],"fontOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-font-options"]}]}],"font":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-font"]}]}],"textAlign":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-text-align"]}]}],"textPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-text-position"]}]}],"textMargin":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-text-margin"]}]}],"fontSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-font-size"]}]}],"background":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-background"]}]}],"margin":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin"]}]}],"marginTop":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-top"]}]}],"marginBottom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-bottom"]}]}],"marginLeft":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-left"]}]}],"marginRight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-right"]}]}],"valid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-valid"]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-value"]}]}],"bcElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["bcElement"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnChanges":[{"__symbolic":"method"}],"createBarcode":[{"__symbolic":"method"}]}}},"origins":{"NgxBarcodeModule":"./index","NgxBarcodeComponent":"./ngx-barcode.component"},"importAs":"ngx-barcode"} | ||
{"__symbolic":"module","version":3,"metadata":{"NgxBarcodeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"NgxBarcodeComponent"}],"exports":[{"__symbolic":"reference","name":"NgxBarcodeComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"NgxBarcodeModule"},"providers":[]}}}},"NgxBarcodeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ngx-barcode","template":"<div #bcElement [class]=\"cssClass\"></div>","styles":[]}]}],"members":{"cssClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-class"]}]}],"format":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-format"]}]}],"lineColor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-line-color"]}]}],"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-width"]}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-height"]}]}],"displayValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-display-value"]}]}],"fontOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-font-options"]}]}],"font":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-font"]}]}],"textAlign":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-text-align"]}]}],"textPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-text-position"]}]}],"textMargin":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-text-margin"]}]}],"fontSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-font-size"]}]}],"background":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-background"]}]}],"margin":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin"]}]}],"marginTop":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-top"]}]}],"marginBottom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-bottom"]}]}],"marginLeft":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-left"]}]}],"marginRight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-margin-right"]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-value"]}]}],"bcElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["bcElement"]}]}],"valid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["bc-valid"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"ngOnChanges":[{"__symbolic":"method"}],"createBarcode":[{"__symbolic":"method"}]}}},"origins":{"NgxBarcodeModule":"./index","NgxBarcodeComponent":"./ngx-barcode.component"},"importAs":"ngx-barcode"} |
{ | ||
"name": "ngx-barcode", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"description": "An angular component for Angular 4+ for creating 1-D barcodes based on Lindell's JsBarcode", | ||
"homepage": "https://yobryon.github.io/ngx-barcode", | ||
"repository": { | ||
@@ -13,3 +15,5 @@ "type": "git", | ||
"keywords": [ | ||
"angular" | ||
"angular", | ||
"barcode", | ||
"jsbarcode" | ||
], | ||
@@ -26,3 +30,6 @@ "license": "MIT", | ||
"zone.js": "^0.8.4" | ||
}, | ||
"dependencies": { | ||
"jsbarcode": "^3.6.0" | ||
} | ||
} |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
14112
7
204
1
0
80
4
+ Addedjsbarcode@^3.6.0
+ Addedjsbarcode@3.11.6(transitive)