import { ObjectManager } from "../../ObjectManager"; import { Field, type FieldBaseProperties } from "./Field"; import type { WidgetAnnotation, WidgetProperties } from "../Annotations/WidgetAnnotation"; import { type Rect } from "../../Types"; import { type PdfPage } from "../PdfPage"; /** * Defines possible values of {@link SignatureLockedFieldsProperties.type} property. */ export declare enum SignatureLockedFieldsType { /** * All fields should be processed. */ All = 0, /** * Fields which names are specified in {@link SignatureLockedFieldsProperties#fieldNames} are processed. */ SpecifiedOnly = 1, /** * Fields which names are NOT specified in {@link SignatureLockedFieldsProperties#fieldNames} are submitted. */ AllButSpecified = 2 } /** * Defines range of the {@link Field} objects to be locked when {@link SignatureField} is signed. */ export type SignatureLockedFieldsProperties = { /** * The type of the range. */ type: SignatureLockedFieldsType; /** * The list of fields' names which should be included / excluded from processing depending on 'type' property. */ fieldNames?: string[] | null; }; /** * Defines property of a {@link SignatureField}. */ export type SignatureFieldProperties = FieldBaseProperties & { type: "signature"; /** * Defines the position and dimensions of the field on the page using a bounding rectangle. * * Note: If a widget is specified via the 'widget' property, * its 'rect' value takes precedence and will override this rectangle definition. */ rect?: Rect; /** * The widget annotation defining view properties of the checkbox field. */ widget?: WidgetAnnotation | WidgetProperties; /** * The {@link SignatureLockedFieldsProperties} object defining * a set of form fields to be locked when this signature field is signed. */ lockedFields?: SignatureLockedFieldsProperties; }; /** * Represents the signature field. */ export declare class SignatureField extends Field { /** * Creates a new {@link SignatureField}. * * @param om - {@link ObjectManager} that controls the lifetime of the {@link SignatureField}. */ constructor(om: ObjectManager); /** * Creates a new {@link SignatureField}. */ constructor(); /** * Gets the {@link WidgetAnnotation} defining view properties of the signature field. */ get widget(): WidgetAnnotation; /** * Gets or sets the {@link PdfPage} containing this field. * This property wraps the {@link WidgetAnnotation#page} property * and functions identically to: * this.widget.page = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#page} */ get page(): PdfPage | null; /** * Gets or sets the {@link PdfPage} containing this field. * This property wraps the {@link WidgetAnnotation#page} property * and functions identically to: * this.widget.page = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#page} */ set page(value: PdfPage | null); /** * Gets or sets the rectangle that defines the location and size of the field on a page. * This property wraps the {@link WidgetAnnotation#rect} property * and functions identically to: * this.widget.rect = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#rect} */ get rect(): Rect; /** * Gets or sets the rectangle that defines the location and size of the field on a page. * This property wraps the {@link WidgetAnnotation#rect} property * and functions identically to: * this.widget.rect = value; * * Note that a field may have multiple associated annotations across different pages. * These can be added and configured using the {@link Field@widgets} property. * * @see {@link WidgetAnnotation#rect} */ set rect(value: Rect); /** * Gets or sets the {@link SignatureLockedFieldsProperties} object defining * a set of form fields to be locked when this signature field is signed, * if null then no fields are locked. */ get lockedFields(): SignatureLockedFieldsProperties | null; /** * Gets or sets the {@link SignatureLockedFieldsProperties} object defining * a set of form fields to be locked when this signature field is signed, * if null then no fields are locked. */ set lockedFields(value: SignatureLockedFieldsProperties | null); }