@mintplayer/ng-bootstrap 13.1.1 → 13.1.6

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/esm2020/index.mjs +2 -1
  2. package/esm2020/lib/components/card/card/card.component.mjs +1 -2
  3. package/esm2020/lib/components/carousel/carousel/carousel.component.mjs +17 -8
  4. package/esm2020/lib/components/carousel/carousel-image/carousel-image.directive.mjs +10 -7
  5. package/esm2020/lib/components/datatable/datatable/datatable.component.mjs +51 -0
  6. package/esm2020/lib/components/datatable/datatable-column/datatable-column-metadata.mjs +2 -0
  7. package/esm2020/lib/components/datatable/datatable-column/datatable-column.directive.mjs +19 -0
  8. package/esm2020/lib/components/datatable/datatable-settings.mjs +37 -0
  9. package/esm2020/lib/components/datatable/datatable.module.mjs +40 -0
  10. package/esm2020/lib/components/datatable/index.mjs +6 -0
  11. package/esm2020/lib/components/datatable/row-template/row-template.directive.mjs +19 -0
  12. package/esm2020/lib/components/index.mjs +3 -1
  13. package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +2 -2
  14. package/esm2020/lib/components/pagination/pagination/pagination.component.mjs +146 -0
  15. package/esm2020/lib/components/pagination/pagination.module.mjs +26 -0
  16. package/esm2020/lib/components/scrollspy/component/scrollspy.component.mjs +48 -0
  17. package/esm2020/lib/components/scrollspy/directives/scrollspy.directive.mjs +16 -0
  18. package/esm2020/lib/components/scrollspy/index.mjs +4 -0
  19. package/esm2020/lib/components/scrollspy/scrollspy.module.mjs +31 -0
  20. package/esm2020/lib/interfaces/index.mjs +2 -0
  21. package/esm2020/lib/interfaces/page-with-selection.mjs +2 -0
  22. package/esm2020/lib/types/page-number.type.mjs +2 -0
  23. package/fesm2015/mintplayer-ng-bootstrap.mjs +425 -18
  24. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  25. package/fesm2020/mintplayer-ng-bootstrap.mjs +423 -18
  26. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  27. package/index.d.ts +1 -0
  28. package/lib/components/carousel/carousel/carousel.component.d.ts +6 -4
  29. package/lib/components/carousel/carousel-image/carousel-image.directive.d.ts +5 -2
  30. package/lib/components/datatable/datatable/datatable.component.d.ts +17 -0
  31. package/lib/components/datatable/datatable-column/datatable-column-metadata.d.ts +4 -0
  32. package/lib/components/datatable/datatable-column/datatable-column.directive.d.ts +10 -0
  33. package/lib/components/datatable/datatable-settings.d.ts +15 -0
  34. package/lib/components/datatable/datatable.module.d.ts +11 -0
  35. package/lib/components/datatable/index.d.ts +5 -0
  36. package/lib/components/datatable/row-template/row-template.directive.d.ts +9 -0
  37. package/lib/components/index.d.ts +2 -0
  38. package/lib/components/pagination/pagination/pagination.component.d.ts +45 -0
  39. package/lib/components/pagination/pagination.module.d.ts +8 -0
  40. package/lib/components/scrollspy/component/scrollspy.component.d.ts +15 -0
  41. package/lib/components/scrollspy/directives/scrollspy.directive.d.ts +8 -0
  42. package/lib/components/scrollspy/index.d.ts +3 -0
  43. package/lib/components/scrollspy/scrollspy.module.d.ts +9 -0
  44. package/lib/interfaces/index.d.ts +1 -0
  45. package/lib/interfaces/page-with-selection.d.ts +5 -0
  46. package/lib/types/page-number.type.d.ts +1 -0
  47. package/package.json +2 -1
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Injectable, Pipe, Directive, ElementRef, ContentChildren, ViewChild, Optional, forwardRef, SkipSelf, Host, Inject, TemplateRef, ContentChild } from '@angular/core';
2
+ import { Component, Input, NgModule, Injectable, Pipe, Directive, ContentChildren, EventEmitter, Output, ViewChild, Optional, forwardRef, SkipSelf, Host, Inject, TemplateRef, ContentChild, HostListener } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
4
+ import { CommonModule, DOCUMENT } from '@angular/common';
5
5
  import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation } from '@mintplayer/ng-animations';
