UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

63 lines 3.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.XslTransformationFile = void 0; class XslTransformationFile { constructor(data) { let fileNameDefault = ""; this.fileName = typeof (data === null || data === void 0 ? void 0 : data.fileName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.fileName : fileNameDefault; let formatDefault = "xslt"; this.format = typeof (data === null || data === void 0 ? void 0 : data.format) !== "undefined" ? data === null || data === void 0 ? void 0 : data.format : formatDefault; let sourceDefault = "value"; this.source = typeof (data === null || data === void 0 ? void 0 : data.source) !== "undefined" ? data === null || data === void 0 ? void 0 : data.source : sourceDefault; let uriDefault = ""; this.uri = typeof (data === null || data === void 0 ? void 0 : data.uri) !== "undefined" ? data === null || data === void 0 ? void 0 : data.uri : uriDefault; this.value = data === null || data === void 0 ? void 0 : data.value; } static getFileNameDefault() { return ""; } static getFileNameDescription() { return "The filename of the file. This is the name under which the resource can be found again and is especially important for resources that are referenced from other files passed here via this name. (For example, the name of a CSS stylesheet that is referenced by name from an XSLT stylesheet)."; } static getFormatDefault() { return "xslt"; } static getFormatDescription() { return "The type of the resource passed\n\n* xlst = An XSLT stylesheet to be used for the transformation.\n* other = Any other resource that is needed for the transformation. For example, this can be a CSS stylesheet, which is used by an output file of a transformation if it results in HTML output.\n\n**Important:** The order of the resources can be important if multiple transformations are to be performed, i.e. multiple resources of the format \"xlst\" are passed. The transformations are performed in the order in which they are passed, in which case each transformation uses the output of the previous transformation as the starting point for its own transformation."; } static getSourceDefault() { return "value"; } static getSourceDescription() { return "Selects the data source for the hereby expressed resource. Possible values are:\n\n* value = The element's value shall contain the BASE64 encoded data.\n* uri = The data shall be located at the given uri."; } static getUriDefault() { return ""; } static getUriDescription() { return "The uri the data shall be located at. (This shall only have effect, if the \"source\" is \"uri\".)"; } static getValueDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new XslTransformationFile(data); } toJson() { return { 'fileName': this.fileName, 'format': this.format, 'source': this.source, 'uri': this.uri, 'value': this.value, }; } clone() { return XslTransformationFile.fromJson(this.toJson()); } } exports.XslTransformationFile = XslTransformationFile; //# sourceMappingURL=XslTransformationFile.js.map