@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
89 lines • 3.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Markup = void 0;
const index_1 = require("./../index");
class Markup {
constructor(data) {
let creationDateDefault = "";
this.creationDate = typeof (data === null || data === void 0 ? void 0 : data.creationDate) !== "undefined" ? data === null || data === void 0 ? void 0 : data.creationDate : creationDateDefault;
let creatorDefault = "";
this.creator = typeof (data === null || data === void 0 ? void 0 : data.creator) !== "undefined" ? data === null || data === void 0 ? void 0 : data.creator : creatorDefault;
let intentsDefault = "";
this.intents = typeof (data === null || data === void 0 ? void 0 : data.intents) !== "undefined" ? data === null || data === void 0 ? void 0 : data.intents : intentsDefault;
let opacityDefault = 100;
this.opacity = typeof (data === null || data === void 0 ? void 0 : data.opacity) !== "undefined" ? data === null || data === void 0 ? void 0 : data.opacity : opacityDefault;
this.relation = index_1.RelationMarkup.fromJson(data === null || data === void 0 ? void 0 : data.relation);
let richContentsDefault = "";
this.richContents = typeof (data === null || data === void 0 ? void 0 : data.richContents) !== "undefined" ? data === null || data === void 0 ? void 0 : data.richContents : richContentsDefault;
let subjectDefault = "";
this.subject = typeof (data === null || data === void 0 ? void 0 : data.subject) !== "undefined" ? data === null || data === void 0 ? void 0 : data.subject : subjectDefault;
}
static getCreationDateDefault() {
return "";
}
static getCreationDateDescription() {
return "The date of the annotation's creation. This string will contain the date in ASN.1 standard format. (D:YYYYMMDDHHmmSSOHH'mm)";
}
static getCreatorDefault() {
return "";
}
static getCreatorDescription() {
return "The name of the annotation's author.";
}
static getIntentsDefault() {
return "";
}
static getIntentsDescription() {
return "The annotation's intents. Depending on the annotation sub type the intents value shall serve further purposes.";
}
static getOpacityDefault() {
return 100;
}
static getOpacityDescription() {
return "The annotations opacity as a percentage, where 100 is fully oqaque and 0 is fully transparent.";
}
static getOpacityMin() {
return 0;
}
static getOpacityMax() {
return 100;
}
static getRelationDescription() {
return "";
}
static getRichContentsDefault() {
return "";
}
static getRichContentsDescription() {
return "A richtext string containing defining style and contents of the annotation. (This String shall conform to the richtext conventions of the XML Forms Specification (XFA)).";
}
static getSubjectDefault() {
return "";
}
static getSubjectDescription() {
return "The annotation's subject.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new Markup(data);
}
toJson() {
var _a;
return {
'creationDate': this.creationDate,
'creator': this.creator,
'intents': this.intents,
'opacity': this.opacity,
'relation': (_a = this.relation) === null || _a === void 0 ? void 0 : _a.toJson(),
'richContents': this.richContents,
'subject': this.subject,
};
}
clone() {
return Markup.fromJson(this.toJson());
}
}
exports.Markup = Markup;
//# sourceMappingURL=Markup.js.map