Skip to content

Commit 6bc542a

Browse files
authored
Merge branch 'master' into nrobakova/refactor-keyboardNav-tests
2 parents f662de2 + fa18660 commit 6bc542a

File tree

71 files changed

+980
-487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+980
-487
lines changed

CHANGELOG.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,34 @@ All notable changes for each version of this project will be documented in this
66

77
### General
88
- Added support for the Ivy renderer.
9-
- **Breaking Changes** The following classes have been renamed. Using `ng update` will apply automatically migrate your project to use the new names.
9+
- **Breaking Changes** The following classes and enumarators have been renamed. Using `ng update` will apply automatically migrate your project to use the new names.
1010
- `IgxDropDownBase` -> `IgxDropDownBaseDirective`
1111
- `IgxDropDownItemBase` -> `IgxDropDownItemBaseDirective`
1212
- `IgxGridBaseComponent` -> `IgxGridBaseDirective`
1313
- `IgxRowComponent` -> `IgxRowDirective`
1414
- `IgxHierarchicalGridBaseComponent` -> `IgxHierarchicalGridBaseDirective`
1515
- `IgxMonthPickerBase` -> `IgxMonthPickerBaseDirective`
16+
- `AvatarType` -> `IgxAvatarType`
17+
- `Size` -> `IgxAvatarSize`
18+
- `Type` -> `IgxBadgeType`
19+
- `SliderType` -> `IgxSliderType`
20+
- `TabsType` -> `IgxTabsType`
21+
22+
- **Breaking Changes** Due to a breaking change in Angular 9 with Ivy, Hammer providers are no longer included by default. You can find more information at: https://github.com/angular/angular/blob/master/CHANGELOG.md#breaking-changes-9 . Because of this change the following components require `HammerModule` to be imported in the root module of the application in order for user interactions to work as expected:
23+
- `IgxSlider`
24+
25+
The following components require `HammerModule` to be imported in the root module of the application so that their **touch** interactions work as expected:
26+
- `igxGrid`
27+
- `igxHierarchicalGrid`
28+
- `igxTreeGrid`
29+
- `igxList`
30+
- `igxNavigationDrawer`
31+
- `igxTimePicker`
32+
- `igxMonthPicker`
33+
- `igxSlider`
34+
- `igxCalendar`
35+
- `igxDatePicker`
36+
- `igxCarousel`
1637

1738
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
1839
- **Breaking Change** - Hierarchical grid children no longer use the same `IgxTransactionService` instance and transaction handling should be modified to address each grid's transactions separately.
@@ -25,6 +46,21 @@ All notable changes for each version of this project will be documented in this
2546
- `IgxCarousel`:
2647
- **Breaking Changes** -The carousel slides are no longer array, they are changed to QueryList.
2748
- **Behavioural change** - When slides are more than 5, a label is shown instead of the indicators. The count limit of visible indicators can be changed with the input `maximumIndicatorsCount`
49+
- `IgxAvatar`:
50+
- **Breaking Changes** - renamed the `default` enumeration member to `custom` in `IgxAvatarType`;
51+
- `IgxBadge`:
52+
- **Breaking Changes** - renamed the `default` enumeration member to `primary` in `IgxBadgeType`;
53+
- `IgxCard`:
54+
- **Breaking Changes** - renamed the `default` enumeration member to `elevated` in `IgxCardType`;
55+
- **Breaking Changes** - renamed the `default` enumeration member to `start` in `IgxCardActionsLayout`;
56+
- `IgxDivider`:
57+
- **Breaking Changes** - renamed the `default` enumeration member to `solid` in `IgxDividerType`;
58+
- **Breaking Changes** - renamed the `isDefault` getter to `isSolid`;
59+
- `IgxProgress`:
60+
- **Breaking Changes** - renamed the `danger` enumeration member to `error` in `IgxProgresType`;
61+
- **Breaking Changes** - renamed the `danger` getter to `error`;
62+
- `IgxTabs`:
63+
- **Breaking Changes** - The `tabsType` input property has been renamed to `type`. It should get renamed in your components via `ng update`;
2864
- `igxOverlay`:
2965
- **Behavioural Change** - `igxOverlay` - no longer persists element scrolling `out of the box`. In order to persist an element scroll position after attaching the element to an overlay, handle the exposed `onAppended` overlay event and manage/restore the scroll position.
3066

package-lock.json

