@angular/material 18.2.5 → 18.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/chips/index.d.ts +5 -1
- package/esm2022/chips/chip-grid.mjs +9 -3
- package/esm2022/chips/chip-set.mjs +12 -15
- package/esm2022/chips/chip.mjs +11 -3
- package/esm2022/core/datetime/native-date-adapter.mjs +13 -2
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +3 -3
- package/fesm2022/chips.mjs +29 -18
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +13 -2
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +2 -2
- package/fesm2022/datepicker.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { startWith } from 'rxjs/operators';
|
|
|
13
13
|
import { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
14
14
|
|
|
15
15
|
/** Current version of Angular Material. */
|
|
16
|
-
const VERSION = new Version('18.2.
|
|
16
|
+
const VERSION = new Version('18.2.7');
|
|
17
17
|
|
|
18
18
|
/** @docs-private */
|
|
19
19
|
class AnimationCurves {
|
|
@@ -493,7 +493,18 @@ class NativeDateAdapter extends DateAdapter {
|
|
|
493
493
|
return this._format(dtf, date);
|
|
494
494
|
}
|
|
495
495
|
getFirstDayOfWeek() {
|
|
496
|
-
//
|
|
496
|
+
// At the time of writing `Intl.Locale` isn't available
|
|
497
|
+
// in the internal types so we need to cast to `any`.
|
|
498
|
+
if (typeof Intl !== 'undefined' && Intl.Locale) {
|
|
499
|
+
const locale = new Intl.Locale(this.locale);
|
|
500
|
+
// Some browsers implement a `getWeekInfo` method while others have a `weekInfo` getter.
|
|
501
|
+
// Note that this isn't supported in all browsers so we need to null check it.
|
|
502
|
+
const firstDay = (locale.getWeekInfo?.() || locale.weekInfo)?.firstDay ?? 0;
|
|
503
|
+
// `weekInfo.firstDay` is a number between 1 and 7 where, starting from Monday,
|
|
504
|
+
// whereas our representation is 0 to 6 where 0 is Sunday so we need to normalize it.
|
|
505
|
+
return firstDay === 7 ? 0 : firstDay;
|
|
506
|
+
}
|
|
507
|
+
// Default to Sunday if the browser doesn't provide the week information.
|
|
497
508
|
return 0;
|
|
498
509
|
}
|
|
499
510
|
getNumDaysInMonth(date) {
|