Skip to content

Commit 0b24c57

Browse files
authored
Merge branch '9.1.x' into SIvanova/bottom-nav-disabled-tabs-9.1.x-
2 parents 552d267 + 343b5db commit 0b24c57

File tree

5 files changed

+142
-22
lines changed

5 files changed

+142
-22
lines changed

.github/workflows/npm-publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Npm.js deploy
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
registry-url: 'https://registry.npmjs.org'
16+
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
17+
- run: echo ${VERSION}
18+
19+
- run: echo "NG_CLI_ANALYTICS=false" >> $GITHUB_ENV
20+
- run: echo "NODE_OPTIONS='--max_old_space_size=4096'" >> $GITHUB_ENV
21+
- run: npm ci
22+
23+
- run: npm run build:lib
24+
- run: npm run build:schematics
25+
- run: npm run build:migration
26+
27+
# define npm tag
28+
- run: if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV
29+
- run: echo ${NPM_TAG}
30+
31+
# copy readme
32+
- run: cp ../../README.md README.md
33+
working-directory: dist/igniteui-angular
34+
35+
# create version and publish it to npmjs
36+
- run: npm version ${VERSION} --no-git-tag-version --save --verbose
37+
working-directory: dist/igniteui-angular
38+
39+
- run: npm publish --tag ${NPM_TAG}
40+
working-directory: dist/igniteui-angular
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.travis.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ script:
2828
- if [ -z "${TRAVIS_TAG}" ]; then npm run test:schematics; fi
2929
- if [ -z "${TRAVIS_TAG}" ] && [ "${TRAVIS_REPO_SLUG}" == "IgniteUI/igniteui-angular" ]; then cat ./coverage/lcov.info | coveralls; fi
3030

31-
before_deploy:
32-
- npm run build:schematics
33-
- npm run build:migration
34-
# move to dist
35-
- cd dist/igniteui-angular
36-
# update package versions
37-
- npm version "${TRAVIS_TAG}" --no-git-tag-version --save
38-
- if [[ "${TRAVIS_TAG}" == *"alpha"* || "${TRAVIS_TAG}" == *"beta"* || "${TRAVIS_TAG}" == *"rc"* ]]; then export NPM_TAG="next"; else export NPM_TAG="latest"; fi
31+
# before_deploy:
32+
# - npm run build:schematics
33+
# - npm run build:migration
34+
# # move to dist
35+
# - cd dist/igniteui-angular
36+
# # update package versions
37+
# - npm version "${TRAVIS_TAG}" --no-git-tag-version --save
38+
# - if [[ "${TRAVIS_TAG}" == *"alpha"* || "${TRAVIS_TAG}" == *"beta"* || "${TRAVIS_TAG}" == *"rc"* ]]; then export NPM_TAG="next"; else export NPM_TAG="latest"; fi
3939

40-
# copy readme
41-
- cp ../../README.md README.md
40+
# # copy readme
41+
# - cp ../../README.md README.md
4242

43-
deploy:
44-
provider: npm
45-
tag: "${NPM_TAG}"
46-
skip_cleanup: true
47-
48-
api_key:
49-
secure: DzxT8e3ryMBPMgx+6toU7+O+1nBLzjCAO4vyDQbze9Fi1jJ23PUUXuG9UmXqnzPUJ64uK4qzi40QiPdk4P0AsOiBr66fQtn02f/Yo1F42r13X9jKuqOdJlRl3dTWPGt5HOBO4YUq6BYA1HAh09/nsgLt670Wk2I8PMNpUiuTFI1F6vhGFsrjEaKbknrZhrQzfAxbTkbZe3RJmrEJQzU5CfFkZzoqsqpS20tFSSNiiPVy6G5OmAMW5f26klq5T0BZ0xBAf2AlXEmGo+LS+65Mbe+yQb1v/IUPk+YY4gwzQQEEh9d+MNU+tMOIVfkqyj5MIdILEIoLMlHKTtaqh8GsxOr2sFw6a4tTKpTqr4yBwuGspa/KjexC/41QVHQjaG0wAekuZluUOL+5I2jYzmVPAFSeiXhor4D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jLm8lzo9hSxA=
50+
# on:
51+
# tags: true
52+
# repo: IgniteUI/igniteui-angular

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ export class IgxGridNavigationService {
230230
}
231231

232232
protected forOfDir(): IgxForOfDirective<any> {
233-
const forOfDir = this.grid.dataRowList.length > 0 ? this.grid.dataRowList.first.virtDirRow : this.grid.headerContainer;
233+
const forOfDir = this.grid.dataRowList.length > 0 ? this.grid.dataRowList.first.virtDirRow : this.grid.summariesRowList.length ?
234+
this.grid.summariesRowList.first.virtDirRow : this.grid.headerContainer;
234235
return forOfDir as IgxForOfDirective<any>;
235236
}
236237

@@ -324,6 +325,13 @@ export class IgxGridNavigationService {
324325
}
325326

