Skip to content

Commit add1213

Browse files
authored
Merge branch '17.2.x' into aahmedov/fix-touched-ivalid-color-not-applied-#14900-17.2.x
2 parents fcc6b9d + fa249c6 commit add1213

24 files changed

+601
-128
lines changed

.vscode/launch.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,13 @@
2727
// "cwd": "<absolute directory of the project, having an old version of igniteui-angular, on which the migrations are applied>",
2828
"cwd": "C:\\Users\\User\\Desktop\\ng_proj\\test_migrations",
2929
"args": [
30-
"-r",
31-
32-
// you need to install ts-node for the test project
33-
"ts-node/register",
34-
3530
// "<path/to/ng>", "g",
3631
"${env:AppData}/npm/node_modules/@angular/cli/bin/ng", "g",
3732

38-
// "<../../relative/path/from/cwd/to>/igniteui-angular/projects/igniteui-angular/migrations/migration-collection.json:migration-<number>
39-
"../../../../../work/git/igniteui-angular/projects/igniteui-angular/migrations/migration-collection.json:migration-24"
33+
// "<../../relative/path/from/cwd/to>/igniteui-angular/dist/igniteui-angular/migrations/migration-collection.json:migration-<number>
34+
"../../../../../work/git/igniteui-angular/dist/igniteui-angular/migrations/migration-collection.json:migration-23"
4035
],
41-
"env": {
42-
"TS_NODE_PROJECT": "${workspaceFolder}/projects/igniteui-angular/migrations/tsconfig.json"
43-
}
36+
"preLaunchTask": "buildMigrations"
4437
},
4538
{
4639
"name": "Run schematics",

.vscode/tasks.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "build:schematics",
7+
"problemMatcher": [],
8+
"label": "buildSchematics",
9+
"detail": "Build schematics"
10+
},
11+
{
12+
"type": "npm",
13+
"script": "build:migrations -- --sourceMap",
14+
"dependsOn": [
15+
"buildSchematics"
16+
],
17+
"problemMatcher": [],
18+
"label": "buildMigrationsSourceMap",
19+
"detail": "Build migrations with sourceMap for debugging"
20+
},
21+
{
22+
"type": "shell",
23+
"command": "node ./scripts/migrations-sourcemap-shift.mjs",
24+
"dependsOn": [
25+
"buildMigrationsSourceMap"
26+
],
27+
"problemMatcher": [],
28+
"label": "buildMigrations",
29+
"detail": "Build migrations with sourceMap for debugging"
30+
},
31+
]
32+
}

projects/igniteui-angular/migrations/common/ServerHost.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Tree } from '@angular-devkit/schematics';
22
import * as pathFs from 'path';
33
import * as ts from 'typescript/lib/tsserverlibrary';
44
import { CUSTOM_TS_PLUGIN_NAME, CUSTOM_TS_PLUGIN_PATH } from './tsUtils';
5+
import { createRequire } from 'module';
56

67
/**
78
* Language server host is responsible for **most** of the FS operations / checks
@@ -11,6 +12,8 @@ export class ServerHost implements ts.server.ServerHost {
1112
public readonly args: string[];
1213
public readonly newLine: string;
1314
public readonly useCaseSensitiveFileNames: boolean;
15+
/** Cached because Angular schematics encapsulation's customRequire doesn't provide `resolve` */
16+
private nativeRequire = createRequire(__filename);
1417

