@mintplayer/ng-bootstrap 13.1.9 → 13.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +9 -6
- package/esm2020/lib/components/navbar/navbar-nav/navbar-nav.component.mjs +46 -9
- package/fesm2015/mintplayer-ng-bootstrap.mjs +51 -13
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +51 -13
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/navbar/navbar/navbar.component.d.ts +3 -3
- package/lib/components/navbar/navbar-nav/navbar-nav.component.d.ts +10 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
6
6
|
import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
|
|
7
|
-
import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest } from 'rxjs';
|
|
7
|
+
import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest, debounceTime } from 'rxjs';
|
|
8
8
|
import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
|
|
9
9
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
10
10
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
@@ -1406,44 +1406,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1406
1406
|
|
|
1407
1407
|
class BsNavbarComponent {
|
|
1408
1408
|
constructor() {
|
|
1409
|
-
this.isExpanded = false;
|
|
1409
|
+
this.isExpanded$ = new BehaviorSubject(false);
|
|
1410
1410
|
}
|
|
1411
1411
|
toggleExpanded() {
|
|
1412
|
-
this.isExpanded
|
|
1412
|
+
this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
|
|
1413
|
+
this.isExpanded$.next(!isExpanded);
|
|
1414
|
+
});
|
|
1413
1415
|
}
|
|
1414
1416
|
}
|
|
1415
1417
|
BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1416
|
-
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarComponent, selector: "bs-navbar", viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\"
|
|
1418
|
+
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarComponent, selector: "bs-navbar", viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] });
|
|
1417
1419
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
|
|
1418
1420
|
type: Component,
|
|
1419
|
-
args: [{ selector: 'bs-navbar', template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\"
|
|
1420
|
-
}],
|
|
1421
|
+
args: [{ selector: 'bs-navbar', template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] }]
|
|
1422
|
+
}], propDecorators: { nav: [{
|
|
1421
1423
|
type: ViewChild,
|
|
1422
1424
|
args: ['nav']
|
|
1423
1425
|
}] } });
|
|
1424
1426
|
|
|
1425
1427
|
class BsNavbarNavComponent {
|
|
1426
1428
|
constructor(bsNavbar) {
|
|
1427
|
-
|
|
1428
|
-
this.
|
|
1429
|
+
this.collapse$ = new BehaviorSubject(true);
|
|
1430
|
+
this.windowWidth$ = new BehaviorSubject(null);
|
|
1431
|
+
this.isResizing$ = new BehaviorSubject(false);
|
|
1432
|
+
this.destroyed$ = new Subject();
|
|
1429
1433
|
this.bsNavbar = bsNavbar;
|
|
1434
|
+
this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.windowWidth$])
|
|
1435
|
+
.pipe(filter(([isExpanded, windowWidth]) => {
|
|
1436
|
+
return windowWidth !== null;
|
|
1437
|
+
}))
|
|
1438
|
+
.pipe(map(([isExpanded, windowWidth]) => {
|
|
1439
|
+
if (windowWidth === null) {
|
|
1440
|
+
throw 'windowWidth should not be null here';
|
|
1441
|
+
}
|
|
1442
|
+
else if (windowWidth >= 768) {
|
|
1443
|
+
return true;
|
|
1444
|
+
}
|
|
1445
|
+
else if (isExpanded) {
|
|
1446
|
+
return true;
|
|
1447
|
+
}
|
|
1448
|
+
else {
|
|
1449
|
+
return false;
|
|
1450
|
+
}
|
|
1451
|
+
}));
|
|
1452
|
+
this.windowWidth$
|
|
1453
|
+
.pipe(debounceTime(300), takeUntil(this.destroyed$))
|
|
1454
|
+
.subscribe(() => {
|
|
1455
|
+
this.isResizing$.next(false);
|
|
1456
|
+
});
|
|
1457
|
+
this.onWindowResize();
|
|
1430
1458
|
}
|
|
1431
|
-
|
|
1459
|
+
ngOnDestroy() {
|
|
1460
|
+
this.destroyed$.next(true);
|
|
1432
1461
|
}
|
|
1462
|
+
//#region collapse
|
|
1433
1463
|
set collapse(value) {
|
|
1434
|
-
this.
|
|
1464
|
+
this.collapse$.next(value);
|
|
1435
1465
|
}
|
|
1436
1466
|
get collapse() {
|
|
1437
|
-
return this.
|
|
1467
|
+
return this.collapse$.value;
|
|
1468
|
+
}
|
|
1469
|
+
//#endregion
|
|
1470
|
+
onWindowResize() {
|
|
1471
|
+
this.isResizing$.next(true);
|
|
1472
|
+
this.windowWidth$.next(window.innerWidth);
|
|
1438
1473
|
}
|
|
1439
1474
|
}
|
|
1440
1475
|
BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
1441
|
-
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, ngImport: i0, template: "<div class=\"navbar-collapse
|
|
1476
|
+
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<div class=\"navbar-collapse w-100 show\" [class.collapse]=\"collapse$ | async\" *ngIf=\"showNavs$ | async\" [@slideUpDown] [@.disabled]=\"isResizing$ | async\">\n <ul class=\"navbar-nav mr-auto\">\n <ng-content></ng-content>\n </ul>\n</div>", styles: [":host{margin-right:auto}@media screen and (max-width: 767px){:host{width:100%!important}.navbar-collapse.collapse{overflow:hidden}}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe }, animations: [SlideUpDownAnimation] });
|
|
1442
1477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
|
|
1443
1478
|
type: Component,
|
|
1444
|
-
args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse
|
|
1479
|
+
args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse w-100 show\" [class.collapse]=\"collapse$ | async\" *ngIf=\"showNavs$ | async\" [@slideUpDown] [@.disabled]=\"isResizing$ | async\">\n <ul class=\"navbar-nav mr-auto\">\n <ng-content></ng-content>\n </ul>\n</div>", styles: [":host{margin-right:auto}@media screen and (max-width: 767px){:host{width:100%!important}.navbar-collapse.collapse{overflow:hidden}}\n"] }]
|
|
1445
1480
|
}], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
|
|
1446
1481
|
type: Input
|
|
1482
|
+
}], onWindowResize: [{
|
|
1483
|
+
type: HostListener,
|
|
1484
|
+
args: ['window:resize']
|
|
1447
1485
|
}] } });
|
|
1448
1486
|
|
|
1449
1487
|
class BsNavbarItemComponent {
|