@mintplayer/ng-bootstrap 15.12.0 → 15.13.1

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.
Files changed (30) hide show
  1. package/esm2020/navbar/src/nav-link/nav-link.directive.mjs +10 -5
  2. package/esm2020/navbar/src/navbar-nav/navbar-nav.component.mjs +8 -5
  3. package/esm2020/navigation-lock/index.mjs +2 -0
  4. package/esm2020/navigation-lock/mintplayer-ng-bootstrap-navigation-lock.mjs +5 -0
  5. package/esm2020/navigation-lock/src/directive/navigation-lock.directive.mjs +94 -0
  6. package/esm2020/navigation-lock/src/guard/navigation-lock.guard.mjs +22 -0
  7. package/esm2020/navigation-lock/src/index.mjs +5 -0
  8. package/esm2020/navigation-lock/src/interface/has-navigation-lock.mjs +2 -0
  9. package/esm2020/navigation-lock/src/navigation-lock.module.mjs +28 -0
  10. package/esm2020/offcanvas/src/directives/offcanvas-push/offcanvas-push.directive.mjs +1 -2
  11. package/fesm2015/mintplayer-ng-bootstrap-navbar.mjs +16 -8
  12. package/fesm2015/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  13. package/fesm2015/mintplayer-ng-bootstrap-navigation-lock.mjs +148 -0
  14. package/fesm2015/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -0
  15. package/fesm2015/mintplayer-ng-bootstrap-offcanvas.mjs +0 -1
  16. package/fesm2015/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  17. package/fesm2020/mintplayer-ng-bootstrap-navbar.mjs +16 -8
  18. package/fesm2020/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  19. package/fesm2020/mintplayer-ng-bootstrap-navigation-lock.mjs +145 -0
  20. package/fesm2020/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -0
  21. package/fesm2020/mintplayer-ng-bootstrap-offcanvas.mjs +0 -1
  22. package/fesm2020/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  23. package/navbar/src/nav-link/nav-link.directive.d.ts +2 -1
  24. package/navigation-lock/index.d.ts +1 -0
  25. package/navigation-lock/src/directive/navigation-lock.directive.d.ts +34 -0
  26. package/navigation-lock/src/guard/navigation-lock.guard.d.ts +8 -0
  27. package/navigation-lock/src/index.d.ts +4 -0
  28. package/navigation-lock/src/interface/has-navigation-lock.d.ts +15 -0
  29. package/navigation-lock/src/navigation-lock.module.d.ts +9 -0
  30. package/package.json +9 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, HostListener, ViewChild, Input, Optional, ContentChildren, forwardRef, SkipSelf, Host, Inject, Directive, PLATFORM_ID, HostBinding, EventEmitter, Output, NgModule } from '@angular/core';
2
+ import { Component, HostListener, ViewChild, Input, Optional, ContentChildren, forwardRef, SkipSelf, Host, Inject, Directive, HostBinding, PLATFORM_ID, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { DOCUMENT, isPlatformServer, CommonModule } from '@angular/common';
5
5
  import * as i2$1 from '@mintplayer/ng-click-outside';
@@ -136,15 +136,18 @@ class BsNavbarNavComponent {
136
136
  this.isResizing$ = new BehaviorSubject(false);
137
137
  this.destroyed$ = new Subject();
138
138
  this.bsNavbar = bsNavbar;
139
- this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.windowWidth$])
140
- .pipe(filter(([isExpanded, windowWidth]) => {
139
+ this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.bsNavbar.expandAt$, this.windowWidth$])
140
+ .pipe(filter(([isExpanded, expandAt, windowWidth]) => {
141
141
  return windowWidth !== null;
142
142
  }))
143
- .pipe(map(([isExpanded, windowWidth]) => {
143
+ .pipe(map(([isExpanded, expandAt, windowWidth]) => {
144
144
  if (windowWidth === null) {
145
145
  throw 'windowWidth should not be null here';
146
146
  }
147
- else if (windowWidth >= 768) {
147
+ else if (expandAt === null) {
148
+ return false;
149
+ }
150
+ else if (windowWidth >= expandAt) {
148
151
  return true;
149
152
  }
150
153
  else if (isExpanded) {
@@ -369,6 +372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
369
372
  class NavLinkDirective {
370
373
  constructor(elementRef, parentDropdown) {
371
374
  this.elementRef = elementRef;
375
+ this.cursorPointer = true;
372
376
  if (parentDropdown == null) {
373
377
  this.elementRef.nativeElement.classList.add('nav-link');
374
378
  }
@@ -378,18 +382,22 @@ class NavLinkDirective {
378
382
  }
379
383
  }
380
384
  NavLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavLinkDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
381
- NavLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
385
+ NavLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: NavLinkDirective, selector: "bs-navbar-item:first-child > a", host: { properties: { "class.cursor-pointer": "this.cursorPointer" } }, ngImport: i0 });
382
386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NavLinkDirective, decorators: [{
383
387
  type: Directive,
384
388
  args: [{
385
- selector: 'bs-navbar-item > a[routerLink]'
389
+ // selector: 'bs-navbar-item > a[routerLink]'
390
+ selector: 'bs-navbar-item:first-child > a'
386
391
  }]
387
392
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarDropdownComponent, decorators: [{
388
393
  type: Optional
389
394
  }, {
390
395
  type: Inject,
391
396
  args: [forwardRef(() => BsNavbarDropdownComponent)]
392
- }] }]; } });
397
+ }] }]; }, propDecorators: { cursorPointer: [{
398
+ type: HostBinding,
399
+ args: ['class.cursor-pointer']
400
+ }] } });
393
401
 
394
402
  class BsNavbarContentDirective {
395
403
  constructor(element, platformId) {