UNPKG

primeng

Version:

PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB

146 lines (145 loc) 5.95 kB
import { AfterContentInit, EventEmitter, QueryList, TemplateRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { PrimeTemplate } from 'primeng/api'; import { BaseComponent } from 'primeng/basecomponent'; import { SelectButtonChangeEvent, SelectButtonOptionClickEvent } from './selectbutton.interface'; import { SelectButtonStyle } from './style/selectbuttonstyle'; import * as i0 from "@angular/core"; import * as i1 from "primeng/api"; export declare const SELECTBUTTON_VALUE_ACCESSOR: any; /** * SelectButton is used to choose single or multiple items from a list using buttons. * @group Components */ export declare class SelectButton extends BaseComponent implements AfterContentInit, ControlValueAccessor { /** * An array of selectitems to display as the available options. * @group Props */ options: any[] | undefined; /** * Name of the label field of an option. * @group Props */ optionLabel: string | undefined; /** * Name of the value field of an option. * @group Props */ optionValue: string | undefined; /** * Name of the disabled field of an option. * @group Props */ optionDisabled: string | undefined; /** * Whether selection can be cleared. * @group Props */ get unselectable(): boolean; private _unselectable; set unselectable(value: boolean); /** * Index of the element in tabbing order. * @group Props */ tabindex: number; /** * When specified, allows selecting multiple values. * @group Props */ multiple: boolean | undefined; /** * Whether selection can not be cleared. * @group Props */ allowEmpty: boolean; /** * Inline style of the component. * @group Props */ style: any; /** * Style class of the component. * @group Props */ styleClass: string | undefined; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. * @group Props */ ariaLabelledBy: string | undefined; /** * Defines the size of the component. * @group Props */ size: 'large' | 'small'; /** * When present, it specifies that the element should be disabled. * @group Props */ disabled: boolean | undefined; /** * A property to uniquely identify a value in options. * @group Props */ dataKey: string | undefined; /** * When present, it specifies that the component should automatically get focus on load. * @group Props */ autofocus: boolean | undefined; /** * Callback to invoke on input click. * @param {SelectButtonOptionClickEvent} event - Custom click event. * @group Emits */ onOptionClick: EventEmitter<SelectButtonOptionClickEvent>; /** * Callback to invoke on selection change. * @param {SelectButtonChangeEvent} event - Custom change event. * @group Emits */ onChange: EventEmitter<SelectButtonChangeEvent>; /** * Template of an item in the list. * @group Templates */ itemTemplate: TemplateRef<any>; _itemTemplate: TemplateRef<any> | undefined; get equalityKey(): string; value: any; onModelChange: Function; onModelTouched: Function; focusedIndex: number; _componentStyle: SelectButtonStyle; getAllowEmpty(): boolean; getOptionLabel(option: any): any; getOptionValue(option: any): any; isOptionDisabled(option: any): any; writeValue(value: any): void; registerOnChange(fn: Function): void; registerOnTouched(fn: Function): void; setDisabledState(val: boolean): void; onOptionSelect(event: any, option: any, index: any): void; changeTabIndexes(event: any, direction: any): void; onFocus(event: Event, index: number): void; onBlur(): void; removeOption(option: any): void; isSelected(option: any): boolean; templates: QueryList<PrimeTemplate> | undefined; ngAfterContentInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SelectButton, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SelectButton, "p-selectButton, p-selectbutton, p-select-button", never, { "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; }; "unselectable": { "alias": "unselectable"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; }; "style": { "alias": "style"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dataKey": { "alias": "dataKey"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; }, { "onOptionClick": "onOptionClick"; "onChange": "onChange"; }, ["itemTemplate", "templates"], never, true, never>; static ngAcceptInputType_unselectable: unknown; static ngAcceptInputType_tabindex: unknown; static ngAcceptInputType_multiple: unknown; static ngAcceptInputType_allowEmpty: unknown; static ngAcceptInputType_disabled: unknown; static ngAcceptInputType_autofocus: unknown; } export declare class SelectButtonModule { static ɵfac: i0.ɵɵFactoryDeclaration<SelectButtonModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SelectButtonModule, never, [typeof SelectButton, typeof i1.SharedModule], [typeof SelectButton, typeof i1.SharedModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<SelectButtonModule>; }