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

@syncfusion/ej2-barcode-generator

Package Overview
Dependencies
Maintainers
3
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-barcode-generator - npm Package Compare versions

Comparing version 21.2.3 to 22.1.34

dist/ts/barcode/barcode-base.ts

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 21.2.3
* version : 22.1.34
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-barcode-generator@*",
"_id": "@syncfusion/ej2-barcode-generator@21.1.35",
"_id": "@syncfusion/ej2-barcode-generator@22.1.1",
"_inBundle": false,
"_integrity": "sha512-7Zl9zBUPwHEj3LKzSwOLwVNW8UqusdE6jnA9IlwLM/wS59nCNHLBiQxpWqoBj/AD7aJTQr3ZqDgMYbFP6OHWhA==",
"_integrity": "sha512-Fx6qoL+/xKHkwEvYmMwolTqSC9GANwv/lzenN/YNyPBFDjwNHdTd/hicx+F9PKXxbMAvy7/OREy8EmSutpP5CA==",
"_location": "/@syncfusion/ej2-barcode-generator",

@@ -26,4 +26,4 @@ "_phantomChildren": {},

],
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-barcode-generator/-/ej2-barcode-generator-21.1.35.tgz",
"_shasum": "2255feed18a4e98422015a4543a227f36bfc1e0d",
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-barcode-generator/-/ej2-barcode-generator-22.1.1.tgz",
"_shasum": "40c39d688fe94b3130bfe4386dbae00d0e8c80dd",
"_spec": "@syncfusion/ej2-barcode-generator@*",

@@ -39,4 +39,4 @@ "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~21.2.3",
"@syncfusion/ej2-data": "~21.2.3"
"@syncfusion/ej2-base": "~22.1.34",
"@syncfusion/ej2-data": "~22.1.34"
},

@@ -69,4 +69,4 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "21.2.3",
"version": "22.1.34",
"sideEffects": false
}

@@ -69,3 +69,3 @@ var __extends = (this && this.__extends) || (function () {

};
this.trigger(BarcodeEvent["" + eventName], arg);
this.trigger(BarcodeEvent[eventName], arg);
};

@@ -265,6 +265,6 @@ // eslint-disable-next-line

for (var i = measureElement.length - 1; i >= 0; i--) {
measureElement[parseInt(i.toString(), 10)].parentNode.removeChild(measureElement[parseInt(i.toString(), 10)]);
measureElement[i].parentNode.removeChild(measureElement[i]);
}
var element = 'barcodeMeasureElement';
window["" + element] = null;
window[element] = null;
}

@@ -271,0 +271,0 @@ };

@@ -78,5 +78,5 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < code.length; i++) {
var numberOfDigits = code[parseInt(i.toString(), 10)];
var numberOfDigits = code[i];
for (var j = 0; j < numberOfDigits.length; j++) {
count += Number(numberOfDigits[parseInt(j.toString(), 10)]);
count += Number(numberOfDigits[j]);
}

@@ -89,3 +89,3 @@ }

for (var i = 0; i < code.length; i++) {
var numberOfDigits = code[parseInt(i.toString(), 10)].length;
var numberOfDigits = code[i].length;
lineCount += numberOfDigits;

@@ -105,3 +105,3 @@ }

