Skip to content

Commit

Permalink
perf(core): upgrade to es2018
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Dec 8, 2018
1 parent 7c899a3 commit e525738
Show file tree
Hide file tree
Showing 38 changed files with 171 additions and 302 deletions.
5 changes: 2 additions & 3 deletions libs/animations/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/app-confirm/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/auth/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/breadcrumbs/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/chat-box/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/clap/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/context-menu/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/core/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
Expand Up @@ -10,6 +10,7 @@ import { environment } from '@env/environment';
import { RouterState } from '@ngxs/router-plugin';
import { map } from 'rxjs/operators';
import { WINDOW } from '@ngx-starter-kit/core';
import { untilDestroy } from '@ngx-starter-kit/ngx-utils';

@Component({
selector: 'ngx-dashboard-layout',
Expand All @@ -20,12 +21,7 @@ import { WINDOW } from '@ngx-starter-kit/core';
// encapsulation: ViewEncapsulation.None
})
export class DashboardLayoutComponent implements OnInit, OnDestroy {
@ViewChild('sidenav')
sidenav;

private _mediaSubscription: Subscription;
private _routerEventsSubscription: Subscription;

@ViewChild('sidenav') sidenav;
quickpanelOpen = false;
sidenavOpen = true;
sidenavMode = 'side';
Expand All @@ -43,21 +39,25 @@ export class DashboardLayoutComponent implements OnInit, OnDestroy {
) {}

ngOnInit() {
this.crumbs$ = this.store
.select<any>(RouterState.state)
.pipe(map(state => Array.from(state.breadcrumbs, ([key, value]) => ({ name: key, link: '/' + value }))));
this.crumbs$ = this.store.select<any>(RouterState.state).pipe(
untilDestroy(this),
map(state => Array.from(state.breadcrumbs, ([key, value]) => ({ name: key, link: '/' + value }))),
);

this.depth$ = this.store.select<any>(RouterState.state).pipe(map(state => state.data.depth));

this._mediaSubscription = this.media.subscribe((change: MediaChange) => {
const isMobile = change.mqAlias === 'xs' || change.mqAlias === 'sm';
this.media
.asObservable()
.pipe(untilDestroy(this))
.subscribe((change: MediaChange) => {
const isMobile = change.mqAlias === 'xs' || change.mqAlias === 'sm';

this.isMobile = isMobile;
this.sidenavMode = isMobile ? 'over' : 'side';
this.sidenavOpen = !isMobile;
});
this.isMobile = isMobile;
this.sidenavMode = isMobile ? 'over' : 'side';
this.sidenavOpen = !isMobile;
});

this._routerEventsSubscription = this.router.events.subscribe(event => {
this.router.events.pipe(untilDestroy(this)).subscribe(event => {
if (event instanceof NavigationEnd && this.isMobile) {
this.sidenav.close();
}
Expand All @@ -79,12 +79,6 @@ export class DashboardLayoutComponent implements OnInit, OnDestroy {
}

ngOnDestroy() {
this._mediaSubscription.unsubscribe();
this.store.dispatch(new DisconnectWebSocket());
}

getRouteDepth(outlet) {
return outlet.activatedRouteData['depth'] || 1;
// return outlet.isActivated ? outlet.activatedRoute : ''
}
}
10 changes: 5 additions & 5 deletions libs/dashboard/src/lib/dashboard.module.ts
Expand Up @@ -48,11 +48,6 @@ import { ProfileComponent } from './containers/profile/profile.component';
component: SettingsComponent,
data: { title: 'Settings', depth: '2' },
},
{
path: 'widgets',
loadChildren: '@ngx-starter-kit/widgets#WidgetsModule',
data: { title: 'Widgets', depth: '2', preload: false },
},
{
path: 'grid',
loadChildren: '@ngx-starter-kit/grid#GridModule',
Expand All @@ -63,6 +58,11 @@ import { ProfileComponent } from './containers/profile/profile.component';
loadChildren: '@ngx-starter-kit/experiments#ExperimentsModule',
data: { title: 'Experiments', depth: 2, preload: false },
},
{
path: 'widgets',
loadChildren: '@ngx-starter-kit/widgets#WidgetsModule',
data: { title: 'Widgets', depth: '2', preload: false },
},
],
},
]),
Expand Down
5 changes: 2 additions & 3 deletions libs/dashboard/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/draggable/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/experiments/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/grid/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/home/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/image-comparison/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/json-diff/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}
5 changes: 2 additions & 3 deletions libs/led/tsconfig.lib.json
Expand Up @@ -12,16 +12,15 @@
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": ["dom", "es2015"]
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"flatModuleId": "AUTOGENERATED",
"flatModuleOutFile": "AUTOGENERATED"
"enableResourceInlining": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}

0 comments on commit e525738

Please sign in to comment.