@mintplayer/ng-bootstrap 12.0.0 → 12.0.2

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 (47) hide show
  1. package/bundles/mintplayer-ng-bootstrap.umd.js +339 -34
  2. package/bundles/mintplayer-ng-bootstrap.umd.js.map +1 -1
  3. package/esm2015/lib/components/carousel/carousel/carousel.component.js +70 -0
  4. package/esm2015/lib/components/carousel/carousel/carousel.component.js.map +1 -0
  5. package/esm2015/lib/components/carousel/carousel-image/carousel-image.directive.js +14 -0
  6. package/esm2015/lib/components/carousel/carousel-image/carousel-image.directive.js.map +1 -0
  7. package/esm2015/lib/components/carousel/carousel.module.js +31 -0
  8. package/esm2015/lib/components/carousel/carousel.module.js.map +1 -0
  9. package/esm2015/lib/components/carousel/index.js +4 -0
  10. package/esm2015/lib/components/carousel/index.js.map +1 -0
  11. package/esm2015/lib/components/index.js +1 -0
  12. package/esm2015/lib/components/index.js.map +1 -1
  13. package/esm2015/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.js +38 -0
  14. package/esm2015/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.js.map +1 -0
  15. package/esm2015/lib/components/navbar/index.js +4 -0
  16. package/esm2015/lib/components/navbar/index.js.map +1 -1
  17. package/esm2015/lib/components/navbar/nav-link/nav-link.directive.js +29 -0
  18. package/esm2015/lib/components/navbar/nav-link/nav-link.directive.js.map +1 -0
  19. package/esm2015/lib/components/navbar/navbar/navbar.component.js +8 -6
  20. package/esm2015/lib/components/navbar/navbar/navbar.component.js.map +1 -1
  21. package/esm2015/lib/components/navbar/navbar-content/navbar-content.directive.js +33 -0
  22. package/esm2015/lib/components/navbar/navbar-content/navbar-content.directive.js.map +1 -0
  23. package/esm2015/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.js +26 -5
  24. package/esm2015/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.js.map +1 -1
  25. package/esm2015/lib/components/navbar/navbar-item/navbar-item.component.js +38 -5
  26. package/esm2015/lib/components/navbar/navbar-item/navbar-item.component.js.map +1 -1
  27. package/esm2015/lib/components/navbar/navbar-nav/navbar-nav.component.js +22 -6
  28. package/esm2015/lib/components/navbar/navbar-nav/navbar-nav.component.js.map +1 -1
  29. package/esm2015/lib/components/navbar/navbar.module.js +29 -6
  30. package/esm2015/lib/components/navbar/navbar.module.js.map +1 -1
  31. package/fesm2015/mintplayer-ng-bootstrap.js +308 -32
  32. package/fesm2015/mintplayer-ng-bootstrap.js.map +1 -1
  33. package/lib/components/carousel/carousel/carousel.component.d.ts +18 -0
  34. package/lib/components/carousel/carousel-image/carousel-image.directive.d.ts +6 -0
  35. package/lib/components/carousel/carousel.module.d.ts +9 -0
  36. package/lib/components/carousel/index.d.ts +3 -0
  37. package/lib/components/index.d.ts +1 -0
  38. package/lib/components/navbar/dropdown-toggle/dropdown-toggle.directive.d.ts +13 -0
  39. package/lib/components/navbar/index.d.ts +3 -0
  40. package/lib/components/navbar/nav-link/nav-link.directive.d.ts +9 -0
  41. package/lib/components/navbar/navbar/navbar.component.d.ts +5 -4
  42. package/lib/components/navbar/navbar-content/navbar-content.directive.d.ts +14 -0
  43. package/lib/components/navbar/navbar-dropdown/navbar-dropdown.component.d.ts +10 -4
  44. package/lib/components/navbar/navbar-item/navbar-item.component.d.ts +12 -5
  45. package/lib/components/navbar/navbar-nav/navbar-nav.component.d.ts +7 -2
  46. package/lib/components/navbar/navbar.module.d.ts +7 -2
  47. package/package.json +5 -2