1518
constructor(private host: Tree) {
1619
this.args = ts.sys.args;
@@ -126,7 +129,7 @@ export class ServerHost implements ts.server.ServerHost {
126129
moduleName = CUSTOM_TS_PLUGIN_PATH;
127130
paths.push(__dirname);
128131
}
129-
const modulePath = require.resolve(moduleName, { paths });
132+
const modulePath = this.nativeRequire.resolve(moduleName, { paths });
130133
return {
131134
module: require(modulePath),
132135
error: undefined,

projects/igniteui-angular/migrations/common/UpdateChanges.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export class UpdateChanges {
682682
}
683683

684684
// attempt to find a main tsconfig from workspace:
685-
const wsProject = this.workspace.projects[0];
685+
const wsProject = Object.values(this.workspace.projects)[0];
686686
// technically could be per-project, but assuming there's at least one main tsconfig for IDE support
687687
const projectConfig = wsProject.architect?.build?.options['tsConfig'];
688688

@@ -847,8 +847,8 @@ export class UpdateChanges {
847847
for (const key of projectKeys) {
848848
const wsProject = this.workspace.projects[key];
849849
// intentionally compare against string values of the enum to avoid hard import
850-
if (wsProject.projectType == "application" && wsProject.architect?.build?.options['main']) {
851-
return wsProject.architect.build.options['main'];
850+
if (wsProject.projectType == "application" && wsProject.architect?.build?.options) {
851+
return wsProject.architect.build.options['browser'] || wsProject.architect.build.options['main'];
852852
} else if (wsProject.projectType == "library") {
853853
// TODO: attempt to resolve from project ng-package.json or tsConfig
854854
}

projects/igniteui-angular/src/lib/core/styles/components/query-builder/_query-builder-theme.scss

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
.igx-filter-tree__expression-column {
226226
padding-inline: pad-inline(rem(3px), rem(6px), rem(8px));
227227
}
228-
228+
229229
igx-prefix {
230230
display: flex;
231231
}
@@ -239,20 +239,10 @@
239239
%filter-tree__expression-actions {
240240
display: inline-flex;
241241
margin: 0 rem(8px);
242+
gap: rem(8px);
242243

243-
igx-icon {
244-
cursor: pointer;
245-
color: color(null, 'gray', 500);
246-
outline-style: none;
247-
248-
&:hover,
249-
&:focus {
250-
color: color(null, 'gray', 800);
251-
}
252-
}
253-
254-
igx-icon + igx-icon {
255-
margin-inline-start: rem(8px);
244+
%igx-icon-button-display {
245+
--size: #{sizable(rem(20px), rem(24px), rem(32px))};
256246
}
257247
}
258248

projects/igniteui-angular/src/lib/core/styles/components/tabs/_tabs-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
}
351351

352352
@if $bootstrap-theme {
353-
border: rem(1px) solid transparent;
353+
padding-block: rem(12px);
354354
border-start-start-radius: var-get($theme, 'border-radius');
355355
border-start-end-radius: var-get($theme, 'border-radius');
356356
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
285285
if (this.pinned) {
286286
child.pinned = this.pinned;
287287
}
288+
if (this._hidden) {
289+
child.hidden = this._hidden;
290+
}
288291
});
289292
if (this.collapsible) {
290293
this.setExpandCollapseState();

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,16 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
221221

222222
/**
223223
* Gets the minimum height.
224+
*
225+
* Setting value in template:
226+
* ```ts
227+
* [minHeight]="'<number><unit (px|rem|etc..)>'"
228+
* ```
229+
*
230+
* Example for setting a value:
231+
* ```ts
232+
* [minHeight]="'700px'"
233+
* ```
224234
*/
225235
@Input()
226236
public get minHeight(): string {
@@ -258,6 +268,16 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
258268

259269
/**
260270
* Gets the maximum height.
271+
*
272+
* Setting value in template:
273+
* ```ts
274+
* [maxHeight]="'<number><unit (px|rem|etc..)>'"
275+
* ```
276+
*
277+
* Example for setting a value:
278+
* ```ts
279+
* [maxHeight]="'700px'"
280+
* ```
261281
*/
262282
@Input()
263283
@HostBinding('style.max-height')

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import { OneGroupOneColGridComponent, OneGroupThreeColsGridComponent,
1818
NestedColGroupsGridComponent, StegosaurusGridComponent,
1919
OneColPerGroupGridComponent, NestedColumnGroupsGridComponent,
2020
DynamicGridComponent, NestedColGroupsWithTemplatesGridComponent,
21-
DynamicColGroupsGridComponent } from '../../test-utils/grid-mch-sample.spec';
21+
DynamicColGroupsGridComponent,
22+
ColumnGroupHiddenInTemplateComponent} from '../../test-utils/grid-mch-sample.spec';
2223
import { CellType } from '../common/grid.interface';
2324

2425
const GRID_COL_THEAD_TITLE_CLASS = 'igx-grid-th__title';
@@ -47,7 +48,8 @@ describe('IgxGrid - multi-column headers #grid', () => {
4748
NestedColumnGroupsGridComponent,
4849
DynamicGridComponent,
4950
NestedColGroupsWithTemplatesGridComponent,
50-
DynamicColGroupsGridComponent
51+
DynamicColGroupsGridComponent,
52+
ColumnGroupHiddenInTemplateComponent
5153
]
5254
})
5355
.compileComponents();
@@ -392,6 +394,20 @@ describe('IgxGrid - multi-column headers #grid', () => {
392394
expect(generalHeader.nativeElement.firstElementChild.title).toBe('General Information Title');
393395
expect(addressHeader.nativeElement.firstElementChild.title).toBe('Address Information');
394396
});
397+
398+
it('should hide column group when hidden property is set to true in the template - parent and child level', () => {
399+
fixture = TestBed.createComponent(ColumnGroupHiddenInTemplateComponent);
400+
fixture.detectChanges();
401+
402+
grid = fixture.componentInstance.grid;
403+
const generalGroup = grid.columnList.find(c => c.header === 'General Information');
404+
const locationGroup = grid.columnList.find(c => c.header === 'Location');
405+
expect(generalGroup.hidden).toBe(true);
406+
expect(locationGroup.hidden).toBe(true);
407+
408+
expect(GridFunctions.getColumnHeaders(fixture).length).toEqual(6);
409+
expect(GridFunctions.getColumnGroupHeaders(fixture).length).toEqual(2);
410+
});
395411
});
396412

397413
describe('Columns widths tests (1 group 1 column) ', () => {

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,6 +3001,40 @@ describe('IgxGrid - Advanced Filtering #grid - ', () => {
30013001
verifyContextMenuVisibility(fix, false);
30023002
}));
30033003

3004+
it('Should navigate with Tab/Shift+Tab through chips" "edit", "cancel" and "adding" buttons, fields of a condition in edit mode.', fakeAsync(() => {
3005+
// Apply advanced filter through API.
3006+
const tree = new FilteringExpressionsTree(FilteringLogic.Or);
3007+
tree.filteringOperands.push({
3008+
fieldName: 'ProductName', searchVal: 'angular', condition: IgxStringFilteringOperand.instance().condition('contains'),
3009+
ignoreCase: true
3010+
});
3011+
tree.filteringOperands.push({
3012+
fieldName: 'ProductName', searchVal: 'script', condition: IgxStringFilteringOperand.instance().condition('contains'),
3013+
ignoreCase: true
3014+
});
3015+
grid.advancedFilteringExpressionsTree = tree;
3016+
fix.detectChanges();
3017+
3018+
// Open Advanced Filtering dialog.
3019+
grid.openAdvancedFilteringDialog();
3020+
fix.detectChanges();
3021+
3022+
// Press 'Enter' on the second chip and verify it is selected.
3023+
UIInteractions.triggerKeyDownEvtUponElem('Enter', GridFunctions.getAdvancedFilteringTreeExpressionChip(fix, [0]));
3024+
tick(200);
3025+
fix.detectChanges();
3026+
3027+
let chipActions = fix.debugElement.query(By.css('.igx-filter-tree'));
3028+
GridFunctions.verifyTabbableElements(chipActions);
3029+
3030+
// Press 'Enter' on the edit button.
3031+
UIInteractions.triggerKeyDownEvtUponElem('Enter', GridFunctions.getAdvancedFilteringTreeExpressionEditIcon(fix, [0]));
3032+
fix.detectChanges();
3033+
3034+
chipActions = fix.debugElement.query(By.css('.igx-filter-tree'));
3035+
GridFunctions.verifyInEditTabbableElements(chipActions);
3036+
}));
3037+
30043038
});
30053039

30063040
});

0 commit comments

Comments
 (0)