license import { CdkNestedTreeNode , CdkTree , CdkTreeNode , CdkTreeNodeDef } from '@angular/cdk/tree' ; import { AfterContentInit , Attribute , ContentChildren , Directive , ElementRef , Input , IterableDiffers , OnDestroy , QueryList , } from '@angular/core' ; import { CanDisable , CanDisableCtor , HasTabIndex , HasTabIndexCtor , mixinDisabled , mixinTabIndex , } from '@angular/material/core' ; import { MatTreeNodeOutlet } from './outlet' ; export const _MatTreeNodeMixinBase = mixinTabIndex ( mixinDisabled ( CdkTreeNode ) ) ; export const _MatNestedTreeNodeMixinBase = mixinTabIndex ( mixinDisabled ( CdkNestedTreeNode ) ) ; /**
 * Wrapper for the CdkTree node with Material design styles.
 */ @ Directive ( { selector : 'mat-tree-node' , exportAs : 'matTreeNode' , inputs : [ 'disabled' , 'tabIndex' ] , host : { '[attr.aria-expanded]' : 'isExpanded' , '[attr.aria-level]' : 'role === "treeitem" ? level : null' , '[attr.role]' : 'role' , 'class' : 'mat-tree-node' } , providers : [ { provide : CdkTreeNode , useExisting : MatTreeNode } ] } ) export class MatTreeNode < T > extends _MatTreeNodeMixinBase < T > implements CanDisable , HasTabIndex { @ Input ( ) role : 'treeitem' | 'group' = 'treeitem' ; constructor ( protected _elementRef , protected _tree , @ Attribute ( 'tabindex' ) tabIndex ) { super ( _elementRef , _tree ) ; this . tabIndex = Number ( tabIndex ) || 0 ; } } /**
 * Wrapper for the CdkTree node definition with Material design styles.
 */ @ Directive ( { selector : '[matTreeNodeDef]' , inputs : [ 'when: matTreeNodeDefWhen' ] , providers : [ { provide : CdkTreeNodeDef , useExisting : MatTreeNodeDef } ] } ) export class MatTreeNodeDef < T > extends CdkTreeNodeDef < T > { @ Input ( 'matTreeNode' ) data : T ; } /**
 * Wrapper for the CdkTree nested node with Material design styles.
 */ @ Directive ( { selector : 'mat-nested-tree-node' , exportAs : 'matNestedTreeNode' , host : { '[attr.aria-expanded]' : 'isExpanded' , '[attr.role]' : 'role' , 'class' : 'mat-nested-tree-node' , } , inputs : [ 'disabled' , 'tabIndex' ] , providers : [ { provide : CdkNestedTreeNode , useExisting : MatNestedTreeNode } , { provide : CdkTreeNode , useExisting : MatNestedTreeNode } ] } ) export class MatNestedTreeNode < T > extends _MatNestedTreeNodeMixinBase < T > implements AfterContentInit , CanDisable , HasTabIndex , OnDestroy { @ Input ( 'matNestedTreeNode' ) node : T ; @ ContentChildren ( MatTreeNodeOutlet ) nodeOutlet : QueryList < MatTreeNodeOutlet > ; constructor ( protected _elementRef , protected _tree , protected _differs , @ Attribute ( 'tabindex' ) tabIndex ) { super ( _elementRef , _tree , _differs ) ; this . tabIndex = Number ( tabIndex ) || 0 ; } ngAfterContentInit ( ) { super . ngAfterContentInit ( ) ; } ngOnDestroy ( ) { super . ngOnDestroy ( ) ; } }