@angular/material 11.2.11 → 11.2.12

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 (34) hide show
  1. package/bundles/material-core.umd.js +17 -2
  2. package/bundles/material-core.umd.js.map +1 -1
  3. package/bundles/material-core.umd.min.js +4 -4
  4. package/bundles/material-core.umd.min.js.map +1 -1
  5. package/bundles/material-datepicker.umd.js +26 -3
  6. package/bundles/material-datepicker.umd.js.map +1 -1
  7. package/bundles/material-datepicker.umd.min.js +7 -7
  8. package/bundles/material-datepicker.umd.min.js.map +1 -1
  9. package/bundles/material-paginator.umd.js +1 -0
  10. package/bundles/material-paginator.umd.js.map +1 -1
  11. package/bundles/material-paginator.umd.min.js +1 -1
  12. package/bundles/material-paginator.umd.min.js.map +1 -1
  13. package/core/index.metadata.json +1 -1
  14. package/core/ripple/ripple-renderer.d.ts +2 -0
  15. package/core/ripple/ripple.d.ts +2 -0
  16. package/datepicker/date-range-input-parts.d.ts +2 -0
  17. package/datepicker/date-selection-model.d.ts +2 -0
  18. package/datepicker/index.metadata.json +1 -1
  19. package/esm2015/core/common-behaviors/common-module.js +1 -1
  20. package/esm2015/core/ripple/ripple-renderer.js +9 -1
  21. package/esm2015/core/ripple/ripple.js +8 -1
  22. package/esm2015/core/version.js +1 -1
  23. package/esm2015/datepicker/date-range-input-parts.js +23 -1
  24. package/esm2015/datepicker/date-selection-model.js +3 -2
  25. package/esm2015/paginator/paginator.js +2 -1
  26. package/fesm2015/core.js +17 -2
  27. package/fesm2015/core.js.map +1 -1
  28. package/fesm2015/datepicker.js +24 -1
  29. package/fesm2015/datepicker.js.map +1 -1
  30. package/fesm2015/paginator.js +1 -0
  31. package/fesm2015/paginator.js.map +1 -1
  32. package/package.json +2 -2
  33. package/paginator/index.metadata.json +1 -1
  34. package/schematics/ng-add/index.js +1 -1
@@ -409,8 +409,9 @@ class MatDateSelectionModel {
409
409
  * @param source Object that triggered the selection change.
410
410
  */
411
411
  updateSelection(value, source) {
412
+ const oldValue = this.selection;
412
413
  this.selection = value;
413
- this._selectionChanged.next({ selection: value, source });
414
+ this._selectionChanged.next({ selection: value, source, oldValue });
414
415
  }
415
416
  ngOnDestroy() {
416
417
  this._selectionChanged.complete();
@@ -3059,6 +3060,17 @@ class MatStartDate extends _MatDateRangeInputBase {
3059
3060
  _getValueFromModel(modelValue) {
3060
3061
  return modelValue.start;
3061
3062
  }
3063
+ _shouldHandleChangeEvent(change) {
3064
+ var _a;
3065
+ if (!super._shouldHandleChangeEvent(change)) {
3066
+ return false;
3067
+ }
3068
+ else {
3069
+ return !((_a = change.oldValue) === null || _a === void 0 ? void 0 : _a.start) ? !!change.selection.start :
3070
+ !change.selection.start ||
3071
+ !!this._dateAdapter.compareDate(change.oldValue.start, change.selection.start);
3072
+ }
3073
+ }
3062
3074
  _assignValueToModel(value) {
3063
3075
  if (this._model) {
3064
3076
  const range = new DateRange(value, this._model.selection.end);
@@ -3152,6 +3164,17 @@ class MatEndDate extends _MatDateRangeInputBase {
3152
3164
  _getValueFromModel(modelValue) {
3153
3165
  return modelValue.end;
3154
3166
  }
3167
+ _shouldHandleChangeEvent(change) {
3168
+ var _a;
3169
+ if (!super._shouldHandleChangeEvent(change)) {
3170
+ return false;
3171
+ }
3172
+ else {
3173
+ return !((_a = change.oldValue) === null || _a === void 0 ? void 0 : _a.end) ? !!change.selection.end :
3174
+ !change.selection.end ||
3175
+ !!this._dateAdapter.compareDate(change.oldValue.end, change.selection.end);
3176
+ }
3177
+ }
3155
3178
  _assignValueToModel(value) {
3156
3179
  if (this._model) {
3157
3180
  const range = new DateRange(this._model.selection.start, value);