@@ -1,8 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Injectable, Pipe, ContentChildren, TemplateRef, ContentChild } from '@angular/core';
2
+ import { Component, Input, NgModule, Injectable, Pipe, Directive, ElementRef, ContentChildren, ViewChild, Optional, SkipSelf, Host, forwardRef, Inject, TemplateRef, ContentChild } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { SlideUpDownAnimation } from '@mintplayer/ng-animations';
5
+ import { FadeInOutAnimation, CarouselSlideAnimation, SlideUpDownAnimation } from '@mintplayer/ng-animations';
6
+ import { Subject, BehaviorSubject } from 'rxjs';
7
+ import { map, takeUntil, take } from 'rxjs/operators';
8
+ import { RouterModule } from '@angular/router';
9
+ import * as i2 from '@mintplayer/ng-click-outside';
10
+ import { ClickOutsideModule } from '@mintplayer/ng-click-outside';
6
11
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
12
 
8
13
  var Color;
@@ -417,6 +422,107 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
417
422
  }]
418
423
  }] });
419
424
 
425
+ class BsCarouselImageDirective {
426
+ constructor() { }
427
+ }
428
+ BsCarouselImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
429
+ BsCarouselImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: BsCarouselImageDirective, selector: "img[bsCarouselImage]", ngImport: i0 });
430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselImageDirective, decorators: [{
431
+ type: Directive,
432
+ args: [{
433
+ selector: 'img[bsCarouselImage]'
434
+ }]
435
+ }], ctorParameters: function () { return []; } });
436
+
437
+ class BsCarouselComponent {
438
+ constructor() {
439
+ this.destroyed$ = new Subject();
440
+ this.currentImageIndex$ = new BehaviorSubject(-1);
441
+ this.currentImage$ = this.currentImageIndex$
442
+ .pipe(map((index) => { var _a; return (_a = this.images.get(index)) !== null && _a !== void 0 ? _a : null; }))
443
+ .pipe(takeUntil(this.destroyed$));
444
+ }
445
+ ngOnInit() { }
446
+ ngOnDestroy() {
447
+ this.destroyed$.next(true);
448
+ }
449
+ ngAfterContentInit() {
450
+ if (this.images.length > 0) {
451
+ this.currentImageIndex$.next(0);
452
+ }
453
+ else {
454
+ this.currentImageIndex$.next(-1);
455
+ }
456
+ }
457
+ previousImage() {
458
+ this.currentImageIndex$
459
+ .pipe(take(1))
460
+ .subscribe((currentImageIndex) => {
461
+ if (currentImageIndex === 0) {
462
+ this.currentImageIndex$.next(this.images.length - 1);
463
+ }
464
+ else {
465
+ this.currentImageIndex$.next(currentImageIndex - 1);
466
+ }
467
+ });
468
+ }
469
+ nextImage() {
470
+ this.currentImageIndex$
471
+ .pipe(take(1))
472
+ .subscribe((currentImageIndex) => {
473
+ if (currentImageIndex >= this.images.length - 1) {
474
+ this.currentImageIndex$.next(0);
475
+ }
476
+ else {
477
+ this.currentImageIndex$.next(currentImageIndex + 1);
478
+ }
479
+ });
480
+ }
481
+ setCurrentImage(index) {
482
+ this.currentImageIndex$.next(index);
483
+ }
484
+ }
485
+ BsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
486
+ BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsCarouselComponent, selector: "bs-carousel", queries: [{ propertyName: "images", predicate: BsCarouselImageDirective, read: ElementRef }], ngImport: i0, template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\" data-bs-target\n [class.active]=\"(currentImageIndex$ | async) === i\"\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageIndex$ | async\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <!-- @fadeInOut -->\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <img [src]=\"image.nativeElement.src\" class=\"d-block\" [attr.alt]=\"image.nativeElement.alt\" [class.w-100]=\"true\">\n </div>\n </ng-container>\n </div>\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [""], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation, CarouselSlideAnimation] });
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselComponent, decorators: [{
488
+ type: Component,
489
+ args: [{
490
+ selector: 'bs-carousel',
491
+ templateUrl: './carousel.component.html',
492
+ styleUrls: ['./carousel.component.scss'],
493
+ animations: [FadeInOutAnimation, CarouselSlideAnimation]
494
+ }]
495
+ }], ctorParameters: function () { return []; }, propDecorators: { images: [{
496
+ type: ContentChildren,
497
+ args: [BsCarouselImageDirective, { read: ElementRef }]
498
+ }] } });
499
+
500
+ class BsCarouselModule {
501
+ }
502
+ BsCarouselModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
503
+ BsCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselModule, declarations: [BsCarouselComponent,
504
+ BsCarouselImageDirective], imports: [CommonModule], exports: [BsCarouselComponent,
505
+ BsCarouselImageDirective] });
506
+ BsCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselModule, imports: [[
507
+ CommonModule
508
+ ]] });
509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsCarouselModule, decorators: [{
510
+ type: NgModule,
511
+ args: [{
512
+ declarations: [
513
+ BsCarouselComponent,
514
+ BsCarouselImageDirective
515
+ ],
516
+ imports: [
517
+ CommonModule
518
+ ],
519
+ exports: [
520
+ BsCarouselComponent,
521
+ BsCarouselImageDirective
522
+ ]
523
+ }]
524
+ }] });
525
+
420
526
  class BsListGroupItemComponent {
421
527
  constructor() {
422
528
  }
@@ -480,44 +586,114 @@ class BsNavbarComponent {
480
586
  constructor() {
481
587
  this.isExpanded = false;
482
588
  }
483
- ngOnInit() {
589
+ toggleExpanded() {
590
+ this.isExpanded = !this.isExpanded;
484
591
  }
485
592
  }
486
593
  BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
487
- BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarComponent, selector: "bs-navbar", ngImport: i0, template: "<nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <!-- <div class=\"w-100\"> -->\n <a class=\"navbar-brand mx-auto\" href=\"#\">Navbar 2</a>\n <button (click)=\"isExpanded = !isExpanded\" class=\"navbar-toggler align-self-end\" type=\"button\" data-toggle=\"collapse\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <!-- </div> -->\n <div class=\"navbar-collapse collapse w-100 show\" [@slideUpDown]=\"isExpanded ? 'down' : 'up'\">\n <ul class=\"navbar-nav mr-auto\">\n <li class=\"nav-item active\">\n <a class=\"nav-link\" href=\"#\">Left</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"//codeply.com\">Codeply</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Link</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Link</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Link</a>\n </li>\n </ul>\n </div>\n <div class=\"navbar-collapse collapse justify-content-end w-100 show\" [@slideUpDown]=\"isExpanded ? 'down' : 'up'\">\n <ul class=\"navbar-nav ml-auto\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Right</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#\">Link</a>\n </li>\n </ul>\n </div>\n </div>\n</nav>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:1}\n"], animations: [SlideUpDownAnimation] });
594
+ BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", 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\" data-toggle=\"collapse\">\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:1}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] });
488
595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarComponent, decorators: [{
489
596
  type: Component,
490
597
  args: [{
491
598
  selector: 'bs-navbar',
492
599
  templateUrl: './navbar.component.html',
493
600
  styleUrls: ['./navbar.component.scss'],
494
- animations: [SlideUpDownAnimation]
495
601
  }]
496
- }], ctorParameters: function () { return []; } });
602
+ }], ctorParameters: function () { return []; }, propDecorators: { nav: [{
603
+ type: ViewChild,
604
+ args: ['nav']
605
+ }] } });
497
606
 
