@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
@@ -707,8 +707,9 @@
707
707
  * @param source Object that triggered the selection change.
708
708
  */
709
709
  MatDateSelectionModel.prototype.updateSelection = function (value, source) {
710
+ var oldValue = this.selection;
710
711
  this.selection = value;
711
- this._selectionChanged.next({ selection: value, source: source });
712
+ this._selectionChanged.next({ selection: value, source: source, oldValue: oldValue });
712
713
  };
713
714
  MatDateSelectionModel.prototype.ngOnDestroy = function () {
714
715
  this._selectionChanged.complete();
@@ -3462,8 +3463,8 @@
3462
3463
  MatDateRangeInputPartBase.prototype._parentDisabled = function () {
3463
3464
  return this._rangeInput._groupDisabled;
3464
3465
  };
3465
- MatDateRangeInputPartBase.prototype._shouldHandleChangeEvent = function (_a) {
3466
- var source = _a.source;
3466
+ MatDateRangeInputPartBase.prototype._shouldHandleChangeEvent = function (_b) {
3467
+ var source = _b.source;
3467
3468
  return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;
3468
3469
  };
3469
3470
  MatDateRangeInputPartBase.prototype._assignValueProgrammatically = function (value) {
@@ -3531,6 +3532,17 @@
3531
3532
  MatStartDate.prototype._getValueFromModel = function (modelValue) {
3532
3533
  return modelValue.start;
3533
3534
  };
3535
+ MatStartDate.prototype._shouldHandleChangeEvent = function (change) {
3536
+ var _a;
3537
+ if (!_super.prototype._shouldHandleChangeEvent.call(this, change)) {
3538
+ return false;
3539
+ }
3540
+ else {
3541
+ return !((_a = change.oldValue) === null || _a === void 0 ? void 0 : _a.start) ? !!change.selection.start :
3542
+ !change.selection.start ||
3543
+ !!this._dateAdapter.compareDate(change.oldValue.start, change.selection.start);
3544
+ }
3545
+ };
3534
3546
  MatStartDate.prototype._assignValueToModel = function (value) {
3535
3547
  if (this._model) {
3536
3548
  var range = new DateRange(value, this._model.selection.end);
@@ -3628,6 +3640,17 @@
3628
3640
  MatEndDate.prototype._getValueFromModel = function (modelValue) {
3629
3641
  return modelValue.end;
3630
3642
  };
3643
+ MatEndDate.prototype._shouldHandleChangeEvent = function (change) {
3644
+ var _a;
3645
+ if (!_super.prototype._shouldHandleChangeEvent.call(this, change)) {
3646
+ return false;
3647
+ }
3648
+ else {
3649
+ return !((_a = change.oldValue) === null || _a === void 0 ? void 0 : _a.end) ? !!change.selection.end :
3650
+ !change.selection.end ||
3651
+ !!this._dateAdapter.compareDate(change.oldValue.end, change.selection.end);
3652
+ }
3653
+ };
3631
3654
  MatEndDate.prototype._assignValueToModel = function (value) {
3632
3655
  if (this._model) {
3633
3656
  var range = new DateRange(this._model.selection.start, value);