@angular/material 11.1.0 → 11.1.1

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 (83) hide show
  1. package/autocomplete/index.metadata.json +1 -1
  2. package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
  3. package/bundles/material-autocomplete-testing.umd.js +45 -35
  4. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  5. package/bundles/material-autocomplete-testing.umd.min.js +2 -2
  6. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  7. package/bundles/material-autocomplete.umd.js +1 -1
  8. package/bundles/material-autocomplete.umd.min.js +1 -1
  9. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  10. package/bundles/material-checkbox-testing.umd.js +64 -63
  11. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  12. package/bundles/material-checkbox-testing.umd.min.js +2 -2
  13. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  14. package/bundles/material-core.umd.js +2 -2
  15. package/bundles/material-core.umd.js.map +1 -1
  16. package/bundles/material-core.umd.min.js +2 -2
  17. package/bundles/material-core.umd.min.js.map +1 -1
  18. package/bundles/material-datepicker.umd.js +17 -4
  19. package/bundles/material-datepicker.umd.js.map +1 -1
  20. package/bundles/material-datepicker.umd.min.js +8 -8
  21. package/bundles/material-datepicker.umd.min.js.map +1 -1
  22. package/bundles/material-form-field.umd.js +1 -1
  23. package/bundles/material-form-field.umd.min.js +1 -1
  24. package/bundles/material-form-field.umd.min.js.map +1 -1
  25. package/bundles/material-menu-testing.umd.js +85 -66
  26. package/bundles/material-menu-testing.umd.js.map +1 -1
  27. package/bundles/material-menu-testing.umd.min.js +2 -2
  28. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  29. package/bundles/material-paginator-testing.umd.js +41 -33
  30. package/bundles/material-paginator-testing.umd.js.map +1 -1
  31. package/bundles/material-paginator-testing.umd.min.js +2 -2
  32. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  33. package/bundles/material-radio-testing.umd.js +79 -62
  34. package/bundles/material-radio-testing.umd.js.map +1 -1
  35. package/bundles/material-radio-testing.umd.min.js +2 -2
  36. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  37. package/bundles/material-select-testing.umd.js +62 -51
  38. package/bundles/material-select-testing.umd.js.map +1 -1
  39. package/bundles/material-select-testing.umd.min.js +2 -2
  40. package/bundles/material-select-testing.umd.min.js.map +1 -1
  41. package/checkbox/testing/checkbox-harness.d.ts +21 -16
  42. package/core/index.metadata.json +1 -1
  43. package/datepicker/date-range-input.d.ts +1 -0
  44. package/datepicker/datepicker-input.d.ts +4 -2
  45. package/datepicker/index.metadata.json +1 -1
  46. package/esm2015/autocomplete/autocomplete.js +1 -1
  47. package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
  48. package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
  49. package/esm2015/core/common-behaviors/common-module.js +1 -1
  50. package/esm2015/core/version.js +1 -1
  51. package/esm2015/datepicker/date-range-input.js +10 -2
  52. package/esm2015/datepicker/datepicker-input.js +8 -1
  53. package/esm2015/datepicker/datepicker-toggle.js +2 -5
  54. package/esm2015/form-field/form-field.js +1 -1
  55. package/esm2015/menu/testing/menu-harness.js +44 -32
  56. package/esm2015/paginator/testing/paginator-harness.js +27 -25
  57. package/esm2015/radio/testing/radio-harness.js +40 -29
  58. package/esm2015/select/testing/select-harness.js +35 -29
  59. package/fesm2015/autocomplete/testing.js +26 -18
  60. package/fesm2015/autocomplete/testing.js.map +1 -1
  61. package/fesm2015/autocomplete.js +1 -1
  62. package/fesm2015/checkbox/testing.js +30 -35
  63. package/fesm2015/checkbox/testing.js.map +1 -1
  64. package/fesm2015/core.js +2 -2
  65. package/fesm2015/core.js.map +1 -1
  66. package/fesm2015/datepicker.js +15 -4
  67. package/fesm2015/datepicker.js.map +1 -1
  68. package/fesm2015/form-field.js +1 -1
  69. package/fesm2015/menu/testing.js +45 -33
  70. package/fesm2015/menu/testing.js.map +1 -1
  71. package/fesm2015/paginator/testing.js +26 -24
  72. package/fesm2015/paginator/testing.js.map +1 -1
  73. package/fesm2015/radio/testing.js +39 -28
  74. package/fesm2015/radio/testing.js.map +1 -1
  75. package/fesm2015/select/testing.js +35 -29
  76. package/fesm2015/select/testing.js.map +1 -1
  77. package/form-field/index.metadata.json +1 -1
  78. package/menu/testing/menu-harness.d.ts +39 -26
  79. package/package.json +2 -2
  80. package/paginator/testing/paginator-harness.d.ts +32 -19
  81. package/radio/testing/radio-harness.d.ts +39 -24
  82. package/schematics/ng-add/index.js +1 -1
  83. package/select/testing/select-harness.d.ts +28 -16
