@angular/material 11.2.8 → 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.
- package/_theming.scss +4 -0
- package/bundles/material-autocomplete.umd.js +1 -1
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +17 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +4 -4
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +39 -5
- 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 +0 -2
- package/bundles/material-form-field.umd.js.map +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-list.umd.js +3 -1
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +1 -0
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +2 -1
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +11 -2
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +7 -7
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/core/index.metadata.json +1 -1
- package/core/ripple/ripple-renderer.d.ts +2 -0
- package/core/ripple/ripple.d.ts +2 -0
- package/datepicker/date-range-input-parts.d.ts +2 -0
- package/datepicker/date-range-input.d.ts +4 -1
- package/datepicker/date-selection-model.d.ts +2 -0
- package/datepicker/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete-trigger.js +2 -2
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/ripple/ripple-renderer.js +9 -1
- package/esm2015/core/ripple/ripple.js +8 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/date-range-input-parts.js +23 -1
- package/esm2015/datepicker/date-range-input.js +14 -3
- package/esm2015/datepicker/date-selection-model.js +3 -2
- package/esm2015/form-field/form-field.js +1 -3
- package/esm2015/list/selection-list.js +4 -2
- package/esm2015/paginator/paginator.js +2 -1
- package/esm2015/snack-bar/snack-bar-ref.js +2 -1
- package/esm2015/snack-bar/snack-bar.js +2 -2
- package/esm2015/tabs/paginated-tab-header.js +5 -3
- package/esm2015/tabs/tab-group.js +8 -1
- package/fesm2015/autocomplete.js +1 -1
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/core.js +17 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +37 -3
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/form-field.js +0 -2
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/list.js +3 -1
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/paginator.js +1 -0
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/snack-bar.js +2 -1
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/tabs.js +11 -2
- package/fesm2015/tabs.js.map +1 -1
- package/form-field/index.metadata.json +1 -1
- package/list/index.metadata.json +1 -1
- package/package.json +2 -2
- package/paginator/index.metadata.json +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/snack-bar/snack-bar.d.ts +1 -1
- package/tabs/index.metadata.json +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 (
|
|
3466
|
-
var 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);
|
|
@@ -3715,6 +3738,11 @@
|
|
|
3715
3738
|
if (!_dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
3716
3739
|
throw createMissingDateImplError('DateAdapter');
|
|
3717
3740
|
}
|
|
3741
|
+
// The datepicker module can be used both with MDC and non-MDC form fields. We have
|
|
3742
|
+
// to conditionally add the MDC input class so that the range picker looks correctly.
|
|
3743
|
+
if (_formField === null || _formField === void 0 ? void 0 : _formField._elementRef.nativeElement.classList.contains('mat-mdc-form-field')) {
|
|
3744
|
+
_elementRef.nativeElement.classList.add('mat-mdc-input-element');
|
|
3745
|
+
}
|
|
3718
3746
|
// TODO(crisbeto): remove `as any` after #18206 lands.
|
|
3719
3747
|
this.ngControl = control;
|
|
3720
3748
|
}
|
|
@@ -3943,13 +3971,19 @@
|
|
|
3943
3971
|
};
|
|
3944
3972
|
/** Whether the separate text should be hidden. */
|
|
3945
3973
|
MatDateRangeInput.prototype._shouldHideSeparator = function () {
|
|
3946
|
-
return (!this._formField || this._formField.
|
|
3974
|
+
return (!this._formField || (this._formField.getLabelId() &&
|
|
3975
|
+
!this._formField._shouldLabelFloat())) && this.empty;
|
|
3947
3976
|
};
|
|
3948
3977
|
/** Gets the value for the `aria-labelledby` attribute of the inputs. */
|
|
3949
3978
|
MatDateRangeInput.prototype._getAriaLabelledby = function () {
|
|
3950
3979
|
var formField = this._formField;
|
|
3951
3980
|
return formField && formField._hasFloatingLabel() ? formField._labelId : null;
|
|
3952
3981
|
};
|
|
3982
|
+
/** Updates the focused state of the range input. */
|
|
3983
|
+
MatDateRangeInput.prototype._updateFocus = function (origin) {
|
|
3984
|
+
this.focused = origin !== null;
|
|
3985
|
+
this.stateChanges.next();
|
|
3986
|
+
};
|
|
3953
3987
|
/** Re-runs the validators on the start/end inputs. */
|
|
3954
3988
|
MatDateRangeInput.prototype._revalidate = function () {
|
|
3955
3989
|
if (this._startInput) {
|
|
@@ -3973,7 +4007,7 @@
|
|
|
3973
4007
|
MatDateRangeInput.decorators = [
|
|
3974
4008
|
{ type: i0.Component, args: [{
|
|
3975
4009
|
selector: 'mat-date-range-input',
|
|
3976
|
-
template: "<div\n class=\"mat-date-range-input-container\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"
|
|
4010
|
+
template: "<div\n class=\"mat-date-range-input-container\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"_updateFocus($event)\">\n <div class=\"mat-date-range-input-start-wrapper\">\n <ng-content select=\"input[matStartDate]\"></ng-content>\n <span\n class=\"mat-date-range-input-mirror\"\n aria-hidden=\"true\">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class=\"mat-date-range-input-separator\"\n [class.mat-date-range-input-separator-hidden]=\"_shouldHideSeparator()\">{{separator}}</span>\n\n <div class=\"mat-date-range-input-end-wrapper\">\n <ng-content select=\"input[matEndDate]\"></ng-content>\n </div>\n</div>\n\n",
|
|
3977
4011
|
exportAs: 'matDateRangeInput',
|
|
3978
4012
|
host: {
|
|
3979
4013
|
'class': 'mat-date-range-input',
|