@angular/material 12.1.3 → 12.1.4
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 +2 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-menu.umd.js +19 -3
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-tabs.umd.js +5 -1
- package/bundles/material-tabs.umd.js.map +1 -1
- package/core/index.metadata.json +1 -1
- package/core/typography/_typography-deprecated.scss +1 -1
- package/core/typography/_typography-utils.scss +7 -0
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/menu/menu-item.js +20 -4
- package/esm2015/menu/menu-trigger.js +2 -2
- package/esm2015/tabs/tab-group.js +6 -2
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/menu.js +19 -3
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/tabs.js +5 -1
- package/fesm2015/tabs.js.map +1 -1
- package/form-field/_form-field-fill-theme.scss +2 -1
- package/form-field/_form-field-legacy-theme.scss +3 -1
- package/form-field/_form-field-outline-theme.scss +2 -1
- package/form-field/_form-field-theme.scss +4 -2
- package/input/_input-theme.scss +1 -1
- package/menu/index.metadata.json +1 -1
- package/menu/menu-item.d.ts +13 -2
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/select/_select-theme.scss +1 -1
- package/tabs/index.metadata.json +1 -1
|
@@ -536,13 +536,19 @@
|
|
|
536
536
|
* @deprecated `_document` parameter is no longer being used and will be removed.
|
|
537
537
|
* @breaking-change 12.0.0
|
|
538
538
|
*/
|
|
539
|
-
_document, _focusMonitor, _parentMenu
|
|
539
|
+
_document, _focusMonitor, _parentMenu,
|
|
540
|
+
/**
|
|
541
|
+
* @deprecated `_changeDetectorRef` to become a required parameter.
|
|
542
|
+
* @breaking-change 14.0.0
|
|
543
|
+
*/
|
|
544
|
+
_changeDetectorRef) {
|
|
540
545
|
var _this =
|
|
541
546
|
// @breaking-change 8.0.0 make `_focusMonitor` and `document` required params.
|
|
542
547
|
_super.call(this) || this;
|
|
543
548
|
_this._elementRef = _elementRef;
|
|
544
549
|
_this._focusMonitor = _focusMonitor;
|
|
545
550
|
_this._parentMenu = _parentMenu;
|
|
551
|
+
_this._changeDetectorRef = _changeDetectorRef;
|
|
546
552
|
/** ARIA role for the menu item. */
|
|
547
553
|
_this.role = 'menuitem';
|
|
548
554
|
/** Stream that emits when the menu item is hovered. */
|
|
@@ -627,6 +633,15 @@
|
|
|
627
633
|
}
|
|
628
634
|
return ((_b = clone.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || '';
|
|
629
635
|
};
|
|
636
|
+
MatMenuItem.prototype._setHighlighted = function (isHighlighted) {
|
|
637
|
+
var _a;
|
|
638
|
+
// We need to mark this for check for the case where the content is coming from a
|
|
639
|
+
// `matMenuContent` whose change detection tree is at the declaration position,
|
|
640
|
+
// not the insertion position. See #23175.
|
|
641
|
+
// @breaking-change 14.0.0 Remove null check for `_changeDetectorRef`.
|
|
642
|
+
this._highlighted = isHighlighted;
|
|
643
|
+
(_a = this._changeDetectorRef) === null || _a === void 0 ? void 0 : _a.markForCheck();
|
|
644
|
+
};
|
|
630
645
|
return MatMenuItem;
|
|
631
646
|
}(_MatMenuItemBase));
|
|
632
647
|
MatMenuItem.decorators = [
|
|
@@ -653,7 +668,8 @@
|
|
|
653
668
|
{ type: core.ElementRef },
|
|
654
669
|
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
|
|
655
670
|
{ type: a11y.FocusMonitor },
|
|
656
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_MENU_PANEL,] }, { type: core.Optional }] }
|
|
671
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [MAT_MENU_PANEL,] }, { type: core.Optional }] },
|
|
672
|
+
{ type: core.ChangeDetectorRef }
|
|
657
673
|
]; };
|
|
658
674
|
MatMenuItem.propDecorators = {
|
|
659
675
|
role: [{ type: core.Input }],
|
|
@@ -1332,7 +1348,7 @@
|
|
|
1332
1348
|
this._menuOpen = isOpen;
|
|
1333
1349
|
this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();
|
|
1334
1350
|
if (this.triggersSubmenu()) {
|
|
1335
|
-
this._menuItemInstance.
|
|
1351
|
+
this._menuItemInstance._setHighlighted(isOpen);
|
|
1336
1352
|
}
|
|
1337
1353
|
};
|
|
1338
1354
|
/**
|