var number;
if (codeValue[parseInt(k.toString(), 10)] === '1' && codeValue[k + 1] === '1') {
if (codeValue[k] === '1' && codeValue[k + 1] === '1') {
number = value + 1;

@@ -240,3 +240,3 @@ return this.multipleWidth(codeValue, k + 1, number);

for (var j = 0; j < code.length; j++) {
var codeValue = code[parseInt(j.toString(), 10)];
var codeValue = code[j];
var check = (type !== 'UpcA' && type !== 'UpcE' && type !== 'Code11' && type !== 'Code93' && type !== 'Code93Extension');

@@ -260,5 +260,5 @@ var barType = this.barCodeType(this.type);

var canDrawCheck = (type === 'Code39' || type === 'Code93Extension' || type === 'Code32' || type === 'Code11' || type === 'Code39Extension');
var candraw = canDrawCheck ? (k % 2 ? false : true) : (codeValue[parseInt(k.toString(), 10)] === '1' ? true : false);
var candraw = canDrawCheck ? (k % 2 ? false : true) : (codeValue[k] === '1' ? true : false);
var string = codeValue.toString();
var number = Number(string[parseInt(k.toString(), 10)]);
var number = Number(string[k]);
var width = void 0;

@@ -419,3 +419,3 @@ width = this.getWidthValue(number, width, type);

for (var i = 0; i < options.length; i++) {
barcodeRenderer.renderRectElement(canvas, options[parseInt(i.toString(), 10)]);
barcodeRenderer.renderRectElement(canvas, options[i]);
}

@@ -422,0 +422,0 @@ };

@@ -72,4 +72,4 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < givenCharacter.length; i++) {
var char = givenCharacter[parseInt(i.toString(), 10)];
code.push(codes["" + char]);
var char = givenCharacter[i];
code.push(codes[char]);
}

@@ -76,0 +76,0 @@ return code;

@@ -69,3 +69,3 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < givenChar.length; i++) {
code.push(codes[givenChar[parseInt(i.toString(), 10)]]);
code.push(codes[givenChar[i]]);
}

@@ -72,0 +72,0 @@ return code;

@@ -68,3 +68,3 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < givenWord.length; i++) {
bytes.push(givenWord[parseInt(i.toString(), 10)].charCodeAt(0));
bytes.push(givenWord[i].charCodeAt(0));
}

@@ -229,3 +229,3 @@ return bytes;

var codes = this.getCodeValue();
return codes[parseInt(index.toString(), 10)] ? codes[parseInt(index.toString(), 10)].toString() : '';
return codes[index] ? codes[index].toString() : '';
};

@@ -232,0 +232,0 @@ return Code128;

@@ -66,4 +66,4 @@ var __extends = (this && this.__extends) || (function () {

for (var j = 0; j < codes.length; j++) {
if (givenChar[parseInt(i.toString(), 10)] === codes[parseInt(j.toString(), 10)][0]) {
code.push(codes[parseInt(j.toString(), 10)][2][0]);
if (givenChar[i] === codes[j][0]) {
code.push(codes[j][2][0]);
}

@@ -70,0 +70,0 @@ }

@@ -60,3 +60,3 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < char.length; i++) {
var codeNumber = characters.indexOf(char[parseInt(i.toString(), 10)]);
var codeNumber = characters.indexOf(char[i]);
checksum += codeNumber;

@@ -89,3 +89,3 @@ }

codeNumber = characters.indexOf(givenChar.charAt(i));
code.push(codes[parseInt(codeNumber.toString(), 10)]);
code.push(codes[codeNumber]);
}

@@ -92,0 +92,0 @@ return code;

@@ -143,4 +143,4 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < givenCharacter.length; i++) {
asciivalue = givenCharacter[parseInt(i.toString(), 10)].charCodeAt(0);
encodedString += code[parseInt(asciivalue.toString(), 10)];
asciivalue = givenCharacter[i].charCodeAt(0);
encodedString += code[asciivalue];
}

@@ -147,0 +147,0 @@ return encodedString;

@@ -156,4 +156,4 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < givenCharacter.length; i++) {
var char = givenCharacter[parseInt(i.toString(), 10)];
code.push(codes["" + char]);
var char = givenCharacter[i];
code.push(codes[char]);
}

@@ -168,3 +168,3 @@ };

for (var i = value.length; i > 0; i--) {
var characterValue = codes[value[parseInt(j.toString(), 10)]] * i;
var characterValue = codes[value[j]] * i;
weightSum += characterValue;

@@ -175,3 +175,3 @@ j++;

var objectValue = Object.keys(codes);
var appendSymbol = objectValue[parseInt(moduloValue.toString(), 10)];
var appendSymbol = objectValue[moduloValue];
return appendSymbol;

@@ -178,0 +178,0 @@ };

