Layout
ILayout
export interface ILayout extends IStyle {
width: number;
headerSection: ISection;
contentSection: ISection;
footerSection: ISection;
}
ISection
export interface ISection extends IStyle {
height: number;
binding: string;
items?: IReportItem[];
sections?: ISection[];
}
IBaseReportItem
export interface IBaseReportItem extends IStyle {
x: number;
y: number;
width: number;
height: number;
name: string;
}
ITextReportItem
export interface ITextReportItem extends IBaseReportItem {
type: "text";
text: string;
binding?: string;
}
IImageReportItem
export interface IImageReportItem extends IBaseReportItem {
type: "image";
source: string;
binding?: string;
}
IBarcodeReportItem
export interface IBarcodeReportItem extends IBaseReportItem {
type: "barcode";
value: string;
binding?: string;
format?: string;
barWidth: 1 | 2 | 3 | 4;
}
IReportItem
export type IReportItem = ITextReportItem | IImageReportItem | IBarcodeReportItem;
IStyle
export interface IStyle {
color?: string;
backgroundColor?: string;
textAlign?: TextAlign;
borderWidth?: number;
borderStyle?: string;
borderColor?: string;
fontFamily?: string;
fontSize?: string;
fontWeight?: string;
}