Skip to content

Commit 11194e5

Browse files
authored
Merge pull request #134 from coreui/dev-vnext
v2.2.4
2 parents 5b6370f + 0ccb894 commit 11194e5

File tree

8 files changed

+76
-46
lines changed

8 files changed

+76
-46
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
## [angular](./README.md) version `changelog`
22

3+
###### `v2.2.4`
4+
- refactor(colors): use 'DOCUMENT' of '@angular/common'
5+
- refactor(default-layout): use 'DOCUMENT' of '@angular/common' #133 - thanks @damingerdai
6+
- refactor(main): add compiler option `preserveWhitespaces` #128 - thanks @ctaleck
7+
- refactor(routing): added URL 404 default #125 - thanks @slam24
8+
- refactor(dropdowns): remove temp css fix
9+
- refactor(_nav.ts): NavData interface add semicolons
10+
- update: `@angular/animations` to `^7.2.1`
11+
- update: `@angular/common` to `^7.2.1`
12+
- update: `@angular/compiler` to `^7.2.1`
13+
- update: `@angular/core` to `^7.2.1`
14+
- update: `@angular/forms` to `^7.2.1`
15+
- update: `@angular/http` to `^7.2.1`
16+
- update: `@angular/platform-browser` to `^7.2.1`
17+
- update: `@angular/platform-browser-dynamic` to `^7.2.1`
18+
- update: `@angular/router` to `^7.2.1`
19+
- update: `@coreui/angular` to `^2.2.4`
20+
- update: `mutationobserver-shim` to `^0.3.3`
21+
- update: `zone.js` to `^0.8.28`
22+
- update: `@angular-devkit/build-angular` to `^0.12.2`
23+
- update: `@angular/cli` to `^7.2.2`
24+
- update: `@angular/compiler-cli` to `^7.2.1`
25+
- update: `@angular/language-service` to `^7.2.1`
26+
- update: `@types/jasmine` to `^3.3.7`
27+
- update: `typescript` to `~3.2.4`
28+
329
###### `v2.2.3`
430
- refactor(_nav.ts): add NavData interface
531
- update: `bootstrap` to `^4.2.1`

package.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/coreui-free-angular-admin-template",
3-
"version": "2.2.3",
3+
"version": "2.2.4",
44
"description": "CoreUI Free Angular 2+ Admin Template",
55
"author": {
66
"name": "Łukasz Holeczek",
@@ -27,16 +27,16 @@
2727
},
2828
"private": true,
2929
"dependencies": {
30-
"@angular/animations": "^7.2.0",
31-
"@angular/common": "^7.2.0",
32-
"@angular/compiler": "^7.2.0",
33-
"@angular/core": "^7.2.0",
34-
"@angular/forms": "^7.2.0",
35-
"@angular/http": "^7.2.0",
36-
"@angular/platform-browser": "^7.2.0",
37-
"@angular/platform-browser-dynamic": "^7.2.0",
38-
"@angular/router": "^7.2.0",
39-
"@coreui/angular": "^2.2.3",
30+
"@angular/animations": "^7.2.1",
31+
"@angular/common": "^7.2.1",
32+
"@angular/compiler": "^7.2.1",
33+
"@angular/core": "^7.2.1",
34+
"@angular/forms": "^7.2.1",
35+
"@angular/http": "^7.2.1",
36+
"@angular/platform-browser": "^7.2.1",
37+
"@angular/platform-browser-dynamic": "^7.2.1",
38+
"@angular/router": "^7.2.1",
39+
"@coreui/angular": "^2.2.4",
4040
"@coreui/coreui": "^2.1.6",
4141
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
4242
"@coreui/icons": "0.3.0",
@@ -46,7 +46,7 @@
4646
"flag-icon-css": "^3.2.1",
4747
"font-awesome": "^4.7.0",
4848
"moment": "^2.23.0",
49-
"mutationobserver-shim": "^0.3.2",
49+
"mutationobserver-shim": "^0.3.3",
5050
"ng2-charts": "^1.6.0",
5151
"ngx-bootstrap": "^3.1.4",
5252
"ngx-perfect-scrollbar": "^7.2.0",
@@ -55,14 +55,14 @@
5555
"ts-helpers": "^1.1.2",
5656
"tsickle": "^0.34.0",
5757
"tslib": "^1.9.0",
58-
"zone.js": "^0.8.27"
58+
"zone.js": "^0.8.28"
5959
},
6060
"devDependencies": {
61-
"@angular-devkit/build-angular": "^0.12.1",
62-
"@angular/cli": "^7.2.1",
63-
"@angular/compiler-cli": "^7.2.0",
64-
"@angular/language-service": "^7.2.0",
65-
"@types/jasmine": "^3.3.5",
61+
"@angular-devkit/build-angular": "^0.12.2",
62+
"@angular/cli": "^7.2.2",
63+
"@angular/compiler-cli": "^7.2.1",
64+
"@angular/language-service": "^7.2.1",
65+
"@types/jasmine": "^3.3.7",
6666
"@types/jasminewd2": "^2.0.6",
6767
"@types/node": "^10.12.18",
6868
"codelyzer": "^4.5.0",
@@ -76,7 +76,7 @@
7676
"protractor": "^5.4.2",
7777
"ts-node": "^7.0.1",
7878
"tslint": "^5.12.1",
79-
"typescript": "3.1.x"
79+
"typescript": "~3.2.4"
8080
},
8181
"engines": {
8282
"node": ">= 8.9.4",

src/app/_nav.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export interface NavData {
2-
name?: string,
3-
url?: string,
4-
icon?: string,
5-
badge?: any,
6-
title?: boolean,
7-
children?: any,
8-
variant?: string,
9-
attributes?: object,
10-
divider?: boolean,
11-
class?: string,
2+
name?: string;
3+
url?: string;
4+
icon?: string;
5+
badge?: any;
6+
title?: boolean;
7+
children?: any;
8+
variant?: string;
9+
attributes?: object;
10+
divider?: boolean;
11+
class?: string;
1212
}
1313

1414
export const navItems: NavData[] = [

src/app/app.routing.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export const routes: Routes = [
8383
loadChildren: './views/widgets/widgets.module#WidgetsModule'
8484
}
8585
]
86-
}
86+
},
87+
{ path: '**', component: P404Component }
8788
];
8889

