2024-08-23 21:30:32 +02:00
|
|
|
import { MarkRect } from './mark'
|
|
|
|
|
2024-07-11 16:16:36 +02:00
|
|
|
export interface MouseState {
|
|
|
|
clicked?: boolean
|
|
|
|
dragging?: boolean
|
|
|
|
resizing?: boolean
|
|
|
|
coordsInWrapper?: {
|
|
|
|
mouseX: number
|
|
|
|
mouseY: number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PdfPage {
|
|
|
|
image: string
|
2024-08-27 15:24:19 +02:00
|
|
|
width: number
|
2024-07-11 16:16:36 +02:00
|
|
|
drawnFields: DrawnField[]
|
|
|
|
}
|
|
|
|
|
2024-08-23 21:30:32 +02:00
|
|
|
export interface DrawnField extends MarkRect {
|
2024-07-11 16:16:36 +02:00
|
|
|
type: MarkType
|
|
|
|
/**
|
|
|
|
* npub of a counter part
|
|
|
|
*/
|
|
|
|
counterpart: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DrawTool {
|
|
|
|
identifier: MarkType
|
|
|
|
label: string
|
2024-08-06 17:53:55 +02:00
|
|
|
icon: JSX.Element
|
2024-07-11 16:16:36 +02:00
|
|
|
defaultValue?: string
|
|
|
|
selected?: boolean
|
|
|
|
active?: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum MarkType {
|
2024-08-19 18:05:14 +02:00
|
|
|
TEXT = 'TEXT',
|
2024-07-11 16:16:36 +02:00
|
|
|
SIGNATURE = 'SIGNATURE',
|
|
|
|
JOBTITLE = 'JOBTITLE',
|
|
|
|
FULLNAME = 'FULLNAME',
|
2024-08-19 18:05:14 +02:00
|
|
|
INITIALS = 'INITIALS',
|
|
|
|
DATETIME = 'DATETIME',
|
2024-07-11 16:16:36 +02:00
|
|
|
DATE = 'DATE',
|
2024-08-19 18:05:14 +02:00
|
|
|
NUMBER = 'NUMBER',
|
|
|
|
IMAGES = 'IMAGES',
|
|
|
|
CHECKBOX = 'CHECKBOX',
|
|
|
|
MULTIPLE = 'MULTIPLE',
|
|
|
|
FILE = 'FILE',
|
|
|
|
RADIO = 'RADIO',
|
|
|
|
SELECT = 'SELECT',
|
|
|
|
CELLS = 'CELLS',
|
|
|
|
STAMP = 'STAMP',
|
|
|
|
PAYMENT = 'PAYMENT',
|
|
|
|
PHONE = 'PHONE'
|
2024-08-06 17:53:55 +02:00
|
|
|
}
|