Skip to content

Commit 6d614a0

Browse files
authored
Merge branch 'master' into SKrastev/grid-disabled-pin-row
2 parents ed06512 + f420056 commit 6d614a0

22 files changed

+179
-38
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/core/styles/components/splitter/_splitter-component.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
$this: str-slice(bem--selector-to-string(&), 2, -1);
1212
@include register-component($this);
1313

14+
@include b(#{$this}-bar-host) {
15+
&:focus {
16+
@extend %igx-splitter-bar--focus !optional;
17+
}
18+
}
19+
1420
@include b(#{$this}-bar) {
1521
@extend %igx-splitter-bar !optional;
1622

projects/igniteui-angular/src/lib/core/styles/components/splitter/_splitter-theme.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
////
22
/// @group themes
3+
/// @access public
4+
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
5+
///
6+
/// @param {Map} $palette [$default-palette] - The palette used as basis for styling the component.
7+
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
8+
/// @param {Map} $elevations [$elevations] - The elevations (shadows) map to be used.
9+
///
10+
/// @param {color} $bar-color [null] - The background color of the bar.
11+
/// @param {color} $handle-color [null] - The color for the bar drag handle.
12+
/// @param {color} $expander-color [null] - The color for the arrow expander's.
13+
/// @param {number} $border-radius [null] - the border radios of the splitter bar drag handle
14+
/// @param {color} $focus-color [null] - The color used for focused splitter bar.
15+
/// @param {number} $size [null] - The size of the splitter, its width for vertical and height for horizontal splitter.
16+
///
317
@function igx-splitter-theme(
418
$palette: $default-palette,
519
$schema: $light-schema,
@@ -9,6 +23,7 @@
923
$handle-color: null,
1024
$expander-color: null,
1125
$border-radius: null,
26+
$focus-color: null,
1227
$size: null
1328
) {
1429
$name: 'igx-splitter';
@@ -41,6 +56,7 @@
4156
handle-color: $handle-color,
4257
expander-color: $expander-color,
4358
border-radius: $border-radius-handle,
59+
focus-color: $focus-color,
4460
size: $size
4561
));
4662
}
@@ -98,6 +114,12 @@
98114
}
99115
}
100116

117+
%igx-splitter-bar--focus {
118+
// Remove the default browser outline styles
119+
outline: transparent solid 1px;
120+
box-shadow: inset 0 0 0 1px --var($theme, 'focus-color');
121+
}
122+
101123
%igx-splitter-bar--vertical {
102124
flex-direction: column;
103125
height: 100%;

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_splitter.scss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
/// @group schemas
55
/// @access private
66
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
7+
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
78
////
89

910
/// Generates a light splitter schema.
1011
/// @type {Map}
1112
/// @property {Map} icon-background [igx-color: ('grays', 400)]- The background color used for splitters of type icon.
12-
/// @property {Map} icon-color [igx-color: ('grays', 800)] - The icon color used for splitters of type icon.
13-
/// @property {Map} initials-background [igx-color: ('grays', 400)] - The background color used for splitters of type initials.
14-
/// @property {Map} initials-color [igx-color: ('grays', 800)] - The text color used for splitters of type initials.
15-
/// @property {Color} image-background [transparent] - The background color used for splitters of type image.
13+
/// @property {Map} $bar-color [igx-color: 'surface', darken: 5%] - The background color of the bar.
14+
/// @property {Map} $handle-color [igx-color: 'surface', darken: 20%] - The color for the bar drag handle.
15+
/// @property {Map} $expander-color [igx-color: 'surface', darken: 20%] - The color for the arrow expander's.
16+
/// @property {Map} $border-radius [1] - The border radius fraction, between 0-1 to be used for the splitter component
17+
/// @property {Map} $focus-color [igx-color: ('secondary', 500)] - The color used for focused splitter bar.
18+
/// @property {Number} $size [4px] - The size of the splitter, it's width for vertical and height for horizontal splitter.
1619
/// @see $default-palette
1720
$_light-splitter: extend(
1821
$_default-shape-splitter,
@@ -22,6 +25,10 @@ $_light-splitter: extend(
2225
darken: 5%
2326
),
2427

28+
focus-color: (
29+
igx-color: ('secondary', 500)
30+
),
31+
2532
handle-color: (
2633
igx-color: 'surface',
2734
darken: 20%

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"

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-default-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>
@@ -34,7 +34,7 @@
3434
/>
3535
</igx-input-group>
3636

37-
<igx-input-group #inputGroupValues type="box" [displayDensity]="displayDensity" [supressInputAutofocus]="true">
37+
<igx-input-group #inputGroupValues type="box" [displayDensity]="displayDensity" [suppressInputAutofocus]="true">
3838
<input
3939
#inputValues
4040
igxInput

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<igx-input-group
22
type="box"
33
[displayDensity]="displayDensity"
4-
[supressInputAutofocus]="true">
4+
[suppressInputAutofocus]="true">
55
<igx-icon igxPrefix>search</igx-icon>
66
<input
77
#input

projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,13 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
229229

230230
expect(grid.rowList.length).toEqual(3);
231231
verifyFilterRowUI(input, close, reset, false);
232+
233+
// greater than or equal to with invalid value should not reset filter
234+
GridFunctions.openFilterDDAndSelectCondition(fix, 4);
235+
GridFunctions.typeValueInFilterRowInput('254..', fix, input);
236+
237+
expect(grid.rowList.length).toEqual(3);
238+
verifyFilterRowUI(input, close, reset, false);
232239
}));
233240

234241
// UI tests boolean column

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.navigation.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,18 +271,19 @@ describe('IgxHierarchicalGrid Basic Navigation #hGrid', () => {
271271
}));
272272

273273
it('should scroll top of child grid into view when pressing Ctrl + Arrow Up when cell is selected in it.', (async () => {
274-
pending('related to the bug #7118');
275274
hierarchicalGrid.verticalScrollContainer.scrollTo(7);
276275
fixture.detectChanges();
277276
await wait(DEBOUNCE_TIME);
277+
hierarchicalGrid.verticalScrollContainer.scrollTo(7);
278278
fixture.detectChanges();
279+
await wait(DEBOUNCE_TIME);
279280

280281
const childGrid = hierarchicalGrid.hgridAPI.getChildGrids(false)[3];
281282

282283
const childLastRowCell = childGrid.dataRowList.toArray()[9].cells.toArray()[0];
284+
const childGridContent = fixture.debugElement.queryAll(By.css(GRID_CONTENT_CLASS))[1];
283285
GridFunctions.focusCell(fixture, childLastRowCell);
284286
fixture.detectChanges();
285-
const childGridContent = fixture.debugElement.queryAll(By.css(GRID_CONTENT_CLASS))[1];
286287
UIInteractions.triggerEventHandlerKeyDown('arrowup', childGridContent, false, false, true);
287288
fixture.detectChanges();
288289
await wait(200);

0 commit comments

Comments
 (0)