Lines changed: 169 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,33 +44,33 @@
4444
},
4545
"private": true,
4646
"dependencies": {
47-
"@angular/animations": "^9.0.0-rc.14",
48-
"@angular/common": "^9.0.0-rc.14",
49-
"@angular/compiler": "^9.0.0-rc.14",
50-
"@angular/core": "^9.0.0-rc.14",
51-
"@angular/forms": "^9.0.0-rc.14",
52-
"@angular/platform-browser": "^9.0.0-rc.14",
53-
"@angular/platform-browser-dynamic": "^9.0.0-rc.14",
54-
"@angular/router": "^9.0.0-rc.14",
47+
"@angular/animations": "^9.0.0",
48+
"@angular/common": "^9.0.0",
49+
"@angular/compiler": "^9.0.0",
50+
"@angular/core": "^9.0.0",
51+
"@angular/forms": "^9.0.0",
52+
"@angular/platform-browser": "^9.0.0",
53+
"@angular/platform-browser-dynamic": "^9.0.0",
54+
"@angular/router": "^9.0.0",
5555
"@types/hammerjs": "^2.0.36",
5656
"@types/source-map": "0.5.2",
5757
"classlist.js": "^1.1.20150312",
5858
"core-js": "^2.6.2",
5959
"hammerjs": "^2.0.8",
6060
"jszip": "^3.1.5",
6161
"resize-observer-polyfill": "^1.5.1",
62-
"rxjs": "^6.5.3",
62+
"rxjs": "^6.5.4",
6363
"tslib": "^1.10.0",
6464
"web-animations-js": "^2.3.2",
6565
"zone.js": "~0.10.2"
6666
},
6767
"devDependencies": {
68-
"@angular-devkit/build-angular": "~0.900.0-rc.12",
69-
"@angular-devkit/build-ng-packagr": "~0.900.0-rc.12",
70-
"@angular-devkit/schematics": "^9.0.0-rc.12",
71-
"@angular/cli": "~9.0.0-rc.12",
72-
"@angular/compiler-cli": "^9.0.0-rc.14",
73-
"@angular/language-service": "^9.0.0-rc.14",
68+
"@angular-devkit/build-angular": "~0.900.1",
69+
"@angular-devkit/build-ng-packagr": "~0.900.1",
70+
"@angular-devkit/schematics": "^9.0.1",
71+
"@angular/cli": "~9.0.1",
72+
"@angular/compiler-cli": "^9.0.0",
73+
"@angular/language-service": "^9.0.0",
7474
"@angularclass/hmr": "^2.1.3",
7575
"@types/jasmine": "~3.3.5",
7676
"@types/jasminewd2": "~2.0.6",

projects/igniteui-angular/migrations/update-9_0_0/changes/classes.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,26 @@
2828
{
2929
"name": "IgxBaseExporter",
3030
"replaceWith": "IgxBaseExporterDirective"
31+
},
32+
{
33+
"name": "AvatarType",
34+
"replaceWith": "IgxAvatarType"
35+
},
36+
{
37+
"name": "Size",
38+
"replaceWith": "IgxAvatarSize"
39+
},
40+
{
41+
"name": "Type",
42+
"replaceWith": "IgxBadgeType"
43+
},
44+
{
45+
"name": "SliderType",
46+
"replaceWith": "IgxSliderType"
47+
},
48+
{
49+
"name": "TabsType",
50+
"replaceWith": "IgxTabsType"
3151
}
3252
]
3353
}

projects/igniteui-angular/migrations/update-9_0_0/changes/inputs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
"selector": "igx-slider",
99
"type": "component"
1010
}
11+
},
12+
{
13+
"name": "tabsType",
14+
"replaceWith": "type",
15+
"owner": {
16+
"selector": "igx-tabs",
17+
"type": "component"
18+
}
1119
}
1220
]
1321
}

