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

[rc] Angular 9; drop RxJS 5 #102

Merged
merged 2 commits into from
Feb 19, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ branches:
only:
- master
- /^[0-9]+\.[0-9]+\.[0-9]+.*/
- /^rc-.*$/

before_install:
- bash <(curl -s https://blackbaud.github.io/skyux-travis/v3/library-before-install.sh)
Expand Down
16,680 changes: 8,139 additions & 8,541 deletions package-lock.json

Large diffs are not rendered by default.

55 changes: 26 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,63 +22,60 @@
},
"homepage": "https://github.com/blackbaud/skyux-forms#readme",
"peerDependencies": {
"@angular/common": ">=4.3.6",
"@angular/core": ">=4.3.6",
"@angular/forms": ">=4.3.6",
"@skyux/i18n": "^3.5.0",
"@skyux/indicators": "^3.0.0"
"@angular/common": "^9.0.1",
"@angular/core": "^9.0.1",
"@angular/forms": "^9.0.1",
"@skyux/i18n": "^4.0.0-rc.0",
"@skyux/indicators": "^4.0.0-rc.0"
},
"dependencies": {},
"devDependencies": {
"@angular/animations": "7.2.16",
"@angular/common": "7.2.16",
"@angular/compiler": "7.2.16",
"@angular/compiler-cli": "7.2.16",
"@angular/core": "7.2.16",
"@angular/forms": "7.2.16",
"@angular/http": "7.2.16",
"@angular/platform-browser": "7.2.16",
"@angular/platform-browser-dynamic": "7.2.16",
"@angular/router": "7.2.16",
"@angular/animations": "9.0.1",
"@angular/common": "9.0.1",
"@angular/compiler": "9.0.1",
"@angular/compiler-cli": "9.0.1",
"@angular/core": "9.0.1",
"@angular/forms": "9.0.1",
"@angular/platform-browser": "9.0.1",
"@angular/platform-browser-dynamic": "9.0.1",
"@angular/router": "9.0.1",
"@blackbaud/auth-client": "2.22.0",
"@blackbaud/skyux-lib-clipboard": "1.1.1",
"@blackbaud/skyux-lib-code-block": "1.3.1",
"@blackbaud/skyux-lib-media": "1.2.0",
"@blackbaud/skyux-lib-stache": "3.2.3",
"@pact-foundation/pact": "9.6.1",
"@pact-foundation/pact": "9.7.0",
"@pact-foundation/pact-web": "7.4.0",
"@skyux-sdk/builder": "3.14.0",
"@skyux-sdk/builder-plugin-skyux": "1.2.2",
"@skyux-sdk/builder": "4.0.0-rc.1",
"@skyux-sdk/builder-plugin-skyux": "1.3.1",
"@skyux-sdk/e2e": "3.1.2",
"@skyux-sdk/pact": "3.3.1",
"@skyux-sdk/testing": "3.1.0",
"@skyux/animations": "3.0.0",
"@skyux/assets": "3.1.0",
"@skyux/config": "3.7.0",
"@skyux/config": "4.0.0-rc.0",
"@skyux/core": "3.10.1",
"@skyux/docs-tools": "3.1.0",
"@skyux/forms": "^3.4.0",
"@skyux/http": "3.9.0",
"@skyux/http": "4.0.0-rc.2",
"@skyux/i18n": "3.9.3",
"@skyux/indicators": "3.1.2",
"@skyux/indicators": "3.1.3",
"@skyux/inline-form": "3.1.0",
"@skyux/layout": "3.6.2",
"@skyux/lists": "3.8.0",
"@skyux/lookup": "3.2.0",
"@skyux/layout": "3.7.0",
"@skyux/lists": "3.8.1",
"@skyux/lookup": "3.2.1",
"@skyux/modals": "3.1.2",
"@skyux/omnibar-interop": "3.1.0",
"@skyux/popovers": "3.4.0",
"@skyux/router": "3.1.1",
"@skyux/tabs": "3.2.4",
"@skyux/theme": "3.9.0",
"@types/core-js": "2.5.2",
"codelyzer": "4.5.0",
"core-js": "2.6.11",
"codelyzer": "5.2.1",
"rxjs": "6.5.4",
"rxjs-compat": "6.5.4",
"ts-node": "8.6.2",
"tslint": "5.20.1",
"typescript": "3.2.4",
"zone.js": "0.8.29"
"typescript": "3.6.4",
"zone.js": "0.10.2"
}
}
19 changes: 18 additions & 1 deletion src/app/public/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
export * from './modules';
export * from './modules/character-counter/character-counter.module';

