datainout
Version:
Import and reports data
25 lines (22 loc) • 723 B
text/typescript
import { AttributeType, BaseAttribute, SheetExcelOption } from './common-type.cjs';
type BaseAttributeImporter = {
type: AttributeType;
required?: boolean;
setValue?: (attributeValue?: any, row?: Record<string, any>) => any;
validate?: (val: any) => {
isValid: boolean;
message?: string;
} | Error;
} & BaseAttribute;
/** Excel import template */
type CellImportOptions = {
address?: string;
fullAddress?: {
sheetName: string;
address: string;
row: number;
col: number;
};
} & BaseAttributeImporter;
type SheetImportOptions = SheetExcelOption<CellImportOptions>;
export type { BaseAttributeImporter, CellImportOptions, SheetImportOptions };