@nova-ui/bits
Version:
SolarWinds Nova Framework
99 lines (98 loc) • 3.89 kB
TypeScript
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, Renderer2, TemplateRef, ViewContainerRef } from "@angular/core";
import { ControlValueAccessor } from "@angular/forms";
import { EventBusService } from "../../services/event-bus.service";
import * as i0 from "@angular/core";
export declare class RadioGroupComponent implements AfterContentInit, OnDestroy, ControlValueAccessor {
private renderer;
/**
* Input to set aria label text
*/
ariaLabel: string;
/**
* Sets the "name" attribute for each radio button in the group
*/
name: string;
/**
* Stores the value from selected radio
*/
get value(): any;
set value(newValue: any);
/**
* Sets whether the group is disabled
*/
disabled?: boolean;
/**
* Emits an event when the radio selection changes
*/
valueChange: EventEmitter<any>;
private children;
private _value;
private selectedRadio;
private subscriptions;
constructor(renderer: Renderer2);
private registerChild;
ngAfterContentInit(): void;
onChange(value: any): void;
onTouched(): void;
writeValue(value: any): void;
registerOnChange(fn: (value: any) => void): void;
registerOnTouched(fn: () => void): void;
setDisabledState(isDisabled: boolean): void;
ngOnDestroy(): void;
private setChildDisabled;
private checkSelectedRadioButton;
private updateSelectedRadioFromValue;
private subscribeToRadioEvent;
static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroupComponent, "nui-radio-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, ["children"], ["*"], false, never>;
}
/**
* @ignore
* Should be used only within nui-radio-group.
*/
export declare class RadioComponent implements OnInit, OnDestroy {
private changeDetector;
private eventBusService;
/**
* Sets the radio instance value
*/
value: any;
/**
* Emits an event when the value changes
*/
valueChange: EventEmitter<any>;
hovered: boolean;
/**
* Sets whether the radio button is selected
*/
checked: boolean;
/**
* Adds hint text under the radio button
*/
hint?: string;
/**
* Sets whether the radio button is disabled
*/
get disabled(): boolean;
set disabled(val: boolean);
/**
* Input to set aria label text
*/
ariaLabel: string;
inputViewContainer: ViewContainerRef;
radioTransclude: ElementRef;
radioTranscludeIsEmpty: boolean;
keepFormPristine: boolean;
private timeoutId;
private _disabled;
readonly radioGroup: RadioGroupComponent | null;
protected contentHints: QueryList<TemplateRef<any>>;
constructor(radioGroup: RadioGroupComponent, changeDetector: ChangeDetectorRef, eventBusService: EventBusService);
ngOnInit(): void;
ngOnDestroy(): void;
hoverHandler(): void;
changeHandler(): void;
onInputClick(event: MouseEvent): void;
static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent, [{ optional: true; }, null, null]>;
static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "nui-radio", never, { "value": { "alias": "value"; "required": false; }; "hovered": { "alias": "hovered"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "valueChange": "valueChange"; }, ["contentHints"], ["*", "[hint]"], false, never>;
}