Skip to content

Commit afda5a6

Browse files
committed
Merge branch 'v2-ng-12-update' into v2.12
2 parents b3d2bba + 7238ee1 commit afda5a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+313
-227
lines changed

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
### [@coreui/angular](https://coreui.io/) changelog
22

3+
##### `v2.12.0`
4+
5+
- update to `Angular 12.2`
6+
- refactor(library): typings, api surface
7+
- refactor(app): minor fixes
8+
9+
###### dependencies update
10+
- update `@angular/animations` to `^12.2.16`
11+
- update `@angular/common` to `^12.2.16`
12+
- update `@angular/compiler` to `^12.2.16`
13+
- update `@angular/core` to `^12.2.16`
14+
- update `@angular/forms` to `^12.2.16`
15+
- update `@angular/localize` to `^12.2.16`
16+
- update `@angular/platform-browser` to `^12.2.16`
17+
- update `@angular/platform-browser-dynamic` to `^12.2.16`
18+
- update `@angular/router` to `^12.2.16`
19+
- update `zone.js` to `~0.11.4`
20+
- update `@angular-devkit/build-angular` to `^12.2.16`
21+
- update `@angular/cli` to `^12.2.16`
22+
- update `@angular/compiler-cli` to `^12.2.16`
23+
- update `@angular/language-service` to `^12.2.16`
24+
- update `@types/jasminewd2` to `^2.0.10`
25+
- update `jasmine-spec-reporter` to `~7.0.0`
26+
- update `karma` to `^6.3.17`
27+
- update `ng-packagr` to `^12.2.7`
28+
- update `typescript` to `~4.3.5`
29+
330
##### `v2.11.3`
431

