@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
42 lines (41 loc) • 2.35 kB
TypeScript
import { AfterContentInit, EventEmitter, ExistingProvider, OnDestroy, QueryList } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { RadioButtonComponent } from '../radiobutton.component';
import * as i0 from "@angular/core";
export declare const RADIO_GROUP_CONTROL_VALUE_ACCESSOR: ExistingProvider;
export declare class RadioButtonGroupDirective<T = unknown> implements ControlValueAccessor, AfterContentInit, OnDestroy {
private readonly _changeDetector;
/** Define the current selected value within the group */
set value(value: T);
/** Return the currently selected value */
get value(): T;
/** Emit when the currently selected value changes */
valueChange: EventEmitter<T>;
/** Used to inform Angular forms that the component has been touched */
onTouched: () => void;
/** Used to inform Angular forms that the component value has changed */
onChange: (value: any) => void;
_radioButtons: QueryList<RadioButtonComponent>;
/** Unsubscribe from all subscriptions on destroy */
private readonly _onDestroy$;
/** Internally store the current value */
private _value;
ngAfterContentInit(): void;
ngOnDestroy(): void;
/** Allow Angular forms for provide us with a callback for when the input value changes */
registerOnChange(fn: (value: any) => void): void;
/** Allow Angular forms for provide us with a callback for when the touched state changes */
registerOnTouched(fn: () => void): void;
/** Allow Angular forms to give us the current value */
writeValue(value: any): void;
/** Allow Angular forms to disable the component */
setDisabledState(isDisabled: boolean): void;
/** Emit the currently selected value */
emitChange(value: T): void;
/** Determine and set the correct internal tabindex */
determineAndSetInternalTabIndex(): void;
/** Inform all child radio buttons of the latest value */
private updateSelectedRadioButton;
static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonGroupDirective<any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RadioButtonGroupDirective<any>, "ux-radio-button-group, [uxRadioButtonGroup]", never, { "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, ["_radioButtons"], never, false, never>;
}