UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

75 lines 4.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QrSwissPaymentBarcode = void 0; const index_1 = require("./../index"); class QrSwissPaymentBarcode { constructor(data) { this.content = index_1.QrSwissPaymentContent.fromJson(data.content); let dpiDefault = 200; this.dpi = typeof (data === null || data === void 0 ? void 0 : data.dpi) !== "undefined" ? data === null || data === void 0 ? void 0 : data.dpi : dpiDefault; let formatDefault = "codeOnly"; this.format = typeof (data === null || data === void 0 ? void 0 : data.format) !== "undefined" ? data === null || data === void 0 ? void 0 : data.format : formatDefault; let languageDefault = "de"; this.language = typeof (data === null || data === void 0 ? void 0 : data.language) !== "undefined" ? data === null || data === void 0 ? void 0 : data.language : languageDefault; this.pdf = index_1.QrSwissPaymentPdf.fromJson(data === null || data === void 0 ? void 0 : data.pdf); this.position = index_1.Rectangle.fromJson(data === null || data === void 0 ? void 0 : data.position); let separatorDefault = "dashedLineWithScissors"; this.separator = typeof (data === null || data === void 0 ? void 0 : data.separator) !== "undefined" ? data === null || data === void 0 ? void 0 : data.separator : separatorDefault; } static getContentDescription() { return ""; } static getDpiDefault() { return 200; } static getDpiDescription() { return "Used to select the resolution of the barcode."; } static getFormatDefault() { return "codeOnly"; } static getFormatDescription() { return "Used to select the parts, that shall be included in the barcode.\n\n* codeOnly = Only the barcode itself shall be shown.\n* billOnly = The barcode and the payment summary shall be shown.\n* billPortraitSheet = The dimensions of the barcode and the payment summary shall be optimized for placement in the lower left corner of a page in DIN-A4 format.\n* billExtraSpace = The same as \"billPortraitSheet\", but with extra spacings."; } static getLanguageDefault() { return "de"; } static getLanguageDescription() { return "Selects the language of the barcode's payment summary.\n\n* de = german\n* fr = french\n* it = italian\n* en = english"; } static getPdfDescription() { return ""; } static getPositionDescription() { return ""; } static getSeparatorDefault() { return "dashedLineWithScissors"; } static getSeparatorDescription() { return "The border style for separators in between the different parts of the barcode.\n\n* none = No separator shall be used.\n* solidLine = A solid separator line.\n* solidLineWithScissors = A solid separator line with a scissor icon.\n* dashedLine = A dashed separator line.\n* dashedLineWithScissors = A dashed separator line with a scissor icon.\n* dottedLine = A dotted separator line.\n* dottedLineWithScissors = A dotted separator line with a scissor icon."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new QrSwissPaymentBarcode(data); } toJson() { var _a, _b, _c; return { 'content': (_a = this.content) === null || _a === void 0 ? void 0 : _a.toJson(), 'dpi': this.dpi, 'format': this.format, 'language': this.language, 'pdf': (_b = this.pdf) === null || _b === void 0 ? void 0 : _b.toJson(), 'position': (_c = this.position) === null || _c === void 0 ? void 0 : _c.toJson(), 'separator': this.separator, }; } clone() { return QrSwissPaymentBarcode.fromJson(this.toJson()); } } exports.QrSwissPaymentBarcode = QrSwissPaymentBarcode; //# sourceMappingURL=QrSwissPaymentBarcode.js.map