@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.
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
- package/bundles/material-autocomplete-testing.umd.js +45 -35
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +64 -63
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -2
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +2 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +2 -2
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +17 -4
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +8 -8
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +85 -66
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +41 -33
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -2
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +79 -62
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -2
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +62 -51
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/checkbox/testing/checkbox-harness.d.ts +21 -16
- package/core/index.metadata.json +1 -1
- package/datepicker/date-range-input.d.ts +1 -0
- package/datepicker/datepicker-input.d.ts +4 -2
- package/datepicker/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete.js +1 -1
- package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
- package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/date-range-input.js +10 -2
- package/esm2015/datepicker/datepicker-input.js +8 -1
- package/esm2015/datepicker/datepicker-toggle.js +2 -5
- package/esm2015/form-field/form-field.js +1 -1
- package/esm2015/menu/testing/menu-harness.js +44 -32
- package/esm2015/paginator/testing/paginator-harness.js +27 -25
- package/esm2015/radio/testing/radio-harness.js +40 -29
- package/esm2015/select/testing/select-harness.js +35 -29
- package/fesm2015/autocomplete/testing.js +26 -18
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +1 -1
- package/fesm2015/checkbox/testing.js +30 -35
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +15 -4
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/form-field.js +1 -1
- package/fesm2015/menu/testing.js +45 -33
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/paginator/testing.js +26 -24
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/radio/testing.js +39 -28
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/select/testing.js +35 -29
- package/fesm2015/select/testing.js.map +1 -1
- package/form-field/index.metadata.json +1 -1
- package/menu/testing/menu-harness.d.ts +39 -26
- package/package.json +2 -2
- package/paginator/testing/paginator-harness.d.ts +32 -19
- package/radio/testing/radio-harness.d.ts +39 -24
- package/schematics/ng-add/index.js +1 -1
- package/select/testing/select-harness.d.ts +28 -16
package/fesm2015/datepicker.js
CHANGED
|
@@ -2662,12 +2662,14 @@ class MatDatepickerInput extends MatDatepickerInputBase {
|
|
|
2662
2662
|
constructor(elementRef, dateAdapter, dateFormats, _formField) {
|
|
2663
2663
|
super(elementRef, dateAdapter, dateFormats);
|
|
2664
2664
|
this._formField = _formField;
|
|
2665
|
+
this._closedSubscription = Subscription.EMPTY;
|
|
2665
2666
|
this._validator = Validators.compose(super._getValidators());
|
|
2666
2667
|
}
|
|
2667
2668
|
/** The datepicker that this input is associated with. */
|
|
2668
2669
|
set matDatepicker(datepicker) {
|
|
2669
2670
|
if (datepicker) {
|
|
2670
2671
|
this._datepicker = datepicker;
|
|
2672
|
+
this._closedSubscription = datepicker.closedStream.subscribe(() => this._onTouched());
|
|
2671
2673
|
this._registerModel(datepicker.registerInput(this));
|
|
2672
2674
|
}
|
|
2673
2675
|
}
|
|
@@ -2713,6 +2715,10 @@ class MatDatepickerInput extends MatDatepickerInputBase {
|
|
|
2713
2715
|
getStartValue() {
|
|
2714
2716
|
return this.value;
|
|
2715
2717
|
}
|
|
2718
|
+
ngOnDestroy() {
|
|
2719
|
+
super.ngOnDestroy();
|
|
2720
|
+
this._closedSubscription.unsubscribe();
|
|
2721
|
+
}
|
|
2716
2722
|
/** Opens the associated datepicker. */
|
|
2717
2723
|
_openPopup() {
|
|
2718
2724
|
if (this._datepicker) {
|
|
@@ -2849,15 +2855,12 @@ MatDatepickerToggle.decorators = [
|
|
|
2849
2855
|
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",
|
|
2850
2856
|
host: {
|
|
2851
2857
|
'class': 'mat-datepicker-toggle',
|
|
2852
|
-
|
|
2853
|
-
// consumer may have provided, while still being able to receive focus.
|
|
2854
|
-
'[attr.tabindex]': 'disabled ? null : -1',
|
|
2858
|
+
'[attr.tabindex]': 'null',
|
|
2855
2859
|
'[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
|
|
2856
2860
|
'[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
|
|
2857
2861
|
'[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
|
|
2858
2862
|
// Used by the test harness to tie this toggle to its datepicker.
|
|
2859
2863
|
'[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
|
|
2860
|
-
'(focus)': '_button.focus()',
|
|
2861
2864
|
},
|
|
2862
2865
|
exportAs: 'matDatepickerToggle',
|
|
2863
2866
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -3182,6 +3185,7 @@ class MatDateRangeInput {
|
|
|
3182
3185
|
this._elementRef = _elementRef;
|
|
3183
3186
|
this._dateAdapter = _dateAdapter;
|
|
3184
3187
|
this._formField = _formField;
|
|
3188
|
+
this._closedSubscription = Subscription.EMPTY;
|
|
3185
3189
|
/** Unique ID for the input. */
|
|
3186
3190
|
this.id = `mat-date-range-input-${nextUniqueId++}`;
|
|
3187
3191
|
/** Whether the control is focused. */
|
|
@@ -3230,6 +3234,12 @@ class MatDateRangeInput {
|
|
|
3230
3234
|
if (rangePicker) {
|
|
3231
3235
|
this._model = rangePicker.registerInput(this);
|
|
3232
3236
|
this._rangePicker = rangePicker;
|
|
3237
|
+
this._closedSubscription.unsubscribe();
|
|
3238
|
+
this._closedSubscription = rangePicker.closedStream.subscribe(() => {
|
|
3239
|
+
var _a, _b;
|
|
3240
|
+
(_a = this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
|
|
3241
|
+
(_b = this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
|
|
3242
|
+
});
|
|
3233
3243
|
this._registerModel(this._model);
|
|
3234
3244
|
}
|
|
3235
3245
|
}
|
|
@@ -3342,6 +3352,7 @@ class MatDateRangeInput {
|
|
|
3342
3352
|
}
|
|
3343
3353
|
}
|
|
3344
3354
|
ngOnDestroy() {
|
|
3355
|
+
this._closedSubscription.unsubscribe();
|
|
3345
3356
|
this.stateChanges.complete();
|
|
3346
3357
|
}
|
|
3347
3358
|
/** Gets the date at which the calendar should start. */
|