From fa4d037e68fb20de4be0a1426fe57f9a7babf382 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 10 Apr 2020 20:35:02 +0200 Subject: [PATCH 01/35] fix(navbars): Cannot find module 'ngx-bootstrap' --- src/app/views/base/navbars/navbars.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/views/base/navbars/navbars.component.ts b/src/app/views/base/navbars/navbars.component.ts index 7b92610e4..e3ce1d221 100644 --- a/src/app/views/base/navbars/navbars.component.ts +++ b/src/app/views/base/navbars/navbars.component.ts @@ -1,5 +1,5 @@ import {AfterViewChecked, Component, ElementRef, OnInit, Renderer2, ViewChild} from '@angular/core'; -import {CollapseDirective} from 'ngx-bootstrap'; +import {CollapseDirective} from 'ngx-bootstrap/collapse'; @Component({ selector: 'app-navbars', From 6196005b6d9654e821ef52bab8ccf8b33fedb3cb Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 10 Apr 2020 20:43:00 +0200 Subject: [PATCH 02/35] chore: dependencies update - update `@angular/animations` to `^9.1.1` - update `@angular/common` to `^9.1.1` - update `@angular/compiler` to `^9.1.1` - update `@angular/core` to `^9.1.1` - update `@angular/forms` to `^9.1.1` - update `@angular/platform-browser` to `^9.1.1` - update `@angular/platform-browser-dynamic` to `^9.1.1` - update `@angular/router` to `^9.1.1` - update `@coreui/angular` to `^2.9.2` - update `bootstrap` to `^4.4.1` - update `chart.js` to `^2.9.3` - update `mutationobserver-shim` to `^0.3.5` - update `ngx-bootstrap` to `^5.6.1` - update `ngx-perfect-scrollbar` to `^9.0.0` - update `rxjs` to `^6.5.5` - update `tslib` to `^1.11.1` - update `zone.js` to `~0.10.3" - update `@angular-devkit/build-angular` to `~0.901.1` - update `@angular/cli` to `^9.1.1` - update `@angular/compiler-cli` to `^9.1.1` - update `@angular/language-service` to `^9.1.1` - update `@types/jasmine` to `^3.5.10` - update `@types/node` to `^13.11.1` - update `codelyzer` to `^5.2.2` - update `jasmine-spec-reporter` to `^5.0.1` - update `karma` to `^5.0.1` - update `karma-coverage-istanbul-reporter` to `^2.1.1` - update `karma-jasmine` to `^3.1.1` - update `karma-jasmine-html-reporter` to `^1.5.3` - update `protractor` to `^5.4.3` - update `ts-node` to `^8.8.2` - update `tslint` to `^6.1.1` --- package.json | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 413b4071f..e6336780b 100644 --- a/package.json +++ b/package.json @@ -28,58 +28,58 @@ }, "private": true, "dependencies": { - "@angular/animations": "^9.0.0", - "@angular/common": "^9.0.0", - "@angular/compiler": "^9.0.0", - "@angular/core": "^9.0.0", - "@angular/forms": "^9.0.0", - "@angular/platform-browser": "^9.0.0", - "@angular/platform-browser-dynamic": "^9.0.0", - "@angular/router": "^9.0.0", - "@coreui/angular": "^2.9.0", + "@angular/animations": "^9.1.1", + "@angular/common": "^9.1.1", + "@angular/compiler": "^9.1.1", + "@angular/core": "^9.1.1", + "@angular/forms": "^9.1.1", + "@angular/platform-browser": "^9.1.1", + "@angular/platform-browser-dynamic": "^9.1.1", + "@angular/router": "^9.1.1", + "@coreui/angular": "^2.9.2", "@coreui/coreui": "^2.1.16", "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1", "@coreui/icons": "0.3.0", - "bootstrap": "^4.3.1", - "chart.js": "^2.9.2", + "bootstrap": "^4.4.1", + "chart.js": "^2.9.3", "core-js": "^2.6.11", "flag-icon-css": "^3.4.6", "font-awesome": "^4.7.0", "moment": "^2.24.0", - "mutationobserver-shim": "^0.3.3", + "mutationobserver-shim": "^0.3.5", "ng2-charts": "^2.3.0", - "ngx-bootstrap": "^5.2.0", - "ngx-perfect-scrollbar": "^8.0.0", - "rxjs": "^6.5.3", + "ngx-bootstrap": "^5.6.1", + "ngx-perfect-scrollbar": "^9.0.0", + "rxjs": "^6.5.5", "simple-line-icons": "^2.4.1", "ts-helpers": "^1.1.2", - "tslib": "^1.10.0", + "tslib": "^1.11.1", "web-animations-js": "^2.3.2", - "zone.js": "~0.10.2" + "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.900.1", - "@angular/cli": "^9.0.1", - "@angular/compiler-cli": "^9.0.0", - "@angular/language-service": "^9.0.0", - "@types/jasmine": "^3.5.3", + "@angular-devkit/build-angular": "~0.901.1", + "@angular/cli": "^9.1.1", + "@angular/compiler-cli": "^9.1.1", + "@angular/language-service": "^9.1.1", + "@types/jasmine": "^3.5.10", "@types/jasminewd2": "^2.0.8", - "@types/node": "^12.11.1", - "codelyzer": "^5.2.1", + "@types/node": "^13.11.1", + "codelyzer": "^5.2.2", "jasmine-core": "^3.5.0", - "jasmine-spec-reporter": "^4.2.1", - "karma": "^4.4.1", + "jasmine-spec-reporter": "^5.0.1", + "karma": "^5.0.1", "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^2.1.0", - "karma-jasmine": "^2.0.1", - "karma-jasmine-html-reporter": "^1.5.2", - "protractor": "^5.4.2", - "ts-node": "^8.4.1", - "tslint": "^5.20.0", + "karma-coverage-istanbul-reporter": "^2.1.1", + "karma-jasmine": "^3.1.1", + "karma-jasmine-html-reporter": "^1.5.3", + "protractor": "^5.4.3", + "ts-node": "^8.8.2", + "tslint": "^6.1.1", "typescript": "~3.7.5" }, "engines": { - "node": ">= 10", + "node": ">= 10.13", "npm": ">= 6" } } From f0b0f0eeb017b8523109d29e8588dfb4119f9013 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 10 Apr 2020 20:50:45 +0200 Subject: [PATCH 03/35] Ship v2.9.2 --- CHANGELOG.md | 37 +++++++++++++++++++ README.md | 2 +- package.json | 2 +- .../default-layout.component.ts | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0312954e6..44b21dec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ ## [CoreUI for Angular](./README.md) version `changelog` +###### `v2.9.2` +- fix(navbars): cannot find module `ngx-bootstrap` + +###### dependencies update +- update `@angular/animations` to `^9.1.1` +- update `@angular/common` to `^9.1.1` +- update `@angular/compiler` to `^9.1.1` +- update `@angular/core` to `^9.1.1` +- update `@angular/forms` to `^9.1.1` +- update `@angular/platform-browser` to `^9.1.1` +- update `@angular/platform-browser-dynamic` to `^9.1.1` +- update `@angular/router` to `^9.1.1` +- update `@coreui/angular` to `^2.9.2` +- update `bootstrap` to `^4.4.1` +- update `chart.js` to `^2.9.3` +- update `mutationobserver-shim` to `^0.3.5` +- update `ngx-bootstrap` to `^5.6.1` +- update `ngx-perfect-scrollbar` to `^9.0.0` +- update `rxjs` to `^6.5.5` +- update `tslib` to `^1.11.1` +- update `zone.js` to `~0.10.3" +- update `@angular-devkit/build-angular` to `~0.901.1` +- update `@angular/cli` to `^9.1.1` +- update `@angular/compiler-cli` to `^9.1.1` +- update `@angular/language-service` to `^9.1.1` +- update `@types/jasmine` to `^3.5.10` +- update `@types/node` to `^13.11.1` +- update `codelyzer` to `^5.2.2` +- update `jasmine-spec-reporter` to `^5.0.1` +- update `karma` to `^5.0.1` +- update `karma-coverage-istanbul-reporter` to `^2.1.1` +- update `karma-jasmine` to `^3.1.1` +- update `karma-jasmine-html-reporter` to `^1.5.3` +- update `protractor` to `^5.4.3` +- update `ts-node` to `^8.8.2` +- update `tslint` to `^6.1.1` + ###### `v2.9.0` - chore: update to `Angular 9.0.0` - [https://update.angular.io/](https://update.angular.io/#8.0:9.0) diff --git a/README.md b/README.md index fc60fa9f5..86e2cc868 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![@coreui coreui](https://img.shields.io/badge/@coreui%20-coreui-lightgrey.svg?style=flat-square)](https://github.com/coreui/coreui) [![npm package][npm-coreui-badge]][npm-coreui] [![NPM downloads][npm-coreui-download]][npm-coreui] -![angular](https://img.shields.io/badge/angular-^9.0.0-lightgrey.svg?style=flat-square&logo=angular) +![angular](https://img.shields.io/badge/angular-^9.1.1-lightgrey.svg?style=flat-square&logo=angular) [npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular [npm-coreui-angular-badge]: https://img.shields.io/npm/v/@coreui/angular.png?style=flat-square diff --git a/package.json b/package.json index e6336780b..596714c65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/coreui-free-angular-admin-template", - "version": "2.9.0", + "version": "2.9.2", "description": "CoreUI Free Angular 2+ Admin Template", "author": { "name": "Łukasz Holeczek", diff --git a/src/app/containers/default-layout/default-layout.component.ts b/src/app/containers/default-layout/default-layout.component.ts index 1fa811d86..0e20d2f99 100644 --- a/src/app/containers/default-layout/default-layout.component.ts +++ b/src/app/containers/default-layout/default-layout.component.ts @@ -1,4 +1,4 @@ -import {Component } from '@angular/core'; +import {Component} from '@angular/core'; import { navItems } from '../../_nav'; @Component({ From 10c8345551418a68bfb8cb99955396812e3b215d Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 10 Apr 2020 21:43:37 +0200 Subject: [PATCH 04/35] docs(changelog): fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44b21dec4..7f40d4184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ - update `ngx-perfect-scrollbar` to `^9.0.0` - update `rxjs` to `^6.5.5` - update `tslib` to `^1.11.1` -- update `zone.js` to `~0.10.3" +- update `zone.js` to `~0.10.3` - update `@angular-devkit/build-angular` to `~0.901.1` - update `@angular/cli` to `^9.1.1` - update `@angular/compiler-cli` to `^9.1.1` From 8e366351ac337de568dbdabb2e461b5db477da90 Mon Sep 17 00:00:00 2001 From: xidedix Date: Wed, 15 Jul 2020 18:58:15 +0200 Subject: [PATCH 05/35] chore: dependencies update --- package.json | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 596714c65..e57f8aeb4 100644 --- a/package.json +++ b/package.json @@ -28,53 +28,53 @@ }, "private": true, "dependencies": { - "@angular/animations": "^9.1.1", - "@angular/common": "^9.1.1", - "@angular/compiler": "^9.1.1", - "@angular/core": "^9.1.1", - "@angular/forms": "^9.1.1", - "@angular/platform-browser": "^9.1.1", - "@angular/platform-browser-dynamic": "^9.1.1", - "@angular/router": "^9.1.1", - "@coreui/angular": "^2.9.2", + "@angular/animations": "^9.1.12", + "@angular/common": "^9.1.12", + "@angular/compiler": "^9.1.12", + "@angular/core": "^9.1.12", + "@angular/forms": "^9.1.12", + "@angular/platform-browser": "^9.1.12", + "@angular/platform-browser-dynamic": "^9.1.12", + "@angular/router": "^9.1.12", + "@coreui/angular": "~2.9.4", "@coreui/coreui": "^2.1.16", "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1", "@coreui/icons": "0.3.0", - "bootstrap": "^4.4.1", + "bootstrap": "^4.5.0", "chart.js": "^2.9.3", - "core-js": "^2.6.11", - "flag-icon-css": "^3.4.6", + "core-js": "^3.6.5", + "flag-icon-css": "^3.5.0", "font-awesome": "^4.7.0", - "moment": "^2.24.0", - "mutationobserver-shim": "^0.3.5", - "ng2-charts": "^2.3.0", + "moment": "^2.27.0", + "mutationobserver-shim": "^0.3.7", + "ng2-charts": "^2.3.2", "ngx-bootstrap": "^5.6.1", "ngx-perfect-scrollbar": "^9.0.0", - "rxjs": "^6.5.5", + "rxjs": "^6.6.0", "simple-line-icons": "^2.4.1", "ts-helpers": "^1.1.2", - "tslib": "^1.11.1", + "tslib": "^1.13.0", "web-animations-js": "^2.3.2", "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.901.1", - "@angular/cli": "^9.1.1", - "@angular/compiler-cli": "^9.1.1", - "@angular/language-service": "^9.1.1", - "@types/jasmine": "^3.5.10", + "@angular-devkit/build-angular": "^0.901.11", + "@angular/cli": "^9.1.11", + "@angular/compiler-cli": "^9.1.12", + "@angular/language-service": "^9.1.12", + "@types/jasmine": "^3.5.11", "@types/jasminewd2": "^2.0.8", - "@types/node": "^13.11.1", + "@types/node": "^13.13.14", "codelyzer": "^5.2.2", "jasmine-core": "^3.5.0", "jasmine-spec-reporter": "^5.0.1", - "karma": "^5.0.1", + "karma": "^5.1.0", "karma-chrome-launcher": "^3.1.0", "karma-coverage-istanbul-reporter": "^2.1.1", - "karma-jasmine": "^3.1.1", - "karma-jasmine-html-reporter": "^1.5.3", - "protractor": "^5.4.3", - "ts-node": "^8.8.2", + "karma-jasmine": "^3.3.1", + "karma-jasmine-html-reporter": "^1.5.4", + "protractor": "^7.0.0", + "ts-node": "^8.10.2", "tslint": "^6.1.1", "typescript": "~3.7.5" }, From d31cfddfb1480a9a9d7206a8ed8f43ac23680a4c Mon Sep 17 00:00:00 2001 From: xidedix Date: Wed, 15 Jul 2020 19:00:14 +0200 Subject: [PATCH 06/35] refactor(polyfills): update core-js polyfills imports --- src/polyfills.ts | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/polyfills.ts b/src/polyfills.ts index 4c0716837..b25d78ca3 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -19,28 +19,27 @@ */ /** IE9, IE10 and IE11 requires all of the following polyfills. **/ -import 'core-js/es6/symbol'; -import 'core-js/es6/object'; -import 'core-js/es6/function'; -import 'core-js/es6/parse-int'; -import 'core-js/es6/parse-float'; -import 'core-js/es6/number'; -import 'core-js/es6/math'; -import 'core-js/es6/string'; -import 'core-js/es6/date'; -import 'core-js/es6/array'; -import 'core-js/es6/regexp'; -import 'core-js/es6/map'; -import 'core-js/es6/weak-map'; -import 'core-js/es6/set'; -import 'core-js/es7/array'; -import 'core-js/es7/object'; +import 'core-js/es/symbol'; +import 'core-js/es/object'; +import 'core-js/es/function'; +import 'core-js/es/parse-int'; +import 'core-js/es/parse-float'; +import 'core-js/es/number'; +import 'core-js/es/math'; +import 'core-js/es/string'; +import 'core-js/es/date'; +import 'core-js/es/array'; +import 'core-js/es/regexp'; +import 'core-js/es/map'; +import 'core-js/es/weak-map'; +import 'core-js/es/set'; +import 'core-js/es/array'; /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. /** IE10 and IE11 requires the following for the Reflect API. */ -import 'core-js/es6/reflect'; +import 'core-js/es/reflect'; // for IE10 import 'mutationobserver-shim'; From fc104c22c7badc3f7c8438bc32474c6b81c97ccf Mon Sep 17 00:00:00 2001 From: xidedix Date: Wed, 15 Jul 2020 19:01:51 +0200 Subject: [PATCH 07/35] Ship v2.9.4 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f40d4184..ff82b07a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ ## [CoreUI for Angular](./README.md) version `changelog` +###### `v2.9.4` +- refactor(polyfills): update core-js polyfills imports + +###### dependencies update +- update `@angular/animations` to `^9.1.12` +- update `@angular/common` to `^9.1.12` +- update `@angular/compiler` to `^9.1.12` +- update `@angular/core` to `^9.1.12` +- update `@angular/forms` to `^9.1.12` +- update `@angular/platform-browser` to `^9.1.12` +- update `@angular/platform-browser-dynamic` to `^9.1.12` +- update `@angular/router` to `^9.1.12` +- update `@coreui/angular` to `~2.9.4` +- update `bootstrap` to `^4.5.0` +- update `core-js` to `^3.6.5` +- update `flag-icon-css` to `^3.5.0` +- update `moment` to `^2.27.0` +- update `mutationobserver-shim` to `^0.3.7` +- update `ng2-charts` to `^2.3.2` +- update `rxjs` to `^6.6.0` +- update `tslib` to `^1.13.0` +- update `@angular-devkit/build-angular` to `^0.901.11` +- update `@angular/cli` to `^9.1.11` +- update `@angular/compiler-cli` to `^9.1.12` +- update `@angular/language-service` to `^9.1.12` +- update `@types/jasmine` to `^3.5.11` +- update `@types/node` to `^13.13.14` +- update `karma` to `^5.1.0` +- update `karma-jasmine` to `^3.3.1` +- update `karma-jasmine-html-reporter` to `^1.5.4` +- update `protractor` to `^7.0.0` +- update `ts-node` to `^8.10.2` + ###### `v2.9.2` - fix(navbars): cannot find module `ngx-bootstrap` diff --git a/package.json b/package.json index e57f8aeb4..c4bab252e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/coreui-free-angular-admin-template", - "version": "2.9.2", + "version": "2.9.4", "description": "CoreUI Free Angular 2+ Admin Template", "author": { "name": "Łukasz Holeczek", From 693324a174d16ed301318fb8c66174e886772e78 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 7 Aug 2020 19:29:07 +0200 Subject: [PATCH 08/35] fix(simple-line-icons): Can't resolve simple-line-icons.css - fixes #196 --- angular.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/angular.json b/angular.json index c74440df8..ece812124 100644 --- a/angular.json +++ b/angular.json @@ -23,7 +23,7 @@ "node_modules/@coreui/icons/css/coreui-icons.css", "node_modules/flag-icon-css/css/flag-icon.css", "node_modules/font-awesome/css/font-awesome.css", - "node_modules/simple-line-icons/css/simple-line-icons.css", + "node_modules/simple-line-icons/dist/styles/simple-line-icons.css", "src/scss/style.scss" ], "stylePreprocessorOptions": { @@ -91,7 +91,7 @@ "styles": [ "node_modules/flag-icon-css/css/flag-icon.css", "node_modules/font-awesome/css/font-awesome.css", - "node_modules/simple-line-icons/css/simple-line-icons.css", + "node_modules/simple-line-icons/dist/styles/simple-line-icons.css", "src/scss/style.scss" ], "stylePreprocessorOptions": { @@ -158,4 +158,4 @@ "cli": { "analytics": false } -} \ No newline at end of file +} diff --git a/package.json b/package.json index c4bab252e..7403fe29e 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "ngx-bootstrap": "^5.6.1", "ngx-perfect-scrollbar": "^9.0.0", "rxjs": "^6.6.0", - "simple-line-icons": "^2.4.1", + "simple-line-icons": "^2.5.2", "ts-helpers": "^1.1.2", "tslib": "^1.13.0", "web-animations-js": "^2.3.2", From 36a071f24b70bf4699fda7190ec9bd316da2968c Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 7 Aug 2020 19:29:57 +0200 Subject: [PATCH 09/35] chore: dependencies update - update `@angular-devkit/build-angular` to `^0.901.12` - update `@angular/cli` to `^9.1.12` - update `@types/jasmine` to `^3.5.12` - update `jasmine-core` to `^3.6.0` - update `jasmine-spec-reporter` to `^5.0.2` - update `karma` to `^5.1.1` - update `karma-coverage-istanbul-reporter` to `^3.0.3` - update `tslint` to `^6.1.3` --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 7403fe29e..d41238ac2 100644 --- a/package.json +++ b/package.json @@ -58,24 +58,24 @@ "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.901.11", - "@angular/cli": "^9.1.11", + "@angular-devkit/build-angular": "^0.901.12", + "@angular/cli": "^9.1.12", "@angular/compiler-cli": "^9.1.12", "@angular/language-service": "^9.1.12", - "@types/jasmine": "^3.5.11", + "@types/jasmine": "^3.5.12", "@types/jasminewd2": "^2.0.8", "@types/node": "^13.13.14", "codelyzer": "^5.2.2", - "jasmine-core": "^3.5.0", - "jasmine-spec-reporter": "^5.0.1", - "karma": "^5.1.0", + "jasmine-core": "^3.6.0", + "jasmine-spec-reporter": "^5.0.2", + "karma": "^5.1.1", "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^2.1.1", + "karma-coverage-istanbul-reporter": "^3.0.3", "karma-jasmine": "^3.3.1", "karma-jasmine-html-reporter": "^1.5.4", "protractor": "^7.0.0", "ts-node": "^8.10.2", - "tslint": "^6.1.1", + "tslint": "^6.1.3", "typescript": "~3.7.5" }, "engines": { From 999dde46e0a2165236abd2b90600c26af912066c Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 7 Aug 2020 19:32:38 +0200 Subject: [PATCH 10/35] Ship v2.9.5 --- CHANGELOG.md | 14 ++++++++++++++ package.json | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff82b07a4..b1f01b56e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ ## [CoreUI for Angular](./README.md) version `changelog` +###### `v2.9.5` +- fix(simple-line-icons): Can't resolve simple-line-icons.css - fixes #196 + +###### dependencies update +- update `simple-line-icons` to `^2.5.2` +- update `@angular-devkit/build-angular` to `^0.901.12` +- update `@angular/cli` to `^9.1.12` +- update `@types/jasmine` to `^3.5.12` +- update `jasmine-core` to `^3.6.0` +- update `jasmine-spec-reporter` to `^5.0.2` +- update `karma` to `^5.1.1` +- update `karma-coverage-istanbul-reporter` to `^3.0.3` +- update `tslint` to `^6.1.3` + ###### `v2.9.4` - refactor(polyfills): update core-js polyfills imports diff --git a/package.json b/package.json index d41238ac2..aa13a2eca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/coreui-free-angular-admin-template", - "version": "2.9.4", + "version": "2.9.5", "description": "CoreUI Free Angular 2+ Admin Template", "author": { "name": "Łukasz Holeczek", @@ -19,7 +19,7 @@ "license": "MIT", "scripts": { "ng": "ng", - "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points", + "postinstall": "ngcc --properties es2015 browser module main --first-only", "start": "ng serve", "build": "ng build --prod --aot --buildOptimizer --commonChunk --vendorChunk --optimization --progress", "test": "ng test", From ec213262aa825f4e943e61434b620b0deff02075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Holeczek?= Date: Tue, 8 Dec 2020 17:51:02 +0100 Subject: [PATCH 11/35] Update index.html --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 52209e357..0c89d1605 100644 --- a/src/index.html +++ b/src/index.html @@ -6,7 +6,7 @@ * Licensed under MIT (https://coreui.io/license) --> - + From ed215a7f90b91c5570f290c3aeb40b7e22da1f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Holeczek?= Date: Wed, 9 Dec 2020 10:43:04 +0100 Subject: [PATCH 12/35] Update index.html --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 0c89d1605..4fbd6c157 100644 --- a/src/index.html +++ b/src/index.html @@ -1,3 +1,4 @@ + - From 70ae070ba67af78c1ed8a752737f90c71cd10fa2 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 8 Jan 2021 23:51:43 +0100 Subject: [PATCH 13/35] chore: dependencies update --- package.json | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index aa13a2eca..e175119ba 100644 --- a/package.json +++ b/package.json @@ -28,47 +28,48 @@ }, "private": true, "dependencies": { - "@angular/animations": "^9.1.12", - "@angular/common": "^9.1.12", - "@angular/compiler": "^9.1.12", - "@angular/core": "^9.1.12", - "@angular/forms": "^9.1.12", - "@angular/platform-browser": "^9.1.12", - "@angular/platform-browser-dynamic": "^9.1.12", - "@angular/router": "^9.1.12", - "@coreui/angular": "~2.9.4", + "@angular/animations": "^9.1.13", + "@angular/cdk": "^9.2.4", + "@angular/common": "^9.1.13", + "@angular/compiler": "^9.1.13", + "@angular/core": "^9.1.13", + "@angular/forms": "^9.1.13", + "@angular/platform-browser": "^9.1.13", + "@angular/platform-browser-dynamic": "^9.1.13", + "@angular/router": "^9.1.13", + "@coreui/angular": "~2.9.5", "@coreui/coreui": "^2.1.16", "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1", "@coreui/icons": "0.3.0", - "bootstrap": "^4.5.0", - "chart.js": "^2.9.3", - "core-js": "^3.6.5", + "bootstrap": "^4.5.3", + "chart.js": "^2.9.4", + "core-js": "^3.8.2", "flag-icon-css": "^3.5.0", "font-awesome": "^4.7.0", - "moment": "^2.27.0", + "moment": "^2.29.1", "mutationobserver-shim": "^0.3.7", - "ng2-charts": "^2.3.2", - "ngx-bootstrap": "^5.6.1", + "ng2-charts": "~2.3.3", + "ngx-bootstrap": "^5.6.2", "ngx-perfect-scrollbar": "^9.0.0", - "rxjs": "^6.6.0", - "simple-line-icons": "^2.5.2", + "rxjs": "^6.6.3", + "simple-line-icons": "^2.5.5", "ts-helpers": "^1.1.2", - "tslib": "^1.13.0", + "tslib": "^1.14.1", "web-animations-js": "^2.3.2", "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.901.12", - "@angular/cli": "^9.1.12", - "@angular/compiler-cli": "^9.1.12", - "@angular/language-service": "^9.1.12", - "@types/jasmine": "^3.5.12", + "@angular-devkit/build-angular": "^0.901.13", + "@angular/cli": "^9.1.13", + "@angular/compiler-cli": "^9.1.13", + "@angular/language-service": "^9.1.13", + "@types/jasmine": "^3.6.2", "@types/jasminewd2": "^2.0.8", - "@types/node": "^13.13.14", + "@types/node": "^14.14.20", "codelyzer": "^5.2.2", "jasmine-core": "^3.6.0", "jasmine-spec-reporter": "^5.0.2", - "karma": "^5.1.1", + "karma": "^5.2.3", "karma-chrome-launcher": "^3.1.0", "karma-coverage-istanbul-reporter": "^3.0.3", "karma-jasmine": "^3.3.1", From 32168e43f5e1048f71312f07138e285a195bd2f4 Mon Sep 17 00:00:00 2001 From: xidedix Date: Sat, 9 Jan 2021 00:00:23 +0100 Subject: [PATCH 14/35] feat(icons): update to @coreui/icons v2 and @coreui/icons-angular --- CHANGELOG.md | 32 ++ README.md | 4 +- angular.json | 2 +- e2e/app.e2e-spec.ts | 17 +- package.json | 8 +- src/app/app.component.ts | 14 +- src/app/app.module.ts | 17 +- .../default-layout.component.html | 2 +- .../views/icons/coreui-icons.component.html | 415 +----------------- .../views/icons/coreui-icons.component.scss | 88 ++++ src/app/views/icons/coreui-icons.component.ts | 44 +- src/app/views/icons/icons.module.ts | 9 +- 12 files changed, 229 insertions(+), 423 deletions(-) create mode 100644 src/app/views/icons/coreui-icons.component.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index b1f01b56e..0708b1149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ ## [CoreUI for Angular](./README.md) version `changelog` +###### `v2.9.6` +- feat(icons): update to @coreui/icons v2 and @coreui/icons-angular + +###### dependencies update +- update `@angular/animations` to `^9.1.13` +- update `@angular/cdk` to `^9.2.4` +- update `@angular/common` to `^9.1.13` +- update `@angular/compiler` to `^9.1.13` +- update `@angular/core` to `^9.1.13` +- update `@angular/forms` to `^9.1.13` +- update `@angular/platform-browser` to `^9.1.13` +- update `@angular/platform-browser-dynamic` to `^9.1.13` +- update `@angular/router` to `^9.1.13` +- update `@coreui/angular`: `~2.9.6` +- update `@coreui/icons` to `^2.0.0-rc.0` +- update `@coreui/icons-angular` to `1.0.0-alpha.3` +- update `bootstrap` to `^4.5.3` +- update `chart.js` to `^2.9.4` +- update `core-js` to `^3.8.2` +- update `ng2-charts` to `~2.3.3` +- update `ngx-bootstrap` to `^5.6.2` +- update `rxjs` to `^6.6.3` +- update `simple-line-icons` to `^2.5.5` +- update `tslib` to `^1.14.1` +- update `@angular-devkit/build-angular` to `^0.901.13` +- update `@angular/cli` to `^9.1.13` +- update `@angular/compiler-cli` to `^9.1.13` +- update `@angular/language-service` to `^9.1.13` +- update `@types/jasmine` to `^3.6.2` +- update `@types/node` to `^14.14.20` +- update `karma` to `^5.2.3` + ###### `v2.9.5` - fix(simple-line-icons): Can't resolve simple-line-icons.css - fixes #196 diff --git a/README.md b/README.md index 86e2cc868..41cea29d1 100644 --- a/README.md +++ b/README.md @@ -187,11 +187,11 @@ Some of projects created by community but not maintained by CoreUI team. ## Copyright and license -copyright 2017-2020 creativeLabs Łukasz Holeczek. Code released under [the MIT license](https://github.com/coreui/coreui-free-angular-admin-template/blob/master/LICENSE). +copyright 2017-2021 creativeLabs Łukasz Holeczek. Code released under [the MIT license](https://github.com/coreui/coreui-free-angular-admin-template/blob/master/LICENSE). 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. ## Support CoreUI Development 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). -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). +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). diff --git a/angular.json b/angular.json index ece812124..33f12457e 100644 --- a/angular.json +++ b/angular.json @@ -20,7 +20,7 @@ "src/assets" ], "styles": [ - "node_modules/@coreui/icons/css/coreui-icons.css", + "node_modules/@coreui/icons/css/free.css", "node_modules/flag-icon-css/css/flag-icon.css", "node_modules/font-awesome/css/font-awesome.css", "node_modules/simple-line-icons/dist/styles/simple-line-icons.css", diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts index 488895941..15b73d541 100644 --- a/e2e/app.e2e-spec.ts +++ b/e2e/app.e2e-spec.ts @@ -36,8 +36,6 @@ describe('CoreUI template', () => { button.click(); browser.sleep(sleep); expect(body.getAttribute('class')).not.toContain('sidebar-minimized'); - browser.driver.manage().window().setSize(600, 800); - browser.sleep(1000); }); it('should toggle `sidebar-show` body.class on `navbar-toggler` click', () => { @@ -56,4 +54,19 @@ describe('CoreUI template', () => { browser.sleep(sleep); expect(body.getAttribute('class')).not.toContain('sidebar-show'); }); + + it('should toggle `aside-menu-lg-show` body.class on `navbar-toggler` click', () => { + browser.manage().window().maximize(); + browser.sleep(1000); + const body = page.getBody(); + expect(body.getAttribute('class')).not.toContain('aside-menu-lg-show'); + const button1 = page.getByCss('.navbar-toggler.d-none.d-lg-block').last(); + button1.click(); + browser.sleep(sleep); + expect(body.getAttribute('class')).toContain('aside-menu-lg-show'); + browser.sleep(sleep); + button1.click(); + browser.sleep(sleep); + expect(body.getAttribute('class')).not.toContain('aside-menu-lg-show'); + }); }); diff --git a/package.json b/package.json index e175119ba..9d19a6314 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ } ], "homepage": "https://coreui.io/angular", - "copyright": "Copyright 2020 creativeLabs Łukasz Holeczek", + "copyright": "Copyright 2021 creativeLabs Łukasz Holeczek", "license": "MIT", "scripts": { "ng": "ng", @@ -37,16 +37,16 @@ "@angular/platform-browser": "^9.1.13", "@angular/platform-browser-dynamic": "^9.1.13", "@angular/router": "^9.1.13", - "@coreui/angular": "~2.9.5", + "@coreui/angular": "~2.9.6", "@coreui/coreui": "^2.1.16", "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1", - "@coreui/icons": "0.3.0", + "@coreui/icons": "^2.0.0-rc.0", + "@coreui/icons-angular": "1.0.0-alpha.3", "bootstrap": "^4.5.3", "chart.js": "^2.9.4", "core-js": "^3.8.2", "flag-icon-css": "^3.5.0", "font-awesome": "^4.7.0", - "moment": "^2.29.1", "mutationobserver-shim": "^0.3.7", "ng2-charts": "~2.3.3", "ngx-bootstrap": "^5.6.2", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index dcaa7f252..8ffa61b36 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,13 +1,23 @@ import { Component, OnInit } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; +import { IconSetService } from '@coreui/icons-angular'; +import { freeSet } from '@coreui/icons'; + @Component({ // tslint:disable-next-line selector: 'body', - template: '' + template: '', + providers: [IconSetService], }) export class AppComponent implements OnInit { - constructor(private router: Router) { } + constructor( + private router: Router, + public iconSet: IconSetService + ) { + // iconSet singleton + iconSet.icons = { ...freeSet }; + } ngOnInit() { this.router.events.subscribe((evt) => { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 9dde556f9..22c295d12 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,6 +7,8 @@ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; import { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar'; import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar'; +import { IconModule, IconSetModule, IconSetService } from '@coreui/icons-angular'; + const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true }; @@ -54,7 +56,9 @@ import { ChartsModule } from 'ng2-charts'; PerfectScrollbarModule, BsDropdownModule.forRoot(), TabsModule.forRoot(), - ChartsModule + ChartsModule, + IconModule, + IconSetModule.forRoot(), ], declarations: [ AppComponent, @@ -64,10 +68,13 @@ import { ChartsModule } from 'ng2-charts'; LoginComponent, RegisterComponent ], - providers: [{ - provide: LocationStrategy, - useClass: HashLocationStrategy - }], + providers: [ + { + provide: LocationStrategy, + useClass: HashLocationStrategy + }, + IconSetService, + ], bootstrap: [ AppComponent ] }) export class AppModule { } diff --git a/src/app/containers/default-layout/default-layout.component.html b/src/app/containers/default-layout/default-layout.component.html index c700d80ee..1e0a5059d 100644 --- a/src/app/containers/default-layout/default-layout.component.html +++ b/src/app/containers/default-layout/default-layout.component.html @@ -336,6 +336,6 @@
System Utilization
- CoreUI © 2018 creativeLabs. + CoreUI © 2021 creativeLabs. Powered by CoreUI for Angular diff --git a/src/app/views/icons/coreui-icons.component.html b/src/app/views/icons/coreui-icons.component.html index ef9afe81e..d3e43a0d1 100644 --- a/src/app/views/icons/coreui-icons.component.html +++ b/src/app/views/icons/coreui-icons.component.html @@ -3,413 +3,26 @@
CoreUI Icons New
-
- -
account-logout
-
-
- -
action-redo
-
-
- -
action-undo
-
-
- -
align-center
-
-
- -
align-left
-
-
- -
align-right
-
-
- -
arrow-bottom
-
-
- -
arrow-left
-
-
- -
arrow-right
-
-
- -
arrow-top
-
-
- -
ban
-
-
- -
basket-loaded
-
-
- -
bell
-
-
- -
bold
-
-
- -
bookmark
-
-
- -
briefcase
-
-
- -
british-pound
-
-
- -
brush
-
-
- -
calculator
-
-
- -
calendar
-
-
- -
cart
-
-
- -
chart
-
-
- -
check
-
-
- -
chevron-bottom
-
-
- -
chevron-left
-
-
- -
chevron-right
-
-
- -
chevron-top
-
-
- -
circle-check
-
-
- -
circle-x
-
-
- -
cloud
-
-
- -
cloud-download
-
-
- -
cloud-upload
-
-
- -
code
-
-
- -
cog
-
-
- -
comment-square
-
-
- -
credit-card
-
-
- -
cursor
-
-
- -
dashboard
-
-
- -
delete
-
-
- -
dollar
-
-
- -
drop
-
-
- -
envelope-closed
-
-
- -
envelope-letter
-
-
- -
envelope-open
-
-
- -
euro
-
-
- -
file
-
-
- -
globe
-
-
- -
graph
-
-
- -
home
-
-
- -
inbox
-
-
- -
info
-
-
- -
italic
-
-
- -
justify-center
-
-
- -
justify-left
-
-
- -
justify-right
-
-
- -
laptop
-
-
- -
layers
-
-
- -
lightbulb
-
-
- -
list
-
-
- -
location-pin
-
-
- -
lock-locked
-
-
- -
lock-unlocked
-
-
- -
magnifying-glass
-
-
- -
map
-
-
- -
monitor
-
-
- -
moon
-
-
- -
note
-
-
- -
options
-
-
- -
paperclip
-
-
- -
pencil
-
-
- -
people
-
-
- -
phone
-
-
- -
pie-chart
-
-
- -
print
-
-
- -
puzzle
-
-
- -
rss
-
-
- -
screen-desktop
-
-
- -
screen-smartphone
-
-
- -
settings
-
-
- -
share
-
-
- -
shield
-
-
- -
sort-ascending
-
-
- -
sort-descending
-
-
- -
speech
-
-
- -
speedometer
-
-
- -
star
-
-
- -
sun
-
-
- -
tablet
-
-
- -
tags
-
-
- -
task
-
-
- -
thumb-down
-
-
- -
thumb-up
-
-
- -
trash
-
-
- -
underline
-
-
- -
user
-
-
- -
user-female
-
-
- -
user-follow
-
-
- -
user-unfollow
-
-
- -
wrench
-
-
- -
yen
+
+ + + + +
{{ toKebabCase(icon[0]) }}
-
diff --git a/src/app/views/icons/coreui-icons.component.scss b/src/app/views/icons/coreui-icons.component.scss new file mode 100644 index 000000000..4457c38af --- /dev/null +++ b/src/app/views/icons/coreui-icons.component.scss @@ -0,0 +1,88 @@ +.c-icon-fix { + color: rgb(92 104 115); + fill: rgb(92 104 115); +} + +.c-icon { + display: inline-block; + color: inherit; + text-align: center; + fill: currentColor; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size) { + width: 1rem; + height: 1rem; + font-size: 1rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-2xl { + width: 2rem; + height: 2rem; + font-size: 2rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-3xl { + width: 3rem; + height: 3rem; + font-size: 3rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-4xl { + width: 4rem; + height: 4rem; + font-size: 4rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-5xl { + width: 5rem; + height: 5rem; + font-size: 5rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-6xl { + width: 6rem; + height: 6rem; + font-size: 6rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-7xl { + width: 7rem; + height: 7rem; + font-size: 7rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-8xl { + width: 8rem; + height: 8rem; + font-size: 8rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-9xl { + width: 9rem; + height: 9rem; + font-size: 9rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-xl { + width: 1.5rem; + height: 1.5rem; + font-size: 1.5rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-lg { + width: 1.25rem; + height: 1.25rem; + font-size: 1.25rem; +} + +.c-icon:not(.c-icon-c-s):not(.c-icon-custom-size).c-icon-sm { + width: .875rem; + height: .875rem; + font-size: .875rem; +} + +.c-icon-c-s, .c-icon-custom-size { + width: initial !important; + height: initial !important; +} diff --git a/src/app/views/icons/coreui-icons.component.ts b/src/app/views/icons/coreui-icons.component.ts index 6d63719d3..d4c711fbc 100644 --- a/src/app/views/icons/coreui-icons.component.ts +++ b/src/app/views/icons/coreui-icons.component.ts @@ -1,10 +1,46 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { Platform } from '@angular/cdk/platform'; + +import { IconSetService } from '@coreui/icons-angular'; @Component({ - templateUrl: 'coreui-icons.component.html' + templateUrl: 'coreui-icons.component.html', + styleUrls: ['coreui-icons.component.scss'] }) -export class CoreUIIconsComponent { +export class CoreUIIconsComponent implements OnInit { + public title = 'CoreUI Icons'; + public icons = []; + + constructor( + public platform: Platform, + private route: ActivatedRoute, + public iconSet: IconSetService + ) {} + + ngOnInit() { + const path = this.route.routeConfig.path; + let prefix = 'cil'; + if (path === 'coreui-icons') { + this.title = `${this.title} - Free`; + prefix = 'cil'; + } else if (path === 'brands') { + this.title = `${this.title} - Brands`; + prefix = 'cib'; + } else if (path === 'flags') { + this.title = `${this.title} - Flags`; + prefix = 'cif'; + } + this.icons = this.getIconsView(prefix); + } - constructor() { } + toKebabCase(str) { + return str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase(); + } + getIconsView(prefix: string) { + return Object.entries(this.iconSet.icons).filter((icon) => { + return icon[0].startsWith(prefix); + }); + } } diff --git a/src/app/views/icons/icons.module.ts b/src/app/views/icons/icons.module.ts index 574696102..c8e601e39 100644 --- a/src/app/views/icons/icons.module.ts +++ b/src/app/views/icons/icons.module.ts @@ -1,4 +1,7 @@ import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { IconModule } from '@coreui/icons-angular'; import { CoreUIIconsComponent } from './coreui-icons.component'; import { FlagsComponent } from './flags.component'; @@ -8,7 +11,11 @@ import { SimpleLineIconsComponent } from './simple-line-icons.component'; import { IconsRoutingModule } from './icons-routing.module'; @NgModule({ - imports: [ IconsRoutingModule ], + imports: [ + CommonModule, + IconsRoutingModule, + IconModule + ], declarations: [ CoreUIIconsComponent, FlagsComponent, From 6cd7a01150f20d2658677c06604b5160774ef74d Mon Sep 17 00:00:00 2001 From: xidedix Date: Thu, 14 Jan 2021 18:58:18 +0100 Subject: [PATCH 15/35] Ship v2.9.6 --- package.json | 4 ++-- src/index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9d19a6314..7c226c694 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@coreui/coreui-free-angular-admin-template", - "version": "2.9.5", - "description": "CoreUI Free Angular 2+ Admin Template", + "version": "2.9.6", + "description": "CoreUI Free Angular 9 Admin Template", "author": { "name": "Łukasz Holeczek", "url": "http://holeczek.pl/", diff --git a/src/index.html b/src/index.html index 4fbd6c157..4746f1a5b 100644 --- a/src/index.html +++ b/src/index.html @@ -1,9 +1,9 @@ From e5bfd2e480f4043e29a14c1d22a4470afb83212f Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 15 Jan 2021 17:14:43 +0100 Subject: [PATCH 16/35] chore: update to Angular 10 and TypeScript 3.9 --- angular.json | 13 +++++----- package.json | 58 ++++++++++++++++++++++--------------------- src/polyfills.ts | 20 ++++----------- src/tsconfig.app.json | 12 ++++++--- tsconfig.json | 4 +-- 5 files changed, 53 insertions(+), 54 deletions(-) diff --git a/angular.json b/angular.json index 33f12457e..626e896c8 100644 --- a/angular.json +++ b/angular.json @@ -31,8 +31,10 @@ "./node_modules" ] }, - "scripts": [ - "node_modules/chart.js/dist/Chart.min.js" + "scripts": [], + "allowedCommonJsDependencies": [ + "chart.js", + "classnames" ] }, "configurations": { @@ -85,10 +87,9 @@ "karmaConfig": "./karma.conf.js", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", - "scripts": [ - "node_modules/chart.js/dist/Chart.min.js" - ], + "scripts": [], "styles": [ + "node_modules/@coreui/icons/css/free.css", "node_modules/flag-icon-css/css/flag-icon.css", "node_modules/font-awesome/css/font-awesome.css", "node_modules/simple-line-icons/dist/styles/simple-line-icons.css", @@ -149,7 +150,7 @@ "schematics": { "@schematics/angular:component": { "prefix": "app", - "styleext": "scss" + "style": "scss" }, "@schematics/angular:directive": { "prefix": "app" diff --git a/package.json b/package.json index 7c226c694..0ec5b6bc0 100644 --- a/package.json +++ b/package.json @@ -28,56 +28,58 @@ }, "private": true, "dependencies": { - "@angular/animations": "^9.1.13", - "@angular/cdk": "^9.2.4", - "@angular/common": "^9.1.13", - "@angular/compiler": "^9.1.13", - "@angular/core": "^9.1.13", - "@angular/forms": "^9.1.13", - "@angular/platform-browser": "^9.1.13", - "@angular/platform-browser-dynamic": "^9.1.13", - "@angular/router": "^9.1.13", - "@coreui/angular": "~2.9.6", + "@angular/animations": "^10.2.4", + "@angular/cdk": "^10.2.7", + "@angular/common": "^10.2.4", + "@angular/compiler": "^10.2.4", + "@angular/core": "^10.2.4", + "@angular/forms": "^10.2.4", + "@angular/localize": "^10.2.4", + "@angular/platform-browser": "^10.2.4", + "@angular/platform-browser-dynamic": "^10.2.4", + "@angular/router": "^10.2.4", + "@coreui/angular": "~2.10.0", "@coreui/coreui": "^2.1.16", "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1", "@coreui/icons": "^2.0.0-rc.0", "@coreui/icons-angular": "1.0.0-alpha.3", "bootstrap": "^4.5.3", "chart.js": "^2.9.4", + "classlist.js": "^1.1.20150312", "core-js": "^3.8.2", "flag-icon-css": "^3.5.0", "font-awesome": "^4.7.0", "mutationobserver-shim": "^0.3.7", - "ng2-charts": "~2.3.3", - "ngx-bootstrap": "^5.6.2", - "ngx-perfect-scrollbar": "^9.0.0", + "ng2-charts": "^2.4.2", + "ngx-bootstrap": "^6.2.0", + "ngx-perfect-scrollbar": "^10.1.0", "rxjs": "^6.6.3", "simple-line-icons": "^2.5.5", "ts-helpers": "^1.1.2", - "tslib": "^1.14.1", + "tslib": "^2.0.0", "web-animations-js": "^2.3.2", "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.901.13", - "@angular/cli": "^9.1.13", - "@angular/compiler-cli": "^9.1.13", - "@angular/language-service": "^9.1.13", + "@angular-devkit/build-angular": "^0.1002.1", + "@angular/cli": "^10.2.1", + "@angular/compiler-cli": "^10.2.4", + "@angular/language-service": "^10.2.4", "@types/jasmine": "^3.6.2", "@types/jasminewd2": "^2.0.8", "@types/node": "^14.14.20", "codelyzer": "^5.2.2", - "jasmine-core": "^3.6.0", - "jasmine-spec-reporter": "^5.0.2", - "karma": "^5.2.3", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage-istanbul-reporter": "^3.0.3", - "karma-jasmine": "^3.3.1", - "karma-jasmine-html-reporter": "^1.5.4", - "protractor": "^7.0.0", + "jasmine-core": "~3.6.0", + "jasmine-spec-reporter": "~5.0.0", + "karma": "~5.2.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~4.0.0", + "karma-jasmine-html-reporter": "^1.5.0", + "protractor": "~7.0.0", "ts-node": "^8.10.2", - "tslint": "^6.1.3", - "typescript": "~3.7.5" + "tslint": "~6.1.0", + "typescript": "^3.9.7" }, "engines": { "node": ">= 10.13", diff --git a/src/polyfills.ts b/src/polyfills.ts index b25d78ca3..e2eff6a33 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,3 +1,7 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. + */ +import '@angular/localize/init'; /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. @@ -19,21 +23,7 @@ */ /** IE9, IE10 and IE11 requires all of the following polyfills. **/ -import 'core-js/es/symbol'; -import 'core-js/es/object'; -import 'core-js/es/function'; -import 'core-js/es/parse-int'; -import 'core-js/es/parse-float'; -import 'core-js/es/number'; -import 'core-js/es/math'; -import 'core-js/es/string'; -import 'core-js/es/date'; -import 'core-js/es/array'; -import 'core-js/es/regexp'; -import 'core-js/es/map'; -import 'core-js/es/weak-map'; -import 'core-js/es/set'; -import 'core-js/es/array'; +import 'core-js'; /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index ff5fc6fb4..3f4d49d8e 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -3,8 +3,8 @@ "compilerOptions": { "outDir": "../out-tsc/app", "baseUrl": "./", - "module": "esnext", - "target": "es5", + "module": "es2020", + "target": "es2015", "types": [], "paths": { "@angular/*": [ @@ -13,7 +13,8 @@ } }, "angularCompilerOptions": { - "enableIvy": false + "enableIvy": true, + "importHelpers": true }, "files": [ "main.ts", @@ -21,5 +22,10 @@ ], "include": [ "**/*.d.ts" + ], + "exclude": [ + "src/**/*.spec.ts", + "src/test.ts", + "src/environments/environment.prod.ts" ] } diff --git a/tsconfig.json b/tsconfig.json index 2dbd1dae9..c5256d2c7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,8 @@ "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "module": "esnext", - "target": "es5", + "module": "es2020", + "target": "es2015", "typeRoots": [ "node_modules/@types" ], From 325c684a9510502f9447a0f8b0ec76655c22c093 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 15 Jan 2021 18:12:26 +0100 Subject: [PATCH 17/35] test: deprecate async() in favour of waitForAsync() --- src/app/app.component.spec.ts | 6 +++--- src/app/views/base/navbars/navbars.component.spec.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index cb29357ee..5193e129a 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,8 +1,8 @@ import { RouterTestingModule } from '@angular/router/testing'; -import { TestBed, async } from '@angular/core/testing'; +import { TestBed, waitForAsync } from '@angular/core/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ AppComponent @@ -10,7 +10,7 @@ describe('AppComponent', () => { imports: [ RouterTestingModule ] }).compileComponents(); })); - it('should create the app', async(() => { + it('should create the app', waitForAsync(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; expect(app).toBeTruthy(); diff --git a/src/app/views/base/navbars/navbars.component.spec.ts b/src/app/views/base/navbars/navbars.component.spec.ts index 0166f2609..668419b28 100644 --- a/src/app/views/base/navbars/navbars.component.spec.ts +++ b/src/app/views/base/navbars/navbars.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { NavbarsComponent } from './navbars.component'; @@ -6,7 +6,7 @@ describe('NavbarsComponent', () => { let component: NavbarsComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ NavbarsComponent ] }) From 304d231e38778eb670b4386800ba0760fe851d78 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 15 Jan 2021 18:13:51 +0100 Subject: [PATCH 18/35] Ship v2.10.0 for Angular 10 --- CHANGELOG.md | 43 +++++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++-- src/index.html | 4 ++-- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0708b1149..d54de0900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,48 @@ ## [CoreUI for Angular](./README.md) version `changelog` +###### `v2.10.0` + +- chore: update to `Angular 10` and `TypeScript 3.9` + - [https://update.angular.io/](https://update.angular.io/?v=9.1-10.2) + - [https://v10.angular.io/guide/updating-to-version-10](https://v10.angular.io/guide/updating-to-version-10) + - [TypeScript: Documentation - TypeScript 3.9](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html) + + +- test: deprecate `async()` in favour of `waitForAsync()` + +###### dependencies update +- update `@angular/animations` to `^10.2.4` +- update `@angular/cdk` to `^10.2.7` +- update `@angular/common` to `^10.2.4` +- update `@angular/compiler` to `^10.2.4` +- update `@angular/core` to `^10.2.4` +- update `@angular/forms` to `^10.2.4` +- update `@angular/localize` to `^10.2.4` +- update `@angular/platform-browser` to `^10.2.4` +- update `@angular/platform-browser-dynamic` to `^10.2.4` +- update `@angular/router` to `^10.2.4` +- update `@coreui/angular` to `~2.10.0` +- update `classlist.js` to `^1.1.20150312` +- update `ng2-charts` to `^2.4.2` +- update `ngx-bootstrap` to `^6.2.0` +- update `ngx-perfect-scrollbar` to `^10.1.0` +- update `tslib` to `^2.0.0` +- update `@angular-devkit/build-angular` to `^0.1002.1` +- update `@angular/cli` to `^10.2.1` +- update `@angular/compiler-cli` to `^10.2.4` +- update `@angular/language-service` to `^10.2.4` +- update `jasmine-core` to `~3.6.0` +- update `jasmine-spec-reporter` to `~5.0.0` +- update `karma` to `~5.2.0` +- update `karma-chrome-launcher` to `~3.1.0` +- update `karma-coverage-istanbul-reporter` to `~3.0.2` +- update `karma-jasmine` to `~4.0.0` +- update `karma-jasmine-html-reporter` to `^1.5.0` +- update `protractor` to `~7.0.0` +- update `tslint` to `~6.1.0` +- update `typescript` to `^3.9.7` + + ###### `v2.9.6` - feat(icons): update to @coreui/icons v2 and @coreui/icons-angular diff --git a/package.json b/package.json index 0ec5b6bc0..5959eaf0a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@coreui/coreui-free-angular-admin-template", - "version": "2.9.6", - "description": "CoreUI Free Angular 9 Admin Template", + "version": "2.10.0", + "description": "CoreUI Free Angular 10 Admin Template", "author": { "name": "Łukasz Holeczek", "url": "http://holeczek.pl/", diff --git a/src/index.html b/src/index.html index 4746f1a5b..834a84608 100644 --- a/src/index.html +++ b/src/index.html @@ -1,7 +1,7 @@ diff --git a/src/polyfills.ts b/src/polyfills.ts index c7b2a5ec1..f65243765 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -27,7 +27,7 @@ import '@angular/localize/init'; import 'core-js'; /** IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. +import 'classlist.js'; // Run `npm install --save classlist.js`. /** * Web Animations `@angular/platform-browser/animations` @@ -63,7 +63,7 @@ import 'web-animations-js'; // Run `npm install --save web-animations-js`. /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** From ca4cfde63ed72925940b5a155bef53299dd5e26e Mon Sep 17 00:00:00 2001 From: xidedix Date: Thu, 17 Mar 2022 21:12:44 +0100 Subject: [PATCH 29/35] chore: update to Angular 12 --- .browserslistrc | 2 +- .editorconfig | 7 +- .gitignore | 7 +- angular.json | 103 +++++++++++------------ karma.conf.js | 5 +- package.json | 51 ++++++------ protractor.conf.js | 2 +- src/declarations.d.ts | 8 ++ src/environments/environment.ts | 16 +++- src/polyfills.ts | 11 ++- src/test.ts | 13 ++- src/tsconfig.app.json | 31 ------- src/tsconfig.spec.json | 21 ----- tsconfig.app.json | 15 ++++ tsconfig.json | 32 +++++-- tsconfig.spec.json | 18 ++++ tslint.json | 142 -------------------------------- 17 files changed, 175 insertions(+), 309 deletions(-) create mode 100644 src/declarations.d.ts delete mode 100644 src/tsconfig.app.json delete mode 100644 src/tsconfig.spec.json create mode 100644 tsconfig.app.json create mode 100644 tsconfig.spec.json delete mode 100644 tslint.json diff --git a/.browserslistrc b/.browserslistrc index e228fa623..427441dc9 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -14,4 +14,4 @@ last 2 Edge major versions last 2 Safari major versions last 2 iOS major versions Firefox ESR -IE 11 # Angular supports IE 11 only as an opt-in. To opt-out, add the 'not' prefix on this line. +not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. diff --git a/.editorconfig b/.editorconfig index 54e4850b2..0a592d43d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,14 +1,17 @@ -# Editor configuration, see http://editorconfig.org +# Editor configuration, see https://editorconfig.org root = true [*] charset = utf-8 end_of_line = lf -indent_size = 2 indent_style = space +indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true +[*.ts] +quote_type = single + [*.md] max_line_length = off trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index 9725934af..1289e88d6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,14 +2,18 @@ # compiled output /dist -/dist-server /tmp /out-tsc +# Only exists if Bazel was run +/bazel-out # dependencies /node_modules package-lock.json +# profiling files +chrome-profiler-events*.json + # IDEs and editors /.idea .project @@ -25,6 +29,7 @@ package-lock.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +.history/* # misc /.sass-cache diff --git a/angular.json b/angular.json index 9815ea10c..450da9e54 100644 --- a/angular.json +++ b/angular.json @@ -4,9 +4,18 @@ "newProjectRoot": "projects", "projects": { "ng": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + }, + "@schematics/angular:application": { + "strict": false + } + }, "root": "", "sourceRoot": "src", - "projectType": "application", + "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", @@ -14,9 +23,12 @@ "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", - "tsConfig": "src/tsconfig.app.json", "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "preserveSymlinks": true, "assets": [ + "src/favicon.ico", "src/assets" ], "styles": [ @@ -40,38 +52,47 @@ "configurations": { "production": { "budgets": [ + { + "type": "initial", + "maximumWarning": "1500kb", + "maximumError": "2mb" + }, { "type": "anyComponentStyle", - "maximumWarning": "6kb" + "maximumWarning": "6kb", + "maximumError": "12kb" } ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } - ] + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true } - } + }, + "defaultConfiguration": "production" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "ng:build" - }, "configurations": { "production": { "browserTarget": "ng:build:production" + }, + "development": { + "browserTarget": "ng:build:development" } - } + }, + "defaultConfiguration": "development" }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", @@ -83,10 +104,14 @@ "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", - "karmaConfig": "./karma.conf.js", "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.spec.json", - "scripts": [], + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "inlineStyleLanguage": "scss", + "assets": [ + "src/favicon.ico", + "src/assets" + ], "styles": [ "node_modules/@coreui/icons/css/free.css", "node_modules/flag-icon-css/css/flag-icon.css", @@ -98,23 +123,7 @@ "includePaths": [ "./node_modules" ] - }, - "assets": [ - "src/assets", - "src/favicon.ico" - ] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] + } } } } @@ -130,31 +139,11 @@ "protractorConfig": "./protractor.conf.js", "devServerTarget": "ng:serve" } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "e2e/tsconfig.e2e.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } } } } }, "defaultProject": "ng", - "schematics": { - "@schematics/angular:component": { - "prefix": "app", - "style": "scss" - }, - "@schematics/angular:directive": { - "prefix": "app" - } - }, "cli": { "analytics": false } diff --git a/karma.conf.js b/karma.conf.js index e8adcb54e..b97545491 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -25,16 +25,13 @@ module.exports = function (config) { suppressAll: true // removes the duplicated traces }, coverageReporter: { - dir: require('path').join(__dirname, '../../coverage'), + dir: require('path').join(__dirname, './coverage/coreui-free-angular-admin-template'), subdir: '.', reporters: [ { type: 'html' }, { type: 'text-summary' } ] }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, diff --git a/package.json b/package.json index 5e28d1d9c..b89f2a93f 100644 --- a/package.json +++ b/package.json @@ -19,26 +19,25 @@ "license": "MIT", "scripts": { "ng": "ng", - "postinstall": "ngcc --properties es2015 browser module main --first-only", "start": "ng serve", - "build": "ng build --prod --aot --build-optimizer --common-chunk --vendor-chunk --optimization --progress", + "build": "ng build", + "watch": "ng build --watch --configuration development", "test": "ng test", - "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { - "@angular/animations": "^11.2.14", - "@angular/cdk": "^11.2.13", - "@angular/common": "^11.2.14", - "@angular/compiler": "^11.2.14", - "@angular/core": "^11.2.14", - "@angular/forms": "^11.2.14", - "@angular/localize": "^11.2.14", - "@angular/platform-browser": "^11.2.14", - "@angular/platform-browser-dynamic": "^11.2.14", - "@angular/router": "^11.2.14", - "@coreui/angular": "~2.11.3", + "@angular/animations": "^12.2.16", + "@angular/cdk": "^12.2.13", + "@angular/common": "^12.2.16", + "@angular/compiler": "^12.2.16", + "@angular/core": "^12.2.16", + "@angular/forms": "^12.2.16", + "@angular/localize": "^12.2.16", + "@angular/platform-browser": "^12.2.16", + "@angular/platform-browser-dynamic": "^12.2.16", + "@angular/router": "^12.2.16", + "@coreui/angular": "~2.12.0", "@coreui/coreui": "^2.1.16", "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1", "@coreui/icons": "^2.1.0", @@ -57,31 +56,29 @@ "ts-helpers": "^1.1.2", "tslib": "^2.3.1", "web-animations-js": "^2.3.2", - "zone.js": "~0.11.5" + "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.1102.18", - "@angular/cli": "^11.2.18", - "@angular/compiler-cli": "^11.2.14", - "@angular/language-service": "^11.2.14", - "@types/jasmine": "^3.10.4", + "@angular-devkit/build-angular": "^12.2.16", + "@angular/cli": "^12.2.16", + "@angular/compiler-cli": "^12.2.16", + "@angular/language-service": "^12.2.16", + "@types/jasmine": "~3.8.0", "@types/jasminewd2": "^2.0.10", "@types/node": "^14.18.12", - "codelyzer": "^6.0.2", - "jasmine-core": "~3.10.1", - "jasmine-spec-reporter": "~5.0.2", - "karma": "~5.2.3", + "jasmine-core": "~3.8.0", + "jasmine-spec-reporter": "^7.0.0", + "karma": "~6.3.17", "karma-chrome-launcher": "~3.1.1", "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.7.0", "protractor": "~7.0.0", "ts-node": "^9.1.1", - "tslint": "~6.1.3", - "typescript": "~4.1.6" + "typescript": "~4.3.5" }, "engines": { - "node": ">= 10.19", + "node": ">= 12.20", "npm": ">= 6" } } diff --git a/protractor.conf.js b/protractor.conf.js index 7ee3b5ee8..eed36ab59 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -12,7 +12,7 @@ exports.config = { 'browserName': 'chrome' }, directConnect: true, - baseUrl: 'http://localhost:4200/', + baseUrl: 'http://localhost:4202/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, diff --git a/src/declarations.d.ts b/src/declarations.d.ts new file mode 100644 index 000000000..99b497ae7 --- /dev/null +++ b/src/declarations.d.ts @@ -0,0 +1,8 @@ +declare module '@coreui/coreui/dist/js/coreui-utilities'; +declare module '@coreui/coreui-plugin-chartjs-custom-tooltips'; + +declare module '*.json' { + const value: any; + export default value; +} + diff --git a/src/environments/environment.ts b/src/environments/environment.ts index b7f639aec..f56ff4702 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,8 +1,16 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. export const environment = { production: false }; + +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/src/polyfills.ts b/src/polyfills.ts index f65243765..930baaee0 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -23,18 +23,17 @@ import '@angular/localize/init'; * BROWSER POLYFILLS */ -/** IE11 requires all of the following polyfills. **/ -import 'core-js'; - -/** IE11 requires the following for NgClass support on SVG elements */ -import 'classlist.js'; // Run `npm install --save classlist.js`. +/** + * IE11 requires the following for NgClass support on SVG elements + */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. /** * Web Animations `@angular/platform-browser/animations` * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). */ -import 'web-animations-js'; // Run `npm install --save web-animations-js`. +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. /** * By default, zone.js will patch all possible macroTask and DomEvents diff --git a/src/test.ts b/src/test.ts index 16317897b..b4dd6032f 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,19 +1,26 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -declare const require: any; +declare const require: { + context(path: string, deep?: boolean, filter?: RegExp): { + keys(): string[]; + (id: string): T; + }; +}; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), + { teardown: { destroyAfterEach: true }}, ); + // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json deleted file mode 100644 index 3f4d49d8e..000000000 --- a/src/tsconfig.app.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "baseUrl": "./", - "module": "es2020", - "target": "es2015", - "types": [], - "paths": { - "@angular/*": [ - "../node_modules/@angular/*" - ] - } - }, - "angularCompilerOptions": { - "enableIvy": true, - "importHelpers": true - }, - "files": [ - "main.ts", - "polyfills.ts" - ], - "include": [ - "**/*.d.ts" - ], - "exclude": [ - "src/**/*.spec.ts", - "src/test.ts", - "src/environments/environment.prod.ts" - ] -} diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json deleted file mode 100644 index 2bbbe7916..000000000 --- a/src/tsconfig.spec.json +++ /dev/null @@ -1,21 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "baseUrl": "./", - "module": "commonjs", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/tsconfig.app.json b/tsconfig.app.json new file mode 100644 index 000000000..82d91dc4a --- /dev/null +++ b/tsconfig.app.json @@ -0,0 +1,15 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": [ + "src/main.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json index 1fe854606..86543633e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,21 +2,35 @@ { "compileOnSave": false, "compilerOptions": { - "importHelpers": true, + "baseUrl": "./", "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": false, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, "sourceMap": true, "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, + "downlevelIteration": true, "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "es2017", "module": "es2020", - "target": "es2015", - "typeRoots": [ - "node_modules/@types" - ], "lib": [ - "esnext", + "es2018", "dom" ] - } + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": false, + "strictInputAccessModifiers": false, + "strictTemplates": false + }, + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.spec.json" }, + ] } diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 000000000..092345b02 --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,18 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "files": [ + "src/test.ts", + "src/polyfills.ts" + ], + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 1ad300574..000000000 --- a/tslint.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "deprecation": { - "severity": "warn" - }, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params", - "ignore-properties" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ], - "no-output-on-prefix": true, - "no-inputs-metadata-property": true, - "no-outputs-metadata-property": true, - "no-host-metadata-property": true, - "no-input-rename": true, - "no-output-rename": true, - "use-lifecycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -} From 226cb2e7625fcc8e9d1b3fc385490305235c19a0 Mon Sep 17 00:00:00 2001 From: xidedix Date: Thu, 17 Mar 2022 21:13:27 +0100 Subject: [PATCH 30/35] refactor: minor fixes, icons cleanup --- src/app/app.component.ts | 4 ++-- src/app/views/base/navbars/navbars.component.spec.ts | 8 ++++++-- src/app/views/icons/coreui-icons.component.ts | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8ffa61b36..818c47b23 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; import { IconSetService } from '@coreui/icons-angular'; -import { freeSet } from '@coreui/icons'; +import { cilUser } from '@coreui/icons'; @Component({ // tslint:disable-next-line @@ -16,7 +16,7 @@ export class AppComponent implements OnInit { public iconSet: IconSetService ) { // iconSet singleton - iconSet.icons = { ...freeSet }; + iconSet.icons = { cilUser }; } ngOnInit() { diff --git a/src/app/views/base/navbars/navbars.component.spec.ts b/src/app/views/base/navbars/navbars.component.spec.ts index 668419b28..da2fd72cb 100644 --- a/src/app/views/base/navbars/navbars.component.spec.ts +++ b/src/app/views/base/navbars/navbars.component.spec.ts @@ -1,4 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { CollapseDirective } from 'ngx-bootstrap/collapse'; +import { BsDropdownDirective, BsDropdownModule } from 'ngx-bootstrap/dropdown'; import { NavbarsComponent } from './navbars.component'; @@ -8,9 +11,10 @@ describe('NavbarsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ NavbarsComponent ] + declarations: [NavbarsComponent, CollapseDirective, BsDropdownDirective], + imports: [NoopAnimationsModule, BsDropdownModule.forRoot()] }) - .compileComponents(); + .compileComponents(); })); beforeEach(() => { diff --git a/src/app/views/icons/coreui-icons.component.ts b/src/app/views/icons/coreui-icons.component.ts index d4c711fbc..9c81005f3 100644 --- a/src/app/views/icons/coreui-icons.component.ts +++ b/src/app/views/icons/coreui-icons.component.ts @@ -3,10 +3,12 @@ import { ActivatedRoute } from '@angular/router'; import { Platform } from '@angular/cdk/platform'; import { IconSetService } from '@coreui/icons-angular'; +import { freeSet } from '@coreui/icons'; @Component({ templateUrl: 'coreui-icons.component.html', - styleUrls: ['coreui-icons.component.scss'] + styleUrls: ['coreui-icons.component.scss'], + providers: [IconSetService], }) export class CoreUIIconsComponent implements OnInit { public title = 'CoreUI Icons'; @@ -16,7 +18,9 @@ export class CoreUIIconsComponent implements OnInit { public platform: Platform, private route: ActivatedRoute, public iconSet: IconSetService - ) {} + ) { + iconSet.icons = { ...freeSet }; + } ngOnInit() { const path = this.route.routeConfig.path; From 9f658416391cfea41b179ce01fe19c4614dd59f2 Mon Sep 17 00:00:00 2001 From: xidedix Date: Thu, 17 Mar 2022 21:14:36 +0100 Subject: [PATCH 31/35] Ship v2.12.0 for Angular 12 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ README.md | 10 +++++----- package.json | 4 ++-- src/index.html | 4 ++-- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7e274785..30767dcd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ ## [CoreUI for Angular](./README.md) version `changelog` +###### `v2.12.0` + +- chore: update to `Angular 12.2` +- refactor: icons cleanup + +###### dependencies update +- update `@angular/animations` to `^12.2.16` +- update `@angular/cdk` to `^12.2.13` +- update `@angular/common` to `^12.2.16` +- update `@angular/compiler` to `^12.2.16` +- update `@angular/core` to `^12.2.16` +- update `@angular/forms` to `^12.2.16` +- update `@angular/localize` to `^12.2.16` +- update `@angular/platform-browser` to `^12.2.16` +- update `@angular/platform-browser-dynamic` to `^12.2.16` +- update `@angular/router` to `^12.2.16` +- update `@coreui/angular` to `~2.12.0` +- update `zone.js` to `~0.11.4` +- update `@angular-devkit/build-angular` to `^12.2.16` +- update `@angular/cli` to `^12.2.16` +- update `@angular/compiler-cli` to `^12.2.16` +- update `@angular/language-service` to `^12.2.16` +- update `jasmine-spec-reporter` to `~7.0.0` +- update `karma` to `~6.3.17` +- update `typescript` to `~4.3.5` + +###### `v2.11.3` + +- chore: dependencies update + ###### `v2.11.2` - chore: update to `Angular 11.2` diff --git a/README.md b/README.md index 705f9a8e3..b47fce905 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![angular](https://img.shields.io/badge/angular-^11.2.0-lightgrey.svg?style=flat-square&logo=angular) +![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular) [![npm package][npm-coreui-angular-badge-v2]][npm-coreui-angular] [![npm package][npm-coreui-angular-badge-latest]][npm-coreui-angular] [![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular] @@ -45,7 +45,7 @@ CoreUI is meant to be the UX game changer. Pure & transparent code is devoid of - [Prerequisites](#prerequisites) - [Node.js](#nodejs) - [Angular CLI](#angular-cli) - - [Update to Angular 11](#update-to-angular-9) + - [Update to Angular 12](#update-to-angular-9) - [Installation](#installation) - [Clone repo](#clone-repo) - [Usage](#usage) @@ -79,7 +79,7 @@ CoreUI is built on top of Bootstrap 4 and supports popular frameworks. Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager. ###### Node.js -Angular 11 requires `Node.js` version 10.19 or later. +Angular 12 requires `Node.js` version 12.20 or later. - To check your version, run `node -v` in a terminal/console window. - To get `Node.js`, go to [nodejs.org](https://nodejs.org/). @@ -90,8 +90,8 @@ Install the Angular CLI globally using a terminal/console window. npm install -g @angular/cli ``` -##### Update to Angular 11 -Angular 11 requires `Node.js` version 10.19 or newer +##### Update to Angular 12 +Angular 12 requires `Node.js` version 12.20 or newer Update guide - see: [https://update.angular.io](https://update.angular.io) ## Installation diff --git a/package.json b/package.json index b89f2a93f..a125e7dfa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@coreui/coreui-free-angular-admin-template", - "version": "2.11.3", - "description": "CoreUI Free Angular 11 Admin Template", + "version": "2.12.0", + "description": "CoreUI Free Angular 12 Admin Template", "author": { "name": "Łukasz Holeczek", "url": "http://holeczek.pl/", diff --git a/src/index.html b/src/index.html index b1a16bc7c..18fd307f7 100644 --- a/src/index.html +++ b/src/index.html @@ -1,7 +1,7 @@