@angular/material 11.1.1 → 11.1.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.
Files changed (64) hide show
  1. package/_theming.scss +14 -8
  2. package/bundles/material-core.umd.js +2 -2
  3. package/bundles/material-core.umd.js.map +1 -1
  4. package/bundles/material-core.umd.min.js +2 -2
  5. package/bundles/material-core.umd.min.js.map +1 -1
  6. package/bundles/material-datepicker.umd.js +2 -0
  7. package/bundles/material-datepicker.umd.js.map +1 -1
  8. package/bundles/material-datepicker.umd.min.js +1 -1
  9. package/bundles/material-datepicker.umd.min.js.map +1 -1
  10. package/bundles/material-expansion.umd.js +1 -1
  11. package/bundles/material-expansion.umd.min.js +6 -6
  12. package/bundles/material-expansion.umd.min.js.map +1 -1
  13. package/bundles/material-form-field.umd.js +1 -1
  14. package/bundles/material-form-field.umd.js.map +1 -1
  15. package/bundles/material-form-field.umd.min.js +1 -1
  16. package/bundles/material-form-field.umd.min.js.map +1 -1
  17. package/bundles/material-grid-list.umd.js +147 -145
  18. package/bundles/material-grid-list.umd.js.map +1 -1
  19. package/bundles/material-grid-list.umd.min.js +12 -19
  20. package/bundles/material-grid-list.umd.min.js.map +1 -1
  21. package/bundles/material-menu.umd.js +12 -22
  22. package/bundles/material-menu.umd.js.map +1 -1
  23. package/bundles/material-menu.umd.min.js +1 -1
  24. package/bundles/material-menu.umd.min.js.map +1 -1
  25. package/bundles/material-select.umd.js +5 -2
  26. package/bundles/material-select.umd.js.map +1 -1
  27. package/bundles/material-select.umd.min.js +5 -5
  28. package/bundles/material-select.umd.min.js.map +1 -1
  29. package/core/index.metadata.json +1 -1
  30. package/esm2015/core/common-behaviors/common-module.js +1 -1
  31. package/esm2015/core/version.js +1 -1
  32. package/esm2015/datepicker/month-view.js +3 -1
  33. package/esm2015/expansion/expansion-panel-header.js +1 -1
  34. package/esm2015/form-field/form-field-animations.js +2 -2
  35. package/esm2015/grid-list/public-api.js +3 -2
  36. package/esm2015/menu/menu-trigger.js +13 -23
  37. package/esm2015/menu/menu.js +1 -1
  38. package/esm2015/select/select.js +6 -3
  39. package/expansion/_expansion-mixins.scss +11 -0
  40. package/expansion/_expansion-theme.scss +3 -8
  41. package/expansion/index.metadata.json +1 -1
  42. package/fesm2015/core.js +2 -2
  43. package/fesm2015/core.js.map +1 -1
  44. package/fesm2015/datepicker.js +2 -0
  45. package/fesm2015/datepicker.js.map +1 -1
  46. package/fesm2015/expansion.js +1 -1
  47. package/fesm2015/form-field.js +1 -1
  48. package/fesm2015/form-field.js.map +1 -1
  49. package/fesm2015/grid-list.js +128 -126
  50. package/fesm2015/grid-list.js.map +1 -1
  51. package/fesm2015/menu.js +12 -22
  52. package/fesm2015/menu.js.map +1 -1
  53. package/fesm2015/select.js +5 -2
  54. package/fesm2015/select.js.map +1 -1
  55. package/form-field/index.metadata.json +1 -1
  56. package/grid-list/index.metadata.json +1 -1
  57. package/grid-list/public-api.d.ts +2 -1
  58. package/menu/index.metadata.json +1 -1
  59. package/menu/menu-trigger.d.ts +1 -3
  60. package/menu/menu.d.ts +4 -2
  61. package/package.json +2 -2
  62. package/schematics/ng-add/index.js +1 -1
  63. package/schematics/ng-add/setup-project.js +4 -3
  64. package/select/index.metadata.json +1 -1
