/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type option } from "@elaraai/east"; import { type DatasetKeyQuery } from "@elaraai/east-ui/internal"; import { type KeySearchSource } from "@elaraai/east-ui-components"; import { type ScheduleEditing, type ScheduleHeldRows } from "../shared/schedule/editing.js"; import { type RowHidden } from "../shared/schedule/hidden.js"; import type { HiddenPicks } from "../shared/schedule/hidden-pick.js"; import type { CalendarWords } from "./messages.js"; import type { CalendarEventPart } from "./window.js"; import type { CalendarItem, CalendarKind, CalendarRange } from "./model.js"; /** An event Search Records found: the event, its kind's name, and what hides it. */ export interface FoundEvent { readonly item: CalendarItem; readonly kind: string; /** * What hides it, as far as e3 has said: its kind's source, its choices leaving it out — and, where the layout lays * resources out, its resource kind's, hiding its resource; `undefined` for one nothing hides. */ readonly hidden: readonly RowHidden[] | undefined; } /** * How a found event reads in the list: its key, its title, its kind's name and when it starts — or that it waits in the * backlog — and, one the rail's narrowing hides, what hides it, in the Calendar's words (the shared hidden pick). * * @param found - The event * @param words - The Calendar's words: the app's formatters, and its message table * @returns Its line */ export declare function foundEventLine(found: FoundEvent, words: CalendarWords): string; /** * The events of a kind read whole that a query finds, in East's order of their keys: as the server finds a key in a * record's own order (`findKeyInline`) — a key's start, a quoted key, a range. * * @param items - The kind's events, in any order * @param query - The query the box parsed * @returns The events it finds, in key order */ export declare function wholeEventMatches(items: readonly CalendarItem[], query: DatasetKeyQuery): CalendarItem[]; /** Props of {@link useCalendarFind}. */ export interface CalendarFindProps { /** The event kinds, in the Calendar's order. */ readonly kinds: readonly CalendarKind[]; /** Each kind narrowed through its source of the slice. */ readonly parts: readonly CalendarEventPart[]; /** The editing whose drafts an event is read with; `undefined` for a read-only Calendar. */ readonly editing: ScheduleEditing | undefined; /** The window the Calendar shows: what an event is read over, by key past it. */ readonly range: CalendarRange; /** The Calendar's words: the app's formatters, which word a choice as the rail does, and its message table — what the box says. */ readonly format: CalendarWords; /** Told the event a pick lands on. */ readonly onPick: (found: FoundEvent) => void; /** The rows a kind read by its cells holds (#1424): a found event of such a kind is read from them, else by its key — never over the window. */ readonly held?: ScheduleHeldRows | undefined; /** Each event kind's hidden pick and each resource kind's, by its slot: what e3 has said hides an event. */ readonly picks: HiddenPicks; /** * The resources each resource kind's source shows, by the kind's slot, where the Calendar follows the source — `none` * while it narrows none; the paged kind's absent, whose windows are its narrowing's rows themselves. */ readonly resourcesShown: ReadonlyMap>>; /** * Whether the layout lays resources out — the timeline's rows, the Resources view's columns: there an event its * resource's source hides is hidden; the time grids, the month and the agenda narrow no event by its resource. */ readonly laysResources: boolean; } /** * Search Records' source, for the shared key search's toolbar item (see the module docs). * * @param props - The kinds and their parts, the editing, the window, the words, the pick, the hidden picks, what each * resource kind's source shows and the layout * @returns The source; `undefined` with no event kind to seek */ export declare function useCalendarFind({ kinds, parts, editing, range, format, onPick, held, picks, resourcesShown, laysResources }: CalendarFindProps): KeySearchSource | undefined; //# sourceMappingURL=find.d.ts.map