@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
49 lines • 2.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectionAttachment = void 0;
class SelectionAttachment {
constructor(data) {
let contextDefault = "all";
this.context = typeof (data === null || data === void 0 ? void 0 : data.context) !== "undefined" ? data === null || data === void 0 ? void 0 : data.context : contextDefault;
let fileMaskDefault = "";
this.fileMask = typeof (data === null || data === void 0 ? void 0 : data.fileMask) !== "undefined" ? data === null || data === void 0 ? void 0 : data.fileMask : fileMaskDefault;
let pagesDefault = "";
this.pages = typeof (data === null || data === void 0 ? void 0 : data.pages) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pages : pagesDefault;
}
static getContextDefault() {
return "all";
}
static getContextDescription() {
return "Level to which the selection applies.\n\n* all = All levels\n* document = Document level only\n* page = Page level only";
}
static getFileMaskDefault() {
return "";
}
static getFileMaskDescription() {
return "Filters by file name for the selection. \"\\*.xls\", for example, would result in all XLS attachments in the selection area being removed. Meanwhile, \"xyz.json\" would result in attachments named \"xyz.json\" being removed from the selection area.";
}
static getPagesDefault() {
return "";
}
static getPagesDescription() {
return "Page range to which the selection applies.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new SelectionAttachment(data);
}
toJson() {
return {
'context': this.context,
'fileMask': this.fileMask,
'pages': this.pages,
};
}
clone() {
return SelectionAttachment.fromJson(this.toJson());
}
}
exports.SelectionAttachment = SelectionAttachment;
//# sourceMappingURL=SelectionAttachment.js.map