532
- ##### `update to Angular 11.2.14`

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [@coreui/angular](https://coreui.io/angular)
22

3-
![angular](https://img.shields.io/badge/angular-^11.2.0-lightgrey.svg?style=flat-square&logo=angular)
3+
![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular)
44
[![npm package][npm-coreui-angular-badge-v2]][npm-coreui-angular]
55
[![npm package][npm-coreui-angular-badge-latest]][npm-coreui-angular]
66
[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
@@ -21,7 +21,7 @@
2121
[npm-coreui-badge-v2]: https://img.shields.io/npm/v/@coreui/coreui/v2-lts?style=flat-square
2222
[npm-coreui-download]: https://img.shields.io/npm/dm/@coreui/coreui.svg?style=flat-square
2323

24-
# CoreUI for Angular 11 - Free WebApp UI Kit built on top of Bootstrap 4 [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?text=CoreUI%20-%20Free%20Bootstrap%204%20Admin%20Template%20&url=https://coreui.io&hashtags=,admin,template,dashboard,panel,free,angular,react,vue)
24+
# CoreUI for Angular 12 - Free WebApp UI Kit built on top of Bootstrap 4 [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?text=CoreUI%20-%20Free%20Bootstrap%204%20Admin%20Template%20&url=https://coreui.io&hashtags=,admin,template,dashboard,panel,free,angular,react,vue)
2525

2626
Please help us on [Product Hunt](https://www.producthunt.com/posts/coreui-open-source-bootstrap-4-admin-template-with-angular-2-react-js-vue-js-support) and [Designer News](https://www.designernews.co/stories/81127). Thanks in advance!
2727

@@ -55,7 +55,7 @@ CoreUI is an Open Source UI Kit built on top of Bootstrap 4. CoreUI is the faste
5555
Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager.
5656

5757
###### Node.js
58-
Angular 12 requires `Node.js` version 12.20.0 or later.
58+
Angular 12 requires `Node.js` version 12.20 or later.
5959

6060
- To check your version, run `node -v` in a terminal/console window.
6161
- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).

angular.json

+22-25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": false
5+
},
36
"version": 1,
47
"newProjectRoot": "projects",
58
"projects": {
@@ -26,14 +29,7 @@
2629
"node_modules/simple-line-icons/css/simple-line-icons.css",
2730
"src/scss/style.scss"
2831
],
29-
"scripts": [],
30-
"aot": false,
31-
"vendorChunk": true,
32-
"extractLicenses": false,
33-
"buildOptimizer": false,
34-
"sourceMap": true,
35-
"optimization": false,
36-
"namedChunks": true
32+
"scripts": []
3733
},
3834
"configurations": {
3935
"production": {
@@ -49,28 +45,30 @@
4945
"with": "src/environments/environment.prod.ts"
5046
}
5147
],
52-
"optimization": true,
53-
"outputHashing": "all",
54-
"sourceMap": false,
55-
"namedChunks": false,
56-
"aot": true,
57-
"extractLicenses": true,
58-
"vendorChunk": false,
59-
"buildOptimizer": true
48+
"outputHashing": "all"
49+
},
50+
"development": {
51+
"buildOptimizer": false,
52+
"optimization": false,
53+
"vendorChunk": true,
54+
"extractLicenses": false,
55+
"sourceMap": true,
56+
"namedChunks": true
6057
}
6158
},
62-
"defaultConfiguration": ""
59+
"defaultConfiguration": "production"
6360
},
6461
"serve": {
6562
"builder": "@angular-devkit/build-angular:dev-server",
66-
"options": {
67-
"browserTarget": "coreui:build"
68-
},
6963
"configurations": {
7064
"production": {
7165
"browserTarget": "coreui:build:production"
66+
},
67+
"development": {
68+
"browserTarget": "coreui:build:development"
7269
}
73-
}
70+
},
71+
"defaultConfiguration": "development"
7472
},
7573
"extract-i18n": {
7674
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -85,6 +83,7 @@
8583
"polyfills": "src/polyfills.ts",
8684
"tsConfig": "src/tsconfig.spec.json",
8785
"karmaConfig": "src/karma.conf.js",
86+
"inlineStyleLanguage": "scss",
8887
"styles": [
8988
"src/scss/style.scss"
9089
],
@@ -148,7 +147,8 @@
148147
"project": "projects/coreui/angular/ng-package.prod.json",
149148
"tsConfig": "projects/coreui/angular/tsconfig.lib.prod.json"
150149
}
151-
}
150+
},
151+
"defaultConfiguration": "production"
152152
},
153153
"test": {
154154
"builder": "@angular-devkit/build-angular:karma",
@@ -173,9 +173,6 @@
173173
}
174174
}
175175
},
176-
"cli": {
177-
"analytics": false
178-
},
179176
"defaultProject": "coreui",
180177
"schematics": {
181178
"@schematics/angular:component": {

e2e/src/app.po.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class AppDashboard {
1616
getBody() {
1717
return element(by.xpath('/html/body'));
1818
}
19-
getByCss(selector) {
19+
getByCss(selector: string) {
2020
return element.all(by.css(selector));
2121
}
2222

package.json

+23-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/angular-dev",
3-
"version": "2.11.3",
3+
"version": "2.12.0",
44
"license": "MIT",
55
"author": {
66
"name": "Łukasz Holeczek",
@@ -16,63 +16,62 @@
1616
],
1717
"scripts": {
1818
"ng": "ng",
19-
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
2019
"build-lib:dev": "ng build @coreui/angular --watch",
2120
"build-lib:prod": "ng build @coreui/angular --configuration production",
2221
"test-lib:dev": "ng test @coreui/angular",
2322
"test-lib:prod": "ng test @coreui/angular --karmaConfig=projects/coreui/angular/karma.conf.github.js",
24-
"prestart": "npm run postinstall",
2523
"start": "ng serve",
2624
"test": "ng test",
2725
"lint": "ng lint",
28-
"pree2e": "npm run postinstall",
2926
"e2e": "ng e2e",
27+
"prepublish": "ng test @coreui/angular --watch=false && ng e2e && ng build @coreui/angular --configuration production",
3028
"publish": "cd dist/@coreui/angular/ && npm publish --tag v2-lts --dry-run",
3129
"link": "cd dist/@coreui/angular/ && npm link",
3230
"release-version": "node build/change-version.js"
3331
},
3432
"private": true,
3533
"dependencies": {
36-
"@angular/animations": "^12.2.3",
37-
"@angular/common": "^12.2.3",
38-
"@angular/compiler": "^12.2.3",
39-
"@angular/core": "^12.2.3",
40-
"@angular/forms": "^12.2.3",
41-
"@angular/localize": "^12.2.3",
42-
"@angular/platform-browser": "^12.2.3",
43-
"@angular/platform-browser-dynamic": "^12.2.3",
44-
"@angular/router": "^12.2.3",
45-
"rxjs": "^6.6.3",
46-
"tslib": "^2.1.0",
34+
"@angular/animations": "^12.2.16",
35+
"@angular/common": "^12.2.16",
36+
"@angular/compiler": "^12.2.16",
37+
"@angular/core": "^12.2.16",
38+
"@angular/forms": "^12.2.16",
39+
"@angular/localize": "^12.2.16",
40+
"@angular/platform-browser": "^12.2.16",
41+
"@angular/platform-browser-dynamic": "^12.2.16",
42+
"@angular/router": "^12.2.16",
43+
"rxjs": "^6.6.7",
44+
"tslib": "^2.3.1",
4745
"zone.js": "~0.11.4"
4846
},
4947
"devDependencies": {
50-
"@angular-devkit/build-angular": "^12.2.3",
51-
"@angular/cli": "^12.2.3",
52-
"@angular/compiler-cli": "^12.2.3",
53-
"@angular/language-service": "^12.2.3",
48+
"@angular-devkit/build-angular": "^12.2.16",
49+
"@angular/cli": "^12.2.16",
50+
"@angular/compiler-cli": "^12.2.16",
51+
"@angular/language-service": "^12.2.16",
5452
"@coreui/coreui": "^2.1.16",
5553
"@types/jasmine": "^3.6.11",
54+
"@types/jasminewd2": "^2.0.10",
5655
"@types/node": "^14.18.12",
5756
"codelyzer": "^6.0.2",
5857
"jasmine-core": "~3.10.1",
59-
"jasmine-spec-reporter": "~5.0.2",
60-
"karma": "^6.3.4",
58+
"jasmine-spec-reporter": "~7.0.0",
59+
"karma": "^6.3.17",
6160
"karma-chrome-launcher": "~3.1.1",
6261
"karma-coverage": "~2.0.3",
6362
"karma-jasmine": "~4.0.1",
6463
"karma-jasmine-html-reporter": "^1.7.0",
65-
"ng-packagr": "^12.2.1",
64+
"ng-packagr": "^12.2.7",
6665
"ngx-perfect-scrollbar": "^10.1.1",
6766
"protractor": "~7.0.0",
6867
"shelljs": "^0.8.5",
6968
"simple-line-icons": "^2.5.5",
7069
"ts-node": "^9.1.1",
7170
"tslint": "~6.1.3",
72-
"typescript": "~4.3.8"
71+
"typescript": "~4.3.5"
7372
},
7473
"engines": {
75-
"node": ">= 10.19",
74+
"node": "^12.20.0 || >=14.0.0",
7675
"npm": ">= 6"
7776
}
7877
}

projects/coreui/angular/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [@coreui/angular](https://coreui.io/angular)
22

3-
![angular](https://img.shields.io/badge/angular-^11.2.0-lightgrey.svg?style=flat-square&logo=angular)
3+
![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular)
44
[![npm package][npm-coreui-angular-badge-v2]][npm-coreui-angular]
55
[![npm package][npm-coreui-angular-badge-latest]][npm-coreui-angular]
66
[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
@@ -29,18 +29,18 @@
2929
Before you begin, make sure your development environment includes `Node.js®` and an `npm` package manager.
3030

3131
###### Node.js
32-
Angular 11 requires `Node.js` version 10.19 or later.
32+
Angular 12 requires `Node.js` version 12.20 or later.
3333

3434
- To check your version, run `node -v` in a terminal/console window.
3535
- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).
3636

3737
###### Angular CLI
3838
Install the Angular CLI globally using a terminal/console window.
3939
```bash
40-
npm install -g @angular/cli
40+
npm install -g @angular/cli@12
4141
```
4242

43-
##### Update to Angular 11
43+
##### Update to Angular 12
4444
see: [https://update.angular.io](https://update.angular.io)
4545

4646
## CoreUI Installation

projects/coreui/angular/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@coreui/angular",
3-
"version": "2.11.3",
4-
"description": "CoreUI Angular 11 Bootstrap 4 components",
3+
"version": "2.12.0",
4+
"description": "CoreUI Angular 12 Bootstrap 4 components",
55
"license": "MIT",
66
"homepage": "https://coreui.io/angular",
77
"author": {
@@ -17,12 +17,12 @@
1717
}
1818
],
1919
"dependencies": {
20-
"tslib": "^2.0.0"
20+
"tslib": "^2.3.0"
2121
},
2222
"peerDependencies": {
23-
"@angular/common": "^11.0.0",
24-
"@angular/core": "^11.0.0",
25-
"@angular/router": "^11.0.0"
23+
"@angular/common": "^12.0.0",
24+
"@angular/core": "^12.0.0",
25+
"@angular/router": "^12.0.0"
2626
},
2727
"repository": {
2828
"type": "git",

projects/coreui/angular/src/lib/aside/app-aside.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { asideMenuCssClasses } from '../shared';
99
})
1010
export class AppAsideComponent implements OnInit, OnDestroy {
1111
@Input() display: any;
12-
@Input() fixed: boolean;
13-
@Input() offCanvas: boolean;
12+
@Input() fixed?: boolean;
13+
@Input() offCanvas?: boolean;
1414

1515
private readonly fixedClass = 'aside-menu-fixed';
1616

@@ -31,13 +31,13 @@ export class AppAsideComponent implements OnInit, OnDestroy {
3131
this.renderer.removeClass(this.document.body, this.fixedClass);
3232
}
3333

34-
isFixed(fixed: boolean = this.fixed): void {
34+
isFixed(fixed = this.fixed): void {
3535
if (fixed) {
3636
this.renderer.addClass(this.document.body, this.fixedClass);
3737
}
3838
}
3939

40-
isOffCanvas(offCanvas: boolean = this.offCanvas): void {
40+
isOffCanvas(offCanvas = this.offCanvas): void {
4141
if (offCanvas) {
4242
this.renderer.addClass(this.document.body, 'aside-menu-off-canvas');
4343
}

projects/coreui/angular/src/lib/aside/app-aside.module.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { AppAsideComponent } from './app-aside.component';
1010
LayoutModule
1111
],
1212
exports: [
13-
AppAsideComponent,
14-
LayoutModule
13+
AppAsideComponent
1514
],
1615
declarations: [
1716
AppAsideComponent

projects/coreui/angular/src/lib/breadcrumb/app-breadcrumb.component.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {DOCUMENT} from '@angular/common';
33

44
import {AppBreadcrumbService} from './app-breadcrumb.service';
55
import {Replace} from '../shared';
6+
import { Observable } from 'rxjs';
67

78
@Component({
89
selector: 'app-breadcrumb',
@@ -18,8 +19,8 @@ import {Replace} from '../shared';
1819
`
1920
})
2021
export class AppBreadcrumbComponent implements OnInit, OnDestroy {
21-
@Input() fixed: boolean;
22-
public breadcrumbs;
22+
@Input() fixed?: boolean;
23+
public breadcrumbs?: Observable<any>;
2324
private readonly fixedClass = 'breadcrumb-fixed';
2425

2526
constructor(
@@ -39,7 +40,7 @@ export class AppBreadcrumbComponent implements OnInit, OnDestroy {
3940
this.renderer.removeClass(this.document.body, this.fixedClass);
4041
}
4142

42-
isFixed(fixed: boolean = this.fixed): void {
43+
isFixed(fixed = this.fixed): void {
4344
if (fixed) {
4445
this.renderer.addClass(this.document.body, this.fixedClass);
4546
}

projects/coreui/angular/src/lib/breadcrumb/app-breadcrumb.service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export class AppBreadcrumbService {
2020
this.breadcrumbs = this.breadcrumbSubject.asObservable();
2121

2222
this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe((event) => {
23-
const breadcrumbs = [];
24-
let currentRoute = this.route.root;
23+
const breadcrumbs: any[] = [];
24+
let currentRoute: ActivatedRoute | null = this.route.root;
2525
let url = '';
2626
do {
2727
const childrenRoutes = currentRoute.children;

0 commit comments

Comments
 (0)