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

ember-cli-barcode

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-barcode - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

.template-lintrc.js

67

addon/components/bar-code.js
import Component from "@ember/component";
import { get } from "@ember/object";
import { computed } from "@ember/object";

@@ -19,3 +18,3 @@ import { isBlank } from "@ember/utils";

// https://stackoverflow.com/questions/42002664/accessing-ember-environment-config-env-from-addon
cfg: computed(function() {
config: computed(function() {
return (

@@ -32,11 +31,11 @@ getOwner(this).resolveRegistration("config:environment")[

defaults: computed(function() {
let cfg = this.get("cfg");
let cfg = this.config;
return {
format: this.get("format") || cfg.format || "CODE128",
mod43: this.get("mod43") || cfg.mod43 || false, // only used with code39 barcodes
width: this.get("width") || cfg.width || 2,
height: this.get("height") || cfg.height || 100,
format: this.format || cfg.format || "CODE128",
mod43: this.mod43 || cfg.mod43 || false, // only used with code39 barcodes
width: this.width || cfg.width || 2,
height: this.height || cfg.height || 100,
displayValue: isBlank(this.get("displayValue"))
displayValue: isBlank(this.displayValue)
? isBlank(cfg.displayValue)

@@ -47,30 +46,30 @@ ? true

fontOptions: this.get("fontOptions") || cfg.fontOptions || "",
font: this.get("font") || cfg.font || "monospace",
textAlign: this.get("textAlign") || cfg.textAlign || "center",
textPosition: this.get("textPosition") || cfg.textPosition || "bottom",
textMargin: this.get("textMargin") || cfg.textMargin || 2,
fontSize: this.get("fontSize") || cfg.fontSize || 20,
background: this.get("background") || cfg.background || "#ffffff",
lineColor: this.get("lineColor") || cfg.lineColor || "#000000",
margin: isBlank(this.get("margin")) ? 10 : this.get("margin"),
fontOptions: this.fontOptions || cfg.fontOptions || "",
font: this.font || cfg.font || "monospace",
textAlign: this.textAlign || cfg.textAlign || "center",
textPosition: this.textPosition || cfg.textPosition || "bottom",
textMargin: this.textMargin || cfg.textMargin || 2,
fontSize: this.fontSize || cfg.fontSize || 20,
background: this.background || cfg.background || "#ffffff",
lineColor: this.lineColor || cfg.lineColor || "#000000",
margin: isBlank(this.margin) ? 10 : this.margin,
marginTop: isBlank(this.get("marginTop"))
marginTop: isBlank(this.marginTop)
? cfg.marginTop || undefined
: this.get("marginTop"),
: this.marginTop,
marginBottom: isBlank(this.get("marginBottom"))
marginBottom: isBlank(this.marginBottom)
? cfg.marginBottom || undefined
: this.get("marginBottom"),
: this.marginBottom,
marginLeft: isBlank(this.get("marginLeft"))
marginLeft: isBlank(this.marginLeft)
? cfg.marginLeft || undefined
: this.get("marginLeft"),
: this.marginLeft,
marginRight: isBlank(this.get("marginRight"))
marginRight: isBlank(this.marginRight)
? cfg.marginRight || undefined
: this.get("marginRight"),
: this.marginRight,
flat: this.get("flat") || cfg.flat || false,
lastChar: this.get("lastChar") || cfg.lastChar || ""
flat: this.flat || cfg.flat || false,
lastChar: this.lastChar || cfg.lastChar || ""
};

@@ -88,3 +87,3 @@ }),

// if options object is passed in, use it
let options = this.get("options") || this.get("defaults");
let options = this.options || this.defaults;

@@ -95,3 +94,3 @@ // set the call back on options

// now render the barcode
JsBarcode(`#${this.get("thisId")}`, get(this, "value"), options);
JsBarcode(`#${this.thisId}`, this.value, options);

@@ -102,3 +101,3 @@ // add accessability to barcode

let cfg = this.get("cfg");
let cfg = this.config;

@@ -111,8 +110,8 @@ // if they want to hide them, apply and exit

let text = `${this.get("altText") ||
let text = `${this.altText ||
cfg.altText ||
this.get("defaultText")}`;
this.defaultText}`;
// exclude the value from the alt text?
if (!cfg.excludeAltValue) text = `${text} ${this.get("value")}`;
if (!cfg.excludeAltValue) text = `${text} ${this.value}`;

@@ -130,3 +129,3 @@ switch (this.element.nodeName) {

this.element.setAttribute("aria-labelledby", "title");
title = document.createElementNS(this.get("svgns"), "title");
title = document.createElementNS(this.svgns, "title");
title.innerHTML = text;

@@ -133,0 +132,0 @@ this.element.appendChild(title);

# Change Log
## 0.3.5
* Bumped ember version to 3.4.3
* Updated dependencies
## 0.3.4

@@ -4,0 +9,0 @@

/* eslint-env node */
/* eslint node/no-extraneous-require: 0 */
// turn off extraneous-require because "silent-error" not in package.json
'use strict';

@@ -6,3 +8,2 @@

var Funnel = require('broccoli-funnel');
// var MergeTrees = require('broccoli-merge-trees');
var SilentError = require('silent-error'); // From ember-cli

@@ -34,3 +35,2 @@

throw new SilentError('ember-cli-barcode file option is not a valid JsBarcode option, `all` or `falsy`');
// return false; // dead code
}

@@ -37,0 +37,0 @@ return `barcodes/JsBarcode.${file}.min.js`;

{
"name": "ember-cli-barcode",
"version": "0.3.4",
"version": "0.3.5",
"description": "Ember barcode generator using the JSBarcode library.",

@@ -10,4 +10,12 @@ "keywords": [

],
"repository": {
"type": "git",
"url": "https://github.com/maxwondercorn/ember-cli-barcode"
},
"license": "MIT",
"author": "Max Wondercorn aka Gregg Martell",
"directories": {
"doc": "doc",
"test": "tests"
},
"contributors": [

@@ -17,10 +25,2 @@ "christopher-noq <> (https://github.com/christopher-noq?tab=repositories)",

],
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": {
"type": "git",
"url": "https://github.com/maxwondercorn/ember-cli-barcode"
},
"ember-addon": {

@@ -32,34 +32,44 @@ "demoURL": "https://maxwondercorn.github.io/ember-cli-barcode/",

"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember try:each",
"test": "ember test",
"test:all": "ember try:each",
"deploy": "ember build && ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\" && git push origin gh-pages:gh-pages"
},
"dependencies": {
"broccoli-funnel": "^2.0.1",
"broccoli-funnel": "^2.0.2",
"broccoli-merge-trees": "^3.0.2",
"ember-cli-babel": "^7.4.1",
"ember-cli-babel": "^7.5.0",
"jsbarcode": "^3.11.0"
},
"devDependencies": {
"@ember/jquery": "^0.6.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "^2.18.2",
"ember-cli": "~3.4.3",
"ember-cli-bootstrap-sassy": "^0.5.8",
"ember-cli-dependency-checker": "^2.2.1",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-github-pages": "^0.2.1",
"ember-cli-htmlbars": "^2.0.5",
"ember-cli-htmlbars-inline-precompile": "^1.0.5",
"ember-cli-github-pages": "^0.2.0",
"ember-cli-htmlbars": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-inject-live-reload": "^2.0.1",
"ember-cli-qunit": "^4.4.0",
"ember-cli-qunit": "^4.3.2",
"ember-cli-sass": "^8.0.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^2.1.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^2.0.0",
"ember-resolver": "^4.5.6",
"ember-source": "^2.18.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^5.0.1",
"ember-source": "~3.4.0",
"ember-source-channel-url": "^1.1.0",
"ember-try": "^1.0.0",
"eslint-plugin-ember": "^6.2.0",
"eslint-plugin-node": "^8.0.0",
"loader.js": "^4.7.0",
"sass": "^1.16.1"
"qunit-dom": "^0.8.4",
"sass": "^1.14.3"
},

@@ -66,0 +76,0 @@ "engines": {

@@ -35,3 +35,4 @@ [![Latest NPM release][npm-badge]][npm-badge-url]

## Installation
Installation
------------------------------------------------------------------------------

@@ -54,3 +55,3 @@ ```

```hbs
<BarCode @value={{"abc123456"}} />
<BarCode @value="abc123456" />
```

@@ -57,0 +58,0 @@

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