Skip to content

Commit 39765f0

Browse files
author
unknown
committed
1.0.0-beta8
1 parent c200cb5 commit 39765f0

File tree

10 files changed

+89
-17
lines changed

10 files changed

+89
-17
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
## 1.0.0-beta8 (12.07.2021)
2+
3+
In this version we introduced some breaking changes, please check `Breaking changes` section and update your application accordingly.
4+
5+
### Breaking changes:
6+
7+
- Popover - `[template]` input will now accept value of type `TemplateRef` and can be used to display `ng-template` content.
8+
9+
### Fixes and improvements:
10+
11+
- Toast - component will no longer throw error after reopening,
12+
- Toast - stacked components will now slide up automatically,
13+
- Sidenav - resolved problem with auto expand when route has route parameters,
14+
- Dropdown - opened menu will be now correctly destroyed on route change,
15+
- Table pagination - resolved problem with data automatic updates after change in `[entryOptions]` input.
16+
17+
### New components:
18+
19+
- [Popconfirm](https://mdbootstrap.com/docs/b5/angular/components/popconfirm/)
20+
- [Lazy loading](https://mdbootstrap.com/docs/b5/angular/methods/lazy-loading/)
21+
- [Loading management](https://mdbootstrap.com/docs/b5/angular/methods/loading-management/)
22+
23+
### New features:
24+
25+
- Popover - `[template]` input will now accept value of type `TemplateRef` and can be used to display `ng-template` content.
26+
27+
---
28+
129
## 1.0.0-beta7 (28.06.2021)
230

331
In this version we introduced some breaking changes, please check `Breaking changes` section and update your application accordingly.

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MDB 5 Angular
22

3-
Version: FREE 1.0.0 Beta 5
3+
Version: FREE 1.0.0 Beta 8
44

55
Documentation:
66
https://mdbootstrap.com/docs/b5/angular/

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-angular-ui-kit-free",
3-
"version": "1.0.0-beta7",
3+
"version": "1.0.0-beta8",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/mdb-angular-ui-kit/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
## 1.0.0-beta8 (12.07.2021)
2+
3+
In this version we introduced some breaking changes, please check `Breaking changes` section and update your application accordingly.
4+
5+
### Breaking changes:
6+
7+
- Popover - `[template]` input will now accept value of type `TemplateRef` and can be used to display `ng-template` content.
8+
9+
### Fixes and improvements:
10+
11+
- Toast - component will no longer throw error after reopening,
12+
- Toast - stacked components will now slide up automatically,
13+
- Sidenav - resolved problem with auto expand when route has route parameters,
14+
- Dropdown - opened menu will be now correctly destroyed on route change,
15+
- Table pagination - resolved problem with data automatic updates after change in `[entryOptions]` input.
16+
17+
### New components:
18+
19+
- [Popconfirm](https://mdbootstrap.com/docs/b5/angular/components/popconfirm/)
20+
- [Lazy loading](https://mdbootstrap.com/docs/b5/angular/methods/lazy-loading/)
21+
- [Loading management](https://mdbootstrap.com/docs/b5/angular/methods/loading-management/)
22+
23+
### New features:
24+
25+
- Popover - `[template]` input will now accept value of type `TemplateRef` and can be used to display `ng-template` content.
26+
27+
---
28+
129
## 1.0.0-beta7 (28.06.2021)
230

331
In this version we introduced some breaking changes, please check `Breaking changes` section and update your application accordingly.

projects/mdb-angular-ui-kit/dropdown/dropdown.directive.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ export class MdbDropdownDirective implements OnDestroy, AfterContentInit {
9393
}
9494

9595
ngOnDestroy(): void {
96+
if (this._overlayRef) {
97+
this._overlayRef.detach();
98+
this._overlayRef.dispose();
99+
}
100+
96101
this._destroy$.next();
97102
this._destroy$.complete();
98103
}
@@ -128,9 +133,8 @@ export class MdbDropdownDirective implements OnDestroy, AfterContentInit {
128133
this._isDropUp = this._elementRef.nativeElement.classList.contains('dropup');
129134
this._isDropStart = this._elementRef.nativeElement.classList.contains('dropstart');
130135
this._isDropEnd = this._elementRef.nativeElement.classList.contains('dropend');
131-
this._isDropdownMenuEnd = this._dropdownMenu.nativeElement.classList.contains(
132-
'dropdown-menu-end'
133-
);
136+
this._isDropdownMenuEnd =
137+
this._dropdownMenu.nativeElement.classList.contains('dropdown-menu-end');
134138
this._xPosition = this._isDropdownMenuEnd ? 'end' : 'start';
135139

136140
const regex = new RegExp(/dropdown-menu-(sm|md|lg|xl|xxl)-(start|end)/, 'g');

projects/mdb-angular-ui-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"repository": "https://github.com/mdbootstrap/mdb-angular-ui-kit",
44
"author": "MDBootstrap",
55
"license": "MIT",
6-
"version": "1.0.0-beta7",
6+
"version": "1.0.0-beta8",
77
"peerDependencies": {
88
"@angular/common": "^12.0.0",
99
"@angular/core": "^12.0.0",

projects/mdb-angular-ui-kit/popover/popover.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
<div *ngIf="title" class="popover-header">
88
{{ title }}
99
</div>
10-
<div *ngIf="template" [innerHTML]="content" class="popover-body"></div>
11-
<div *ngIf="!template" class="popover-body">
10+
<div *ngIf="isContentTemplate" class="popover-body">
11+
<ng-container [ngTemplateOutlet]="content"></ng-container>
12+
</div>
13+
<div *ngIf="!isContentTemplate" class="popover-body">
1214
{{ content }}
1315
</div>
1416
</div>

projects/mdb-angular-ui-kit/popover/popover.component.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input } from '@angular/core';
1+
import {
2+
ChangeDetectionStrategy,
3+
ChangeDetectorRef,
4+
Component,
5+
Input,
6+
TemplateRef,
7+
} from '@angular/core';
28
import { trigger, style, animate, transition, state, AnimationEvent } from '@angular/animations';
39
import { Subject } from 'rxjs';
410
@Component({
@@ -16,10 +22,13 @@ import { Subject } from 'rxjs';
1622
})
1723
export class MdbPopoverComponent {
1824
@Input() title: string;
19-
@Input() content: string;
20-
@Input() template: boolean;
25+
@Input() content: string | TemplateRef<any>;
2126
@Input() animation: boolean;
2227

28+
get isContentTemplate(): boolean {
29+
return this.content instanceof TemplateRef;
30+
}
31+
2332
readonly _hidden: Subject<void> = new Subject();
2433

2534
animationState = 'hidden';

projects/mdb-angular-ui-kit/popover/popover.directive.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {
77
OnDestroy,
88
OnInit,
99
Output,
10+
TemplateRef,
11+
ViewContainerRef,
1012
} from '@angular/core';
1113
import {
1214
ConnectedPosition,
@@ -15,7 +17,7 @@ import {
1517
OverlayPositionBuilder,
1618
OverlayRef,
1719
} from '@angular/cdk/overlay';
18-
import { ComponentPortal } from '@angular/cdk/portal';
20+
import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
1921
import { MdbPopoverComponent } from './popover.component';
2022
import { fromEvent, Subject } from 'rxjs';
2123
import { first, takeUntil } from 'rxjs/operators';
@@ -31,7 +33,7 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
3133
@Input() mdbPopoverTitle = '';
3234
@Input() popoverDisabled = false;
3335
@Input() placement = 'top';
34-
@Input() template = false;
36+
@Input() template: TemplateRef<any>;
3537
@Input() animation = true;
3638
@Input() trigger = 'click';
3739
@Input() delayShow = 0;
@@ -186,12 +188,11 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
186188
this._open = true;
187189

188190
this._tooltipRef = this._overlayRef.attach(tooltipPortal);
189-
this._tooltipRef.instance.content = this.mdbPopover;
191+
192+
this._tooltipRef.instance.content = this.template || this.mdbPopover;
190193
this._tooltipRef.instance.title = this.mdbPopoverTitle;
191-
this._tooltipRef.instance.template = this.template;
192194
this._tooltipRef.instance.animation = this.animation;
193195
this._tooltipRef.instance.animationState = 'visible';
194-
195196
this._tooltipRef.instance.markForCheck();
196197

197198
this.popoverShown.emit(this);

0 commit comments

Comments
 (0)