feat: client-text and client-checkbox field types — signer fills text/checks boxes on signing page
This commit is contained in:
@@ -38,6 +38,8 @@ const FIELD_HEIGHTS: Record<SignatureFieldType, number> = {
|
||||
'date': 12,
|
||||
'text': 12,
|
||||
'checkbox': 14,
|
||||
'client-text': 12,
|
||||
'client-checkbox': 14,
|
||||
};
|
||||
|
||||
// Width clamping — use the exact measured blank width but stay within these bounds
|
||||
@@ -49,6 +51,8 @@ const SIZE_LIMITS: Record<SignatureFieldType, { minW: number; maxW: number }> =
|
||||
'date': { minW: 50, maxW: 130 },
|
||||
'text': { minW: 30, maxW: 280 },
|
||||
'checkbox': { minW: 14, maxW: 20 },
|
||||
'client-text': { minW: 30, maxW: 280 },
|
||||
'client-checkbox': { minW: 14, maxW: 20 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,11 +4,13 @@ import { relations } from "drizzle-orm";
|
||||
export type SignatureFieldType =
|
||||
| 'client-signature'
|
||||
| 'initials'
|
||||
| 'text'
|
||||
| 'checkbox'
|
||||
| 'date'
|
||||
| 'text' // agent fills at prepare time
|
||||
| 'checkbox' // agent fills at prepare time
|
||||
| 'date' // auto-stamped with signing date
|
||||
| 'agent-signature'
|
||||
| 'agent-initials';
|
||||
| 'agent-initials'
|
||||
| 'client-text' // signer types a value on the signing page
|
||||
| 'client-checkbox'; // signer checks/unchecks on the signing page
|
||||
|
||||
export interface SignatureFieldData {
|
||||
id: string;
|
||||
@@ -19,6 +21,7 @@ export interface SignatureFieldData {
|
||||
height: number; // PDF points (default: 36 — 0.5 inches)
|
||||
type?: SignatureFieldType; // Optional — v1.0 documents have no type; fallback = 'client-signature'
|
||||
signerEmail?: string; // Optional — absent = legacy single-signer or agent-owned field
|
||||
hint?: string; // Optional label shown to signer for client-text / client-checkbox fields
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user