Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Sky 3 upgrade #56

Merged
merged 3 commits into from
Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/dubnium
lts/dubnium
46 changes: 43 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,48 @@
},
"dependencies": {},
"devDependencies": {
"@blackbaud/skyux": "2.49.1",
"@blackbaud/skyux-builder": "1.34.1",
"@skyux-sdk/builder-plugin-skyux": "1.0.0"
"@angular/animations": "7.2.15",
"@angular/common": "7.2.15",
"@angular/compiler": "7.2.15",
"@angular/compiler-cli": "7.2.15",
"@angular/core": "7.2.15",
"@angular/forms": "7.2.15",
"@angular/http": "7.2.15",
"@angular/platform-browser": "7.2.15",
"@angular/platform-browser-dynamic": "7.2.15",
"@angular/router": "7.2.15",
"@blackbaud/auth-client": "2.15.1",
"@pact-foundation/pact": "7.4.0",
"@pact-foundation/pact-web": "7.4.0",
"@skyux-sdk/builder": "3.7.0",
"@skyux-sdk/builder-plugin-skyux": "1.0.0",
"@skyux-sdk/e2e": "3.1.2",
"@skyux-sdk/pact": "3.2.1",
"@skyux-sdk/testing": "3.1.0",
"@skyux/animations": "3.0.0",
"@skyux/assets": "3.0.0",
"@skyux/config": "3.5.0",
"@skyux/core": "3.6.0",
"@skyux/flyout": "3.2.0",
"@skyux/forms": "3.2.0",
"@skyux/http": "3.4.1",
"@skyux/i18n": "3.6.1",
"@skyux/indicators": "3.0.3",
"@skyux/inline-form": "3.0.0",
"@skyux/lists": "3.3.0",
"@skyux/modals": "3.0.4",
"@skyux/omnibar-interop": "3.1.0",
"@skyux/popovers": "3.1.1",
"@skyux/router": "3.1.1",
"@skyux/theme": "3.7.0",
"@skyux/toast": "3.0.4",
"@types/core-js": "2.5.2",
"codelyzer": "4.5.0",
"rxjs": "6.5.2",
"rxjs-compat": "6.5.2",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "3.2.4",
"zone.js": "0.8.28"
}
}
6 changes: 6 additions & 0 deletions skyuxconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./node_modules/@skyux/config/skyuxconfig-schema.json",
"name": "skyux-flyout",
"mode": "easy",
"compileMode": "aot",
Expand All @@ -15,5 +16,10 @@
"unit": {
"browserSet": "paranoid"
}
},
"app": {
"styles": [
"@skyux/theme/css/sky.css"
]
}
}
10 changes: 9 additions & 1 deletion src/app/public/modules/flyout/flyout.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import {
Observable
} from 'rxjs';

import 'rxjs/add/observable/throw';

import {
SkyFlyoutConfig
} from './types';
Expand Down Expand Up @@ -511,7 +513,7 @@ describe('Flyout component', () => {

it('should have the sky-flyout-help-shim class if the help widget is present',
fakeAsync(() => {
spyOn(window.document, 'getElementById').and.returnValue({});
spyOn(window.document, 'getElementById').and.returnValue({} as HTMLElement);
openFlyout({});
const headerElement = getFlyoutHeaderElement();
expect(headerElement.classList.contains('sky-flyout-help-shim')).toBeTruthy();
Expand Down Expand Up @@ -563,8 +565,14 @@ describe('Flyout component', () => {
openFlyout({ defaultWidth: 500, settingsKey: 'testKey' });
fixture.detectChanges();
tick();

/* tslint:disable:deprecation */
/**
* NOTE: We need to update this to use the new throwError Observable creation function
*/
spyOn(SkyUIConfigService.prototype, 'setConfig')
.and.returnValue(Observable.throw({ message: 'Test error' }));
/* tslint:enable:deprecation */

resizeFlyout(1000, 1100);

Expand Down
9 changes: 9 additions & 0 deletions src/app/public/modules/flyout/flyout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
Subject
} from 'rxjs/Subject';

import 'rxjs/add/observable/merge';
import 'rxjs/add/operator/takeUntil';

import {
Expand Down Expand Up @@ -220,8 +221,16 @@ export class SkyFlyoutComponent implements OnDestroy, OnInit {
this.config.iteratorPreviousButtonDisabled = this.config.iteratorPreviousButtonDisabled || false;

const factory = this.resolver.resolveComponentFactory(component);

/* tslint:disable:deprecation */
/**
* NOTE: We need to update this to use the new Injector.create(options) method
* after Angular 4 support is dropped.
*/
const providers = ReflectiveInjector.resolve(this.config.providers);
const injector = ReflectiveInjector.fromResolvedProviders(providers, this.injector);
/* tslint:enable:deprecation */

const componentRef = this.target.createComponent(factory, undefined, injector);

this.flyoutInstance = this.createFlyoutInstance<T>(componentRef.instance);
Expand Down
5 changes: 5 additions & 0 deletions src/app/public/modules/flyout/flyout.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import {
FormsModule
} from '@angular/forms';

import {
BrowserAnimationsModule
} from '@angular/platform-browser/animations';

import {
RouterModule
} from '@angular/router';
Expand Down Expand Up @@ -60,6 +64,7 @@ import {
SkyWindowRefService
],
imports: [
BrowserAnimationsModule,
CommonModule,
FormsModule,
RouterModule,
Expand Down
6 changes: 4 additions & 2 deletions src/app/public/modules/flyout/flyout.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ describe('Flyout service', () => {
);

it('should expose a method to remove the flyout from the DOM', () => {
spyOn(window, 'setTimeout').and.callFake((fun: Function) => {
spyOn(window, 'setTimeout').and.callFake((fun: any) => {
fun();
return 0;
});
service.open(SkyFlyoutHostsTestComponent);
applicationRef.tick();
Expand All @@ -110,8 +111,9 @@ describe('Flyout service', () => {
);

it('should dispose of any open host if the service is destroyed', () => {
spyOn(window, 'setTimeout').and.callFake((fun: Function) => {
spyOn(window, 'setTimeout').and.callFake((fun: any) => {
fun();
return 0;
});
service.open(SkyFlyoutHostsTestComponent);
applicationRef.tick();
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./node_modules/@blackbaud/skyux-builder/tsconfig",
"extends": "./node_modules/@skyux-sdk/builder/tsconfig",
"compilerOptions": {
"module": "commonjs"
},
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@blackbaud/skyux-builder/tslint"
"extends": "@skyux-sdk/builder/tslint"
}