Skip to main content

Class: Designer

Hierarchy

  • BaseUIClass

    Designer

Constructors

constructor

new Designer(props)

Parameters

NameType
propsObject
props.domContainerHTMLElement
props.options?Object
props.options.font?Record<string, { data: ArrayBuffer | Uint8Array ; fallback?: boolean ; subset?: boolean }>
props.options.lang?"en" | "ja"
props.templateObject
props.template.basePdfstring | ArrayBuffer | Uint8Array
props.template.columns?string[]
props.template.sampledata?Record<string, string>[]
props.template.schemasRecord<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[]

Overrides

BaseUIClass.constructor

Defined in

ui/src/Designer.tsx:14

Properties

domContainer

Protected domContainer: null | HTMLElement

Inherited from

BaseUIClass.domContainer

Defined in

ui/src/class.ts:58


onChangeTemplateCallback

Private Optional onChangeTemplateCallback: (template: { basePdf: string | ArrayBuffer | Uint8Array ; columns?: string[] ; sampledata?: Record<string, string>[] ; schemas: Record<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[] }) => void

Type declaration

▸ (template): void

Parameters
NameType
templateObject
template.basePdfstring | ArrayBuffer | Uint8Array
template.columns?string[]
template.sampledata?Record<string, string>[]
template.schemasRecord<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[]
Returns

void

Defined in

ui/src/Designer.tsx:12


onSaveTemplateCallback

Private Optional onSaveTemplateCallback: (template: { basePdf: string | ArrayBuffer | Uint8Array ; columns?: string[] ; sampledata?: Record<string, string>[] ; schemas: Record<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[] }) => void

Type declaration

▸ (template): void

Parameters
NameType
templateObject
template.basePdfstring | ArrayBuffer | Uint8Array
template.columns?string[]
template.sampledata?Record<string, string>[]
template.schemasRecord<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[]
Returns

void

Defined in

ui/src/Designer.tsx:11


size

Protected size: Object

Type declaration

NameType
heightnumber
widthnumber

Inherited from

BaseUIClass.size

Defined in

ui/src/class.ts:62


template

Protected template: Object

Type declaration

NameType
basePdfstring | ArrayBuffer | Uint8Array
columns?string[]
sampledata?Record<string, string>[]
schemasRecord<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[]

Inherited from

BaseUIClass.template

Defined in

ui/src/class.ts:60

Methods

destroy

destroy(): void

Returns

void

Inherited from

BaseUIClass.destroy

Defined in

ui/src/class.ts:133


getFont

Protected getFont(): Record<string, { data: ArrayBuffer | Uint8Array ; fallback?: boolean ; subset?: boolean }>

Returns

Record<string, { data: ArrayBuffer | Uint8Array ; fallback?: boolean ; subset?: boolean }>

Inherited from

BaseUIClass.getFont

Defined in

ui/src/class.ts:102


getI18n

Protected getI18n(): (key: "field" | "cancel" | "fieldName" | "require" | "uniq" | "inputExample" | "edit" | "plsSelect" | "plsInputName" | "plsAddNewField" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "type" | "goToFirst" | "goToPrevious" | "goToNext" | "goToEnd" | "select" | "zoomIn" | "zoomOut" | "errorOccurred" | "errorBulkUpdateFieldName" | "commitBulkUpdateFieldName" | "bulkUpdateFieldName") => string

Returns

fn

▸ (key): string

Parameters
NameType
key"field" | "cancel" | "fieldName" | "require" | "uniq" | "inputExample" | "edit" | "plsSelect" | "plsInputName" | "plsAddNewField" | "fieldMustUniq" | "notUniq" | "noKeyName" | "fieldsList" | "addNewField" | "editField" | "type" | "goToFirst" | "goToPrevious" | "goToNext" | "goToEnd" | "select" | "zoomIn" | "zoomOut" | "errorOccurred" | "errorBulkUpdateFieldName" | "commitBulkUpdateFieldName" | "bulkUpdateFieldName"
Returns

string

Inherited from

BaseUIClass.getI18n

Defined in

ui/src/class.ts:98


getTemplate

getTemplate(): Object

Returns

Object

NameType
basePdfstring | ArrayBuffer | Uint8Array
columns?string[]
sampledata?Record<string, string>[]
schemasRecord<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[]

Inherited from

BaseUIClass.getTemplate

Defined in

ui/src/class.ts:106


onChangeTemplate

onChangeTemplate(cb): void

Parameters

NameType
cb(template: { basePdf: string | ArrayBuffer | Uint8Array ; columns?: string[] ; sampledata?: Record<string, string>[] ; schemas: Record<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[] }) => void

Returns

void

Defined in

ui/src/Designer.tsx:42


onSaveTemplate

onSaveTemplate(cb): void

Parameters

NameType
cb(template: { basePdf: string | ArrayBuffer | Uint8Array ; columns?: string[] ; sampledata?: Record<string, string>[] ; schemas: Record<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[] }) => void

Returns

void

Defined in

ui/src/Designer.tsx:38


render

Protected render(): void

Returns

void

Overrides

BaseUIClass.render

Defined in

ui/src/Designer.tsx:46


saveTemplate

saveTemplate(): void

Returns

void

Defined in

ui/src/Designer.tsx:21


updateOptions

updateOptions(options): void

Parameters

NameType
optionsObject
options.font?Record<string, { data: ArrayBuffer | Uint8Array ; fallback?: boolean ; subset?: boolean }>
options.lang?"en" | "ja"

Returns

void

Inherited from

BaseUIClass.updateOptions

Defined in

ui/src/class.ts:120


updateTemplate

updateTemplate(template): void

Parameters

NameType
templateObject
template.basePdfstring | ArrayBuffer | Uint8Array
template.columns?string[]
template.sampledata?Record<string, string>[]
template.schemasRecord<string, { alignment?: "left" | "center" | "right" ; backgroundColor?: string ; characterSpacing?: number ; fontColor?: string ; fontName?: string ; fontSize?: number ; height: number ; lineHeight?: number ; position: { x: number ; y: number } ; rotate?: number ; type: "text" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "image" ; width: number } | { height: number ; position: { x: number ; y: number } ; rotate?: number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[]

Returns

void

Overrides

BaseUIClass.updateTemplate

Defined in

ui/src/Designer.tsx:28