import { OnInit, EventEmitter, AfterContentInit, ChangeDetectorRef, QueryList, ElementRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { UniqueSelectionDispatcher } from '@angular/cdk/collections'; /** * Provider Expression that allows bll-radio-group to register as a ControlValueAccessor. This * allows it to support [(ngModel)] and ngControl. * @docs-private */ export declare const UI_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any; /** Change event object emitted by BllRadio and BllRadioGroup. */ export declare class BllRadioChange { /** The BllRadioButton that emits the change event. */ source: BllRadioButton; /** The value of the BllRadioButton. */ value: any; constructor( /** The BllRadioButton that emits the change event. */ source: BllRadioButton, /** The value of the BllRadioButton. */ value: any); } /** * A group of radio buttons. May contain one or more `` elements. */ export declare class BllRadioGroup implements AfterContentInit, ControlValueAccessor { private _changeDetector; /** Selected value for the radio group. */ private _value; /** The HTML name attribute applied to radio buttons in this group. */ private _name; /** The currently selected radio button. Should match value. */ private _selected; /** Whether the `value` has been set to its initial value. */ private _isInitialized; /** Whether the radio group is disabled. */ private _disabled; /** Whether the radio group is required. */ private _required; /** The method to be called in order to update ngModel */ _controlValueAccessorChangeFn: (value: any) => void; /** * onTouch function registered via registerOnTouch (ControlValueAccessor). * @docs-private */ onTouched: () => any; /** * Event emitted when the group value changes. * Change events are only emitted when the value changes due to user interaction with * a radio button (the same behavior as ``). */ readonly change: EventEmitter; /** Child radio buttons. */ _radios: QueryList; /** Name of the radio button group. All radio buttons inside this group will use this name. */ get name(): string; set name(value: string); get inline(): any; set inline(value: any); private _inline; /** * Value for the radio-group. Should equal the value of the selected radio button if there is * a corresponding radio button with a matching value. If there is not such a corresponding * radio button, this value persists to be applied in case a new radio button is added with a * matching value. */ get value(): any; set value(newValue: any); _checkSelectedRadioButton(): void; /** * The currently selected radio button. If set to a new radio button, the radio group value * will be updated to match the new selected button. */ get selected(): BllRadioButton | null; set selected(selected: BllRadioButton | null); /** Whether the radio group is disabled */ get disabled(): any; set disabled(value: any); get error(): any; set error(value: any); private _error; /** Whether the radio group is required */ get required(): any; set required(value: any); constructor(_changeDetector: ChangeDetectorRef); /** * Initialize properties once content children are available. * This allows us to propagate relevant attributes to associated buttons. */ ngAfterContentInit(): void; /** * Mark this group as being "touched" (for ngModel). Meant to be called by the contained * radio buttons upon their blur. */ _touch(): void; private _updateRadioButtonNames; /** Updates the `selected` radio button from the internal _value state. */ private _updateSelectedRadioFromValue; /** Dispatch change event with current selection and group value. */ _emitChangeEvent(): void; _markRadiosForCheck(): void; /** * Sets the model value. Implemented as part of ControlValueAccessor. */ writeValue(value: any): void; /** * Registers a callback to be triggered when the model value changes. * Implemented as part of ControlValueAccessor. * @param fn Callback to be registered. */ registerOnChange(fn: (value: any) => void): void; /** * Registers a callback to be triggered when the control is touched. * Implemented as part of ControlValueAccessor. * @param fn Callback to be registered. */ registerOnTouched(fn: any): void; /** * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor. * @param isDisabled Whether the control should be disabled. */ setDisabledState(isDisabled: boolean): void; } export declare class BllRadioButton implements OnInit { private _radioDispatcher; private _changeDetector; private _uniqueId; /** The unique ID for the radio button. */ id: string; /** Analog to HTML 'name' attribute used to group radios for unique selection. */ name: string; /** tabindex. */ tabindex: number; /** Used to set the 'aria-label' attribute on the underlying input element. */ ariaLabel: string; size: 'md' | 'lg'; /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */ ariaLabelledby: string; /** The 'aria-describedby' attribute is read after the element's label and field type. */ ariaDescribedby: string; /** Whether this radio button is checked. */ get checked(): boolean; set checked(value: boolean); /** The value of this radio button. */ get value(): any; set value(value: any); /** Whether the radio button is disabled. */ get disabled(): boolean; set disabled(value: boolean); get error(): boolean; set error(value: boolean); private _error; /** Whether the radio button is required. */ get required(): boolean; set required(value: boolean); /** * Event emitted when the checked state of this radio button changes. * Change events are only emitted when the value changes due to user interaction with * the radio button (the same behavior as ``). */ readonly change: EventEmitter; /** The parent radio group. May or may not be present. */ radioGroup: BllRadioGroup; /** ID of the native input element inside `` */ get inputId(): string; /** Whether this radio is checked. */ private _checked; /** Whether this radio is disabled. */ private _disabled; /** Whether this radio is required. */ private _required; /** Value assigned to this radio. */ private _value; /** Unregister function for _radioDispatcher */ private _removeUniqueSelectionListener; /** The native `` element */ _inputElement: ElementRef; constructor(radioGroup: BllRadioGroup, _radioDispatcher: UniqueSelectionDispatcher, _changeDetector: ChangeDetectorRef); /** * Marks the radio button as needing checking for change detection. * This method is exposed because the parent radio group will directly * update bound properties of the radio button. */ _markForCheck(): void; ngOnInit(): void; ngOnDestroy(): void; /** Dispatch change event with current value. */ private _emitChangeEvent; _onInputClick(event: Event): void; /** * Triggered when the radio button received a click or the input recognized any change. * Clicking on a label element, will trigger a change event on the associated input. */ _onInputChange(event: Event): void; }