Skip to content

Commit 93745db

Browse files
MKirovaMKirova
authored andcommitted
Merge branch 'mkirova/splitter-spec-changes' of https://github.com/IgniteUI/igniteui-angular.git
2 parents daa2bc0 + 6bf70df commit 93745db

22 files changed

+367
-96
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ All notable changes for each version of this project will be documented in this
88
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
99
- **Behavioral Change** - When a column is sortable sort indicator is always visible. The column is sorted when click on it.
1010

11+
- `IgxInputGroup`
12+
- **Renamed** `supressInputAutofocus` input to `suppressInputAutofocus`
13+
1114
### Themes
1215
- **Breaking Change** Change the default `$legacy-support` value to false in the `igx-theme` function.
1316

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
"version": "9.0.1",
7171
"description": "Updates Ignite UI for Angular from v9.0.0 to v9.0.1",
7272
"factory": "./update-9_0_1"
73+
},
74+
"migration-15": {
75+
"version": "9.1.0",
76+
"description": "Updates Ignite UI for Angular from v9.0.x to v9.1.0",
77+
"factory": "./update-9_1_0"
7378
}
7479
}
7580
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@scheme": "../../common/schema/binding.schema.json",
3+
"changes": [
4+
{
5+
"name": "supressInputAutofocus",
6+
"replaceWith": "suppressInputAutofocus",
7+
"owner": {
8+
"selector": "igx-input-group",
9+
"type": "component"
10+
}
11+
}
12+
]
13+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import * as path from 'path';
2+
3+
// tslint:disable:no-implicit-dependencies
4+
import { virtualFs } from '@angular-devkit/core';
5+
import { EmptyTree } from '@angular-devkit/schematics';
6+
// tslint:disable-next-line:no-submodule-imports
7+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
8+
9+
describe('Update 9.1.0', () => {
10+
let appTree: UnitTestTree;
11+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
12+
const configJson = {
13+
defaultProject: 'testProj',
14+
projects: {
15+
testProj: {
16+
sourceRoot: '/testSrc'
17+
}
18+
},
19+
schematics: {
20+
'@schematics/angular:component': {
21+
prefix: 'appPrefix'
22+
}
23+
}
24+
};
25+
26+
beforeEach(() => {
27+
appTree = new UnitTestTree(new EmptyTree());
28+
appTree.create('/angular.json', JSON.stringify(configJson));
29+
});
30+
31+
it('should update igx-group supressInputAutofocus to suppressInputAutofocus', done => {
32+
appTree.create(
33+
`/testSrc/appPrefix/component/input.component.html`,
34+
'<igx-input-group [supressInputAutofocus]="true"><input igxInput></igx-input-group>'
35+
);
36+
37+
const tree = schematicRunner.runSchematic('migration-15', {}, appTree);
38+
39+
expect(tree.readContent('/testSrc/appPrefix/component/input.component.html'))
40+
.toEqual('<igx-input-group [suppressInputAutofocus]="true"><input igxInput></igx-input-group>');
41+
42+
done();
43+
});
44+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '9.1.0';
9+
10+
export default function(): Rule {
11+
return (host: Tree, context: SchematicContext) => {
12+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
13+
14+
const update = new UpdateChanges(__dirname, host, context);
15+
update.applyChanges();
16+
};
17+
}

projects/igniteui-angular/src/lib/date-picker/date-picker.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</ng-template>
1717

1818
<ng-template #editableDatePickerTemplate>
19-
<igx-input-group #editableInputGroup [supressInputAutofocus]="true" (mousedown)="mouseDown($event)">
19+
<igx-input-group #editableInputGroup [suppressInputAutofocus]="true" (mousedown)="mouseDown($event)">
2020
<igx-prefix (click)="openDialog(editableInputGroup.element.nativeElement)">
2121
<igx-icon>today</igx-icon>
2222
</igx-prefix>

projects/igniteui-angular/src/lib/grids/filtering/advanced-filtering/advanced-filtering-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ <h6 class="igx-filter-empty__title">
184184
[locale]="grid.locale"
185185
[outlet]="grid.outletDirective">
186186
<ng-template igxDatePickerTemplate let-openDialog="openDialog" let-value="value">
187-
<igx-input-group #dropDownTarget type="box" [displayDensity]="'compact'" [supressInputAutofocus]="true">
187+
<igx-input-group #dropDownTarget type="box" [displayDensity]="'compact'" [suppressInputAutofocus]="true">
188188
<input #searchValueInput
189189
igxInput
190190
tabindex="0"

projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</igx-drop-down>
1111

1212
<ng-template #defaultFilterUI>
13-
<igx-input-group #inputGroup type="box" [displayDensity]="'compact'" [supressInputAutofocus]="true" (focusout)="onInputGroupFocusout()">
13+
<igx-input-group #inputGroup type="box" [displayDensity]="'compact'" [suppressInputAutofocus]="true" (focusout)="onInputGroupFocusout()">
1414
<igx-prefix #inputGroupPrefix
1515
(click)="toggleConditionsDropDown(inputGroupPrefix)"
1616
(keydown)="onPrefixKeyDown($event)"
@@ -50,7 +50,7 @@
5050
(onSelection)="onDateSelected($event)"
5151
(onClose)="datePickerClose()">
5252
<ng-template igxDatePickerTemplate let-openDialog="openDialog">
53-
<igx-input-group #inputGroup type="box" [displayDensity]="'compact'" [supressInputAutofocus]="true" (focusout)="onInputGroupFocusout()">
53+
<igx-input-group #inputGroup type="box" [displayDensity]="'compact'" [suppressInputAutofocus]="true" (focusout)="onInputGroupFocusout()">
5454
<igx-prefix #inputGroupPrefix
5555
tabindex="0"
5656
(click)="toggleConditionsDropDown(inputGroupPrefix)"

projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { IBaseChipEventArgs, IgxChipsAreaComponent, IgxChipComponent } from '../
2424
import { ExpressionUI } from '../grid-filtering.service';
2525
import { IgxDropDownItemComponent } from '../../../drop-down/drop-down-item.component';
2626
import { IgxFilteringService } from '../grid-filtering.service';
27-
import { KEYS, isEdge } from '../../../core/utils';
27+
import { KEYS, isEdge, isIE } from '../../../core/utils';
2828
import { AbsoluteScrollStrategy } from '../../../services/overlay/scroll';
2929

3030
/**
@@ -262,8 +262,11 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
262262
public onInput(eventArgs) {
263263
// The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason,
264264
// when you have a japanese character as a placeholder, on init the value here is empty string .
265-
if (isEdge() || this.isKeyPressed || eventArgs.target.value) {
266-
this.value = eventArgs.target.value;
265+
// There is no need to reset the value on every invalid number input.
266+
// The invalid value is converted to empty string input type="number"
267+
const target = eventArgs.target;
268+
if (isEdge() && target.type !== 'number' || this.isKeyPressed && isIE() || target.value) {
269+
this.value = target.value;
267270
}
268271
}
269272

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-date-expression.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(click)="toggleCustomDialogDropDown()"
1616
type="box"
1717
[displayDensity]="displayDensity"
18-
[supressInputAutofocus]="true">
18+
[suppressInputAutofocus]="true">
1919

2020
<igx-prefix>
2121
<igx-icon *ngIf="expressionUI.expression.condition" fontSet="filtering-icons" [name]="getIconName()"></igx-icon>
@@ -36,7 +36,7 @@
3636

3737
<igx-date-picker #datePicker mode="dropdown" [(ngModel)]="expressionUI.expression.searchVal" [locale]="grid.locale" [outlet]="grid.outletDirective">
3838
<ng-template igxDatePickerTemplate let-openDialog="openDialog" let-value="value">
39-
<igx-input-group #dropDownTarget type="box" [displayDensity]="displayDensity" [supressInputAutofocus]="true">
39+
<igx-input-group #dropDownTarget type="box" [displayDensity]="displayDensity" [suppressInputAutofocus]="true">
4040
<input #input
4141
igxInput
4242
tabindex="0"

0 commit comments

Comments
 (0)