import { IEnvelope, IEnvelopeField, ITemplateField, TFieldType, VerdocsEndpoint } from '@verdocs/js-sdk'; import { IDocumentPageInfo } from './Types'; export declare const defaultWidth: (type: TFieldType) => 150 | 105 | 75 | 85 | 24 | 14 | 71; export declare const defaultHeight: (type: TFieldType) => 24 | 14 | 41 | 15 | 20 | 36 | 50; export declare const setControlStyles: (el: HTMLElement, field: ITemplateField | IEnvelopeField, xScale: number, yScale: number) => void; export declare const getControlStyles: (field: ITemplateField | IEnvelopeField, xScale: number, yScale: number) => { zIndex: string; width: string; height: string; position: string; left: string; bottom: string; transform: string; }; export declare const getFieldId: (field: ITemplateField | IEnvelopeField) => string; interface IFieldOptions { disabled?: boolean; editable?: boolean; draggable?: boolean; done?: boolean; } export declare const updateDocumentFieldValue: (field: ITemplateField | IEnvelopeField) => void; export declare const renderDocumentField: (source: "envelope" | "template", field: ITemplateField | IEnvelopeField, docPage: IDocumentPageInfo, fieldOptions: IFieldOptions, tabIndex?: number) => any; /** * Helper function to safely set/update components in a CSS transform attribute. Transform is normally set as a string of * `operation1(param) operation2(param) ...` components, which makes updating them a bit of a pain. This will remove the * specified component if it's already set and replace it with the new value, without touching the other components that * may already be set. Note that this operation moves the component to the end of the transform chain so it's not meant * to be used for order-sensitive components e.g. translate-then-rotate. */ export declare const updateCssTransform: (el: HTMLElement, key: string, value: string) => void; export declare const removeCssTransform: (el: HTMLElement) => void; export declare const saveAttachment: (endpoint: VerdocsEndpoint, envelope: IEnvelope, documentId: string) => Promise; export declare const saveEnvelopesAsZip: (endpoint: VerdocsEndpoint, envelopes: IEnvelope[]) => Promise; /** * Throttle a given function by a delay value. Useful for things like resizeObserver. */ export declare const throttle: (f: Function, delay: number) => (...args: any[]) => void; /** * Compute the rendered width of a given text string, using a given font. */ export declare const renderedTextWidth: (text: string, font?: string) => number; export declare const convertToE164: (input: string) => string; export interface IFlagOptions { variant: 'fill' | 'next'; label: string; showSkip?: boolean; onSkip?: () => void; onClick?: () => void; id?: string; } export declare const renderDocumentFlag: (docPage: IDocumentPageInfo, y: number, // Bottom position from field height: number, // Field height options: IFlagOptions) => any; /** * Helper to generate a human-readable label for a field. */ export declare const getFieldLabel: (field: IEnvelopeField | ITemplateField) => string; export {};