6
- import { Subject, BehaviorSubject } from 'rxjs';
6
+ import { Subject, BehaviorSubject, Observable, combineLatest, takeUntil as takeUntil$1, map as map$1 } from 'rxjs';
7
7
  import { map, takeUntil, take } from 'rxjs/operators';
8
8
  import { RouterModule } from '@angular/router';
9
9
  import * as i1$1 from '@mintplayer/ng-click-outside';
@@ -88,7 +88,6 @@ class BsCardComponent {
88
88
  ngOnInit() {
89
89
  }
90
90
  ngAfterViewInit() {
91
- // console.log('header', this.header);
92
91
  }
93
92
  }
94
93
  BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -408,19 +407,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
408
407
  }] });
409
408
 
410
409
  class BsCarouselImageDirective {
411
- constructor() { }
410
+ constructor(templateRef) {
411
+ this.templateRef = templateRef;
412
+ this.itemTemplate = this.templateRef;
413
+ }
412
414
  }
413
- BsCarouselImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
414
- BsCarouselImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselImageDirective, selector: "img[bsCarouselImage]", ngImport: i0 });
415
+ BsCarouselImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselImageDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
416
+ BsCarouselImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselImageDirective, selector: "*[bsCarouselImage]", ngImport: i0 });
415
417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselImageDirective, decorators: [{
416
418
  type: Directive,
417
419
  args: [{
418
- selector: 'img[bsCarouselImage]'
420
+ selector: '*[bsCarouselImage]'
419
421
  }]
420
- }], ctorParameters: function () { return []; } });
422
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
421
423
 
422
424
  class BsCarouselComponent {
423
425
  constructor() {
426
+ // @HostBinding('@.disabled')
427
+ // public animationsDisabled = false;
428
+ this.animation = 'slide';
424
429
  this.destroyed$ = new Subject();
425
430
  this.currentImageCounter$ = new BehaviorSubject(-1);
426
431
  this.currentImageIndex$ = this.currentImageCounter$
@@ -430,7 +435,7 @@ class BsCarouselComponent {
430
435
  }))
431
436
  .pipe(takeUntil(this.destroyed$));
432
437
  this.currentImage$ = this.currentImageIndex$
433
- .pipe(map((index) => { var _a; return (_a = this.images.get(index)) !== null && _a !== void 0 ? _a : null; }))
438
+ .pipe(map((index) => { var _a, _b; return (_b = (_a = this.images.get(index)) === null || _a === void 0 ? void 0 : _a.itemTemplate) !== null && _b !== void 0 ? _b : null; }))
434
439
  .pipe(takeUntil(this.destroyed$));
435
440
  }
436
441
  ngOnInit() { }
@@ -460,17 +465,23 @@ class BsCarouselComponent {
460
465
  });
461
466
  }
462
467
  setCurrentImage(index) {
463
- this.currentImageCounter$.next(index);
468
+ const currentValue = this.currentImageCounter$.value;
469
+ const l = this.images.length;
470
+ const counterMod = ((currentValue % l) + l) % l;
471
+ const newValue = currentValue - counterMod + index;
472
+ this.currentImageCounter$.next(newValue);
464
473
  }
465
474
  }
466
475
  BsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
467
- BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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]=\"currentImageCounter$ | 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: [".carousel{min-height:100px}\n"], 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] });
476
+ BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselComponent, selector: "bs-carousel", inputs: { animation: "animation" }, queries: [{ propertyName: "images", predicate: BsCarouselImageDirective }], 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)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\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: [".carousel{min-height:100px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation, CarouselSlideAnimation] });
468
477
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, decorators: [{
469
478
  type: Component,
470
- args: [{ selector: 'bs-carousel', animations: [FadeInOutAnimation, CarouselSlideAnimation], 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]=\"currentImageCounter$ | 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: [".carousel{min-height:100px}\n"] }]
471
- }], ctorParameters: function () { return []; }, propDecorators: { images: [{
479
+ args: [{ selector: 'bs-carousel', animations: [FadeInOutAnimation, CarouselSlideAnimation], 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)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\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: [".carousel{min-height:100px}\n"] }]
480
+ }], ctorParameters: function () { return []; }, propDecorators: { animation: [{
481
+ type: Input
482
+ }], images: [{
472
483
  type: ContentChildren,
473
- args: [BsCarouselImageDirective, { read: ElementRef }]
484
+ args: [BsCarouselImageDirective]
474
485
  }] } });
