Skip to content

Commit 13fb7c2

Browse files
Merge branch '7.3.x' into rkolev/fix-5232-7.3.x
2 parents ea76fcd + 95125aa commit 13fb7c2

File tree

13 files changed

+125
-19
lines changed

13 files changed

+125
-19
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ script:
2222
- npm run build:style
2323
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:lib; fi
2424
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:schematics; fi
25-
# - if [ -z "${TRAVIS_TAG}" ] && [ "${TRAVIS_REPO_SLUG}" == "IgniteUI/igniteui-angular" ]; then cat ./coverage/lcov.info | coveralls; fi
25+
- if [ -z "${TRAVIS_TAG}" ] && [ "${TRAVIS_REPO_SLUG}" == "IgniteUI/igniteui-angular" ]; then cat ./coverage/lcov.info | coveralls; fi
2626

2727
before_deploy:
2828
- npm run build:schematics

azure-pipelines.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ steps:
2424
env:
2525
NODE_OPTIONS: "--max_old_space_size=4096"
2626

27-
# - script: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
28-
# condition: and(succeeded(), eq(variables['system.teamProject'], 'igniteui-angular'))
29-
# displayName: 'Code coverage @ Coveralls'
30-
# env:
31-
# COVERALLS_REPO_TOKEN: $(coveralls.repoToken)
27+
- script: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
28+
condition: and(succeeded(), eq(variables['system.teamProject'], 'igniteui-angular'))
29+
displayName: 'Code coverage @ Coveralls'
30+
env:
31+
COVERALLS_REPO_TOKEN: $(coveralls.repoToken)
3232

3333
- script: npm run test:schematics
3434
displayName: 'Run migrations & schematics'
@@ -39,8 +39,8 @@ steps:
3939
testRunner: 'JUnit'
4040
testResultsFiles: '**/TESTS-*.xml'
4141

42-
# - task: PublishCodeCoverageResults@1
43-
# inputs:
44-
# codeCoverageTool: Cobertura
45-
# summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
46-
# reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'
42+
- task: PublishCodeCoverageResults@1
43+
inputs:
44+
codeCoverageTool: Cobertura
45+
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
46+
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'