@@ -106,4 +106,4 @@ var __extends = (this && this.__extends) || (function () {

for (var j = string.length - 1; j > 0; j--) {
if (string[parseInt(j.toString(), 10)] && string[parseInt(j.toString(), 10)].value && string[parseInt(j.toString(), 10)].character === code[parseInt(i.toString(), 10)]) {
extcodes = string[parseInt(j.toString(), 10)];
if (string[j] && string[j].value && string[j].character === code[i]) {
extcodes = string[j];
break;

@@ -134,3 +134,3 @@ }

for (var i = 0; i < checkDigit.length; i++) {
this.extendedText += checkDigit[parseInt(i.toString(), 10)];
this.extendedText += checkDigit[i];
}

@@ -155,4 +155,4 @@ temp[0] = '*' + this.extendedText + 'ÿ';

for (var j = 0; j < this.barcodeSymbols.length; j++) {
if (dataToEncode[parseInt(i.toString(), 10)] === this.barcodeSymbols[parseInt(j.toString(), 10)].value) {
numi = this.barcodeSymbols[parseInt(j.toString(), 10)].checkDigit;
if (dataToEncode[i] === this.barcodeSymbols[j].value) {
numi = this.barcodeSymbols[j].checkDigit;
}

@@ -165,4 +165,4 @@ }

for (var k = 0; k < this.barcodeSymbols.length; k++) {
if (checkValue === this.barcodeSymbols[parseInt(k.toString(), 10)].checkDigit) {
char1 = this.barcodeSymbols[parseInt(k.toString(), 10)].value;
if (checkValue === this.barcodeSymbols[k].checkDigit) {
char1 = this.barcodeSymbols[k].value;
break;

@@ -184,4 +184,4 @@ }

for (var m = 0; m < this.barcodeSymbols.length; m++) {
if (dataToEncode[parseInt(i.toString(), 10)] === this.barcodeSymbols[parseInt(m.toString(), 10)].value) {
var tempi = this.barcodeSymbols[parseInt(m.toString(), 10)].checkDigit;
if (dataToEncode[i] === this.barcodeSymbols[m].value) {
var tempi = this.barcodeSymbols[m].checkDigit;
checkValue += tempi * num4;

@@ -195,4 +195,4 @@ }

for (var i = 0; i < this.barcodeSymbols.length; i++) {
if (checkValue === this.barcodeSymbols[parseInt(i.toString(), 10)].checkDigit) {
char2 = this.barcodeSymbols[parseInt(i.toString(), 10)].value;
if (checkValue === this.barcodeSymbols[i].checkDigit) {
char2 = this.barcodeSymbols[i].value;
break;

@@ -210,3 +210,3 @@ }

for (var j = 0; j < this.barcodeSymbols.length; j++) {
if (code[parseInt(i.toString(), 10)] === this.barcodeSymbols[parseInt(j.toString(), 10)].value) {
if (code[i] === this.barcodeSymbols[j].value) {
// eslint-disable-next-line

@@ -357,6 +357,6 @@ checkValue += this.barcodeSymbols[j].checkDigit;

for (var j = 0; j < string.length; j++) {
for (var k = 0; k < string[parseInt(j.toString(), 10)].length; k++) {
for (var k = 0; k < string[j].length; k++) {
for (var i = 0; i < this.barcodeSymbols.length; i++) {
if (string[parseInt(j.toString(), 10)][parseInt(k.toString(), 10)] === this.barcodeSymbols[parseInt(i.toString(), 10)].value) {
temp[parseInt(k.toString(), 10)] = this.barcodeSymbols[parseInt(i.toString(), 10)].bars;
if (string[j][k] === this.barcodeSymbols[i].value) {
temp[k] = this.barcodeSymbols[i].bars;
}

@@ -363,0 +363,0 @@ }

@@ -129,8 +129,8 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; i < leftString.length; i++) {
tempCodes = codes[structure[parseInt(i.toString(), 10)]];
tempCodes = codes[structure[i]];
if (i === 0) {
code = tempCodes[leftString[parseInt(i.toString(), 10)]];
code = tempCodes[leftString[i]];
}
else {
code += tempCodes[leftString[parseInt(i.toString(), 10)]];
code += tempCodes[leftString[i]];
}

@@ -137,0 +137,0 @@ }

@@ -106,6 +106,6 @@ var __extends = (this && this.__extends) || (function () {

if (i === 0 || i === 4) {
code = codes[this.value[parseInt(i.toString(), 10)]];
code = codes[this.value[i]];
}
else {
code += codes[this.value[parseInt(i.toString(), 10)]];
code += codes[this.value[i]];
}

@@ -112,0 +112,0 @@ }

@@ -89,6 +89,6 @@ var __extends = (this && this.__extends) || (function () {

if (i === 0) {
code = tempValue[leftString[parseInt(i.toString(), 10)]];
code = tempValue[leftString[i]];
}
else {
code += tempValue[leftString[parseInt(i.toString(), 10)]];
code += tempValue[leftString[i]];
}

@@ -95,0 +95,0 @@ }

@@ -80,3 +80,3 @@ var __extends = (this && this.__extends) || (function () {

var value = this.getValue();
return value["" + lastDigit];
return value[lastDigit];
};

@@ -89,3 +89,3 @@ UpcE.prototype.getUpcValue = function () {

for (var i = 0; i < expansionValue.length; i++) {
var value = expansionValue[parseInt(i.toString(), 10)];
var value = expansionValue[i];
if (value === 'X') {

@@ -124,8 +124,8 @@ result += this.value[index++];

for (var i = 0; i < string.length; i++) {
tempValue = codes[structure[parseInt(i.toString(), 10)]];
tempValue = codes[structure[i]];
if (i === 0) {
code = tempValue[string[parseInt(i.toString(), 10)]];
code = tempValue[string[i]];
}
else {
code += tempValue[string[parseInt(i.toString(), 10)]];
code += tempValue[string[i]];
}

@@ -132,0 +132,0 @@ }

@@ -146,3 +146,3 @@ /**

else {
image.src = window.URL.createObjectURL(new Blob([new window["" + serializer]().serializeToString(element.children[0])], { type: 'image/svg+xml' }));
image.src = window.URL.createObjectURL(new Blob([new window[serializer]().serializeToString(element.children[0])], { type: 'image/svg+xml' }));
}

@@ -149,0 +149,0 @@ });

@@ -34,3 +34,3 @@ /**

for (var i = 0; i < node.childNodes.length; i++) {
child = node.childNodes[parseInt(i.toString(), 10)];
child = node.childNodes[i];
if (child.nodeType === 1) {

@@ -55,4 +55,4 @@ collection.push(child);

var measureElement = 'barcodeMeasureElement';
window["" + measureElement].style.visibility = 'visible';
var svg = window["" + measureElement].children[1];
window[measureElement].style.visibility = 'visible';
var svg = window[measureElement].children[1];
var text = getChildNode(svg)[0];

@@ -65,3 +65,3 @@ text.textContent = textContent.string;

bBox.height = text.getBBox().height;
window["" + measureElement].style.visibility = 'hidden';
window[measureElement].style.visibility = 'hidden';
return bBox;

@@ -81,3 +81,3 @@ }

for (var i = 0; i < keys.length; i++) {
element.setAttribute(keys[parseInt(i.toString(), 10)], attributes[keys[parseInt(i.toString(), 10)]]);
element.setAttribute(keys[i], attributes[keys[i]]);
}

@@ -107,3 +107,3 @@ }

var measureElement = 'barcodeMeasureElement';
if (!window["" + measureElement]) {
if (!window[measureElement]) {
var divElement = createHtmlElement('div', {

@@ -121,9 +121,9 @@ id: 'barcodeMeasureElement', class: 'barcodeMeasureElement',

svg.appendChild(tSpan);
window["" + measureElement] = divElement;
window["" + measureElement].usageCount = 1;
window[measureElement] = divElement;
window[measureElement].usageCount = 1;
document.body.appendChild(divElement);
}
else {
window["" + measureElement].usageCount += 1;
window[measureElement].usageCount += 1;
}
}

@@ -32,3 +32,3 @@ import { QuietZone, DataMatrixSize } from '../barcode/enum/enum';

for (var i = 0; i < destinationArray.length; i++) {
destinationArray[parseInt(i.toString(), 10)] = 0;
destinationArray[i] = 0;
}

@@ -50,6 +50,6 @@ return destinationArray;

if (!isEven && i === result.length - 1) {
result[parseInt(i.toString(), 10)] = (destinationArray[2 * i] + 1);
result[i] = (destinationArray[2 * i] + 1);
}
else {
result[parseInt(i.toString(), 10)] = ((((destinationArray[2 * i] - 48) * 10) + (destinationArray[(2 * i) + 1] - 48)) + 130);
result[i] = ((((destinationArray[2 * i] - 48) * 10) + (destinationArray[(2 * i) + 1] - 48)) + 130);
}

@@ -84,3 +84,3 @@ }

for (var i = 1; i < result.length; i++) {
result[parseInt(i.toString(), 10)] = this.ComputeBase256Codeword(result[parseInt(i.toString(), 10)], i);
result[i] = this.ComputeBase256Codeword(result[i], i);
}

@@ -100,3 +100,3 @@ return result;

//checks the codeword is digit or not.
if (dataCodeword[parseInt(i.toString(), 10)] >= 48 && dataCodeword[parseInt(i.toString(), 10)] <= 57) {
if (dataCodeword[i] >= 48 && dataCodeword[i] <= 57) {
var prevIndex = 0;

@@ -106,3 +106,3 @@ if (i !== 0) {

}
var prevValue = (result[parseInt(prevIndex.toString(), 10)] - 1);
var prevValue = (result[prevIndex] - 1);
var priorValue = 0;

@@ -115,14 +115,14 @@ if (i !== 0 && index !== 1) {

if (priorValue !== 235 && prevValue >= 48 && prevValue <= 57) {
result[parseInt(prevIndex.toString(), 10)] = (10 * (prevValue - 0) + (dataCodeword[parseInt(i.toString(), 10)] - 0) + 130);
result[prevIndex] = (10 * (prevValue - 0) + (dataCodeword[i] - 0) + 130);
}
else {
result[index++] = (dataCodeword[parseInt(i.toString(), 10)] + 1);
result[index++] = (dataCodeword[i] + 1);
}
}
else if (dataCodeword[parseInt(i.toString(), 10)] < 127) {
result[index++] = (dataCodeword[parseInt(i.toString(), 10)] + 1);
else if (dataCodeword[i] < 127) {
result[index++] = (dataCodeword[i] + 1);
}
else {
result[parseInt(index.toString(), 10)] = 235;
result[index++] = (((dataCodeword[parseInt(i.toString(), 10)] - 127)));
result[index] = 235;
result[index++] = (((dataCodeword[i] - 127)));
}

@@ -145,3 +145,3 @@ }

for (var i = 0; i < data.length; i++) {
if ((data[parseInt(i.toString(), 10)] < 48) || (data[parseInt(i.toString(), 10)] > 57)) {
if ((data[i] < 48) || (data[i] > 57)) {
number = false;

@@ -223,3 +223,3 @@ }

for (var i = 0; i < l; i++) {
ms.push(temp[parseInt(i.toString(), 10)]);
ms.push(temp[i]);
}

@@ -250,3 +250,3 @@ if (l < dataCWLength) {

mALog = this.CreateLogArrays(false);
return mALog[(mLog[parseInt(a.toString(), 10)] + mLog[parseInt(b.toString(), 10)]) % 255];
return mALog[(mLog[a] + mLog[b]) % 255];
};

@@ -272,3 +272,3 @@ /**

for (var i = 0; i < mSymbolAttributes.length; i++) {
var attr = mSymbolAttributes[parseInt(i.toString(), 10)];
var attr = mSymbolAttributes[i];
if (attr.DataCodewords >= dataLength) {

@@ -313,8 +313,8 @@ this.mSymbolAttribute = attr;

for (var bI = 0; bI < b.length; bI++) {
b[parseInt(bI.toString(), 10)] = 0;
b[bI] = 0;
}
for (var i = block; i < symbolDataWords; i += step) {
var val = this.EccSum(b[blockErrorWords - 1], this.encodedCodeword[parseInt(i.toString(), 10)]);
var val = this.EccSum(b[blockErrorWords - 1], this.encodedCodeword[i]);
for (var j = blockErrorWords - 1; j > 0; j--) {
b[parseInt(j.toString(), 10)] = this.EccSum(b[j - 1], this.EccProduct(mrsPolynomial[parseInt(j.toString(), 10)], val));
b[j] = this.EccSum(b[j - 1], this.EccProduct(mrsPolynomial[j], val));
}

@@ -331,3 +331,3 @@ b[0] = this.EccProduct(mrsPolynomial[0], val);

for (var i = block + (step * blockDataWords); i < total; i += step) {
ctArray[parseInt(i.toString(), 10)] = b[--bIndex];
ctArray[i] = b[--bIndex];
}

@@ -345,3 +345,3 @@ if (bIndex !== 0) {

for (var i = tmp.length - 1; i > this.mSymbolAttribute.DataCodewords; i--) {
ctArray[z++] = tmp[parseInt(i.toString(), 10)];
ctArray[z++] = tmp[i];
}

@@ -357,7 +357,7 @@ }

for (var i = 1; i <= 255; i++) {
maLog[parseInt(i.toString(), 10)] = maLog[i - 1] * 2;
if (maLog[parseInt(i.toString(), 10)] >= 256) {
maLog[parseInt(i.toString(), 10)] = maLog[parseInt(i.toString(), 10)] ^ 301;
maLog[i] = maLog[i - 1] * 2;
if (maLog[i] >= 256) {
maLog[i] = maLog[i] ^ 301;
}
mLog[maLog[parseInt(i.toString(), 10)]] = i;
mLog[maLog[i]] = i;
}

@@ -385,3 +385,3 @@ if (value) {

maLog = this.CreateLogArrays(false);
return maLog[(mLog[parseInt(a.toString(), 10)] + b) % 255];
return maLog[(mLog[a] + b) % 255];
};

@@ -393,9 +393,9 @@ DataMatrix.prototype.CreateRSPolynomial = function (step, mSymbolAttribute) {

for (var i = 0; i < mrsPolynomial.length; i++) {
mrsPolynomial[parseInt(i.toString(), 10)] = 0x01;
mrsPolynomial[i] = 0x01;
}
for (var i = 1; i <= blockErrorWords; i++) {
for (var j = i - 1; j >= 0; j--) {
mrsPolynomial[parseInt(j.toString(), 10)] = this.EccDoublify(mrsPolynomial[parseInt(j.toString(), 10)], i);
mrsPolynomial[j] = this.EccDoublify(mrsPolynomial[j], i);
if (j > 0) {
mrsPolynomial[parseInt(j.toString(), 10)] = this.EccSum(mrsPolynomial[parseInt(j.toString(), 10)], mrsPolynomial[j - 1]);
mrsPolynomial[j] = this.EccSum(mrsPolynomial[j], mrsPolynomial[j - 1]);
}

@@ -423,3 +423,3 @@ }

for (var i = 0; i < correctCodeword.length; i++) {
array[index + i] = correctCodeword[parseInt(i.toString(), 10)];
array[index + i] = correctCodeword[i];
}

@@ -558,16 +558,16 @@ };

for (var i = 0; i < h; i++) {
this.mDataMatrixArray[0][parseInt(i.toString(), 10)] = 0;
this.mDataMatrixArray[0][i] = 0;
}
for (var i = quietZone; i < w - quietZone; i++) {
// Left quietzone.
this.mDataMatrixArray[parseInt(i.toString(), 10)][0] = 0;
this.mDataMatrixArray[i][0] = 0;
for (var j = quietZone; j < h - quietZone; j++) {
this.mDataMatrixArray[parseInt(i.toString(), 10)][parseInt(j.toString(), 10)] = tempArray2[i - quietZone][j - quietZone];
this.mDataMatrixArray[i][j] = tempArray2[i - quietZone][j - quietZone];
}
// Right quietzone.
this.mDataMatrixArray[parseInt(i.toString(), 10)][h - quietZone] = 0;
this.mDataMatrixArray[i][h - quietZone] = 0;
}
//Bottom quietzone.
for (var i = 0; i < h; i++) {
this.mDataMatrixArray[w - quietZone][parseInt(i.toString(), 10)] = 0;
this.mDataMatrixArray[w - quietZone][i] = 0;
}

@@ -579,3 +579,3 @@ };

for (var i = 0; i < options.length; i++) {
barcodeRenderer.renderRectElement(canvas, options[parseInt(i.toString(), 10)]);
barcodeRenderer.renderRectElement(canvas, options[i]);
}

@@ -630,3 +630,3 @@ };

for (var y1 = 0; y1 < h; y1++) {
tempArray[parseInt(x1.toString(), 10)][parseInt(y1.toString(), 10)] = matrix[w * y1 + x1];
tempArray[x1][y1] = matrix[w * y1 + x1];
}

@@ -638,3 +638,3 @@ }

for (var j = 0; j < w; j++) {
tempArray2[h - 1 - i][parseInt(j.toString(), 10)] = tempArray[parseInt(j.toString(), 10)][parseInt(i.toString(), 10)];
tempArray2[h - 1 - i][j] = tempArray[j][i];
}

@@ -646,3 +646,3 @@ }

for (var i = 0; i < w; i++) {
tempArray[parseInt(i.toString(), 10)] = 0;
tempArray[i] = 0;
}

@@ -655,3 +655,3 @@ return tempArray;

for (var j = 0; j < h; j++) {
tempArray[parseInt(i.toString(), 10)][parseInt(j.toString(), 10)] = 0;
tempArray[i][j] = 0;
}

@@ -813,3 +813,3 @@ }

var color = void 0;
if (this.mDataMatrixArray[parseInt(i.toString(), 10)][parseInt(j.toString(), 10)] === 1) {
if (this.mDataMatrixArray[i][j] === 1) {
color = this.foreColor;

@@ -816,0 +816,0 @@ }

@@ -107,3 +107,3 @@ var __extends = (this && this.__extends) || (function () {

};
this.trigger(BarcodeEvent["" + eventName], arg);
this.trigger(BarcodeEvent[eventName], arg);
};

@@ -110,0 +110,0 @@ DataMatrixGenerator.prototype.preRender = function () {

@@ -28,5 +28,5 @@ import { PdfQRBarcodeValues } from './qr-barcode-values';

var variable = 'DataCapacity';
this.mLength = this.mQrBarcodeValues["" + variable];
this.mLength = this.mQrBarcodeValues[variable];
variable = 'NumberOfErrorCorrectingCodeWords';
this.eccw = this.mQrBarcodeValues["" + variable];
this.eccw = this.mQrBarcodeValues[variable];
}

@@ -143,3 +143,3 @@ Object.defineProperty(ErrorCorrectionCodewords.prototype, "DC", {

for (var i = 0; i < inString.length; i++) {
this.decimalValue[parseInt(i.toString(), 10)] = parseInt(inString[parseInt(i.toString(), 10)], 2);
this.decimalValue[i] = parseInt(inString[i], 2);
}

@@ -158,3 +158,3 @@ };

var str = '';
var temp = decimalRepresentation[parseInt(i.toString(), 10)].toString(2);
var temp = decimalRepresentation[i].toString(2);
if (temp.length < 8) {

@@ -165,3 +165,3 @@ for (var j = 0; j < 8 - temp.length; j++) {

}
toBinary[parseInt(i.toString(), 10)] = str + temp;
toBinary[i] = str + temp;
}

@@ -179,7 +179,7 @@ return toBinary;

for (var i = 0; i < this.decimalValue.length; i++) {
messagePolynom[this.decimalValue.length - 1 - i] = this.decimalValue[parseInt(i.toString(), 10)];
messagePolynom[this.decimalValue.length - 1 - i] = this.decimalValue[i];
}
var generatorPolynom = {};
for (var i = 0; i < this.gx.length; i++) {
generatorPolynom[this.gx.length - 1 - i] = this.findElement(this.gx[parseInt(i.toString(), 10)], this.alpha);
generatorPolynom[this.gx.length - 1 - i] = this.findElement(this.gx[i], this.alpha);
}

@@ -189,3 +189,3 @@ var tempMessagePolynom = {};

var poly = _a[_i];
tempMessagePolynom[Number(poly) + this.eccw] = messagePolynom["" + poly];
tempMessagePolynom[Number(poly) + this.eccw] = messagePolynom[poly];
}

@@ -197,3 +197,3 @@ messagePolynom = tempMessagePolynom;

var poly = _c[_b];
tempMessagePolynom[Number(poly) + genLeadtermFactor] = generatorPolynom["" + poly];
tempMessagePolynom[Number(poly) + genLeadtermFactor] = generatorPolynom[poly];
}

@@ -204,5 +204,5 @@ generatorPolynom = tempMessagePolynom;

var largestExponent = this.findLargestExponent(leadTermSource);
if (leadTermSource[parseInt(largestExponent.toString(), 10)] === 0) {
if (leadTermSource[largestExponent] === 0) {
// First coefficient is already 0, simply remove it and continue
delete leadTermSource[parseInt(largestExponent.toString(), 10)];
delete leadTermSource[largestExponent];
}

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

var temp = _e[_d];
returnValue.push(leadTermSource["" + temp]);
returnValue.push(leadTermSource[temp]);
}

@@ -244,3 +244,3 @@ return returnValue.reverse();

var longPolySingle = _a[_i];
resultPolynom[messagePolyExponent - i] = longPoly["" + longPolySingle] ^ (Object.keys(shortPoly).length > i ?
resultPolynom[messagePolyExponent - i] = longPoly[longPolySingle] ^ (Object.keys(shortPoly).length > i ?
shortPoly[shortPolyExponent - i] : 0);

@@ -250,3 +250,3 @@ i--;

var resultPolyExponent = this.findLargestExponent(resultPolynom);
delete resultPolynom[parseInt(resultPolyExponent.toString(), 10)];
delete resultPolynom[resultPolyExponent];
return resultPolynom;

@@ -258,3 +258,3 @@ };

var treeNode = _a[_i];
tempPolynom[Number(treeNode) - lowerExponentBy] = (genPolynom["" + treeNode] + leadTermCoefficient) % 255;
tempPolynom[Number(treeNode) - lowerExponentBy] = (genPolynom[treeNode] + leadTermCoefficient) % 255;
}

@@ -267,3 +267,3 @@ return tempPolynom;

var treeNode = _a[_i];
tempPolynom["" + treeNode] = this.getIntValFromAlphaExp(poly["" + treeNode], this.alpha);
tempPolynom[treeNode] = this.getIntValFromAlphaExp(poly[treeNode], this.alpha);
}

@@ -276,4 +276,4 @@ return tempPolynom;

var poly = _a[_i];
if (polynom["" + poly] !== 0) {
tempPolynom["" + poly] = this.findElement(polynom["" + poly], this.alpha);
if (polynom[poly] !== 0) {
tempPolynom[poly] = this.findElement(polynom[poly], this.alpha);
}

@@ -297,3 +297,3 @@ }

}
return alpha[parseInt(element.toString(), 10)];
return alpha[element];
};

@@ -311,3 +311,3 @@ /**

for (j = 0; j < alpha.length; j++) {
if (element === alpha[parseInt(j.toString(), 10)]) {
if (element === alpha[j]) {
break;

@@ -332,6 +332,6 @@ }

for (var i = 0; i < element.length; i++) {
if (element[parseInt(i.toString(), 10)] > 255) {
element[parseInt(i.toString(), 10)] = element[parseInt(i.toString(), 10)] - 255;
if (element[i] > 255) {
element[i] = element[i] - 255;
}
gx[parseInt(i.toString(), 10)] = alpha[element[parseInt(i.toString(), 10)]];
gx[i] = alpha[element[i]];
}

@@ -338,0 +338,0 @@ return gx;

@@ -64,3 +64,3 @@ var __extends = (this && this.__extends) || (function () {

};
this.trigger(BarcodeEvent["" + eventName], arg);
this.trigger(BarcodeEvent[eventName], arg);
};

@@ -67,0 +67,0 @@ QRCodeGenerator.prototype.renderElements = function () {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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