Skip to content

Commit 514e75e

Browse files
committed
Merge branch 'combo-master' of https://github.com/IgniteUI/igniteui-angular into combo-master
2 parents 0d653ae + c12d64c commit 514e75e

File tree

16 files changed

+275
-51
lines changed

16 files changed

+275
-51
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export class IgxCustomFilteringOperand extends IgxFilteringOperand {
5757
```
5858
For more information, please head over to `igxGrid`'s [ReadMe](https://github.com/IgniteUI/igniteui-angular/blob/master/src/grid/README.md) or the [official documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid_groupby.html).
5959

60+
- `igxGrid` theme now has support for alternating grid row background and text colors.
6061
- `igxColumn` changes:
6162
- **Breaking change** filteringExpressions property is removed.
6263

@@ -96,6 +97,9 @@ export class IgxCustomFilteringOperand extends IgxFilteringOperand {
9697
- `onClose` event renamed to `onClosed`.
9798
- **Breaking change** All properties that were named `isDisabled` have been renamed to `disabled` in order to acheive consistency across our component suite. This affects: date-picker, input directive, input-group, dropdown-item, tabbar and time-picker.
9899

100+
## 6.0.3
101+
- **igxGrid** exposing the `filteredSortedData` method publicly - returns the grid data with current filtering and sorting applied.
102+
99103
## 6.0.2
100104
- **igxGrid** Improve scrolling on mac [#1563](https://github.com/IgniteUI/igniteui-angular/pull/1563)
101105
- The `ng update igniteui-angular` migration schematics now also update the theme import path in SASS files. [#1582](https://github.com/IgniteUI/igniteui-angular/issues/1582)

projects/igniteui-angular/src/lib/core/styles/components/button/_button-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110

111111
fab-text-color: igx-contrast-color($palette, 'secondary', 500),
112112
fab-background: igx-color($palette, 'secondary', 500),
113-
fab-hover-text-color: null,
114-
fab-hover-background: null,
113+
fab-hover-text-color: igx-contrast-color($palette, 'secondary', 500),
114+
fab-hover-background: igx-color($palette, 'secondary', 400),
115115
fab-focus-background: igx-color($palette, 'secondary', 500),
116116
fab-focus-text-color: igx-contrast-color($palette, 'secondary', 500),
117117

projects/igniteui-angular/src/lib/core/styles/components/grid-filtering/_grid-filtering-theme.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
) {
5252
$default-theme: (
5353
name: 'igx-grid-filtering',
54+
toggle-background: transparent,
5455
toggle-icon-color: inherit,
5556
toggle-icon-hover-color: #fff,
5657
toggle-icon-active-color: igx-contrast-color($palette, 'secondary'),
@@ -60,7 +61,8 @@
6061
toggle-filtered-background: transparent,
6162
menu-background: #fff,
6263
menu-text-color: igx-color($palette, 'grays', 900),
63-
menu-button-text-color: igx-color($palette, 'secondary')
64+
menu-button-text-color: igx-color($palette, 'secondary'),
65+
menu-button-disabled-text-color: initial
6466
);
6567

6668
@if not($menu-text-color) and $menu-background {
@@ -213,7 +215,7 @@
213215
color: --var($theme, 'menu-button-text-color');
214216

215217
&:disabled {
216-
color: --var($theme, 'menu-button-text-color');
218+
color: --var($theme, 'menu-button-disabled-text-color');
217219
}
218220
}
219221

projects/igniteui-angular/src/lib/core/styles/components/grid-summary/_grid-summary-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160

161161
%igx-grid-summary__result {
162162
color: --var($theme, 'result-color');
163-
font-weight: 800;
163+
font-weight: 600;
164164
flex: 1 1 auto;
165165
text-align: right;
166166
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-component.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@
6464
}
6565
}
6666

67+
@include e(tr, $m: odd) {
68+
@extend %grid-row--odd !optional;
69+
}
70+
71+
@include e(tr, $m: even) {
72+
@extend %grid-row--even !optional;
73+
}
74+
6775
@include e(tr, $m: selected) {
6876
@extend %grid-row--selected !optional;
6977
}
@@ -142,6 +150,10 @@
142150
@extend %grid-cell--fixed-width !optional;
143151
}
144152

153+
@include e(td-text) {
154+
@extend %grid-cell-text !optional;
155+
}
156+
145157
@include e(cbx-selection) {
146158
@extend %grid__cbx-selection !optional;
147159
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 65 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313
/// @param {Color} $ghost-header-background [null] - The dragged header background color.
1414
/// @param {Color} $content-background [null] - The table body background color.
1515
/// @param {Color} $content-text-color [null] - The table body text color.
16+
/// @param {Color} $row-odd-background [null] - The background color of odd rows.
17+
/// @param {Color} $row-even-background [null] - The background color of even rows.
18+
/// @param {Color} $row-odd-text-color [null] - The text color of odd rows.
19+
/// @param {Color} $row-even-text-color [null] - The text color of even rows.
1620
/// @param {Color} $row-selected-background [null] - The selected row background color.
1721
/// @param {Color} $row-selected-text-color [null] - The selected row text color.
1822
/// @param {Color} $row-hover-background [null] - The hover row background color.
23+
/// @param {Color} $row-hover-text-color [null] - The hover row text color.
1924
/// @param {Color} $row-border-color [null] - The row bottom border color.
2025
/// @param {Color} $pinned-border-width [null] - The border width of the pinned border.
2126
/// @param {Color} $pinned-border-style [null] - The CSS border style of the pinned border.
@@ -61,9 +66,14 @@
6166
$ghost-header-icon-color: null,
6267
$ghost-header-background: null,
6368
69+
$row-odd-background: null,
70+
$row-even-background: null,
71+
$row-odd-text-color: null,
72+
$row-even-text-color: null,
6473
$row-selected-background: null,
6574
$row-selected-text-color: null,
6675
$row-hover-background: null,
76+
$row-hover-text-color: null,
6777
$row-border-color: null,
6878
6979
$pinned-border-width: null,
@@ -109,9 +119,14 @@
109119
ghost-header-icon-color: igx-color($palette, 'grays'),
110120
ghost-header-background: #fff,
111121

122+
row-odd-background: #fff,
123+
row-even-background: #fff,
124+
row-odd-text-color: inherit,
125+
row-even-text-color: inherit,
112126
row-selected-background: hexrgba(igx-color($palette, 'grays', 800)),
113127
row-selected-text-color: igx-contrast-color($palette, 'grays', 900),
114-
row-hover-background: darken(hexrgba(igx-color($palette, 'grays', 100)), 10%),
128+
row-hover-background: hexrgba(igx-color($palette, 'grays', 200)),
129+
row-hover-text-color: igx-color($palette, 'grays', 800),
115130
row-border-color: igx-color($palette, 'grays', 300),
116131

117132
pinned-border-width: 2px,
@@ -163,6 +178,26 @@
163178
$content-text-color: text-contrast($content-background);
164179
}
165180

181+
@if not($row-odd-background) and $content-background {
182+
$row-odd-background: $content-background;
183+
}
184+
185+
@if not($row-even-background) and $content-background {
186+
$row-even-background: $content-background;
187+
}
188+
189+
@if not($row-odd-text-color) and $row-odd-background {
190+
$row-odd-text-color: text-contrast($row-odd-background);
191+
}
192+
193+
@if not($row-even-text-color) and $row-even-background {
194+
$row-even-text-color: text-contrast($row-even-background);
195+
}
196+
197+
@if not($row-hover-text-color) and $row-hover-background {
198+
$row-hover-text-color: text-contrast($row-hover-background);
199+
}
200+
166201
@if not($cell-selected-text-color) and $cell-selected-background {
167202
$cell-selected-text-color: text-contrast($cell-selected-background);
168203
}
@@ -220,9 +255,14 @@
220255
content-background: $content-background,
221256
content-text-color: $content-text-color,
222257

258+
row-odd-background: $row-odd-background,
259+
row-even-background: $row-even-background,
260+
row-odd-text-color: $row-odd-text-color,
261+
row-even-text-color: $row-even-text-color,
223262
row-selected-background: $row-selected-background,
224263
row-selected-text-color: $row-selected-text-color,
225264
row-hover-background: $row-hover-background,
265+
row-hover-text-color: $row-hover-text-color,
226266
row-border-color: $row-border-color,
227267

228268
pinned-border-width: $pinned-border-width,
@@ -371,9 +411,11 @@
371411

372412
%grid-row {
373413
background: inherit;
414+
color: inherit;
374415

375416
&:hover {
376417
background: inherit;
418+
color: inherit;
377419
}
378420
}
379421
}
@@ -457,15 +499,27 @@
457499

458500
&:hover {
459501
background-color: --var($theme, 'row-hover-background');
502+
color: --var($theme, 'row-hover-text-color');
460503
}
461504
}
462505

506+
%grid-row--odd {
507+
background: --var($theme, 'row-odd-background');
508+
color: --var($theme, 'row-odd-text-color');
509+
}
510+
511+
%grid-row--even {
512+
background: --var($theme, 'row-even-background');
513+
color: --var($theme, 'row-even-text-color');
514+
}
515+
463516
%grid-row--selected {
464517
color: --var($theme, 'row-selected-text-color');
465518
background-color: --var($theme, 'row-selected-background');
466519

467520
&:hover {
468521
background-color: --var($theme, 'row-selected-background');
522+
color: --var($theme, 'row-selected-text-color');
469523
}
470524
}
471525

@@ -484,9 +538,10 @@
484538
line-height: $grid-cell-lh;
485539
color: inherit;
486540
text-align: left;
487-
overflow: hidden;
488-
white-space: nowrap;
489-
text-overflow: ellipsis;
541+
}
542+
543+
%grid-cell-text {
544+
@include ellipsis();
490545
}
491546

492547
%grid-cell-display--cosy {
@@ -509,8 +564,7 @@
509564

510565
%grid-cell--editing {
511566
background-color: --var($theme, 'cell-editing-background') !important;
512-
border: 1px solid --var($theme, 'cell-selected-background');
513-
box-shadow: igx-elevation($elevations, 2);
567+
border: 2px solid --var($theme, 'cell-selected-background');
514568

515569
igx-input-group {
516570
width: 100%;
@@ -526,6 +580,10 @@
526580

527581
%grid-cell--pinned-last {
528582
border-right: map-get($cell-pin, 'style') map-get($cell-pin, 'color') !important;
583+
584+
&%grid-cell--editing {
585+
border-right: map-get($cell-pin, 'style') --var($theme, 'cell-selected-background') !important;
586+
}
529587
}
530588

531589
%grid-cell-header {
@@ -539,10 +597,6 @@
539597
padding: map-get($grid-header-padding, 'comfortable');
540598
border-right: 1px dotted igx-color($palette, 'grays', 400);
541599
overflow: visible;
542-
543-
&:last-of-type {
544-
border-right: transparent;
545-
}
546600
}
547601

548602
%grid-cell-header--cosy {
@@ -601,9 +655,8 @@
601655
display: flex;
602656
justify-content: center;
603657
align-items: center;
604-
z-index: 1;
605-
position: relative;
606658
background: inherit;
659+
z-index: 1;
607660
}
608661

609662
%grid__cbx-selection--cosy {

projects/igniteui-angular/src/lib/core/styles/components/list/_list-theme.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
$default-theme: (
3333
name: 'igx-list',
3434
background: #fff,
35+
header-background: #fff,
3536
header-text-color: igx-color($palette, 'secondary'),
37+
item-background: #fff,
3638
item-text-color: igx-color($palette, 'grays', 800),
3739
item-background-active: igx-color($palette, 'grays', 100),
3840
item-text-color-active: igx-color($palette, 'grays', 800)

projects/igniteui-angular/src/lib/grid/cell.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ng-template #defaultCell igxTextHighlight [cssClass]="highlightClass" [activeCssClass]="activeHighlightClass" [groupName]="gridID"
22
[value]="formatter ? formatter(value) : value" [row]="rowIndex" [column]="this.column.visibleIndex" [page]="this.grid.page">
3-
<div>{{ formatter ? formatter(value) : value }}</div>
3+
<div class="igx-grid__td-text">{{ formatter ? formatter(value) : value }}</div>
44
</ng-template>
55
<ng-template #inlineEditor let-cell="cell">
66
<ng-container *ngIf="column.dataType === 'string'">

projects/igniteui-angular/src/lib/grid/grid.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ export class IgxGridComponent implements OnInit, OnDestroy, AfterContentInit, Af
379379
}
380380

381381
@Input()
382-
public evenRowCSS = '';
382+
public evenRowCSS = 'igx-grid__tr--even';
383383

384384
@Input()
385-
public oddRowCSS = '';
385+
public oddRowCSS = 'igx-grid__tr--odd';
386386

387387
@Input()
388388
public rowHeight: number;

projects/igniteui-angular/src/lib/grid/grid.groupby.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ describe('IgxGrid - GroupBy', () => {
13511351
fix.detectChanges();
13521352
let chips = fix.nativeElement.querySelectorAll('igx-chip');
13531353
// click grouping direction arrow
1354-
const event = {owner: {id: 'ProductName'}};
1354+
const event = { owner: { id: 'ProductName' } };
13551355
grid.onChipClicked(event);
13561356
chips = fix.nativeElement.querySelectorAll('igx-chip');
13571357
expect(chips.length).toBe(1);
@@ -1427,7 +1427,7 @@ describe('IgxGrid - GroupBy', () => {
14271427
checkBoxElement.dispatchEvent(new Event('click'));
14281428
setTimeout(() => {
14291429
expect(grid.selectedRows().length).toEqual(1);
1430-
expect(rows[0].element.nativeElement.className).toEqual('igx-grid__tr igx-grid__tr--selected');
1430+
expect(rows[0].element.nativeElement.className).toEqual('igx-grid__tr igx-grid__tr--odd igx-grid__tr--selected');
14311431
done();
14321432
}, 100);
14331433
}, 100);
@@ -1615,7 +1615,7 @@ describe('IgxGrid - GroupBy', () => {
16151615
expect(groupRows[1].expanded).toEqual(true);
16161616
});
16171617

1618-
it('should remove expansion state when reordering chips', (done) => {
1618+
xit('should remove expansion state when reordering chips', (done) => {
16191619
const fix = TestBed.createComponent(GroupableGridComponent);
16201620
const grid = fix.componentInstance.instance;
16211621
fix.componentInstance.data = [
@@ -1803,8 +1803,8 @@ describe('IgxGrid - GroupBy', () => {
18031803
const grid = fix.componentInstance.instance;
18041804
fix.detectChanges();
18051805
grid.groupBy([{ fieldName: 'Released', dir: SortingDirection.Asc, ignoreCase: false },
1806-
{ fieldName: 'Downloads', dir: SortingDirection.Asc, ignoreCase: false },
1807-
{ fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: false }]);
1806+
{ fieldName: 'Downloads', dir: SortingDirection.Asc, ignoreCase: false },
1807+
{ fieldName: 'ProductName', dir: SortingDirection.Asc, ignoreCase: false }]);
18081808

18091809
// there should be 3 groups at top level
18101810
const groupsRecords = grid.groupsRecords;

projects/igniteui-angular/src/lib/grid/grid.sorting.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ describe('IgxGrid - Grid Sorting', () => {
237237
});
238238

239239
// sort now allows only params of type ISortingExpression hence it is not possible to pass invalid expressions
240-
xit(`Grid sort by mixed valid and invalid expressions should update the
240+
it(`Grid sort by mixed valid and invalid expressions should update the
241241
data only by valid ones (through API)`, () => {
242242
const fixture = TestBed.createComponent(GridDeclaredColumnsComponent);
243243
fixture.detectChanges();
@@ -253,16 +253,16 @@ describe('IgxGrid - Grid Sorting', () => {
253253

254254
fixture.detectChanges();
255255

256-
let expectedResult = 'Brad';
256+
let expectedResult = 'Rick';
257257
expect(grid.getCellByColumn(0, secondColumn).value).toEqual(expectedResult);
258-
expectedResult = 'Williams';
258+
expectedResult = 'Jones';
259259
expect(grid.getCellByColumn(0, thirdColumn).value).toEqual(expectedResult);
260-
expect(grid.getCellByColumn(0, firstColumn).value).toEqual(1);
261-
expectedResult = 'Rick';
260+
expect(grid.getCellByColumn(0, firstColumn).value).toEqual(6);
261+
expectedResult = 'ALex';
262262
expect(grid.getCellByColumn(grid.data.length - 1, secondColumn).value).toEqual(expectedResult);
263-
expectedResult = 'BRown';
263+
expectedResult = 'Smith';
264264
expect(grid.getCellByColumn(grid.data.length - 1, thirdColumn).value).toEqual(expectedResult);
265-
expect(grid.getCellByColumn(grid.data.length - 1, firstColumn).value).toEqual(7);
265+
expect(grid.getCellByColumn(grid.data.length - 1, firstColumn).value).toEqual(5);
266266
});
267267

268268
// UI Tests

0 commit comments

Comments
 (0)