Skip to content

Commit c448050

Browse files
authored
Merge pull request #168 from coreui/dev-v2.7.2
v2.7.2
2 parents 5337769 + 61059cc commit c448050

File tree

10 files changed

+169
-21
lines changed

10 files changed

+169
-21
lines changed

CHANGELOG.md

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

3+
###### `v2.7.2`
4+
- feat: add missing Navbars example - thanks @EliasDerHai
5+
6+
###### dependencies update
7+
- update `@angular/animations` to `^9.0.0-rc.7`
8+
- update `@angular/common` to `^9.0.0-rc.7`
9+
- update `@angular/compiler` to `^9.0.0-rc.7`
10+
- update `@angular/core` to `^9.0.0-rc.7`
11+
- update `@angular/forms` to `^9.0.0-rc.7`
12+
- update `@angular/platform-browser` to `^9.0.0-rc.7`
13+
- update `@angular/platform-browser-dynamic` to `^9.0.0-rc.7`
14+
- update `@angular/router` to `^9.0.0-rc.7`
15+
- update `@coreui/angular` to `^2.7.2`
16+
- update `core-js` to `^2.6.11`
17+
- update `@angular-devkit/build-angular` to `^0.900.0-rc.7`
18+
- update `@angular/cli` to `^9.0.0-rc.7`
19+
- update `@angular/compiler-cli` to `^9.0.0-rc.7`
20+
- update `@angular/language-service` to `^9.0.0-rc.7`
21+
- update `codelyzer` to `^5.2.1`
22+
323
###### `v2.7.0` for Angular 9
424
- chore: upgrade to Angular 9 - see also:
525
- `https://next.angular.io/guide/updating-to-version-9`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![@coreui coreui](https://img.shields.io/badge/@coreui%20-coreui-lightgrey.svg?style=flat-square)](https://github.com/coreui/coreui)
55
[![npm package][npm-coreui-badge]][npm-coreui]
66
[![NPM downloads][npm-coreui-download]][npm-coreui]
7-
![angular](https://img.shields.io/badge/angular-^9.0.0%20rc.0-lightgrey.svg?style=flat-square)
7+
![angular](https://img.shields.io/badge/angular-^9.0.0--rc.7-lightgrey.svg?style=flat-square&logo=angular)
88

99
[npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular
1010
[npm-coreui-angular-badge]: https://img.shields.io/npm/v/@coreui/angular.png?style=flat-square

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/coreui-free-angular-admin-template",
3-
"version": "2.7.0",
3+
"version": "2.7.2",
44
"description": "CoreUI Free Angular 2+ Admin Template",
55
"author": {
66
"name": "Łukasz Holeczek",
@@ -28,21 +28,21 @@
2828
},
2929
"private": true,
3030
"dependencies": {
31-
"@angular/animations": "^9.0.0-rc.0",
32-
"@angular/common": "^9.0.0-rc.0",
33-
"@angular/compiler": "^9.0.0-rc.0",
34-
"@angular/core": "^9.0.0-rc.0",
35-
"@angular/forms": "^9.0.0-rc.0",
36-
"@angular/platform-browser": "^9.0.0-rc.0",
37-
"@angular/platform-browser-dynamic": "^9.0.0-rc.0",
38-
"@angular/router": "^9.0.0-rc.0",
39-
"@coreui/angular": "^2.7.0",
31+
"@angular/animations": "^9.0.0-rc.7",
32+
"@angular/common": "^9.0.0-rc.7",
33+
"@angular/compiler": "^9.0.0-rc.7",
34+
"@angular/core": "^9.0.0-rc.7",
35+
"@angular/forms": "^9.0.0-rc.7",
36+
"@angular/platform-browser": "^9.0.0-rc.7",
37+
"@angular/platform-browser-dynamic": "^9.0.0-rc.7",
38+
"@angular/router": "^9.0.0-rc.7",
39+
"@coreui/angular": "^2.7.2",
4040
"@coreui/coreui": "^2.1.16",
4141
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1",
4242
"@coreui/icons": "0.3.0",
4343
"bootstrap": "^4.3.1",
4444
"chart.js": "^2.9.2",
45-
"core-js": "^2.6.10",
45+
"core-js": "^2.6.11",
4646
"flag-icon-css": "^3.4.5",
4747
"font-awesome": "^4.7.0",
4848
"moment": "^2.24.0",
@@ -58,14 +58,14 @@
5858
"zone.js": "~0.10.2"
5959
},
6060
"devDependencies": {
61-
"@angular-devkit/build-angular": "~0.900.0-rc.0",
62-
"@angular/cli": "^9.0.0-rc.0",
63-
"@angular/compiler-cli": "^9.0.0-rc.0",
64-
"@angular/language-service": "^9.0.0-rc.0",
61+
"@angular-devkit/build-angular": "^0.900.0-rc.7",
62+
"@angular/cli": "^9.0.0-rc.7",
63+
"@angular/compiler-cli": "^9.0.0-rc.7",
64+
"@angular/language-service": "^9.0.0-rc.7",
6565
"@types/jasmine": "^3.4.5",
6666
"@types/jasminewd2": "^2.0.8",
6767
"@types/node": "^12.11.1",
68-
"codelyzer": "^5.1.2",
68+
"codelyzer": "^5.2.1",
6969
"jasmine-core": "^3.5.0",
7070
"jasmine-spec-reporter": "^4.2.1",
7171
"karma": "^4.4.1",

src/app/_nav.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ export const navItems: INavData[] = [
5353
url: '/base/forms',
5454
icon: 'icon-puzzle'
5555
},
56+
{
57+
name: 'Navbars',
58+
url: '/base/navbars',
59+
icon: 'icon-puzzle'
60+
61+
},
5662
{
5763
name: 'Pagination',
5864
url: '/base/paginations',

src/app/views/base/base-routing.module.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import { TabsComponent } from './tabs.component';
99
import { CarouselsComponent } from './carousels.component';
1010
import { CollapsesComponent } from './collapses.component';
1111
import { PaginationsComponent } from './paginations.component';
12-
import {PopoversComponent} from './popovers.component';
13-
import {ProgressComponent} from './progress.component';
14-
import {TooltipsComponent} from './tooltips.component';
12+
import { PopoversComponent } from './popovers.component';
13+
import { ProgressComponent } from './progress.component';
14+
import { TooltipsComponent } from './tooltips.component';
15+
import { NavbarsComponent } from './navbars/navbars.component';
1516

1617
const routes: Routes = [
1718
{
@@ -100,6 +101,13 @@ const routes: Routes = [
100101
data: {
101102
title: 'Tooltips'
102103
}
104+
},
105+
{
106+
path: 'navbars',
107+
component: NavbarsComponent,
108+
data: {
109+
title: 'Navbars'
110+
}
103111
}
104112
]
105113
}

src/app/views/base/base.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ import { ProgressComponent } from './progress.component';
4242
import { TooltipModule } from 'ngx-bootstrap/tooltip';
4343
import { TooltipsComponent } from './tooltips.component';
4444

45+
// navbars
46+
import { NavbarsComponent } from './navbars/navbars.component';
4547

4648
// Components Routing
4749
import { BaseRoutingModule } from './base-routing.module';
@@ -71,7 +73,8 @@ import { BaseRoutingModule } from './base-routing.module';
7173
PaginationsComponent,
7274
PopoversComponent,
7375
ProgressComponent,
74-
TooltipsComponent
76+
TooltipsComponent,
77+
NavbarsComponent
7578
]
7679
})
7780
export class BaseModule { }

src/app/views/base/navbars/navbars.component.css

Whitespace-only changes.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<div class="animated fadeIn">
2+
<div class="row">
3+
<div class="col">
4+
<div class="card">
5+
<div class="card-header">
6+
Bootstrap Navbar
7+
</div>
8+
<div class="card-body">
9+
<nav class="navbar navbar-expand-lg navbar-light bg-light">
10+
<a class="navbar-brand" href="#">Navbar</a>
11+
<button aria-controls="navbarSupportedContent" (click)="isCollapsed = !isCollapsed" [attr.aria-expanded]="!isCollapsed" class="navbar-toggler" type="button" aria-label="Toggle navigation">
12+
<span class="navbar-toggler-icon"></span>
13+
</button>
14+
15+
<div class="collapse navbar-collapse" id="navbarSupportedContent" [collapse]="isCollapsed" [isAnimated]="true">
16+
<ul class="navbar-nav mr-auto">
17+
<li class="nav-item active">
18+
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
19+
</li>
20+
<li class="nav-item">
21+
<a class="nav-link" href="#">Link</a>
22+
</li>
23+
<li class="nav-item dropdown" dropdown>
24+
<a id="link-dropdown" class="nav-link dropdown-toggle" href dropdownToggle (click)="false" aria-controls="your-dropdown">
25+
Dropdown
26+
</a>
27+
<div id="your-dropdown" class="dropdown-menu" aria-labelledby="link-dropdown" *dropdownMenu>
28+
<a class="dropdown-item" href="#">Action</a>
29+
<a class="dropdown-item" href="#">Another action</a>
30+
<div class="dropdown-divider"></div>
31+
<a class="dropdown-item" href="#">Something else here</a>
32+
</div>
33+
</li>
34+
<li class="nav-item">
35+
<a class="nav-link disabled" href="#">Disabled</a>
36+
</li>
37+
</ul>
38+
<form class="form-inline my-2 my-lg-0">
39+
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
40+
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
41+
</form>
42+
</div>
43+
</nav>
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { NavbarsComponent } from './navbars.component';
4+
5+
describe('NavbarsComponent', () => {
6+
let component: NavbarsComponent;
7+
let fixture: ComponentFixture<NavbarsComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ NavbarsComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(NavbarsComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {AfterViewChecked, Component, ElementRef, OnInit, Renderer2, ViewChild} from '@angular/core';
2+
import {CollapseDirective} from 'ngx-bootstrap';
3+
4+
@Component({
5+
selector: 'app-navbars',
6+
templateUrl: './navbars.component.html',
7+
styleUrls: ['./navbars.component.css']
8+
})
9+
export class NavbarsComponent implements OnInit, AfterViewChecked {
10+
11+
private _isCollapsed: boolean = true;
12+
set isCollapsed(value) {
13+
this._isCollapsed = value;
14+
}
15+
get isCollapsed() {
16+
if (this.collapseRef) {
17+
// temp fix for "overflow: hidden"
18+
if (getComputedStyle(this.collapseRef.nativeElement).getPropertyValue('display') === 'flex') {
19+
this.renderer.removeStyle(this.collapseRef.nativeElement, 'overflow');
20+
}
21+
}
22+
return this._isCollapsed;
23+
}
24+
25+
@ViewChild(CollapseDirective, { read: ElementRef, static: false }) collapse !: CollapseDirective;
26+
27+
collapseRef;
28+
29+
constructor(
30+
private renderer: Renderer2,
31+
) { }
32+
33+
ngOnInit() {}
34+
35+
ngAfterViewChecked (): void {
36+
this.collapseRef = this.collapse;
37+
}
38+
}

0 commit comments

Comments
 (0)