import * as i0 from '@angular/core'; import { ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; /** * Generic FormControl implementation. Extended by custom controls. */ declare class ControlBaseDirective implements ControlValueAccessor { protected changeDetector: ChangeDetectorRef; /** Name of the corresponding `FormControl` if used in a reactive form context. */ formControlName: string; /** Determinates whether the control is en-/disabled. */ get disabled(): boolean; /** Set whether the control is en-/disabled. */ set disabled(value: boolean); /** @internal */ _disabled: boolean; /** Determines whether the control is readonly. */ get readonly(): boolean; /** Set whether the control is readonly. */ set readonly(value: boolean); /** @internal */ _readonly: boolean; /** @internal */ id: string; /** The control's current value. */ get value(): any; /** Set the control's current value. */ set value(value: any); /** @internal */ _value: any; /** @internal */ constructor(changeDetector: ChangeDetectorRef); /** @internal */ writeValue(value: any): void; /** @internal */ protected setValue(value: any, emitEvent: boolean): void; /** @internal */ registerOnChange(fn: any): void; /** @internal */ registerOnTouched(fn: () => void): void; /** @internal */ onTouched: () => void; /** @internal */ setDisabledState(isDisabled: boolean): void; /** @internal */ onChange: (_: any) => void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_disabled: unknown; } /** * Values accepted by the `FieldUnderline`'s `status` property. * * ### Import * * ```typescript * import { FieldUnderlineStatus } from '@talenra/ngx-base/form-field'; * ``` * * @see {@link FieldUnderline} * @see {@link TFieldUnderlineStatus} * @internal */ declare const FieldUnderlineStatus: { readonly Default: "default"; readonly Invalid: "invalid"; }; /** * Type of values accepted by the `FieldUnderline`'s `status` property. * * ### Import * * ```typescript * import { TFieldUnderlineStatus } from '@talenra/ngx-base/form-field'; * ``` * * @see {@link FieldUnderline} * @see {@link FieldUnderlineStatus} * @internal */ type TFieldUnderlineStatus = (typeof FieldUnderlineStatus)[keyof typeof FieldUnderlineStatus]; /** * The underline used in FormField and SearchField. * * @internal */ declare class FieldUnderlineComponent { /** Determines whether the associated field is focussed. */ hasFocus: i0.InputSignalWithTransform; /** Status of the associated field. */ status: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Locale values supported by the library. * * ```html * * ``` * * ```typescript * import { Locale, TLocale } from '@talenra/ngx-base/shared'; * const locale: TLocale = Locale['fr-CH']; * ``` * * ### Import * * ```typescript * import { Locale } from '@talenra/ngx-base/shared'; * ``` */ declare const Locale: { readonly 'en-US': "en-US"; readonly 'de-CH': "de-CH"; readonly 'fr-CH': "fr-CH"; readonly 'it-CH': "it-CH"; }; /** * Type of locale values supported by the library. * * ### Import * * ```typescript * import { TLocale } from '@talenra/ngx-base/shared'; * ``` */ type TLocale = (typeof Locale)[keyof typeof Locale]; /** * Type used for translation maps. Represents a dictionary of translations for different locales. The keys of the * dictionary are the locales, and the values are objects containing key-value pairs for translations. * * ```typescript * export const translations: Dictionary = { * 'de-CH': { * itemsPerPage: 'Einträge pro Seite', * of: 'von', * }, * 'fr-CH': { * itemsPerPage: 'Entrées par page', * of: 'de', * }, * 'it-CH': { * itemsPerPage: 'Voci per pagina', * of: 'di', * }, * 'en-US': { * itemsPerPage: 'Items per page', * of: 'of', * }, * ``` * * ### Import * * ```typescript * import { Dictionary } from '@talenra/ngx-base/shared'; * ``` */ type Dictionary = Record; /** * Abstract component for building on-off-controls (e.g. checkbox). */ declare class OnOffControlBaseComponent extends ControlBaseDirective implements ControlValueAccessor { /** Label displayed to the user. */ label: string; /** Determines whether the control is checked. * * Note: Typically the `checked` property determines the state of the control * presented to the user. In case of the ``, the displayed state depends * on `checked` _and_ `determinate` state, while the latter takes precedence. */ get checked(): boolean; /** Set whether the control is checked. */ set checked(value: boolean); private _checked; /** * The native element's value attribute. Setting the value will update the checked * state of the control (`false` → unchecked/off, `true` → checked/on). * * Note: A native checkbox element's value and checked state do not neccessarily align. * However, the on-off-controls in this library (e.g. ``, ``) * keep the control's `value` and `checked` state in sync. */ get value(): boolean; /** Set the control's value. */ set value(value: boolean); /** @internal */ _value: boolean; protected changeDetector: ChangeDetectorRef; /** @internal */ writeValue(value: boolean): void; /** @internal */ setValue(value: boolean, emitEvent: boolean): void; /** @internal */ handleBlur(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "ng-component", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_checked: unknown; } /** * Library version for internal usage. For external usage (consumers of the library), use the `version` property from * the public API. * * @internal */ declare const LIB_VERSION: string; export { ControlBaseDirective, FieldUnderlineComponent, LIB_VERSION, Locale, OnOffControlBaseComponent }; export type { Dictionary, TLocale };