@@ -42,7 +42,7 @@ var b=function b(t,e,a,n,r,i,o){void 0===r&&(r={}),void 0===i&&(i=t),this.value=
42
42
  *
43
43
  * Use of this source code is governed by an MIT-style license that can be
44
44
  * found in the LICENSE file at https://angular.io/license
45
- */function L(t,e){return t||new j(e)}j.decorators=[{type:i.Injectable}],j.ctorParameters=function(){return[{type:d.DateAdapter}]};var B={provide:N,deps:[[new i.Optional,new i.SkipSelf,N],d.DateAdapter],useFactory:L},z=function(){function t(t,e,a,n,r){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=a,this._dir=n,this._rangeStrategy=r,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this._userSelection=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof E?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnChanges=function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._dateSelected=function(t){var e,a,n=t.value,r=this._dateAdapter.getYear(this.activeDate),i=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.createDate(r,i,n);this._selected instanceof E?(e=this._getDateInCurrentMonth(this._selected.start),a=this._getDateInCurrentMonth(this._selected.end)):e=a=this._getDateInCurrentMonth(this._selected),e===n&&a===n||this.selectedChange.emit(o),this._userSelection.emit({value:o,event:t.event})},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case p.PAGE_UP:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case p.PAGE_DOWN:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case p.ENTER:case p.SPACE:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case p.ESCAPE:return void(null==this._previewEnd||p.hasModifierKey(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._init=function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()},t.prototype._focusActiveCell=function(t){this._matCalendarBody._focusActiveCell(t)},t.prototype._previewChanged=function(t){var e=t.value;if(this._rangeStrategy){var a=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(a.start),this._previewEnd=this._getCellCompareValue(a.end),this._changeDetectorRef.detectChanges()}},t.prototype._initWeekdays=function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),a=this._dateAdapter.getDayOfWeekNames("long").map((function(t,a){return{long:t,narrow:e[a]}}));this._weekdays=a.slice(t).concat(a.slice(0,t))},t.prototype._createWeekCells=function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var a=0,n=this._firstWeekOffset;a<t;a++,n++){7==n&&(this._weeks.push([]),n=0);var r=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),a+1),i=this._shouldEnableDate(r),o=this._dateAdapter.format(r,this._dateFormats.display.dateA11yLabel),s=this.dateClass?this.dateClass(r,"month"):void 0;this._weeks[this._weeks.length-1].push(new b(a+1,e[a],o,i,s,this._getCellCompareValue(r),r))}},t.prototype._shouldEnableDate=function(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))},t.prototype._getDateInCurrentMonth=function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null},t.prototype._hasSameMonthAndYear=function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))},t.prototype._getCellCompareValue=function(t){if(t){var e=this._dateAdapter.getYear(t),a=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,a,n).getTime()}return null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setRanges=function(t){t instanceof E?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)},t}();
45
+ */function L(t,e){return t||new j(e)}j.decorators=[{type:i.Injectable}],j.ctorParameters=function(){return[{type:d.DateAdapter}]};var B={provide:N,deps:[[new i.Optional,new i.SkipSelf,N],d.DateAdapter],useFactory:L},z=function(){function t(t,e,a,n,r){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=a,this._dir=n,this._rangeStrategy=r,this._rerenderSubscription=c.Subscription.EMPTY,this.selectedChange=new i.EventEmitter,this._userSelection=new i.EventEmitter,this.activeDateChange=new i.EventEmitter,this._activeDate=this._dateAdapter.today()}return Object.defineProperty(t.prototype,"activeDate",{get:function(){return this._activeDate},set:function(t){var e=this._activeDate,a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t instanceof E?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(h.startWith(null)).subscribe((function(){return t._init()}))},t.prototype.ngOnChanges=function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)},t.prototype.ngOnDestroy=function(){this._rerenderSubscription.unsubscribe()},t.prototype._dateSelected=function(t){var e,a,n=t.value,r=this._dateAdapter.getYear(this.activeDate),i=this._dateAdapter.getMonth(this.activeDate),o=this._dateAdapter.createDate(r,i,n);this._selected instanceof E?(e=this._getDateInCurrentMonth(this._selected.start),a=this._getDateInCurrentMonth(this._selected.end)):e=a=this._getDateInCurrentMonth(this._selected),e===n&&a===n||this.selectedChange.emit(o),this._userSelection.emit({value:o,event:t.event}),this._previewStart=this._previewEnd=null,this._changeDetectorRef.markForCheck()},t.prototype._handleCalendarBodyKeydown=function(t){var e=this._activeDate,a=this._isRtl();switch(t.keyCode){case p.LEFT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?1:-1);break;case p.RIGHT_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?-1:1);break;case p.UP_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case p.DOWN_ARROW:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case p.HOME:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case p.END:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case p.PAGE_UP:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case p.PAGE_DOWN:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case p.ENTER:case p.SPACE:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case p.ESCAPE:return void(null==this._previewEnd||p.hasModifierKey(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()},t.prototype._init=function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()},t.prototype._focusActiveCell=function(t){this._matCalendarBody._focusActiveCell(t)},t.prototype._previewChanged=function(t){var e=t.value;if(this._rangeStrategy){var a=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(a.start),this._previewEnd=this._getCellCompareValue(a.end),this._changeDetectorRef.detectChanges()}},t.prototype._initWeekdays=function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),a=this._dateAdapter.getDayOfWeekNames("long").map((function(t,a){return{long:t,narrow:e[a]}}));this._weekdays=a.slice(t).concat(a.slice(0,t))},t.prototype._createWeekCells=function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var a=0,n=this._firstWeekOffset;a<t;a++,n++){7==n&&(this._weeks.push([]),n=0);var r=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),a+1),i=this._shouldEnableDate(r),o=this._dateAdapter.format(r,this._dateFormats.display.dateA11yLabel),s=this.dateClass?this.dateClass(r,"month"):void 0;this._weeks[this._weeks.length-1].push(new b(a+1,e[a],o,i,s,this._getCellCompareValue(r),r))}},t.prototype._shouldEnableDate=function(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))},t.prototype._getDateInCurrentMonth=function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null},t.prototype._hasSameMonthAndYear=function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))},t.prototype._getCellCompareValue=function(t){if(t){var e=this._dateAdapter.getYear(t),a=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,a,n).getTime()}return null},t.prototype._isRtl=function(){return this._dir&&"rtl"===this._dir.value},t.prototype._setRanges=function(t){t instanceof E?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)},t}();
46
46
  /**
47
47
  * @license
48
48
  * Copyright Google LLC All Rights Reserved.