Skip to content

Commit

Permalink
feat(package.json): Update dependencies and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasonny83 committed Dec 18, 2018
1 parent 1826949 commit 2f396b8
Show file tree
Hide file tree
Showing 13 changed files with 6,251 additions and 3,186 deletions.
9,100 changes: 6,066 additions & 3,034 deletions package-lock.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@
"e2e": "ng e2e"
},
"dependencies": {
"@angular/animations": "^6.0.4",
"@angular/common": "^6.0.4",
"@angular/compiler": "^6.0.4",
"@angular/core": "^6.0.4",
"@angular/forms": "^6.0.4",
"@angular/http": "^6.0.4",
"@angular/platform-browser": "^6.0.4",
"@angular/platform-browser-dynamic": "^6.0.4",
"@angular/router": "^6.0.4",
"core-js": "^2.5.4",
"rxjs": "^6.2.1",
"@angular/animations": "^6.1.10",
"@angular/common": "^6.1.10",
"@angular/compiler": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/forms": "^6.1.10",
"@angular/http": "^6.1.10",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/router": "^6.1.10",
"core-js": "^2.6.1",
"rxjs": "^6.3.3",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.5",
"@angular-devkit/build-ng-packagr": "~0.6.5",
"@angular-devkit/build-angular": "^0.11.3",
"@angular-devkit/build-ng-packagr": "^0.11.3",
"@angular/cli": "~6.0.8",
"@angular/compiler-cli": "^6.0.4",
"@angular/language-service": "^6.0.4",
"@types/jasmine": "~2.8.6",
"@angular/compiler-cli": "^6.1.10",
"@angular/language-service": "^6.1.10",
"@types/jasmine": "2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
Expand All @@ -69,12 +69,12 @@
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^3.0.0-rc.2",
"ng-packagr": "^3.0.6",
"protractor": "~5.3.0",
"semantic-release": "^15.5.0",
"semantic-release": "^15.13.1",
"ts-node": "~5.0.1",
"tsickle": ">=0.25.5",
"tslib": "^1.7.1",
"tsickle": "^0.27.5",
"tslib": "^1.9.3",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,15 @@ describe('CookieLawContainerComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
],
declarations: [
CookieLawContainerComponent,
CookieLawComponent,
],
providers: [{
provide: Angular2CookieLawService,
useValue: CookieLawServiceStub,
}],
})
.compileComponents();
imports: [NoopAnimationsModule],
declarations: [CookieLawContainerComponent, CookieLawComponent],
providers: [
{
provide: Angular2CookieLawService,
useValue: CookieLawServiceStub
}
]
}).compileComponents();

cookiesPolicyService = TestBed.get(Angular2CookieLawService);
}));
Expand All @@ -61,8 +57,9 @@ describe('CookieLawContainerComponent', () => {

expect(component).not.toBeNull();

expect(fixture.debugElement.nativeElement.textContent)
.toContain('By continuing to browse the site, you\'re agreeing to our use of cookies.');
expect(fixture.debugElement.nativeElement.textContent).toContain(
'By continuing to browse the site, you\'re agreeing to our use of cookies.'
);
});