498
607
  class BsNavbarNavComponent {
499
- constructor() { }
608
+ constructor(bsNavbar) {
609
+ //#region collapse
610
+ this._collapse = true;
611
+ this.bsNavbar = bsNavbar;
612
+ }
500
613
  ngOnInit() {
501
614
  }
615
+ set collapse(value) {
616
+ this._collapse = value;
617
+ }
618
+ get collapse() {
619
+ return this._collapse;
620
+ }
502
621
  }
503
- BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
504
- BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarNavComponent, selector: "bs-navbar-nav", ngImport: i0, template: "<p>navbar-nav works!</p>\n", styles: [""] });
622
+ BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
623
+ BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, ngImport: i0, template: "<div class=\"navbar-collapse collapse w-100 show\" [@slideUpDown]=\"bsNavbar.isExpanded ? 'down' : 'up'\">\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"], animations: [SlideUpDownAnimation] });
505
624
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
506
625
  type: Component,
507
626
  args: [{
508
627
  selector: 'bs-navbar-nav',
509
628
  templateUrl: './navbar-nav.component.html',
510
- styleUrls: ['./navbar-nav.component.scss']
629
+ styleUrls: ['./navbar-nav.component.scss'],
630
+ animations: [SlideUpDownAnimation]
511
631
  }]
