igniteui-angular 22.2.0-rc.0 → 22.2.0-rc.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/fesm2022/igniteui-angular-combo.mjs +5 -9
- package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-core.mjs +32 -13
- package/fesm2022/igniteui-angular-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-date-picker.mjs +15 -32
- package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-input-group.mjs +34 -30
- package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-select.mjs +4 -8
- package/fesm2022/igniteui-angular-select.mjs.map +1 -1
- package/fesm2022/igniteui-angular-time-picker.mjs +7 -17
- package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
- package/migrations/common/UpdateChanges.d.ts +36 -0
- package/migrations/common/UpdateChanges.js +175 -31
- package/migrations/common/UpdateChanges.spec.js +66 -0
- package/migrations/update-22_2_0/index.spec.js +73 -0
- package/package.json +1 -1
- package/types/igniteui-angular-core.d.ts +15 -6
- package/types/igniteui-angular-input-group.d.ts +17 -3
- package/types/igniteui-angular-time-picker.d.ts +0 -1
|
@@ -6,7 +6,7 @@ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
|
6
6
|
import * as i4 from 'igniteui-angular/calendar';
|
|
7
7
|
import { IgxCalendarComponent, IgxCalendarHeaderTitleTemplateDirective, IgxCalendarHeaderTemplateDirective, IgxCalendarSubheaderTemplateDirective, CalendarSelection } from 'igniteui-angular/calendar';
|
|
8
8
|
import * as i3 from 'igniteui-angular/input-group';
|
|
9
|
-
import { IGX_INPUT_GROUP_TYPE, IgxInputGroupComponent, IgxPrefixDirective, IgxSuffixDirective, IgxHintDirective, IgxInputState, IgxInputDirective, IgxReadOnlyInputDirective, IgxLabelDirective, IgxInputGroupBase } from 'igniteui-angular/input-group';
|
|
9
|
+
import { IGX_INPUT_GROUP_TYPE, IgxInputGroupComponent, IgxPrefixDirective, IgxSuffixDirective, IgxHintDirective, toInputState, IgxInputState, IgxInputDirective, IgxReadOnlyInputDirective, IgxLabelDirective, IgxInputGroupBase } from 'igniteui-angular/input-group';
|
|
10
10
|
import { Subject, merge, noop, fromEvent } from 'rxjs';
|
|
11
11
|
import { takeUntil, filter } from 'rxjs/operators';
|
|
12
12
|
import { IgxButtonDirective, IgxRippleDirective, IgxDividerComponent, IgxDateTimeEditorDirective, IgxTextSelectionDirective } from 'igniteui-angular/directives';
|
|
@@ -986,12 +986,8 @@ class IgxDatePickerComponent extends PickerBaseDirective {
|
|
|
986
986
|
updateValidity() {
|
|
987
987
|
// B.P. 18 May 2021: IgxDatePicker does not reset its state upon resetForm #9526
|
|
988
988
|
if (this._control && !this.disabled && this._control.touchedOrDirty) {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
}
|
|
992
|
-
else {
|
|
993
|
-
this.inputDirective.valid = this._control.valid ? IgxInputState.INITIAL : IgxInputState.INVALID;
|
|
994
|
-
}
|
|
989
|
+
const showSuccess = this._control.hasValidators && this.inputGroup.isFocused;
|
|
990
|
+
this.inputDirective.valid = toInputState(this._control.status, showSuccess ? 'allowed' : 'suppressed');
|
|
995
991
|
}
|
|
996
992
|
else {
|
|
997
993
|
this.inputDirective.valid = IgxInputState.INITIAL;
|
|
@@ -2087,12 +2083,8 @@ class IgxDateRangePickerComponent extends PickerBaseDirective {
|
|
|
2087
2083
|
}
|
|
2088
2084
|
setValidityState(inputDirective, isFocused) {
|
|
2089
2085
|
if (this._control && !this._control.disabled && this._control.touchedOrDirty) {
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
}
|
|
2093
|
-
else {
|
|
2094
|
-
inputDirective.valid = this._control.valid ? IgxInputState.INITIAL : IgxInputState.INVALID;
|
|
2095
|
-
}
|
|
2086
|
+
const showSuccess = this._control.hasValidators && isFocused;
|
|
2087
|
+
inputDirective.valid = toInputState(this._control.status, showSuccess ? 'allowed' : 'suppressed');
|
|
2096
2088
|
}
|
|
2097
2089
|
else {
|
|
2098
2090
|
inputDirective.valid = IgxInputState.INITIAL;
|
|
@@ -2181,25 +2173,16 @@ class IgxDateRangePickerComponent extends PickerBaseDirective {
|
|
|
2181
2173
|
updateValidityOnBlur() {
|
|
2182
2174
|
this._focusedInput = null;
|
|
2183
2175
|
this.onTouchCallback();
|
|
2184
|
-
if (this.
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
}
|
|
2195
|
-
if (this.inputDirective) {
|
|
2196
|
-
if (!this._ngControl.valid) {
|
|
2197
|
-
this.inputDirective.valid = IgxInputState.INVALID;
|
|
2198
|
-
}
|
|
2199
|
-
else {
|
|
2200
|
-
this.inputDirective.valid = IgxInputState.INITIAL;
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2176
|
+
if (!this._control) {
|
|
2177
|
+
return;
|
|
2178
|
+
}
|
|
2179
|
+
// Blur never shows success, only the error.
|
|
2180
|
+
const state = toInputState(this._control.status, 'suppressed');
|
|
2181
|
+
if (this.hasProjectedInputs) {
|
|
2182
|
+
this.projectedInputs.forEach(i => i.updateInputValidity(state));
|
|
2183
|
+
}
|
|
2184
|
+
if (this.inputDirective) {
|
|
2185
|
+
this.inputDirective.valid = state;
|
|
2203
2186
|
}
|
|
2204
2187
|
}
|
|
2205
2188
|
updateDisabledState() {
|