UNPKG

@nutrient-sdk/react-native

Version:
778 lines (777 loc) 31.3 kB
"use strict"; /** * @class DocumentJSON * @ignore * @memberof Annotation * @property {AnnotationType[]} [annotations] Array of annotations. * @property {any[]} [formFields] Array of form fields. * @property {string} [format] Format of the Instant JSON. * @property {Object.<string, AnnotationAttachment>} [attachments] Annotation attachments. * @property {Object.<string, string>} [pdfId] PDF identifier. * @property {Object.<string, any>} [metadata] Metadata. * @property {number[]} [skippedPdfObjectIds] Skipped PDF object IDs. */ /** * @class AnnotationAttachment * @ignore * @memberof Annotation * @property {string} [binary] Binary data as base64 string. * @property {string} [contentType] MIME type. * @property {string} [fileName] File name. * @property {string} [description] Description. */ /** * @class BaseAnnotation * @ignore * @memberof Annotation * @property {string} [uuid] Unique identifier generated by Nutrient * @property {string} [id] Unique identifier * @property {string} [name] Name identifier * @property {string} [createdAt] Creation date in ISO format * @property {string} [updatedAt] Last update date in ISO format * @property {string} [creatorName] Creator name * @property {number[]} bbox Position on page [left, top, width, height] * @property {number} pageIndex Zero-based page index where annotation is placed * @property {number} opacity Opacity value between 0 and 1. Default: 1 * @property {number} [pdfObjectId] PDF object identifier. Default: null * @property {string} type Annotation type identifier * @property {Array<string>} [flags] Annotation flags * @property {number} v Version number. Default: 1 * @property {Object} [customData] Custom metadata * @property {string} blendMode Blend mode. Default: "normal" * @property {boolean} [hidden] Whether annotation is hidden. Default: false * @property {boolean} [locked] Whether annotation is locked. Default: false * @property {boolean} [lockedContents] Whether contents are locked. Default: false * @property {boolean} [noPrint] Whether annotation can be printed. Default: false * @property {boolean} [noView] Whether annotation is visible. Default: false * @property {boolean} [readOnly] Whether annotation is read only. Default: false */ /** * @class CommentMarkerAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/comment-marker" * @property {string} [color] Color in hex format */ /** * @class ShapeEllipseAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/shape/ellipse" * @property {number[]} [cloudyBorderInset] Border inset [left, top, right, bottom] * @property {number} [cloudyBorderIntensity] Border cloudiness intensity */ /** * @class MarkupHighlightAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/markup/highlight" * @property {string} color Highlight color * @property {number[]} rects Rectangle coordinates for highlighted areas */ /** * @class ImageAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/image" * @property {string} [contentType] Image MIME type * @property {string} [description] Image description * @property {string} [fileName] Image file name * @property {string} [imageAttachmentId] Attachment identifier * @property {boolean} [isSignature] Whether image is a signature. Default: false * @property {number} [rotation] Rotation angle in degrees. Default: 0 */ /** * @class InkAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/ink" * @property {Object} [lines] Ink strokes. * @property {Array<Array<any>>} [lines.points] Points arrays. * @property {Array<Array<number>>} [lines.intensities] Pressure values. * @property {number} lineWidth Stroke width. Default: 5 * @property {string} [strokeColor] Stroke color. Default: "#0000FF" * @property {boolean} isDrawnNaturally Whether drawn by hand. Default: false * @property {boolean} [isSignature] Whether ink is a signature. Default: false * @property {string} [backgroundColor] Background color */ /** * @class LineShapeAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. * @property {number[]} [startPoint] Line start point. * @property {number[]} [endPoint] Line end point. * @property {Object} [lineCaps] Line end styles. */ /** * @class LinkAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. * @property {Object} [action] Link action. * @property {string} [borderColor] Border color. * @property {string} [borderStyle] Border style. * @property {number} [borderWidth] Border width. * @property {string} [note] Link note. */ /** * @class MarkupAnnotation * @ignore * @memberof Annotation * @property {string} type Markup type identifier * @property {string} color Color in hex format * @property {Array<any>} rects Rectangle coordinates [left, top, right, bottom] * @property {string} [note] Note text */ /** * @class MediaAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/media" * @property {string} [contentType] Media MIME type * @property {string} [fileName] Media file name * @property {string} mediaAttachmentId Media attachment ID * @property {string} [posterImageAttachmentId] Poster image ID * @property {boolean} [autoplay] Auto-play media. Default: false * @property {boolean} [showControls] Show media controls. Default: true * @property {boolean} [repeat] Loop media. Default: false * @property {number} [volume] Media volume. Default: 1 * @property {number} [offset] Time offset. Default: 0 * @property {string} [mediaSource] Media source type * @property {Object} [encoding] Audio encoding settings */ /** * @class NoteAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/note" * @property {string} [color] Note color * @property {string} [icon] Note icon type * @property {(string|Object)} [text] Text content. */ /** * @class ShapeAnnotation * @ignore * @memberof Annotation * @property {string} type Shape type identifier * @property {string} [fillColor] Fill color in hex format * @property {string} [strokeColor] Stroke color in hex format * @property {number} [strokeWidth] Stroke width in points * @property {number[]} [strokeDashArray] Dash pattern [dash, gap] * @property {number} [cloudyBorderIntensity] Border cloudiness intensity * @property {string} [note] Note text * @property {Object} [measurementScale] Scale for measurements * @property {string} [measurementPrecision] Measurement precision * @property {number[]} [measurementBBox] Measurement bounding box */ /** * @class SquigglyMarkupAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/markup/squiggly" */ /** * @class RedactionMarkupAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/markup/redaction" * @property {string} [fillColor] Fill color in hex format * @property {string} [overlayText] Text to display over redaction * @property {boolean} [repeatOverlayText] Whether to repeat overlay text * @property {string} [outlineColor] Outline color in hex format * @property {number} [rotation] Rotation angle in degrees. Default: 0 */ /** * @class StampAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/stamp" * @property {string} [imageAttachmentId] Image attachment identifier * @property {string} [stampType] Predefined stamp type * @property {string} [title] Title text * @property {string} [subtitle] Subtitle text * @property {string} [color] Color in hex format * @property {number} [rotation] Rotation angle in degrees. Default: 0 * @property {string} [subject] Subject text * @property {number[]} [size] Size [width, height] * @property {number} [scale] Scale factor */ /** * @class StrikeOutMarkupAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/markup/strikeout" */ /** * @class TextAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/text" * @property {(string|Object)} [text] Text content. * @property {string} [fontFamily] Font family name * @property {number} fontSize Font size in points * @property {string} fontColor Font color in hex format * @property {string} [fontWeight] Font weight * @property {string[]} [fontStyle] Font style attributes * @property {string} [textDecorationLine] Text decoration type * @property {string} [textDecorationStyle] Text decoration style * @property {string} [textDecorationColor] Decoration color in hex format * @property {string} [horizontalAlign] Horizontal alignment * @property {string} [verticalAlign] Vertical alignment * @property {number} [characterSpacing] Character spacing * @property {number} [lineHeight] Line height * @property {string} [backgroundColor] Background color in hex format * @property {string} [borderStyle] Border style * @property {number} [borderWidth] Border width in points * @property {number} [rotation] Rotation angle in degrees * @property {number} [cloudyBorderIntensity] Border cloudiness intensity * @property {number[]} [cloudyBorderInset] Border inset [left, top, right, bottom] * @property {boolean} [isFitting] Whether text fits container * @property {Object} [callout] Callout properties * @property {string} [font] Font name */ /** * @class UnderlineMarkupAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/markup/underline" */ /** * @class WidgetAnnotation * @ignore * @memberof Annotation * @property {string} type Type identifier. Default: "pspdfkit/widget" * @property {string} horizontalAlign Horizontal alignment. Default: "left" * @property {string} verticalAlign Vertical alignment * @property {string} [formFieldName] Form field name * @property {string} [font] Font name * @property {string} [fontColor] Font color in hex format * @property {number} [fontSize] Font size in points * @property {string} [fieldType] Field type * @property {(string|number|boolean)} [fieldValue] Field value * @property {(string|number|boolean)} [defaultValue] Default field value * @property {string} [placeholder] Placeholder text * @property {number} [maxLength] Maximum text length * @property {boolean} [isMultiline] Whether field accepts multiple lines * @property {boolean} [isPassword] Whether field is password type * @property {string[]} [choices] Available choices for choice fields * @property {boolean} [isReadOnly] Whether field is read-only * @property {boolean} [isRequired] Whether field is required * @property {boolean} [isEditable] Whether field is editable * @property {number} [rotation] Rotation angle in degrees. Default: 0 * @property {string} [backgroundColor] Background color in hex format * @property {string} [borderColor] Border color in hex format * @property {string} [borderStyle] Border style * @property {number} [borderWidth] Border width in points * @property {Object} [additionalActions] Form field actions * @property {boolean} [isBold] Whether text is bold. Default: false * @property {boolean} [isItalic] Whether text is italic. Default: false * @property {FormElement} [formElement] The form element associated with this widget annotation. */ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.WidgetAnnotation = exports.UnderlineMarkupAnnotation = exports.TextAnnotation = exports.StrikeOutMarkupAnnotation = exports.StampAnnotation = exports.RedactionMarkupAnnotation = exports.SquigglyMarkupAnnotation = exports.RectangleShapeAnnotation = exports.PolylineShapeAnnotation = exports.PolygonShapeAnnotation = exports.MediaAnnotation = exports.NoteAnnotation = exports.LinkAnnotation = exports.LineShapeAnnotation = exports.InkAnnotation = exports.ImageAnnotation = exports.HighlightMarkupAnnotation = exports.EllipseShapeAnnotation = exports.CommentMarkerAnnotation = exports.MarkupAnnotation = exports.ShapeAnnotation = exports.BaseAnnotation = exports.AnnotationAttachment = exports.DocumentJSON = void 0; /** * Document JSON wrapper used to construct Document JSON objects. * @ignore */ var DocumentJSON = /** @class */ (function () { function DocumentJSON() { } return DocumentJSON; }()); exports.DocumentJSON = DocumentJSON; /** * Annotation attachments used to store images and other attachments. * @ignore */ var AnnotationAttachment = /** @class */ (function () { function AnnotationAttachment() { } return AnnotationAttachment; }()); exports.AnnotationAttachment = AnnotationAttachment; /** * Base interface for all annotation types * @ignore */ var BaseAnnotation = /** @class */ (function () { /** * @ignore */ function BaseAnnotation(params) { var _a, _b, _c, _d, _e, _f, _g, _h, _j; /** Opacity value between 0 and 1 */ this.opacity = 1; /** Version number */ this.v = 1; /** Blend mode */ this.blendMode = "normal"; /** Whether the annotation is hidden */ this.hidden = false; /** Whether the annotation is locked */ this.locked = false; /** Whether the annotation contents are locked */ this.lockedContents = false; /** Whether the annotation can be printed */ this.noPrint = false; /** Whether the annotation is visible */ this.noView = false; /** Whether the annotation is read only */ this.readOnly = false; this.pageIndex = params.pageIndex; this.bbox = params.bbox; this.opacity = (_a = params.opacity) !== null && _a !== void 0 ? _a : 1; this.v = (_b = params.v) !== null && _b !== void 0 ? _b : 1; this.blendMode = (_c = params.blendMode) !== null && _c !== void 0 ? _c : "normal"; this.hidden = (_d = params.hidden) !== null && _d !== void 0 ? _d : false; this.locked = (_e = params.locked) !== null && _e !== void 0 ? _e : false; this.lockedContents = (_f = params.lockedContents) !== null && _f !== void 0 ? _f : false; this.noPrint = (_g = params.noPrint) !== null && _g !== void 0 ? _g : false; this.noView = (_h = params.noView) !== null && _h !== void 0 ? _h : false; this.readOnly = (_j = params.readOnly) !== null && _j !== void 0 ? _j : false; this.uuid = params.uuid; this.id = params.id; this.name = params.name; this.createdAt = params.createdAt; this.updatedAt = params.updatedAt; this.creatorName = params.creatorName; this.pdfObjectId = params.pdfObjectId; this.type = params.type; this.flags = params.flags; this.customData = params.customData; this.subject = params.subject; this.action = params.action; } return BaseAnnotation; }()); exports.BaseAnnotation = BaseAnnotation; /** * Shape annotation base interface * @ignore */ var ShapeAnnotation = /** @class */ (function (_super) { __extends(ShapeAnnotation, _super); function ShapeAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.fillColor = params.fillColor; _this.strokeColor = params.strokeColor; _this.strokeWidth = params.strokeWidth; _this.strokeDashArray = params.strokeDashArray; _this.cloudyBorderIntensity = params.cloudyBorderIntensity; _this.note = params.note; _this.measurementScale = params.measurementScale; _this.measurementPrecision = params.measurementPrecision; _this.measurementBBox = params.measurementBBox; return _this; } return ShapeAnnotation; }(BaseAnnotation)); exports.ShapeAnnotation = ShapeAnnotation; /** * Markup annotation base interface * @ignore */ var MarkupAnnotation = /** @class */ (function (_super) { __extends(MarkupAnnotation, _super); function MarkupAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.color = params.color; _this.rects = params.rects; _this.note = params.note; return _this; } return MarkupAnnotation; }(BaseAnnotation)); exports.MarkupAnnotation = MarkupAnnotation; /** * Comment marker annotation for general comments * @ignore */ var CommentMarkerAnnotation = /** @class */ (function (_super) { __extends(CommentMarkerAnnotation, _super); function CommentMarkerAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.color = params.color; return _this; } return CommentMarkerAnnotation; }(BaseAnnotation)); exports.CommentMarkerAnnotation = CommentMarkerAnnotation; /** * Ellipse annotation for drawing ellipses * @ignore */ var EllipseShapeAnnotation = /** @class */ (function (_super) { __extends(EllipseShapeAnnotation, _super); function EllipseShapeAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.cloudyBorderInset = params.cloudyBorderInset; _this.cloudyBorderIntensity = params.cloudyBorderIntensity; return _this; } return EllipseShapeAnnotation; }(ShapeAnnotation)); exports.EllipseShapeAnnotation = EllipseShapeAnnotation; /** * Highlight annotation for text markup * @ignore */ var HighlightMarkupAnnotation = /** @class */ (function (_super) { __extends(HighlightMarkupAnnotation, _super); function HighlightMarkupAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; return _this; } return HighlightMarkupAnnotation; }(MarkupAnnotation)); exports.HighlightMarkupAnnotation = HighlightMarkupAnnotation; /** * Image annotation for embedded images * @ignore */ var ImageAnnotation = /** @class */ (function (_super) { __extends(ImageAnnotation, _super); function ImageAnnotation(params) { var _a, _b; var _this = _super.call(this, params) || this; _this.type = params.type; _this.contentType = params.contentType; _this.description = params.description; _this.fileName = params.fileName; _this.imageAttachmentId = params.imageAttachmentId; _this.isSignature = (_a = params.isSignature) !== null && _a !== void 0 ? _a : false; _this.rotation = (_b = params.rotation) !== null && _b !== void 0 ? _b : 0; return _this; } return ImageAnnotation; }(BaseAnnotation)); exports.ImageAnnotation = ImageAnnotation; /** * Ink annotation for freehand drawing * @ignore */ var InkAnnotation = /** @class */ (function (_super) { __extends(InkAnnotation, _super); function InkAnnotation(params) { var _a, _b, _c; var _this = _super.call(this, params) || this; _this.type = params.type; _this.lines = params.lines; _this.lineWidth = (_a = params.lineWidth) !== null && _a !== void 0 ? _a : 5; _this.strokeColor = (_b = params.strokeColor) !== null && _b !== void 0 ? _b : '#0000FF'; _this.isDrawnNaturally = params.isDrawnNaturally; _this.isSignature = (_c = params.isSignature) !== null && _c !== void 0 ? _c : false; _this.backgroundColor = params.backgroundColor; _this.note = params.note; return _this; } return InkAnnotation; }(BaseAnnotation)); exports.InkAnnotation = InkAnnotation; /** * Line annotation for straight lines * @ignore */ var LineShapeAnnotation = /** @class */ (function (_super) { __extends(LineShapeAnnotation, _super); function LineShapeAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.startPoint = params.startPoint; _this.endPoint = params.endPoint; _this.lineCaps = params.lineCaps; return _this; } return LineShapeAnnotation; }(ShapeAnnotation)); exports.LineShapeAnnotation = LineShapeAnnotation; /** * Link annotation for interactive links * @ignore */ var LinkAnnotation = /** @class */ (function (_super) { __extends(LinkAnnotation, _super); function LinkAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.borderColor = params.borderColor; _this.borderStyle = params.borderStyle; _this.borderWidth = params.borderWidth; _this.note = params.note; return _this; } return LinkAnnotation; }(BaseAnnotation)); exports.LinkAnnotation = LinkAnnotation; /** * Note annotation for sticky notes * @ignore */ var NoteAnnotation = /** @class */ (function (_super) { __extends(NoteAnnotation, _super); function NoteAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.color = params.color; _this.icon = params.icon; _this.text = params.text; return _this; } return NoteAnnotation; }(BaseAnnotation)); exports.NoteAnnotation = NoteAnnotation; /** * Media annotation for embedded audio/video * @ignore */ var MediaAnnotation = /** @class */ (function (_super) { __extends(MediaAnnotation, _super); function MediaAnnotation(params) { var _a, _b, _c, _d, _e; var _this = _super.call(this, params) || this; _this.type = params.type; _this.mediaAttachmentId = params.mediaAttachmentId; _this.contentType = params.contentType; _this.fileName = params.fileName; _this.posterImageAttachmentId = params.posterImageAttachmentId; _this.autoplay = (_a = params.autoplay) !== null && _a !== void 0 ? _a : false; _this.showControls = (_b = params.showControls) !== null && _b !== void 0 ? _b : true; _this.repeat = (_c = params.repeat) !== null && _c !== void 0 ? _c : false; _this.volume = (_d = params.volume) !== null && _d !== void 0 ? _d : 1; _this.offset = (_e = params.offset) !== null && _e !== void 0 ? _e : 0; _this.mediaSource = params.mediaSource; _this.encoding = params.encoding; return _this; } return MediaAnnotation; }(BaseAnnotation)); exports.MediaAnnotation = MediaAnnotation; /** * Polygon annotation for closed shapes with multiple points * @ignore */ var PolygonShapeAnnotation = /** @class */ (function (_super) { __extends(PolygonShapeAnnotation, _super); function PolygonShapeAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.points = params.points; return _this; } return PolygonShapeAnnotation; }(ShapeAnnotation)); exports.PolygonShapeAnnotation = PolygonShapeAnnotation; /** * Polyline annotation for open shapes with multiple points * @ignore */ var PolylineShapeAnnotation = /** @class */ (function (_super) { __extends(PolylineShapeAnnotation, _super); function PolylineShapeAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.points = params.points; return _this; } return PolylineShapeAnnotation; }(ShapeAnnotation)); exports.PolylineShapeAnnotation = PolylineShapeAnnotation; /** * Rectangle annotation for drawing rectangles * @ignore */ var RectangleShapeAnnotation = /** @class */ (function (_super) { __extends(RectangleShapeAnnotation, _super); function RectangleShapeAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.cloudyBorderInset = params.cloudyBorderInset; _this.cloudyBorderIntensity = params.cloudyBorderIntensity; return _this; } return RectangleShapeAnnotation; }(ShapeAnnotation)); exports.RectangleShapeAnnotation = RectangleShapeAnnotation; /** * Squiggly annotation for wavy underlines * @ignore */ var SquigglyMarkupAnnotation = /** @class */ (function (_super) { __extends(SquigglyMarkupAnnotation, _super); function SquigglyMarkupAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; return _this; } return SquigglyMarkupAnnotation; }(MarkupAnnotation)); exports.SquigglyMarkupAnnotation = SquigglyMarkupAnnotation; /** * Redaction annotation for permanently removing content * @ignore */ var RedactionMarkupAnnotation = /** @class */ (function (_super) { __extends(RedactionMarkupAnnotation, _super); function RedactionMarkupAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.fillColor = params.fillColor; _this.overlayText = params.overlayText; _this.repeatOverlayText = params.repeatOverlayText; _this.outlineColor = params.outlineColor; _this.rotation = params.rotation; return _this; } return RedactionMarkupAnnotation; }(MarkupAnnotation)); exports.RedactionMarkupAnnotation = RedactionMarkupAnnotation; /** * Stamp annotation for adding stamps/images * @ignore */ var StampAnnotation = /** @class */ (function (_super) { __extends(StampAnnotation, _super); function StampAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.imageAttachmentId = params.imageAttachmentId; _this.stampType = params.stampType; _this.title = params.title; _this.subtitle = params.subtitle; _this.color = params.color; _this.rotation = params.rotation; _this.subject = params.subject; _this.size = params.size; _this.scale = params.scale; return _this; } return StampAnnotation; }(BaseAnnotation)); exports.StampAnnotation = StampAnnotation; /** * Strike out annotation for striking through text * @ignore */ var StrikeOutMarkupAnnotation = /** @class */ (function (_super) { __extends(StrikeOutMarkupAnnotation, _super); function StrikeOutMarkupAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; return _this; } return StrikeOutMarkupAnnotation; }(MarkupAnnotation)); exports.StrikeOutMarkupAnnotation = StrikeOutMarkupAnnotation; /** * Text annotation for adding text boxes * @ignore */ var TextAnnotation = /** @class */ (function (_super) { __extends(TextAnnotation, _super); function TextAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; _this.text = params.text; _this.fontSize = params.fontSize; _this.fontColor = params.fontColor; _this.fontFamily = params.fontFamily; _this.fontWeight = params.fontWeight; _this.fontStyle = params.fontStyle; _this.textDecorationLine = params.textDecorationLine; _this.textDecorationStyle = params.textDecorationStyle; _this.textDecorationColor = params.textDecorationColor; _this.horizontalAlign = params.horizontalAlign; _this.verticalAlign = params.verticalAlign; _this.characterSpacing = params.characterSpacing; _this.lineHeight = params.lineHeight; _this.backgroundColor = params.backgroundColor; _this.borderStyle = params.borderStyle; _this.borderDashArray = params.borderDashArray; _this.borderWidth = params.borderWidth; _this.rotation = params.rotation; _this.cloudyBorderIntensity = params.cloudyBorderIntensity; _this.cloudyBorderInset = params.cloudyBorderInset; _this.isFitting = params.isFitting; _this.callout = params.callout; _this.font = params.font; return _this; } return TextAnnotation; }(BaseAnnotation)); exports.TextAnnotation = TextAnnotation; /** * Underline annotation for underlining text * @ignore */ var UnderlineMarkupAnnotation = /** @class */ (function (_super) { __extends(UnderlineMarkupAnnotation, _super); function UnderlineMarkupAnnotation(params) { var _this = _super.call(this, params) || this; _this.type = params.type; return _this; } return UnderlineMarkupAnnotation; }(MarkupAnnotation)); exports.UnderlineMarkupAnnotation = UnderlineMarkupAnnotation; /** * Widget annotation for form fields * @ignore */ var WidgetAnnotation = /** @class */ (function (_super) { __extends(WidgetAnnotation, _super); function WidgetAnnotation(params) { var _a, _b, _c, _d; var _this = _super.call(this, params) || this; _this.type = params.type; _this.horizontalAlign = (_a = params.horizontalAlign) !== null && _a !== void 0 ? _a : 'left'; _this.verticalAlign = params.verticalAlign; _this.formFieldName = params.formFieldName; _this.font = params.font; _this.fontColor = params.fontColor; _this.fontSize = params.fontSize; _this.fieldType = params.fieldType; _this.fieldValue = params.fieldValue; _this.defaultValue = params.defaultValue; _this.placeholder = params.placeholder; _this.maxLength = params.maxLength; _this.isMultiline = params.isMultiline; _this.isPassword = params.isPassword; _this.choices = params.choices; _this.isReadOnly = params.isReadOnly; _this.isRequired = params.isRequired; _this.isEditable = params.isEditable; _this.rotation = (_b = params.rotation) !== null && _b !== void 0 ? _b : 0; _this.backgroundColor = params.backgroundColor; _this.borderColor = params.borderColor; _this.borderStyle = params.borderStyle; _this.borderWidth = params.borderWidth; _this.additionalActions = params.additionalActions; _this.isBold = (_c = params.isBold) !== null && _c !== void 0 ? _c : false; _this.isItalic = (_d = params.isItalic) !== null && _d !== void 0 ? _d : false; _this.formElement = params.formElement; return _this; } return WidgetAnnotation; }(BaseAnnotation)); exports.WidgetAnnotation = WidgetAnnotation;