it('CookieLawComponent should have a `seen` attribute', () => {
Expand Down Expand Up @@ -95,12 +92,15 @@ describe('CookieLawContainerComponent', () => {
it('CookieLawElementComponent should accept attributes', () => {
fixture.detectChanges();

const el: DebugElement = fixture.debugElement.query(By.css('cookie-law-component'));
const el: DebugElement = fixture.debugElement.query(
By.css('cookie-law-component')
);

expect(fixture.nativeElement.getAttribute('seen')).toBe('false');

expect(el.nativeElement.textContent)
.not.toContain(`Learn more in our privacy policy.`);
expect(el.nativeElement.textContent).not.toContain(
`Learn more in our privacy policy.`
);
expect(el.componentInstance.name).not.toBeDefined();
expect(el.componentInstance.learnMore).not.toBeDefined();
expect(el.componentInstance.target).toBe('_blank');
Expand All @@ -114,7 +114,9 @@ describe('CookieLawContainerComponent', () => {

fixture.detectChanges();

const el: DebugElement = fixture.debugElement.query(By.css('cookie-law-component'));
const el: DebugElement = fixture.debugElement.query(
By.css('cookie-law-component')
);

expect(component.position).toBe('top');
expect(el.componentInstance.position).toBe('top');
Expand All @@ -126,11 +128,14 @@ describe('CookieLawContainerComponent', () => {

fixture.detectChanges();

const el: DebugElement = fixture.debugElement.query(By.css('cookie-law-component'));
const el: DebugElement = fixture.debugElement.query(
By.css('cookie-law-component')
);

expect(el.componentInstance.target).toBe('_self');
expect(el.nativeElement.textContent)
.toContain(`Learn more in our privacy policy.`);
expect(el.nativeElement.textContent).toContain(
`Learn more in our privacy policy.`
);

component.learnMore = 'false';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
HostBinding,
Input,
Output,
EventEmitter,
EventEmitter
} from '@angular/core';

import { Angular2CookieLawService } from './angular2-cookie-law.service';
Expand All @@ -23,18 +23,19 @@ import { CookieLawTarget, CookieLawPosition } from './definitions';
@Component({
selector: 'cookie-law',
template: `
<cookie-law-component *ngIf="!seen"
[awsomeCloseIcon]="awsomeCloseIcon"
[learnMore]="learnMore"
[target]="target"
[position]="position"
(isSeen)="hasBeenDismissed()">
<cookie-law-component
*ngIf="!seen"
[awsomeCloseIcon]="awsomeCloseIcon"
[learnMore]="learnMore"
[target]="target"
[position]="position"
(isSeen)="hasBeenDismissed()"
>
<ng-content></ng-content>
</cookie-law-component>
`,
`
})
export class CookieLawContainerComponent implements OnInit {

@HostBinding('attr.seen')
public seen: boolean;

Expand Down Expand Up @@ -84,5 +85,4 @@ export class CookieLawContainerComponent implements OnInit {
public dismiss(): void {
this.cookieLawComponent.dismiss();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
background: #333;
color: #bbb;
display: block;
font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 15px;
font-weight: 200;
line-height: 20px;
Expand All @@ -17,8 +17,8 @@

.cookie-law-wrapper a {
color: #bbb;
-webkit-transition: color .2s;
transition: color .2s;
-webkit-transition: color 0.2s;
transition: color 0.2s;
}

.cookie-law-wrapper a:hover {
Expand All @@ -45,8 +45,8 @@
fill: #bbb;
width: 20px;
height: 20px;
-webkit-transition: fill .2s;
transition: fill .2s;
-webkit-transition: fill 0.2s;
transition: fill 0.2s;
}

.cookie-law-wrapper .copy {
Expand All @@ -63,8 +63,9 @@
text-decoration: underline;
}

.cookie-law-wrapper .copy a:active, .copy a:hover {
outline: 0;
.cookie-law-wrapper .copy a:active,
.copy a:hover {
outline: 0;
}

@media (min-width: 600px) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
<div class="cookie-law-wrapper"
[ngStyle]="currentStyles"
[@transition]="transition"
(@transition.done)="afterDismissAnimation($event)">

<div
class="cookie-law-wrapper"
[ngStyle]="currentStyles"
[@transition]="transition"
(@transition.done)="afterDismissAnimation($event)"
>
<div class="copy">
<span #ref><ng-content></ng-content></span>

<span *ngIf="ref.childNodes.length == 0">
By continuing to browse the site, you're agreeing to our use of cookies.
<span *ngIf="learnMore">
Learn more in our <a [href]="learnMore" [target]="target" [rel]="noopener ? 'noopener noreferrer' : null">privacy policy</a>.
Learn more in our
<a [href]="learnMore" [target]="target" [rel]="noopener ? 'noopener noreferrer' : null"
>privacy policy</a
>.
</span>
</span>

<a href="#" role="button"
class="dismiss"
[innerHTML]="closeSvg"
(click)="dismiss($event)"
[attr.aria-label]="closeSvg"></a>
<a
href="#"
role="button"
class="dismiss"
[innerHTML]="closeSvg"
(click)="dismiss($event)"
[attr.aria-label]="closeSvg"
></a>
</div>
</div>
Loading

0 comments on commit 2f396b8

Please sign in to comment.