export * from './modules/checkbox/checkbox-change';
export * from './modules/checkbox/checkbox.module';

export * from './modules/file-attachment/types/file-attachment-change';
export * from './modules/file-attachment/types/file-attachment-click';
export * from './modules/file-attachment/types/file-drop-change';
export * from './modules/file-attachment/file-attachments.module';
export * from './modules/file-attachment/file-item';
export * from './modules/file-attachment/file-link';
export * from './modules/file-attachment/file-size.pipe';

export * from './modules/radio/types/radio-change';
export * from './modules/radio/radio.module';

export * from './modules/toggle-switch/types/toggle-switch-change';
export * from './modules/toggle-switch/toggle-switch.module';
2 changes: 0 additions & 2 deletions src/app/public/modules/character-counter/index.ts

This file was deleted.

8 changes: 8 additions & 0 deletions src/app/public/modules/checkbox/checkbox-change.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {
SkyCheckboxComponent
} from './checkbox.component';

export class SkyCheckboxChange {
public source: SkyCheckboxComponent;
public checked: boolean;
}
27 changes: 18 additions & 9 deletions src/app/public/modules/checkbox/checkbox.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ import {
Component,
DebugElement
} from '@angular/core';

import {
ComponentFixture,
async,
TestBed
} from '@angular/core/testing';

import {
BrowserModule,
By
} from '@angular/platform-browser';

import {
FormsModule,
NgForm,
Expand All @@ -28,10 +31,16 @@ import {
} from '@skyux-sdk/testing';

import {
SkyCheckboxChange,
SkyCheckboxComponent,
SkyCheckboxChange
} from '../checkbox/checkbox-change';

import {
SkyCheckboxComponent
} from './checkbox.component';

import {
SkyCheckboxModule
} from './';
} from './checkbox.module';

// #region helpers
/** Simple component for testing a single checkbox. */
Expand Down Expand Up @@ -683,12 +692,12 @@ describe('Checkbox component', () => {
});
});

it('should not have "sky-control-label-required" class', () => {
it('should not have "sky-control-label-required" class', async(() => {
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(labelElement).not.toHaveCssClass('sky-control-label-required');
});
});
}));
});

describe('with ngModel and required input', () => {
Expand Down Expand Up @@ -724,12 +733,12 @@ describe('Checkbox component', () => {
});
}));

it('should have "sky-control-label-required" class', () => {
it('should have "sky-control-label-required" class', async(() => {
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(labelElement).toHaveCssClass('sky-control-label-required');
});
});
}));

it('should not have required and aria-reqiured attributes when input is false', async(() => {
fixture.detectChanges();
Expand Down Expand Up @@ -893,13 +902,13 @@ describe('Checkbox component', () => {
});
}));

it('should not have required and aria-reqiured attributes when not required', () => {
it('should not have required and aria-reqiured attributes when not required', async(() => {
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(inputElement.getAttribute('required')).toBeNull();
expect(inputElement.getAttribute('aria-required')).toBeNull();
});
});
}));
});