512
- }], ctorParameters: function () { return []; } });
632
+ }], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
633
+ type: Input
634
+ }] } });
635
+
636
+ class BsNavbarItemComponent {
637
+ constructor(parentDropdown, element) {
638
+ this.element = element;
639
+ this.hasDropdown = false;
640
+ this.anchorTag = null;
641
+ this.parentDropdown = parentDropdown;
642
+ }
643
+ ngOnInit() {
644
+ }
645
+ ngAfterContentChecked() {
646
+ if (this.hasDropdown) {
647
+ window.element = this.element.nativeElement;
648
+ this.anchorTag = this.element.nativeElement.querySelector('li a');
649
+ (this.anchorTag) && this.anchorTag.classList.add('dropdown-toggle');
650
+ if (this.anchorTag && !this.anchorTag.onclick) {
651
+ this.anchorTag.onclick = (ev) => {
652
+ ev.preventDefault();
653
+ // Normally there should be only one dropdown in this list
654
+ this.dropdowns.forEach((dropdown) => {
655
+ if (!(dropdown.isVisible = !dropdown.isVisible)) {
656
+ dropdown.childDropdowns.forEach((child) => {
657
+ child.isVisible = false;
658
+ });
659
+ }
660
+ });
661
+ return false;
662
+ };
663
+ }
664
+ }
665
+ }
666
+ }
667
+ BsNavbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, deps: [{ token: BsNavbarDropdownComponent, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
668
+ BsNavbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarItemComponent, selector: "bs-navbar-item", queries: [{ propertyName: "dropdowns", predicate: BsNavbarDropdownComponent }], ngImport: i0, template: "<li [class.nav-item]=\"parentDropdown === null\" [class.dropdown]=\"(dropdowns.length > 0) && (parentDropdown === null)\" [class.dropend]=\"(dropdowns.length > 0) && (parentDropdown !== null)\">\n <ng-content></ng-content>\n</li>", styles: ["li.dropend ::ng-deep a.dropdown-toggle{padding-right:1.5rem}li.dropend ::ng-deep a.dropdown-toggle:after{position:absolute;right:.5rem;top:.75rem}\n"] });
669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, decorators: [{
670
+ type: Component,
671
+ args: [{
672
+ selector: 'bs-navbar-item',
673
+ templateUrl: './navbar-item.component.html',
674
+ styleUrls: ['./navbar-item.component.scss']
675
+ }]
676
+ }], ctorParameters: function () { return [{ type: BsNavbarDropdownComponent, decorators: [{
677
+ type: Optional
678
+ }] }, { type: i0.ElementRef }]; }, propDecorators: { dropdowns: [{
679
+ type: ContentChildren,
680
+ args: [BsNavbarDropdownComponent]
681
+ }] } });
513
682
 