projects/igniteui-angular/migrations/update-9_0_0/index.spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,32 @@ describe('Update 9.0.0', () => {
4343
`);
4444
done();
4545
});
46+
47+
it('should update Enum names.', done => {
48+
appTree.create(
49+
'/testSrc/appPrefix/component/enum.component.ts',
50+
`import { AvatarType, Size, Type, SliderType } from 'igniteui-angular';
51+
`);
52+
53+
const tree = schematicRunner.runSchematic('migration-13', {}, appTree);
54+
expect(tree.readContent('/testSrc/appPrefix/component/enum.component.ts'))
55+
.toEqual(
56+
`import { IgxAvatarType, IgxAvatarSize, IgxBadgeType, IgxSliderType } from 'igniteui-angular';
57+
`);
58+
done();
59+
});
60+
61+
it('should update input prop from tabsType to type', done => {
62+
appTree.create(
63+
'/testSrc/appPrefix/component/tabs.component.html',
64+
'<igx-tabs tabsType="fixed"></igx-tabs>'
65+
);
66+
67+
const tree = schematicRunner.runSchematic('migration-13', {}, appTree);
68+
69+
expect(tree.readContent('/testSrc/appPrefix/component/tabs.component.html'))
70+
.toEqual('<igx-tabs type="fixed"></igx-tabs>');
71+
72+
done();
73+
});
4674
});

projects/igniteui-angular/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@
7272
"resize-observer-polyfill": "^1.5.1"
7373
},
7474
"peerDependencies": {
75-
"@angular/common": "^8.0.0",
76-
"@angular/core": "^8.0.0",
77-
"@angular/animations": "^8.0.0",
78-
"@angular/forms": "^8.0.0",
75+
"@angular/common": "^9.0.0",
76+
"@angular/core": "^9.0.0",
77+
"@angular/animations": "^9.0.0",
78+
"@angular/forms": "^9.0.0",
7979
"web-animations-js": "^2.3.2"
8080
},
8181
"devDependencies": {
82-
"@igniteui/angular-schematics": "^9.0.500-rc.1"
82+
"@igniteui/angular-schematics": "~9.0.500-rc.3"
8383
},
8484
"ng-update": {
8585
"migrations": "./migrations/migration-collection.json"

projects/igniteui-angular/src/lib/avatar/avatar.component.spec.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
} from '@angular/core/testing';
66
import { By } from '@angular/platform-browser';
77
import { IgxIconModule } from '../icon/index';
8-
import { IgxAvatarComponent, AvatarType, Size } from './avatar.component';
8+
import { IgxAvatarComponent, IgxAvatarType, IgxAvatarSize } from './avatar.component';
99

1010
import { configureTestSuite } from '../test-utils/configure-suite';
1111

@@ -14,7 +14,6 @@ describe('Avatar', () => {
1414
const baseClass = 'igx-avatar';
1515

1616
const classes = {
17-
default: `${baseClass}--default`,
1817
round: `${baseClass}--rounded`,
1918
small: `${baseClass}--small`,
2019
medium: `${baseClass}--medium`,
@@ -76,22 +75,22 @@ describe('Avatar', () => {
7675
const instance = fixture.componentInstance.avatar;
7776
const hostEl = fixture.debugElement.query(By.css(baseClass)).nativeElement;
7877

79-
expect(instance.size).toEqual(Size.SMALL);
78+
expect(instance.size).toEqual(IgxAvatarSize.SMALL);
8079
expect(hostEl.classList).toContain(classes.small);
8180

82-
instance.size = Size.MEDIUM;
81+
instance.size = IgxAvatarSize.MEDIUM;
8382
fixture.detectChanges();
84-
expect(instance.size).toEqual(Size.MEDIUM);
83+
expect(instance.size).toEqual(IgxAvatarSize.MEDIUM);
8584
expect(hostEl.classList).not.toContain(classes.medium);
8685

87-
instance.size = Size.LARGE;
86+
instance.size = IgxAvatarSize.LARGE;
8887
fixture.detectChanges();
89-
expect(instance.size).toEqual(Size.LARGE);
88+
expect(instance.size).toEqual(IgxAvatarSize.LARGE);
9089
expect(hostEl.classList).not.toContain(classes.large);
9190

9291
instance.size = 'nonsense';
9392
fixture.detectChanges();
94-
expect(instance.size).toEqual(Size.SMALL);
93+
expect(instance.size).toEqual(IgxAvatarSize.SMALL);
9594
expect(hostEl.classList).toContain(classes.small);
9695
});
9796

@@ -102,13 +101,11 @@ describe('Avatar', () => {
102101
const instance = fixture.componentInstance.avatar;
103102
const hostEl = fixture.debugElement.query(By.css(baseClass)).nativeElement;
104103

105-
expect(instance.type).toEqual(AvatarType.DEFAULT);
106104
expect(instance.initials).toBeUndefined();
107105
expect(instance.src).toBeUndefined();
108106
expect(instance.icon).toBeUndefined();
109107

110108
expect(hostEl.textContent).toEqual('TEST');
111-
expect(hostEl.classList).toContain(classes.default);
112109
});
113110

114111

@@ -119,7 +116,7 @@ describe('Avatar', () => {
119116
const instance = fixture.componentInstance.avatar;
120117
const hostEl = fixture.debugElement.query(By.css(baseClass)).nativeElement;
121118

122-
expect(instance.type).toEqual(AvatarType.INITIALS);
119+
expect(instance.type).toEqual(IgxAvatarType.INITIALS);
123120
expect(instance.initials).toEqual('ZK');
124121
expect(hostEl.querySelector('span').textContent).toEqual('ZK');
125122
expect(hostEl.classList).toContain(classes.initials);
@@ -131,7 +128,7 @@ describe('Avatar', () => {
131128
const instance = fixture.componentInstance.avatar;
132129
const hostEl = fixture.debugElement.query(By.css(baseClass)).nativeElement;
133130

134-
expect(instance.type).toEqual(AvatarType.ICON);
131+
expect(instance.type).toEqual(IgxAvatarType.ICON);
135132
expect(instance.icon).toBeTruthy();
136133
expect(hostEl.classList).toContain(classes.icon);
137134
});
@@ -142,7 +139,7 @@ describe('Avatar', () => {
142139
const instance = fixture.componentInstance.avatar;
143140
const hostEl = fixture.debugElement.query(By.css(baseClass)).nativeElement;
144141

145-
expect(instance.type).toEqual(AvatarType.IMAGE);
142+
expect(instance.type).toEqual(IgxAvatarType.IMAGE);
146143
expect(instance.image).toBeTruthy();
147144
expect(instance.image.nativeElement.style.backgroundImage).toBeDefined();
148145

0 commit comments

Comments
 (0)