[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
---|
| 9 | import { CdkTreeNodeToggle } from '@angular/cdk/tree';
|
---|
| 10 | import { Directive, Input } from '@angular/core';
|
---|
| 11 | /**
|
---|
| 12 | * Wrapper for the CdkTree's toggle with Material design styles.
|
---|
| 13 | */
|
---|
| 14 | // tslint:disable-next-line: coercion-types
|
---|
| 15 | export class MatTreeNodeToggle extends CdkTreeNodeToggle {
|
---|
| 16 | get recursive() { return this._recursive; }
|
---|
| 17 | set recursive(value) {
|
---|
| 18 | // TODO: when we remove support for ViewEngine, change this setter to an input
|
---|
| 19 | // alias in the decorator metadata.
|
---|
| 20 | this._recursive = coerceBooleanProperty(value);
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
| 23 | MatTreeNodeToggle.decorators = [
|
---|
| 24 | { type: Directive, args: [{
|
---|
| 25 | selector: '[matTreeNodeToggle]',
|
---|
| 26 | providers: [{ provide: CdkTreeNodeToggle, useExisting: MatTreeNodeToggle }]
|
---|
| 27 | },] }
|
---|
| 28 | ];
|
---|
| 29 | MatTreeNodeToggle.propDecorators = {
|
---|
| 30 | recursive: [{ type: Input, args: ['matTreeNodeToggleRecursive',] }]
|
---|
| 31 | };
|
---|
| 32 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21hdGVyaWFsL3RyZWUvdG9nZ2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBQyxxQkFBcU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