import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import { DatePeriod, DatePreset } from '../date-presets'; import * as i0 from "@angular/core"; interface PeriodTab { key: string; label: string; } interface PeriodItem { preset: DatePreset; /** Short text on the button ("Sep", "Q3", "Oct 5 – 11") */ text: string; /** Small secondary text ("Jul – Sep", "W41") */ sub?: string; disabled: boolean; /** The period that contains today, marked with a dot */ isCurrent: boolean; /** Filled: the selected period, or the first period of a span being picked */ isActive: boolean; /** Tinted: covered by the selection, or by the span being previewed */ inSelection: boolean; } type GridKind = 'weeks' | 'months' | 'quarters' | 'years' | null; /** * Preset ("Periods") mode layout: * * tabs Daily · Weekly · Monthly · Quarterly · Yearly * suggestions a few relative presets for the tab ("Last month") * side grid specific periods with a ‹ › stepper | projected content * (weeks / months / quarters / years) | (the calendar) * * With [multi] on, the first grid click starts a span and the second ends * it (either order, stepping across years in between). Presentational: it * reports (preview), (choose), (tabChange) and (spanStartChange). */ export declare class VerbenPeriodPanelComponent implements OnChanges { /** Suggestions; their `group` decides the tab */ presets: DatePreset[]; /** Period tabs to offer, in order */ periods: DatePeriod[]; /** Selected preset id */ activeId: string | null; today: Date; min: Date | null; max: Date | null; weekStartsOn: 0 | 1; /** Where the stepper starts (the current selection or today) */ focus: Date; /** Current selection, to tint the grid cells it covers */ selectedStart: Date | null; selectedEnd: Date | null; /** Pick several consecutive periods (two clicks) instead of one */ multi: boolean; choose: EventEmitter; preview: EventEmitter; tabChange: EventEmitter; /** First period of a span in progress (null when none) */ spanStartChange: EventEmitter; tabs: PeriodTab[]; activeTab: string; quick: PeriodItem[]; grid: PeriodItem[]; gridKind: GridKind; stepperLabel: string; /** Month (weeks), year (months, quarters) or any year of the page (years) */ private cursor; private spanStart; private hovered; ngOnChanges(changes: SimpleChanges): void; selectTab(key: string): void; trackByPreset(_: number, item: PeriodItem): string; step(delta: number): void; onCellHover(item: PeriodItem | null): void; onCellClick(item: PeriodItem): void; /** The hovered period, extended back to the span start while one is open */ private spanWith; private setSpanStart; private buildTabs; private initialTab; private tabOfId; private build; private toItem; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};