import * as _angular_core from '@angular/core'; import { InjectionToken, Signal, Provider } from '@angular/core'; import { FormValueControl } from '@angular/forms/signals'; import * as forty_cdk_core from 'forty-cdk/core'; import { FieldSegment, SegmentEditorContext, SegmentHandle, FormUiControlBase, DateAdapter, FieldGranularity, SegmentType, WritingDirection, RovingTabindex, SegmentEditorDelegate, ForDateTimeSegmentBase, ForDateTimeLiteralBase, DateRange } from 'forty-cdk/core'; import * as forty_cdk_date_field from 'forty-cdk/date-field'; /** * A rendered segment descriptor exposed by `ForDateField.segments()` for the * consumer's `@for`. Covers both editable spinbutton segments and the * decorative literal separators between them. */ type DateFieldSegment = FieldSegment; /** Handle a `[forDateFieldSegment]` registers with the root for focus moves. */ type ForDateFieldSegmentHandle = SegmentHandle; /** * The coordination surface `ForDateField` exposes to its segment / literal * children. Segments read the reactive per-part accessors for their ARIA and * display bindings, and call the behavior methods to type, step, clear, and * move focus — all canonical state lives on the root, never on the segment. * * It is the shared {@link SegmentEditorContext} backing both date and time * fields; `ForDateField` satisfies it by forwarding to its `SegmentEditor`. */ type ForDateFieldContext = SegmentEditorContext; /** * Injection token for the {@link ForDateFieldContext} provided by * `[forDateField]`. Segment and literal children inject it to coordinate with * the root. */ declare const FOR_DATE_FIELD_CONTEXT: InjectionToken; /** * Headless, segmented, spin-editable date input — the keyboard-first * counterpart to `ForCalendar`. There is no single WAI-ARIA APG pattern for a * date field; it is a composition of * [Spinbuttons](https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/) inside a * labelled `role="group"`. * Each day / month / year part is an independent `role="spinbutton"` segment * (`[forDateFieldSegment]`) so entry is unambiguous and locale-correct — no * free-text parsing, no `03/04`-is-it-March-4th guesswork. * * The root owns the entered parts, composes them into the adapter's date type, resolves the * locale-ordered segment list, and exposes everything to the segment and literal children through * {@link FOR_DATE_FIELD_CONTEXT}. The spin-button engine — digit typing, stepping, Home/End, RTL * focus moves, the segment registry — lives in the shared {@link DateFieldEngine}. All date math * goes through the pluggable {@link DateAdapter}, so the field depends on no date library. * * Setting `granularity` finer than `'day'` appends time segments (and, in 12-hour mode, an AM·PM * `dayPeriod`) to the same `role="group"`, sharing its single roving tab stop. That requires a * time-capable adapter; the default `'day'` works with any. * * Implements `FormValueControl`, so it auto-wires with `[formField]` and auto-associates * inside a `[forField]`. The value stays `null` until every visible segment is filled. * * Read-only and required states reflect as the boolean `data-readonly` / `data-required` hooks on * the root: `role="group"` supports neither ARIA property. The read-only announcement lives on each * `[forDateFieldSegment]` instead, whose `role="spinbutton"` does support it; the required state is * Not repeated per segment. * * The bounds are named `minDate` / `maxDate` because `min` / `max` are reserved `FormUiControl` * members typed for numeric validators. * * @typeParam D The adapter's immutable date (or, with `granularity > 'day'`, date-time) type. * * @example * ```html *
* @for (seg of field.segments(); track seg.id) { * @if (seg.isLiteral) { * {{ seg.text }} * } @else { * {{ seg.text }} * } * } *
* ``` */ declare class ForDateField extends FormUiControlBase implements FormValueControl, ForDateFieldContext { #private; /** The active date adapter, resolved from `FOR_DATE_ADAPTER` (shared with `ForCalendar`). */ readonly adapter: DateAdapter; /** * Two-way bindable entered date, or `null` while any segment is empty. * Required by `FormValueControl`. Emitted only on a settled commit * (segment completion / blur) — a mid-typing keystroke is never observable * through the value. The `model()` change emitter (`(valueChange)`) fires only * when the field itself composes a new value, never on consumer writes via * `[(value)]`. */ readonly value: _angular_core.ModelSignal; /** * Minimum selectable date (inclusive). A composed value below it is clamped * up. The comparison is by the **full instant** (`DateAdapter.compare`), so at * `granularity > 'day'` a non-midnight `minDate` clamps the time too, and the * result is identical across time-capable adapters. Named `minDate` (not * `min`) because `FormUiControl.min` is reserved for a numeric validator bound * by `[formField]`. */ readonly minDate: _angular_core.InputSignal; /** * Maximum selectable date (inclusive). A composed value above it is clamped * down. Compared by the **full instant** like {@link minDate}. Named `maxDate` * (not `max`) for the same reason as {@link minDate}. */ readonly maxDate: _angular_core.InputSignal; /** * Date-time precision. `'day'` (default, **non-breaking**) is a pure date * field. `'hour'` / `'minute'` / `'second'` append the matching time segments * and the value carries a time component — which requires a time-capable * adapter (`provideNativeDateAdapter()` / * `provideInternationalizedDateTimeAdapter()`). */ readonly granularity: _angular_core.InputSignal; /** * 12- or 24-hour cycle for the time segments. When `null` (default) it is * derived from the locale. A 12-hour cycle adds the AM/PM `dayPeriod` segment. * Only meaningful when `granularity > 'day'`. */ readonly hourCycle: _angular_core.InputSignal<12 | 24 | null>; /** BCP 47 locale driving segment order and separators. Defaults to the runtime locale. */ readonly locale: _angular_core.InputSignal; /** * Per-segment placeholder shown while empty. Unspecified parts fall back to a * letter-repeat default (`dd` / `mm` / `yyyy` / `hh` / `mm` / `ss` / `--`). */ readonly placeholder: _angular_core.InputSignal>>; /** Accessible name for the field group. Emits no `aria-label` while `null`. */ readonly ariaLabel: _angular_core.InputSignal; protected readonly resolvedAriaLabel: Signal; /** * Writing direction. When unset (default `null`), the inherited ambient * direction is resolved from the nearest ancestor carrying a `dir` attribute * (or ``), defaulting to `'ltr'`. An explicit `[dir]` always wins. * The resolved value is reflected to the host `dir` attribute and mirrors the * ArrowLeft / ArrowRight segment navigation in RTL. */ readonly _dirInput: _angular_core.InputSignal; readonly dir: Signal; /** Shared roving-tabindex tracker: exactly one segment owns `tabindex=0`. */ readonly roving: RovingTabindex; /** * The field engine backing the per-segment accessors and behavior methods the * segment / literal children read through {@link FOR_DATE_FIELD_CONTEXT}. */ readonly delegate: SegmentEditorDelegate; /** * The ordered, locale-derived segments (editable + literals) to render. Each * entry carries the text to display: the formatted value when filled, the * placeholder while empty, or the literal separator. */ readonly segments: Signal; protected readonly empty: Signal; constructor(); /** * Move focus to the first editable segment, implementing * `FormValueControl.focus` from `@angular/forms/signals`. Without this override * Signal Forms would focus the host `role="group"` wrapper — which is not * focusable — so focus-on-error would silently go nowhere. No-op when disabled. */ focus(options?: FocusOptions): void; protected onFocusOut(event: FocusEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; static ɵdir: _angular_core.ɵɵDirectiveDeclaration, "[forDateField]", ["forDateField"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "granularity": { "alias": "granularity"; "required": false; "isSignal": true; }; "hourCycle": { "alias": "hourCycle"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "_dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>; } /** * One editable spinbutton segment of a `[forDateField]` — the day, month, or * year part (and, at `granularity > 'day'`, hour / minute / second / the AM·PM * `dayPeriod`). Apply on a focusable element (typically a ``); the * directive adds `role="spinbutton"`, the `aria-valuemin` / `aria-valuemax` / * `aria-valuenow` / `aria-valuetext` reflection, the roving tabindex, and the * full keyboard map: * * - **digits** fill a numeric segment and auto-advance to the next when full; * - **a / p** set the period on the AM/PM (`dayPeriod`) segment; * - **ArrowUp / ArrowDown** step the value (day / month / hour / minute / second * wrap, year clamps, dayPeriod toggles); * - **ArrowLeft / ArrowRight** move between segments (mirrored under RTL, no wrap); * - **Home / End** jump to the segment minimum / maximum (dayPeriod → AM / PM); * - **Backspace** deletes the last entered digit of a numeric segment (clearing * it once the last digit is removed); **Delete** clears the whole segment. * * All state lives on the root `ForDateField`; the segment only reads it and * forwards intents. The rendered text comes from the root's `segments()` list * (`{{ seg.text }}`), so this element carries behavior and ARIA, not content. */ declare class ForDateFieldSegment extends ForDateTimeSegmentBase { #private; protected readonly ctx: forty_cdk_core.SegmentEditorContext; /** Which date or time part this segment edits. */ readonly segment: _angular_core.InputSignal; /** * Accessible name for this segment. Falls back to the scope's localized * default label for the part (via `provideForDateFieldDefaults`), which in * turn defaults to the part name — and `'AM/PM'` for the `dayPeriod` segment. */ readonly ariaLabel: _angular_core.InputSignal; protected readonly resolvedAriaLabel: _angular_core.Signal; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * A decorative separator (`/`, `.`, `-`) between the editable segments of a * `[forDateField]`. Apply on the element rendering the literal text; it is * marked `aria-hidden` and stays out of the tab order, so assistive tech reads * only the spinbutton segments. The separator characters come from the root's * locale-ordered `segments()` list (`{{ seg.text }}`). */ declare class ForDateFieldLiteral extends ForDateTimeLiteralBase { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Accessible name announced for each editable segment, keyed by its part type. * Override individually (or wholesale) for localization; any key left unset * falls back to the library default for that part — so overriding just * `dayPeriod` keeps the English labels for the rest. */ type ForDateFieldSegmentLabels = Partial>; /** * Defaults inherited by descendant `[forDateField]` controls in the * surrounding injector scope. Configure with `provideForDateFieldDefaults` at * the application root or in any component's `providers`; partial overrides * merge with the parent scope. */ interface ForDateFieldDefaults { /** * Accessible value announced (via `aria-valuetext`) for an empty editable * segment, so screen readers report the segment's empty state instead of * silence. Override for localization. */ emptySegmentText: string; /** * Accessible names announced for each editable segment (via `aria-label`), * keyed by part type, used when a segment has no explicit `ariaLabel`. The * AM/PM `dayPeriod` defaults to `'AM/PM'` instead of leaking the raw token. * Override for localization; unset keys keep the library default. */ segmentLabels: ForDateFieldSegmentLabels; } /** * Library default accessible name for each editable segment. Used when neither * the segment's explicit `ariaLabel` nor a `provideForDateFieldDefaults` * override supplies one for that part. */ declare const DEFAULT_DATE_FIELD_SEGMENT_LABELS: Readonly>; /** Token holding the resolved date-field defaults for the current scope. */ declare const FOR_DATE_FIELD_DEFAULTS: _angular_core.InjectionToken; /** * Configures forty-cdk date-field defaults for this injector scope. Partial * overrides inherit unspecified keys from the parent scope (or library * defaults at the root). */ declare function provideForDateFieldDefaults(defaults?: Partial): Provider[]; /** * Exact public names of every `ForDateField` input, its models included. Spread it into the * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the * primitive's full surface — the Signal Forms members `[formField]` binds among them — * without hand-maintaining the list. Always spread into an inline object literal as shown * below: the literal is what keeps the entry statically analyzable for consumers compiling * against the published package. An anti-drift spec fails when this list no longer matches * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported * wrapping patterns. * * @example * ```ts * @Component({ * selector: 'div[myDateField]', * template: '', * hostDirectives: [ * { * directive: ForDateField, * inputs: [...FOR_DATE_FIELD_HOST_DIRECTIVE_INPUTS], * outputs: [...FOR_DATE_FIELD_HOST_DIRECTIVE_OUTPUTS], * }, * ], * }) * export class MyDateField {} * ``` */ declare const FOR_DATE_FIELD_HOST_DIRECTIVE_INPUTS: readonly ["value", "ariaLabel", "dir", "dirty", "disabled", "errors", "granularity", "hourCycle", "invalid", "locale", "maxDate", "minDate", "name", "pending", "placeholder", "readonly", "required", "touched"]; /** * Exact public names of every `ForDateField` output, the Signal Forms `touch` output * included. Spread it into the `outputs` array of the same `hostDirectives` entry as * {@link FOR_DATE_FIELD_HOST_DIRECTIVE_INPUTS}. */ declare const FOR_DATE_FIELD_HOST_DIRECTIVE_OUTPUTS: readonly ["valueChange", "touchedChange", "touch"]; /** Which endpoint group of a range field a piece coordinates with. */ type DateRangeFieldEndpoint = 'start' | 'end'; /** * A rendered segment descriptor exposed by an endpoint's `segments()` for the * consumer's `@for`. Covers both editable spinbutton segments and the * decorative literal separators between them. */ type DateRangeFieldSegment = FieldSegment; /** * Coordination surface `[forDateRangeField]` (the root) exposes to its two * endpoint groups (`[forDateRangeFieldStart]` / `[forDateRangeFieldEnd]`). The * root owns the start / end segment engines and the composed * `DateRange` value; each endpoint reads its rendered segments, its * accessible group label, and the {@link SegmentEditorContext} it provides to * its own segment / literal children. */ interface ForDateRangeFieldContext { /** The field's effective disabled (own input OR a surrounding disabled `[forFieldset]`). */ readonly effectiveDisabled: Signal; /** Whether the field is read-only. */ readonly readonly: Signal; /** Resolved writing direction, reflected on each endpoint group. */ readonly dir: Signal; /** The rendered segment list for `which` endpoint. */ endpointSegments(which: DateRangeFieldEndpoint): Signal; /** The segment-coordination surface `which` endpoint provides to its segments. */ endpointContext(which: DateRangeFieldEndpoint): SegmentEditorContext; /** The accessible `aria-label` for `which` endpoint group. */ endpointLabel(which: DateRangeFieldEndpoint): Signal; } /** * Injection token for the {@link ForDateRangeFieldContext} provided by * `[forDateRangeField]`. Endpoint children inject it to coordinate with the * root. */ declare const FOR_DATE_RANGE_FIELD_CONTEXT: InjectionToken; /** * Headless, segmented, spin-editable date **range** input — the keyboard-first, * form-capable counterpart to `ForDateRangePicker`. There is no single WAI-ARIA * APG pattern for a range field; it is a composition of two labelled * `role="group"` endpoints, each holding a row of * [Spinbuttons](https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/) (the same * machinery as `ForDateField`), nested inside one outer `role="group"`. * * The root owns one segment engine per endpoint and assembles the committed `DateRange`, exposing * the rendered segments and the shared configuration to its `[forDateRangeFieldStart]` / * `[forDateRangeFieldEnd]` children through {@link FOR_DATE_RANGE_FIELD_CONTEXT}. All date math * goes through the pluggable {@link DateAdapter}, so the field depends on no date library. * * Implements `FormValueControl | null>`, so the committed range auto-wires with * `[formField]`. `value` stays `null` until both endpoints are fully entered, so a half-entered * range never reaches the form and the `end >= start` invariant always holds. A complete but * out-of-order entry keeps its typed segments, leaves `value` `null` and reflects * `aria-invalid="true"` + `data-range-error`; restoring the order emits the range. * * Setting `granularity` finer than `'day'` appends time segments to each endpoint, making it a * date-time range field. That requires a time-capable adapter; the default `'day'` works with any. * * Read-only and required states reflect as the boolean `data-readonly` / `data-required` hooks on * the root: `role="group"` supports neither ARIA property. The read-only announcement lives on each * `[forDateRangeFieldSegment]` instead, whose `role="spinbutton"` does support it; the required * state is not repeated per segment. * * The bounds are named `minDate` / `maxDate` because `min` / `max` are reserved `FormUiControl` * members whose types cannot express a date bound. * * @typeParam D The adapter's immutable date (or, with `granularity > 'day'`, date-time) type. * * @example * ```html *
*
* @for (seg of start.segments(); track seg.id) { * @if (seg.isLiteral) { * {{ seg.text }} * } @else { * {{ seg.text }} * } * } *
* *
*
* ``` */ declare class ForDateRangeField extends FormUiControlBase implements FormValueControl | null>, ForDateRangeFieldContext { #private; /** The active date adapter, resolved from `FOR_DATE_ADAPTER` (shared with `ForCalendar`). */ readonly adapter: DateAdapter; /** * Two-way bindable committed date range, or `null` while either endpoint is * incomplete or the two are out of order. Required by * `FormValueControl | null>` — this **is** the form * value, so it auto-wires with `[formField]`. Emitted only on a settled commit * (segment completion / blur) of an endpoint — a mid-typing keystroke is never * observable through the value. The `model()` change emitter (`(valueChange)`) * fires only when the field itself composes or clears a range, never on * consumer writes via `[(value)]`. */ readonly value: _angular_core.ModelSignal | null>; /** * Minimum selectable date (inclusive) for both endpoints. A composed endpoint * below it is clamped up, compared by the **full instant** * (`DateAdapter.compare`). Named `minDate` (not `min`) because * `FormUiControl.min` is reserved for a numeric validator. */ readonly minDate: _angular_core.InputSignal; /** * Maximum selectable date (inclusive) for both endpoints. A composed endpoint * above it is clamped down, compared by the **full instant**. Named `maxDate` * (not `max`) for the same reason as {@link minDate}. */ readonly maxDate: _angular_core.InputSignal; /** * Date-time precision shared by both endpoints. `'day'` (default) is a pure * date range. `'hour'` / `'minute'` / `'second'` append the matching time * segments to each endpoint and require a time-capable adapter. */ readonly granularity: _angular_core.InputSignal; /** * 12- or 24-hour cycle for the time segments. When `null` (default) it is * derived from the locale. Only meaningful when `granularity > 'day'`. */ readonly hourCycle: _angular_core.InputSignal<12 | 24 | null>; /** BCP 47 locale driving segment order and separators. Defaults to the runtime locale. */ readonly locale: _angular_core.InputSignal; /** * Per-segment placeholder shown while empty, applied to both endpoints. * Unspecified parts fall back to a letter-repeat default (`dd` / `mm` / * `yyyy` / `hh` / `mm` / `ss` / `--`). */ readonly placeholder: _angular_core.InputSignal>>; /** Accessible name for the whole range field group. Emits no `aria-label` while `null`. */ readonly ariaLabel: _angular_core.InputSignal; protected readonly resolvedAriaLabel: Signal; /** * Writing direction. When unset (default `null`), the inherited ambient * direction is resolved from the nearest ancestor carrying a `dir` attribute * (or ``), defaulting to `'ltr'`. An explicit `[dir]` always wins. * The resolved value is reflected to the host `dir` attribute (and each * endpoint group) and mirrors the ArrowLeft / ArrowRight segment navigation * in RTL. */ readonly _dirInput: _angular_core.InputSignal; readonly dir: Signal; /** `aria-invalid` reflects the form-driven invalidity OR a self-detected disorder. */ protected readonly ariaInvalid: Signal; /** Both endpoints complete but the start falls after the end — an unorderable range. */ protected readonly disordered: Signal; /** `true` only while both endpoints are entirely empty — neither shows entered digits. */ protected readonly empty: Signal; /** * Folds a self-detected out-of-order range into the base invalidity so * `data-invalid` and a surrounding `[forField]` (error region + folded * `aria-describedby`) stay in step with the host `aria-invalid`, which already * reflects the disorder. */ protected effectiveInvalid(): boolean; constructor(); /** * Move focus to the first editable segment of the first incomplete endpoint, * implementing `FormValueControl.focus` from `@angular/forms/signals`: the start * endpoint unless it is complete and the end is not, in which case focus lands * on the end; when both endpoints are complete it falls back to the start. * Without this override Signal Forms would focus the host `role="group"` * wrapper — which is not focusable — so focus-on-error would silently go * nowhere. No-op when disabled. */ focus(options?: FocusOptions): void; endpointSegments(which: DateRangeFieldEndpoint): Signal; endpointContext(which: DateRangeFieldEndpoint): SegmentEditorContext; endpointLabel(which: DateRangeFieldEndpoint): Signal; protected onFocusOut(event: FocusEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; static ɵdir: _angular_core.ɵɵDirectiveDeclaration, "[forDateRangeField]", ["forDateRangeField"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "granularity": { "alias": "granularity"; "required": false; "isSignal": true; }; "hourCycle": { "alias": "hourCycle"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "_dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>; } /** * Shared base for the two endpoint groups of a `[forDateRangeField]`. Each * endpoint is a labelled `role="group"` owning one tab stop (its own roving * tabindex) and one segment engine on the root. The base reads the root * coordination surface and exposes the endpoint's rendered `segments` (for the * consumer's `@for`), accessible label, and disabled / read-only / direction * for its host bindings. The concrete `[forDateRangeFieldStart]` / * `[forDateRangeFieldEnd]` subclasses bind the matching start / end engine and * provide the per-endpoint `SegmentEditorContext` their segments inject. * * A read-only field is reflected on the endpoint group as the boolean * `data-readonly` styling hook only. `aria-readonly` is not a supported * property of `role="group"`, so the ARIA announcement lives on each * `[forDateRangeFieldSegment]` — `role="spinbutton"` does support it. */ declare abstract class ForDateRangeFieldEndpointBase { /** Which endpoint this group edits. */ protected abstract readonly which: DateRangeFieldEndpoint; protected readonly root: forty_cdk_date_field.ForDateRangeFieldContext; /** * Accessible name for this endpoint group. Falls back to the scope default * (`'Start date'` / `'End date'` via `provideForDateRangeFieldDefaults`). * Emits no `aria-label` while both are `null`. */ readonly ariaLabel: _angular_core.InputSignal; /** The field's effective disabled, reflected on the group. */ readonly effectiveDisabled: Signal; /** Whether the field is read-only, reflected on the group. */ readonly readonly: Signal; /** Resolved writing direction, reflected on the group. */ readonly dir: Signal; /** * The ordered, locale-derived segments (editable + literals) of this * endpoint to render. Each entry carries the text to display: the formatted * value when filled, the placeholder while empty, or the literal separator. */ readonly segments: Signal; /** Resolved accessible name for this endpoint group (explicit input or scope default). */ protected readonly label: Signal; /** * Emitted `aria-label`: a consumer-set static value on the endpoint group * when present, else {@link label}. */ protected readonly resolvedAriaLabel: Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The start endpoint group of a `[forDateRangeField]`. Render its * `segments()` with `[forDateRangeFieldSegment]` / `[forDateRangeFieldLiteral]` * children; entry composes the range's inclusive start. * * @example * ```html *
* @for (seg of start.segments(); track seg.id) { * @if (seg.isLiteral) { * {{ seg.text }} * } @else { * {{ seg.text }} * } * } *
* ``` */ declare class ForDateRangeFieldStart extends ForDateRangeFieldEndpointBase { protected readonly which: "start"; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The end endpoint group of a `[forDateRangeField]`. Render its `segments()` * with `[forDateRangeFieldSegment]` / `[forDateRangeFieldLiteral]` children; * entry composes the range's inclusive end. */ declare class ForDateRangeFieldEnd extends ForDateRangeFieldEndpointBase { protected readonly which: "end"; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * One editable spinbutton segment of a `[forDateRangeFieldStart]` / * `[forDateRangeFieldEnd]` endpoint — the day, month, or year part (and, at * `granularity > 'day'`, hour / minute / second / the AM·PM `dayPeriod`). Apply * on a focusable element (typically a ``); the directive adds * `role="spinbutton"`, the `aria-valuemin` / * `aria-valuemax` / `aria-valuenow` / `aria-valuetext` reflection, the roving * tabindex (scoped to the surrounding endpoint group), and the full keyboard map * (digits, a/p for AM·PM, ArrowUp/Down to step, ArrowLeft/Right to move between * segments — mirrored under RTL, Home/End for the bounds, Backspace to delete the * last entered digit, Delete to clear the whole segment). * * All state lives on the root `ForDateRangeField`; the segment only reads its * endpoint's coordination surface and forwards intents. The rendered text comes * from the endpoint's `segments()` list (`{{ seg.text }}`), so this element * carries behavior and ARIA, not content. */ declare class ForDateRangeFieldSegment extends ForDateTimeSegmentBase { #private; protected readonly ctx: forty_cdk_core.SegmentEditorContext; /** Which date or time part this segment edits. */ readonly segment: _angular_core.InputSignal; /** * Accessible name for this segment. Falls back to the scope's localized * default label for the part (via `provideForDateRangeFieldDefaults`), which * in turn defaults to the part name — and `'AM/PM'` for the `dayPeriod` * segment. */ readonly ariaLabel: _angular_core.InputSignal; protected readonly resolvedAriaLabel: _angular_core.Signal; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * A decorative separator (`/`, `.`, `-`, `:`) between the editable segments of a * `[forDateRangeFieldStart]` / `[forDateRangeFieldEnd]` endpoint. Apply on the * element rendering the literal text; it is marked `aria-hidden` and stays out * of the tab order, so assistive tech reads only the spinbutton segments. The * separator characters come from the endpoint's locale-ordered `segments()` list * (`{{ seg.text }}`). */ declare class ForDateRangeFieldLiteral extends ForDateTimeLiteralBase { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Accessible name announced for each editable segment, keyed by its part type. * Override individually (or wholesale) for localization; any key left unset * falls back to the library default for that part — so overriding just * `dayPeriod` keeps the English labels for the rest. */ type ForDateRangeFieldSegmentLabels = Partial>; /** * Defaults inherited by descendant `[forDateRangeField]` controls in the * surrounding injector scope. Configure with `provideForDateRangeFieldDefaults` * at the application root or in any component's `providers`; partial overrides * merge with the parent scope. */ interface ForDateRangeFieldDefaults { /** * Accessible value announced (via `aria-valuetext`) for an empty editable * segment, so screen readers report the segment's empty state instead of * silence. Override for localization. */ emptySegmentText: string; /** * Accessible names announced for each editable segment (via `aria-label`), * keyed by part type, used when a segment has no explicit `ariaLabel`. The * AM/PM `dayPeriod` defaults to `'AM/PM'` instead of leaking the raw token. * Override for localization; unset keys keep the library default. */ segmentLabels: ForDateRangeFieldSegmentLabels; /** * Accessible name announced (via `aria-label`) for the start endpoint group, * used when `[forDateRangeFieldStart]` has no explicit `ariaLabel`. */ startLabel: string; /** * Accessible name announced (via `aria-label`) for the end endpoint group, * used when `[forDateRangeFieldEnd]` has no explicit `ariaLabel`. */ endLabel: string; } /** * Library default accessible name for each editable segment. Used when neither * the segment's explicit `ariaLabel` nor a `provideForDateRangeFieldDefaults` * override supplies one for that part. */ declare const DEFAULT_DATE_RANGE_FIELD_SEGMENT_LABELS: Readonly>; /** Token holding the resolved date-range-field defaults for the current scope. */ declare const FOR_DATE_RANGE_FIELD_DEFAULTS: _angular_core.InjectionToken; /** * Configures forty-cdk date-range-field defaults for this injector scope. * Partial overrides inherit unspecified keys from the parent scope (or library * defaults at the root). */ declare function provideForDateRangeFieldDefaults(defaults?: Partial): Provider[]; /** * Exact public names of every `ForDateRangeField` input, its model included. Spread it into * the `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the * primitive's full surface — the Signal Forms members `[formField]` binds among them — * without hand-maintaining the list. Always spread into an inline object literal as shown * below: the literal is what keeps the entry statically analyzable for consumers compiling * against the published package. An anti-drift spec fails when this list no longer matches * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported * wrapping patterns. * * @example * ```ts * @Component({ * selector: 'div[myDateRangeField]', * template: '', * hostDirectives: [ * { * directive: ForDateRangeField, * inputs: [...FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_INPUTS], * outputs: [...FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_OUTPUTS], * }, * ], * }) * export class MyDateRangeField {} * ``` */ declare const FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_INPUTS: readonly ["value", "ariaLabel", "dir", "dirty", "disabled", "errors", "granularity", "hourCycle", "invalid", "locale", "maxDate", "minDate", "name", "pending", "placeholder", "readonly", "required", "touched"]; /** * Exact public names of every `ForDateRangeField` output, the Signal Forms `touch` output * included. Spread it into the `outputs` array of the same `hostDirectives` entry as * {@link FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_INPUTS}. */ declare const FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_OUTPUTS: readonly ["valueChange", "touchedChange", "touch"]; export { DEFAULT_DATE_FIELD_SEGMENT_LABELS, DEFAULT_DATE_RANGE_FIELD_SEGMENT_LABELS, FOR_DATE_FIELD_CONTEXT, FOR_DATE_FIELD_DEFAULTS, FOR_DATE_FIELD_HOST_DIRECTIVE_INPUTS, FOR_DATE_FIELD_HOST_DIRECTIVE_OUTPUTS, FOR_DATE_RANGE_FIELD_CONTEXT, FOR_DATE_RANGE_FIELD_DEFAULTS, FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_INPUTS, FOR_DATE_RANGE_FIELD_HOST_DIRECTIVE_OUTPUTS, ForDateField, ForDateFieldLiteral, ForDateFieldSegment, ForDateRangeField, ForDateRangeFieldEnd, ForDateRangeFieldLiteral, ForDateRangeFieldSegment, ForDateRangeFieldStart, provideForDateFieldDefaults, provideForDateRangeFieldDefaults }; export type { DateFieldSegment, DateRangeFieldEndpoint, DateRangeFieldSegment, ForDateFieldContext, ForDateFieldDefaults, ForDateFieldSegmentHandle, ForDateFieldSegmentLabels, ForDateRangeFieldContext, ForDateRangeFieldDefaults, ForDateRangeFieldSegmentLabels };