@angular/material 12.2.6 → 12.2.7
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/bundles/material-core.umd.js +7 -17
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-list.umd.js +3 -3
- package/bundles/material-select.umd.js +3 -1
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +19 -20
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-tabs.umd.js +22 -8
- package/bundles/material-tabs.umd.js.map +1 -1
- package/core/common-behaviors/common-module.d.ts +0 -4
- package/core/index.metadata.json +1 -1
- package/esm2015/core/common-behaviors/common-module.js +4 -13
- package/esm2015/core/version.js +1 -1
- package/esm2015/list/list.js +2 -2
- package/esm2015/list/selection-list.js +1 -1
- package/esm2015/select/select.js +4 -2
- package/esm2015/snack-bar/testing/snack-bar-harness.js +20 -21
- package/esm2015/tabs/public-api.js +2 -2
- package/esm2015/tabs/tab-label.js +16 -2
- package/esm2015/tabs/tab.js +9 -8
- package/fesm2015/core.js +4 -14
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/list.js +3 -3
- package/fesm2015/select.js +3 -1
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/snack-bar/testing.js +19 -20
- package/fesm2015/snack-bar/testing.js.map +1 -1
- package/fesm2015/tabs.js +23 -8
- package/fesm2015/tabs.js.map +1 -1
- package/list/index.metadata.json +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/select/index.metadata.json +1 -1
- package/snack-bar/testing/snack-bar-harness.d.ts +8 -9
- package/tabs/index.metadata.json +1 -1
- package/tabs/public-api.d.ts +1 -1
- package/tabs/tab-label.d.ts +8 -1
- package/tabs/tab.d.ts +1 -1
package/fesm2015/tabs.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FocusKeyManager, FocusMonitor, A11yModule } from '@angular/cdk/a11y';
|
|
|
2
2
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
3
3
|
import { CdkPortal, TemplatePortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
|
-
import { InjectionToken, Directive, ElementRef, NgZone, Inject, Optional, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation,
|
|
5
|
+
import { InjectionToken, Directive, ElementRef, NgZone, Inject, Optional, TemplateRef, ViewContainerRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, ViewChild, Input, ComponentFactoryResolver, forwardRef, EventEmitter, ChangeDetectorRef, Output, QueryList, ContentChildren, Attribute, NgModule } from '@angular/core';
|
|
6
6
|
import { mixinDisabled, mixinColor, mixinDisableRipple, mixinTabIndex, MAT_RIPPLE_GLOBAL_OPTIONS, RippleRenderer, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
7
7
|
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
8
8
|
import { Subject, Subscription, merge, fromEvent, of, timer } from 'rxjs';
|
|
@@ -142,8 +142,17 @@ MatTabContent.ctorParameters = () => [
|
|
|
142
142
|
* retention of the class and its directive metadata.
|
|
143
143
|
*/
|
|
144
144
|
const MAT_TAB_LABEL = new InjectionToken('MatTabLabel');
|
|
145
|
+
/**
|
|
146
|
+
* Used to provide a tab label to a tab without causing a circular dependency.
|
|
147
|
+
* @docs-private
|
|
148
|
+
*/
|
|
149
|
+
const MAT_TAB = new InjectionToken('MAT_TAB');
|
|
145
150
|
/** Used to flag tab labels for use with the portal directive */
|
|
146
151
|
class MatTabLabel extends CdkPortal {
|
|
152
|
+
constructor(templateRef, viewContainerRef, _closestTab) {
|
|
153
|
+
super(templateRef, viewContainerRef);
|
|
154
|
+
this._closestTab = _closestTab;
|
|
155
|
+
}
|
|
147
156
|
}
|
|
148
157
|
MatTabLabel.decorators = [
|
|
149
158
|
{ type: Directive, args: [{
|
|
@@ -151,6 +160,11 @@ MatTabLabel.decorators = [
|
|
|
151
160
|
providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }],
|
|
152
161
|
},] }
|
|
153
162
|
];
|
|
163
|
+
MatTabLabel.ctorParameters = () => [
|
|
164
|
+
{ type: TemplateRef },
|
|
165
|
+
{ type: ViewContainerRef },
|
|
166
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_TAB,] }, { type: Optional }] }
|
|
167
|
+
];
|
|
154
168
|
|
|
155
169
|
/**
|
|
156
170
|
* @license
|
|
@@ -219,11 +233,11 @@ class MatTab extends _MatTabBase {
|
|
|
219
233
|
* @docs-private
|
|
220
234
|
*/
|
|
221
235
|
_setTemplateLabelInput(value) {
|
|
222
|
-
// Only update the
|
|
223
|
-
//
|
|
224
|
-
//
|
|
225
|
-
//
|
|
226
|
-
if (value) {
|
|
236
|
+
// Only update the label if the query managed to find one. This works around an issue where a
|
|
237
|
+
// user may have manually set `templateLabel` during creation mode, which would then get
|
|
238
|
+
// clobbered by `undefined` when the query resolves. Also note that we check that the closest
|
|
239
|
+
// tab matches the current one so that we don't pick up labels from nested tabs.
|
|
240
|
+
if (value && value._closestTab === this) {
|
|
227
241
|
this._templateLabel = value;
|
|
228
242
|
}
|
|
229
243
|
}
|
|
@@ -236,7 +250,8 @@ MatTab.decorators = [
|
|
|
236
250
|
// tslint:disable-next-line:validate-decorators
|
|
237
251
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
238
252
|
encapsulation: ViewEncapsulation.None,
|
|
239
|
-
exportAs: 'matTab'
|
|
253
|
+
exportAs: 'matTab',
|
|
254
|
+
providers: [{ provide: MAT_TAB, useExisting: MatTab }]
|
|
240
255
|
},] }
|
|
241
256
|
];
|
|
242
257
|
MatTab.ctorParameters = () => [
|
|
@@ -1742,5 +1757,5 @@ MatTabsModule.decorators = [
|
|
|
1742
1757
|
* Generated bundle index. Do not edit.
|
|
1743
1758
|
*/
|
|
1744
1759
|
|
|
1745
|
-
export { MAT_TABS_CONFIG, MAT_TAB_GROUP, MatInkBar, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MatTabBodyBase, _MatTabGroupBase, _MatTabHeaderBase, _MatTabLinkBase, _MatTabNavBase, matTabsAnimations, _MAT_INK_BAR_POSITIONER_FACTORY as ɵangular_material_src_material_tabs_tabs_a, MAT_TAB_LABEL as ɵangular_material_src_material_tabs_tabs_b, MAT_TAB_CONTENT as ɵangular_material_src_material_tabs_tabs_c, MatPaginatedTabHeader as ɵangular_material_src_material_tabs_tabs_d };
|
|
1760
|
+
export { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_GROUP, MatInkBar, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MatTabBodyBase, _MatTabGroupBase, _MatTabHeaderBase, _MatTabLinkBase, _MatTabNavBase, matTabsAnimations, _MAT_INK_BAR_POSITIONER_FACTORY as ɵangular_material_src_material_tabs_tabs_a, MAT_TAB_LABEL as ɵangular_material_src_material_tabs_tabs_b, MAT_TAB_CONTENT as ɵangular_material_src_material_tabs_tabs_c, MatPaginatedTabHeader as ɵangular_material_src_material_tabs_tabs_d };
|
|
1746
1761
|
//# sourceMappingURL=tabs.js.map
|