326327
public performHorizontalScrollToCell(visibleColumnIndex: number, cb?: () => void) {
328+
if (this.grid.rowList < 1 && this.grid.summariesRowList.length < 1 && this.grid.hasColumnGroups) {
329+
let column = this.grid.getColumnByVisibleIndex(visibleColumnIndex);
330+
while (column.parent) {
331+
column = column.parent;
332+
}
333+
visibleColumnIndex = this.forOfDir().igxForOf.indexOf(column);
334+
}
327335
if (!this.shouldPerformHorizontalScroll(visibleColumnIndex)) { return; }
328336
this.pendingNavigation = true;
329337
this.grid.parentVirtDir.onChunkLoad
@@ -364,7 +372,7 @@ export class IgxGridNavigationService {
364372
}
365373

366374
protected findFirstDataRowIndex(): number {
367-
return this.grid.dataView.findIndex(rec => !this.grid.isGroupByRecord(rec) && !this.grid.isDetailRecord(rec));
375+
return this.grid.dataView.findIndex(rec => !this.grid.isGroupByRecord(rec) && !this.grid.isDetailRecord(rec) && !rec.summaries);
368376
}
369377

370378
protected findLastDataRowIndex(): number {

projects/igniteui-angular/src/lib/grids/grid/grid-keyBoardNav-headers.spec.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
import { GridFunctions, GridSelectionFunctions } from '../../test-utils/grid-functions.spec';
1717
import { DebugElement } from '@angular/core';
1818
import { GridSelectionMode, FilterMode } from '../common/enums';
19+
import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition';
1920

2021
const DEBOUNCETIME = 30;
2122

@@ -1231,5 +1232,42 @@ describe('IgxGrid - Headers Keyboard navigation #grid', () => {
12311232

12321233
expect(GridFunctions.getExcelStyleFilteringComponent(fix)).toBeNull();
12331234
});
1235+
1236+
it('MCH Grid with no data: should be able to navigate with arrow keys in the headers', () => {
1237+
grid.filter('Country', 'Bulgaria', IgxStringFilteringOperand.instance().condition('contains'), true);
1238+
fix.detectChanges();
1239+
1240+
expect(grid.rowList.length).toBe(0);
1241+
1242+
let header = GridFunctions.getColumnGroupHeaderCell('General Information', fix);
1243+
UIInteractions.simulateClickAndSelectEvent(header);
1244+
fix.detectChanges();
1245+
1246+
GridFunctions.verifyHeaderIsFocused(header);
1247+
1248+
UIInteractions.triggerEventHandlerKeyDown('ArrowRight', gridHeader, false, false, true);
1249+
fix.detectChanges();
1250+
1251+
header = GridFunctions.getColumnGroupHeaderCell('Address Information', fix);
1252+
GridFunctions.verifyHeaderIsFocused(header);
1253+
1254+
UIInteractions.triggerEventHandlerKeyDown('ArrowDown', gridHeader, false, false, false);
1255+
fix.detectChanges();
1256+
1257+
header = GridFunctions.getColumnHeader('Region', fix);
1258+
GridFunctions.verifyHeaderIsFocused(header.parent);
1259+
1260+
UIInteractions.triggerEventHandlerKeyDown('ArrowRight', gridHeader, false, false, false);
1261+
fix.detectChanges();
1262+
1263+
header = GridFunctions.getColumnGroupHeaderCell('Country Information', fix);
1264+
GridFunctions.verifyHeaderIsFocused(header);
1265+
1266+
UIInteractions.triggerEventHandlerKeyDown('ArrowLeft', gridHeader, false, false, true);
1267+
fix.detectChanges();
1268+
1269+
header = GridFunctions.getColumnHeader('CompanyName', fix);
1270+
GridFunctions.verifyHeaderIsFocused(header.parent);
1271+
});
12341272
});
12351273
});

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,38 @@ describe('IgxGrid - Summaries #grid', () => {
17591759
expect(GridSummaryFunctions.getAllVisibleSummariesLength(fix)).toEqual(5);
17601760
});
17611761

1762+
it('should navigate correctly with Ctrl + ArrowUp/Home when summary position is top', () => {
1763+
grid.showSummaryOnCollapse = true;
1764+
fix.detectChanges();
1765+
1766+
grid.summaryPosition = 'top';
1767+
fix.detectChanges();
1768+
1769+
fix.detectChanges();
1770+
let cell = grid.getCellByColumn(6, 'Age');
1771+
UIInteractions.simulateClickAndSelectEvent(cell);
1772+
fix.detectChanges();
1773+
1774+
expect(cell.selected).toBe(true);
1775+
UIInteractions.triggerKeyDownEvtUponElem('Home', cell.nativeElement, true, false, false, true);
1776+
fix.detectChanges();
1777+
1778+
cell = grid.getCellByColumn(2, 'ID');
1779+
expect(cell.selected).toBe(true);
1780+
expect(cell.active).toBe(true);
1781+
1782+
cell = grid.getCellByColumn(6, 'Name');
1783+
UIInteractions.simulateClickAndSelectEvent(cell);
1784+
fix.detectChanges();
1785+
1786+
UIInteractions.triggerKeyDownEvtUponElem('ArrowUp', cell.nativeElement, true, false, false, true);
1787+
fix.detectChanges();
1788+
1789+
cell = grid.getCellByColumn(2, 'Name');
1790+
expect(cell.selected).toBe(true);
1791+
expect(cell.active).toBe(true);
1792+
});
1793+
17621794
it('should be able to enable/disable summaries at runtime', () => {
17631795
grid.getColumnByName('Age').hasSummary = false;
17641796
grid.getColumnByName('ParentID').hasSummary = false;

0 commit comments

Comments
 (0)