@angular/material 12.0.1 → 12.0.2
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/_index.scss +2 -1
- package/bottom-sheet/bottom-sheet-container.d.ts +0 -2
- package/bottom-sheet/index.metadata.json +1 -1
- package/bundles/material-bottom-sheet.umd.js +7 -15
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.js +1 -1
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-core.umd.js +2 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.js +13 -14
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-dialog.umd.js +11 -19
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-input.umd.js +7 -1
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +4 -4
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-tabs.umd.js +4 -2
- package/bundles/material-tabs.umd.js.map +1 -1
- package/checkbox/index.metadata.json +1 -1
- package/core/index.metadata.json +1 -1
- package/core/ripple/ripple.d.ts +3 -3
- package/datepicker/datepicker-base.d.ts +6 -2
- package/datepicker/index.metadata.json +1 -1
- package/dialog/dialog-container.d.ts +0 -2
- package/dialog/index.metadata.json +1 -1
- package/esm2015/bottom-sheet/bottom-sheet-container.js +5 -12
- package/esm2015/checkbox/checkbox.js +2 -2
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/ripple/ripple.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/datepicker-base.js +9 -9
- package/esm2015/datepicker/datepicker-intl.js +3 -3
- package/esm2015/dialog/dialog-container.js +5 -12
- package/esm2015/input/input.js +9 -3
- package/esm2015/slide-toggle/slide-toggle.js +5 -5
- package/esm2015/tabs/tab-group.js +4 -2
- package/esm2015/tabs/tab.js +3 -3
- package/fesm2015/bottom-sheet.js +4 -11
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/checkbox.js +1 -1
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +10 -10
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +4 -11
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/input.js +8 -2
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/slide-toggle.js +4 -4
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/tabs.js +4 -2
- package/fesm2015/tabs.js.map +1 -1
- package/input/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/slide-toggle/index.metadata.json +1 -1
- package/slide-toggle/slide-toggle.d.ts +3 -2
- package/tabs/index.metadata.json +1 -1
package/fesm2015/datepicker.js
CHANGED
|
@@ -12,6 +12,7 @@ import { ESCAPE, hasModifierKey, SPACE, ENTER, PAGE_DOWN, PAGE_UP, END, HOME, DO
|
|
|
12
12
|
import { Directionality } from '@angular/cdk/bidi';
|
|
13
13
|
import { take, startWith, filter } from 'rxjs/operators';
|
|
14
14
|
import { coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';
|
|
15
|
+
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
15
16
|
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
16
17
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, NgControl, NgForm, FormGroupDirective, ControlContainer } from '@angular/forms';
|
|
17
18
|
import { MatFormField, MAT_FORM_FIELD, MatFormFieldControl } from '@angular/material/form-field';
|
|
@@ -61,9 +62,9 @@ class MatDatepickerIntl {
|
|
|
61
62
|
/** A label for the next year button (used by screen readers). */
|
|
62
63
|
this.nextYearLabel = 'Next year';
|
|
63
64
|
/** A label for the previous multi-year button (used by screen readers). */
|
|
64
|
-
this.prevMultiYearLabel = 'Previous
|
|
65
|
+
this.prevMultiYearLabel = 'Previous 24 years';
|
|
65
66
|
/** A label for the next multi-year button (used by screen readers). */
|
|
66
|
-
this.nextMultiYearLabel = 'Next
|
|
67
|
+
this.nextMultiYearLabel = 'Next 24 years';
|
|
67
68
|
/** A label for the 'switch to month view' button (used by screen readers). */
|
|
68
69
|
this.switchToMonthViewLabel = 'Choose date';
|
|
69
70
|
/** A label for the 'switch to year view' button (used by screen readers). */
|
|
@@ -1938,13 +1939,17 @@ class MatDatepickerBase {
|
|
|
1938
1939
|
* @deprecated `_dialog` parameter is no longer being used and it will be removed.
|
|
1939
1940
|
* @breaking-change 13.0.0
|
|
1940
1941
|
*/
|
|
1941
|
-
_dialog, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir,
|
|
1942
|
+
_dialog, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir,
|
|
1943
|
+
/**
|
|
1944
|
+
* @deprecated No longer being used. To be removed.
|
|
1945
|
+
* @breaking-change 13.0.0
|
|
1946
|
+
*/
|
|
1947
|
+
_document, _model) {
|
|
1942
1948
|
this._overlay = _overlay;
|
|
1943
1949
|
this._ngZone = _ngZone;
|
|
1944
1950
|
this._viewContainerRef = _viewContainerRef;
|
|
1945
1951
|
this._dateAdapter = _dateAdapter;
|
|
1946
1952
|
this._dir = _dir;
|
|
1947
|
-
this._document = _document;
|
|
1948
1953
|
this._model = _model;
|
|
1949
1954
|
this._inputStateChanges = Subscription.EMPTY;
|
|
1950
1955
|
/** The view that the calendar should start in. */
|
|
@@ -2128,18 +2133,13 @@ class MatDatepickerBase {
|
|
|
2128
2133
|
}
|
|
2129
2134
|
/** Open the calendar. */
|
|
2130
2135
|
open() {
|
|
2131
|
-
var _a, _b;
|
|
2132
2136
|
if (this._opened || this.disabled) {
|
|
2133
2137
|
return;
|
|
2134
2138
|
}
|
|
2135
2139
|
if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2136
2140
|
throw Error('Attempted to open an MatDatepicker with no associated input.');
|
|
2137
2141
|
}
|
|
2138
|
-
|
|
2139
|
-
// point to the shadow root so we have to descend into it ourselves.
|
|
2140
|
-
const activeElement = (_a = this._document) === null || _a === void 0 ? void 0 : _a.activeElement;
|
|
2141
|
-
this._focusedElementBeforeOpen =
|
|
2142
|
-
((_b = activeElement === null || activeElement === void 0 ? void 0 : activeElement.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement) || activeElement;
|
|
2142
|
+
this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();
|
|
2143
2143
|
this._openOverlay();
|
|
2144
2144
|
this._opened = true;
|
|
2145
2145
|
this.openedStream.emit();
|