UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

69 lines 3.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EditToolboxAnnotation = void 0; const index_1 = require("./../index"); class EditToolboxAnnotation { constructor(data) { this.circle = index_1.CircleAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.circle); this.freetext = index_1.FreeTextAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.freetext); this.line = index_1.LineAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.line); this.markup = index_1.MarkupAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.markup); this.redact = index_1.RedactAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.redact); this.rubberstamp = index_1.RubberStampAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.rubberstamp); this.selection = index_1.SelectionEdit.fromJson(data.selection); this.square = index_1.SquareAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.square); this.text = index_1.TextAnnotation.fromJson(data === null || data === void 0 ? void 0 : data.text); } static getCircleDescription() { return ""; } static getFreetextDescription() { return ""; } static getLineDescription() { return ""; } static getMarkupDescription() { return ""; } static getRedactDescription() { return ""; } static getRubberstampDescription() { return ""; } static getSelectionDescription() { return ""; } static getSquareDescription() { return ""; } static getTextDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new EditToolboxAnnotation(data); } toJson() { var _a, _b, _c, _d, _e, _f, _g, _h, _j; return { 'circle': (_a = this.circle) === null || _a === void 0 ? void 0 : _a.toJson(), 'freetext': (_b = this.freetext) === null || _b === void 0 ? void 0 : _b.toJson(), 'line': (_c = this.line) === null || _c === void 0 ? void 0 : _c.toJson(), 'markup': (_d = this.markup) === null || _d === void 0 ? void 0 : _d.toJson(), 'redact': (_e = this.redact) === null || _e === void 0 ? void 0 : _e.toJson(), 'rubberstamp': (_f = this.rubberstamp) === null || _f === void 0 ? void 0 : _f.toJson(), 'selection': (_g = this.selection) === null || _g === void 0 ? void 0 : _g.toJson(), 'square': (_h = this.square) === null || _h === void 0 ? void 0 : _h.toJson(), 'text': (_j = this.text) === null || _j === void 0 ? void 0 : _j.toJson(), }; } clone() { return EditToolboxAnnotation.fromJson(this.toJson()); } } exports.EditToolboxAnnotation = EditToolboxAnnotation; //# sourceMappingURL=EditToolboxAnnotation.js.map