projects/igniteui-angular/src/lib/directives/dragdrop/dragdrop.directive.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,8 @@ export class IgxDragDirective implements OnInit, OnDestroy {
856856
const viewPortY = pageY - window.pageYOffset;
857857
if (document['msElementsFromPoint']) {
858858
// Edge and IE special snowflakes
859-
return document['msElementsFromPoint'](viewPortX, viewPortY);
859+
const elements = document['msElementsFromPoint'](viewPortX, viewPortY);
860+
return elements === null ? [] : elements;
860861
} else {
861862
// Other browsers like Chrome, Firefox, Opera
862863
return document.elementsFromPoint(viewPortX, viewPortY);

projects/igniteui-angular/src/lib/grids/api.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ export class GridBaseAPIService <T extends IgxGridBaseComponent & IGridDataBinda
214214

215215
update_row(row: IgxRow, value: any) {
216216
const grid = this.grid;
217-
const selected = grid.selection.is_item_selected(grid.id, row.id);
218217
const rowInEditMode = grid.crudService.row;
219218
const data = this.get_all_data(grid.transactions.enabled);
220219
const index = this.get_row_index_in_data(row.id);
@@ -249,6 +248,7 @@ export class GridBaseAPIService <T extends IgxGridBaseComponent & IGridDataBinda
249248

250249
this.updateData(grid, row.id, data[index], args.oldValue, args.newValue);
251250
const newId = grid.primaryKey ? args.newValue[grid.primaryKey] : args.newValue;
251+
const selected = grid.selection.is_item_selected(grid.id, row.id);
252252
if (selected) {
253253
grid.selection.deselect_item(grid.id, row.id);
254254
grid.selection.select_item(grid.id, newId);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,8 +1980,6 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
19801980
}
19811981

19821982
this.children.forEach(child => {
1983-
child.disableHiding = true;
1984-
child.disablePinning = true;
19851983
child.movable = false;
19861984
});
19871985
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export class IgxExcelStyleColumnMovingComponent {
5555
}
5656
} else if (this.grid.unpinnedColumns.indexOf(this.column) === 0 && moveDirection === 0) {
5757
targetColumn = this.grid.pinnedColumns[this.grid.pinnedColumns.length - 1];
58+
if (targetColumn.parent) {
59+
targetColumn = targetColumn.topLevelParent;
60+
}
5861
moveDirection = 1;
5962
} else {
6063
targetColumn = this.findColumn(moveDirection, this.grid.unpinnedColumns);

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5659,6 +5659,44 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
56595659
expect(pinButton.classList.contains('igx-excel-filter__actions-pin--disabled')).toBe(true,
56605660
'pinButton should be disabled');
56615661
}));
5662+
5663+
it('Should pin column next to already pinned group by moving it to the left.', fakeAsync(() => {
5664+
// Test prerequisites
5665+
grid.width = '1000px';
5666+
fix.detectChanges();
5667+
tick(100);
5668+
// Adjust column widths, so their group can be pinned.
5669+
const columnFields = ['ID', 'ProductName', 'Downloads', 'Released', 'ReleaseDate', 'AnotherField'];
5670+
columnFields.forEach((columnField) => {
5671+
const col = grid.columns.find((c) => c.field === columnField);
5672+
col.width = '100px';
5673+
});
5674+
fix.detectChanges();
5675+
// Make 'AnotherField' column movable.
5676+
const column = grid.columns.find((c) => c.field === 'AnotherField');
5677+
column.movable = true;
5678+
fix.detectChanges();
5679+
5680+
// Pin the 'General Information' group by pinning its child 'ProductName' column.
5681+
GridFunctions.clickExcelFilterIcon(fix, 'ProductName');
5682+
fix.detectChanges();
5683+
GridFunctions.clickPinIconInExcelStyleFiltering(fix, false);
5684+
tick(200);
5685+
fix.detectChanges();
5686+
5687+
// Verify 'AnotherField' column is not pinned.
5688+
GridFunctions.verifyColumnIsPinned(column, false, 7);
5689+
5690+
// Try to pin the 'AnotherField' column by moving it to the left.
5691+
GridFunctions.clickExcelFilterIcon(fix, 'AnotherField');
5692+
fix.detectChanges();
5693+
GridFunctions.clickMoveLeftInExcelStyleFiltering(fix);
5694+
tick(200);
5695+
fix.detectChanges();
5696+
5697+
// Verify 'AnotherField' column is successfully pinned next to the column group.
5698+
GridFunctions.verifyColumnIsPinned(column, true, 8);
5699+
}));
56625700
});
56635701
});
56645702

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,21 @@ describe('IgxGrid - multi-row-layout Integration - ', () => {
801801

802802
verifyDOMMatchesLayoutSettings(gridFirstRow, fixture.componentInstance.colGroups);
803803
});
804+
805+
it('should render unpin and hide column buttons into the excel style filter', () => {
806+
const filterIcons = fixture.debugElement.queryAll(By.css('.igx-excel-filter__icon'));
807+
expect(filterIcons.length).not.toBe(0);
808+
809+
filterIcons[0].nativeElement.click();
810+
fixture.detectChanges();
811+
812+
const excelMenu = grid.nativeElement.querySelector('.igx-excel-filter__menu');
813+
const unpinComponent = excelMenu.querySelector('.igx-excel-filter__actions-unpin');
814+
const hideComponent = excelMenu.querySelector('.igx-excel-filter__actions-hide');
815+
816+
expect(unpinComponent).toBeDefined();
817+
expect(hideComponent).toBeDefined();
818+
});
804819
});
805820

806821
describe('GroupBy ', () => {

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
<div class="igx-grid__tr" role="row" [style.width.px]='calcWidth + 1'>
2626
<span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length <= 0" [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left" class="igx-grid__scroll-on-drag-left"></span>
2727
<span *ngIf="hasMovableColumns && draggedColumn && pinnedColumns.length > 0" [igxColumnMovingDrop]="parentVirtDir" [attr.droppable]="true" id="left" class="igx-grid__scroll-on-drag-pinned" [style.left.px]="pinnedWidth"></span>
28-
<div class="igx-grid__hierarchical-expander igx-grid__hierarchical-expander--header" #headerHierarchyExpander [hidden]='!hasExpandableChildren || !hasVisibleColumns'[ngClass]="{
28+
<div #headerHierarchyExpander [hidden]='!hasExpandableChildren || !hasVisibleColumns' [ngClass]="{
29+
'igx-grid__hierarchical-expander igx-grid__hierarchical-expander--header': hasExpandableChildren,
2930
'igx-grid__hierarchical-expander--push': filteringService.isFilterRowVisible,
3031
'igx-grid__hierarchical-expander--no-border': rowSelectable || rowDraggable
31-
}">
32+
}">
3233
<igx-icon role="button" fontSet="material" [isActive]='hierarchicalState.length > 0 && hasExpandableChildren' (click)="collapseAllRows()">unfold_less</igx-icon>
3334
</div>
3435
<ng-container *ngIf="rowDraggable">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseCompone
459459

460460
protected onColumnsChanged(change: QueryList<IgxColumnComponent>) {
461461
this.updateColumnList();
462-
const cols = change.filter(c => c.grid === this);
462+
const cols = change.filter(c => c.gridAPI.grid === this);
463463
if (cols.length > 0) {
464464
this.columnList.reset(cols);
465465
super.onColumnsChanged(this.columnList);

0 commit comments

Comments
 (0)