@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
78 lines • 3.71 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppearanceAdd = void 0;
const index_1 = require("./../index");
class AppearanceAdd {
constructor(data) {
let identifierDefault = "";
this.identifier = typeof (data === null || data === void 0 ? void 0 : data.identifier) !== "undefined" ? data === null || data === void 0 ? void 0 : data.identifier : identifierDefault;
this.identifierElements = index_1.SignatureIdentifier.fromJson(data === null || data === void 0 ? void 0 : data.identifierElements);
this.image = index_1.SignatureImage.fromJson(data === null || data === void 0 ? void 0 : data.image);
let nameDefault = "";
this.name = typeof (data === null || data === void 0 ? void 0 : data.name) !== "undefined" ? data === null || data === void 0 ? void 0 : data.name : nameDefault;
let pageDefault = 1;
this.page = typeof (data === null || data === void 0 ? void 0 : data.page) !== "undefined" ? data === null || data === void 0 ? void 0 : data.page : pageDefault;
this.position = index_1.SignaturePosition.fromJson(data === null || data === void 0 ? void 0 : data.position);
let showCommonNameDefault = true;
this.showCommonName = typeof (data === null || data === void 0 ? void 0 : data.showCommonName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.showCommonName : showCommonNameDefault;
}
static getIdentifierDefault() {
return "";
}
static getIdentifierDescription() {
return "Text that should be displayed in the signature's right-hand side text field. If a value is not specified, the field will display the name of the signatory and the name parts of the certificate (please refer to `<identifierElements>` further below).";
}
static getIdentifierElementsDescription() {
return "";
}
static getImageDescription() {
return "";
}
static getNameDefault() {
return "";
}
static getNameDescription() {
return "Name that will be displayed in the signature's left-hand side area. If no value is specified, the name of the signer is displayed in this area (CN name part from the certificate) if `showCommonName` is enabled.";
}
static getPageDefault() {
return 1;
}
static getPageDescription() {
return "Defines the page on which the signature is to be displayed.";
}
static getPageMin() {
return 1;
}
static getPositionDescription() {
return "";
}
static getShowCommonNameDefault() {
return true;
}
static getShowCommonNameDescription() {
return "Displays or hides the certificate name (CN) of the certificate in the signature's left-hand side area. A set `name` always has priority over the setting of this option.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new AppearanceAdd(data);
}
toJson() {
var _a, _b, _c;
return {
'identifier': this.identifier,
'identifierElements': (_a = this.identifierElements) === null || _a === void 0 ? void 0 : _a.toJson(),
'image': (_b = this.image) === null || _b === void 0 ? void 0 : _b.toJson(),
'name': this.name,
'page': this.page,
'position': (_c = this.position) === null || _c === void 0 ? void 0 : _c.toJson(),
'showCommonName': this.showCommonName,
};
}
clone() {
return AppearanceAdd.fromJson(this.toJson());
}
}
exports.AppearanceAdd = AppearanceAdd;
//# sourceMappingURL=AppearanceAdd.js.map