Skip to content

Commit d8fb213

Browse files
authored
Merge branch '10.1.x' into mkirova/fix-8104-10.1.x
2 parents f9711a3 + fea5f38 commit d8fb213

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ describe('UpdateChanges', () => {
390390
});
391391
spyOn<any>(fs, 'readFileSync').and.callFake(() => JSON.stringify(classJson));
392392

393-
const fileContent =
393+
let fileContent =
394394
`import { Size, Type as someThg } from "igniteui-angular";
395395
import { IgxService, IgxDiffService as eDiffService, Calendar as Calendar } from 'igniteui-angular';
396396
import { Type } from "@angular/core";
@@ -411,7 +411,7 @@ export class Test {
411411
expect(update.getClassChanges()).toEqual(classJson);
412412

413413
update.applyChanges();
414-
expect(appTree.readContent('test.component.ts')).toEqual(
414+
let expectedFileContent =
415415
`import { IgxSize, IgxType as someThg } from "igniteui-angular";
416416
import { IgxService1, IgxNewDiffService as eDiffService, CalendarActual as Calendar } from 'igniteui-angular';
417417
import { Type } from "@angular/core";
@@ -423,8 +423,15 @@ export class Test {
423423
cal: Calendar;
424424
425425
constructor (public router: Router, private _iconService: IgxService1) {}
426-
}`
427-
);
426+
}`;
427+
expect(appTree.readContent('test.component.ts')).toEqual(expectedFileContent);
428+
429+
// with ig feed package:
430+
fileContent = fileContent.replace(/igniteui-angular/g, '@infragistics/igniteui-angular');
431+
expectedFileContent = expectedFileContent.replace(/igniteui-angular/g, '@infragistics/igniteui-angular');
432+
appTree.overwrite('test.component.ts', fileContent);
433+
update.applyChanges();
434+
expect(appTree.readContent('test.component.ts')).toEqual(expectedFileContent);
428435
});
429436

430437
it('should move property value between element tags', done => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function getImportModulePositions(sourceText: string, startsWith: string)
6464
/** Filters out statements to named imports (e.g. `import {x, y}`) from PACKAGE_IMPORT */
6565
const namedImportFilter = (statement: ts.Statement) => {
6666
if (statement.kind === ts.SyntaxKind.ImportDeclaration &&
67-
((statement as ts.ImportDeclaration).moduleSpecifier as ts.StringLiteral).text === PACKAGE_IMPORT) {
67+
((statement as ts.ImportDeclaration).moduleSpecifier as ts.StringLiteral).text.endsWith(PACKAGE_IMPORT)) {
6868

6969
const clause = (statement as ts.ImportDeclaration).importClause;
7070
return clause && clause.namedBindings && clause.namedBindings.kind === ts.SyntaxKind.NamedImports;

projects/igniteui-angular/src/lib/calendar/public_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from './calendar';
2+
export * from './calendar-base';
23
export * from './calendar.component';
34
export * from './days-view/days-view.component';
45
export * from './months-view/months-view.component';

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
</ng-template>
1010
<ng-template #defaultCell>
11-
<div
11+
<div *ngIf="column.dataType !== 'boolean'"
1212
igxTextHighlight
1313
class="igx-grid__td-text"
1414
style="pointer-events: none;"
@@ -35,8 +35,6 @@
3535
? (value | number:column.pipeArgs.digitsInfo:grid.locale)
3636
: column.dataType === "date"
3737
? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)
38-
: column.dataType === "boolean"
39-
? ""
4038
: value
4139
}}</div>
4240
<igx-icon

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
</ng-template>
1010
<ng-template #defaultCell>
11-
<div
11+
<div *ngIf="column.dataType !== 'boolean'"
1212
igxTextHighlight
1313
class="igx-grid__td-text"
1414
style="pointer-events: none;"
@@ -35,8 +35,6 @@
3535
? (value | number:column.pipeArgs.digitsInfo:grid.locale)
3636
: column.dataType === "date"
3737
? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)
38-
: column.dataType === "boolean"
39-
? ""
4038
: value
4139
}}</div>
4240
<igx-icon

src/app/calendar/calendar.sample.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component, OnInit, ViewChild } from '@angular/core';
2-
import { IgxCalendarComponent, DateRangeType, CalendarView } from 'igniteui-angular';
3-
import { IViewDateChangeEventArgs } from '../../../projects/igniteui-angular/src/lib/calendar/calendar-base';
2+
import { IgxCalendarComponent, DateRangeType, CalendarView, IViewDateChangeEventArgs } from 'igniteui-angular';
43

54
@Component({
65
selector: 'app-calendar-sample',

0 commit comments

Comments
 (0)