swissqrbill
Advanced tools
Comparing version 3.1.2 to 3.1.3-beta.1
@@ -274,26 +274,26 @@ import { ExtendedPDF } from "./extended-pdf.js"; | ||
if (this._data.av1 !== undefined) { | ||
const [scheme, data] = this._data.av1.split(/(\/.+)/); | ||
this.fontSize(7); | ||
this.font("Helvetica-Bold"); | ||
this.text("Name AV1:", utils.mm2pt(67), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(15), | ||
this.text(scheme, utils.mm2pt(67), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(138), | ||
continued: true, | ||
lineGap: 1 | ||
}); | ||
this.fontSize(7); | ||
this.font("Helvetica"); | ||
this.text((this._data.av1.length > 87 ? this._data.av1.substr(0, 87) + "..." : this._data.av1), utils.mm2pt(81), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(37), | ||
lineGap: -.5 | ||
this.text(this._data.av1.length > 90 ? data.substr(0, 87) + "..." : data, { | ||
continued: false | ||
}); | ||
} | ||
if (this._data.av2 !== undefined) { | ||
const [scheme, data] = this._data.av2.split(/(\/.+)/); | ||
this.fontSize(7); | ||
this.font("Helvetica-Bold"); | ||
this.text("Name AV2:", utils.mm2pt(67), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(15), | ||
this.text(scheme, utils.mm2pt(67), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(138), | ||
continued: true, | ||
lineGap: 1 | ||
}); | ||
this.fontSize(7); | ||
this.font("Helvetica"); | ||
this.text((this._data.av2.length > 87 ? this._data.av2.substr(0, 87) + "..." : this._data.av2), utils.mm2pt(81), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(37), | ||
this.text(this._data.av2.length > 90 ? data.substr(0, 87) + "..." : data, { | ||
lineGap: -.5 | ||
@@ -300,0 +300,0 @@ }); |
@@ -245,7 +245,10 @@ import { isQRIBAN, isQRReference, isIBANValid, isQRReferenceValid } from "./utils.js"; | ||
if (data.av1 !== undefined) { | ||
if (typeof data.av1 !== "string") { | ||
throw new Error("AV1 must be a string."); | ||
} | ||
if (data.av1.length > 100) { | ||
throw new Error("AV1 must be a maximum of 100 characters."); | ||
} | ||
if (typeof data.av1 !== "string") { | ||
throw new Error("AV1 must be a string."); | ||
if (data.av1.split(/(\/.+)/).length <= 2) { | ||
throw new Error("AV1 must contain a separator (e.g. /)"); | ||
} | ||
@@ -255,7 +258,10 @@ } | ||
if (data.av2 !== undefined) { | ||
if (typeof data.av2 !== "string") { | ||
throw new Error("AV2 must be a string."); | ||
} | ||
if (data.av2.length > 100) { | ||
throw new Error("AV2 must be a maximum of 100 characters."); | ||
} | ||
if (typeof data.av2 !== "string") { | ||
throw new Error("AV2 must be a string."); | ||
if (data.av2.split(/(\/.+)/).length <= 2) { | ||
throw new Error("AV2 must contain a separator (e.g. /)"); | ||
} | ||
@@ -262,0 +268,0 @@ } |
@@ -219,3 +219,4 @@ import { validateData, cleanData } from "../shared/shared.js"; | ||
if (this._data.av1 !== undefined) { | ||
alternativeSchemeContainer.addTSpan("Name AV1:") | ||
const [scheme, data] = this._data.av1.split(/(\/.+)/); | ||
alternativeSchemeContainer.addTSpan(scheme) | ||
.x(0) | ||
@@ -225,5 +226,3 @@ .fontFamily("Arial") | ||
.fontSize("7pt"); | ||
alternativeSchemeContainer.addTSpan(this._data.av1.length > 87 ? this._data.av1.substr(0, 87) + "..." : this._data.av1) | ||
.x(0) | ||
.dx("15mm") | ||
alternativeSchemeContainer.addTSpan(this._data.av1.length > 90 ? data.substr(0, 87) + "..." : data) | ||
.fontFamily("Arial") | ||
@@ -234,3 +233,4 @@ .fontWeight("normal") | ||
if (this._data.av2 !== undefined) { | ||
alternativeSchemeContainer.addTSpan("Name AV2:") | ||
const [scheme, data] = this._data.av2.split(/(\/.+)/); | ||
alternativeSchemeContainer.addTSpan(scheme) | ||
.x(0) | ||
@@ -241,5 +241,3 @@ .dy("8pt") | ||
.fontSize("7pt"); | ||
alternativeSchemeContainer.addTSpan(this._data.av2.length > 87 ? this._data.av2.substr(0, 87) + "..." : this._data.av2) | ||
.x(0) | ||
.dx("15mm") | ||
alternativeSchemeContainer.addTSpan(this._data.av2.length > 90 ? data.substr(0, 87) + "..." : data) | ||
.fontFamily("Arial") | ||
@@ -246,0 +244,0 @@ .fontWeight("normal") |
@@ -299,26 +299,26 @@ "use strict"; | ||
if (this._data.av1 !== undefined) { | ||
const [scheme, data] = this._data.av1.split(/(\/.+)/); | ||
this.fontSize(7); | ||
this.font("Helvetica-Bold"); | ||
this.text("Name AV1:", utils.mm2pt(67), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(15), | ||
this.text(scheme, utils.mm2pt(67), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(138), | ||
continued: true, | ||
lineGap: 1 | ||
}); | ||
this.fontSize(7); | ||
this.font("Helvetica"); | ||
this.text((this._data.av1.length > 87 ? this._data.av1.substr(0, 87) + "..." : this._data.av1), utils.mm2pt(81), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(37), | ||
lineGap: -.5 | ||
this.text(this._data.av1.length > 90 ? data.substr(0, 87) + "..." : data, { | ||
continued: false | ||
}); | ||
} | ||
if (this._data.av2 !== undefined) { | ||
const [scheme, data] = this._data.av2.split(/(\/.+)/); | ||
this.fontSize(7); | ||
this.font("Helvetica-Bold"); | ||
this.text("Name AV2:", utils.mm2pt(67), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(15), | ||
this.text(scheme, utils.mm2pt(67), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(138), | ||
continued: true, | ||
lineGap: 1 | ||
}); | ||
this.fontSize(7); | ||
this.font("Helvetica"); | ||
this.text((this._data.av2.length > 87 ? this._data.av2.substr(0, 87) + "..." : this._data.av2), utils.mm2pt(81), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(37), | ||
this.text(this._data.av2.length > 90 ? data.substr(0, 87) + "..." : data, { | ||
lineGap: -.5 | ||
@@ -325,0 +325,0 @@ }); |
@@ -250,7 +250,10 @@ "use strict"; | ||
if (data.av1 !== undefined) { | ||
if (typeof data.av1 !== "string") { | ||
throw new Error("AV1 must be a string."); | ||
} | ||
if (data.av1.length > 100) { | ||
throw new Error("AV1 must be a maximum of 100 characters."); | ||
} | ||
if (typeof data.av1 !== "string") { | ||
throw new Error("AV1 must be a string."); | ||
if (data.av1.split(/(\/.+)/).length <= 2) { | ||
throw new Error("AV1 must contain a separator (e.g. /)"); | ||
} | ||
@@ -260,7 +263,10 @@ } | ||
if (data.av2 !== undefined) { | ||
if (typeof data.av2 !== "string") { | ||
throw new Error("AV2 must be a string."); | ||
} | ||
if (data.av2.length > 100) { | ||
throw new Error("AV2 must be a maximum of 100 characters."); | ||
} | ||
if (typeof data.av2 !== "string") { | ||
throw new Error("AV2 must be a string."); | ||
if (data.av2.split(/(\/.+)/).length <= 2) { | ||
throw new Error("AV2 must contain a separator (e.g. /)"); | ||
} | ||
@@ -267,0 +273,0 @@ } |
@@ -244,3 +244,4 @@ "use strict"; | ||
if (this._data.av1 !== undefined) { | ||
alternativeSchemeContainer.addTSpan("Name AV1:") | ||
const [scheme, data] = this._data.av1.split(/(\/.+)/); | ||
alternativeSchemeContainer.addTSpan(scheme) | ||
.x(0) | ||
@@ -250,5 +251,3 @@ .fontFamily("Arial") | ||
.fontSize("7pt"); | ||
alternativeSchemeContainer.addTSpan(this._data.av1.length > 87 ? this._data.av1.substr(0, 87) + "..." : this._data.av1) | ||
.x(0) | ||
.dx("15mm") | ||
alternativeSchemeContainer.addTSpan(this._data.av1.length > 90 ? data.substr(0, 87) + "..." : data) | ||
.fontFamily("Arial") | ||
@@ -259,3 +258,4 @@ .fontWeight("normal") | ||
if (this._data.av2 !== undefined) { | ||
alternativeSchemeContainer.addTSpan("Name AV2:") | ||
const [scheme, data] = this._data.av2.split(/(\/.+)/); | ||
alternativeSchemeContainer.addTSpan(scheme) | ||
.x(0) | ||
@@ -266,5 +266,3 @@ .dy("8pt") | ||
.fontSize("7pt"); | ||
alternativeSchemeContainer.addTSpan(this._data.av2.length > 87 ? this._data.av2.substr(0, 87) + "..." : this._data.av2) | ||
.x(0) | ||
.dx("15mm") | ||
alternativeSchemeContainer.addTSpan(this._data.av2.length > 90 ? data.substr(0, 87) + "..." : data) | ||
.fontFamily("Arial") | ||
@@ -271,0 +269,0 @@ .fontWeight("normal") |
@@ -274,26 +274,26 @@ import { ExtendedPDF } from "./extended-pdf.js"; | ||
if (this._data.av1 !== undefined) { | ||
const [scheme, data] = this._data.av1.split(/(\/.+)/); | ||
this.fontSize(7); | ||
this.font("Helvetica-Bold"); | ||
this.text("Name AV1:", utils.mm2pt(67), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(15), | ||
this.text(scheme, utils.mm2pt(67), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(138), | ||
continued: true, | ||
lineGap: 1 | ||
}); | ||
this.fontSize(7); | ||
this.font("Helvetica"); | ||
this.text((this._data.av1.length > 87 ? this._data.av1.substr(0, 87) + "..." : this._data.av1), utils.mm2pt(81), this._marginTop + utils.mm2pt(90), { | ||
width: utils.mm2pt(37), | ||
lineGap: -.5 | ||
this.text(this._data.av1.length > 90 ? data.substr(0, 87) + "..." : data, { | ||
continued: false | ||
}); | ||
} | ||
if (this._data.av2 !== undefined) { | ||
const [scheme, data] = this._data.av2.split(/(\/.+)/); | ||
this.fontSize(7); | ||
this.font("Helvetica-Bold"); | ||
this.text("Name AV2:", utils.mm2pt(67), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(15), | ||
this.text(scheme, utils.mm2pt(67), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(138), | ||
continued: true, | ||
lineGap: 1 | ||
}); | ||
this.fontSize(7); | ||
this.font("Helvetica"); | ||
this.text((this._data.av2.length > 87 ? this._data.av2.substr(0, 87) + "..." : this._data.av2), utils.mm2pt(81), this._marginTop + utils.mm2pt(93), { | ||
width: utils.mm2pt(37), | ||
this.text(this._data.av2.length > 90 ? data.substr(0, 87) + "..." : data, { | ||
lineGap: -.5 | ||
@@ -300,0 +300,0 @@ }); |
@@ -245,7 +245,10 @@ import { isQRIBAN, isQRReference, isIBANValid, isQRReferenceValid } from "./utils.js"; | ||
if (data.av1 !== undefined) { | ||
if (typeof data.av1 !== "string") { | ||
throw new Error("AV1 must be a string."); | ||
} | ||
if (data.av1.length > 100) { | ||
throw new Error("AV1 must be a maximum of 100 characters."); | ||
} | ||
if (typeof data.av1 !== "string") { | ||
throw new Error("AV1 must be a string."); | ||
if (data.av1.split(/(\/.+)/).length <= 2) { | ||
throw new Error("AV1 must contain a separator (e.g. /)"); | ||
} | ||
@@ -255,7 +258,10 @@ } | ||
if (data.av2 !== undefined) { | ||
if (typeof data.av2 !== "string") { | ||
throw new Error("AV2 must be a string."); | ||
} | ||
if (data.av2.length > 100) { | ||
throw new Error("AV2 must be a maximum of 100 characters."); | ||
} | ||
if (typeof data.av2 !== "string") { | ||
throw new Error("AV2 must be a string."); | ||
if (data.av2.split(/(\/.+)/).length <= 2) { | ||
throw new Error("AV2 must contain a separator (e.g. /)"); | ||
} | ||
@@ -262,0 +268,0 @@ } |
@@ -219,3 +219,4 @@ import { validateData, cleanData } from "../shared/shared.js"; | ||
if (this._data.av1 !== undefined) { | ||
alternativeSchemeContainer.addTSpan("Name AV1:") | ||
const [scheme, data] = this._data.av1.split(/(\/.+)/); | ||
alternativeSchemeContainer.addTSpan(scheme) | ||
.x(0) | ||
@@ -225,5 +226,3 @@ .fontFamily("Arial") | ||
.fontSize("7pt"); | ||
alternativeSchemeContainer.addTSpan(this._data.av1.length > 87 ? this._data.av1.substr(0, 87) + "..." : this._data.av1) | ||
.x(0) | ||
.dx("15mm") | ||
alternativeSchemeContainer.addTSpan(this._data.av1.length > 90 ? data.substr(0, 87) + "..." : data) | ||
.fontFamily("Arial") | ||
@@ -234,3 +233,4 @@ .fontWeight("normal") | ||
if (this._data.av2 !== undefined) { | ||
alternativeSchemeContainer.addTSpan("Name AV2:") | ||
const [scheme, data] = this._data.av2.split(/(\/.+)/); | ||
alternativeSchemeContainer.addTSpan(scheme) | ||
.x(0) | ||
@@ -241,5 +241,3 @@ .dy("8pt") | ||
.fontSize("7pt"); | ||
alternativeSchemeContainer.addTSpan(this._data.av2.length > 87 ? this._data.av2.substr(0, 87) + "..." : this._data.av2) | ||
.x(0) | ||
.dx("15mm") | ||
alternativeSchemeContainer.addTSpan(this._data.av2.length > 90 ? data.substr(0, 87) + "..." : data) | ||
.fontFamily("Arial") | ||
@@ -246,0 +244,0 @@ .fontWeight("normal") |
{ | ||
"name": "swissqrbill", | ||
"version": "3.1.2", | ||
"version": "3.1.3-beta.1", | ||
"description": "Swiss QR Bill generation in Node.js and browsers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/node/cjs/node/index.js", |
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 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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
6228517
12343
1