UNPKG

@odoo/o-spreadsheet

Version:
23 lines (22 loc) 873 B
import { AutofillModifier } from "../types/autofill"; import { Cell } from "../types/cells"; import { DIRECTION } from "../types/misc"; import { Registry } from "./registry"; /** * An AutofillRule is used to generate what to do when we need to autofill * a cell. (In a AutofillGenerator, see plugins/autofill.ts) * * When we generate the rules to autofill, we take the first matching rule * (ordered by sequence), and we generate the AutofillModifier with generateRule */ export interface AutofillRule { condition: (cell: Cell, cells: (Cell | undefined)[]) => boolean; generateRule: (cell: Cell, cells: (Cell | undefined)[], direction: DIRECTION) => AutofillModifier; sequence: number; } export interface CalendarDateInterval { years: number; months: number; days: number; } export declare const autofillRulesRegistry: Registry<AutofillRule>;