@@ -3102,14 +3102,17 @@
3102
3102
  function MatDatepickerInput(elementRef, dateAdapter, dateFormats, _formField) {
3103
3103
  var _this = _super.call(this, elementRef, dateAdapter, dateFormats) || this;
3104
3104
  _this._formField = _formField;
3105
+ _this._closedSubscription = rxjs.Subscription.EMPTY;
3105
3106
  _this._validator = forms.Validators.compose(_super.prototype._getValidators.call(_this));
3106
3107
  return _this;
3107
3108
  }
3108
3109
  Object.defineProperty(MatDatepickerInput.prototype, "matDatepicker", {
3109
3110
  /** The datepicker that this input is associated with. */
3110
3111
  set: function (datepicker) {
3112
+ var _this = this;
3111
3113
  if (datepicker) {
3112
3114
  this._datepicker = datepicker;
3115
+ this._closedSubscription = datepicker.closedStream.subscribe(function () { return _this._onTouched(); });
3113
3116
  this._registerModel(datepicker.registerInput(this));
3114
3117
  }
3115
3118
  },
@@ -3170,6 +3173,10 @@
3170
3173
  MatDatepickerInput.prototype.getStartValue = function () {
3171
3174
  return this.value;
3172
3175
  };
3176
+ MatDatepickerInput.prototype.ngOnDestroy = function () {
3177
+ _super.prototype.ngOnDestroy.call(this);
3178
+ this._closedSubscription.unsubscribe();
3179
+ };
3173
3180
  /** Opens the associated datepicker. */
3174
3181
  MatDatepickerInput.prototype._openPopup = function () {
3175
3182
  if (this._datepicker) {
@@ -3316,15 +3323,12 @@
3316
3323
  template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
3317
3324
  host: {
3318
3325
  'class': 'mat-datepicker-toggle',
3319
- // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the
3320
- // consumer may have provided, while still being able to receive focus.
3321
- '[attr.tabindex]': 'disabled ? null : -1',
3326
+ '[attr.tabindex]': 'null',
3322
3327
  '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
3323
3328
  '[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
3324
3329
  '[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
3325
3330
  // Used by the test harness to tie this toggle to its datepicker.
3326
3331
  '[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
3327
- '(focus)': '_button.focus()',
3328
3332
  },
3329
3333
  exportAs: 'matDatepickerToggle',
3330
3334
  encapsulation: i0.ViewEncapsulation.None,
@@ -3654,6 +3658,7 @@
3654
3658
  this._elementRef = _elementRef;
3655
3659
  this._dateAdapter = _dateAdapter;
3656
3660
  this._formField = _formField;
3661
+ this._closedSubscription = rxjs.Subscription.EMPTY;
3657
3662
  /** Unique ID for the input. */
3658
3663
  this.id = "mat-date-range-input-" + nextUniqueId++;
3659
3664
  /** Whether the control is focused. */
@@ -3712,9 +3717,16 @@
3712
3717
  /** The range picker that this input is associated with. */
3713
3718
  get: function () { return this._rangePicker; },
3714
3719
  set: function (rangePicker) {
3720
+ var _this = this;
3715
3721
  if (rangePicker) {
3716
3722
  this._model = rangePicker.registerInput(this);
3717
3723
  this._rangePicker = rangePicker;
3724
+ this._closedSubscription.unsubscribe();
3725
+ this._closedSubscription = rangePicker.closedStream.subscribe(function () {
3726
+ var _a, _b;
3727
+ (_a = _this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
3728
+ (_b = _this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
3729
+ });
3718
3730
  this._registerModel(this._model);
3719
3731
  }
3720
3732
  },
@@ -3859,6 +3871,7 @@
3859
3871
  }
3860
3872
  };
3861
3873
  MatDateRangeInput.prototype.ngOnDestroy = function () {
3874
+ this._closedSubscription.unsubscribe();
3862
3875
  this.stateChanges.complete();
3863
3876
  };
3864
3877
  /** Gets the date at which the calendar should start. */