/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { CDK_TREE_NODE_OUTLET_NODE, CdkNestedTreeNode, CdkTree, CdkTreeNode, CdkTreeNodeDef, } from '@angular/cdk/tree'; import { Attribute, Directive, ElementRef, Input, IterableDiffers, } from '@angular/core'; import { mixinDisabled, mixinTabIndex } from '@angular/material/core'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; import * as i0 from "@angular/core"; import * as i1 from "@angular/cdk/tree"; const _MatTreeNodeBase = mixinTabIndex(mixinDisabled(CdkTreeNode)); /** * Wrapper for the CdkTree node with Material design styles. */ export class MatTreeNode extends _MatTreeNodeBase { constructor(elementRef, tree, tabIndex) { super(elementRef, tree); this.tabIndex = Number(tabIndex) || 0; } // This is a workaround for https://github.com/angular/angular/issues/23091 // In aot mode, the lifecycle hooks from parent class are not called. ngOnInit() { super.ngOnInit(); } ngOnDestroy() { super.ngOnDestroy(); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTreeNode, deps: [{ token: i0.ElementRef }, { token: i1.CdkTree }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatTreeNode, selector: "mat-tree-node", inputs: { role: "role", disabled: "disabled", tabIndex: "tabIndex" }, host: { classAttribute: "mat-tree-node" }, providers: [{ provide: CdkTreeNode, useExisting: MatTreeNode }], exportAs: ["matTreeNode"], usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTreeNode, decorators: [{ type: Directive, args: [{ selector: 'mat-tree-node', exportAs: 'matTreeNode', inputs: ['role', 'disabled', 'tabIndex'], providers: [{ provide: CdkTreeNode, useExisting: MatTreeNode }], host: { 'class': 'mat-tree-node', }, }] }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.CdkTree }, { type: undefined, decorators: [{ type: Attribute, args: ['tabindex'] }] }]; } }); /** * Wrapper for the CdkTree node definition with Material design styles. * Captures the node's template and a when predicate that describes when this node should be used. */ export class MatTreeNodeDef extends CdkTreeNodeDef { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTreeNodeDef, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: { when: ["matTreeNodeDefWhen", "when"], data: ["matTreeNode", "data"] }, providers: [{ provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef }], usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTreeNodeDef, decorators: [{ type: Directive, args: [{ selector: '[matTreeNodeDef]', inputs: ['when: matTreeNodeDefWhen'], providers: [{ provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef }], }] }], propDecorators: { data: [{ type: Input, args: ['matTreeNode'] }] } }); /** * Wrapper for the CdkTree nested node with Material design styles. */ export class MatNestedTreeNode extends CdkNestedTreeNode { /** Whether the node is disabled. */ get disabled() { return this._disabled; } set disabled(value) { this._disabled = coerceBooleanProperty(value); } /** Tabindex for the node. */ get tabIndex() { return this.disabled ? -1 : this._tabIndex; } set tabIndex(value) { // If the specified tabIndex value is null or undefined, fall back to the default value. this._tabIndex = value != null ? value : 0; } constructor(elementRef, tree, differs, tabIndex) { super(elementRef, tree, differs); this._disabled = false; this.tabIndex = Number(tabIndex) || 0; } // This is a workaround for https://github.com/angular/angular/issues/19145 // In aot mode, the lifecycle hooks from parent class are not called. // TODO(tinayuangao): Remove when the angular issue #19145 is fixed ngOnInit() { super.ngOnInit(); } ngAfterContentInit() { super.ngAfterContentInit(); } ngOnDestroy() { super.ngOnDestroy(); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: i1.CdkTree }, { token: i0.IterableDiffers }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatNestedTreeNode, selector: "mat-nested-tree-node", inputs: { role: "role", disabled: "disabled", tabIndex: "tabIndex", node: ["matNestedTreeNode", "node"] }, host: { classAttribute: "mat-nested-tree-node" }, providers: [ { provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode }, { provide: CdkTreeNode, useExisting: MatNestedTreeNode }, { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode }, ], exportAs: ["matNestedTreeNode"], usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatNestedTreeNode, decorators: [{ type: Directive, args: [{ selector: 'mat-nested-tree-node', exportAs: 'matNestedTreeNode', inputs: ['role', 'disabled', 'tabIndex'], providers: [ { provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode }, { provide: CdkTreeNode, useExisting: MatNestedTreeNode }, { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode }, ], host: { 'class': 'mat-nested-tree-node', }, }] }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.CdkTree }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{ type: Attribute, args: ['tabindex'] }] }]; }, propDecorators: { node: [{ type: Input, args: ['matNestedTreeNode'] }], disabled: [{ type: Input }], tabIndex: [{ type: Input }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4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