describe('with reactive form and required validator', () => {
Expand Down
10 changes: 4 additions & 6 deletions src/app/public/modules/checkbox/checkbox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ import {
SkyFormsUtility
} from '../shared/forms-utility';

import {
SkyCheckboxChange
} from './checkbox-change';

/**
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
*/
let nextId = 0;

// A simple change event emitted by the SkyCheckbox component.
export class SkyCheckboxChange {
public source: SkyCheckboxComponent;
public checked: boolean;
}

@Component({
selector: 'sky-checkbox',
templateUrl: './checkbox.component.html'
Expand Down
3 changes: 0 additions & 3 deletions src/app/public/modules/checkbox/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,14 @@ describe('File attachment', () => {
expect(fileChangeActual.file.url).toBe('url');
});

it('shows the thumbnail if the item is an image', () => {
it('shows the thumbnail if the item is an image', async(() => {
testImage('png');
testImage('bmp');
testImage('jpeg');
testImage('gif');
});
}));

it('does not show an icon if it is not an image', () => {
it('does not show an icon if it is not an image', async(() => {
testNonImageType('pdf', 'pdf');
testNonImageType('gz', 'gz');
testNonImageType('rar', 'rar');
Expand All @@ -1060,7 +1060,7 @@ describe('File attachment', () => {
testNonImageType('tiff', 'image');
testNonImageType('other', 'text');
testNonImageType('mp4', 'video');
});
}));

it('should not show an icon if file or type does not exist', () => {
const imageEl = getImage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ import {
Subject
} from 'rxjs';

import {
takeUntil
} from 'rxjs/operators';

import {
SkyFormsUtility
} from '../shared/forms-utility';
Expand Down Expand Up @@ -183,10 +187,12 @@ export class SkyFileAttachmentComponent implements AfterViewInit, AfterContentIn
public ngAfterContentInit(): void {
// Handles updating classes when label changes
this.labelComponents.changes
.takeUntil(this.ngUnsubscribe)
.subscribe(() => {
this.changeDetector.detectChanges();
});
.pipe(
takeUntil(this.ngUnsubscribe)
)
.subscribe(() => {
this.changeDetector.detectChanges();
});
}

public isImage(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {

import {
SkyFormsResourcesModule
} from '../shared';
} from '../shared/forms-resources.module';

@NgModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('File item component', () => {
expect(sizeEl.nativeElement.textContent).toContain('(1 KB)');
});

it('shows the url if the item is a link', () => {
it('shows the url if the item is a link', async(() => {

componentInstance.fileItem = <SkyFileLink>{
url: 'myFile.txt'
Expand All @@ -167,7 +167,7 @@ describe('File item component', () => {
fixture.whenStable().then(() => {
expect(fixture.nativeElement).toBeAccessible();
});
});
}));

it('emits the delete event when the delete button is clicked', () => {
componentInstance.fileItem = <SkyFileLink>{
Expand Down Expand Up @@ -203,14 +203,14 @@ describe('File item component', () => {
expect(deletedFile.file.size).toBe(1000);
});

it('shows an image if the item is an image', () => {
it('shows an image if the item is an image', async(() => {
testImage('png');
testImage('bmp');
testImage('jpeg');
testImage('gif');
});
}));

it('shows a file icon with the proper extension if it is not an image', () => {
it('shows a file icon with the proper extension if it is not an image', async(() => {
testOtherPreview('pdf', 'pdf');
testOtherPreview('gz', 'gz');
testOtherPreview('rar', 'rar');
Expand All @@ -229,7 +229,7 @@ describe('File item component', () => {
testOtherPreview('tiff', 'image');
testOtherPreview('other', 'text');
testOtherPreview('mp4', 'video');
});
}));

it('should pass accessibility', async(() => {
componentInstance.fileItem = <SkyFileItem>{
Expand Down
10 changes: 0 additions & 10 deletions src/app/public/modules/file-attachment/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/app/public/modules/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/app/public/modules/radio/fixtures/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/app/public/modules/radio/index.ts

This file was deleted.