@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
61 lines • 2.9 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolboxMoveMove = void 0;
class ToolboxMoveMove {
constructor(data) {
let modeDefault = "afterPage";
this.mode = typeof (data === null || data === void 0 ? void 0 : data.mode) !== "undefined" ? data === null || data === void 0 ? void 0 : data.mode : modeDefault;
let orderDefault = "preserve";
this.order = typeof (data === null || data === void 0 ? void 0 : data.order) !== "undefined" ? data === null || data === void 0 ? void 0 : data.order : orderDefault;
let pagesDefault = "1";
this.pages = typeof (data === null || data === void 0 ? void 0 : data.pages) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pages : pagesDefault;
let targetPositionDefault = 1;
this.targetPosition = typeof (data === null || data === void 0 ? void 0 : data.targetPosition) !== "undefined" ? data === null || data === void 0 ? void 0 : data.targetPosition : targetPositionDefault;
}
static getModeDefault() {
return "afterPage";
}
static getModeDescription() {
return "Used to specify whether the selected page range should be inserted before or after the selected position in the document.\n\n* afterPage = After the selected position.\n* beforePage = Before the selected position.";
}
static getOrderDefault() {
return "preserve";
}
static getOrderDescription() {
return "Used to select the order of the selected pages at the new position.\n\n* preserve = Keeps the original order in which the pages were found in the document.\n* reverse = Reverses the original order in which the pages were found in the document.";
}
static getPagesDefault() {
return "1";
}
static getPagesDescription() {
return "Used to define which page(s) should be moved. The page number can be an individual page, a page range, or a list (separated with commas) (e.g., \"1,5-6,9\").";
}
static getTargetPositionDefault() {
return 1;
}
static getTargetPositionDescription() {
return "Used to select the page number after or before which the selected page range should be inserted. This page must not be part of the page range being moved.";
}
static getTargetPositionMin() {
return 1;
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ToolboxMoveMove(data);
}
toJson() {
return {
'mode': this.mode,
'order': this.order,
'pages': this.pages,
'targetPosition': this.targetPosition,
};
}
clone() {
return ToolboxMoveMove.fromJson(this.toJson());
}
}
exports.ToolboxMoveMove = ToolboxMoveMove;
//# sourceMappingURL=ToolboxMoveMove.js.map