475
486
 
476
487
  class BsCarouselModule {
@@ -499,6 +510,316 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
499
510
  }]
500
511
  }] });
501
512
 
513
+ class BsDatatableColumnDirective {
514
+ constructor(templateRef) {
515
+ this.bsDatatableColumn = { name: '', sortable: true };
516
+ this.templateRef = templateRef;
517
+ }
518
+ }
519
+ BsDatatableColumnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableColumnDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
520
+ BsDatatableColumnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDatatableColumnDirective, selector: "[bsDatatableColumn]", inputs: { bsDatatableColumn: "bsDatatableColumn" }, ngImport: i0 });
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableColumnDirective, decorators: [{
522
+ type: Directive,
523
+ args: [{
524
+ selector: '[bsDatatableColumn]'
525
+ }]
526
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { bsDatatableColumn: [{
527
+ type: Input
528
+ }] } });
529
+
530
+ class DatatableSettings {
531
+ constructor(data) {
532
+ this.sortProperty = '';
533
+ this.sortDirection = 'ascending';
534
+ Object.assign(this, data);
535
+ if (data && data.perPage) {
536
+ this.perPage = data.perPage;
537
+ }
538
+ else {
539
+ // Set default value
540
+ this.perPage = {
541
+ values: [10, 20, 50],
542
+ selected: 20
543
+ };
544
+ }
545
+ if (data && data.page) {
546
+ this.page = data.page;
547
+ }
548
+ else {
549
+ // Set default value
550
+ this.page = {
551
+ values: [1],
552
+ selected: 1
553
+ };
554
+ }
555
+ }
556
+ toPagination() {
557
+ const res = {
558
+ sortProperty: this.sortProperty,
559
+ sortDirection: this.sortDirection,
560
+ perPage: this.perPage.selected,
561
+ page: this.page.selected
562
+ };
563
+ return res;
564
+ }
565
+ }
566
+
567
+ class BsPaginationComponent {
568
+ constructor() {
569
+ /** All page numbers. */
570
+ this.pageNumbers$ = new BehaviorSubject([]);
571
+ /** Selected number. */
572
+ this.selectedPageNumber$ = new BehaviorSubject(1);
573
+ /** Number of boxes. */
574
+ this.numberOfBoxes$ = new BehaviorSubject(0);
575
+ /** Display previous/next arrows. */
576
+ this.showArrows$ = new BehaviorSubject(true);
577
+ /** Indicates if first value is selected. */
578
+ this.isFirstPage$ = new Observable();
579
+ /** Indicates if last value is selected. */
580
+ this.isLastPage$ = new Observable();
581
+ /** The number of boxes (excluding arrows) that's being shown on the pagination component. */
582
+ this.visibleNumberOfNumberBoxes$ = new Observable();
583
+ this._selectedPageNumber = 0;
584
+ this.selectedPageNumberChange = new EventEmitter();
585
+ this._numberOfBoxes = 0;
586
+ this._pageNumbers = [];
587
+ this._showArrows = true;
588
+ this.destroyed$ = new Subject();
589
+ this.visibleNumberOfNumberBoxes$ =
590
+ combineLatest([this.numberOfBoxes$, this.pageNumbers$, this.showArrows$])
591
+ .pipe(takeUntil$1(this.destroyed$))
592
+ .pipe(map$1(([numberOfBoxes, pageNumbers, showArrows]) => {
593
+ if (numberOfBoxes <= 0) {
594
+ return pageNumbers.length;
595
+ }
596
+ else if (!showArrows) {
597
+ return Math.min(numberOfBoxes, pageNumbers.length);
598
+ }
599
+ else if (numberOfBoxes <= 2) {
600
+ return Math.min(1, pageNumbers.length);
601
+ }
602
+ else {
603
+ return Math.min(numberOfBoxes - 2, pageNumbers.length);
604
+ }
605
+ }));
606
+ this.shownPageNumbers$ =
607
+ combineLatest([this.pageNumbers$, this.selectedPageNumber$, this.visibleNumberOfNumberBoxes$])
608
+ .pipe(takeUntil$1(this.destroyed$))
609
+ .pipe(map$1(([pageNumbers, selectedPageNumber, visibleNumberOfNumberBoxes]) => {
610
+ let startIndex = 0;
611
+ const half = Math.round((visibleNumberOfNumberBoxes - 1) / 2);
612
+ if (pageNumbers.indexOf(selectedPageNumber) < half) {
613
+ startIndex = 0;
614
+ }
615
+ else if (pageNumbers.indexOf(selectedPageNumber) >= (pageNumbers.length - half)) {
616
+ startIndex = pageNumbers.length - visibleNumberOfNumberBoxes;
617
+ }
618
+ else {
619
+ startIndex = pageNumbers.indexOf(selectedPageNumber) - half;
620
+ }
621
+ return [...Array(visibleNumberOfNumberBoxes).keys()]
622
+ .map(p => p + startIndex)
623
+ .map(p => ({
624
+ page: pageNumbers[p],
625
+ selected: pageNumbers[p] === selectedPageNumber
626
+ }));
627
+ }));
628
+ this.isFirstPage$ =
629
+ combineLatest([this.pageNumbers$, this.selectedPageNumber$])
630
+ .pipe(takeUntil$1(this.destroyed$))
631
+ .pipe(map$1(([pageNumbers, selectedPageNumber]) => {
632
+ return pageNumbers.indexOf(selectedPageNumber) === 0;
633
+ }));
634
+ this.isLastPage$ =
635
+ combineLatest([this.pageNumbers$, this.selectedPageNumber$])
636
+ .pipe(takeUntil$1(this.destroyed$))
637
+ .pipe(map$1(([pageNumbers, selectedPageNumber]) => {
638
+ return pageNumbers.indexOf(selectedPageNumber) === (pageNumbers.length - 1);
639
+ }));
640
+ this.selectedPageNumber$
641
+ .pipe(takeUntil$1(this.destroyed$))
642
+ .subscribe((selectedPageNumber) => {
643
+ this.selectedPageNumberChange.emit(selectedPageNumber);
644
+ });
645
+ }
646
+ ngOnInit() {
647
+ }
648
+ ngOnDestroy() {
649
+ this.destroyed$.next(true);
650
+ }
651
+ onSelectPage(event, page) {
652
+ this.selectedPageNumber$.next(page);
653
+ return false;
654
+ }
655
+ onPrevious() {
656
+ this.selectedPageNumber$.next(this.selectedPageNumber$.value - 1);
657
+ return false;
658
+ }
659
+ onNext() {
660
+ this.selectedPageNumber$.next(this.selectedPageNumber$.value + 1);
661
+ return false;
662
+ }
663
+ set selectedPageNumber(value) {
664
+ this._selectedPageNumber = value;
665
+ this.selectedPageNumber$.next(value);
666
+ }
667
+ get selectedPageNumber() {
668
+ return this._selectedPageNumber;
669
+ }
670
+ set numberOfBoxes(value) {
671
+ this._numberOfBoxes = value;
672
+ this.numberOfBoxes$.next(value);
673
+ }
674
+ get numberOfBoxes() {
675
+ return this._numberOfBoxes;
676
+ }
677
+ set pageNumbers(value) {
678
+ this._pageNumbers = value;
679
+ this.pageNumbers$.next(value);
680
+ }
681
+ get pageNumbers() {
682
+ return this._pageNumbers;
683
+ }
684
+ set showArrows(value) {
685
+ this._showArrows = value;
686
+ this.showArrows$.next(value);
687
+ }
688
+ get showArrows() {
689
+ return this._showArrows;
690
+ }
691
+ }
692
+ BsPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
693
+ BsPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsPaginationComponent, selector: "bs-pagination", inputs: { selectedPageNumber: "selectedPageNumber", numberOfBoxes: "numberOfBoxes", pageNumbers: "pageNumbers", showArrows: "showArrows" }, outputs: { selectedPageNumberChange: "selectedPageNumberChange" }, ngImport: i0, template: "<ul class=\"pagination\">\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isFirstPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onPrevious()\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">&laquo;</span>\n <span class=\"visually-hidden\">Previous</span>\n </a>\n </li>\n <li *ngFor=\"let pageNumber of (shownPageNumbers$ | async)\" class=\"page-item\"\n [ngClass]=\"{ 'active': pageNumber.selected }\">\n <a class=\"page-link\" href=\"\" (click)=\"onSelectPage($event, pageNumber.page)\" *ngIf=\"pageNumber.page != '...'\">\n {{ pageNumber.page }}\n <span class=\"visually-hidden\" *ngIf=\"pageNumber.selected\">(current)</span>\n </a>\n </li>\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isLastPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onNext()\" aria-label=\"Next\">\n <span aria-hidden=\"true\">&raquo;</span>\n <span class=\"visually-hidden\">Next</span>\n </a>\n </li>\n</ul>", styles: [":host{display:inline-block}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe } });
694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationComponent, decorators: [{
695
+ type: Component,
696
+ args: [{ selector: 'bs-pagination', template: "<ul class=\"pagination\">\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isFirstPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onPrevious()\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">&laquo;</span>\n <span class=\"visually-hidden\">Previous</span>\n </a>\n </li>\n <li *ngFor=\"let pageNumber of (shownPageNumbers$ | async)\" class=\"page-item\"\n [ngClass]=\"{ 'active': pageNumber.selected }\">\n <a class=\"page-link\" href=\"\" (click)=\"onSelectPage($event, pageNumber.page)\" *ngIf=\"pageNumber.page != '...'\">\n {{ pageNumber.page }}\n <span class=\"visually-hidden\" *ngIf=\"pageNumber.selected\">(current)</span>\n </a>\n </li>\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isLastPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onNext()\" aria-label=\"Next\">\n <span aria-hidden=\"true\">&raquo;</span>\n <span class=\"visually-hidden\">Next</span>\n </a>\n </li>\n</ul>", styles: [":host{display:inline-block}\n"] }]
697
+ }], ctorParameters: function () { return []; }, propDecorators: { selectedPageNumberChange: [{
698
+ type: Output
699
+ }], selectedPageNumber: [{
700
+ type: Input
701
+ }], numberOfBoxes: [{
702
+ type: Input
703
+ }], pageNumbers: [{
704
+ type: Input
705
+ }], showArrows: [{
706
+ type: Input
707
+ }] } });
708
+
709
+ class BsDatatableComponent {
710
+ constructor() {
711
+ this.columns = [];
712
+ this.onReloadData = new EventEmitter();
713
+ this.settings = new DatatableSettings();
714
+ this.settings.sortProperty = '';
715
+ this.settings.sortDirection = 'ascending';
716
+ this.settings.perPage = { values: [10, 20, 50], selected: 20 };
717
+ this.settings.page = { values: [1], selected: 1 };
718
+ }
719
+ columnHeaderClicked(column) {
720
+ if (column.bsDatatableColumn.sortable) {
721
+ if (this.settings.sortProperty !== column.bsDatatableColumn.name) {
722
+ this.settings.sortProperty = column.bsDatatableColumn.name;
723
+ this.settings.sortDirection = 'ascending';
724
+ }
725
+ else if (this.settings.sortDirection === 'descending') {
726
+ this.settings.sortDirection = 'ascending';
727
+ }
728
+ else {
729
+ this.settings.sortDirection = 'descending';
730
+ }
731
+ this.onReloadData.emit();
732
+ }
733
+ }
734
+ ngOnInit() {
735
+ }
736
+ }
737
+ BsDatatableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
738
+ BsDatatableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatatableComponent, selector: "bs-datatable", inputs: { settings: "settings", data: "data" }, outputs: { onReloadData: "onReloadData" }, queries: [{ propertyName: "columns", predicate: BsDatatableColumnDirective }], ngImport: i0, template: "<div class=\"table-responsive overflow-y-hidden mb-3\">\n <table class=\"table table-striped table-hover w-100 mb-0\" cellspacing=\"0\" role=\"grid\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" class=\"text-nowrap\"\n [class.sort]=\"column.bsDatatableColumn.sortable\"\n [class.sort-asc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"!!data && !!rowTemplate\">\n <ng-container *ngFor=\"let item of data.data\">\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings.perPage.values\"\n [(selectedPageNumber)]=\"settings.perPage.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings.page.values\"\n [(selectedPageNumber)]=\"settings.page.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n</div>", styles: ["@charset \"UTF-8\";.overflow-y-hidden{overflow-y:hidden}.table thead th.sort{position:relative;cursor:pointer}.table thead th.sort:before,.table thead th.sort:after{position:absolute;display:block;opacity:.3;bottom:.5em}.table thead th.sort:before{content:\"\\2191\";right:1em}.table thead th.sort:after{content:\"\\2193\";right:.5em}.table thead th.sort.sort-asc:after{opacity:1}.table thead th.sort.sort-desc:before{opacity:1}\n"], components: [{ type: BsPaginationComponent, selector: "bs-pagination", inputs: ["selectedPageNumber", "numberOfBoxes", "pageNumbers", "showArrows"], outputs: ["selectedPageNumberChange"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
739
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableComponent, decorators: [{
740
+ type: Component,
741
+ args: [{ selector: 'bs-datatable', template: "<div class=\"table-responsive overflow-y-hidden mb-3\">\n <table class=\"table table-striped table-hover w-100 mb-0\" cellspacing=\"0\" role=\"grid\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" class=\"text-nowrap\"\n [class.sort]=\"column.bsDatatableColumn.sortable\"\n [class.sort-asc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"!!data && !!rowTemplate\">\n <ng-container *ngFor=\"let item of data.data\">\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings.perPage.values\"\n [(selectedPageNumber)]=\"settings.perPage.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings.page.values\"\n [(selectedPageNumber)]=\"settings.page.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n</div>", styles: ["@charset \"UTF-8\";.overflow-y-hidden{overflow-y:hidden}.table thead th.sort{position:relative;cursor:pointer}.table thead th.sort:before,.table thead th.sort:after{position:absolute;display:block;opacity:.3;bottom:.5em}.table thead th.sort:before{content:\"\\2191\";right:1em}.table thead th.sort:after{content:\"\\2193\";right:.5em}.table thead th.sort.sort-asc:after{opacity:1}.table thead th.sort.sort-desc:before{opacity:1}\n"] }]
742
+ }], ctorParameters: function () { return []; }, propDecorators: { columns: [{
743
+ type: ContentChildren,
744
+ args: [BsDatatableColumnDirective]
745
+ }], settings: [{
746
+ type: Input
747
+ }], data: [{
748
+ type: Input
749
+ }], onReloadData: [{
750
+ type: Output
751
+ }] } });
752
+
753
+ class BsRowTemplateDirective {
754
+ constructor(datatableComponent, templateRef) {
755
+ this.datatableComponent = datatableComponent;
756
+ this.datatableComponent.rowTemplate = templateRef;
757
+ }
758
+ }
759
+ BsRowTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsRowTemplateDirective, deps: [{ token: BsDatatableComponent }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
760
+ BsRowTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsRowTemplateDirective, selector: "[rowTemplate]", ngImport: i0 });
761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsRowTemplateDirective, decorators: [{
762
+ type: Directive,
763
+ args: [{
764
+ selector: '[rowTemplate]'
765
+ }]
766
+ }], ctorParameters: function () { return [{ type: BsDatatableComponent }, { type: i0.TemplateRef }]; } });
767
+
768
+ class BsPaginationModule {
769
+ }
770
+ BsPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
771
+ BsPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, declarations: [BsPaginationComponent], imports: [CommonModule], exports: [BsPaginationComponent] });
772
+ BsPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, imports: [[
773
+ CommonModule
774
+ ]] });
775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, decorators: [{
776
+ type: NgModule,
777
+ args: [{
778
+ declarations: [
779
+ BsPaginationComponent
780
+ ],
781
+ imports: [
782
+ CommonModule
783
+ ],
784
+ exports: [
785
+ BsPaginationComponent
786
+ ]
787
+ }]
788
+ }] });
789
+
790
+ class BsDatatableModule {
791
+ }
792
+ BsDatatableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
793
+ BsDatatableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, declarations: [BsDatatableComponent,
794
+ BsRowTemplateDirective,
795
+ BsDatatableColumnDirective], imports: [CommonModule,
796
+ BsPaginationModule], exports: [BsDatatableComponent,
797
+ BsRowTemplateDirective,
798
+ BsDatatableColumnDirective] });
799
+ BsDatatableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, imports: [[
800
+ CommonModule,
801
+ BsPaginationModule
802
+ ]] });
803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, decorators: [{
804
+ type: NgModule,
805
+ args: [{
806
+ declarations: [
807
+ BsDatatableComponent,
808
+ BsRowTemplateDirective,
809
+ BsDatatableColumnDirective
810
+ ],
811
+ imports: [
812
+ CommonModule,
813
+ BsPaginationModule
814
+ ],
815
+ exports: [
816
+ BsDatatableComponent,
817
+ BsRowTemplateDirective,
818
+ BsDatatableColumnDirective
819
+ ]
820
+ }]
821
+ }] });
822
+
502
823
  class BsListGroupItemComponent {
503
824
  constructor() {
504
825
  }
@@ -559,10 +880,10 @@ class BsNavbarComponent {
559
880
  }
560
881
  }
