UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

58 lines 2.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PortfolioAdd = void 0; const index_1 = require("./../index"); class PortfolioAdd { constructor(data) { this.file = (data.file || []).map(index_1.PortfolioFile.fromJson); this.folder = (data.folder || []).map(index_1.PortfolioFolder.fromJson); let initialDocumentPathDefault = ""; this.initialDocumentPath = typeof (data === null || data === void 0 ? void 0 : data.initialDocumentPath) !== "undefined" ? data === null || data === void 0 ? void 0 : data.initialDocumentPath : initialDocumentPathDefault; let initialFileNameDefault = ""; this.initialFileName = typeof (data === null || data === void 0 ? void 0 : data.initialFileName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.initialFileName : initialFileNameDefault; } static getFileDefault() { return []; } static getFileDescription() { return ""; } static getFolderDefault() { return []; } static getFolderDescription() { return ""; } static getInitialDocumentPathDefault() { return ""; } static getInitialDocumentPathDescription() { return "Defines the path\/folder where the initially shown document is stored in the portfolio.\n\n**Important:** The \"path\" and \"fileName\" parameters follow and implement the glob selection patterns for files and paths. Which is: A portfolio path is defined by \"\/\" separated nested folder names."; } static getInitialFileNameDefault() { return ""; } static getInitialFileNameDescription() { return "Select the name of the initially shown document.\n\n**Important:** The \"path\" and \"fileName\" parameters follow and implement the glob selection patterns for files and paths. Which is: A portfolio path is defined by \"\/\" separated nested folder names."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new PortfolioAdd(data); } toJson() { var _a, _b; return { 'file': (_a = this.file) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()), 'folder': (_b = this.folder) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()), 'initialDocumentPath': this.initialDocumentPath, 'initialFileName': this.initialFileName, }; } clone() { return PortfolioAdd.fromJson(this.toJson()); } } exports.PortfolioAdd = PortfolioAdd; //# sourceMappingURL=PortfolioAdd.js.map