UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

42 lines 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileDataStore = void 0; const index_1 = require("./../index"); class FileDataStore { constructor(data) { let fileGroupDefault = "generic"; this.fileGroup = typeof data.fileGroup !== "undefined" ? data.fileGroup : fileGroupDefault; } static getFileGroupDefault() { return "generic"; } static getFileGroupDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } switch (data.fileGroup) { case 'background': return index_1.BackgroundFileDataStore.fromJson(data); case 'generic': return index_1.GenericFileDataStore.fromJson(data); case 'logo': return index_1.LogoFileDataStore.fromJson(data); case 'theme': return index_1.ThemeFileDataStore.fromJson(data); } return new FileDataStore(data); } toJson() { return { 'fileGroup': this.fileGroup, }; } clone() { return FileDataStore.fromJson(this.toJson()); } } exports.FileDataStore = FileDataStore; //# sourceMappingURL=FileDataStore.js.map