source: trip-planner-front/node_modules/@angular/material/esm2015/tree/node.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 15.5 KB
Line 
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 */
8import { CDK_TREE_NODE_OUTLET_NODE, CdkNestedTreeNode, CdkTree, CdkTreeNode, CdkTreeNodeDef, } from '@angular/cdk/tree';
9import { Attribute, Directive, ElementRef, Input, IterableDiffers, } from '@angular/core';
10import { mixinDisabled, mixinTabIndex, } from '@angular/material/core';
11import { coerceBooleanProperty } from '@angular/cdk/coercion';
12const _MatTreeNodeBase = mixinTabIndex(mixinDisabled(CdkTreeNode));
13/**
14 * Wrapper for the CdkTree node with Material design styles.
15 */
16export class MatTreeNode extends _MatTreeNodeBase {
17 constructor(elementRef, tree, tabIndex) {
18 super(elementRef, tree);
19 this.tabIndex = Number(tabIndex) || 0;
20 // The classes are directly added here instead of in the host property because classes on
21 // the host property are not inherited with View Engine. It is not set as a @HostBinding because
22 // it is not set by the time it's children nodes try to read the class from it.
23 // TODO: move to host after View Engine deprecation
24 elementRef.nativeElement.classList.add('mat-tree-node');
25 }
26 // This is a workaround for https://github.com/angular/angular/issues/23091
27 // In aot mode, the lifecycle hooks from parent class are not called.
28 ngOnInit() {
29 super.ngOnInit();
30 }
31 ngDoCheck() {
32 super.ngDoCheck();
33 }
34 ngOnDestroy() {
35 super.ngOnDestroy();
36 }
37}
38MatTreeNode.decorators = [
39 { type: Directive, args: [{
40 selector: 'mat-tree-node',
41 exportAs: 'matTreeNode',
42 inputs: ['role', 'disabled', 'tabIndex'],
43 providers: [{ provide: CdkTreeNode, useExisting: MatTreeNode }]
44 },] }
45];
46MatTreeNode.ctorParameters = () => [
47 { type: ElementRef },
48 { type: CdkTree },
49 { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] }
50];
51/**
52 * Wrapper for the CdkTree node definition with Material design styles.
53 * Captures the node's template and a when predicate that describes when this node should be used.
54 */
55export class MatTreeNodeDef extends CdkTreeNodeDef {
56}
57MatTreeNodeDef.decorators = [
58 { type: Directive, args: [{
59 selector: '[matTreeNodeDef]',
60 inputs: [
61 'when: matTreeNodeDefWhen'
62 ],
63 providers: [{ provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef }]
64 },] }
65];
66MatTreeNodeDef.propDecorators = {
67 data: [{ type: Input, args: ['matTreeNode',] }]
68};
69/**
70 * Wrapper for the CdkTree nested node with Material design styles.
71 */
72export class MatNestedTreeNode extends CdkNestedTreeNode {
73 constructor(elementRef, tree, differs, tabIndex) {
74 super(elementRef, tree, differs);
75 this._disabled = false;
76 this.tabIndex = Number(tabIndex) || 0;
77 // The classes are directly added here instead of in the host property because classes on
78 // the host property are not inherited with View Engine. It is not set as a @HostBinding because
79 // it is not set by the time it's children nodes try to read the class from it.
80 // TODO: move to host after View Engine deprecation
81 elementRef.nativeElement.classList.add('mat-nested-tree-node');
82 }
83 /** Whether the node is disabled. */
84 get disabled() { return this._disabled; }
85 set disabled(value) { this._disabled = coerceBooleanProperty(value); }
86 /** Tabindex for the node. */
87 get tabIndex() { return this.disabled ? -1 : this._tabIndex; }
88 set tabIndex(value) {
89 // If the specified tabIndex value is null or undefined, fall back to the default value.
90 this._tabIndex = value != null ? value : 0;
91 }
92 // This is a workaround for https://github.com/angular/angular/issues/19145
93 // In aot mode, the lifecycle hooks from parent class are not called.
94 // TODO(tinayuangao): Remove when the angular issue #19145 is fixed
95 ngOnInit() {
96 super.ngOnInit();
97 }
98 ngDoCheck() {
99 super.ngDoCheck();
100 }
101 ngAfterContentInit() {
102 super.ngAfterContentInit();
103 }
104 ngOnDestroy() {
105 super.ngOnDestroy();
106 }
107}
108MatNestedTreeNode.decorators = [
109 { type: Directive, args: [{
110 selector: 'mat-nested-tree-node',
111 exportAs: 'matNestedTreeNode',
112 inputs: ['role', 'disabled', 'tabIndex'],
113 providers: [
114 { provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode },
115 { provide: CdkTreeNode, useExisting: MatNestedTreeNode },
116 { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode }
117 ]
118 },] }
119];
120MatNestedTreeNode.ctorParameters = () => [
121 { type: ElementRef },
122 { type: CdkTree },
123 { type: IterableDiffers },
124 { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] }
125];
126MatNestedTreeNode.propDecorators = {
127 node: [{ type: Input, args: ['matNestedTreeNode',] }],
128 disabled: [{ type: Input }],
129 tabIndex: [{ type: Input }]
130};
131//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC90cmVlL25vZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUNMLHlCQUF5QixFQUN6QixpQkFBaUIsRUFDakIsT0FBTyxFQUNQLFdBQVcsRUFDWCxjQUFjLEdBQ2YsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEVBRUwsU0FBUyxFQUNULFNBQVMsRUFFVCxVQUFVLEVBQ1YsS0FBSyxFQUNMLGVBQWUsR0FFaEIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUdMLGFBQWEsRUFDYixhQUFhLEdBQ2QsTUFBTSx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLEVBQWUscUJBQXFCLEVBQWMsTUFBTSx1QkFBdUIsQ0FBQztBQUV2RixNQUFNLGdCQUFnQixHQUFHLGFBQWEsQ0FBQyxhQUFhLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztBQUVuRTs7R0FFRztBQU9ILE1BQU0sT0FBTyxXQUFzQixTQUFRLGdCQUFzQjtJQUkvRCxZQU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