Skip to content

Commit 32168e4

Browse files
committed
feat(icons): update to @coreui/icons v2 and @coreui/icons-angular
1 parent 70ae070 commit 32168e4

12 files changed

+229
-423
lines changed

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
## [CoreUI for Angular](./README.md) version `changelog`
22

3+
###### `v2.9.6`
4+
- feat(icons): update to @coreui/icons v2 and @coreui/icons-angular
5+
6+
###### dependencies update
7+
- update `@angular/animations` to `^9.1.13`
8+
- update `@angular/cdk` to `^9.2.4`
9+
- update `@angular/common` to `^9.1.13`
10+
- update `@angular/compiler` to `^9.1.13`
11+
- update `@angular/core` to `^9.1.13`
12+
- update `@angular/forms` to `^9.1.13`
13+
- update `@angular/platform-browser` to `^9.1.13`
14+
- update `@angular/platform-browser-dynamic` to `^9.1.13`
15+
- update `@angular/router` to `^9.1.13`
16+
- update `@coreui/angular`: `~2.9.6`
17+
- update `@coreui/icons` to `^2.0.0-rc.0`
18+
- update `@coreui/icons-angular` to `1.0.0-alpha.3`
19+
- update `bootstrap` to `^4.5.3`
20+
- update `chart.js` to `^2.9.4`
21+
- update `core-js` to `^3.8.2`
22+
- update `ng2-charts` to `~2.3.3`
23+
- update `ngx-bootstrap` to `^5.6.2`
24+
- update `rxjs` to `^6.6.3`
25+
- update `simple-line-icons` to `^2.5.5`
26+
- update `tslib` to `^1.14.1`
27+
- update `@angular-devkit/build-angular` to `^0.901.13`
28+
- update `@angular/cli` to `^9.1.13`
29+
- update `@angular/compiler-cli` to `^9.1.13`
30+
- update `@angular/language-service` to `^9.1.13`
31+
- update `@types/jasmine` to `^3.6.2`
32+
- update `@types/node` to `^14.14.20`
33+
- update `karma` to `^5.2.3`
34+
335
###### `v2.9.5`
436
- fix(simple-line-icons): Can't resolve simple-line-icons.css - fixes #196
537

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ Some of projects created by community but not maintained by CoreUI team.
187187

188188
## Copyright and license
189189

