/** * 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 Assignment, type Coverage, type Person, type Place, type RosterStyles, type RosterValue, type Slot, type Week } from "./model.js"; import type { RolesChange, RosterCommands, RosterSource } from "./actions.js"; /** * Shared typed destination form for desktop inspector and narrow actions: the day, the group — or No group, where the * duty kind's group takes none (#1548) — and the shift. */ export declare function PlaceFields({ value, start, place, onChange }: { value: RosterValue; start: Date; place: Place; onChange: (next: Place) => void; }): import("react/jsx-runtime").JSX.Element; /** * A duty's group in the inspector, where the duty kind's group takes none (#1548): the groups and No group, a choice * moving the duty there on its day and shift. `baseline` is the group as stored, marking a draft's change. */ export declare function GroupField({ value, group, baseline, onChange, readOnly }: { value: RosterValue; group: option; baseline?: option | undefined; onChange: (next: option) => void; readOnly?: boolean; }): import("react/jsx-runtime").JSX.Element; /** What a place action places, and where; `onClose` is told as its popover closes, for a host that mounts it in place (#1406, D9: `Elsewhere…`). */ interface PlaceActionProps { label: string; source?: RosterSource; place: Place; value: RosterValue; start: Date; commands: RosterCommands; styles: RosterStyles; onClose?: (() => void) | undefined; } /** * One anchored place action; absent source offers a staff picker. Until it is first pressed it is its trigger alone * (#1398, CL9): every day off in the People grid holds one, and a popover mounted for each made each row coming into * view slow to draw. Pressed, its popover mounts and opens. While a run of the optimiser holds the week (#1409, R2) the * trigger stays in place, inert and saying why; a popover the run finds open closes, and stays closed as the run ends. */ export declare function PlaceAction(props: PlaceActionProps): import("react/jsx-runtime").JSX.Element | null; /** * A place action's popover, mounted by its first press: it opens as it mounts, as a press of its own trigger opens it. * The off day's `Elsewhere…` mounts it in place (#1406, D9), and is told as it closes. */ export declare function PlacePopover({ label, source, place: initial, value, start, commands, styles, onClose }: PlaceActionProps): import("react/jsx-runtime").JSX.Element | null; /** * A phone's `Apply pattern…` (#1406, P22): a Chooser over the app's week patterns — each its name and `5 shifts · 40 h`, * one that cannot be applied refused with its reason — whose choice applies the pattern to the person's week as one * step, as a drop does on a wide main. */ export declare function ApplyPatternAction({ person, start, value, commands, onError }: { person: Person; start: Date; value: RosterValue; commands: RosterCommands; onError: (error: string | undefined) => void; }): import("react/jsx-runtime").JSX.Element | null; /** What a duty's form starts from: its position, its activity and its times, as the draft holds them. */ export interface DutyFormValue { position: option; activity: option; start: Date; end: Date; } /** A duty's form, from the duty as the week holds it. */ export declare function dutyForm(a: Assignment): DutyFormValue; /** * The Roster's own form over a duty's roles: the position held — where the * kind maps one — and, for a named person, the activity; each choice one edit, * and one the duty refuses (`onChange` saying why) put back, the reason under * its field. */ export declare function AssignmentFields({ assignment, form, baseline, value, onChange, readOnly }: { assignment: Assignment; form: DutyFormValue; baseline?: DutyFormValue | undefined; value: RosterValue; onChange: (change: RolesChange) => string | void; readOnly?: boolean; }): import("react/jsx-runtime").JSX.Element | null; /** * A duty's own times: each one an edit, held to its day — its start from twelve hours before its shift's to less than * twelve after — its end after its start; a time the duty refuses (`onChange` saying why) put back, the reason under * its field. */ export declare function TimesFields({ form, baseline, onChange, readOnly }: { form: DutyFormValue; baseline?: DutyFormValue | undefined; onChange: (change: RolesChange) => string | void; readOnly?: boolean; }): import("react/jsx-runtime").JSX.Element; /** Every mobile duty exposes its operations without opening the inspector. */ export declare function AssignmentActions({ id, assignment, value, start, commands, styles, removed }: { id: string; assignment: Assignment; value: RosterValue; start: Date; commands: RosterCommands; styles: RosterStyles; removed?: boolean; }): import("react/jsx-runtime").JSX.Element | null; /** * Targets use FieldForm for the headcount, every line its hours hold, and adding a line: a target the week refuses put * back, the reason under its field. Its lines are its slot's coverage's, in their order (#1678) — another group's skill * and a key that is no activity among them — so each line the coverage draws is edited and removed here. */ export declare function RequirementFields({ slot, week, held, value, coverage, commands, styles }: { slot: Slot; week: Week; held: Week; value: RosterValue; /** The slot's coverage over the week as drafted: the lines the form lists. */ coverage: Coverage; commands: RosterCommands; styles: RosterStyles; }): import("react/jsx-runtime").JSX.Element; /** Target editing stays reachable from a narrow card when the inspector is collapsed. */ export declare function RequirementAction(props: Parameters[0]): import("react/jsx-runtime").JSX.Element | null; export {}; //# sourceMappingURL=controls.d.ts.map