Skip to content

Commit bc39370

Browse files
xjerwabengry
authored andcommitted
Upgrade to Angular 7.0, Fabric 6.110.0; Fix build errors (#45)
* Upgrade react and react-dom to latest versions * Updated Angular to v7.0, Updated office-ui-fabric-react to v6.110.0 * Fixed missing imports and reference errors * Un-generic-ed EventListener (was causing errors since default EventListener is not generic) * Removed noops on HoverCard and Tooltip component scss since they were moved to global styles in Fabric * Upgrade office-ui-fabric-react to 6.110.0 + Add PlainCard and ExpandingCard components * Renamed EventListener to IEventListener, Renamed some *.d.ts files to *.ts due to build issues * Updated component property bindings to match new Fabric version * Rename EventListener array and map to `I`-prefied versions to avoid confusion
1 parent 5408b23 commit bc39370

Some content is hidden

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

46 files changed

+4500
-4292
lines changed

apps/demo/src/polyfills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
/** Evergreen browsers require these. **/
4444
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
45-
import 'core-js/es7/reflect';
45+
// import 'core-js/es7/reflect';
4646

4747
/**
4848
* Required to support Web Animations `@angular/platform-browser/animations`.

apps/docs/src/app/components/navbar/navbar.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component, AfterViewInit, ViewChild, ElementRef, ViewContainerRef, OnInit } from '@angular/core';
2-
import { fromEvent } from 'rxjs/observable/fromEvent';
3-
import { throttleTime } from 'rxjs/operators';
2+
import { fromEvent } from 'rxjs';
43
import { SubNavService } from '../../shared/sub-nav.service';
54

65
@Component({

apps/docs/src/polyfills.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import 'core-js/es6/set';
4242

4343
/** Evergreen browsers require these. **/
4444
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
45-
import 'core-js/es7/reflect';
45+
// import 'core-js/es7/reflect';
4646

4747
/**
4848
* Required to support Web Animations `@angular/platform-browser/animations`.

libs/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
],
5252
"private": false,
5353
"peerDependencies": {
54-
"@angular/compiler": "^6.1.0",
55-
"@angular/core": "^6.1.0",
56-
"@angular/platform-browser-dynamic": "^6.1.0",
57-
"@angular/platform-browser": "^6.1.0",
54+
"@angular/compiler": "^7.0.3",
55+
"@angular/core": "^7.0.3",
56+
"@angular/platform-browser-dynamic": "^7.0.3",
57+
"@angular/platform-browser": "^7.0.3",
5858
"react-dom": "^16.4.1",
5959
"react": "^16.4.1"
6060
},
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
interface EventListener<K extends keyof ElementEventMap> {
1+
interface IEventListener<K extends keyof ElementEventMap> {
22
type: K;
33
listener: (ev: ElementEventMap[K]) => void;
44
options?: boolean | EventListenerOptions;
55
}
66

7-
type EventListenerArray<K extends keyof ElementEventMap> = EventListener<K>[];
7+
type IEventListenerArray<K extends keyof ElementEventMap> = IEventListener<K>[];
88

9-
type EventListenersMap<K extends keyof ElementEventMap> = Record<K, EventListenerArray<K>>;
9+
type IEventListenersMap<K extends keyof ElementEventMap> = Record<K, IEventListenerArray<K>>;
1010

11-
// declare global {
1211
interface Element {
1312
/**
1413
* Gets all the event listeners of the element.
1514
*/
16-
getEventListeners<K extends keyof ElementEventMap>(): EventListenersMap<K>;
15+
getEventListeners<K extends keyof ElementEventMap>(): IEventListenersMap<K>;
1716

1817
/**
1918
* Gets all the event listeners of a type of the element.
2019
*/
21-
getEventListeners<K extends keyof ElementEventMap>(type?: K): EventListenerArray<K>;
20+
getEventListeners<K extends keyof ElementEventMap>(type?: K): IEventListenerArray<K>;
2221
}
23-
// }

libs/core/src/lib/declarations/known-keys.d.ts renamed to libs/core/src/lib/declarations/known-keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ type KnownKeysOfOptions = KnownKeys<Options>; // 'key' | 'title';
1616
1717
* Taken from https://stackoverflow.com/questions/51465182/typescript-remove-index-signature-using-mapped-types
1818
*/
19-
type KnownKeys<T> = {
19+
export type KnownKeys<T> = {
2020
[K in keyof T]: string extends K ? never : number extends K ? never : K
2121
} extends { [_ in keyof T]: infer U } ? U : never;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
import { KnownKeys } from './known-keys';
5+
46
/**
57
* Inverse of `Pick<T, K>`.
68
*/

libs/core/src/lib/declarations/public-api.d.ts renamed to libs/core/src/lib/declarations/public-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
export * from './index-signature';
54
export * from './known-keys';
65
export * from './many';
76
export * from './omit';
File renamed without changes.

0 commit comments

Comments
 (0)