Skip to content

Commit 345f175

Browse files
authored
Merge branch '7.3.x' into nrobakova/fix-issue-4906
2 parents aaf3662 + cac76f2 commit 345f175

File tree

15 files changed

+399
-33
lines changed

15 files changed

+399
-33
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Ignite UI for Angular Change Log
22

33
All notable changes for each version of this project will be documented in this file.
4-
## 7.3.1
4+
## 7.3.3
5+
6+
- `igx-core()` now includes some styles for printing layout.
7+
In order to turn them off, you need to pass an argument and set it to `false`
8+
```
9+
@include igx-core($print-layout: false);
10+
```
11+
512
- `Pager`
613
- **Behavioral Change** - The pager is now hidden when there are no records in the grid.
714

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,7 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
13071307
* @hidden @internal
13081308
*/
13091309
public ngOnDestroy() {
1310+
this.destroy$.next();
13101311
this.destroy$.complete();
13111312
this.comboAPI.clear();
13121313
this.selection.clear(this.id);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@
128128

129129
%igx-grid-summary--pinned-last {
130130
border-right: map-get($cell-pin, 'style') map-get($cell-pin, 'color');
131+
@media print {
132+
border-right: map-get($cell-pin, 'style') #999;
133+
}
131134
}
132135

133136
%igx-grid-summary__item {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,11 @@
10291029
%circular-outer {
10301030
stroke: --var($theme, 'expand-icon-color');
10311031
}
1032+
1033+
> %circular-display {
1034+
width: rem(24);
1035+
height: rem(24);
1036+
}
10321037
}
10331038

10341039
%grid-cell-display {
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
$border-color: #ddd;
2+
$border-pin-color: #999;
3+
$print-background: #f9f9f9;
4+
$print-background: #eee;
5+
6+
@mixin igx-grid-print {
7+
%grid-display {
8+
%form-group-display,
9+
%cbx-display,
10+
%radio-display,
11+
%igx-grid__grouparea,
12+
%tooltip-display,
13+
%aside,
14+
%overlay-display,
15+
%igx-ripple-display,
16+
%igx-slider-display,
17+
%igx-snackbar-display,
18+
%switch-display,
19+
%time-picker-display,
20+
%igx-toast-display,
21+
%igx-tabs,
22+
%igx-navbar-display,
23+
%igx-button--flat,
24+
%igx-button--raised,
25+
%igx-button--fab,
26+
%igx-button--icon,
27+
%igx-button--disabled,
28+
%grid-tbody-scrollbar,
29+
%vhelper-display,
30+
%igx-grid-paginator,
31+
%igx-grid-toolbar__actions,
32+
%grid__cbx-selection,
33+
%igx-drop-area__icon,
34+
%igx-drop-area__text,
35+
%igx-grid__header-indentation,
36+
%igx-grid__grouping-indicator,
37+
%igx-grid__row-indentation,
38+
%igx-grid__hierarchical-expander {
39+
display: none !important;
40+
}
41+
42+
%igx-grid__grouparea,
43+
%igx-grid-paginator,
44+
%igx-grid-toolbar__actions,
45+
%igx-drop-area__icon,
46+
%igx-drop-area__text,
47+
%igx-grid__header-indentation,
48+
%igx-grid__grouping-indicator,
49+
%igx-grid__row-indentation,
50+
%igx-grid__hierarchical-expander,
51+
%igx-expansion-panel__header-icon--end,
52+
%igx-expansion-panel__header-icon--start,
53+
%grid-summaries-patch {
54+
display: none !important;
55+
}
56+
57+
58+
%igx-grid__grouping-indicator {
59+
igx-icon {
60+
display: none !important;
61+
}
62+
}
63+
64+
%igx-grid__filtering-cell {
65+
height: 0 !important;
66+
border-top: none !important;
67+
border-right: none !important;
68+
}
69+
70+
%grid-tfoot,
71+
%igx-grid__grouparea,
72+
%igx-grid__filtering-cell,
73+
%igx-grid__group-row,
74+
%grid-cell-header,
75+
%igx-grid-toolbar,
76+
%grid-thead-title,
77+
%grid-row,
78+
%grid-thead {
79+
border-color: $border-color !important;
80+
}
81+
82+
%grid-display {
83+
igx-icon {
84+
color: #666 !important;
85+
}
86+
}
87+
88+
%grid-thead,
89+
%igx-grid-toolbar,
90+
%igx-grid__group-row,
91+
%grid-tfoot {
92+
background: $print-background !important;
93+
}
94+
95+
%grid-cell-header-title,
96+
%grid-cell-text {
97+
white-space: unset !important;
98+
text-overflow: initial !important;
99+
overflow: visible !important;
100+
}
101+
102+
%grid-cell-display {
103+
igx-icon {
104+
display: none;
105+
}
106+
}
107+
108+
%grid-summaries-patch {
109+
display: none;
110+
}
111+
112+
%grid-cell--pinned-last {
113+
border-right: 2px solid red !important;
114+
}
115+
}
116+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
@import 'grid-print';
2+
3+
@mixin igx-print-layout {
4+
@media print {
5+
html,
6+
body,
7+
app-root {
8+
min-height: 100vh;
9+
min-width: 100vw;
10+
margin: 0;
11+
display: block;
12+
}
13+
14+
* {
15+
background: transparent !important;
16+
background-color: transparent !important;
17+
color: #000 !important;
18+
box-shadow: none !important;
19+
text-shadow: none !important;
20+
-webkit-print-color-adjust: exact;
21+
}
22+
23+
a[href^='http']::after {
24+
content: '[' attr(href) ']';
25+
color: blue;
26+
}
27+
28+
.igx-no-print,
29+
igx-nav-drawer {
30+
display: none !important;
31+
}
32+
33+
@include igx-grid-print();
34+
35+
%igx-bottom-nav-menu,
36+
%igx-group-display,
37+
%igx-ripple-display,
38+
%igx-slider-display,
39+
%igx-snackbar-display,
40+
%form-group-display,
41+
%cbx-display,
42+
%radio-display,
43+
%tooltip-display,
44+
%igx-toast-display,
45+
%igx-navbar-display,
46+
%vhelper-display,
47+
%igx-button--flat,
48+
%igx-button--raised,
49+
%igx-button--fab,
50+
%igx-button--icon,
51+
%igx-button--disabled,
52+
%igx-tabs__header,
53+
%switch-display,
54+
%grid-tbody-scrollbar,
55+
%grid__cbx-selection,
56+
%circular-display,
57+
%linear-display,
58+
.igx-carousel__indicators,
59+
.igx-carousel__arrow--prev,
60+
.igx-carousel__arrow--next {
61+
display: none !important;
62+
}
63+
}
64+
}

projects/igniteui-angular/src/lib/core/styles/themes/_core.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
@import '../components/toast/toast-component';
5757
@import '../components/tooltip/tooltip-component';
5858
@import '../components/time-picker/time-picker-component';
59+
@import '../print/index';
5960

6061
/// Includes the base for each theme.
6162

@@ -68,6 +69,10 @@
6869
}
6970
}
7071

71-
@mixin igx-core() {
72+
@mixin igx-core($print-layout:true) {
7273
@include igx-typography();
74+
75+
@if $print-layout == true {
76+
@include igx-print-layout();
77+
}
7378
}

projects/igniteui-angular/src/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,14 @@ export class IgxGridExcelStyleFilteringComponent implements OnDestroy, AfterView
316316
return true;
317317
}
318318

319+
if (this.filterValues.size === 1) {
320+
const firstValue = this.filterValues.values().next().value;
321+
322+
if (!firstValue && firstValue !== 0) {
323+
return true;
324+
}
325+
}
326+
319327
for (let index = 0; index < this.uniqueValues.length; index++) {
320328
if (this.filterValues.has(this.uniqueValues[index])) {
321329
return true;

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,13 @@ export interface IGridDataBindable {
202202
export interface IRowDragEndEventArgs {
203203
owner: IgxDragDirective;
204204
dragData: IgxRowComponent<IgxGridBaseComponent & IGridDataBindable>;
205+
animation: boolean;
205206
}
206207

207-
export interface IRowDragStartEventArgs extends IRowDragEndEventArgs, CancelableEventArgs { }
208+
export interface IRowDragStartEventArgs extends CancelableEventArgs {
209+
owner: IgxDragDirective;
210+
dragData: IgxRowComponent<IgxGridBaseComponent & IGridDataBindable>;
211+
}
208212

209213
export enum GridSummaryPosition {
210214
top = 'top',

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3981,6 +3981,25 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
39813981
[ true, true, true ]);
39823982
}));
39833983

3984+
it('Should select (Blanks) when the blank value is empty string.', fakeAsync(() => {
3985+
grid.data[0].AnotherField = '';
3986+
fix.detectChanges();
3987+
3988+
openExcelMenu(fix, 5);
3989+
verifyExcelStyleFilterAvailableOptions(grid,
3990+
[ 'Select All', '(Blanks)', 'a', 'custom' ],
3991+
[ true, true, true, true ]);
3992+
3993+
toggleExcelStyleFilteringItems(fix, grid, true, 2, 3);
3994+
3995+
expect(grid.rowList.length).toBe(1);
3996+
3997+
openExcelMenu(fix, 5);
3998+
verifyExcelStyleFilterAvailableOptions(grid,
3999+
[ 'Select All', '(Blanks)', 'a', 'custom' ],
4000+
[ null, true, false, false ]);
4001+
}));
4002+
39844003
it('Should display the ESF based on the filterIcon within the grid', async() => {
39854004
// Test prerequisites
39864005
grid.width = '800px';

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,12 @@ export class IgxGridComponent extends IgxGridBaseComponent implements IGridDataB
631631
}
632632

633633
private _setGroupColsVisibility(value) {
634-
this.groupingExpressions.forEach((expr) => {
635-
const col = this.getColumnByName(expr.fieldName);
636-
col.hidden = value;
637-
});
634+
if (this.columnList && !this.hasColumnLayouts) {
635+
this.groupingExpressions.forEach((expr) => {
636+
const col = this.getColumnByName(expr.fieldName);
637+
col.hidden = value;
638+
});
639+
}
638640
}
639641

640642
/**
@@ -872,7 +874,7 @@ export class IgxGridComponent extends IgxGridBaseComponent implements IGridDataB
872874

873875
public ngDoCheck(): void {
874876
super.ngDoCheck();
875-
if (this.groupingDiffer) {
877+
if (this.groupingDiffer && this.columnList && !this.hasColumnLayouts) {
876878
const changes = this.groupingDiffer.diff(this.groupingExpressions);
877879
if (changes && this.columnList) {
878880
changes.forEachAddedItem((rec) => {

projects/igniteui-angular/src/lib/grids/grid/grid.multi-row-layout.spec.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,36 @@ describe('IgxGrid - multi-row-layout', () => {
11321132
const groupRowBlocks = fixture.debugElement.query(By.css('.igx-grid__tbody')).queryAll(By.css('.igx-grid__mrl-block'));
11331133
expect(groupRowBlocks[0].nativeElement.style.gridTemplateColumns).toEqual('118px 118px 118px 118px 118px 118px');
11341134
});
1135+
1136+
it('should disregard hideGroupedColumns option and not hide columns when grouping when having column layouts.', () => {
1137+
const fixture = TestBed.createComponent(ColumnLayoutTestComponent);
1138+
fixture.componentInstance.colGroups = [{
1139+
group: 'group1',
1140+
columns: [
1141+
{ field: 'ContactName', rowStart: 1, colStart: 1, colEnd : 4},
1142+
{ field: 'ContactTitle', rowStart: 1, colStart: 4, colEnd: 6},
1143+
{ field: 'Country', rowStart: 1, colStart: 6, colEnd: 7},
1144+
{ field: 'Phone', rowStart: 2, colStart: 1, colEnd: 3},
1145+
{ field: 'City', rowStart: 2, colStart: 3, colEnd: 5},
1146+
{ field: 'Address', rowStart: 2, colStart: 5, colEnd: 7},
1147+
{ field: 'CompanyName', rowStart: 3, colStart: 1, colEnd: 2},
1148+
{ field: 'PostalCode', rowStart: 3, colStart: 2, colEnd: 3},
1149+
{ field: 'Fax', rowStart: 3, colStart: 3, colEnd: 7},
1150+
]
1151+
}];
1152+
const grid = fixture.componentInstance.grid;
1153+
grid.hideGroupedColumns = true;
1154+
fixture.detectChanges();
1155+
1156+
grid.groupBy({ fieldName: 'ContactTitle', dir: SortingDirection.Desc, ignoreCase: false,
1157+
strategy: DefaultSortingStrategy.instance() });
1158+
fixture.detectChanges();
1159+
1160+
// check column and group are not hidden
1161+
const col = grid.getColumnByName('ContactTitle');
1162+
expect(col.hidden).toBe(false);
1163+
expect(col.parent.hidden).toBe(false);
1164+
});
11351165
});
11361166

11371167
@Component({

0 commit comments

Comments
 (0)