@angular/material 21.0.0-next.9 → 21.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/tokens/_classes.scss +1 -1
- package/core/tokens/m2/_md-sys-color.scss +17 -17
- package/fesm2022/_animation-chunk.mjs +10 -16
- package/fesm2022/_animation-chunk.mjs.map +1 -1
- package/fesm2022/_date-formats-chunk.mjs +68 -164
- package/fesm2022/_date-formats-chunk.mjs.map +1 -1
- package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_error-options-chunk.mjs +56 -19
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs +24 -31
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs +1224 -1017
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs +243 -187
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs +350 -575
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_input-harness-chunk.mjs +56 -107
- package/fesm2022/_input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs +59 -19
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs +83 -43
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs +348 -311
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs +23 -39
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs +36 -10
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs +71 -134
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs +504 -600
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs +120 -138
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs +36 -10
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs +37 -10
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs +811 -888
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs +62 -86
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +965 -1126
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs +38 -54
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +321 -272
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs +10 -24
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +349 -344
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-testing.mjs +60 -94
- package/fesm2022/button-testing.mjs.map +1 -1
- package/fesm2022/button-toggle-testing.mjs +76 -125
- package/fesm2022/button-toggle-testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +752 -662
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +263 -158
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs +19 -33
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs +576 -272
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs +71 -123
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +515 -477
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs +201 -344
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +2552 -2289
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs +14 -28
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +357 -328
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs +15 -25
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +4826 -4563
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs +93 -129
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +810 -829
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs +10 -11
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +119 -43
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs +74 -130
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +703 -515
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field-testing-control.mjs +16 -33
- package/fesm2022/form-field-testing-control.mjs.map +1 -1
- package/fesm2022/form-field-testing.mjs +118 -179
- package/fesm2022/form-field-testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +36 -10
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs +65 -113
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +559 -494
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs +148 -127
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +325 -351
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs +59 -99
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs +457 -520
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs +251 -434
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs +1522 -1204
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs +0 -5
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +159 -228
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +1338 -1343
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs +55 -79
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +381 -309
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs +12 -21
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +224 -169
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs +13 -23
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +235 -160
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs +133 -208
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +712 -679
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs +83 -117
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs +1116 -1246
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs +54 -120
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +1078 -995
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs +57 -92
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +369 -279
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs +90 -138
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +1651 -1716
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs +40 -87
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +763 -714
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs +45 -66
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +419 -344
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs +78 -154
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +790 -498
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs +120 -213
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs +1026 -684
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs +125 -197
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2351 -2028
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs +113 -172
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +1019 -826
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +16 -27
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +163 -78
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs +41 -52
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +36 -10
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +86 -162
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +638 -466
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/types/expansion.d.ts +4 -2
- package/types/menu-testing.d.ts +2 -0
- package/types/select.d.ts +1 -1
- package/types/timepicker.d.ts +1 -0
package/fesm2022/tabs.mjs
CHANGED
|
@@ -17,2096 +17,2419 @@ import { MatRipple, MAT_RIPPLE_GLOBAL_OPTIONS } from './_ripple-chunk.mjs';
|
|
|
17
17
|
import '@angular/cdk/layout';
|
|
18
18
|
import '@angular/cdk/coercion';
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Injection token that can be used to reference instances of `MatTabContent`. It serves as
|
|
22
|
-
* alternative token to the actual `MatTabContent` class which could cause unnecessary
|
|
23
|
-
* retention of the class and its directive metadata.
|
|
24
|
-
*/
|
|
25
20
|
const MAT_TAB_CONTENT = new InjectionToken('MatTabContent');
|
|
26
|
-
/** Decorates the `ng-template` tags and reads out the template from it. */
|
|
27
21
|
class MatTabContent {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
template = inject(TemplateRef);
|
|
23
|
+
constructor() {}
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
25
|
+
minVersion: "12.0.0",
|
|
26
|
+
version: "20.2.0-next.2",
|
|
27
|
+
ngImport: i0,
|
|
28
|
+
type: MatTabContent,
|
|
29
|
+
deps: [],
|
|
30
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
31
|
+
});
|
|
32
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
33
|
+
minVersion: "14.0.0",
|
|
34
|
+
version: "20.2.0-next.2",
|
|
35
|
+
type: MatTabContent,
|
|
36
|
+
isStandalone: true,
|
|
37
|
+
selector: "[matTabContent]",
|
|
38
|
+
providers: [{
|
|
39
|
+
provide: MAT_TAB_CONTENT,
|
|
40
|
+
useExisting: MatTabContent
|
|
41
|
+
}],
|
|
42
|
+
ngImport: i0
|
|
43
|
+
});
|
|
32
44
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
46
|
+
minVersion: "12.0.0",
|
|
47
|
+
version: "20.2.0-next.2",
|
|
48
|
+
ngImport: i0,
|
|
49
|
+
type: MatTabContent,
|
|
50
|
+
decorators: [{
|
|
51
|
+
type: Directive,
|
|
52
|
+
args: [{
|
|
53
|
+
selector: '[matTabContent]',
|
|
54
|
+
providers: [{
|
|
55
|
+
provide: MAT_TAB_CONTENT,
|
|
56
|
+
useExisting: MatTabContent
|
|
57
|
+
}]
|
|
58
|
+
}]
|
|
59
|
+
}],
|
|
60
|
+
ctorParameters: () => []
|
|
61
|
+
});
|
|
40
62
|
|
|
41
|
-
/**
|
|
42
|
-
* Injection token that can be used to reference instances of `MatTabLabel`. It serves as
|
|
43
|
-
* alternative token to the actual `MatTabLabel` class which could cause unnecessary
|
|
44
|
-
* retention of the class and its directive metadata.
|
|
45
|
-
*/
|
|
46
63
|
const MAT_TAB_LABEL = new InjectionToken('MatTabLabel');
|
|
47
|
-
/**
|
|
48
|
-
* Used to provide a tab label to a tab without causing a circular dependency.
|
|
49
|
-
* @docs-private
|
|
50
|
-
*/
|
|
51
64
|
const MAT_TAB = new InjectionToken('MAT_TAB');
|
|
52
|
-
/** Used to flag tab labels for use with the portal directive */
|
|
53
65
|
class MatTabLabel extends CdkPortal {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
_closestTab = inject(MAT_TAB, {
|
|
67
|
+
optional: true
|
|
68
|
+
});
|
|
69
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
70
|
+
minVersion: "12.0.0",
|
|
71
|
+
version: "20.2.0-next.2",
|
|
72
|
+
ngImport: i0,
|
|
73
|
+
type: MatTabLabel,
|
|
74
|
+
deps: null,
|
|
75
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
76
|
+
});
|
|
77
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
78
|
+
minVersion: "14.0.0",
|
|
79
|
+
version: "20.2.0-next.2",
|
|
80
|
+
type: MatTabLabel,
|
|
81
|
+
isStandalone: true,
|
|
82
|
+
selector: "[mat-tab-label], [matTabLabel]",
|
|
83
|
+
providers: [{
|
|
84
|
+
provide: MAT_TAB_LABEL,
|
|
85
|
+
useExisting: MatTabLabel
|
|
86
|
+
}],
|
|
87
|
+
usesInheritance: true,
|
|
88
|
+
ngImport: i0
|
|
89
|
+
});
|
|
57
90
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
92
|
+
minVersion: "12.0.0",
|
|
93
|
+
version: "20.2.0-next.2",
|
|
94
|
+
ngImport: i0,
|
|
95
|
+
type: MatTabLabel,
|
|
96
|
+
decorators: [{
|
|
97
|
+
type: Directive,
|
|
98
|
+
args: [{
|
|
99
|
+
selector: '[mat-tab-label], [matTabLabel]',
|
|
100
|
+
providers: [{
|
|
101
|
+
provide: MAT_TAB_LABEL,
|
|
102
|
+
useExisting: MatTabLabel
|
|
103
|
+
}]
|
|
104
|
+
}]
|
|
105
|
+
}]
|
|
106
|
+
});
|
|
65
107
|
|
|
66
|
-
/**
|
|
67
|
-
* Used to provide a tab group to a tab without causing a circular dependency.
|
|
68
|
-
* @docs-private
|
|
69
|
-
*/
|
|
70
108
|
const MAT_TAB_GROUP = new InjectionToken('MAT_TAB_GROUP');
|
|
71
109
|
class MatTab {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
110
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
111
|
+
_closestTabGroup = inject(MAT_TAB_GROUP, {
|
|
112
|
+
optional: true
|
|
113
|
+
});
|
|
114
|
+
disabled = false;
|
|
115
|
+
get templateLabel() {
|
|
116
|
+
return this._templateLabel;
|
|
117
|
+
}
|
|
118
|
+
set templateLabel(value) {
|
|
119
|
+
this._setTemplateLabelInput(value);
|
|
120
|
+
}
|
|
121
|
+
_templateLabel;
|
|
122
|
+
_explicitContent = undefined;
|
|
123
|
+
_implicitContent;
|
|
124
|
+
textLabel = '';
|
|
125
|
+
ariaLabel;
|
|
126
|
+
ariaLabelledby;
|
|
127
|
+
labelClass;
|
|
128
|
+
bodyClass;
|
|
129
|
+
id = null;
|
|
130
|
+
_contentPortal = null;
|
|
131
|
+
get content() {
|
|
132
|
+
return this._contentPortal;
|
|
133
|
+
}
|
|
134
|
+
_stateChanges = new Subject();
|
|
135
|
+
position = null;
|
|
136
|
+
origin = null;
|
|
137
|
+
isActive = false;
|
|
138
|
+
constructor() {
|
|
139
|
+
inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
|
|
140
|
+
}
|
|
141
|
+
ngOnChanges(changes) {
|
|
142
|
+
if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {
|
|
143
|
+
this._stateChanges.next();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
ngOnDestroy() {
|
|
147
|
+
this._stateChanges.complete();
|
|
148
|
+
}
|
|
149
|
+
ngOnInit() {
|
|
150
|
+
this._contentPortal = new TemplatePortal(this._explicitContent || this._implicitContent, this._viewContainerRef);
|
|
151
|
+
}
|
|
152
|
+
_setTemplateLabelInput(value) {
|
|
153
|
+
if (value && value._closestTab === this) {
|
|
154
|
+
this._templateLabel = value;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
158
|
+
minVersion: "12.0.0",
|
|
159
|
+
version: "20.2.0-next.2",
|
|
160
|
+
ngImport: i0,
|
|
161
|
+
type: MatTab,
|
|
162
|
+
deps: [],
|
|
163
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
164
|
+
});
|
|
165
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
166
|
+
minVersion: "16.1.0",
|
|
167
|
+
version: "20.2.0-next.2",
|
|
168
|
+
type: MatTab,
|
|
169
|
+
isStandalone: true,
|
|
170
|
+
selector: "mat-tab",
|
|
171
|
+
inputs: {
|
|
172
|
+
disabled: ["disabled", "disabled", booleanAttribute],
|
|
173
|
+
textLabel: ["label", "textLabel"],
|
|
174
|
+
ariaLabel: ["aria-label", "ariaLabel"],
|
|
175
|
+
ariaLabelledby: ["aria-labelledby", "ariaLabelledby"],
|
|
176
|
+
labelClass: "labelClass",
|
|
177
|
+
bodyClass: "bodyClass",
|
|
178
|
+
id: "id"
|
|
179
|
+
},
|
|
180
|
+
host: {
|
|
181
|
+
attributes: {
|
|
182
|
+
"hidden": ""
|
|
183
|
+
},
|
|
184
|
+
properties: {
|
|
185
|
+
"attr.id": "null"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
providers: [{
|
|
189
|
+
provide: MAT_TAB,
|
|
190
|
+
useExisting: MatTab
|
|
191
|
+
}],
|
|
192
|
+
queries: [{
|
|
193
|
+
propertyName: "templateLabel",
|
|
194
|
+
first: true,
|
|
195
|
+
predicate: MatTabLabel,
|
|
196
|
+
descendants: true
|
|
197
|
+
}, {
|
|
198
|
+
propertyName: "_explicitContent",
|
|
199
|
+
first: true,
|
|
200
|
+
predicate: MatTabContent,
|
|
201
|
+
descendants: true,
|
|
202
|
+
read: TemplateRef,
|
|
203
|
+
static: true
|
|
204
|
+
}],
|
|
205
|
+
viewQueries: [{
|
|
206
|
+
propertyName: "_implicitContent",
|
|
207
|
+
first: true,
|
|
208
|
+
predicate: TemplateRef,
|
|
209
|
+
descendants: true,
|
|
210
|
+
static: true
|
|
211
|
+
}],
|
|
212
|
+
exportAs: ["matTab"],
|
|
213
|
+
usesOnChanges: true,
|
|
214
|
+
ngImport: i0,
|
|
215
|
+
template: "<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\n tab-group. -->\n<ng-template><ng-content></ng-content></ng-template>\n",
|
|
216
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
217
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
218
|
+
});
|
|
162
219
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
221
|
+
minVersion: "12.0.0",
|
|
222
|
+
version: "20.2.0-next.2",
|
|
223
|
+
ngImport: i0,
|
|
224
|
+
type: MatTab,
|
|
225
|
+
decorators: [{
|
|
226
|
+
type: Component,
|
|
227
|
+
args: [{
|
|
228
|
+
selector: 'mat-tab',
|
|
229
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
230
|
+
encapsulation: ViewEncapsulation.None,
|
|
231
|
+
exportAs: 'matTab',
|
|
232
|
+
providers: [{
|
|
233
|
+
provide: MAT_TAB,
|
|
234
|
+
useExisting: MatTab
|
|
235
|
+
}],
|
|
236
|
+
host: {
|
|
237
|
+
'hidden': '',
|
|
238
|
+
'[attr.id]': 'null'
|
|
239
|
+
},
|
|
240
|
+
template: "<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\n tab-group. -->\n<ng-template><ng-content></ng-content></ng-template>\n"
|
|
241
|
+
}]
|
|
242
|
+
}],
|
|
243
|
+
ctorParameters: () => [],
|
|
244
|
+
propDecorators: {
|
|
245
|
+
disabled: [{
|
|
246
|
+
type: Input,
|
|
247
|
+
args: [{
|
|
248
|
+
transform: booleanAttribute
|
|
249
|
+
}]
|
|
250
|
+
}],
|
|
251
|
+
templateLabel: [{
|
|
252
|
+
type: ContentChild,
|
|
253
|
+
args: [MatTabLabel]
|
|
254
|
+
}],
|
|
255
|
+
_explicitContent: [{
|
|
256
|
+
type: ContentChild,
|
|
257
|
+
args: [MatTabContent, {
|
|
258
|
+
read: TemplateRef,
|
|
259
|
+
static: true
|
|
260
|
+
}]
|
|
261
|
+
}],
|
|
262
|
+
_implicitContent: [{
|
|
263
|
+
type: ViewChild,
|
|
264
|
+
args: [TemplateRef, {
|
|
265
|
+
static: true
|
|
266
|
+
}]
|
|
267
|
+
}],
|
|
268
|
+
textLabel: [{
|
|
269
|
+
type: Input,
|
|
270
|
+
args: ['label']
|
|
271
|
+
}],
|
|
272
|
+
ariaLabel: [{
|
|
273
|
+
type: Input,
|
|
274
|
+
args: ['aria-label']
|
|
275
|
+
}],
|
|
276
|
+
ariaLabelledby: [{
|
|
277
|
+
type: Input,
|
|
278
|
+
args: ['aria-labelledby']
|
|
279
|
+
}],
|
|
280
|
+
labelClass: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}],
|
|
283
|
+
bodyClass: [{
|
|
284
|
+
type: Input
|
|
285
|
+
}],
|
|
286
|
+
id: [{
|
|
287
|
+
type: Input
|
|
288
|
+
}]
|
|
289
|
+
}
|
|
290
|
+
});
|
|
200
291
|
|
|
201
|
-
/** Class that is applied when a tab indicator is active. */
|
|
202
292
|
const ACTIVE_CLASS = 'mdc-tab-indicator--active';
|
|
203
|
-
/** Class that is applied when the tab indicator should not transition. */
|
|
204
293
|
const NO_TRANSITION_CLASS = 'mdc-tab-indicator--no-transition';
|
|
205
|
-
/**
|
|
206
|
-
* Abstraction around the MDC tab indicator that acts as the tab header's ink bar.
|
|
207
|
-
* @docs-private
|
|
208
|
-
*/
|
|
209
294
|
class MatInkBar {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
correspondingItem.activateInkBar(domRect);
|
|
233
|
-
this._currentItem = correspondingItem;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
295
|
+
_items;
|
|
296
|
+
_currentItem;
|
|
297
|
+
constructor(_items) {
|
|
298
|
+
this._items = _items;
|
|
299
|
+
}
|
|
300
|
+
hide() {
|
|
301
|
+
this._items.forEach(item => item.deactivateInkBar());
|
|
302
|
+
this._currentItem = undefined;
|
|
303
|
+
}
|
|
304
|
+
alignToElement(element) {
|
|
305
|
+
const correspondingItem = this._items.find(item => item.elementRef.nativeElement === element);
|
|
306
|
+
const currentItem = this._currentItem;
|
|
307
|
+
if (correspondingItem === currentItem) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
currentItem?.deactivateInkBar();
|
|
311
|
+
if (correspondingItem) {
|
|
312
|
+
const domRect = currentItem?.elementRef.nativeElement.getBoundingClientRect?.();
|
|
313
|
+
correspondingItem.activateInkBar(domRect);
|
|
314
|
+
this._currentItem = correspondingItem;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
236
317
|
}
|
|
237
318
|
class InkBarItem {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (this._inkBarElement) {
|
|
250
|
-
this._appendInkBarElement();
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
/** Aligns the ink bar to the current item. */
|
|
255
|
-
activateInkBar(previousIndicatorClientRect) {
|
|
256
|
-
const element = this._elementRef.nativeElement;
|
|
257
|
-
// Early exit if no indicator is present to handle cases where an indicator
|
|
258
|
-
// may be activated without a prior indicator state
|
|
259
|
-
if (!previousIndicatorClientRect ||
|
|
260
|
-
!element.getBoundingClientRect ||
|
|
261
|
-
!this._inkBarContentElement) {
|
|
262
|
-
element.classList.add(ACTIVE_CLASS);
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
// This animation uses the FLIP approach. You can read more about it at the link below:
|
|
266
|
-
// https://aerotwist.com/blog/flip-your-animations/
|
|
267
|
-
// Calculate the dimensions based on the dimensions of the previous indicator
|
|
268
|
-
const currentClientRect = element.getBoundingClientRect();
|
|
269
|
-
const widthDelta = previousIndicatorClientRect.width / currentClientRect.width;
|
|
270
|
-
const xPosition = previousIndicatorClientRect.left - currentClientRect.left;
|
|
271
|
-
element.classList.add(NO_TRANSITION_CLASS);
|
|
272
|
-
this._inkBarContentElement.style.setProperty('transform', `translateX(${xPosition}px) scaleX(${widthDelta})`);
|
|
273
|
-
// Force repaint before updating classes and transform to ensure the transform properly takes effect
|
|
274
|
-
element.getBoundingClientRect();
|
|
275
|
-
element.classList.remove(NO_TRANSITION_CLASS);
|
|
276
|
-
element.classList.add(ACTIVE_CLASS);
|
|
277
|
-
this._inkBarContentElement.style.setProperty('transform', '');
|
|
278
|
-
}
|
|
279
|
-
/** Removes the ink bar from the current item. */
|
|
280
|
-
deactivateInkBar() {
|
|
281
|
-
this._elementRef.nativeElement.classList.remove(ACTIVE_CLASS);
|
|
282
|
-
}
|
|
283
|
-
/** Initializes the foundation. */
|
|
284
|
-
ngOnInit() {
|
|
285
|
-
this._createInkBarElement();
|
|
286
|
-
}
|
|
287
|
-
/** Destroys the foundation. */
|
|
288
|
-
ngOnDestroy() {
|
|
289
|
-
this._inkBarElement?.remove();
|
|
290
|
-
this._inkBarElement = this._inkBarContentElement = null;
|
|
291
|
-
}
|
|
292
|
-
/** Creates and appends the ink bar element. */
|
|
293
|
-
_createInkBarElement() {
|
|
294
|
-
const documentNode = this._elementRef.nativeElement.ownerDocument || document;
|
|
295
|
-
const inkBarElement = (this._inkBarElement = documentNode.createElement('span'));
|
|
296
|
-
const inkBarContentElement = (this._inkBarContentElement = documentNode.createElement('span'));
|
|
297
|
-
inkBarElement.className = 'mdc-tab-indicator';
|
|
298
|
-
inkBarContentElement.className =
|
|
299
|
-
'mdc-tab-indicator__content mdc-tab-indicator__content--underline';
|
|
300
|
-
inkBarElement.appendChild(this._inkBarContentElement);
|
|
319
|
+
_elementRef = inject(ElementRef);
|
|
320
|
+
_inkBarElement;
|
|
321
|
+
_inkBarContentElement;
|
|
322
|
+
_fitToContent = false;
|
|
323
|
+
get fitInkBarToContent() {
|
|
324
|
+
return this._fitToContent;
|
|
325
|
+
}
|
|
326
|
+
set fitInkBarToContent(newValue) {
|
|
327
|
+
if (this._fitToContent !== newValue) {
|
|
328
|
+
this._fitToContent = newValue;
|
|
329
|
+
if (this._inkBarElement) {
|
|
301
330
|
this._appendInkBarElement();
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
activateInkBar(previousIndicatorClientRect) {
|
|
335
|
+
const element = this._elementRef.nativeElement;
|
|
336
|
+
if (!previousIndicatorClientRect || !element.getBoundingClientRect || !this._inkBarContentElement) {
|
|
337
|
+
element.classList.add(ACTIVE_CLASS);
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
const currentClientRect = element.getBoundingClientRect();
|
|
341
|
+
const widthDelta = previousIndicatorClientRect.width / currentClientRect.width;
|
|
342
|
+
const xPosition = previousIndicatorClientRect.left - currentClientRect.left;
|
|
343
|
+
element.classList.add(NO_TRANSITION_CLASS);
|
|
344
|
+
this._inkBarContentElement.style.setProperty('transform', `translateX(${xPosition}px) scaleX(${widthDelta})`);
|
|
345
|
+
element.getBoundingClientRect();
|
|
346
|
+
element.classList.remove(NO_TRANSITION_CLASS);
|
|
347
|
+
element.classList.add(ACTIVE_CLASS);
|
|
348
|
+
this._inkBarContentElement.style.setProperty('transform', '');
|
|
349
|
+
}
|
|
350
|
+
deactivateInkBar() {
|
|
351
|
+
this._elementRef.nativeElement.classList.remove(ACTIVE_CLASS);
|
|
352
|
+
}
|
|
353
|
+
ngOnInit() {
|
|
354
|
+
this._createInkBarElement();
|
|
355
|
+
}
|
|
356
|
+
ngOnDestroy() {
|
|
357
|
+
this._inkBarElement?.remove();
|
|
358
|
+
this._inkBarElement = this._inkBarContentElement = null;
|
|
359
|
+
}
|
|
360
|
+
_createInkBarElement() {
|
|
361
|
+
const documentNode = this._elementRef.nativeElement.ownerDocument || document;
|
|
362
|
+
const inkBarElement = this._inkBarElement = documentNode.createElement('span');
|
|
363
|
+
const inkBarContentElement = this._inkBarContentElement = documentNode.createElement('span');
|
|
364
|
+
inkBarElement.className = 'mdc-tab-indicator';
|
|
365
|
+
inkBarContentElement.className = 'mdc-tab-indicator__content mdc-tab-indicator__content--underline';
|
|
366
|
+
inkBarElement.appendChild(this._inkBarContentElement);
|
|
367
|
+
this._appendInkBarElement();
|
|
368
|
+
}
|
|
369
|
+
_appendInkBarElement() {
|
|
370
|
+
if (!this._inkBarElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
371
|
+
throw Error('Ink bar element has not been created and cannot be appended');
|
|
372
|
+
}
|
|
373
|
+
const parentElement = this._fitToContent ? this._elementRef.nativeElement.querySelector('.mdc-tab__content') : this._elementRef.nativeElement;
|
|
374
|
+
if (!parentElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
375
|
+
throw Error('Missing element to host the ink bar');
|
|
376
|
+
}
|
|
377
|
+
parentElement.appendChild(this._inkBarElement);
|
|
378
|
+
}
|
|
379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
380
|
+
minVersion: "12.0.0",
|
|
381
|
+
version: "20.2.0-next.2",
|
|
382
|
+
ngImport: i0,
|
|
383
|
+
type: InkBarItem,
|
|
384
|
+
deps: [],
|
|
385
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
386
|
+
});
|
|
387
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
388
|
+
minVersion: "16.1.0",
|
|
389
|
+
version: "20.2.0-next.2",
|
|
390
|
+
type: InkBarItem,
|
|
391
|
+
isStandalone: true,
|
|
392
|
+
inputs: {
|
|
393
|
+
fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute]
|
|
394
|
+
},
|
|
395
|
+
ngImport: i0
|
|
396
|
+
});
|
|
321
397
|
}
|
|
322
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
399
|
+
minVersion: "12.0.0",
|
|
400
|
+
version: "20.2.0-next.2",
|
|
401
|
+
ngImport: i0,
|
|
402
|
+
type: InkBarItem,
|
|
403
|
+
decorators: [{
|
|
404
|
+
type: Directive
|
|
405
|
+
}],
|
|
406
|
+
propDecorators: {
|
|
407
|
+
fitInkBarToContent: [{
|
|
408
|
+
type: Input,
|
|
409
|
+
args: [{
|
|
410
|
+
transform: booleanAttribute
|
|
411
|
+
}]
|
|
412
|
+
}]
|
|
413
|
+
}
|
|
414
|
+
});
|
|
329
415
|
const _MAT_INK_BAR_POSITIONER = new InjectionToken('MatInkBarPositioner', {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
416
|
+
providedIn: 'root',
|
|
417
|
+
factory: () => {
|
|
418
|
+
const method = element => ({
|
|
419
|
+
left: element ? (element.offsetLeft || 0) + 'px' : '0',
|
|
420
|
+
width: element ? (element.offsetWidth || 0) + 'px' : '0'
|
|
421
|
+
});
|
|
422
|
+
return method;
|
|
423
|
+
}
|
|
338
424
|
});
|
|
339
425
|
|
|
340
|
-
/**
|
|
341
|
-
* Used in the `mat-tab-group` view to display tab labels.
|
|
342
|
-
* @docs-private
|
|
343
|
-
*/
|
|
344
426
|
class MatTabLabelWrapper extends InkBarItem {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
427
|
+
elementRef = inject(ElementRef);
|
|
428
|
+
disabled = false;
|
|
429
|
+
focus() {
|
|
430
|
+
this.elementRef.nativeElement.focus();
|
|
431
|
+
}
|
|
432
|
+
getOffsetLeft() {
|
|
433
|
+
return this.elementRef.nativeElement.offsetLeft;
|
|
434
|
+
}
|
|
435
|
+
getOffsetWidth() {
|
|
436
|
+
return this.elementRef.nativeElement.offsetWidth;
|
|
437
|
+
}
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
439
|
+
minVersion: "12.0.0",
|
|
440
|
+
version: "20.2.0-next.2",
|
|
441
|
+
ngImport: i0,
|
|
442
|
+
type: MatTabLabelWrapper,
|
|
443
|
+
deps: null,
|
|
444
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
445
|
+
});
|
|
446
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
447
|
+
minVersion: "16.1.0",
|
|
448
|
+
version: "20.2.0-next.2",
|
|
449
|
+
type: MatTabLabelWrapper,
|
|
450
|
+
isStandalone: true,
|
|
451
|
+
selector: "[matTabLabelWrapper]",
|
|
452
|
+
inputs: {
|
|
453
|
+
disabled: ["disabled", "disabled", booleanAttribute]
|
|
454
|
+
},
|
|
455
|
+
host: {
|
|
456
|
+
properties: {
|
|
457
|
+
"class.mat-mdc-tab-disabled": "disabled",
|
|
458
|
+
"attr.aria-disabled": "!!disabled"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
usesInheritance: true,
|
|
462
|
+
ngImport: i0
|
|
463
|
+
});
|
|
360
464
|
}
|
|
361
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
466
|
+
minVersion: "12.0.0",
|
|
467
|
+
version: "20.2.0-next.2",
|
|
468
|
+
ngImport: i0,
|
|
469
|
+
type: MatTabLabelWrapper,
|
|
470
|
+
decorators: [{
|
|
471
|
+
type: Directive,
|
|
472
|
+
args: [{
|
|
473
|
+
selector: '[matTabLabelWrapper]',
|
|
474
|
+
host: {
|
|
475
|
+
'[class.mat-mdc-tab-disabled]': 'disabled',
|
|
476
|
+
'[attr.aria-disabled]': '!!disabled'
|
|
477
|
+
}
|
|
478
|
+
}]
|
|
479
|
+
}],
|
|
480
|
+
propDecorators: {
|
|
481
|
+
disabled: [{
|
|
482
|
+
type: Input,
|
|
483
|
+
args: [{
|
|
484
|
+
transform: booleanAttribute
|
|
485
|
+
}]
|
|
486
|
+
}]
|
|
487
|
+
}
|
|
488
|
+
});
|
|
374
489
|
|
|
375
|
-
/** Config used to bind passive event listeners */
|
|
376
490
|
const passiveEventListenerOptions = {
|
|
377
|
-
|
|
491
|
+
passive: true
|
|
378
492
|
};
|
|
379
|
-
/**
|
|
380
|
-
* Amount of milliseconds to wait before starting to scroll the header automatically.
|
|
381
|
-
* Set a little conservatively in order to handle fake events dispatched on touch devices.
|
|
382
|
-
*/
|
|
383
493
|
const HEADER_SCROLL_DELAY = 650;
|
|
384
|
-
/**
|
|
385
|
-
* Interval in milliseconds at which to scroll the header
|
|
386
|
-
* while the user is holding their pointer.
|
|
387
|
-
*/
|
|
388
494
|
const HEADER_SCROLL_INTERVAL = 100;
|
|
389
|
-
/**
|
|
390
|
-
* Base class for a tab header that supported pagination.
|
|
391
|
-
* @docs-private
|
|
392
|
-
*/
|
|
393
495
|
class MatPaginatedTabHeader {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
ngAfterViewInit() {
|
|
461
|
-
// We need to handle these events manually, because we want to bind passive event listeners.
|
|
462
|
-
this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('before'), passiveEventListenerOptions), this._renderer.listen(this._nextPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('after'), passiveEventListenerOptions));
|
|
463
|
-
}
|
|
464
|
-
ngAfterContentInit() {
|
|
465
|
-
const dirChange = this._dir ? this._dir.change : of('ltr');
|
|
466
|
-
// We need to debounce resize events because the alignment logic is expensive.
|
|
467
|
-
// If someone animates the width of tabs, we don't want to realign on every animation frame.
|
|
468
|
-
// Once we haven't seen any more resize events in the last 32ms (~2 animaion frames) we can
|
|
469
|
-
// re-align.
|
|
470
|
-
const resize = this._sharedResizeObserver
|
|
471
|
-
.observe(this._elementRef.nativeElement)
|
|
472
|
-
.pipe(debounceTime(32), takeUntil(this._destroyed));
|
|
473
|
-
// Note: We do not actually need to watch these events for proper functioning of the tabs,
|
|
474
|
-
// the resize events above should capture any viewport resize that we care about. However,
|
|
475
|
-
// removing this is fairly breaking for screenshot tests, so we're leaving it here for now.
|
|
476
|
-
const viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));
|
|
477
|
-
const realign = () => {
|
|
478
|
-
this.updatePagination();
|
|
479
|
-
this._alignInkBarToSelectedTab();
|
|
480
|
-
};
|
|
481
|
-
this._keyManager = new FocusKeyManager(this._items)
|
|
482
|
-
.withHorizontalOrientation(this._getLayoutDirection())
|
|
483
|
-
.withHomeAndEnd()
|
|
484
|
-
.withWrap()
|
|
485
|
-
// Allow focus to land on disabled tabs, as per https://w3c.github.io/aria-practices/#kbd_disabled_controls
|
|
486
|
-
.skipPredicate(() => false);
|
|
487
|
-
// Fall back to the first link as being active if there isn't a selected one.
|
|
488
|
-
// This is relevant primarily for the tab nav bar.
|
|
489
|
-
this._keyManager.updateActiveItem(Math.max(this._selectedIndex, 0));
|
|
490
|
-
// Note: We do not need to realign after the first render for proper functioning of the tabs
|
|
491
|
-
// the resize events above should fire when we first start observing the element. However,
|
|
492
|
-
// removing this is fairly breaking for screenshot tests, so we're leaving it here for now.
|
|
493
|
-
afterNextRender(realign, { injector: this._injector });
|
|
494
|
-
// On dir change or resize, realign the ink bar and update the orientation of
|
|
495
|
-
// the key manager if the direction has changed.
|
|
496
|
-
merge(dirChange, viewportResize, resize, this._items.changes, this._itemsResized())
|
|
497
|
-
.pipe(takeUntil(this._destroyed))
|
|
498
|
-
.subscribe(() => {
|
|
499
|
-
// We need to defer this to give the browser some time to recalculate
|
|
500
|
-
// the element dimensions. The call has to be wrapped in `NgZone.run`,
|
|
501
|
-
// because the viewport change handler runs outside of Angular.
|
|
502
|
-
this._ngZone.run(() => {
|
|
503
|
-
Promise.resolve().then(() => {
|
|
504
|
-
// Clamp the scroll distance, because it can change with the number of tabs.
|
|
505
|
-
this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));
|
|
506
|
-
realign();
|
|
507
|
-
});
|
|
508
|
-
});
|
|
509
|
-
this._keyManager?.withHorizontalOrientation(this._getLayoutDirection());
|
|
510
|
-
});
|
|
511
|
-
// If there is a change in the focus key manager we need to emit the `indexFocused`
|
|
512
|
-
// event in order to provide a public event that notifies about focus changes. Also we realign
|
|
513
|
-
// the tabs container by scrolling the new focused tab into the visible section.
|
|
514
|
-
this._keyManager.change.subscribe(newFocusIndex => {
|
|
515
|
-
this.indexFocused.emit(newFocusIndex);
|
|
516
|
-
this._setTabFocus(newFocusIndex);
|
|
496
|
+
_elementRef = inject(ElementRef);
|
|
497
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
498
|
+
_viewportRuler = inject(ViewportRuler);
|
|
499
|
+
_dir = inject(Directionality, {
|
|
500
|
+
optional: true
|
|
501
|
+
});
|
|
502
|
+
_ngZone = inject(NgZone);
|
|
503
|
+
_platform = inject(Platform);
|
|
504
|
+
_sharedResizeObserver = inject(SharedResizeObserver);
|
|
505
|
+
_injector = inject(Injector);
|
|
506
|
+
_renderer = inject(Renderer2);
|
|
507
|
+
_animationsDisabled = _animationsDisabled();
|
|
508
|
+
_eventCleanups;
|
|
509
|
+
_scrollDistance = 0;
|
|
510
|
+
_selectedIndexChanged = false;
|
|
511
|
+
_destroyed = new Subject();
|
|
512
|
+
_showPaginationControls = false;
|
|
513
|
+
_disableScrollAfter = true;
|
|
514
|
+
_disableScrollBefore = true;
|
|
515
|
+
_tabLabelCount;
|
|
516
|
+
_scrollDistanceChanged;
|
|
517
|
+
_keyManager;
|
|
518
|
+
_currentTextContent;
|
|
519
|
+
_stopScrolling = new Subject();
|
|
520
|
+
disablePagination = false;
|
|
521
|
+
get selectedIndex() {
|
|
522
|
+
return this._selectedIndex;
|
|
523
|
+
}
|
|
524
|
+
set selectedIndex(v) {
|
|
525
|
+
const value = isNaN(v) ? 0 : v;
|
|
526
|
+
if (this._selectedIndex != value) {
|
|
527
|
+
this._selectedIndexChanged = true;
|
|
528
|
+
this._selectedIndex = value;
|
|
529
|
+
if (this._keyManager) {
|
|
530
|
+
this._keyManager.updateActiveItem(value);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
_selectedIndex = 0;
|
|
535
|
+
selectFocusedIndex = new EventEmitter();
|
|
536
|
+
indexFocused = new EventEmitter();
|
|
537
|
+
constructor() {
|
|
538
|
+
this._eventCleanups = this._ngZone.runOutsideAngular(() => [this._renderer.listen(this._elementRef.nativeElement, 'mouseleave', () => this._stopInterval())]);
|
|
539
|
+
}
|
|
540
|
+
ngAfterViewInit() {
|
|
541
|
+
this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('before'), passiveEventListenerOptions), this._renderer.listen(this._nextPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('after'), passiveEventListenerOptions));
|
|
542
|
+
}
|
|
543
|
+
ngAfterContentInit() {
|
|
544
|
+
const dirChange = this._dir ? this._dir.change : of('ltr');
|
|
545
|
+
const resize = this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(debounceTime(32), takeUntil(this._destroyed));
|
|
546
|
+
const viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));
|
|
547
|
+
const realign = () => {
|
|
548
|
+
this.updatePagination();
|
|
549
|
+
this._alignInkBarToSelectedTab();
|
|
550
|
+
};
|
|
551
|
+
this._keyManager = new FocusKeyManager(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(() => false);
|
|
552
|
+
this._keyManager.updateActiveItem(Math.max(this._selectedIndex, 0));
|
|
553
|
+
afterNextRender(realign, {
|
|
554
|
+
injector: this._injector
|
|
555
|
+
});
|
|
556
|
+
merge(dirChange, viewportResize, resize, this._items.changes, this._itemsResized()).pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
557
|
+
this._ngZone.run(() => {
|
|
558
|
+
Promise.resolve().then(() => {
|
|
559
|
+
this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));
|
|
560
|
+
realign();
|
|
517
561
|
});
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;
|
|
738
|
-
labelBeforePos = labelAfterPos - offsetWidth;
|
|
739
|
-
}
|
|
740
|
-
const beforeVisiblePos = this.scrollDistance;
|
|
741
|
-
const afterVisiblePos = this.scrollDistance + viewLength;
|
|
742
|
-
if (labelBeforePos < beforeVisiblePos) {
|
|
743
|
-
// Scroll header to move label to the before direction
|
|
744
|
-
this.scrollDistance -= beforeVisiblePos - labelBeforePos;
|
|
745
|
-
}
|
|
746
|
-
else if (labelAfterPos > afterVisiblePos) {
|
|
747
|
-
// Scroll header to move label to the after direction
|
|
748
|
-
this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* Evaluate whether the pagination controls should be displayed. If the scroll width of the
|
|
753
|
-
* tab list is wider than the size of the header container, then the pagination controls should
|
|
754
|
-
* be shown.
|
|
755
|
-
*
|
|
756
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
757
|
-
* should be called sparingly.
|
|
758
|
-
*/
|
|
759
|
-
_checkPaginationEnabled() {
|
|
760
|
-
if (this.disablePagination) {
|
|
761
|
-
this._showPaginationControls = false;
|
|
762
|
-
}
|
|
763
|
-
else {
|
|
764
|
-
const scrollWidth = this._tabListInner.nativeElement.scrollWidth;
|
|
765
|
-
const containerWidth = this._elementRef.nativeElement.offsetWidth;
|
|
766
|
-
// Usually checking that the scroll width is greater than the container width should be
|
|
767
|
-
// enough, but on Safari at specific widths the browser ends up rounding up when there's
|
|
768
|
-
// no pagination and rounding down once the pagination is added. This can throw the component
|
|
769
|
-
// into an infinite loop where the pagination shows up and disappears constantly. We work
|
|
770
|
-
// around it by adding a threshold to the calculation. From manual testing the threshold
|
|
771
|
-
// can be lowered to 2px and still resolve the issue, but we set a higher one to be safe.
|
|
772
|
-
// This shouldn't cause any content to be clipped, because tabs have a 24px horizontal
|
|
773
|
-
// padding. See b/316395154 for more information.
|
|
774
|
-
const isEnabled = scrollWidth - containerWidth >= 5;
|
|
775
|
-
if (!isEnabled) {
|
|
776
|
-
this.scrollDistance = 0;
|
|
777
|
-
}
|
|
778
|
-
if (isEnabled !== this._showPaginationControls) {
|
|
779
|
-
this._showPaginationControls = isEnabled;
|
|
780
|
-
this._changeDetectorRef.markForCheck();
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
/**
|
|
785
|
-
* Evaluate whether the before and after controls should be enabled or disabled.
|
|
786
|
-
* If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
|
|
787
|
-
* before button. If the header is at the end of the list (scroll distance is equal to the
|
|
788
|
-
* maximum distance we can scroll), then disable the after button.
|
|
789
|
-
*
|
|
790
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
791
|
-
* should be called sparingly.
|
|
792
|
-
*/
|
|
793
|
-
_checkScrollingControls() {
|
|
794
|
-
if (this.disablePagination) {
|
|
795
|
-
this._disableScrollAfter = this._disableScrollBefore = true;
|
|
796
|
-
}
|
|
797
|
-
else {
|
|
798
|
-
// Check if the pagination arrows should be activated.
|
|
799
|
-
this._disableScrollBefore = this.scrollDistance == 0;
|
|
800
|
-
this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
|
|
801
|
-
this._changeDetectorRef.markForCheck();
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
|
|
806
|
-
* is equal to the difference in width between the tab list container and tab header container.
|
|
807
|
-
*
|
|
808
|
-
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
|
|
809
|
-
* should be called sparingly.
|
|
810
|
-
*/
|
|
811
|
-
_getMaxScrollDistance() {
|
|
812
|
-
const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;
|
|
813
|
-
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
814
|
-
return lengthOfTabList - viewLength || 0;
|
|
815
|
-
}
|
|
816
|
-
/** Tells the ink-bar to align itself to the current label wrapper */
|
|
817
|
-
_alignInkBarToSelectedTab() {
|
|
818
|
-
const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;
|
|
819
|
-
const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
820
|
-
if (selectedLabelWrapper) {
|
|
821
|
-
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
822
|
-
}
|
|
823
|
-
else {
|
|
824
|
-
this._inkBar.hide();
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
/** Stops the currently-running paginator interval. */
|
|
828
|
-
_stopInterval() {
|
|
829
|
-
this._stopScrolling.next();
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Handles the user pressing down on one of the paginators.
|
|
833
|
-
* Starts scrolling the header after a certain amount of time.
|
|
834
|
-
* @param direction In which direction the paginator should be scrolled.
|
|
835
|
-
*/
|
|
836
|
-
_handlePaginatorPress(direction, mouseEvent) {
|
|
837
|
-
// Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to
|
|
838
|
-
// null check the `button`, but we do it so we don't break tests that use fake events.
|
|
839
|
-
if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
|
|
840
|
-
return;
|
|
841
|
-
}
|
|
842
|
-
// Avoid overlapping timers.
|
|
562
|
+
});
|
|
563
|
+
this._keyManager?.withHorizontalOrientation(this._getLayoutDirection());
|
|
564
|
+
});
|
|
565
|
+
this._keyManager.change.subscribe(newFocusIndex => {
|
|
566
|
+
this.indexFocused.emit(newFocusIndex);
|
|
567
|
+
this._setTabFocus(newFocusIndex);
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
_itemsResized() {
|
|
571
|
+
if (typeof ResizeObserver !== 'function') {
|
|
572
|
+
return EMPTY;
|
|
573
|
+
}
|
|
574
|
+
return this._items.changes.pipe(startWith(this._items), switchMap(tabItems => new Observable(observer => this._ngZone.runOutsideAngular(() => {
|
|
575
|
+
const resizeObserver = new ResizeObserver(entries => observer.next(entries));
|
|
576
|
+
tabItems.forEach(item => resizeObserver.observe(item.elementRef.nativeElement));
|
|
577
|
+
return () => {
|
|
578
|
+
resizeObserver.disconnect();
|
|
579
|
+
};
|
|
580
|
+
}))), skip(1), filter(entries => entries.some(e => e.contentRect.width > 0 && e.contentRect.height > 0)));
|
|
581
|
+
}
|
|
582
|
+
ngAfterContentChecked() {
|
|
583
|
+
if (this._tabLabelCount != this._items.length) {
|
|
584
|
+
this.updatePagination();
|
|
585
|
+
this._tabLabelCount = this._items.length;
|
|
586
|
+
this._changeDetectorRef.markForCheck();
|
|
587
|
+
}
|
|
588
|
+
if (this._selectedIndexChanged) {
|
|
589
|
+
this._scrollToLabel(this._selectedIndex);
|
|
590
|
+
this._checkScrollingControls();
|
|
591
|
+
this._alignInkBarToSelectedTab();
|
|
592
|
+
this._selectedIndexChanged = false;
|
|
593
|
+
this._changeDetectorRef.markForCheck();
|
|
594
|
+
}
|
|
595
|
+
if (this._scrollDistanceChanged) {
|
|
596
|
+
this._updateTabScrollPosition();
|
|
597
|
+
this._scrollDistanceChanged = false;
|
|
598
|
+
this._changeDetectorRef.markForCheck();
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
ngOnDestroy() {
|
|
602
|
+
this._eventCleanups.forEach(cleanup => cleanup());
|
|
603
|
+
this._keyManager?.destroy();
|
|
604
|
+
this._destroyed.next();
|
|
605
|
+
this._destroyed.complete();
|
|
606
|
+
this._stopScrolling.complete();
|
|
607
|
+
}
|
|
608
|
+
_handleKeydown(event) {
|
|
609
|
+
if (hasModifierKey(event)) {
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
switch (event.keyCode) {
|
|
613
|
+
case ENTER:
|
|
614
|
+
case SPACE:
|
|
615
|
+
if (this.focusIndex !== this.selectedIndex) {
|
|
616
|
+
const item = this._items.get(this.focusIndex);
|
|
617
|
+
if (item && !item.disabled) {
|
|
618
|
+
this.selectFocusedIndex.emit(this.focusIndex);
|
|
619
|
+
this._itemSelected(event);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
break;
|
|
623
|
+
default:
|
|
624
|
+
this._keyManager?.onKeydown(event);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
_onContentChanges() {
|
|
628
|
+
const textContent = this._elementRef.nativeElement.textContent;
|
|
629
|
+
if (textContent !== this._currentTextContent) {
|
|
630
|
+
this._currentTextContent = textContent || '';
|
|
631
|
+
this._ngZone.run(() => {
|
|
632
|
+
this.updatePagination();
|
|
633
|
+
this._alignInkBarToSelectedTab();
|
|
634
|
+
this._changeDetectorRef.markForCheck();
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
updatePagination() {
|
|
639
|
+
this._checkPaginationEnabled();
|
|
640
|
+
this._checkScrollingControls();
|
|
641
|
+
this._updateTabScrollPosition();
|
|
642
|
+
}
|
|
643
|
+
get focusIndex() {
|
|
644
|
+
return this._keyManager ? this._keyManager.activeItemIndex : 0;
|
|
645
|
+
}
|
|
646
|
+
set focusIndex(value) {
|
|
647
|
+
if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
this._keyManager.setActiveItem(value);
|
|
651
|
+
}
|
|
652
|
+
_isValidIndex(index) {
|
|
653
|
+
return this._items ? !!this._items.toArray()[index] : true;
|
|
654
|
+
}
|
|
655
|
+
_setTabFocus(tabIndex) {
|
|
656
|
+
if (this._showPaginationControls) {
|
|
657
|
+
this._scrollToLabel(tabIndex);
|
|
658
|
+
}
|
|
659
|
+
if (this._items && this._items.length) {
|
|
660
|
+
this._items.toArray()[tabIndex].focus();
|
|
661
|
+
const containerEl = this._tabListContainer.nativeElement;
|
|
662
|
+
const dir = this._getLayoutDirection();
|
|
663
|
+
if (dir == 'ltr') {
|
|
664
|
+
containerEl.scrollLeft = 0;
|
|
665
|
+
} else {
|
|
666
|
+
containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
_getLayoutDirection() {
|
|
671
|
+
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
672
|
+
}
|
|
673
|
+
_updateTabScrollPosition() {
|
|
674
|
+
if (this.disablePagination) {
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
const scrollDistance = this.scrollDistance;
|
|
678
|
+
const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
|
|
679
|
+
this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
|
|
680
|
+
if (this._platform.TRIDENT || this._platform.EDGE) {
|
|
681
|
+
this._tabListContainer.nativeElement.scrollLeft = 0;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
get scrollDistance() {
|
|
685
|
+
return this._scrollDistance;
|
|
686
|
+
}
|
|
687
|
+
set scrollDistance(value) {
|
|
688
|
+
this._scrollTo(value);
|
|
689
|
+
}
|
|
690
|
+
_scrollHeader(direction) {
|
|
691
|
+
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
692
|
+
const scrollAmount = (direction == 'before' ? -1 : 1) * viewLength / 3;
|
|
693
|
+
return this._scrollTo(this._scrollDistance + scrollAmount);
|
|
694
|
+
}
|
|
695
|
+
_handlePaginatorClick(direction) {
|
|
696
|
+
this._stopInterval();
|
|
697
|
+
this._scrollHeader(direction);
|
|
698
|
+
}
|
|
699
|
+
_scrollToLabel(labelIndex) {
|
|
700
|
+
if (this.disablePagination) {
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
|
|
704
|
+
if (!selectedLabel) {
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
708
|
+
const {
|
|
709
|
+
offsetLeft,
|
|
710
|
+
offsetWidth
|
|
711
|
+
} = selectedLabel.elementRef.nativeElement;
|
|
712
|
+
let labelBeforePos, labelAfterPos;
|
|
713
|
+
if (this._getLayoutDirection() == 'ltr') {
|
|
714
|
+
labelBeforePos = offsetLeft;
|
|
715
|
+
labelAfterPos = labelBeforePos + offsetWidth;
|
|
716
|
+
} else {
|
|
717
|
+
labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;
|
|
718
|
+
labelBeforePos = labelAfterPos - offsetWidth;
|
|
719
|
+
}
|
|
720
|
+
const beforeVisiblePos = this.scrollDistance;
|
|
721
|
+
const afterVisiblePos = this.scrollDistance + viewLength;
|
|
722
|
+
if (labelBeforePos < beforeVisiblePos) {
|
|
723
|
+
this.scrollDistance -= beforeVisiblePos - labelBeforePos;
|
|
724
|
+
} else if (labelAfterPos > afterVisiblePos) {
|
|
725
|
+
this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
_checkPaginationEnabled() {
|
|
729
|
+
if (this.disablePagination) {
|
|
730
|
+
this._showPaginationControls = false;
|
|
731
|
+
} else {
|
|
732
|
+
const scrollWidth = this._tabListInner.nativeElement.scrollWidth;
|
|
733
|
+
const containerWidth = this._elementRef.nativeElement.offsetWidth;
|
|
734
|
+
const isEnabled = scrollWidth - containerWidth >= 5;
|
|
735
|
+
if (!isEnabled) {
|
|
736
|
+
this.scrollDistance = 0;
|
|
737
|
+
}
|
|
738
|
+
if (isEnabled !== this._showPaginationControls) {
|
|
739
|
+
this._showPaginationControls = isEnabled;
|
|
740
|
+
this._changeDetectorRef.markForCheck();
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
_checkScrollingControls() {
|
|
745
|
+
if (this.disablePagination) {
|
|
746
|
+
this._disableScrollAfter = this._disableScrollBefore = true;
|
|
747
|
+
} else {
|
|
748
|
+
this._disableScrollBefore = this.scrollDistance == 0;
|
|
749
|
+
this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
|
|
750
|
+
this._changeDetectorRef.markForCheck();
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
_getMaxScrollDistance() {
|
|
754
|
+
const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;
|
|
755
|
+
const viewLength = this._tabListContainer.nativeElement.offsetWidth;
|
|
756
|
+
return lengthOfTabList - viewLength || 0;
|
|
757
|
+
}
|
|
758
|
+
_alignInkBarToSelectedTab() {
|
|
759
|
+
const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;
|
|
760
|
+
const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
|
|
761
|
+
if (selectedLabelWrapper) {
|
|
762
|
+
this._inkBar.alignToElement(selectedLabelWrapper);
|
|
763
|
+
} else {
|
|
764
|
+
this._inkBar.hide();
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
_stopInterval() {
|
|
768
|
+
this._stopScrolling.next();
|
|
769
|
+
}
|
|
770
|
+
_handlePaginatorPress(direction, mouseEvent) {
|
|
771
|
+
if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
this._stopInterval();
|
|
775
|
+
timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL).pipe(takeUntil(merge(this._stopScrolling, this._destroyed))).subscribe(() => {
|
|
776
|
+
const {
|
|
777
|
+
maxScrollDistance,
|
|
778
|
+
distance
|
|
779
|
+
} = this._scrollHeader(direction);
|
|
780
|
+
if (distance === 0 || distance >= maxScrollDistance) {
|
|
843
781
|
this._stopInterval();
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
_scrollTo(position) {
|
|
786
|
+
if (this.disablePagination) {
|
|
787
|
+
return {
|
|
788
|
+
maxScrollDistance: 0,
|
|
789
|
+
distance: 0
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
const maxScrollDistance = this._getMaxScrollDistance();
|
|
793
|
+
this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
|
|
794
|
+
this._scrollDistanceChanged = true;
|
|
795
|
+
this._checkScrollingControls();
|
|
796
|
+
return {
|
|
797
|
+
maxScrollDistance,
|
|
798
|
+
distance: this._scrollDistance
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
802
|
+
minVersion: "12.0.0",
|
|
803
|
+
version: "20.2.0-next.2",
|
|
804
|
+
ngImport: i0,
|
|
805
|
+
type: MatPaginatedTabHeader,
|
|
806
|
+
deps: [],
|
|
807
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
808
|
+
});
|
|
809
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
810
|
+
minVersion: "16.1.0",
|
|
811
|
+
version: "20.2.0-next.2",
|
|
812
|
+
type: MatPaginatedTabHeader,
|
|
813
|
+
isStandalone: true,
|
|
814
|
+
inputs: {
|
|
815
|
+
disablePagination: ["disablePagination", "disablePagination", booleanAttribute],
|
|
816
|
+
selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute]
|
|
817
|
+
},
|
|
818
|
+
outputs: {
|
|
819
|
+
selectFocusedIndex: "selectFocusedIndex",
|
|
820
|
+
indexFocused: "indexFocused"
|
|
821
|
+
},
|
|
822
|
+
ngImport: i0
|
|
823
|
+
});
|
|
875
824
|
}
|
|
876
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
826
|
+
minVersion: "12.0.0",
|
|
827
|
+
version: "20.2.0-next.2",
|
|
828
|
+
ngImport: i0,
|
|
829
|
+
type: MatPaginatedTabHeader,
|
|
830
|
+
decorators: [{
|
|
831
|
+
type: Directive
|
|
832
|
+
}],
|
|
833
|
+
ctorParameters: () => [],
|
|
834
|
+
propDecorators: {
|
|
835
|
+
disablePagination: [{
|
|
836
|
+
type: Input,
|
|
837
|
+
args: [{
|
|
838
|
+
transform: booleanAttribute
|
|
839
|
+
}]
|
|
840
|
+
}],
|
|
841
|
+
selectedIndex: [{
|
|
842
|
+
type: Input,
|
|
843
|
+
args: [{
|
|
844
|
+
transform: numberAttribute
|
|
845
|
+
}]
|
|
846
|
+
}],
|
|
847
|
+
selectFocusedIndex: [{
|
|
848
|
+
type: Output
|
|
849
|
+
}],
|
|
850
|
+
indexFocused: [{
|
|
851
|
+
type: Output
|
|
852
|
+
}]
|
|
853
|
+
}
|
|
854
|
+
});
|
|
889
855
|
|
|
890
|
-
/**
|
|
891
|
-
* The header of the tab group which displays a list of all the tabs in the tab group. Includes
|
|
892
|
-
* an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
|
|
893
|
-
* width of the header container, then arrows will be displayed to allow the user to scroll
|
|
894
|
-
* left and right across the header.
|
|
895
|
-
* @docs-private
|
|
896
|
-
*/
|
|
897
856
|
class MatTabHeader extends MatPaginatedTabHeader {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
857
|
+
_items;
|
|
858
|
+
_tabListContainer;
|
|
859
|
+
_tabList;
|
|
860
|
+
_tabListInner;
|
|
861
|
+
_nextPaginator;
|
|
862
|
+
_previousPaginator;
|
|
863
|
+
_inkBar;
|
|
864
|
+
ariaLabel;
|
|
865
|
+
ariaLabelledby;
|
|
866
|
+
disableRipple = false;
|
|
867
|
+
ngAfterContentInit() {
|
|
868
|
+
this._inkBar = new MatInkBar(this._items);
|
|
869
|
+
super.ngAfterContentInit();
|
|
870
|
+
}
|
|
871
|
+
_itemSelected(event) {
|
|
872
|
+
event.preventDefault();
|
|
873
|
+
}
|
|
874
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
875
|
+
minVersion: "12.0.0",
|
|
876
|
+
version: "20.2.0-next.2",
|
|
877
|
+
ngImport: i0,
|
|
878
|
+
type: MatTabHeader,
|
|
879
|
+
deps: null,
|
|
880
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
881
|
+
});
|
|
882
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
883
|
+
minVersion: "16.1.0",
|
|
884
|
+
version: "20.2.0-next.2",
|
|
885
|
+
type: MatTabHeader,
|
|
886
|
+
isStandalone: true,
|
|
887
|
+
selector: "mat-tab-header",
|
|
888
|
+
inputs: {
|
|
889
|
+
ariaLabel: ["aria-label", "ariaLabel"],
|
|
890
|
+
ariaLabelledby: ["aria-labelledby", "ariaLabelledby"],
|
|
891
|
+
disableRipple: ["disableRipple", "disableRipple", booleanAttribute]
|
|
892
|
+
},
|
|
893
|
+
host: {
|
|
894
|
+
properties: {
|
|
895
|
+
"class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls",
|
|
896
|
+
"class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'"
|
|
897
|
+
},
|
|
898
|
+
classAttribute: "mat-mdc-tab-header"
|
|
899
|
+
},
|
|
900
|
+
queries: [{
|
|
901
|
+
propertyName: "_items",
|
|
902
|
+
predicate: MatTabLabelWrapper
|
|
903
|
+
}],
|
|
904
|
+
viewQueries: [{
|
|
905
|
+
propertyName: "_tabListContainer",
|
|
906
|
+
first: true,
|
|
907
|
+
predicate: ["tabListContainer"],
|
|
908
|
+
descendants: true,
|
|
909
|
+
static: true
|
|
910
|
+
}, {
|
|
911
|
+
propertyName: "_tabList",
|
|
912
|
+
first: true,
|
|
913
|
+
predicate: ["tabList"],
|
|
914
|
+
descendants: true,
|
|
915
|
+
static: true
|
|
916
|
+
}, {
|
|
917
|
+
propertyName: "_tabListInner",
|
|
918
|
+
first: true,
|
|
919
|
+
predicate: ["tabListInner"],
|
|
920
|
+
descendants: true,
|
|
921
|
+
static: true
|
|
922
|
+
}, {
|
|
923
|
+
propertyName: "_nextPaginator",
|
|
924
|
+
first: true,
|
|
925
|
+
predicate: ["nextPaginator"],
|
|
926
|
+
descendants: true
|
|
927
|
+
}, {
|
|
928
|
+
propertyName: "_previousPaginator",
|
|
929
|
+
first: true,
|
|
930
|
+
predicate: ["previousPaginator"],
|
|
931
|
+
descendants: true
|
|
932
|
+
}],
|
|
933
|
+
usesInheritance: true,
|
|
934
|
+
ngImport: i0,
|
|
935
|
+
template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div\n class=\"mat-mdc-tab-label-container\"\n #tabListContainer\n (keydown)=\"_handleKeydown($event)\"\n [class._mat-animation-noopable]=\"_animationsDisabled\">\n <div\n #tabList\n class=\"mat-mdc-tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-labels\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
|
|
936
|
+
styles: [".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}\n"],
|
|
937
|
+
dependencies: [{
|
|
938
|
+
kind: "directive",
|
|
939
|
+
type: MatRipple,
|
|
940
|
+
selector: "[mat-ripple], [matRipple]",
|
|
941
|
+
inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
|
|
942
|
+
exportAs: ["matRipple"]
|
|
943
|
+
}, {
|
|
944
|
+
kind: "directive",
|
|
945
|
+
type: CdkObserveContent,
|
|
946
|
+
selector: "[cdkObserveContent]",
|
|
947
|
+
inputs: ["cdkObserveContentDisabled", "debounce"],
|
|
948
|
+
outputs: ["cdkObserveContent"],
|
|
949
|
+
exportAs: ["cdkObserveContent"]
|
|
950
|
+
}],
|
|
951
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
952
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
953
|
+
});
|
|
920
954
|
}
|
|
921
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
956
|
+
minVersion: "12.0.0",
|
|
957
|
+
version: "20.2.0-next.2",
|
|
958
|
+
ngImport: i0,
|
|
959
|
+
type: MatTabHeader,
|
|
960
|
+
decorators: [{
|
|
961
|
+
type: Component,
|
|
962
|
+
args: [{
|
|
963
|
+
selector: 'mat-tab-header',
|
|
964
|
+
encapsulation: ViewEncapsulation.None,
|
|
965
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
966
|
+
host: {
|
|
967
|
+
'class': 'mat-mdc-tab-header',
|
|
968
|
+
'[class.mat-mdc-tab-header-pagination-controls-enabled]': '_showPaginationControls',
|
|
969
|
+
'[class.mat-mdc-tab-header-rtl]': "_getLayoutDirection() == 'rtl'"
|
|
970
|
+
},
|
|
971
|
+
imports: [MatRipple, CdkObserveContent],
|
|
972
|
+
template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div\n class=\"mat-mdc-tab-label-container\"\n #tabListContainer\n (keydown)=\"_handleKeydown($event)\"\n [class._mat-animation-noopable]=\"_animationsDisabled\">\n <div\n #tabList\n class=\"mat-mdc-tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-labels\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
|
|
973
|
+
styles: [".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}\n"]
|
|
974
|
+
}]
|
|
975
|
+
}],
|
|
976
|
+
propDecorators: {
|
|
977
|
+
_items: [{
|
|
978
|
+
type: ContentChildren,
|
|
979
|
+
args: [MatTabLabelWrapper, {
|
|
980
|
+
descendants: false
|
|
981
|
+
}]
|
|
982
|
+
}],
|
|
983
|
+
_tabListContainer: [{
|
|
984
|
+
type: ViewChild,
|
|
985
|
+
args: ['tabListContainer', {
|
|
986
|
+
static: true
|
|
987
|
+
}]
|
|
988
|
+
}],
|
|
989
|
+
_tabList: [{
|
|
990
|
+
type: ViewChild,
|
|
991
|
+
args: ['tabList', {
|
|
992
|
+
static: true
|
|
993
|
+
}]
|
|
994
|
+
}],
|
|
995
|
+
_tabListInner: [{
|
|
996
|
+
type: ViewChild,
|
|
997
|
+
args: ['tabListInner', {
|
|
998
|
+
static: true
|
|
999
|
+
}]
|
|
1000
|
+
}],
|
|
1001
|
+
_nextPaginator: [{
|
|
1002
|
+
type: ViewChild,
|
|
1003
|
+
args: ['nextPaginator']
|
|
1004
|
+
}],
|
|
1005
|
+
_previousPaginator: [{
|
|
1006
|
+
type: ViewChild,
|
|
1007
|
+
args: ['previousPaginator']
|
|
1008
|
+
}],
|
|
1009
|
+
ariaLabel: [{
|
|
1010
|
+
type: Input,
|
|
1011
|
+
args: ['aria-label']
|
|
1012
|
+
}],
|
|
1013
|
+
ariaLabelledby: [{
|
|
1014
|
+
type: Input,
|
|
1015
|
+
args: ['aria-labelledby']
|
|
1016
|
+
}],
|
|
1017
|
+
disableRipple: [{
|
|
1018
|
+
type: Input,
|
|
1019
|
+
args: [{
|
|
1020
|
+
transform: booleanAttribute
|
|
1021
|
+
}]
|
|
1022
|
+
}]
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
956
1025
|
|
|
957
|
-
/** Injection token that can be used to provide the default options the tabs module. */
|
|
958
1026
|
const MAT_TABS_CONFIG = new InjectionToken('MAT_TABS_CONFIG');
|
|
959
1027
|
|
|
960
|
-
/**
|
|
961
|
-
* The portal host directive for the contents of the tab.
|
|
962
|
-
* @docs-private
|
|
963
|
-
*/
|
|
964
1028
|
class MatTabBodyPortal extends CdkPortalOutlet {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
.subscribe((isCentering) => {
|
|
980
|
-
if (this._host._content && isCentering && !this.hasAttached()) {
|
|
981
|
-
// Attach in the zone since the events from the tab body may be happening outside.
|
|
982
|
-
// See: https://github.com/angular/components/issues/31867
|
|
983
|
-
this._ngZone.run(() => {
|
|
984
|
-
// `Promise.resolve` is necessary to destabilize the zone.
|
|
985
|
-
// Otherwise some apps throw a `ApplicationRef.tick is called recursively` error.
|
|
986
|
-
Promise.resolve().then();
|
|
987
|
-
this.attach(this._host._content);
|
|
988
|
-
});
|
|
989
|
-
}
|
|
990
|
-
});
|
|
991
|
-
this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {
|
|
992
|
-
if (!this._host.preserveContent) {
|
|
993
|
-
this._ngZone.run(() => this.detach());
|
|
994
|
-
}
|
|
1029
|
+
_host = inject(MatTabBody);
|
|
1030
|
+
_ngZone = inject(NgZone);
|
|
1031
|
+
_centeringSub = Subscription.EMPTY;
|
|
1032
|
+
_leavingSub = Subscription.EMPTY;
|
|
1033
|
+
constructor() {
|
|
1034
|
+
super();
|
|
1035
|
+
}
|
|
1036
|
+
ngOnInit() {
|
|
1037
|
+
super.ngOnInit();
|
|
1038
|
+
this._centeringSub = this._host._beforeCentering.pipe(startWith(this._host._isCenterPosition())).subscribe(isCentering => {
|
|
1039
|
+
if (this._host._content && isCentering && !this.hasAttached()) {
|
|
1040
|
+
this._ngZone.run(() => {
|
|
1041
|
+
Promise.resolve().then();
|
|
1042
|
+
this.attach(this._host._content);
|
|
995
1043
|
});
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
this.
|
|
1001
|
-
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
|
|
1044
|
+
}
|
|
1045
|
+
});
|
|
1046
|
+
this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {
|
|
1047
|
+
if (!this._host.preserveContent) {
|
|
1048
|
+
this._ngZone.run(() => this.detach());
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
ngOnDestroy() {
|
|
1053
|
+
super.ngOnDestroy();
|
|
1054
|
+
this._centeringSub.unsubscribe();
|
|
1055
|
+
this._leavingSub.unsubscribe();
|
|
1056
|
+
}
|
|
1057
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1058
|
+
minVersion: "12.0.0",
|
|
1059
|
+
version: "20.2.0-next.2",
|
|
1060
|
+
ngImport: i0,
|
|
1061
|
+
type: MatTabBodyPortal,
|
|
1062
|
+
deps: [],
|
|
1063
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1064
|
+
});
|
|
1065
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1066
|
+
minVersion: "14.0.0",
|
|
1067
|
+
version: "20.2.0-next.2",
|
|
1068
|
+
type: MatTabBodyPortal,
|
|
1069
|
+
isStandalone: true,
|
|
1070
|
+
selector: "[matTabBodyHost]",
|
|
1071
|
+
usesInheritance: true,
|
|
1072
|
+
ngImport: i0
|
|
1073
|
+
});
|
|
1005
1074
|
}
|
|
1006
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1075
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1076
|
+
minVersion: "12.0.0",
|
|
1077
|
+
version: "20.2.0-next.2",
|
|
1078
|
+
ngImport: i0,
|
|
1079
|
+
type: MatTabBodyPortal,
|
|
1080
|
+
decorators: [{
|
|
1081
|
+
type: Directive,
|
|
1082
|
+
args: [{
|
|
1083
|
+
selector: '[matTabBodyHost]'
|
|
1084
|
+
}]
|
|
1085
|
+
}],
|
|
1086
|
+
ctorParameters: () => []
|
|
1087
|
+
});
|
|
1014
1088
|
class MatTabBody {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
this.
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1089
|
+
_elementRef = inject(ElementRef);
|
|
1090
|
+
_dir = inject(Directionality, {
|
|
1091
|
+
optional: true
|
|
1092
|
+
});
|
|
1093
|
+
_ngZone = inject(NgZone);
|
|
1094
|
+
_injector = inject(Injector);
|
|
1095
|
+
_renderer = inject(Renderer2);
|
|
1096
|
+
_diAnimationsDisabled = _animationsDisabled();
|
|
1097
|
+
_eventCleanups;
|
|
1098
|
+
_initialized;
|
|
1099
|
+
_fallbackTimer;
|
|
1100
|
+
_positionIndex;
|
|
1101
|
+
_dirChangeSubscription = Subscription.EMPTY;
|
|
1102
|
+
_position;
|
|
1103
|
+
_previousPosition;
|
|
1104
|
+
_onCentering = new EventEmitter();
|
|
1105
|
+
_beforeCentering = new EventEmitter();
|
|
1106
|
+
_afterLeavingCenter = new EventEmitter();
|
|
1107
|
+
_onCentered = new EventEmitter(true);
|
|
1108
|
+
_portalHost;
|
|
1109
|
+
_contentElement;
|
|
1110
|
+
_content;
|
|
1111
|
+
animationDuration = '500ms';
|
|
1112
|
+
preserveContent = false;
|
|
1113
|
+
set position(position) {
|
|
1114
|
+
this._positionIndex = position;
|
|
1115
|
+
this._computePositionAnimationState();
|
|
1116
|
+
}
|
|
1117
|
+
constructor() {
|
|
1118
|
+
if (this._dir) {
|
|
1119
|
+
const changeDetectorRef = inject(ChangeDetectorRef);
|
|
1120
|
+
this._dirChangeSubscription = this._dir.change.subscribe(dir => {
|
|
1121
|
+
this._computePositionAnimationState(dir);
|
|
1122
|
+
changeDetectorRef.markForCheck();
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
ngOnInit() {
|
|
1127
|
+
this._bindTransitionEvents();
|
|
1128
|
+
if (this._position === 'center') {
|
|
1129
|
+
this._setActiveClass(true);
|
|
1130
|
+
afterNextRender(() => this._onCentering.emit(this._elementRef.nativeElement.clientHeight), {
|
|
1131
|
+
injector: this._injector
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
this._initialized = true;
|
|
1135
|
+
}
|
|
1136
|
+
ngOnDestroy() {
|
|
1137
|
+
clearTimeout(this._fallbackTimer);
|
|
1138
|
+
this._eventCleanups?.forEach(cleanup => cleanup());
|
|
1139
|
+
this._dirChangeSubscription.unsubscribe();
|
|
1140
|
+
}
|
|
1141
|
+
_bindTransitionEvents() {
|
|
1142
|
+
this._ngZone.runOutsideAngular(() => {
|
|
1143
|
+
const element = this._elementRef.nativeElement;
|
|
1144
|
+
const transitionDone = event => {
|
|
1145
|
+
if (event.target === this._contentElement?.nativeElement) {
|
|
1146
|
+
this._elementRef.nativeElement.classList.remove('mat-tab-body-animating');
|
|
1147
|
+
if (event.type === 'transitionend') {
|
|
1148
|
+
this._transitionDone();
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1152
|
+
this._eventCleanups = [this._renderer.listen(element, 'transitionstart', event => {
|
|
1153
|
+
if (event.target === this._contentElement?.nativeElement) {
|
|
1154
|
+
this._elementRef.nativeElement.classList.add('mat-tab-body-animating');
|
|
1155
|
+
this._transitionStarted();
|
|
1156
|
+
}
|
|
1157
|
+
}), this._renderer.listen(element, 'transitionend', transitionDone), this._renderer.listen(element, 'transitioncancel', transitionDone)];
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
_transitionStarted() {
|
|
1161
|
+
clearTimeout(this._fallbackTimer);
|
|
1162
|
+
const isCentering = this._position === 'center';
|
|
1163
|
+
this._beforeCentering.emit(isCentering);
|
|
1164
|
+
if (isCentering) {
|
|
1165
|
+
this._onCentering.emit(this._elementRef.nativeElement.clientHeight);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
_transitionDone() {
|
|
1169
|
+
if (this._position === 'center') {
|
|
1170
|
+
this._onCentered.emit();
|
|
1171
|
+
} else if (this._previousPosition === 'center') {
|
|
1172
|
+
this._afterLeavingCenter.emit();
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
_setActiveClass(isActive) {
|
|
1176
|
+
this._elementRef.nativeElement.classList.toggle('mat-mdc-tab-body-active', isActive);
|
|
1177
|
+
}
|
|
1178
|
+
_getLayoutDirection() {
|
|
1179
|
+
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
1180
|
+
}
|
|
1181
|
+
_isCenterPosition() {
|
|
1182
|
+
return this._positionIndex === 0;
|
|
1183
|
+
}
|
|
1184
|
+
_computePositionAnimationState(dir = this._getLayoutDirection()) {
|
|
1185
|
+
this._previousPosition = this._position;
|
|
1186
|
+
if (this._positionIndex < 0) {
|
|
1187
|
+
this._position = dir == 'ltr' ? 'left' : 'right';
|
|
1188
|
+
} else if (this._positionIndex > 0) {
|
|
1189
|
+
this._position = dir == 'ltr' ? 'right' : 'left';
|
|
1190
|
+
} else {
|
|
1191
|
+
this._position = 'center';
|
|
1192
|
+
}
|
|
1193
|
+
if (this._animationsDisabled()) {
|
|
1194
|
+
this._simulateTransitionEvents();
|
|
1195
|
+
} else if (this._initialized && (this._position === 'center' || this._previousPosition === 'center')) {
|
|
1196
|
+
clearTimeout(this._fallbackTimer);
|
|
1197
|
+
this._fallbackTimer = this._ngZone.runOutsideAngular(() => setTimeout(() => this._simulateTransitionEvents(), 100));
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
_simulateTransitionEvents() {
|
|
1201
|
+
this._transitionStarted();
|
|
1202
|
+
afterNextRender(() => this._transitionDone(), {
|
|
1203
|
+
injector: this._injector
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
_animationsDisabled() {
|
|
1207
|
+
return this._diAnimationsDisabled || this.animationDuration === '0ms' || this.animationDuration === '0s';
|
|
1208
|
+
}
|
|
1209
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1210
|
+
minVersion: "12.0.0",
|
|
1211
|
+
version: "20.2.0-next.2",
|
|
1212
|
+
ngImport: i0,
|
|
1213
|
+
type: MatTabBody,
|
|
1214
|
+
deps: [],
|
|
1215
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1216
|
+
});
|
|
1217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1218
|
+
minVersion: "14.0.0",
|
|
1219
|
+
version: "20.2.0-next.2",
|
|
1220
|
+
type: MatTabBody,
|
|
1221
|
+
isStandalone: true,
|
|
1222
|
+
selector: "mat-tab-body",
|
|
1223
|
+
inputs: {
|
|
1224
|
+
_content: ["content", "_content"],
|
|
1225
|
+
animationDuration: "animationDuration",
|
|
1226
|
+
preserveContent: "preserveContent",
|
|
1227
|
+
position: "position"
|
|
1228
|
+
},
|
|
1229
|
+
outputs: {
|
|
1230
|
+
_onCentering: "_onCentering",
|
|
1231
|
+
_beforeCentering: "_beforeCentering",
|
|
1232
|
+
_onCentered: "_onCentered"
|
|
1233
|
+
},
|
|
1234
|
+
host: {
|
|
1235
|
+
properties: {
|
|
1236
|
+
"attr.inert": "_position === \"center\" ? null : \"\""
|
|
1237
|
+
},
|
|
1238
|
+
classAttribute: "mat-mdc-tab-body"
|
|
1239
|
+
},
|
|
1240
|
+
viewQueries: [{
|
|
1241
|
+
propertyName: "_portalHost",
|
|
1242
|
+
first: true,
|
|
1243
|
+
predicate: MatTabBodyPortal,
|
|
1244
|
+
descendants: true
|
|
1245
|
+
}, {
|
|
1246
|
+
propertyName: "_contentElement",
|
|
1247
|
+
first: true,
|
|
1248
|
+
predicate: ["content"],
|
|
1249
|
+
descendants: true
|
|
1250
|
+
}],
|
|
1251
|
+
ngImport: i0,
|
|
1252
|
+
template: "<div\n class=\"mat-mdc-tab-body-content\"\n #content\n cdkScrollable\n [class.mat-tab-body-content-left]=\"_position === 'left'\"\n [class.mat-tab-body-content-right]=\"_position === 'right'\"\n [class.mat-tab-body-content-can-animate]=\"_position === 'center' || _previousPosition === 'center'\">\n <ng-template matTabBodyHost></ng-template>\n</div>\n",
|
|
1253
|
+
styles: [".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}\n"],
|
|
1254
|
+
dependencies: [{
|
|
1255
|
+
kind: "directive",
|
|
1256
|
+
type: MatTabBodyPortal,
|
|
1257
|
+
selector: "[matTabBodyHost]"
|
|
1258
|
+
}, {
|
|
1259
|
+
kind: "directive",
|
|
1260
|
+
type: CdkScrollable,
|
|
1261
|
+
selector: "[cdk-scrollable], [cdkScrollable]"
|
|
1262
|
+
}],
|
|
1263
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
1264
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1265
|
+
});
|
|
1175
1266
|
}
|
|
1176
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1267
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1268
|
+
minVersion: "12.0.0",
|
|
1269
|
+
version: "20.2.0-next.2",
|
|
1270
|
+
ngImport: i0,
|
|
1271
|
+
type: MatTabBody,
|
|
1272
|
+
decorators: [{
|
|
1273
|
+
type: Component,
|
|
1274
|
+
args: [{
|
|
1275
|
+
selector: 'mat-tab-body',
|
|
1276
|
+
encapsulation: ViewEncapsulation.None,
|
|
1277
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
1278
|
+
host: {
|
|
1279
|
+
'class': 'mat-mdc-tab-body',
|
|
1280
|
+
'[attr.inert]': '_position === "center" ? null : ""'
|
|
1281
|
+
},
|
|
1282
|
+
imports: [MatTabBodyPortal, CdkScrollable],
|
|
1283
|
+
template: "<div\n class=\"mat-mdc-tab-body-content\"\n #content\n cdkScrollable\n [class.mat-tab-body-content-left]=\"_position === 'left'\"\n [class.mat-tab-body-content-right]=\"_position === 'right'\"\n [class.mat-tab-body-content-can-animate]=\"_position === 'center' || _previousPosition === 'center'\">\n <ng-template matTabBodyHost></ng-template>\n</div>\n",
|
|
1284
|
+
styles: [".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}\n"]
|
|
1285
|
+
}]
|
|
1286
|
+
}],
|
|
1287
|
+
ctorParameters: () => [],
|
|
1288
|
+
propDecorators: {
|
|
1289
|
+
_onCentering: [{
|
|
1290
|
+
type: Output
|
|
1291
|
+
}],
|
|
1292
|
+
_beforeCentering: [{
|
|
1293
|
+
type: Output
|
|
1294
|
+
}],
|
|
1295
|
+
_onCentered: [{
|
|
1296
|
+
type: Output
|
|
1297
|
+
}],
|
|
1298
|
+
_portalHost: [{
|
|
1299
|
+
type: ViewChild,
|
|
1300
|
+
args: [MatTabBodyPortal]
|
|
1301
|
+
}],
|
|
1302
|
+
_contentElement: [{
|
|
1303
|
+
type: ViewChild,
|
|
1304
|
+
args: ['content']
|
|
1305
|
+
}],
|
|
1306
|
+
_content: [{
|
|
1307
|
+
type: Input,
|
|
1308
|
+
args: ['content']
|
|
1309
|
+
}],
|
|
1310
|
+
animationDuration: [{
|
|
1311
|
+
type: Input
|
|
1312
|
+
}],
|
|
1313
|
+
preserveContent: [{
|
|
1314
|
+
type: Input
|
|
1315
|
+
}],
|
|
1316
|
+
position: [{
|
|
1317
|
+
type: Input
|
|
1318
|
+
}]
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1208
1321
|
|
|
1209
|
-
/**
|
|
1210
|
-
* Material design tab-group component. Supports basic tab pairs (label + content) and includes
|
|
1211
|
-
* animated ink-bar, keyboard navigation, and screen reader.
|
|
1212
|
-
* See: https://material.io/design/components/tabs.html
|
|
1213
|
-
*/
|
|
1214
1322
|
class MatTabGroup {
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
* For information on applying color variants in M3, see
|
|
1311
|
-
* https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
|
|
1312
|
-
*
|
|
1313
|
-
* @deprecated The background color should be customized through Sass theming APIs.
|
|
1314
|
-
* @breaking-change 20.0.0 Remove this input
|
|
1315
|
-
*/
|
|
1316
|
-
get backgroundColor() {
|
|
1317
|
-
return this._backgroundColor;
|
|
1318
|
-
}
|
|
1319
|
-
set backgroundColor(value) {
|
|
1320
|
-
const classList = this._elementRef.nativeElement.classList;
|
|
1321
|
-
classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
|
|
1322
|
-
if (value) {
|
|
1323
|
-
classList.add('mat-tabs-with-background', `mat-background-${value}`);
|
|
1324
|
-
}
|
|
1325
|
-
this._backgroundColor = value;
|
|
1326
|
-
}
|
|
1327
|
-
_backgroundColor;
|
|
1328
|
-
/** Aria label of the inner `tablist` of the group. */
|
|
1329
|
-
ariaLabel;
|
|
1330
|
-
/** Sets the `aria-labelledby` of the inner `tablist` of the group. */
|
|
1331
|
-
ariaLabelledby;
|
|
1332
|
-
/** Output to enable support for two-way binding on `[(selectedIndex)]` */
|
|
1333
|
-
selectedIndexChange = new EventEmitter();
|
|
1334
|
-
/** Event emitted when focus has changed within a tab group. */
|
|
1335
|
-
focusChange = new EventEmitter();
|
|
1336
|
-
/** Event emitted when the body animation has completed */
|
|
1337
|
-
animationDone = new EventEmitter();
|
|
1338
|
-
/** Event emitted when the tab selection has changed. */
|
|
1339
|
-
selectedTabChange = new EventEmitter(true);
|
|
1340
|
-
_groupId;
|
|
1341
|
-
/** Whether the tab group is rendered on the server. */
|
|
1342
|
-
_isServer = !inject(Platform).isBrowser;
|
|
1343
|
-
constructor() {
|
|
1344
|
-
const defaultConfig = inject(MAT_TABS_CONFIG, { optional: true });
|
|
1345
|
-
this._groupId = inject(_IdGenerator).getId('mat-tab-group-');
|
|
1346
|
-
this.animationDuration =
|
|
1347
|
-
defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';
|
|
1348
|
-
this.disablePagination =
|
|
1349
|
-
defaultConfig && defaultConfig.disablePagination != null
|
|
1350
|
-
? defaultConfig.disablePagination
|
|
1351
|
-
: false;
|
|
1352
|
-
this.dynamicHeight =
|
|
1353
|
-
defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;
|
|
1354
|
-
if (defaultConfig?.contentTabIndex != null) {
|
|
1355
|
-
this.contentTabIndex = defaultConfig.contentTabIndex;
|
|
1356
|
-
}
|
|
1357
|
-
this.preserveContent = !!defaultConfig?.preserveContent;
|
|
1358
|
-
this.fitInkBarToContent =
|
|
1359
|
-
defaultConfig && defaultConfig.fitInkBarToContent != null
|
|
1360
|
-
? defaultConfig.fitInkBarToContent
|
|
1361
|
-
: false;
|
|
1362
|
-
this.stretchTabs =
|
|
1363
|
-
defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
|
|
1364
|
-
this.alignTabs =
|
|
1365
|
-
defaultConfig && defaultConfig.alignTabs != null ? defaultConfig.alignTabs : null;
|
|
1366
|
-
}
|
|
1367
|
-
/**
|
|
1368
|
-
* After the content is checked, this component knows what tabs have been defined
|
|
1369
|
-
* and what the selected index should be. This is where we can know exactly what position
|
|
1370
|
-
* each tab should be in according to the new selected index, and additionally we know how
|
|
1371
|
-
* a new selected tab should transition in (from the left or right).
|
|
1372
|
-
*/
|
|
1373
|
-
ngAfterContentChecked() {
|
|
1374
|
-
// Don't clamp the `indexToSelect` immediately in the setter because it can happen that
|
|
1375
|
-
// the amount of tabs changes before the actual change detection runs.
|
|
1376
|
-
const indexToSelect = (this._indexToSelect = this._clampTabIndex(this._indexToSelect));
|
|
1377
|
-
// If there is a change in selected index, emit a change event. Should not trigger if
|
|
1378
|
-
// the selected index has not yet been initialized.
|
|
1379
|
-
if (this._selectedIndex != indexToSelect) {
|
|
1380
|
-
const isFirstRun = this._selectedIndex == null;
|
|
1381
|
-
if (!isFirstRun) {
|
|
1382
|
-
this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
|
|
1383
|
-
// Preserve the height so page doesn't scroll up during tab change.
|
|
1384
|
-
// Fixes https://stackblitz.com/edit/mat-tabs-scroll-page-top-on-tab-change
|
|
1385
|
-
const wrapper = this._tabBodyWrapper.nativeElement;
|
|
1386
|
-
wrapper.style.minHeight = wrapper.clientHeight + 'px';
|
|
1387
|
-
}
|
|
1388
|
-
// Changing these values after change detection has run
|
|
1389
|
-
// since the checked content may contain references to them.
|
|
1390
|
-
Promise.resolve().then(() => {
|
|
1391
|
-
this._tabs.forEach((tab, index) => (tab.isActive = index === indexToSelect));
|
|
1392
|
-
if (!isFirstRun) {
|
|
1393
|
-
this.selectedIndexChange.emit(indexToSelect);
|
|
1394
|
-
// Clear the min-height, this was needed during tab change to avoid
|
|
1395
|
-
// unnecessary scrolling.
|
|
1396
|
-
this._tabBodyWrapper.nativeElement.style.minHeight = '';
|
|
1397
|
-
}
|
|
1398
|
-
});
|
|
1399
|
-
}
|
|
1400
|
-
// Setup the position for each tab and optionally setup an origin on the next selected tab.
|
|
1401
|
-
this._tabs.forEach((tab, index) => {
|
|
1402
|
-
tab.position = index - indexToSelect;
|
|
1403
|
-
// If there is already a selected tab, then set up an origin for the next selected tab
|
|
1404
|
-
// if it doesn't have one already.
|
|
1405
|
-
if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {
|
|
1406
|
-
tab.origin = indexToSelect - this._selectedIndex;
|
|
1407
|
-
}
|
|
1408
|
-
});
|
|
1409
|
-
if (this._selectedIndex !== indexToSelect) {
|
|
1410
|
-
this._selectedIndex = indexToSelect;
|
|
1411
|
-
this._lastFocusedTabIndex = null;
|
|
1412
|
-
this._changeDetectorRef.markForCheck();
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
ngAfterContentInit() {
|
|
1416
|
-
this._subscribeToAllTabChanges();
|
|
1417
|
-
this._subscribeToTabLabels();
|
|
1418
|
-
// Subscribe to changes in the amount of tabs, in order to be
|
|
1419
|
-
// able to re-render the content as new tabs are added or removed.
|
|
1420
|
-
this._tabsSubscription = this._tabs.changes.subscribe(() => {
|
|
1421
|
-
const indexToSelect = this._clampTabIndex(this._indexToSelect);
|
|
1422
|
-
// Maintain the previously-selected tab if a new tab is added or removed and there is no
|
|
1423
|
-
// explicit change that selects a different tab.
|
|
1424
|
-
if (indexToSelect === this._selectedIndex) {
|
|
1425
|
-
const tabs = this._tabs.toArray();
|
|
1426
|
-
let selectedTab;
|
|
1427
|
-
for (let i = 0; i < tabs.length; i++) {
|
|
1428
|
-
if (tabs[i].isActive) {
|
|
1429
|
-
// Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
|
|
1430
|
-
// event, otherwise the consumer may end up in an infinite loop in some edge cases like
|
|
1431
|
-
// adding a tab within the `selectedIndexChange` event.
|
|
1432
|
-
this._indexToSelect = this._selectedIndex = i;
|
|
1433
|
-
this._lastFocusedTabIndex = null;
|
|
1434
|
-
selectedTab = tabs[i];
|
|
1435
|
-
break;
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
// If we haven't found an active tab and a tab exists at the selected index, it means
|
|
1439
|
-
// that the active tab was swapped out. Since this won't be picked up by the rendering
|
|
1440
|
-
// loop in `ngAfterContentChecked`, we need to sync it up manually.
|
|
1441
|
-
if (!selectedTab && tabs[indexToSelect]) {
|
|
1442
|
-
Promise.resolve().then(() => {
|
|
1443
|
-
tabs[indexToSelect].isActive = true;
|
|
1444
|
-
this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
|
|
1445
|
-
});
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
this._changeDetectorRef.markForCheck();
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
ngAfterViewInit() {
|
|
1452
|
-
this._tabBodySubscription = this._tabBodies.changes.subscribe(() => this._bodyCentered(true));
|
|
1453
|
-
}
|
|
1454
|
-
/** Listens to changes in all of the tabs. */
|
|
1455
|
-
_subscribeToAllTabChanges() {
|
|
1456
|
-
// Since we use a query with `descendants: true` to pick up the tabs, we may end up catching
|
|
1457
|
-
// some that are inside of nested tab groups. We filter them out manually by checking that
|
|
1458
|
-
// the closest group to the tab is the current one.
|
|
1459
|
-
this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe((tabs) => {
|
|
1460
|
-
this._tabs.reset(tabs.filter(tab => {
|
|
1461
|
-
return tab._closestTabGroup === this || !tab._closestTabGroup;
|
|
1462
|
-
}));
|
|
1463
|
-
this._tabs.notifyOnChanges();
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
ngOnDestroy() {
|
|
1467
|
-
this._tabs.destroy();
|
|
1468
|
-
this._tabsSubscription.unsubscribe();
|
|
1469
|
-
this._tabLabelSubscription.unsubscribe();
|
|
1470
|
-
this._tabBodySubscription.unsubscribe();
|
|
1471
|
-
}
|
|
1472
|
-
/** Re-aligns the ink bar to the selected tab element. */
|
|
1473
|
-
realignInkBar() {
|
|
1474
|
-
if (this._tabHeader) {
|
|
1475
|
-
this._tabHeader._alignInkBarToSelectedTab();
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
/**
|
|
1479
|
-
* Recalculates the tab group's pagination dimensions.
|
|
1480
|
-
*
|
|
1481
|
-
* WARNING: Calling this method can be very costly in terms of performance. It should be called
|
|
1482
|
-
* as infrequently as possible from outside of the Tabs component as it causes a reflow of the
|
|
1483
|
-
* page.
|
|
1484
|
-
*/
|
|
1485
|
-
updatePagination() {
|
|
1486
|
-
if (this._tabHeader) {
|
|
1487
|
-
this._tabHeader.updatePagination();
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
/**
|
|
1491
|
-
* Sets focus to a particular tab.
|
|
1492
|
-
* @param index Index of the tab to be focused.
|
|
1493
|
-
*/
|
|
1494
|
-
focusTab(index) {
|
|
1495
|
-
const header = this._tabHeader;
|
|
1496
|
-
if (header) {
|
|
1497
|
-
header.focusIndex = index;
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
_focusChanged(index) {
|
|
1501
|
-
this._lastFocusedTabIndex = index;
|
|
1502
|
-
this.focusChange.emit(this._createChangeEvent(index));
|
|
1503
|
-
}
|
|
1504
|
-
_createChangeEvent(index) {
|
|
1505
|
-
const event = new MatTabChangeEvent();
|
|
1506
|
-
event.index = index;
|
|
1507
|
-
if (this._tabs && this._tabs.length) {
|
|
1508
|
-
event.tab = this._tabs.toArray()[index];
|
|
1509
|
-
}
|
|
1510
|
-
return event;
|
|
1511
|
-
}
|
|
1512
|
-
/**
|
|
1513
|
-
* Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
|
|
1514
|
-
* on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
|
|
1515
|
-
* binding to be updated, we need to subscribe to changes in it and trigger change detection
|
|
1516
|
-
* manually.
|
|
1517
|
-
*/
|
|
1518
|
-
_subscribeToTabLabels() {
|
|
1519
|
-
if (this._tabLabelSubscription) {
|
|
1520
|
-
this._tabLabelSubscription.unsubscribe();
|
|
1521
|
-
}
|
|
1522
|
-
this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());
|
|
1523
|
-
}
|
|
1524
|
-
/** Clamps the given index to the bounds of 0 and the tabs length. */
|
|
1525
|
-
_clampTabIndex(index) {
|
|
1526
|
-
// Note the `|| 0`, which ensures that values like NaN can't get through
|
|
1527
|
-
// and which would otherwise throw the component into an infinite loop
|
|
1528
|
-
// (since Math.max(NaN, 0) === NaN).
|
|
1529
|
-
return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
|
|
1530
|
-
}
|
|
1531
|
-
/** Returns a unique id for each tab label element */
|
|
1532
|
-
_getTabLabelId(tab, index) {
|
|
1533
|
-
return tab.id || `${this._groupId}-label-${index}`;
|
|
1534
|
-
}
|
|
1535
|
-
/** Returns a unique id for each tab content element */
|
|
1536
|
-
_getTabContentId(index) {
|
|
1537
|
-
return `${this._groupId}-content-${index}`;
|
|
1538
|
-
}
|
|
1539
|
-
/**
|
|
1540
|
-
* Sets the height of the body wrapper to the height of the activating tab if dynamic
|
|
1541
|
-
* height property is true.
|
|
1542
|
-
*/
|
|
1543
|
-
_setTabBodyWrapperHeight(tabHeight) {
|
|
1544
|
-
if (!this.dynamicHeight || !this._tabBodyWrapperHeight) {
|
|
1545
|
-
this._tabBodyWrapperHeight = tabHeight;
|
|
1546
|
-
return;
|
|
1547
|
-
}
|
|
1548
|
-
const wrapper = this._tabBodyWrapper.nativeElement;
|
|
1549
|
-
wrapper.style.height = this._tabBodyWrapperHeight + 'px';
|
|
1550
|
-
// This conditional forces the browser to paint the height so that
|
|
1551
|
-
// the animation to the new height can have an origin.
|
|
1552
|
-
if (this._tabBodyWrapper.nativeElement.offsetHeight) {
|
|
1553
|
-
wrapper.style.height = tabHeight + 'px';
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
/** Removes the height of the tab body wrapper. */
|
|
1557
|
-
_removeTabBodyWrapperHeight() {
|
|
1323
|
+
_elementRef = inject(ElementRef);
|
|
1324
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
1325
|
+
_ngZone = inject(NgZone);
|
|
1326
|
+
_tabsSubscription = Subscription.EMPTY;
|
|
1327
|
+
_tabLabelSubscription = Subscription.EMPTY;
|
|
1328
|
+
_tabBodySubscription = Subscription.EMPTY;
|
|
1329
|
+
_diAnimationsDisabled = _animationsDisabled();
|
|
1330
|
+
_allTabs;
|
|
1331
|
+
_tabBodies;
|
|
1332
|
+
_tabBodyWrapper;
|
|
1333
|
+
_tabHeader;
|
|
1334
|
+
_tabs = new QueryList();
|
|
1335
|
+
_indexToSelect = 0;
|
|
1336
|
+
_lastFocusedTabIndex = null;
|
|
1337
|
+
_tabBodyWrapperHeight = 0;
|
|
1338
|
+
color;
|
|
1339
|
+
get fitInkBarToContent() {
|
|
1340
|
+
return this._fitInkBarToContent;
|
|
1341
|
+
}
|
|
1342
|
+
set fitInkBarToContent(value) {
|
|
1343
|
+
this._fitInkBarToContent = value;
|
|
1344
|
+
this._changeDetectorRef.markForCheck();
|
|
1345
|
+
}
|
|
1346
|
+
_fitInkBarToContent = false;
|
|
1347
|
+
stretchTabs = true;
|
|
1348
|
+
alignTabs = null;
|
|
1349
|
+
dynamicHeight = false;
|
|
1350
|
+
get selectedIndex() {
|
|
1351
|
+
return this._selectedIndex;
|
|
1352
|
+
}
|
|
1353
|
+
set selectedIndex(value) {
|
|
1354
|
+
this._indexToSelect = isNaN(value) ? null : value;
|
|
1355
|
+
}
|
|
1356
|
+
_selectedIndex = null;
|
|
1357
|
+
headerPosition = 'above';
|
|
1358
|
+
get animationDuration() {
|
|
1359
|
+
return this._animationDuration;
|
|
1360
|
+
}
|
|
1361
|
+
set animationDuration(value) {
|
|
1362
|
+
const stringValue = value + '';
|
|
1363
|
+
this._animationDuration = /^\d+$/.test(stringValue) ? value + 'ms' : stringValue;
|
|
1364
|
+
}
|
|
1365
|
+
_animationDuration;
|
|
1366
|
+
get contentTabIndex() {
|
|
1367
|
+
return this._contentTabIndex;
|
|
1368
|
+
}
|
|
1369
|
+
set contentTabIndex(value) {
|
|
1370
|
+
this._contentTabIndex = isNaN(value) ? null : value;
|
|
1371
|
+
}
|
|
1372
|
+
_contentTabIndex;
|
|
1373
|
+
disablePagination = false;
|
|
1374
|
+
disableRipple = false;
|
|
1375
|
+
preserveContent = false;
|
|
1376
|
+
get backgroundColor() {
|
|
1377
|
+
return this._backgroundColor;
|
|
1378
|
+
}
|
|
1379
|
+
set backgroundColor(value) {
|
|
1380
|
+
const classList = this._elementRef.nativeElement.classList;
|
|
1381
|
+
classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
|
|
1382
|
+
if (value) {
|
|
1383
|
+
classList.add('mat-tabs-with-background', `mat-background-${value}`);
|
|
1384
|
+
}
|
|
1385
|
+
this._backgroundColor = value;
|
|
1386
|
+
}
|
|
1387
|
+
_backgroundColor;
|
|
1388
|
+
ariaLabel;
|
|
1389
|
+
ariaLabelledby;
|
|
1390
|
+
selectedIndexChange = new EventEmitter();
|
|
1391
|
+
focusChange = new EventEmitter();
|
|
1392
|
+
animationDone = new EventEmitter();
|
|
1393
|
+
selectedTabChange = new EventEmitter(true);
|
|
1394
|
+
_groupId;
|
|
1395
|
+
_isServer = !inject(Platform).isBrowser;
|
|
1396
|
+
constructor() {
|
|
1397
|
+
const defaultConfig = inject(MAT_TABS_CONFIG, {
|
|
1398
|
+
optional: true
|
|
1399
|
+
});
|
|
1400
|
+
this._groupId = inject(_IdGenerator).getId('mat-tab-group-');
|
|
1401
|
+
this.animationDuration = defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';
|
|
1402
|
+
this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;
|
|
1403
|
+
this.dynamicHeight = defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;
|
|
1404
|
+
if (defaultConfig?.contentTabIndex != null) {
|
|
1405
|
+
this.contentTabIndex = defaultConfig.contentTabIndex;
|
|
1406
|
+
}
|
|
1407
|
+
this.preserveContent = !!defaultConfig?.preserveContent;
|
|
1408
|
+
this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;
|
|
1409
|
+
this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
|
|
1410
|
+
this.alignTabs = defaultConfig && defaultConfig.alignTabs != null ? defaultConfig.alignTabs : null;
|
|
1411
|
+
}
|
|
1412
|
+
ngAfterContentChecked() {
|
|
1413
|
+
const indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);
|
|
1414
|
+
if (this._selectedIndex != indexToSelect) {
|
|
1415
|
+
const isFirstRun = this._selectedIndex == null;
|
|
1416
|
+
if (!isFirstRun) {
|
|
1417
|
+
this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
|
|
1558
1418
|
const wrapper = this._tabBodyWrapper.nativeElement;
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
if (
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
], queries: [{ propertyName: "_allTabs", predicate: MatTab, descendants: true }], viewQueries: [{ propertyName: "_tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true }, { propertyName: "_tabHeader", first: true, predicate: ["tabHeader"], descendants: true }, { propertyName: "_tabBodies", predicate: MatTabBody, descendants: true }], exportAs: ["matTabGroup"], ngImport: i0, template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"], dependencies: [{ kind: "component", type: MatTabHeader, selector: "mat-tab-header", inputs: ["aria-label", "aria-labelledby", "disableRipple"] }, { kind: "directive", type: MatTabLabelWrapper, selector: "[matTabLabelWrapper]", inputs: ["disabled"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: MatTabBody, selector: "mat-tab-body", inputs: ["content", "animationDuration", "preserveContent", "position"], outputs: ["_onCentering", "_beforeCentering", "_onCentered"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
1419
|
+
wrapper.style.minHeight = wrapper.clientHeight + 'px';
|
|
1420
|
+
}
|
|
1421
|
+
Promise.resolve().then(() => {
|
|
1422
|
+
this._tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);
|
|
1423
|
+
if (!isFirstRun) {
|
|
1424
|
+
this.selectedIndexChange.emit(indexToSelect);
|
|
1425
|
+
this._tabBodyWrapper.nativeElement.style.minHeight = '';
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
this._tabs.forEach((tab, index) => {
|
|
1430
|
+
tab.position = index - indexToSelect;
|
|
1431
|
+
if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {
|
|
1432
|
+
tab.origin = indexToSelect - this._selectedIndex;
|
|
1433
|
+
}
|
|
1434
|
+
});
|
|
1435
|
+
if (this._selectedIndex !== indexToSelect) {
|
|
1436
|
+
this._selectedIndex = indexToSelect;
|
|
1437
|
+
this._lastFocusedTabIndex = null;
|
|
1438
|
+
this._changeDetectorRef.markForCheck();
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
ngAfterContentInit() {
|
|
1442
|
+
this._subscribeToAllTabChanges();
|
|
1443
|
+
this._subscribeToTabLabels();
|
|
1444
|
+
this._tabsSubscription = this._tabs.changes.subscribe(() => {
|
|
1445
|
+
const indexToSelect = this._clampTabIndex(this._indexToSelect);
|
|
1446
|
+
if (indexToSelect === this._selectedIndex) {
|
|
1447
|
+
const tabs = this._tabs.toArray();
|
|
1448
|
+
let selectedTab;
|
|
1449
|
+
for (let i = 0; i < tabs.length; i++) {
|
|
1450
|
+
if (tabs[i].isActive) {
|
|
1451
|
+
this._indexToSelect = this._selectedIndex = i;
|
|
1452
|
+
this._lastFocusedTabIndex = null;
|
|
1453
|
+
selectedTab = tabs[i];
|
|
1454
|
+
break;
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
if (!selectedTab && tabs[indexToSelect]) {
|
|
1458
|
+
Promise.resolve().then(() => {
|
|
1459
|
+
tabs[indexToSelect].isActive = true;
|
|
1460
|
+
this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
this._changeDetectorRef.markForCheck();
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
ngAfterViewInit() {
|
|
1468
|
+
this._tabBodySubscription = this._tabBodies.changes.subscribe(() => this._bodyCentered(true));
|
|
1469
|
+
}
|
|
1470
|
+
_subscribeToAllTabChanges() {
|
|
1471
|
+
this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe(tabs => {
|
|
1472
|
+
this._tabs.reset(tabs.filter(tab => {
|
|
1473
|
+
return tab._closestTabGroup === this || !tab._closestTabGroup;
|
|
1474
|
+
}));
|
|
1475
|
+
this._tabs.notifyOnChanges();
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
ngOnDestroy() {
|
|
1479
|
+
this._tabs.destroy();
|
|
1480
|
+
this._tabsSubscription.unsubscribe();
|
|
1481
|
+
this._tabLabelSubscription.unsubscribe();
|
|
1482
|
+
this._tabBodySubscription.unsubscribe();
|
|
1483
|
+
}
|
|
1484
|
+
realignInkBar() {
|
|
1485
|
+
if (this._tabHeader) {
|
|
1486
|
+
this._tabHeader._alignInkBarToSelectedTab();
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
updatePagination() {
|
|
1490
|
+
if (this._tabHeader) {
|
|
1491
|
+
this._tabHeader.updatePagination();
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
focusTab(index) {
|
|
1495
|
+
const header = this._tabHeader;
|
|
1496
|
+
if (header) {
|
|
1497
|
+
header.focusIndex = index;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
_focusChanged(index) {
|
|
1501
|
+
this._lastFocusedTabIndex = index;
|
|
1502
|
+
this.focusChange.emit(this._createChangeEvent(index));
|
|
1503
|
+
}
|
|
1504
|
+
_createChangeEvent(index) {
|
|
1505
|
+
const event = new MatTabChangeEvent();
|
|
1506
|
+
event.index = index;
|
|
1507
|
+
if (this._tabs && this._tabs.length) {
|
|
1508
|
+
event.tab = this._tabs.toArray()[index];
|
|
1509
|
+
}
|
|
1510
|
+
return event;
|
|
1511
|
+
}
|
|
1512
|
+
_subscribeToTabLabels() {
|
|
1513
|
+
if (this._tabLabelSubscription) {
|
|
1514
|
+
this._tabLabelSubscription.unsubscribe();
|
|
1515
|
+
}
|
|
1516
|
+
this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());
|
|
1517
|
+
}
|
|
1518
|
+
_clampTabIndex(index) {
|
|
1519
|
+
return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
|
|
1520
|
+
}
|
|
1521
|
+
_getTabLabelId(tab, index) {
|
|
1522
|
+
return tab.id || `${this._groupId}-label-${index}`;
|
|
1523
|
+
}
|
|
1524
|
+
_getTabContentId(index) {
|
|
1525
|
+
return `${this._groupId}-content-${index}`;
|
|
1526
|
+
}
|
|
1527
|
+
_setTabBodyWrapperHeight(tabHeight) {
|
|
1528
|
+
if (!this.dynamicHeight || !this._tabBodyWrapperHeight) {
|
|
1529
|
+
this._tabBodyWrapperHeight = tabHeight;
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1532
|
+
const wrapper = this._tabBodyWrapper.nativeElement;
|
|
1533
|
+
wrapper.style.height = this._tabBodyWrapperHeight + 'px';
|
|
1534
|
+
if (this._tabBodyWrapper.nativeElement.offsetHeight) {
|
|
1535
|
+
wrapper.style.height = tabHeight + 'px';
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
_removeTabBodyWrapperHeight() {
|
|
1539
|
+
const wrapper = this._tabBodyWrapper.nativeElement;
|
|
1540
|
+
this._tabBodyWrapperHeight = wrapper.clientHeight;
|
|
1541
|
+
wrapper.style.height = '';
|
|
1542
|
+
this._ngZone.run(() => this.animationDone.emit());
|
|
1543
|
+
}
|
|
1544
|
+
_handleClick(tab, tabHeader, index) {
|
|
1545
|
+
tabHeader.focusIndex = index;
|
|
1546
|
+
if (!tab.disabled) {
|
|
1547
|
+
this.selectedIndex = index;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
_getTabIndex(index) {
|
|
1551
|
+
const targetIndex = this._lastFocusedTabIndex ?? this.selectedIndex;
|
|
1552
|
+
return index === targetIndex ? 0 : -1;
|
|
1553
|
+
}
|
|
1554
|
+
_tabFocusChanged(focusOrigin, index) {
|
|
1555
|
+
if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {
|
|
1556
|
+
this._tabHeader.focusIndex = index;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
_bodyCentered(isCenter) {
|
|
1560
|
+
if (isCenter) {
|
|
1561
|
+
this._tabBodies?.forEach((body, i) => body._setActiveClass(i === this._selectedIndex));
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
_animationsDisabled() {
|
|
1565
|
+
return this._diAnimationsDisabled || this.animationDuration === '0' || this.animationDuration === '0ms';
|
|
1566
|
+
}
|
|
1567
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1568
|
+
minVersion: "12.0.0",
|
|
1569
|
+
version: "20.2.0-next.2",
|
|
1570
|
+
ngImport: i0,
|
|
1571
|
+
type: MatTabGroup,
|
|
1572
|
+
deps: [],
|
|
1573
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1574
|
+
});
|
|
1575
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1576
|
+
minVersion: "17.0.0",
|
|
1577
|
+
version: "20.2.0-next.2",
|
|
1578
|
+
type: MatTabGroup,
|
|
1579
|
+
isStandalone: true,
|
|
1580
|
+
selector: "mat-tab-group",
|
|
1581
|
+
inputs: {
|
|
1582
|
+
color: "color",
|
|
1583
|
+
fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute],
|
|
1584
|
+
stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute],
|
|
1585
|
+
alignTabs: ["mat-align-tabs", "alignTabs"],
|
|
1586
|
+
dynamicHeight: ["dynamicHeight", "dynamicHeight", booleanAttribute],
|
|
1587
|
+
selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute],
|
|
1588
|
+
headerPosition: "headerPosition",
|
|
1589
|
+
animationDuration: "animationDuration",
|
|
1590
|
+
contentTabIndex: ["contentTabIndex", "contentTabIndex", numberAttribute],
|
|
1591
|
+
disablePagination: ["disablePagination", "disablePagination", booleanAttribute],
|
|
1592
|
+
disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
|
|
1593
|
+
preserveContent: ["preserveContent", "preserveContent", booleanAttribute],
|
|
1594
|
+
backgroundColor: "backgroundColor",
|
|
1595
|
+
ariaLabel: ["aria-label", "ariaLabel"],
|
|
1596
|
+
ariaLabelledby: ["aria-labelledby", "ariaLabelledby"]
|
|
1597
|
+
},
|
|
1598
|
+
outputs: {
|
|
1599
|
+
selectedIndexChange: "selectedIndexChange",
|
|
1600
|
+
focusChange: "focusChange",
|
|
1601
|
+
animationDone: "animationDone",
|
|
1602
|
+
selectedTabChange: "selectedTabChange"
|
|
1603
|
+
},
|
|
1604
|
+
host: {
|
|
1605
|
+
properties: {
|
|
1606
|
+
"class": "\"mat-\" + (color || \"primary\")",
|
|
1607
|
+
"class.mat-mdc-tab-group-dynamic-height": "dynamicHeight",
|
|
1608
|
+
"class.mat-mdc-tab-group-inverted-header": "headerPosition === \"below\"",
|
|
1609
|
+
"class.mat-mdc-tab-group-stretch-tabs": "stretchTabs",
|
|
1610
|
+
"attr.mat-align-tabs": "alignTabs",
|
|
1611
|
+
"style.--mat-tab-animation-duration": "animationDuration"
|
|
1612
|
+
},
|
|
1613
|
+
classAttribute: "mat-mdc-tab-group"
|
|
1614
|
+
},
|
|
1615
|
+
providers: [{
|
|
1616
|
+
provide: MAT_TAB_GROUP,
|
|
1617
|
+
useExisting: MatTabGroup
|
|
1618
|
+
}],
|
|
1619
|
+
queries: [{
|
|
1620
|
+
propertyName: "_allTabs",
|
|
1621
|
+
predicate: MatTab,
|
|
1622
|
+
descendants: true
|
|
1623
|
+
}],
|
|
1624
|
+
viewQueries: [{
|
|
1625
|
+
propertyName: "_tabBodyWrapper",
|
|
1626
|
+
first: true,
|
|
1627
|
+
predicate: ["tabBodyWrapper"],
|
|
1628
|
+
descendants: true
|
|
1629
|
+
}, {
|
|
1630
|
+
propertyName: "_tabHeader",
|
|
1631
|
+
first: true,
|
|
1632
|
+
predicate: ["tabHeader"],
|
|
1633
|
+
descendants: true
|
|
1634
|
+
}, {
|
|
1635
|
+
propertyName: "_tabBodies",
|
|
1636
|
+
predicate: MatTabBody,
|
|
1637
|
+
descendants: true
|
|
1638
|
+
}],
|
|
1639
|
+
exportAs: ["matTabGroup"],
|
|
1640
|
+
ngImport: i0,
|
|
1641
|
+
template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n",
|
|
1642
|
+
styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"],
|
|
1643
|
+
dependencies: [{
|
|
1644
|
+
kind: "component",
|
|
1645
|
+
type: MatTabHeader,
|
|
1646
|
+
selector: "mat-tab-header",
|
|
1647
|
+
inputs: ["aria-label", "aria-labelledby", "disableRipple"]
|
|
1648
|
+
}, {
|
|
1649
|
+
kind: "directive",
|
|
1650
|
+
type: MatTabLabelWrapper,
|
|
1651
|
+
selector: "[matTabLabelWrapper]",
|
|
1652
|
+
inputs: ["disabled"]
|
|
1653
|
+
}, {
|
|
1654
|
+
kind: "directive",
|
|
1655
|
+
type: CdkMonitorFocus,
|
|
1656
|
+
selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]",
|
|
1657
|
+
outputs: ["cdkFocusChange"],
|
|
1658
|
+
exportAs: ["cdkMonitorFocus"]
|
|
1659
|
+
}, {
|
|
1660
|
+
kind: "directive",
|
|
1661
|
+
type: MatRipple,
|
|
1662
|
+
selector: "[mat-ripple], [matRipple]",
|
|
1663
|
+
inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
|
|
1664
|
+
exportAs: ["matRipple"]
|
|
1665
|
+
}, {
|
|
1666
|
+
kind: "directive",
|
|
1667
|
+
type: CdkPortalOutlet,
|
|
1668
|
+
selector: "[cdkPortalOutlet]",
|
|
1669
|
+
inputs: ["cdkPortalOutlet"],
|
|
1670
|
+
outputs: ["attached"],
|
|
1671
|
+
exportAs: ["cdkPortalOutlet"]
|
|
1672
|
+
}, {
|
|
1673
|
+
kind: "component",
|
|
1674
|
+
type: MatTabBody,
|
|
1675
|
+
selector: "mat-tab-body",
|
|
1676
|
+
inputs: ["content", "animationDuration", "preserveContent", "position"],
|
|
1677
|
+
outputs: ["_onCentering", "_beforeCentering", "_onCentered"]
|
|
1678
|
+
}],
|
|
1679
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
1680
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1681
|
+
});
|
|
1613
1682
|
}
|
|
1614
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
], template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"] }]
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
}]
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1683
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1684
|
+
minVersion: "12.0.0",
|
|
1685
|
+
version: "20.2.0-next.2",
|
|
1686
|
+
ngImport: i0,
|
|
1687
|
+
type: MatTabGroup,
|
|
1688
|
+
decorators: [{
|
|
1689
|
+
type: Component,
|
|
1690
|
+
args: [{
|
|
1691
|
+
selector: 'mat-tab-group',
|
|
1692
|
+
exportAs: 'matTabGroup',
|
|
1693
|
+
encapsulation: ViewEncapsulation.None,
|
|
1694
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
1695
|
+
providers: [{
|
|
1696
|
+
provide: MAT_TAB_GROUP,
|
|
1697
|
+
useExisting: MatTabGroup
|
|
1698
|
+
}],
|
|
1699
|
+
host: {
|
|
1700
|
+
'class': 'mat-mdc-tab-group',
|
|
1701
|
+
'[class]': '"mat-" + (color || "primary")',
|
|
1702
|
+
'[class.mat-mdc-tab-group-dynamic-height]': 'dynamicHeight',
|
|
1703
|
+
'[class.mat-mdc-tab-group-inverted-header]': 'headerPosition === "below"',
|
|
1704
|
+
'[class.mat-mdc-tab-group-stretch-tabs]': 'stretchTabs',
|
|
1705
|
+
'[attr.mat-align-tabs]': 'alignTabs',
|
|
1706
|
+
'[style.--mat-tab-animation-duration]': 'animationDuration'
|
|
1707
|
+
},
|
|
1708
|
+
imports: [MatTabHeader, MatTabLabelWrapper, CdkMonitorFocus, MatRipple, CdkPortalOutlet, MatTabBody],
|
|
1709
|
+
template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n",
|
|
1710
|
+
styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"]
|
|
1711
|
+
}]
|
|
1712
|
+
}],
|
|
1713
|
+
ctorParameters: () => [],
|
|
1714
|
+
propDecorators: {
|
|
1715
|
+
_allTabs: [{
|
|
1716
|
+
type: ContentChildren,
|
|
1717
|
+
args: [MatTab, {
|
|
1718
|
+
descendants: true
|
|
1719
|
+
}]
|
|
1720
|
+
}],
|
|
1721
|
+
_tabBodies: [{
|
|
1722
|
+
type: ViewChildren,
|
|
1723
|
+
args: [MatTabBody]
|
|
1724
|
+
}],
|
|
1725
|
+
_tabBodyWrapper: [{
|
|
1726
|
+
type: ViewChild,
|
|
1727
|
+
args: ['tabBodyWrapper']
|
|
1728
|
+
}],
|
|
1729
|
+
_tabHeader: [{
|
|
1730
|
+
type: ViewChild,
|
|
1731
|
+
args: ['tabHeader']
|
|
1732
|
+
}],
|
|
1733
|
+
color: [{
|
|
1734
|
+
type: Input
|
|
1735
|
+
}],
|
|
1736
|
+
fitInkBarToContent: [{
|
|
1737
|
+
type: Input,
|
|
1738
|
+
args: [{
|
|
1739
|
+
transform: booleanAttribute
|
|
1740
|
+
}]
|
|
1741
|
+
}],
|
|
1742
|
+
stretchTabs: [{
|
|
1743
|
+
type: Input,
|
|
1744
|
+
args: [{
|
|
1745
|
+
alias: 'mat-stretch-tabs',
|
|
1746
|
+
transform: booleanAttribute
|
|
1747
|
+
}]
|
|
1748
|
+
}],
|
|
1749
|
+
alignTabs: [{
|
|
1750
|
+
type: Input,
|
|
1751
|
+
args: [{
|
|
1752
|
+
alias: 'mat-align-tabs'
|
|
1753
|
+
}]
|
|
1754
|
+
}],
|
|
1755
|
+
dynamicHeight: [{
|
|
1756
|
+
type: Input,
|
|
1757
|
+
args: [{
|
|
1758
|
+
transform: booleanAttribute
|
|
1759
|
+
}]
|
|
1760
|
+
}],
|
|
1761
|
+
selectedIndex: [{
|
|
1762
|
+
type: Input,
|
|
1763
|
+
args: [{
|
|
1764
|
+
transform: numberAttribute
|
|
1765
|
+
}]
|
|
1766
|
+
}],
|
|
1767
|
+
headerPosition: [{
|
|
1768
|
+
type: Input
|
|
1769
|
+
}],
|
|
1770
|
+
animationDuration: [{
|
|
1771
|
+
type: Input
|
|
1772
|
+
}],
|
|
1773
|
+
contentTabIndex: [{
|
|
1774
|
+
type: Input,
|
|
1775
|
+
args: [{
|
|
1776
|
+
transform: numberAttribute
|
|
1777
|
+
}]
|
|
1778
|
+
}],
|
|
1779
|
+
disablePagination: [{
|
|
1780
|
+
type: Input,
|
|
1781
|
+
args: [{
|
|
1782
|
+
transform: booleanAttribute
|
|
1783
|
+
}]
|
|
1784
|
+
}],
|
|
1785
|
+
disableRipple: [{
|
|
1786
|
+
type: Input,
|
|
1787
|
+
args: [{
|
|
1788
|
+
transform: booleanAttribute
|
|
1789
|
+
}]
|
|
1790
|
+
}],
|
|
1791
|
+
preserveContent: [{
|
|
1792
|
+
type: Input,
|
|
1793
|
+
args: [{
|
|
1794
|
+
transform: booleanAttribute
|
|
1795
|
+
}]
|
|
1796
|
+
}],
|
|
1797
|
+
backgroundColor: [{
|
|
1798
|
+
type: Input
|
|
1799
|
+
}],
|
|
1800
|
+
ariaLabel: [{
|
|
1801
|
+
type: Input,
|
|
1802
|
+
args: ['aria-label']
|
|
1803
|
+
}],
|
|
1804
|
+
ariaLabelledby: [{
|
|
1805
|
+
type: Input,
|
|
1806
|
+
args: ['aria-labelledby']
|
|
1807
|
+
}],
|
|
1808
|
+
selectedIndexChange: [{
|
|
1809
|
+
type: Output
|
|
1810
|
+
}],
|
|
1811
|
+
focusChange: [{
|
|
1812
|
+
type: Output
|
|
1813
|
+
}],
|
|
1814
|
+
animationDone: [{
|
|
1815
|
+
type: Output
|
|
1816
|
+
}],
|
|
1817
|
+
selectedTabChange: [{
|
|
1818
|
+
type: Output
|
|
1819
|
+
}]
|
|
1820
|
+
}
|
|
1821
|
+
});
|
|
1700
1822
|
class MatTabChangeEvent {
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
/** Reference to the currently-selected tab. */
|
|
1704
|
-
tab;
|
|
1823
|
+
index;
|
|
1824
|
+
tab;
|
|
1705
1825
|
}
|
|
1706
1826
|
|
|
1707
|
-
/**
|
|
1708
|
-
* Navigation component matching the styles of the tab group header.
|
|
1709
|
-
* Provides anchored navigation with animated ink bar.
|
|
1710
|
-
*/
|
|
1711
1827
|
class MatTabNav extends MatPaginatedTabHeader {
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1828
|
+
_focusedItem = signal(null, ...(ngDevMode ? [{
|
|
1829
|
+
debugName: "_focusedItem"
|
|
1830
|
+
}] : []));
|
|
1831
|
+
get fitInkBarToContent() {
|
|
1832
|
+
return this._fitInkBarToContent.value;
|
|
1833
|
+
}
|
|
1834
|
+
set fitInkBarToContent(value) {
|
|
1835
|
+
this._fitInkBarToContent.next(value);
|
|
1836
|
+
this._changeDetectorRef.markForCheck();
|
|
1837
|
+
}
|
|
1838
|
+
_fitInkBarToContent = new BehaviorSubject(false);
|
|
1839
|
+
stretchTabs = true;
|
|
1840
|
+
get animationDuration() {
|
|
1841
|
+
return this._animationDuration;
|
|
1842
|
+
}
|
|
1843
|
+
set animationDuration(value) {
|
|
1844
|
+
const stringValue = value + '';
|
|
1845
|
+
this._animationDuration = /^\d+$/.test(stringValue) ? value + 'ms' : stringValue;
|
|
1846
|
+
}
|
|
1847
|
+
_animationDuration;
|
|
1848
|
+
_items;
|
|
1849
|
+
get backgroundColor() {
|
|
1850
|
+
return this._backgroundColor;
|
|
1851
|
+
}
|
|
1852
|
+
set backgroundColor(value) {
|
|
1853
|
+
const classList = this._elementRef.nativeElement.classList;
|
|
1854
|
+
classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
|
|
1855
|
+
if (value) {
|
|
1856
|
+
classList.add('mat-tabs-with-background', `mat-background-${value}`);
|
|
1857
|
+
}
|
|
1858
|
+
this._backgroundColor = value;
|
|
1859
|
+
}
|
|
1860
|
+
_backgroundColor;
|
|
1861
|
+
get disableRipple() {
|
|
1862
|
+
return this._disableRipple();
|
|
1863
|
+
}
|
|
1864
|
+
set disableRipple(value) {
|
|
1865
|
+
this._disableRipple.set(value);
|
|
1866
|
+
}
|
|
1867
|
+
_disableRipple = signal(false, ...(ngDevMode ? [{
|
|
1868
|
+
debugName: "_disableRipple"
|
|
1869
|
+
}] : []));
|
|
1870
|
+
color = 'primary';
|
|
1871
|
+
tabPanel;
|
|
1872
|
+
_tabListContainer;
|
|
1873
|
+
_tabList;
|
|
1874
|
+
_tabListInner;
|
|
1875
|
+
_nextPaginator;
|
|
1876
|
+
_previousPaginator;
|
|
1877
|
+
_inkBar;
|
|
1878
|
+
constructor() {
|
|
1879
|
+
const defaultConfig = inject(MAT_TABS_CONFIG, {
|
|
1880
|
+
optional: true
|
|
1881
|
+
});
|
|
1882
|
+
super();
|
|
1883
|
+
this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;
|
|
1884
|
+
this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;
|
|
1885
|
+
this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
|
|
1886
|
+
}
|
|
1887
|
+
_itemSelected() {}
|
|
1888
|
+
ngAfterContentInit() {
|
|
1889
|
+
this._inkBar = new MatInkBar(this._items);
|
|
1890
|
+
this._items.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => this.updateActiveLink());
|
|
1891
|
+
super.ngAfterContentInit();
|
|
1892
|
+
this._keyManager.change.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => this._focusedItem.set(this._keyManager?.activeItem || null));
|
|
1893
|
+
}
|
|
1894
|
+
ngAfterViewInit() {
|
|
1895
|
+
if (!this.tabPanel && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
1896
|
+
throw new Error('A mat-tab-nav-panel must be specified via [tabPanel].');
|
|
1897
|
+
}
|
|
1898
|
+
super.ngAfterViewInit();
|
|
1899
|
+
}
|
|
1900
|
+
updateActiveLink() {
|
|
1901
|
+
if (!this._items) {
|
|
1902
|
+
return;
|
|
1903
|
+
}
|
|
1904
|
+
const items = this._items.toArray();
|
|
1905
|
+
for (let i = 0; i < items.length; i++) {
|
|
1906
|
+
if (items[i].active) {
|
|
1907
|
+
this.selectedIndex = i;
|
|
1908
|
+
if (this.tabPanel) {
|
|
1909
|
+
this.tabPanel._activeTabId = items[i].id;
|
|
1910
|
+
}
|
|
1911
|
+
this._focusedItem.set(items[i]);
|
|
1719
1912
|
this._changeDetectorRef.markForCheck();
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
if (this.tabPanel) {
|
|
1825
|
-
this.tabPanel._activeTabId = items[i].id;
|
|
1826
|
-
}
|
|
1827
|
-
// Updating the `selectedIndex` won't trigger the `change` event on
|
|
1828
|
-
// the key manager so we need to set the signal from here.
|
|
1829
|
-
this._focusedItem.set(items[i]);
|
|
1830
|
-
this._changeDetectorRef.markForCheck();
|
|
1831
|
-
return;
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
this.selectedIndex = -1;
|
|
1835
|
-
}
|
|
1836
|
-
_getRole() {
|
|
1837
|
-
return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');
|
|
1838
|
-
}
|
|
1839
|
-
_hasFocus(link) {
|
|
1840
|
-
return this._keyManager?.activeItem === link;
|
|
1841
|
-
}
|
|
1842
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1843
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatTabNav, isStandalone: true, selector: "[mat-tab-nav-bar]", inputs: { fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute], stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute], animationDuration: "animationDuration", backgroundColor: "backgroundColor", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], color: "color", tabPanel: "tabPanel" }, host: { properties: { "attr.role": "_getRole()", "class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls", "class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'", "class.mat-mdc-tab-nav-bar-stretch-tabs": "stretchTabs", "class.mat-primary": "color !== \"warn\" && color !== \"accent\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "class._mat-animation-noopable": "_animationsDisabled", "style.--mat-tab-animation-duration": "animationDuration" }, classAttribute: "mat-mdc-tab-nav-bar mat-mdc-tab-header" }, queries: [{ propertyName: "_items", predicate: i0.forwardRef(() => MatTabLink), descendants: true }], viewQueries: [{ propertyName: "_tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "_tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "_tabListInner", first: true, predicate: ["tabListInner"], descendants: true, static: true }, { propertyName: "_nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "_previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], exportAs: ["matTabNavBar", "matTabNav"], usesInheritance: true, ngImport: i0, template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
1913
|
+
return;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
this.selectedIndex = -1;
|
|
1917
|
+
}
|
|
1918
|
+
_getRole() {
|
|
1919
|
+
return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');
|
|
1920
|
+
}
|
|
1921
|
+
_hasFocus(link) {
|
|
1922
|
+
return this._keyManager?.activeItem === link;
|
|
1923
|
+
}
|
|
1924
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1925
|
+
minVersion: "12.0.0",
|
|
1926
|
+
version: "20.2.0-next.2",
|
|
1927
|
+
ngImport: i0,
|
|
1928
|
+
type: MatTabNav,
|
|
1929
|
+
deps: [],
|
|
1930
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1931
|
+
});
|
|
1932
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1933
|
+
minVersion: "16.1.0",
|
|
1934
|
+
version: "20.2.0-next.2",
|
|
1935
|
+
type: MatTabNav,
|
|
1936
|
+
isStandalone: true,
|
|
1937
|
+
selector: "[mat-tab-nav-bar]",
|
|
1938
|
+
inputs: {
|
|
1939
|
+
fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute],
|
|
1940
|
+
stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute],
|
|
1941
|
+
animationDuration: "animationDuration",
|
|
1942
|
+
backgroundColor: "backgroundColor",
|
|
1943
|
+
disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
|
|
1944
|
+
color: "color",
|
|
1945
|
+
tabPanel: "tabPanel"
|
|
1946
|
+
},
|
|
1947
|
+
host: {
|
|
1948
|
+
properties: {
|
|
1949
|
+
"attr.role": "_getRole()",
|
|
1950
|
+
"class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls",
|
|
1951
|
+
"class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'",
|
|
1952
|
+
"class.mat-mdc-tab-nav-bar-stretch-tabs": "stretchTabs",
|
|
1953
|
+
"class.mat-primary": "color !== \"warn\" && color !== \"accent\"",
|
|
1954
|
+
"class.mat-accent": "color === \"accent\"",
|
|
1955
|
+
"class.mat-warn": "color === \"warn\"",
|
|
1956
|
+
"class._mat-animation-noopable": "_animationsDisabled",
|
|
1957
|
+
"style.--mat-tab-animation-duration": "animationDuration"
|
|
1958
|
+
},
|
|
1959
|
+
classAttribute: "mat-mdc-tab-nav-bar mat-mdc-tab-header"
|
|
1960
|
+
},
|
|
1961
|
+
queries: [{
|
|
1962
|
+
propertyName: "_items",
|
|
1963
|
+
predicate: i0.forwardRef(() => MatTabLink),
|
|
1964
|
+
descendants: true
|
|
1965
|
+
}],
|
|
1966
|
+
viewQueries: [{
|
|
1967
|
+
propertyName: "_tabListContainer",
|
|
1968
|
+
first: true,
|
|
1969
|
+
predicate: ["tabListContainer"],
|
|
1970
|
+
descendants: true,
|
|
1971
|
+
static: true
|
|
1972
|
+
}, {
|
|
1973
|
+
propertyName: "_tabList",
|
|
1974
|
+
first: true,
|
|
1975
|
+
predicate: ["tabList"],
|
|
1976
|
+
descendants: true,
|
|
1977
|
+
static: true
|
|
1978
|
+
}, {
|
|
1979
|
+
propertyName: "_tabListInner",
|
|
1980
|
+
first: true,
|
|
1981
|
+
predicate: ["tabListInner"],
|
|
1982
|
+
descendants: true,
|
|
1983
|
+
static: true
|
|
1984
|
+
}, {
|
|
1985
|
+
propertyName: "_nextPaginator",
|
|
1986
|
+
first: true,
|
|
1987
|
+
predicate: ["nextPaginator"],
|
|
1988
|
+
descendants: true
|
|
1989
|
+
}, {
|
|
1990
|
+
propertyName: "_previousPaginator",
|
|
1991
|
+
first: true,
|
|
1992
|
+
predicate: ["previousPaginator"],
|
|
1993
|
+
descendants: true
|
|
1994
|
+
}],
|
|
1995
|
+
exportAs: ["matTabNavBar", "matTabNav"],
|
|
1996
|
+
usesInheritance: true,
|
|
1997
|
+
ngImport: i0,
|
|
1998
|
+
template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
|
|
1999
|
+
styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"],
|
|
2000
|
+
dependencies: [{
|
|
2001
|
+
kind: "directive",
|
|
2002
|
+
type: MatRipple,
|
|
2003
|
+
selector: "[mat-ripple], [matRipple]",
|
|
2004
|
+
inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
|
|
2005
|
+
exportAs: ["matRipple"]
|
|
2006
|
+
}, {
|
|
2007
|
+
kind: "directive",
|
|
2008
|
+
type: CdkObserveContent,
|
|
2009
|
+
selector: "[cdkObserveContent]",
|
|
2010
|
+
inputs: ["cdkObserveContentDisabled", "debounce"],
|
|
2011
|
+
outputs: ["cdkObserveContent"],
|
|
2012
|
+
exportAs: ["cdkObserveContent"]
|
|
2013
|
+
}],
|
|
2014
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
2015
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2016
|
+
});
|
|
1844
2017
|
}
|
|
1845
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
2018
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2019
|
+
minVersion: "12.0.0",
|
|
2020
|
+
version: "20.2.0-next.2",
|
|
2021
|
+
ngImport: i0,
|
|
2022
|
+
type: MatTabNav,
|
|
2023
|
+
decorators: [{
|
|
2024
|
+
type: Component,
|
|
2025
|
+
args: [{
|
|
2026
|
+
selector: '[mat-tab-nav-bar]',
|
|
2027
|
+
exportAs: 'matTabNavBar, matTabNav',
|
|
2028
|
+
host: {
|
|
2029
|
+
'[attr.role]': '_getRole()',
|
|
2030
|
+
'class': 'mat-mdc-tab-nav-bar mat-mdc-tab-header',
|
|
2031
|
+
'[class.mat-mdc-tab-header-pagination-controls-enabled]': '_showPaginationControls',
|
|
2032
|
+
'[class.mat-mdc-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
|
|
2033
|
+
'[class.mat-mdc-tab-nav-bar-stretch-tabs]': 'stretchTabs',
|
|
2034
|
+
'[class.mat-primary]': 'color !== "warn" && color !== "accent"',
|
|
2035
|
+
'[class.mat-accent]': 'color === "accent"',
|
|
2036
|
+
'[class.mat-warn]': 'color === "warn"',
|
|
2037
|
+
'[class._mat-animation-noopable]': '_animationsDisabled',
|
|
2038
|
+
'[style.--mat-tab-animation-duration]': 'animationDuration'
|
|
2039
|
+
},
|
|
2040
|
+
encapsulation: ViewEncapsulation.None,
|
|
2041
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
2042
|
+
imports: [MatRipple, CdkObserveContent],
|
|
2043
|
+
template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
|
|
2044
|
+
styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"]
|
|
2045
|
+
}]
|
|
2046
|
+
}],
|
|
2047
|
+
ctorParameters: () => [],
|
|
2048
|
+
propDecorators: {
|
|
2049
|
+
fitInkBarToContent: [{
|
|
2050
|
+
type: Input,
|
|
2051
|
+
args: [{
|
|
2052
|
+
transform: booleanAttribute
|
|
2053
|
+
}]
|
|
2054
|
+
}],
|
|
2055
|
+
stretchTabs: [{
|
|
2056
|
+
type: Input,
|
|
2057
|
+
args: [{
|
|
2058
|
+
alias: 'mat-stretch-tabs',
|
|
2059
|
+
transform: booleanAttribute
|
|
2060
|
+
}]
|
|
2061
|
+
}],
|
|
2062
|
+
animationDuration: [{
|
|
2063
|
+
type: Input
|
|
2064
|
+
}],
|
|
2065
|
+
_items: [{
|
|
2066
|
+
type: ContentChildren,
|
|
2067
|
+
args: [forwardRef(() => MatTabLink), {
|
|
2068
|
+
descendants: true
|
|
2069
|
+
}]
|
|
2070
|
+
}],
|
|
2071
|
+
backgroundColor: [{
|
|
2072
|
+
type: Input
|
|
2073
|
+
}],
|
|
2074
|
+
disableRipple: [{
|
|
2075
|
+
type: Input,
|
|
2076
|
+
args: [{
|
|
2077
|
+
transform: booleanAttribute
|
|
2078
|
+
}]
|
|
2079
|
+
}],
|
|
2080
|
+
color: [{
|
|
2081
|
+
type: Input
|
|
2082
|
+
}],
|
|
2083
|
+
tabPanel: [{
|
|
2084
|
+
type: Input
|
|
2085
|
+
}],
|
|
2086
|
+
_tabListContainer: [{
|
|
2087
|
+
type: ViewChild,
|
|
2088
|
+
args: ['tabListContainer', {
|
|
2089
|
+
static: true
|
|
2090
|
+
}]
|
|
2091
|
+
}],
|
|
2092
|
+
_tabList: [{
|
|
2093
|
+
type: ViewChild,
|
|
2094
|
+
args: ['tabList', {
|
|
2095
|
+
static: true
|
|
2096
|
+
}]
|
|
2097
|
+
}],
|
|
2098
|
+
_tabListInner: [{
|
|
2099
|
+
type: ViewChild,
|
|
2100
|
+
args: ['tabListInner', {
|
|
2101
|
+
static: true
|
|
2102
|
+
}]
|
|
2103
|
+
}],
|
|
2104
|
+
_nextPaginator: [{
|
|
2105
|
+
type: ViewChild,
|
|
2106
|
+
args: ['nextPaginator']
|
|
2107
|
+
}],
|
|
2108
|
+
_previousPaginator: [{
|
|
2109
|
+
type: ViewChild,
|
|
2110
|
+
args: ['previousPaginator']
|
|
2111
|
+
}]
|
|
2112
|
+
}
|
|
2113
|
+
});
|
|
1898
2114
|
class MatTabLink extends InkBarItem {
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2115
|
+
_tabNavBar = inject(MatTabNav);
|
|
2116
|
+
elementRef = inject(ElementRef);
|
|
2117
|
+
_focusMonitor = inject(FocusMonitor);
|
|
2118
|
+
_destroyed = new Subject();
|
|
2119
|
+
_isActive = false;
|
|
2120
|
+
_tabIndex = computed(() => this._tabNavBar._focusedItem() === this ? this.tabIndex : -1, ...(ngDevMode ? [{
|
|
2121
|
+
debugName: "_tabIndex"
|
|
2122
|
+
}] : []));
|
|
2123
|
+
get active() {
|
|
2124
|
+
return this._isActive;
|
|
2125
|
+
}
|
|
2126
|
+
set active(value) {
|
|
2127
|
+
if (value !== this._isActive) {
|
|
2128
|
+
this._isActive = value;
|
|
2129
|
+
this._tabNavBar.updateActiveLink();
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
disabled = false;
|
|
2133
|
+
get disableRipple() {
|
|
2134
|
+
return this._disableRipple();
|
|
2135
|
+
}
|
|
2136
|
+
set disableRipple(value) {
|
|
2137
|
+
this._disableRipple.set(value);
|
|
2138
|
+
}
|
|
2139
|
+
_disableRipple = signal(false, ...(ngDevMode ? [{
|
|
2140
|
+
debugName: "_disableRipple"
|
|
2141
|
+
}] : []));
|
|
2142
|
+
tabIndex = 0;
|
|
2143
|
+
rippleConfig;
|
|
2144
|
+
get rippleDisabled() {
|
|
2145
|
+
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple || !!this.rippleConfig.disabled;
|
|
2146
|
+
}
|
|
2147
|
+
id = inject(_IdGenerator).getId('mat-tab-link-');
|
|
2148
|
+
constructor() {
|
|
2149
|
+
super();
|
|
2150
|
+
inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
|
|
2151
|
+
const globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {
|
|
2152
|
+
optional: true
|
|
2153
|
+
});
|
|
2154
|
+
const tabIndex = inject(new HostAttributeToken('tabindex'), {
|
|
2155
|
+
optional: true
|
|
2156
|
+
});
|
|
2157
|
+
this.rippleConfig = globalRippleOptions || {};
|
|
2158
|
+
this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;
|
|
2159
|
+
if (_animationsDisabled()) {
|
|
2160
|
+
this.rippleConfig.animation = {
|
|
2161
|
+
enterDuration: 0,
|
|
2162
|
+
exitDuration: 0
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
this._tabNavBar._fitInkBarToContent.pipe(takeUntil(this._destroyed)).subscribe(fitInkBarToContent => {
|
|
2166
|
+
this.fitInkBarToContent = fitInkBarToContent;
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
focus() {
|
|
2170
|
+
this.elementRef.nativeElement.focus();
|
|
2171
|
+
}
|
|
2172
|
+
ngAfterViewInit() {
|
|
2173
|
+
this._focusMonitor.monitor(this.elementRef);
|
|
2174
|
+
}
|
|
2175
|
+
ngOnDestroy() {
|
|
2176
|
+
this._destroyed.next();
|
|
2177
|
+
this._destroyed.complete();
|
|
2178
|
+
super.ngOnDestroy();
|
|
2179
|
+
this._focusMonitor.stopMonitoring(this.elementRef);
|
|
2180
|
+
}
|
|
2181
|
+
_handleFocus() {
|
|
2182
|
+
this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);
|
|
2183
|
+
}
|
|
2184
|
+
_handleKeydown(event) {
|
|
2185
|
+
if (event.keyCode === SPACE || event.keyCode === ENTER) {
|
|
2186
|
+
if (this.disabled) {
|
|
2187
|
+
event.preventDefault();
|
|
2188
|
+
} else if (this._tabNavBar.tabPanel) {
|
|
2189
|
+
if (event.keyCode === SPACE) {
|
|
2190
|
+
event.preventDefault();
|
|
2191
|
+
}
|
|
2192
|
+
this.elementRef.nativeElement.click();
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
_getAriaControls() {
|
|
2197
|
+
return this._tabNavBar.tabPanel ? this._tabNavBar.tabPanel?.id : this.elementRef.nativeElement.getAttribute('aria-controls');
|
|
2198
|
+
}
|
|
2199
|
+
_getAriaSelected() {
|
|
2200
|
+
if (this._tabNavBar.tabPanel) {
|
|
2201
|
+
return this.active ? 'true' : 'false';
|
|
2202
|
+
} else {
|
|
2203
|
+
return this.elementRef.nativeElement.getAttribute('aria-selected');
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
_getAriaCurrent() {
|
|
2207
|
+
return this.active && !this._tabNavBar.tabPanel ? 'page' : null;
|
|
2208
|
+
}
|
|
2209
|
+
_getRole() {
|
|
2210
|
+
return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');
|
|
2211
|
+
}
|
|
2212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2213
|
+
minVersion: "12.0.0",
|
|
2214
|
+
version: "20.2.0-next.2",
|
|
2215
|
+
ngImport: i0,
|
|
2216
|
+
type: MatTabLink,
|
|
2217
|
+
deps: [],
|
|
2218
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2219
|
+
});
|
|
2220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2221
|
+
minVersion: "16.1.0",
|
|
2222
|
+
version: "20.2.0-next.2",
|
|
2223
|
+
type: MatTabLink,
|
|
2224
|
+
isStandalone: true,
|
|
2225
|
+
selector: "[mat-tab-link], [matTabLink]",
|
|
2226
|
+
inputs: {
|
|
2227
|
+
active: ["active", "active", booleanAttribute],
|
|
2228
|
+
disabled: ["disabled", "disabled", booleanAttribute],
|
|
2229
|
+
disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
|
|
2230
|
+
tabIndex: ["tabIndex", "tabIndex", value => value == null ? 0 : numberAttribute(value)],
|
|
2231
|
+
id: "id"
|
|
2232
|
+
},
|
|
2233
|
+
host: {
|
|
2234
|
+
listeners: {
|
|
2235
|
+
"focus": "_handleFocus()",
|
|
2236
|
+
"keydown": "_handleKeydown($event)"
|
|
2237
|
+
},
|
|
2238
|
+
properties: {
|
|
2239
|
+
"attr.aria-controls": "_getAriaControls()",
|
|
2240
|
+
"attr.aria-current": "_getAriaCurrent()",
|
|
2241
|
+
"attr.aria-disabled": "disabled",
|
|
2242
|
+
"attr.aria-selected": "_getAriaSelected()",
|
|
2243
|
+
"attr.id": "id",
|
|
2244
|
+
"attr.tabIndex": "_tabIndex()",
|
|
2245
|
+
"attr.role": "_getRole()",
|
|
2246
|
+
"class.mat-mdc-tab-disabled": "disabled",
|
|
2247
|
+
"class.mdc-tab--active": "active"
|
|
2248
|
+
},
|
|
2249
|
+
classAttribute: "mdc-tab mat-mdc-tab-link mat-focus-indicator"
|
|
2250
|
+
},
|
|
2251
|
+
exportAs: ["matTabLink"],
|
|
2252
|
+
usesInheritance: true,
|
|
2253
|
+
ngImport: i0,
|
|
2254
|
+
template: "<span class=\"mdc-tab__ripple\"></span>\n\n<div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"elementRef.nativeElement\"\n [matRippleDisabled]=\"rippleDisabled\"></div>\n\n<span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <ng-content></ng-content>\n </span>\n</span>\n\n",
|
|
2255
|
+
styles: [".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\n"],
|
|
2256
|
+
dependencies: [{
|
|
2257
|
+
kind: "directive",
|
|
2258
|
+
type: MatRipple,
|
|
2259
|
+
selector: "[mat-ripple], [matRipple]",
|
|
2260
|
+
inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
|
|
2261
|
+
exportAs: ["matRipple"]
|
|
2262
|
+
}],
|
|
2263
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2264
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2265
|
+
});
|
|
2018
2266
|
}
|
|
2019
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2267
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2268
|
+
minVersion: "12.0.0",
|
|
2269
|
+
version: "20.2.0-next.2",
|
|
2270
|
+
ngImport: i0,
|
|
2271
|
+
type: MatTabLink,
|
|
2272
|
+
decorators: [{
|
|
2273
|
+
type: Component,
|
|
2274
|
+
args: [{
|
|
2275
|
+
selector: '[mat-tab-link], [matTabLink]',
|
|
2276
|
+
exportAs: 'matTabLink',
|
|
2277
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2278
|
+
encapsulation: ViewEncapsulation.None,
|
|
2279
|
+
host: {
|
|
2280
|
+
'class': 'mdc-tab mat-mdc-tab-link mat-focus-indicator',
|
|
2281
|
+
'[attr.aria-controls]': '_getAriaControls()',
|
|
2282
|
+
'[attr.aria-current]': '_getAriaCurrent()',
|
|
2283
|
+
'[attr.aria-disabled]': 'disabled',
|
|
2284
|
+
'[attr.aria-selected]': '_getAriaSelected()',
|
|
2285
|
+
'[attr.id]': 'id',
|
|
2286
|
+
'[attr.tabIndex]': '_tabIndex()',
|
|
2287
|
+
'[attr.role]': '_getRole()',
|
|
2288
|
+
'[class.mat-mdc-tab-disabled]': 'disabled',
|
|
2289
|
+
'[class.mdc-tab--active]': 'active',
|
|
2290
|
+
'(focus)': '_handleFocus()',
|
|
2291
|
+
'(keydown)': '_handleKeydown($event)'
|
|
2292
|
+
},
|
|
2293
|
+
imports: [MatRipple],
|
|
2294
|
+
template: "<span class=\"mdc-tab__ripple\"></span>\n\n<div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"elementRef.nativeElement\"\n [matRippleDisabled]=\"rippleDisabled\"></div>\n\n<span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <ng-content></ng-content>\n </span>\n</span>\n\n",
|
|
2295
|
+
styles: [".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\n"]
|
|
2296
|
+
}]
|
|
2297
|
+
}],
|
|
2298
|
+
ctorParameters: () => [],
|
|
2299
|
+
propDecorators: {
|
|
2300
|
+
active: [{
|
|
2301
|
+
type: Input,
|
|
2302
|
+
args: [{
|
|
2303
|
+
transform: booleanAttribute
|
|
2304
|
+
}]
|
|
2305
|
+
}],
|
|
2306
|
+
disabled: [{
|
|
2307
|
+
type: Input,
|
|
2308
|
+
args: [{
|
|
2309
|
+
transform: booleanAttribute
|
|
2310
|
+
}]
|
|
2311
|
+
}],
|
|
2312
|
+
disableRipple: [{
|
|
2313
|
+
type: Input,
|
|
2314
|
+
args: [{
|
|
2315
|
+
transform: booleanAttribute
|
|
2316
|
+
}]
|
|
2317
|
+
}],
|
|
2318
|
+
tabIndex: [{
|
|
2319
|
+
type: Input,
|
|
2320
|
+
args: [{
|
|
2321
|
+
transform: value => value == null ? 0 : numberAttribute(value)
|
|
2322
|
+
}]
|
|
2323
|
+
}],
|
|
2324
|
+
id: [{
|
|
2325
|
+
type: Input
|
|
2326
|
+
}]
|
|
2327
|
+
}
|
|
2328
|
+
});
|
|
2055
2329
|
class MatTabNavPanel {
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2330
|
+
id = inject(_IdGenerator).getId('mat-tab-nav-panel-');
|
|
2331
|
+
_activeTabId;
|
|
2332
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2333
|
+
minVersion: "12.0.0",
|
|
2334
|
+
version: "20.2.0-next.2",
|
|
2335
|
+
ngImport: i0,
|
|
2336
|
+
type: MatTabNavPanel,
|
|
2337
|
+
deps: [],
|
|
2338
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2339
|
+
});
|
|
2340
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2341
|
+
minVersion: "14.0.0",
|
|
2342
|
+
version: "20.2.0-next.2",
|
|
2343
|
+
type: MatTabNavPanel,
|
|
2344
|
+
isStandalone: true,
|
|
2345
|
+
selector: "mat-tab-nav-panel",
|
|
2346
|
+
inputs: {
|
|
2347
|
+
id: "id"
|
|
2348
|
+
},
|
|
2349
|
+
host: {
|
|
2350
|
+
attributes: {
|
|
2351
|
+
"role": "tabpanel"
|
|
2352
|
+
},
|
|
2353
|
+
properties: {
|
|
2354
|
+
"attr.aria-labelledby": "_activeTabId",
|
|
2355
|
+
"attr.id": "id"
|
|
2356
|
+
},
|
|
2357
|
+
classAttribute: "mat-mdc-tab-nav-panel"
|
|
2358
|
+
},
|
|
2359
|
+
exportAs: ["matTabNavPanel"],
|
|
2360
|
+
ngImport: i0,
|
|
2361
|
+
template: '<ng-content></ng-content>',
|
|
2362
|
+
isInline: true,
|
|
2363
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2364
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
2365
|
+
});
|
|
2062
2366
|
}
|
|
2063
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2367
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2368
|
+
minVersion: "12.0.0",
|
|
2369
|
+
version: "20.2.0-next.2",
|
|
2370
|
+
ngImport: i0,
|
|
2371
|
+
type: MatTabNavPanel,
|
|
2372
|
+
decorators: [{
|
|
2373
|
+
type: Component,
|
|
2374
|
+
args: [{
|
|
2375
|
+
selector: 'mat-tab-nav-panel',
|
|
2376
|
+
exportAs: 'matTabNavPanel',
|
|
2377
|
+
template: '<ng-content></ng-content>',
|
|
2378
|
+
host: {
|
|
2379
|
+
'[attr.aria-labelledby]': '_activeTabId',
|
|
2380
|
+
'[attr.id]': 'id',
|
|
2381
|
+
'class': 'mat-mdc-tab-nav-panel',
|
|
2382
|
+
'role': 'tabpanel'
|
|
2383
|
+
},
|
|
2384
|
+
encapsulation: ViewEncapsulation.None,
|
|
2385
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2386
|
+
}]
|
|
2387
|
+
}],
|
|
2388
|
+
propDecorators: {
|
|
2389
|
+
id: [{
|
|
2390
|
+
type: Input
|
|
2391
|
+
}]
|
|
2392
|
+
}
|
|
2393
|
+
});
|
|
2081
2394
|
|
|
2082
2395
|
class MatTabsModule {
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2397
|
+
minVersion: "12.0.0",
|
|
2398
|
+
version: "20.2.0-next.2",
|
|
2399
|
+
ngImport: i0,
|
|
2400
|
+
type: MatTabsModule,
|
|
2401
|
+
deps: [],
|
|
2402
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
2403
|
+
});
|
|
2404
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
2405
|
+
minVersion: "14.0.0",
|
|
2406
|
+
version: "20.2.0-next.2",
|
|
2407
|
+
ngImport: i0,
|
|
2408
|
+
type: MatTabsModule,
|
|
2409
|
+
imports: [MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink],
|
|
2410
|
+
exports: [BidiModule, MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink]
|
|
2411
|
+
});
|
|
2412
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
2413
|
+
minVersion: "12.0.0",
|
|
2414
|
+
version: "20.2.0-next.2",
|
|
2415
|
+
ngImport: i0,
|
|
2416
|
+
type: MatTabsModule,
|
|
2417
|
+
imports: [BidiModule]
|
|
2418
|
+
});
|
|
2093
2419
|
}
|
|
2094
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
],
|
|
2108
|
-
}]
|
|
2109
|
-
}] });
|
|
2420
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2421
|
+
minVersion: "12.0.0",
|
|
2422
|
+
version: "20.2.0-next.2",
|
|
2423
|
+
ngImport: i0,
|
|
2424
|
+
type: MatTabsModule,
|
|
2425
|
+
decorators: [{
|
|
2426
|
+
type: NgModule,
|
|
2427
|
+
args: [{
|
|
2428
|
+
imports: [MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink],
|
|
2429
|
+
exports: [BidiModule, MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink]
|
|
2430
|
+
}]
|
|
2431
|
+
}]
|
|
2432
|
+
});
|
|
2110
2433
|
|
|
2111
2434
|
export { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_CONTENT, MAT_TAB_GROUP, MAT_TAB_LABEL, MatInkBar, MatPaginatedTabHeader, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabNavPanel, MatTabsModule, _MAT_INK_BAR_POSITIONER };
|
|
2112
2435
|
//# sourceMappingURL=tabs.mjs.map
|