import * as _angular_core from '@angular/core'; import { OnInit, OnDestroy, InputSignal, ElementRef, TemplateRef } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/shared'; import { IThyListOptionParentComponent, ThyListOption, ThyListLayout } from 'ngx-tethys/shared'; import * as i3 from 'ngx-tethys/avatar'; import { ThyBooleanInput } from 'ngx-tethys/util'; import { SelectionModel } from '@angular/cdk/collections'; import { ControlValueAccessor } from '@angular/forms'; /** * 列表组件 * @name thy-list * @order 10 */ declare class ThyList { /** * 控制分割线的显示与隐藏 */ readonly thyDivided: _angular_core.InputSignalWithTransform; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @name thy-list-item,[thy-list-item] * @order 15 */ declare class ThyListItem { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface ThySelectionListChange { source: IThyListOptionParentComponent; option: ThyListOption; value: TValue; event: Event; selected: boolean; } type ThyListSize = 'sm' | 'md' | 'lg'; /** * @name thy-selection-list,[thy-selection-list] * @order 20 */ declare class ThySelectionList implements OnInit, OnDestroy, IThyListOptionParentComponent, ControlValueAccessor { private renderer; private elementRef; private ngZone; private changeDetectorRef; private keyManager; private bindKeyEventUnsubscribe; private modelValues; private hostRenderer; /** The currently selected options. */ selectionModel: SelectionModel; disabled: boolean; /** * @internal */ readonly options: _angular_core.Signal; /** * 改变 grid item 的选择模式,使其支持多选 */ readonly multiple: InputSignal; /** * 绑定键盘事件的容器 * @type HTMLElement | ElementRef | string * @default thy-selection-list 组件绑定的元素 */ readonly thyBindKeyEventContainer: InputSignal | undefined>; /** * 出现滚动条的容器 * @type HTMLElement | ElementRef | string * @default thy-selection-list 组件绑定的元素 */ readonly thyScrollContainer: InputSignal | undefined>; /** * 键盘事件触发 Before 调用,如果返回 false 则停止继续执行 */ readonly thyBeforeKeydown: InputSignal<((event?: KeyboardEvent) => boolean) | undefined>; /** * Option Value 唯一的 Key,用于存储哪些选择被选中的唯一值,只有 Option 的 thyValue 是对象的时才可以传入该选项 */ readonly thyUniqueKey: InputSignal; /** * 比较2个选项的 Value 是否相同 */ readonly thyCompareWith: InputSignal<((o1: any, o2: any) => boolean) | undefined>; /** * grid item 的展示样式 * @type list | grid */ readonly layout: InputSignal; readonly isLayoutGrid: _angular_core.Signal; /** * 是否自动激活第一项 */ readonly thyAutoActiveFirstItem: _angular_core.InputSignalWithTransform; /** * 改变 grid item 的大小,支持默认以及 sm 两种大小 * @type sm | md | lg */ readonly thySize: InputSignal; /** * 是否按下空格切换聚焦选项 */ readonly thySpaceKeyEnabled: _angular_core.InputSignalWithTransform; /** * 每当选项的选定状态发生更改时,都会触发更改事件 */ readonly thySelectionChange: _angular_core.OutputEmitterRef>; private onTouched; private onChange; constructor(); private emitChangeEvent; private emitModelValueChange; private toggleFocusedOption; private instanceSelectionModel; private getElementBySelector; private compareValue; private getOptionSelectionValue; private setSelectionByValues; private setAllOptionsSelected; private getOptionByValue; private getActiveOption; private setListSize; ngOnInit(): void; writeValue(value: any[] | any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; onKeydown(event: KeyboardEvent): void; toggleOption(option: ThyListOption, event?: Event): void; setActiveOption(option: ThyListOption): void; scrollIntoView(option: ThyListOption): void; isSelected(option: ThyListOption): boolean; clearActiveItem(): void; determineClearActiveItem(): void; /** Selects all of the options. */ selectAll(): void; /** Deselects all of the options. */ deselectAll(): void; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @name thy-list-item-meta,[thy-list-item-meta] * @order 40 */ declare class ThyListItemMeta { /** * 列表项的左侧图片 */ readonly thyAvatar: _angular_core.InputSignal; /** * 列表项的标题 */ readonly thyTitle: _angular_core.InputSignal; /** * 列表项的描述文本 */ readonly thyDescription: _angular_core.InputSignal; readonly avatarTemplateRef: _angular_core.Signal | undefined>; readonly titleTemplateRef: _angular_core.Signal | undefined>; readonly descriptionTemplateRef: _angular_core.Signal | undefined>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class ThyListModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { ThyList, ThyListItem, ThyListItemMeta, ThyListModule, ThySelectionList }; export type { ThyListSize, ThySelectionListChange };