514
683
  class BsNavbarDropdownComponent {
515
- constructor() { }
684
+ constructor(parentDropdown, navbarItem) {
685
+ this.isVisible = false;
686
+ this.parentDropdown = parentDropdown;
687
+ this.navbarItem = navbarItem;
688
+ }
689
+ get elementsToExclude() {
690
+ return [this.navbarItem.anchorTag].filter((a) => a).map((a) => a);
691
+ }
516
692
  ngOnInit() {
517
693
  }
518
694
  }
519
- BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
520
- BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", ngImport: i0, template: "<p>navbar-dropdown works!</p>\n", styles: [""] });
695
+ BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarDropdownComponent, deps: [{ token: BsNavbarDropdownComponent, host: true, optional: true, skipSelf: true }, { token: BsNavbarItemComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
696
+ BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: BsNavbarDropdownComponent, descendants: true }], ngImport: i0, template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"], directives: [{ type: i2.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
521
697
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
522
698
  type: Component,
523
699
  args: [{
@@ -525,23 +701,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
525
701
  templateUrl: './navbar-dropdown.component.html',
526
702
  styleUrls: ['./navbar-dropdown.component.scss']
527
703
  }]
528
- }], ctorParameters: function () { return []; } });
704
+ }], ctorParameters: function () { return [{ type: BsNavbarDropdownComponent, decorators: [{
705
+ type: SkipSelf
706
+ }, {
707
+ type: Host
708
+ }, {
709
+ type: Optional
710
+ }] }, { type: BsNavbarItemComponent, decorators: [{
711
+ type: Host
712
+ }] }]; }, propDecorators: { childDropdowns: [{
713
+ type: ContentChildren,
714
+ args: [BsNavbarDropdownComponent, { descendants: true }]
715
+ }] } });
529
716
 
530
- class BsNavbarItemComponent {
531
- constructor() { }
532
- ngOnInit() {
717
+ class DropdownToggleDirective {
718
+ constructor(elementRef, bsNavbarItem, parentDropdown) {
719
+ this.elementRef = elementRef;
720
+ this.bsNavbarItem = bsNavbarItem;
721
+ }
722
+ ngAfterContentInit() {
723
+ if (this.bsNavbarItem.dropdowns.length > 0) {
724
+ this.bsNavbarItem.hasDropdown = true;
725
+ }
533
726
  }
534
727
  }
535
- BsNavbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
536
- BsNavbarItemComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: BsNavbarItemComponent, selector: "bs-navbar-item", ngImport: i0, template: "<p>navbar-item works!</p>\n", styles: [""] });
537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarItemComponent, decorators: [{
538
- type: Component,
728
+ DropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DropdownToggleDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarItemComponent) }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
729
+ DropdownToggleDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: DropdownToggleDirective, selector: "bs-navbar-item", queries: [{ propertyName: "childDropdowns", predicate: BsNavbarDropdownComponent }], ngImport: i0 });
730
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: DropdownToggleDirective, decorators: [{
731
+ type: Directive,
539
732
  args: [{
733
+ // selector: 'bs-navbar-item > a[routerLink]',
540
734
  selector: 'bs-navbar-item',
541
- templateUrl: './navbar-item.component.html',
542
- styleUrls: ['./navbar-item.component.scss']
735
+ queries: {
736
+ childDropdowns: new ContentChildren(BsNavbarDropdownComponent)
737
+ }
543
738
  }]
544
- }], ctorParameters: function () { return []; } });
739
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarItemComponent, decorators: [{
740
+ type: Inject,
741
+ args: [forwardRef(() => BsNavbarItemComponent)]
742
+ }] }, { type: BsNavbarDropdownComponent, decorators: [{
743
+ type: Optional
744
+ }, {
745
+ type: Inject,
746
+ args: [forwardRef(() => BsNavbarDropdownComponent)]
747
+ }] }]; } });
748
+
749
+ class NavLinkDirective {
750
+ constructor(elementRef, parentDropdown) {
751
+ this.elementRef = elementRef;
752
+ if (parentDropdown == null) {
753
+ this.elementRef.nativeElement.classList.add('nav-link');
754
+ }
755
+ else {
756
+ this.elementRef.nativeElement.classList.add('dropdown-item');
757
+ }
758
+ }
759
+ }
760
+ NavLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavLinkDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
761
+ NavLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavLinkDirective, decorators: [{
763
+ type: Directive,
764
+ args: [{
765
+ selector: 'bs-navbar-item > a[routerLink]'
766
+ }]
767
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarDropdownComponent, decorators: [{
768
+ type: Optional
769
+ }, {
770
+ type: Inject,
771
+ args: [forwardRef(() => BsNavbarDropdownComponent)]
772
+ }] }]; } });
773
+
774
+ class NavbarContentDirective {
775
+ constructor(element) {
776
+ this.element = element;
777
+ this.initialPadding = 0;
778
+ this.resizeObserver = new ResizeObserver((entries) => {
779
+ let height = entries[0].contentRect.height;
780
+ this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
781
+ });
782
+ }
783
+ ngAfterViewInit() {
784
+ let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
785
+ this.initialPadding = isNaN(p) ? 0 : p;
786
+ this.resizeObserver.observe(this.navbar.nav.nativeElement);
787
+ }
788
+ ngOnDestroy() {
789
+ this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
790
+ }
791
+ }
792
+ NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
793
+ NavbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: NavbarContentDirective, decorators: [{
795
+ type: Directive,
796
+ args: [{
797
+ selector: '[navbarContent]'
798
+ }]
799
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
800
+ type: Input,
801
+ args: ['navbarContent']
802
+ }] } });
545
803
 
