@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
48 lines • 1.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddComment = void 0;
const index_1 = require("./../index");
class AddComment {
constructor(data) {
this.changeAnnotationState = (data.changeAnnotationState || []).map(index_1.ReplyStateAnnotation.fromJson);
this.markAnnotation = (data.markAnnotation || []).map(index_1.MarkedStateAnnotation.fromJson);
this.replyTo = (data.replyTo || []).map(index_1.ReplyToAnnotation.fromJson);
}
static getChangeAnnotationStateDefault() {
return [];
}
static getChangeAnnotationStateDescription() {
return "";
}
static getMarkAnnotationDefault() {
return [];
}
static getMarkAnnotationDescription() {
return "";
}
static getReplyToDefault() {
return [];
}
static getReplyToDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new AddComment(data);
}
toJson() {
var _a, _b, _c;
return {
'changeAnnotationState': (_a = this.changeAnnotationState) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()),
'markAnnotation': (_b = this.markAnnotation) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()),
'replyTo': (_c = this.replyTo) === null || _c === void 0 ? void 0 : _c.map((data) => data.toJson()),
};
}
clone() {
return AddComment.fromJson(this.toJson());
}
}
exports.AddComment = AddComment;
//# sourceMappingURL=AddComment.js.map