8990
@NgModule({

src/app/containers/default-layout/default-layout.component.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import {Component, OnDestroy} from '@angular/core';
1+
import { Component, OnDestroy, Inject } from '@angular/core';
2+
import { DOCUMENT } from '@angular/common';
23
import { navItems } from './../../_nav';
34

5+
46
@Component({
57
selector: 'app-dashboard',
68
templateUrl: './default-layout.component.html'
@@ -9,16 +11,16 @@ export class DefaultLayoutComponent implements OnDestroy {
911
public navItems = navItems;
1012
public sidebarMinimized = true;
1113
private changes: MutationObserver;
12-
public element: HTMLElement = document.body;
13-
constructor() {
14+
public element: HTMLElement;
15+
constructor(@Inject(DOCUMENT) _document?: any) {
1416

1517
this.changes = new MutationObserver((mutations) => {
16-
this.sidebarMinimized = document.body.classList.contains('sidebar-minimized');
18+
this.sidebarMinimized = _document.body.classList.contains('sidebar-minimized');
1719
});
18-
20+
this.element = _document.body;
1921
this.changes.observe(<Element>this.element, {
2022
attributes: true,
21-
attributeFilter: [ 'class' ]
23+
attributeFilter: ['class']
2224
});
2325
}
2426

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.dropup .dropdown-menu {
2-
transform: none!important;
2+
/*transform: none!important;*/
33
}

src/app/views/theme/colors.component.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component, Inject, OnInit } from '@angular/core';
2+
import { DOCUMENT } from '@angular/common';
23
import { getStyle, rgbToHex } from '@coreui/coreui/dist/js/coreui-utilities';
34

45
@Component({
56
templateUrl: 'colors.component.html'
67
})
78
export class ColorsComponent implements OnInit {
8-
public themeColors(): void {
9-
Array.from(document.querySelectorAll('.theme-color')).forEach(function(el) {
10-
const elem = document.getElementsByClassName(el.classList[0])[0];
11-
const background = getStyle('background-color', elem);
9+
constructor(@Inject(DOCUMENT) private _document: any) {}
1210

13-
const table = document.createElement('table');
11+
public themeColors(): void {
12+
Array.from(this._document.querySelectorAll('.theme-color')).forEach((el: HTMLElement) => {
13+
const background = getStyle('background-color', el);
14+
const table = this._document.createElement('table');
1415
table.innerHTML = `
1516
<table class="w-100">
1617
<tr>
@@ -23,10 +24,8 @@ export class ColorsComponent implements OnInit {
2324
</tr>
2425
</table>
2526
`;
26-
2727
el.parentNode.appendChild(table);
2828
});
29-
3029
}
3130

3231
ngOnInit(): void {

src/main.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ if (environment.production) {
88
enableProdMode();
99
}
1010

11-
platformBrowserDynamic().bootstrapModule(AppModule)
11+
platformBrowserDynamic().bootstrapModule(AppModule, {
12+
preserveWhitespaces: true
13+
})
1214
.catch(err => console.log(err));

0 commit comments

Comments
 (0)