546
804
  class BsNavbarModule {
547
805
  }
@@ -549,12 +807,22 @@ BsNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
549
807
  BsNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarModule, declarations: [BsNavbarComponent,
550
808
  BsNavbarNavComponent,
551
809
  BsNavbarDropdownComponent,
552
- BsNavbarItemComponent], imports: [CommonModule], exports: [BsNavbarComponent,
810
+ BsNavbarItemComponent,
811
+ DropdownToggleDirective,
812
+ NavLinkDirective,
813
+ NavbarContentDirective], imports: [CommonModule,
814
+ RouterModule,
815
+ ClickOutsideModule], exports: [BsNavbarComponent,
553
816
  BsNavbarNavComponent,
554
817
  BsNavbarDropdownComponent,
555
- BsNavbarItemComponent] });
818
+ BsNavbarItemComponent,
819
+ DropdownToggleDirective,
820
+ NavLinkDirective,
821
+ NavbarContentDirective] });
556
822
  BsNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarModule, imports: [[
557
- CommonModule
823
+ CommonModule,
824
+ RouterModule,
825
+ ClickOutsideModule
558
826
  ]] });
559
827
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: BsNavbarModule, decorators: [{
560
828
  type: NgModule,
@@ -563,16 +831,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
563
831
  BsNavbarComponent,
564
832
  BsNavbarNavComponent,
565
833
  BsNavbarDropdownComponent,
566
- BsNavbarItemComponent
834
+ BsNavbarItemComponent,
835
+ DropdownToggleDirective,
836
+ NavLinkDirective,
837
+ NavbarContentDirective
567
838
  ],
568
839
  imports: [
569
- CommonModule
840
+ CommonModule,
841
+ RouterModule,
842
+ ClickOutsideModule
570
843
  ],
571
844
  exports: [
572
845
  BsNavbarComponent,
573
846
  BsNavbarNavComponent,
574
847
  BsNavbarDropdownComponent,
575
- BsNavbarItemComponent
848
+ BsNavbarItemComponent,
849
+ DropdownToggleDirective,
850
+ NavLinkDirective,
851
+ NavbarContentDirective
576
852
  ]
577
853
  }]
578
854
  }] });
@@ -766,5 +1042,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImpor
766
1042
  * Generated bundle index. Do not edit.
767
1043
  */
768
1044
 
769
- export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, Color };
1045
+ export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, Color, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective };
770
1046
  //# sourceMappingURL=mintplayer-ng-bootstrap.js.map