561
882
  BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
562
- 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\" 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"] });
883
+ 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\" 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:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] });
563
884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
564
885
  type: Component,
565
- 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\" 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"] }]
886
+ 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\" 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:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] }]
566
887
  }], ctorParameters: function () { return []; }, propDecorators: { nav: [{
567
888
  type: ViewChild,
568
889
  args: ['nav']
@@ -979,9 +1300,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
979
1300
  }]
980
1301
  }] });
981
1302
 
1303
+ class BsScrollspyDirective {
1304
+ constructor(element) {
1305
+ this.element = element;
1306
+ }
1307
+ }
1308
+ BsScrollspyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1309
+ BsScrollspyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyDirective, selector: "[bsScrollspy]", ngImport: i0 });
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, decorators: [{
1311
+ type: Directive,
1312
+ args: [{
1313
+ selector: '[bsScrollspy]'
1314
+ }]
1315
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
1316
+
1317
+ class BsScrollspyComponent {
1318
+ constructor(document) {
1319
+ this.activeDirective = null;
1320
+ this.doc = document;
1321
+ }
1322
+ ngOnInit() {
1323
+ }
1324
+ ngAfterViewInit() {
1325
+ this.onWindowScroll();
1326
+ }
1327
+ onWindowScroll() {
1328
+ var _a;
1329
+ const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y <= 0);
1330
+ if (this.directives.length === 0) {
1331
+ this.activeDirective = null;
1332
+ }
1333
+ else if (dirs.length === 0) {
1334
+ this.activeDirective = (_a = this.directives.get(0)) !== null && _a !== void 0 ? _a : null;
1335
+ }
1336
+ else {
1337
+ this.activeDirective = dirs[dirs.length - 1];
1338
+ }
1339
+ }
1340
+ scrollToHeader(directive) {
1341
+ const header = directive.element.nativeElement;
1342
+ header.scrollIntoView();
1343
+ }
1344
+ }
1345
+ BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
1346
+ BsScrollspyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyComponent, selector: "bs-scrollspy", host: { listeners: { "window:scroll": "onWindowScroll($event)" } }, queries: [{ propertyName: "directives", predicate: BsScrollspyDirective, descendants: true }], ngImport: i0, template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives\">\n <span class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\">\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:25%;overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
1348
+ type: Component,
1349
+ args: [{ selector: 'bs-scrollspy', template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives\">\n <span class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\">\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:25%;overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"] }]
1350
+ }], ctorParameters: function () {
1351
+ return [{ type: undefined, decorators: [{
1352
+ type: Inject,
1353
+ args: [DOCUMENT]
1354
+ }] }];
1355
+ }, propDecorators: { directives: [{
1356
+ type: ContentChildren,
1357
+ args: [BsScrollspyDirective, { descendants: true }]
1358
+ }], onWindowScroll: [{
1359
+ type: HostListener,
1360
+ args: ['window:scroll', ['$event']]
1361
+ }] } });
1362
+
1363
+ class BsScrollspyModule {
1364
+ }
1365
+ BsScrollspyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1366
+ BsScrollspyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, declarations: [BsScrollspyComponent,
1367
+ BsScrollspyDirective], imports: [CommonModule], exports: [BsScrollspyComponent,
1368
+ BsScrollspyDirective] });
1369
+ BsScrollspyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, imports: [[
1370
+ CommonModule
1371
+ ]] });
1372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, decorators: [{
1373
+ type: NgModule,
1374
+ args: [{
1375
+ declarations: [
1376
+ BsScrollspyComponent,
1377
+ BsScrollspyDirective
1378
+ ],
1379
+ imports: [
1380
+ CommonModule
1381
+ ],
1382
+ exports: [
1383
+ BsScrollspyComponent,
1384
+ BsScrollspyDirective
1385
+ ]
1386
+ }]
1387
+ }] });
1388
+
982
1389
  /**
983
1390
  * Generated bundle index. Do not edit.
984
1391
  */
985
1392
 
986
- 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 };
1393
+ export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective };
987
1394
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map