Skip to content

Commit b704759

Browse files
authored
Merge pull request #163 from coreui/dev-v2.5.3
v2.5.3
2 parents 428cdb9 + 64ca538 commit b704759

File tree

12 files changed

+203
-123
lines changed

12 files changed

+203
-123
lines changed

CHANGELOG.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
## [CoreUI for Angular](./README.md) version `changelog`
22

3+
###### `v2.5.3`
4+
- fix(polyfills): add optional settings for IE10 issues
5+
- refactor(_nav.ts): INavData moved from _nav.ts to import from @coreui/angular
6+
- refactor(default-layout): drop MutationObserver, add minimizedChange event
7+
- fix(dashboard): `scales.[x/y]Axes.barPercentage` is deprecated. Please use `dataset.barPercentage` instead
8+
- fix(widgets): `scales.[x/y]Axes.barPercentage` is deprecated. Please use `dataset.barPercentage` instead
9+
- test: add e2e test bed with some tests
10+
11+
###### dependencies update
12+
- update `@angular/animations` to `^8.2.10`
13+
- update `@angular/common` to `^8.2.12`
14+
- update `@angular/compiler` to `^8.2.12`
15+
- update `@angular/core` to `^8.2.12`
16+
- update `@angular/forms` to `^8.2.12`
17+
- update `@angular/platform-browser` to `^8.2.12`
18+
- update `@angular/platform-browser-dynamic` to `^8.2.12`
19+
- update `@angular/router` to `^8.2.12`
20+
- update `@coreui/angular` to `^2.6.3`
21+
- update `@coreui/coreui` to `^2.1.16`
22+
- update `chart.js` to `^2.9.1`
23+
- update `core-js` to `^2.6.10`
24+
- update `flag-icon-css` to `^3.4.5`
25+
- update `ngx-bootstrap` to `^5.2.0`
26+
- update `rxjs` to `^6.5.3`
27+
- update `web-animations-js` to `^2.3.2`
28+
- update `zone.js` to `^0.10.2`
29+
- update `@angular-devkit/build-angular` to `^0.803.15`
30+
- update `@angular/cli` to `^8.3.15`
31+
- update `@angular/compiler-cli` to `^8.2.12`
32+
- update `@angular/language-service` to `^8.2.12`
33+
- update `@types/jasmine` to `^3.4.4`
34+
- update `@types/jasminewd2` to `^2.0.8`
35+
- update `@types/node` to `^12.7.12`
36+
- update `codelyzer` to `^5.2.0`
37+
- update `jasmine-core` to `^3.5.0`
38+
- update `karma` to `^4.4.1`
39+
- update `karma-chrome-launcher` to `^3.1.0`
40+
- update `karma-coverage-istanbul-reporter` to `^2.1.0`
41+
- update `ts-node` to `^8.4.1`
42+
- update `tslint` to `^5.20.0`
43+
344
###### `v2.5.2`
445
- fix(cards): card with header actions
546
- fix(carousels): images and intervals cleanup
@@ -35,7 +76,7 @@
3576
###### `v2.5.0`
3677
- refactor(app.routing): lazy loading via dynamic import()
3778
- refactor(modals): `ViewChild` second parameter
38-
- refactor(tsconfig): "module: "esnext", "target": "es6"
79+
- refactor(tsconfig): "module: "esnext` "target` to `es6"
3980
- chore: update `[email protected]` imports
4081
- chore: update `[email protected]`
4182
- fix(collapse): `No provider for AnimationBuilder` add import `BrowserAnimationsModule` to app.module

README.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[![@coreui angular](https://img.shields.io/badge/@coreui%20-angular-lightgrey.svg?style=flat-square)](https://github.com/coreui/angular)
2-
[![npm package][npm-coreui-angular-badge]][npm-coreui-angular]
2+
[![npm package][npm-coreui-angular-badge]][npm-coreui-angular]
33
[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
44
[![@coreui coreui](https://img.shields.io/badge/@coreui%20-coreui-lightgrey.svg?style=flat-square)](https://github.com/coreui/coreui)
55
[![npm package][npm-coreui-badge]][npm-coreui]
6-
[![NPM downloads][npm-coreui-download]][npm-coreui]
7-
![angular](https://img.shields.io/badge/angular-^8.0.0-lightgrey.svg?style=flat-square)
6+
[![NPM downloads][npm-coreui-download]][npm-coreui]
7+
![angular](https://img.shields.io/badge/angular-^8.2.12-lightgrey.svg?style=flat-square)
88

99
[npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular
1010
[npm-coreui-angular-badge]: https://img.shields.io/npm/v/@coreui/angular.png?style=flat-square
@@ -33,20 +33,27 @@ CoreUI is meant to be the UX game changer. Pure & transparent code is devoid of
3333

3434
## Table of Contents
3535

36-
* [Versions](#versions)
37-
* [CoreUI Pro](#coreui-pro)
38-
* [Admin Templates built on top of CoreUI Pro](#admin-templates-built-on-top-of-coreui-pro)
39-
* [Installation](#installation)
40-
* [Usage](#usage)
41-
* [What's included](#whats-included)
42-
* [Documentation](#documentation)
43-
* [Contributing](#contributing)
44-
* [Versioning](#versioning)
45-
* [Creators](#creators)
46-
* [Community](#community)
47-
* [Community Projects](#community-projects)
48-
* [License](#license)
49-
* [Support CoreUI Development](#support-coreui-development)
36+
- [CoreUI Free Angular 2+ Admin Template ![Tweet](https://twitter.com/intent/tweet?text=CoreUI%20-%20Free%20Bootstrap%204%20Admin%20Template%20&url=https://coreui.io&hashtags=bootstrap,admin,template,dashboard,panel,free,angular,react,vue)](#coreui-free-angular-2-admin-template-tweethttpstwittercomintenttweettextcoreui20-20free20bootstrap20420admin20template20urlhttpscoreuiiohashtagsbootstrapadmintemplatedashboardpanelfreeangularreactvue)
37+
- [Table of Contents](#table-of-contents)
38+
- [Versions](#versions)
39+
- [CoreUI Pro](#coreui-pro)
40+
- [Admin Templates built on top of CoreUI Pro](#admin-templates-built-on-top-of-coreui-pro)
41+
- [Prerequisites](#prerequisites)
42+
- [Node.js](#nodejs)
43+
- [Angular CLI](#angular-cli)
44+
- [Update to Angular 8](#update-to-angular-8)
45+
- [Installation](#installation)
46+
- [Clone repo](#clone-repo)
47+
- [Usage](#usage)
48+
- [What's included](#whats-included)
49+
- [Documentation](#documentation)
50+
- [Contributing](#contributing)
51+
- [Versioning](#versioning)
52+
- [Creators](#creators)
53+
- [Community](#community)
54+
- [Community Projects](#community-projects)
55+
- [Copyright and license](#copyright-and-license)
56+
- [Support CoreUI Development](#support-coreui-development)
5057

5158
## Versions
5259

e2e/app.e2e-spec.ts

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,59 @@
1-
import { CoreUIPage } from './app.po';
1+
import { AppDashboard } from './app.po';
22

3-
describe('core-ui App', function() {
4-
let page: CoreUIPage;
3+
describe('CoreUI template', () => {
4+
let page: AppDashboard;
5+
const sleep = 300;
56

6-
beforeEach(() => {
7-
page = new CoreUIPage();
7+
page = new AppDashboard();
8+
const browser = page.getBrowser();
9+
browser.driver.manage().window().setSize(600, 800);
10+
browser.sleep(sleep);
11+
page.navigateTo();
12+
13+
// beforeEach(() => {
14+
// page = new AppDashboard();
15+
// page.navigateTo();
16+
// });
17+
18+
it('should display CoreUI Dashboard', async () => {
19+
expect(await page.getParagraphText()).toEqual('Traffic');
20+
});
21+
22+
it('should display footer containing creativeLabs', async () => {
23+
expect(await page.getFooterText()).toContain('creativeLabs');
24+
});
25+
26+
it('should toggle `sidebar-minimized` body.class on `sidebar-minimizer` click', () => {
27+
browser.manage().window().maximize();
28+
browser.sleep(1000);
29+
const body = page.getBody();
30+
expect(body.getAttribute('class')).not.toContain('sidebar-minimized');
31+
const button = page.getByCss('.sidebar-minimizer');
32+
button.click();
33+
browser.sleep(sleep);
34+
expect(body.getAttribute('class')).toContain('sidebar-minimized');
35+
browser.sleep(sleep);
36+
button.click();
37+
browser.sleep(sleep);
38+
expect(body.getAttribute('class')).not.toContain('sidebar-minimized');
39+
browser.driver.manage().window().setSize(600, 800);
40+
browser.sleep(1000);
841
});
942

10-
it('should display footer containing creativeLabs', () => {
11-
page.navigateTo();
12-
expect(page.getParagraphText()).toContain('creativeLabs');
43+
it('should toggle `sidebar-show` body.class on `navbar-toggler` click', () => {
44+
browser.driver.manage().window().setSize(600, 800);
45+
browser.sleep(1000);
46+
const body = page.getBody();
47+
expect(body.getAttribute('class')).not.toContain('sidebar-show');
48+
const button1 = page.getByCss('.navbar-toggler.d-lg-none').first();
49+
browser.sleep(sleep);
50+
button1.click();
51+
browser.sleep(sleep);
52+
expect(body.getAttribute('class')).toContain('sidebar-show');
53+
const button2 = page.getByCss('.navbar-toggler').first();
54+
browser.sleep(sleep);
55+
button2.click();
56+
browser.sleep(sleep);
57+
expect(body.getAttribute('class')).not.toContain('sidebar-show');
1358
});
1459
});

e2e/app.po.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
import { browser, element, by } from 'protractor';
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppDashboard {
4+
5+
getBrowser() {
6+
return browser;
7+
}
28

3-
export class CoreUIPage {
49
navigateTo() {
510
return browser.get('/');
611
}
712

813
getParagraphText() {
14+
return element(by.xpath('/html/body/app-dashboard/div/main/div/ng-component/div/div[2]/div[1]/div[1]/div[1]/h4')).getText();
15+
}
16+
getBody() {
17+
return element(by.xpath('/html/body'));
18+
}
19+
getByCss(selector) {
20+
return element.all(by.css(selector));
21+
}
22+
getFooterText() {
923
return element(by.className('app-footer')).getText();
1024
}
1125
}

package.json

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/coreui-free-angular-admin-template",
3-
"version": "2.5.2",
3+
"version": "2.5.3",
44
"description": "CoreUI Free Angular 2+ Admin Template",
55
"author": {
66
"name": "Łukasz Holeczek",
@@ -27,56 +27,55 @@
2727
},
2828
"private": true,
2929
"dependencies": {
30-
"@angular/animations": "^8.0.2",
31-
"@angular/common": "^8.0.2",
32-
"@angular/compiler": "^8.0.2",
33-
"@angular/core": "^8.0.2",
34-
"@angular/forms": "^8.0.2",
35-
"@angular/http": "^8.0.0-beta.10",
36-
"@angular/platform-browser": "^8.0.2",
37-
"@angular/platform-browser-dynamic": "^8.0.2",
38-
"@angular/router": "^8.0.2",
39-
"@coreui/angular": "^2.5.2",
40-
"@coreui/coreui": "^2.1.12",
30+
"@angular/animations": "^8.2.10",
31+
"@angular/common": "^8.2.12",
32+
"@angular/compiler": "^8.2.12",
33+
"@angular/core": "^8.2.12",
34+
"@angular/forms": "^8.2.12",
35+
"@angular/platform-browser": "^8.2.12",
36+
"@angular/platform-browser-dynamic": "^8.2.12",
37+
"@angular/router": "^8.2.12",
38+
"@coreui/angular": "^2.6.3",
39+
"@coreui/coreui": "^2.1.16",
4140
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1",
4241
"@coreui/icons": "0.3.0",
4342
"bootstrap": "^4.3.1",
44-
"chart.js": "^2.8.0",
45-
"core-js": "^2.6.9",
46-
"flag-icon-css": "^3.3.0",
43+
"chart.js": "^2.9.1",
44+
"core-js": "^2.6.10",
45+
"flag-icon-css": "^3.4.5",
4746
"font-awesome": "^4.7.0",
4847
"moment": "^2.24.0",
4948
"mutationobserver-shim": "^0.3.3",
5049
"ng2-charts": "^2.3.0",
51-
"ngx-bootstrap": "^5.0.0",
50+
"ngx-bootstrap": "^5.2.0",
5251
"ngx-perfect-scrollbar": "^8.0.0",
53-
"rxjs": "^6.5.2",
52+
"rxjs": "^6.5.3",
5453
"simple-line-icons": "^2.4.1",
5554
"ts-helpers": "^1.1.2",
56-
"tsickle": "^0.35.0",
55+
"tsickle": "^0.37.0",
5756
"tslib": "^1.10.0",
58-
"web-animations-js": "^2.3.1",
59-
"zone.js": "^0.9.1"
57+
"web-animations-js": "^2.3.2",
58+
"zone.js": "^0.10.2"
6059
},
6160
"devDependencies": {
62-
"@angular-devkit/build-angular": "^0.800.3",
63-
"@angular/cli": "^8.0.3",
64-
"@angular/compiler-cli": "^8.0.2",
65-
"@angular/language-service": "^8.0.2",
66-
"@types/jasmine": "^3.3.13",
67-
"@types/jasminewd2": "^2.0.6",
68-
"@types/node": "^12.0.8",
69-
"codelyzer": "^5.1.0",
70-
"jasmine-core": "^3.4.0",
61+
"@angular-devkit/build-angular": "^0.803.15",
62+
"@angular/cli": "^8.3.15",
63+
"@angular/compiler-cli": "^8.2.12",
64+
"@angular/language-service": "^8.2.12",
65+
"@types/jasmine": "^3.4.4",
66+
"@types/jasminewd2": "^2.0.8",
67+
"@types/node": "^12.7.12",
68+
"codelyzer": "^5.2.0",
69+
"jasmine-core": "^3.5.0",
7170
"jasmine-spec-reporter": "^4.2.1",
72-
"karma": "^4.1.0",
73-
"karma-chrome-launcher": "^2.2.0",
74-
"karma-coverage-istanbul-reporter": "^2.0.5",
71+
"karma": "^4.4.1",
72+
"karma-chrome-launcher": "^3.1.0",
73+
"karma-coverage-istanbul-reporter": "^2.1.0",
7574
"karma-jasmine": "^2.0.1",
7675
"karma-jasmine-html-reporter": "^1.4.2",
7776
"protractor": "^5.4.2",
78-
"ts-node": "^8.3.0",
79-
"tslint": "^5.17.0",
77+
"ts-node": "^8.4.1",
78+
"tslint": "^5.20.0",
8079
"typescript": "~3.4.5"
8180
},
8281
"engines": {

src/app/_nav.ts

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,6 @@
1-
interface NavAttributes {
2-
[propName: string]: any;
3-
}
4-
interface NavWrapper {
5-
attributes: NavAttributes;
6-
element: string;
7-
}
8-
interface NavBadge {
9-
text: string;
10-
variant: string;
11-
}
12-
interface NavLabel {
13-
class?: string;
14-
variant: string;
15-
}
1+
import { INavData } from '@coreui/angular';
162

17-
export interface NavData {
18-
name?: string;
19-
url?: string;
20-
icon?: string;
21-
badge?: NavBadge;
22-
title?: boolean;
23-
children?: NavData[];
24-
variant?: string;
25-
attributes?: NavAttributes;
26-
divider?: boolean;
27-
class?: string;
28-
label?: NavLabel;
29-
wrapper?: NavWrapper;
30-
}
31-
32-
export const navItems: NavData[] = [
3+
export const navItems: INavData[] = [
334
{
345
name: 'Dashboard',
356
url: '/dashboard',

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
</ul>
5050
</app-header>
5151
<div class="app-body">
52-
<app-sidebar [fixed]="true" [display]="'lg'">
53-
<app-sidebar-nav [navItems]="navItems" [perfectScrollbar] [disabled]="sidebarMinimized"></app-sidebar-nav>
52+
<app-sidebar #appSidebar [fixed]="true" [display]="'lg'" [minimized]="sidebarMinimized" (minimizedChange)="toggleMinimize($event)">
53+
<app-sidebar-nav [navItems]="navItems" [perfectScrollbar] [disabled]="appSidebar.minimized"></app-sidebar-nav>
5454
<app-sidebar-minimizer></app-sidebar-minimizer>
5555
</app-sidebar>
5656
<!-- Main content -->
@@ -83,7 +83,7 @@
8383
<router-outlet></router-outlet>
8484
</div><!-- /.container-fluid -->
8585
</main>
86-
<app-aside [fixed]="true" [display]="false">
86+
<app-aside [fixed]="true" [display]="false" [ngClass]="'test'">
8787
<tabset>
8888
<tab>
8989
<ng-template tabHeading><i class="icon-list"></i></ng-template>
Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
1-
import { Component, OnDestroy, Inject } from '@angular/core';
2-
import { DOCUMENT } from '@angular/common';
1+
import {Component } from '@angular/core';
32
import { navItems } from '../../_nav';
43

5-
64
@Component({
75
selector: 'app-dashboard',
86
templateUrl: './default-layout.component.html'
97
})
10-
export class DefaultLayoutComponent implements OnDestroy {
8+
export class DefaultLayoutComponent {
9+
public sidebarMinimized = false;
1110
public navItems = navItems;
12-
public sidebarMinimized = true;
13-
private changes: MutationObserver;
14-
public element: HTMLElement;
15-
constructor(@Inject(DOCUMENT) _document?: any) {
16-
17-
this.changes = new MutationObserver((mutations) => {
18-
this.sidebarMinimized = _document.body.classList.contains('sidebar-minimized');
19-
});
20-
this.element = _document.body;
21-
this.changes.observe(<Element>this.element, {
22-
attributes: true,
23-
attributeFilter: ['class']
24-
});
25-
}
2611

27-
ngOnDestroy(): void {
28-
this.changes.disconnect();
12+
toggleMinimize(e) {
13+
this.sidebarMinimized = e;
2914
}
3015
}

0 commit comments

Comments
 (0)