@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
67 lines (66 loc) • 3.24 kB
TypeScript
import { BooleanInput } from '@angular/cdk/coercion';
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { FocusIndicatorService } from '../accessibility/index';
import * as i0 from "@angular/core";
export declare class SelectionItemDirective<T> implements OnInit, OnChanges, OnDestroy {
readonly focusIndicatorService: FocusIndicatorService;
private readonly _selectionService;
private readonly _elementRef;
private readonly _managedFocusContainerService;
private readonly _changeDetector;
/** Defines the data associated with this item. */
uxSelectionItem: T;
/** Defines whether or not this item is currently selected. */
set selected(selected: boolean);
get selected(): boolean;
/** Defines the tab index of the row */
tabindex: number;
/** Determine whether or not this item can be selected */
set uxSelectionDisabled(isDisabled: boolean);
/** Whether aria-selected is added to the host element */
set addAriaAttributes(value: boolean);
get addAriaAttributes(): boolean;
/** Defines whether or not this item is currently selected. */
selectedChange: EventEmitter<boolean>;
/** Store whether this item is the focusable item */
active: boolean;
/** Store the focused state of the element */
isFocused: boolean;
get attrTabIndex(): number;
/** Store the current selected state */
private _selected;
/** Store the disabled state */
private _isDisabled;
/** Store the tab indexed if using the managed focus container */
private _managedTabIndex;
/** Determine if there is a pending state change as we debounce before emitting */
private _hasPendingStateChange;
/** Subscription to the selection state observable. */
private _selectionStateSubscription;
/** Store value for _addAriaAttributes */
private _addAriaAttributes;
/** Automatically unsubscribe when the component is destroyed */
private readonly _onDestroy;
/** The the instance of the focus indicator */
private readonly _focusIndicator;
constructor();
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
click(event: MouseEvent): void;
mousedown(event: MouseEvent): void;
keydown(event: KeyboardEvent): void;
focus(): void;
/**
* Select this item using the current strategy
*/
select(): void;
/**
* Deselect this item using the current strategy
*/
deselect(): void;
private updateSelectionItem;
static ngAcceptInputType_addAriaAttributes: BooleanInput;
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionItemDirective<any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectionItemDirective<any>, "[uxSelectionItem]", ["ux-selection-item"], { "uxSelectionItem": { "alias": "uxSelectionItem"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "uxSelectionDisabled": { "alias": "uxSelectionDisabled"; "required": false; }; "addAriaAttributes": { "alias": "addAriaAttributes"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, false, never>;
}