190-
copyright 2017-2020 creativeLabs Łukasz Holeczek. Code released under [the MIT license](https://github.com/coreui/coreui-free-angular-admin-template/blob/master/LICENSE).
190+
copyright 2017-2021 creativeLabs Łukasz Holeczek. Code released under [the MIT license](https://github.com/coreui/coreui-free-angular-admin-template/blob/master/LICENSE).
191191
There is only one limitation you can't re-distribute the CoreUI as stock. You can’t do this if you modify the CoreUI. In past we faced some problems with persons who tried to sell CoreUI based templates.
192192

193193
## Support CoreUI Development
194194

195195
CoreUI is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing. You can support development by donating on [PayPal](https://www.paypal.me/holeczek), buying [CoreUI Pro Version](https://coreui.io/pro) or buying one of our [premium admin templates](https://genesisui.com/?support=1).
196196

197-
As of now I am exploring the possibility of working on CoreUI fulltime - if you are a business that is building core products using CoreUI, I am also open to conversations regarding custom sponsorship / consulting arrangements. Get in touch on [Twitter](https://twitter.com/lukaszholeczek).
197+
As of now I am exploring the possibility of working on CoreUI full-time - if you are a business that is building core products using CoreUI, I am also open to conversations regarding custom sponsorship / consulting arrangements. Get in touch on [Twitter](https://twitter.com/lukaszholeczek).

angular.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"src/assets"
2121
],
2222
"styles": [
23-
"node_modules/@coreui/icons/css/coreui-icons.css",
23+
"node_modules/@coreui/icons/css/free.css",
2424
"node_modules/flag-icon-css/css/flag-icon.css",
2525
"node_modules/font-awesome/css/font-awesome.css",
2626
"node_modules/simple-line-icons/dist/styles/simple-line-icons.css",

e2e/app.e2e-spec.ts

+15-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ describe('CoreUI template', () => {
3636
button.click();
3737
browser.sleep(sleep);
3838
expect(body.getAttribute('class')).not.toContain('sidebar-minimized');
39-
browser.driver.manage().window().setSize(600, 800);
40-
browser.sleep(1000);
4139
});
4240

4341
it('should toggle `sidebar-show` body.class on `navbar-toggler` click', () => {
@@ -56,4 +54,19 @@ describe('CoreUI template', () => {
5654
browser.sleep(sleep);
5755
expect(body.getAttribute('class')).not.toContain('sidebar-show');
5856
});
57+
58+
it('should toggle `aside-menu-lg-show` body.class on `navbar-toggler` click', () => {
59+
browser.manage().window().maximize();
60+
browser.sleep(1000);
61+
const body = page.getBody();
62+
expect(body.getAttribute('class')).not.toContain('aside-menu-lg-show');
63+
const button1 = page.getByCss('.navbar-toggler.d-none.d-lg-block').last();
64+
button1.click();
65+
browser.sleep(sleep);
66+
expect(body.getAttribute('class')).toContain('aside-menu-lg-show');
67+
browser.sleep(sleep);
68+
button1.click();
69+
browser.sleep(sleep);
70+
expect(body.getAttribute('class')).not.toContain('aside-menu-lg-show');
71+
});
5972
});

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"homepage": "https://coreui.io/angular",
18-
"copyright": "Copyright 2020 creativeLabs Łukasz Holeczek",
18+
"copyright": "Copyright 2021 creativeLabs Łukasz Holeczek",
1919
"license": "MIT",
2020
"scripts": {
2121
"ng": "ng",
@@ -37,16 +37,16 @@
3737
"@angular/platform-browser": "^9.1.13",
3838
"@angular/platform-browser-dynamic": "^9.1.13",
3939
"@angular/router": "^9.1.13",
40-
"@coreui/angular": "~2.9.5",
40+
"@coreui/angular": "~2.9.6",
4141
"@coreui/coreui": "^2.1.16",
4242
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1",
43-
"@coreui/icons": "0.3.0",
43+
"@coreui/icons": "^2.0.0-rc.0",
44+
"@coreui/icons-angular": "1.0.0-alpha.3",
4445
"bootstrap": "^4.5.3",
4546
"chart.js": "^2.9.4",
4647
"core-js": "^3.8.2",
4748
"flag-icon-css": "^3.5.0",
4849
"font-awesome": "^4.7.0",
49-
"moment": "^2.29.1",
5050
"mutationobserver-shim": "^0.3.7",
5151
"ng2-charts": "~2.3.3",
5252
"ngx-bootstrap": "^5.6.2",

src/app/app.component.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import { Component, OnInit } from '@angular/core';
22
import { Router, NavigationEnd } from '@angular/router';
33

4+
import { IconSetService } from '@coreui/icons-angular';
5+
import { freeSet } from '@coreui/icons';
6+
47
@Component({
58
// tslint:disable-next-line
69
selector: 'body',
7-
template: '<router-outlet></router-outlet>'
10+
template: '<router-outlet></router-outlet>',
11+
providers: [IconSetService],
812
})
913
export class AppComponent implements OnInit {
10-
constructor(private router: Router) { }
14+
constructor(
15+
private router: Router,
16+
public iconSet: IconSetService
17+
) {
18+
// iconSet singleton
19+
iconSet.icons = { ...freeSet };
20+
}
1121

1222
ngOnInit() {
1323
this.router.events.subscribe((evt) => {

src/app/app.module.ts

+12-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
77
import { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
88
import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';
99

10+
import { IconModule, IconSetModule, IconSetService } from '@coreui/icons-angular';
11+
1012
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
1113
suppressScrollX: true
1214
};
@@ -54,7 +56,9 @@ import { ChartsModule } from 'ng2-charts';
5456
PerfectScrollbarModule,
5557
BsDropdownModule.forRoot(),
5658
TabsModule.forRoot(),
57-
ChartsModule
59+
ChartsModule,
60+
IconModule,
61+
IconSetModule.forRoot(),
5862
],
5963
declarations: [
6064
AppComponent,
@@ -64,10 +68,13 @@ import { ChartsModule } from 'ng2-charts';
6468
LoginComponent,
6569
RegisterComponent
6670
],
67-
providers: [{
68-
provide: LocationStrategy,
69-
useClass: HashLocationStrategy
70-
}],
71+
providers: [
72+
{
73+
provide: LocationStrategy,
74+
useClass: HashLocationStrategy
75+
},
76+
IconSetService,
77+
],
7178
bootstrap: [ AppComponent ]
7279
})
7380
export class AppModule { }

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,6 @@ <h6>System Utilization</h6>
336336
</app-aside>
337337
</div>
338338
<app-footer>
339-
<span><a href="https://coreui.io">CoreUI</a> &copy; 2018 creativeLabs.</span>
339+
<span><a href="https://coreui.io">CoreUI</a> &copy; 2021 creativeLabs.</span>
340340
<span class="ml-auto">Powered by <a href="https://coreui.io/angular">CoreUI for Angular</a></span>
341341
</app-footer>

0 commit comments

Comments
 (0)