@mintplayer/ng-bootstrap 13.1.7 → 13.1.13

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 (140) hide show
  1. package/esm2020/index.mjs +2 -1
  2. package/esm2020/lib/components/accordion/accordion-tab/accordion-tab.component.mjs +4 -3
  3. package/esm2020/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.mjs +7 -3
  4. package/esm2020/lib/components/alert/alert/alert.component.mjs +4 -4
  5. package/esm2020/lib/components/calendar/calendar.component.mjs +3 -3
  6. package/esm2020/lib/components/carousel/carousel/carousel.component.mjs +21 -7
  7. package/esm2020/lib/components/context-menu/context-menu.directive.mjs +77 -0
  8. package/esm2020/lib/components/context-menu/context-menu.module.mjs +26 -0
  9. package/esm2020/lib/components/context-menu/index.mjs +3 -0
  10. package/esm2020/lib/components/datepicker/datepicker.component.mjs +1 -1
  11. package/esm2020/lib/components/dropdown/dropdown/dropdown.directive.mjs +33 -6
  12. package/esm2020/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.mjs +42 -13
  13. package/esm2020/lib/components/dropdown/dropdown-toggle/dropdown-toggle.directive.mjs +1 -2
  14. package/esm2020/lib/components/dropdown/dropdown.module.mjs +8 -4
  15. package/esm2020/lib/components/file-upload/component/file-upload.component.mjs +85 -0
  16. package/esm2020/lib/components/file-upload/directive/file-upload-template.directive.mjs +18 -0
  17. package/esm2020/lib/components/file-upload/file-upload.mjs +2 -0
  18. package/esm2020/lib/components/file-upload/file-upload.module.mjs +43 -0
  19. package/esm2020/lib/components/file-upload/index.mjs +5 -0
  20. package/esm2020/lib/components/for/for.directive.mjs +32 -0
  21. package/esm2020/lib/components/for/for.module.mjs +26 -0
  22. package/esm2020/lib/components/for/index.mjs +3 -0
  23. package/esm2020/lib/components/index.mjs +17 -7
  24. package/esm2020/lib/components/multiselect/multiselect.component.mjs +8 -5
  25. package/esm2020/lib/components/multiselect/multiselect.module.mjs +8 -4
  26. package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +9 -6
  27. package/esm2020/lib/components/navbar/navbar-nav/navbar-nav.component.mjs +47 -9
  28. package/esm2020/lib/components/pagination/index.mjs +3 -0
  29. package/esm2020/lib/components/progress-bar/index.mjs +4 -0
  30. package/esm2020/lib/components/progress-bar/progress/progress.component.mjs +27 -0
  31. package/esm2020/lib/components/progress-bar/progress-bar/progress-bar.component.mjs +121 -0
  32. package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +31 -0
  33. package/esm2020/lib/components/scrollspy/component/scrollspy.component.mjs +54 -14
  34. package/esm2020/lib/components/select2/component/select2.component.mjs +96 -0
  35. package/esm2020/lib/components/select2/directive/item-template.directive.mjs +19 -0
  36. package/esm2020/lib/components/select2/index.mjs +4 -0
  37. package/esm2020/lib/components/select2/select2.module.mjs +43 -0
  38. package/esm2020/lib/components/snackbar/component/snackbar.component.mjs +35 -0
  39. package/esm2020/lib/components/snackbar/directives/index.mjs +2 -0
  40. package/esm2020/lib/components/snackbar/directives/snackbar-close/snackbar-close.directive.mjs +27 -0
  41. package/esm2020/lib/components/snackbar/index.mjs +6 -0
  42. package/esm2020/lib/components/snackbar/interfaces/index.mjs +2 -0
  43. package/esm2020/lib/components/snackbar/interfaces/snackbar-animation-meta.mjs +2 -0
  44. package/esm2020/lib/components/snackbar/providers/snackbar-content.provider.mjs +3 -0
  45. package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +49 -0
  46. package/esm2020/lib/components/snackbar/snackbar.module.mjs +38 -0
  47. package/esm2020/lib/components/toggle-button/index.mjs +3 -0
  48. package/esm2020/lib/components/toggle-button/toggle-button.component.mjs +42 -0
  49. package/esm2020/lib/components/toggle-button/toggle-button.module.mjs +26 -0
  50. package/esm2020/lib/components/tooltip/component/tooltip.component.mjs +25 -0
  51. package/esm2020/lib/components/tooltip/directive/tooltip.directive.mjs +110 -0
  52. package/esm2020/lib/components/tooltip/index.mjs +4 -0
  53. package/esm2020/lib/components/tooltip/providers/tooltip-content.provider.mjs +3 -0
  54. package/esm2020/lib/components/tooltip/tooltip.module.mjs +29 -0
  55. package/esm2020/lib/components/typeahead/index.mjs +3 -0
  56. package/esm2020/lib/components/typeahead/typeahead.component.mjs +90 -0
  57. package/esm2020/lib/components/typeahead/typeahead.module.mjs +38 -0
  58. package/esm2020/lib/enums/index.mjs +2 -1
  59. package/esm2020/lib/enums/position.enum.mjs +8 -0
  60. package/esm2020/lib/pipes/font-color/font-color.module.mjs +26 -0
  61. package/esm2020/lib/pipes/font-color/font-color.pipe.mjs +26 -0
  62. package/esm2020/lib/pipes/font-color/index.mjs +3 -0
  63. package/esm2020/lib/pipes/format-bytes/format-bytes.module.mjs +26 -0
  64. package/esm2020/lib/pipes/format-bytes/format-bytes.pipe.mjs +23 -0
  65. package/esm2020/lib/pipes/in-list/in-list.module.mjs +26 -0
  66. package/esm2020/lib/pipes/in-list/in-list.pipe.mjs +16 -0
  67. package/esm2020/lib/pipes/index.mjs +2 -0
  68. package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +12 -14
  69. package/esm2020/lib/services/scroll-offset/scroll-offset.service.mjs +31 -0
  70. package/fesm2015/mintplayer-ng-bootstrap.mjs +1868 -511
  71. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  72. package/fesm2020/mintplayer-ng-bootstrap.mjs +1860 -515
  73. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  74. package/index.d.ts +1 -0
  75. package/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.d.ts +1 -0
  76. package/lib/components/carousel/carousel/carousel.component.d.ts +4 -1
  77. package/lib/components/context-menu/context-menu.directive.d.ts +18 -0
  78. package/lib/components/context-menu/context-menu.module.d.ts +8 -0
  79. package/lib/components/context-menu/index.d.ts +2 -0
  80. package/lib/components/dropdown/dropdown/dropdown.directive.d.ts +10 -2
  81. package/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.d.ts +6 -3
  82. package/lib/components/dropdown/dropdown.module.d.ts +2 -1
  83. package/lib/components/file-upload/component/file-upload.component.d.ts +19 -0
  84. package/lib/components/file-upload/directive/file-upload-template.directive.d.ts +8 -0
  85. package/lib/components/file-upload/file-upload.d.ts +4 -0
  86. package/lib/components/file-upload/file-upload.module.d.ts +12 -0
  87. package/lib/components/file-upload/index.d.ts +4 -0
  88. package/lib/components/for/for.directive.d.ts +7 -0
  89. package/lib/components/for/for.module.d.ts +8 -0
  90. package/lib/components/for/index.d.ts +2 -0
  91. package/lib/components/index.d.ts +16 -6
  92. package/lib/components/multiselect/multiselect.component.d.ts +3 -2
  93. package/lib/components/multiselect/multiselect.module.d.ts +2 -1
  94. package/lib/components/navbar/navbar/navbar.component.d.ts +3 -3
  95. package/lib/components/navbar/navbar-nav/navbar-nav.component.d.ts +10 -4
  96. package/lib/components/pagination/index.d.ts +2 -0
  97. package/lib/components/progress-bar/index.d.ts +3 -0
  98. package/lib/components/progress-bar/progress/progress.component.d.ts +8 -0
  99. package/lib/components/progress-bar/progress-bar/progress-bar.component.d.ts +31 -0
  100. package/lib/components/progress-bar/progress-bar.module.d.ts +9 -0
  101. package/lib/components/scrollspy/component/scrollspy.component.d.ts +14 -4
  102. package/lib/components/select2/component/select2.component.d.ts +30 -0
  103. package/lib/components/select2/directive/item-template.directive.d.ts +9 -0
  104. package/lib/components/select2/index.d.ts +3 -0
  105. package/lib/components/select2/select2.module.d.ts +12 -0
  106. package/lib/components/snackbar/component/snackbar.component.d.ts +15 -0
  107. package/lib/components/snackbar/directives/index.d.ts +1 -0
  108. package/lib/components/snackbar/directives/snackbar-close/snackbar-close.directive.d.ts +11 -0
  109. package/lib/components/snackbar/index.d.ts +5 -0
  110. package/lib/components/snackbar/interfaces/index.d.ts +1 -0
  111. package/lib/components/snackbar/interfaces/snackbar-animation-meta.d.ts +7 -0
  112. package/lib/components/snackbar/providers/snackbar-content.provider.d.ts +2 -0
  113. package/lib/components/snackbar/service/snackbar.service.d.ts +14 -0
  114. package/lib/components/snackbar/snackbar.module.d.ts +9 -0
  115. package/lib/components/toggle-button/index.d.ts +2 -0
  116. package/lib/components/toggle-button/toggle-button.component.d.ts +15 -0
  117. package/lib/components/toggle-button/toggle-button.module.d.ts +8 -0
  118. package/lib/components/tooltip/component/tooltip.component.d.ts +11 -0
  119. package/lib/components/tooltip/directive/tooltip.directive.d.ts +20 -0
  120. package/lib/components/tooltip/index.d.ts +2 -0
  121. package/lib/components/tooltip/providers/tooltip-content.provider.d.ts +2 -0
  122. package/lib/components/tooltip/tooltip.module.d.ts +9 -0
  123. package/lib/components/typeahead/index.d.ts +2 -0
  124. package/lib/components/typeahead/typeahead.component.d.ts +29 -0
  125. package/lib/components/typeahead/typeahead.module.d.ts +11 -0
  126. package/lib/enums/index.d.ts +1 -0
  127. package/lib/enums/position.enum.d.ts +6 -0
  128. package/lib/pipes/font-color/font-color.module.d.ts +8 -0
  129. package/lib/pipes/font-color/font-color.pipe.d.ts +7 -0
  130. package/lib/pipes/font-color/index.d.ts +2 -0
  131. package/lib/pipes/format-bytes/format-bytes.module.d.ts +8 -0
  132. package/lib/pipes/format-bytes/format-bytes.pipe.d.ts +7 -0
  133. package/lib/pipes/in-list/in-list.module.d.ts +8 -0
  134. package/lib/pipes/in-list/in-list.pipe.d.ts +7 -0
  135. package/lib/pipes/index.d.ts +1 -0
  136. package/lib/services/calendar-month/calendar-month.service.d.ts +0 -1
  137. package/lib/services/scroll-offset/scroll-offset.service.d.ts +9 -0
  138. package/package.json +4 -2
  139. package/src/assets/ic-upload-file.svg +7 -0
  140. package/src/styles/utilities/cursor.scss +14 -0
@@ -1,18 +1,120 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Injectable, Pipe, EventEmitter, Output, Directive, ContentChildren, ViewChild, Optional, forwardRef, SkipSelf, Host, Inject, TemplateRef, ContentChild, HostListener } from '@angular/core';
2
+ import { Component, ContentChildren, NgModule, Input, Injectable, Pipe, EventEmitter, Output, Directive, HostBinding, Host, SkipSelf, HostListener, forwardRef, PLATFORM_ID, Inject, ContentChild, TemplateRef, ViewChild, Optional, ViewChildren, InjectionToken, Injector } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT } from '@angular/common';
5
- import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation } from '@mintplayer/ng-animations';
6
- import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest } from 'rxjs';
7
- import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
8
- import '@mintplayer/ng-pagination';
9
- import { RouterModule } from '@angular/router';
10
- import * as i1$1 from '@mintplayer/ng-click-outside';
11
- import { ClickOutsideModule } from '@mintplayer/ng-click-outside';
12
5
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
13
- import * as i1$2 from '@angular/cdk/overlay';
6
+ import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
7
+ import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest, debounceTime } from 'rxjs';
8
+ import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
9
+ import * as i1$1 from '@angular/cdk/overlay';
14
10
  import { OverlayModule } from '@angular/cdk/overlay';
15
- import { TemplatePortal } from '@angular/cdk/portal';
11
+ import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
12
+ import '@mintplayer/ng-pagination';
13
+ import * as i1$2 from '@mintplayer/ng-click-outside';
14
+ import { ClickOutsideDirective, ClickOutsideModule } from '@mintplayer/ng-click-outside';
15
+ import { FocusOnLoadModule } from '@mintplayer/ng-focus-on-load';
16
+ import { RouterModule, ROUTER_CONFIGURATION } from '@angular/router';
17
+ import * as i3 from '@angular/forms';
18
+ import { FormsModule } from '@angular/forms';
19
+
20
+ class BsAccordionTabComponent {
21
+ constructor(accordion) {
22
+ this.accordion = accordion;
23
+ }
24
+ ngOnInit() {
25
+ }
26
+ headerClicked(event) {
27
+ if (this.accordion.activeTab === this) {
28
+ this.accordion.activeTab = null;
29
+ }
30
+ else {
31
+ this.accordion.activeTab = this;
32
+ }
33
+ }
34
+ }
35
+ BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
36
+ BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabComponent, selector: "bs-accordion-tab", ngImport: i0, template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"accordion.activeTab === this\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [SlideUpDownAnimation] });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"accordion.activeTab === this\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
40
+ }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
41
+
42
+ class BsAccordionComponent {
43
+ constructor() {
44
+ this.activeTab = null;
45
+ }
46
+ ngOnInit() {
47
+ }
48
+ }
49
+ BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50
+ BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionComponent, selector: "bs-accordion", queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
52
+ type: Component,
53
+ args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
54
+ }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
55
+ type: ContentChildren,
56
+ args: [BsAccordionTabComponent]
57
+ }] } });
58
+
59
+ class BsAccordionTabHeaderComponent {
60
+ constructor(accordionTab, accordion) {
61
+ this.accordionTab = accordionTab;
62
+ this.accordion = accordion;
63
+ }
64
+ ngOnInit() {
65
+ }
66
+ headerClicked(event) {
67
+ event.preventDefault();
68
+ if (this.accordion.activeTab === this.accordionTab) {
69
+ this.accordion.activeTab = null;
70
+ }
71
+ else {
72
+ this.accordion.activeTab = this.accordionTab;
73
+ }
74
+ }
75
+ foo(event) {
76
+ event.preventDefault();
77
+ }
78
+ }
79
+ BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
80
+ BsAccordionTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabHeaderComponent, selector: "bs-accordion-tab-header", ngImport: i0, template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\" (contextmenu)=\"foo($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
82
+ type: Component,
83
+ args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\" (contextmenu)=\"foo($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
84
+ }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
85
+
86
+ class BsAccordionModule {
87
+ }
88
+ BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
89
+ BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
90
+ BsAccordionTabComponent,
91
+ BsAccordionTabHeaderComponent], imports: [CommonModule,
92
+ BrowserAnimationsModule], exports: [BsAccordionComponent,
93
+ BsAccordionTabComponent,
94
+ BsAccordionTabHeaderComponent] });
95
+ BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
96
+ CommonModule,
97
+ BrowserAnimationsModule
98
+ ]] });
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
100
+ type: NgModule,
101
+ args: [{
102
+ declarations: [
103
+ BsAccordionComponent,
104
+ BsAccordionTabComponent,
105
+ BsAccordionTabHeaderComponent
106
+ ],
107
+ imports: [
108
+ CommonModule,
109
+ BrowserAnimationsModule
110
+ ],
111
+ exports: [
112
+ BsAccordionComponent,
113
+ BsAccordionTabComponent,
114
+ BsAccordionTabHeaderComponent
115
+ ]
116
+ }]
117
+ }] });
16
118
 
17
119
  var Color;
18
120
  (function (Color) {
@@ -29,6 +131,14 @@ var Color;
29
131
  Color[Color["transparent"] = 10] = "transparent";
30
132
  })(Color || (Color = {}));
31
133
 
134
+ var Position;
135
+ (function (Position) {
136
+ Position[Position["top"] = 0] = "top";
137
+ Position[Position["left"] = 1] = "left";
138
+ Position[Position["bottom"] = 2] = "bottom";
139
+ Position[Position["right"] = 3] = "right";
140
+ })(Position || (Position = {}));
141
+
32
142
  class BsAlertComponent {
33
143
  constructor() {
34
144
  this.type = Color.primary;
@@ -39,10 +149,10 @@ class BsAlertComponent {
39
149
  }
40
150
  }
41
151
  BsAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
42
- BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [SlideUpDownAnimation, FadeInOutAnimation] });
152
+ BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [FadeInOutAnimation] });
43
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, decorators: [{
44
154
  type: Component,
45
- args: [{ selector: 'bs-alert', animations: [SlideUpDownAnimation, FadeInOutAnimation], template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"] }]
155
+ args: [{ selector: 'bs-alert', animations: [FadeInOutAnimation], template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"] }]
46
156
  }], ctorParameters: function () { return []; }, propDecorators: { type: [{
47
157
  type: Input
48
158
  }] } });
@@ -86,63 +196,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
86
196
  }]
87
197
  }] });
88
198
 
89
- class BsCardComponent {
90
- constructor() {
91
- }
92
- ngOnInit() {
93
- }
94
- ngAfterViewInit() {
95
- }
96
- }
97
- BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- BsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardComponent, selector: "bs-card", ngImport: i0, template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] });
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
100
- type: Component,
101
- args: [{ selector: 'bs-card', template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] }]
102
- }], ctorParameters: function () { return []; } });
103
-
104
- class BsCardHeaderComponent {
105
- constructor() {
106
- }
107
- ngOnInit() {
108
- }
109
- }
110
- BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- BsCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardHeaderComponent, selector: "bs-card-header", ngImport: i0, template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] });
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
113
- type: Component,
114
- args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
115
- }], ctorParameters: function () { return []; } });
116
-
117
- class BsCardModule {
118
- }
119
- BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
120
- BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
121
- BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
122
- BsCardHeaderComponent] });
123
- BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
125
- type: NgModule,
126
- args: [{
127
- imports: [CommonModule],
128
- declarations: [
129
- BsCardComponent,
130
- BsCardHeaderComponent
131
- ],
132
- exports: [
133
- BsCardComponent,
134
- BsCardHeaderComponent
135
- ]
136
- }]
137
- }] });
138
-
139
199
  class BsCalendarMonthService {
140
- constructor() {
141
- }
142
200
  getWeeks(month) {
143
- let firstAndLast = this.getFirstAndLastDayOfMonth(month);
144
- let days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
145
- let allDays = [
201
+ const firstAndLast = this.getFirstAndLastDayOfMonth(month);
202
+ const days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
203
+ const allDays = [
146
204
  ...this.generateList(this.dayOfWeekMondayBased(firstAndLast.first)).map(d => null),
147
205
  ...this.generateList(days).map(d => {
148
206
  return {
@@ -152,8 +210,8 @@ class BsCalendarMonthService {
152
210
  }),
153
211
  ...this.generateList(6 - this.dayOfWeekMondayBased(firstAndLast.last)).map(d => null),
154
212
  ];
155
- let weeks = this.chunk(allDays, 7);
156
- let weeksMapped = weeks.map((w, i) => {
213
+ const weeks = this.chunk(allDays, 7);
214
+ const weeksMapped = weeks.map((w, i) => {
157
215
  return {
158
216
  number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), w.find(d => d !== null)?.dayOfMonth)),
159
217
  week: w
@@ -165,7 +223,7 @@ class BsCalendarMonthService {
165
223
  return [...Array(count).keys()];
166
224
  }
167
225
  dayOfWeekMondayBased(date) {
168
- let d = date.getDay() - 1;
226
+ const d = date.getDay() - 1;
169
227
  if (d < 0) {
170
228
  return 6;
171
229
  }
@@ -174,10 +232,10 @@ class BsCalendarMonthService {
174
232
  }
175
233
  }
176
234
  weekOfYear(date) {
177
- let dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
235
+ const dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
178
236
  dateClone.setUTCDate(dateClone.getUTCDate() + 4 - (dateClone.getUTCDay() || 7));
179
- let yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));
180
- let utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);
237
+ const yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));
238
+ const utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);
181
239
  return Math.ceil((utcDiff / (1000 * 60 * 60 * 24) + 1) / 7);
182
240
  }
183
241
  getFirstAndLastDayOfMonth(date) {
@@ -200,7 +258,7 @@ class BsCalendarMonthService {
200
258
  return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
201
259
  }
202
260
  chunk(items, size) {
203
- let result = [];
261
+ const result = [];
204
262
  for (let i = 0; i < items.length; i += size) {
205
263
  result.push(items.slice(i, i + size));
206
264
  }
@@ -214,7 +272,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
214
272
  args: [{
215
273
  providedIn: 'root'
216
274
  }]
217
- }], ctorParameters: function () { return []; } });
275
+ }] });
218
276
 
219
277
  class UcFirstPipe {
220
278
  transform(value, ...args) {
@@ -456,6 +514,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
456
514
  }]
457
515
  }] });
458
516
 
517
+ class BsCardComponent {
518
+ constructor() {
519
+ }
520
+ ngOnInit() {
521
+ }
522
+ ngAfterViewInit() {
523
+ }
524
+ }
525
+ BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
526
+ BsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardComponent, selector: "bs-card", ngImport: i0, template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] });
527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
528
+ type: Component,
529
+ args: [{ selector: 'bs-card', template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] }]
530
+ }], ctorParameters: function () { return []; } });
531
+
532
+ class BsCardHeaderComponent {
533
+ constructor() {
534
+ }
535
+ ngOnInit() {
536
+ }
537
+ }
538
+ BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
539
+ BsCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardHeaderComponent, selector: "bs-card-header", ngImport: i0, template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] });
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
541
+ type: Component,
542
+ args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
543
+ }], ctorParameters: function () { return []; } });
544
+
545
+ class BsCardModule {
546
+ }
547
+ BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
548
+ BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
549
+ BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
550
+ BsCardHeaderComponent] });
551
+ BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
553
+ type: NgModule,
554
+ args: [{
555
+ imports: [CommonModule],
556
+ declarations: [
557
+ BsCardComponent,
558
+ BsCardHeaderComponent
559
+ ],
560
+ exports: [
561
+ BsCardComponent,
562
+ BsCardHeaderComponent
563
+ ]
564
+ }]
565
+ }] });
566
+
459
567
  class BsCarouselImageDirective {
460
568
  constructor(templateRef) {
461
569
  this.templateRef = templateRef;
@@ -473,9 +581,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
473
581
 
474
582
  class BsCarouselComponent {
475
583
  constructor() {
476
- // @HostBinding('@.disabled')
477
- // public animationsDisabled = false;
478
- this.animation = 'slide';
584
+ this.animationsDisabled = false;
585
+ //#region Animation
586
+ this._animation = 'slide';
587
+ //#endregion
479
588
  this.destroyed$ = new Subject();
480
589
  this.currentImageCounter$ = new BehaviorSubject(-1);
481
590
  this.currentImageIndex$ = this.currentImageCounter$
@@ -500,6 +609,16 @@ class BsCarouselComponent {
500
609
  this.currentImageCounter$.next(-1);
501
610
  }
502
611
  }
612
+ set animation(value) {
613
+ this.animationsDisabled = true;
614
+ this._animation = value;
615
+ setTimeout(() => {
616
+ this.animationsDisabled = false;
617
+ }, 20);
618
+ }
619
+ get animation() {
620
+ return this._animation;
621
+ }
503
622
  previousImage() {
504
623
  this.currentImageCounter$
505
624
  .pipe(take$1(1))
@@ -523,11 +642,14 @@ class BsCarouselComponent {
523
642
  }
524
643
  }
525
644
  BsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
526
- 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] });
645
+ BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselComponent, selector: "bs-carousel", inputs: { animation: "animation" }, host: { properties: { "@.disabled": "this.animationsDisabled" } }, 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] });
527
646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, decorators: [{
528
647
  type: Component,
529
648
  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"] }]
530
- }], ctorParameters: function () { return []; }, propDecorators: { animation: [{
649
+ }], ctorParameters: function () { return []; }, propDecorators: { animationsDisabled: [{
650
+ type: HostBinding,
651
+ args: ['@.disabled']
652
+ }], animation: [{
531
653
  type: Input
532
654
  }], images: [{
533
655
  type: ContentChildren,
@@ -560,6 +682,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
560
682
  }]
561
683
  }] });
562
684
 
685
+ class BsContextMenuDirective {
686
+ constructor(overlay, templateRef, viewContainerRef, element) {
687
+ this.overlay = overlay;
688
+ this.templateRef = templateRef;
689
+ this.viewContainerRef = viewContainerRef;
690
+ this.element = element;
691
+ this.overlayRef = null;
692
+ this.templatePortal = null;
693
+ this.element.nativeElement.oncontextmenu = (ev) => {
694
+ ev.preventDefault();
695
+ this.checkAndCloseExisting(ev);
696
+ console.log('d', element.nativeElement);
697
+ this.overlayRef = this.overlay.create({
698
+ hasBackdrop: false,
699
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
700
+ positionStrategy: this.overlay.position()
701
+ // .flexibleConnectedTo({ x: ev.x, y: ev.y })
702
+ .flexibleConnectedTo(this.element)
703
+ .withPositions([
704
+ // element: TopLeft - dropdown: TopLeft
705
+ { originX: "start", originY: "top", overlayX: "start", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
706
+ // // element: TopLeft - dropdown: BottomLeft
707
+ // { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
708
+ // // element: TopLeft - dropdown: TopRight
709
+ // { originX: "start", originY: "top", overlayX: "end", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
710
+ // // element: TopLeft - dropdown: BottomRight
711
+ // { originX: "start", originY: "top", overlayX: "end", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
712
+ ])
713
+ });
714
+ this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
715
+ const view = this.overlayRef.attach(this.templatePortal);
716
+ view.rootNodes.forEach(node => node.classList.add('position-static'));
717
+ };
718
+ }
719
+ clickAnywhere(ev) {
720
+ this.checkAndCloseExisting(ev);
721
+ }
722
+ onBlur() {
723
+ this.close();
724
+ }
725
+ close() {
726
+ if (this.overlayRef) {
727
+ this.overlayRef.detach();
728
+ this.overlayRef.dispose();
729
+ this.overlayRef = null;
730
+ }
731
+ }
732
+ checkAndCloseExisting(ev) {
733
+ if (this.overlayRef && !this.overlayRef.overlayElement.contains(ev.target)) {
734
+ this.close();
735
+ }
736
+ }
737
+ }
738
+ BsContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, deps: [{ token: i1$1.Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef, host: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
739
+ BsContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsContextMenuDirective, selector: "[bsContextMenu]", host: { listeners: { "document:click": "clickAnywhere($event)", "window:blur": "onBlur()" } }, ngImport: i0 });
740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, decorators: [{
741
+ type: Directive,
742
+ args: [{
743
+ selector: '[bsContextMenu]'
744
+ }]
745
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef, decorators: [{
746
+ type: Host
747
+ }, {
748
+ type: SkipSelf
749
+ }] }]; }, propDecorators: { clickAnywhere: [{
750
+ type: HostListener,
751
+ args: ['document:click', ['$event']]
752
+ }], onBlur: [{
753
+ type: HostListener,
754
+ args: ['window:blur']
755
+ }] } });
756
+
757
+ class BsContextMenuModule {
758
+ }
759
+ BsContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
760
+ BsContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, declarations: [BsContextMenuDirective], imports: [CommonModule], exports: [BsContextMenuDirective] });
761
+ BsContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, imports: [[
762
+ CommonModule
763
+ ]] });
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, decorators: [{
765
+ type: NgModule,
766
+ args: [{
767
+ declarations: [
768
+ BsContextMenuDirective
769
+ ],
770
+ imports: [
771
+ CommonModule
772
+ ],
773
+ exports: [
774
+ BsContextMenuDirective
775
+ ]
776
+ }]
777
+ }] });
778
+
563
779
  class BsDatatableColumnDirective {
564
780
  constructor(templateRef) {
565
781
  this.bsDatatableColumn = { name: '', sortable: true };
@@ -870,18 +1086,645 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
870
1086
  }]
871
1087
  }] });
872
1088
 
873
- class BsListGroupItemComponent {
874
- constructor() {
875
- }
876
- ngOnInit() {
877
- }
878
- }
879
- BsListGroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
880
- BsListGroupItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsListGroupItemComponent, selector: "bs-list-group-item", ngImport: i0, template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] });
881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
882
- type: Component,
883
- args: [{ selector: 'bs-list-group-item', template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] }]
884
- }], ctorParameters: function () { return []; } });
1089
+ class BsDropdownMenuDirective extends ClickOutsideDirective {
1090
+ constructor(dropdown, document, viewContainerRef, templateRef, overlay, elementRef, zone, platformId) {
1091
+ super(elementRef, zone, platformId);
1092
+ this.dropdown = dropdown;
1093
+ this.viewContainerRef = viewContainerRef;
1094
+ this.templateRef = templateRef;
1095
+ this.overlay = overlay;
1096
+ this.wait = false;
1097
+ this.destroyed$ = new Subject();
1098
+ this.overlayRef = null;
1099
+ this.templatePortal = null;
1100
+ this.document = document;
1101
+ this.dropdown.isOpen$
1102
+ .pipe(takeUntil(this.destroyed$))
1103
+ .subscribe((isOpen) => {
1104
+ if (isOpen) {
1105
+ this.wait = true;
1106
+ setTimeout(() => this.wait = false, 100);
1107
+ this.overlayRef = this.overlay.create({
1108
+ hasBackdrop: this.dropdown.hasBackdrop,
1109
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
1110
+ positionStrategy: this.overlay.position()
1111
+ .flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
1112
+ .withPositions([
1113
+ // element: BottomLeft - dropdown: TopLeft
1114
+ { originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1115
+ // element: TopLeft - dropdown: BottomLeft
1116
+ { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1117
+ ]),
1118
+ });
1119
+ if (this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
1120
+ this.overlayRef.backdropClick().subscribe(() => {
1121
+ this.dropdown.isOpen = false;
1122
+ });
1123
+ }
1124
+ this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
1125
+ this.overlayRef.attach(this.templatePortal);
1126
+ }
1127
+ else {
1128
+ if (this.overlayRef) {
1129
+ this.overlayRef.detach();
1130
+ this.overlayRef.dispose();
1131
+ this.overlayRef = null;
1132
+ }
1133
+ }
1134
+ });
1135
+ }
1136
+ clickedOutside(ev) {
1137
+ if (!this.wait) {
1138
+ if (!this.overlayRef?.overlayElement.contains(ev.target)) {
1139
+ this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1140
+ if (isOpen && !this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
1141
+ this.dropdown.isOpen = false;
1142
+ }
1143
+ });
1144
+ }
1145
+ }
1146
+ }
1147
+ }
1148
+ BsDropdownMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, deps: [{ token: forwardRef(() => BsDropdownDirective) }, { token: DOCUMENT }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
1149
+ BsDropdownMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]", host: { listeners: { "clickOutside": "clickedOutside($event)" }, properties: { "class.show": "dropdown.isOpen" } }, usesInheritance: true, ngImport: i0 });
1150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
1151
+ type: Directive,
1152
+ args: [{
1153
+ selector: '[bsDropdownMenu]',
1154
+ host: {
1155
+ '[class.show]': 'dropdown.isOpen',
1156
+ },
1157
+ }]
1158
+ }], ctorParameters: function () { return [{ type: BsDropdownDirective, decorators: [{
1159
+ type: Inject,
1160
+ args: [forwardRef(() => BsDropdownDirective)]
1161
+ }] }, { type: undefined, decorators: [{
1162
+ type: Inject,
1163
+ args: [DOCUMENT]
1164
+ }] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: Object, decorators: [{
1165
+ type: Inject,
1166
+ args: [PLATFORM_ID]
1167
+ }] }]; }, propDecorators: { clickedOutside: [{
1168
+ type: HostListener,
1169
+ args: ['clickOutside', ['$event']]
1170
+ }] } });
1171
+
1172
+ class BsDropdownToggleDirective {
1173
+ constructor(dropdown, toggleButton) {
1174
+ this.dropdown = dropdown;
1175
+ this.toggleButton = toggleButton;
1176
+ }
1177
+ onClick() {
1178
+ this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1179
+ this.dropdown.isOpen$.next(!isOpen);
1180
+ });
1181
+ }
1182
+ }
1183
+ BsDropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, deps: [{ token: BsDropdownDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1184
+ BsDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
1186
+ type: Directive,
1187
+ args: [{
1188
+ selector: '[bsDropdownToggle]'
1189
+ }]
1190
+ }], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
1191
+ type: HostListener,
1192
+ args: ['click']
1193
+ }] } });
1194
+
1195
+ class BsDropdownDirective {
1196
+ constructor(elementRef) {
1197
+ this.isOpen$ = new BehaviorSubject(false);
1198
+ this.toggle = null;
1199
+ this.hasBackdrop = false;
1200
+ this.sameWidth = false;
1201
+ this.closeOnClickOutside = false;
1202
+ this.isOpenChange = new EventEmitter();
1203
+ this.elementRef = elementRef;
1204
+ }
1205
+ //#region IsOpen
1206
+ get isOpen() {
1207
+ return this.isOpen$.value;
1208
+ }
1209
+ set isOpen(value) {
1210
+ if (this.isOpen$.value !== value) {
1211
+ this.isOpen$.next(value);
1212
+ this.isOpenChange.emit(value);
1213
+ }
1214
+ }
1215
+ //#endregion
1216
+ onBlur() {
1217
+ this.isOpen = false;
1218
+ }
1219
+ }
1220
+ BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1221
+ BsDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: { hasBackdrop: "hasBackdrop", sameWidth: "sameWidth", closeOnClickOutside: "closeOnClickOutside", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, host: { listeners: { "window:blur": "onBlur()" } }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
1222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
1223
+ type: Directive,
1224
+ args: [{
1225
+ selector: '[bsDropdown]'
1226
+ }]
1227
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { menu: [{
1228
+ type: ContentChild,
1229
+ args: [BsDropdownMenuDirective, { static: false }]
1230
+ }], toggle: [{
1231
+ type: ContentChild,
1232
+ args: [BsDropdownToggleDirective, { static: false }]
1233
+ }], hasBackdrop: [{
1234
+ type: Input
1235
+ }], sameWidth: [{
1236
+ type: Input
1237
+ }], closeOnClickOutside: [{
1238
+ type: Input
1239
+ }], isOpenChange: [{
1240
+ type: Output
1241
+ }], isOpen: [{
1242
+ type: Input
1243
+ }], onBlur: [{
1244
+ type: HostListener,
1245
+ args: ['window:blur']
1246
+ }] } });
1247
+
1248
+ class BsDatepickerComponent {
1249
+ constructor() {
1250
+ this.selectedDate = new Date();
1251
+ this.currentMonth = new Date();
1252
+ }
1253
+ ngOnInit() {
1254
+ }
1255
+ }
1256
+ BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1257
+ BsDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatepickerComponent, selector: "bs-datepicker", ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""], components: [{ type: BsCalendarComponent, selector: "bs-calendar", inputs: ["currentMonth", "selectedDate"], outputs: ["currentMonthChange", "selectedDateChange"] }], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }], pipes: { "date": i1.DatePipe } });
1258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
1259
+ type: Component,
1260
+ args: [{ selector: 'bs-datepicker', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""] }]
1261
+ }], ctorParameters: function () { return []; } });
1262
+
1263
+ class BsDropdownModule {
1264
+ }
1265
+ BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1266
+ BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
1267
+ BsDropdownToggleDirective,
1268
+ BsDropdownMenuDirective], imports: [CommonModule,
1269
+ OverlayModule,
1270
+ ClickOutsideModule], exports: [BsDropdownDirective,
1271
+ BsDropdownToggleDirective,
1272
+ BsDropdownMenuDirective] });
1273
+ BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
1274
+ CommonModule,
1275
+ OverlayModule,
1276
+ ClickOutsideModule
1277
+ ]] });
1278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
1279
+ type: NgModule,
1280
+ args: [{
1281
+ declarations: [
1282
+ BsDropdownDirective,
1283
+ BsDropdownToggleDirective,
1284
+ BsDropdownMenuDirective
1285
+ ],
1286
+ imports: [
1287
+ CommonModule,
1288
+ OverlayModule,
1289
+ ClickOutsideModule
1290
+ ],
1291
+ exports: [
1292
+ BsDropdownDirective,
1293
+ BsDropdownToggleDirective,
1294
+ BsDropdownMenuDirective
1295
+ ]
1296
+ }]
1297
+ }] });
1298
+
1299
+ class BsDatepickerModule {
1300
+ }
1301
+ BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1302
+ BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
1303
+ BsCalendarModule,
1304
+ BsDropdownModule], exports: [BsDatepickerComponent] });
1305
+ BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
1306
+ CommonModule,
1307
+ BsCalendarModule,
1308
+ BsDropdownModule
1309
+ ]] });
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
1311
+ type: NgModule,
1312
+ args: [{
1313
+ declarations: [
1314
+ BsDatepickerComponent
1315
+ ],
1316
+ imports: [
1317
+ CommonModule,
1318
+ BsCalendarModule,
1319
+ BsDropdownModule
1320
+ ],
1321
+ exports: [
1322
+ BsDatepickerComponent
1323
+ ]
1324
+ }]
1325
+ }] });
1326
+
1327
+ class BsProgressComponent {
1328
+ constructor() {
1329
+ this.progressClass = true;
1330
+ this.height = null;
1331
+ this.isIndeterminate = false;
1332
+ }
1333
+ }
1334
+ BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1335
+ BsProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressComponent, selector: "bs-progress", inputs: { height: "height", isIndeterminate: "isIndeterminate" }, host: { properties: { "class.progress": "this.progressClass", "style.height.px": "this.height" } }, ngImport: i0, template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
1337
+ type: Component,
1338
+ args: [{ selector: 'bs-progress', template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"] }]
1339
+ }], propDecorators: { progressClass: [{
1340
+ type: HostBinding,
1341
+ args: ['class.progress']
1342
+ }], height: [{
1343
+ type: Input
1344
+ }, {
1345
+ type: HostBinding,
1346
+ args: ['style.height.px']
1347
+ }], isIndeterminate: [{
1348
+ type: Input
1349
+ }] } });
1350
+
1351
+ class BsProgressBarComponent {
1352
+ constructor() {
1353
+ this.destroyed$ = new Subject();
1354
+ this.minimum$ = new BehaviorSubject(0);
1355
+ this.maximum$ = new BehaviorSubject(100);
1356
+ this.value$ = new BehaviorSubject(50);
1357
+ this.color$ = new BehaviorSubject(Color.primary);
1358
+ this.striped = false;
1359
+ this.animated = false;
1360
+ this.progressBar = true;
1361
+ this.colorClass = 'bg-primary';
1362
+ this.widthStyle = '0';
1363
+ this.role = 'progressbar';
1364
+ this.valueNow = 50;
1365
+ this.valueMin = 0;
1366
+ this.valueMax = 100;
1367
+ this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
1368
+ .pipe(map(([minimum, maximum, value]) => {
1369
+ return (value - minimum) / (maximum - minimum) * 100;
1370
+ }));
1371
+ this.width$ = this.percentage$
1372
+ .pipe(map((width) => {
1373
+ return String(width) + '%';
1374
+ }));
1375
+ this.colorClass$ = this.color$
1376
+ .pipe(map((color) => {
1377
+ const name = Color[color];
1378
+ return `bg-${name}`;
1379
+ }));
1380
+ this.colorClass$
1381
+ .pipe(takeUntil(this.destroyed$))
1382
+ .subscribe((color) => {
1383
+ this.colorClass = color;
1384
+ });
1385
+ this.width$
1386
+ .pipe(takeUntil(this.destroyed$))
1387
+ .subscribe((width) => {
1388
+ this.widthStyle = width;
1389
+ });
1390
+ this.value$
1391
+ .pipe(takeUntil(this.destroyed$))
1392
+ .subscribe((value) => {
1393
+ this.valueNow = value;
1394
+ });
1395
+ this.minimum$
1396
+ .pipe(takeUntil(this.destroyed$))
1397
+ .subscribe((value) => {
1398
+ this.valueMin = value;
1399
+ });
1400
+ this.maximum$
1401
+ .pipe(takeUntil(this.destroyed$))
1402
+ .subscribe((value) => {
1403
+ this.valueMax = value;
1404
+ });
1405
+ }
1406
+ set minimum(value) {
1407
+ this.minimum$.next(value);
1408
+ }
1409
+ set maximum(value) {
1410
+ this.maximum$.next(value);
1411
+ }
1412
+ set value(value) {
1413
+ this.value$.next(value);
1414
+ }
1415
+ set color(value) {
1416
+ this.color$.next(value);
1417
+ }
1418
+ ngOnDestroy() {
1419
+ this.destroyed$.next(true);
1420
+ }
1421
+ }
1422
+ BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1423
+ BsProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: { minimum: "minimum", maximum: "maximum", value: "value", color: "color", striped: "striped", animated: "animated" }, host: { properties: { "class.progress-bar-striped": "this.striped", "class.progress-bar-animated": "this.animated", "class.progress-bar": "this.progressBar", "class": "this.colorClass", "style.width": "this.widthStyle", "attr.role": "this.role", "attr.aria-valuenow": "this.valueNow", "attr.aria-valuemin": "this.valueMin", "attr.aria-valuemax": "this.valueMax" } }, ngImport: i0, template: "", styles: [""] });
1424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
1425
+ type: Component,
1426
+ args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
1427
+ }], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
1428
+ type: Input
1429
+ }], maximum: [{
1430
+ type: Input
1431
+ }], value: [{
1432
+ type: Input
1433
+ }], color: [{
1434
+ type: Input
1435
+ }], striped: [{
1436
+ type: Input
1437
+ }, {
1438
+ type: HostBinding,
1439
+ args: ['class.progress-bar-striped']
1440
+ }], animated: [{
1441
+ type: Input
1442
+ }, {
1443
+ type: HostBinding,
1444
+ args: ['class.progress-bar-animated']
1445
+ }], progressBar: [{
1446
+ type: HostBinding,
1447
+ args: ['class.progress-bar']
1448
+ }], colorClass: [{
1449
+ type: HostBinding,
1450
+ args: ['class']
1451
+ }], widthStyle: [{
1452
+ type: HostBinding,
1453
+ args: ['style.width']
1454
+ }], role: [{
1455
+ type: HostBinding,
1456
+ args: ['attr.role']
1457
+ }], valueNow: [{
1458
+ type: HostBinding,
1459
+ args: ['attr.aria-valuenow']
1460
+ }], valueMin: [{
1461
+ type: HostBinding,
1462
+ args: ['attr.aria-valuemin']
1463
+ }], valueMax: [{
1464
+ type: HostBinding,
1465
+ args: ['attr.aria-valuemax']
1466
+ }] } });
1467
+
1468
+ class BsForDirective {
1469
+ onMouseClick() {
1470
+ if (!('tagName' in this.bsFor)) {
1471
+ this.bsFor.focus();
1472
+ }
1473
+ else if (this.bsFor.tagName.toLowerCase() !== 'input') {
1474
+ this.bsFor.focus();
1475
+ }
1476
+ else if (this.bsFor.type.toLowerCase() === 'file') {
1477
+ this.bsFor.click();
1478
+ }
1479
+ else {
1480
+ this.bsFor.focus();
1481
+ }
1482
+ }
1483
+ }
1484
+ BsForDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1485
+ BsForDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsForDirective, selector: "[bsFor]", inputs: { bsFor: "bsFor" }, host: { listeners: { "click": "onMouseClick()" } }, ngImport: i0 });
1486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, decorators: [{
1487
+ type: Directive,
1488
+ args: [{
1489
+ selector: '[bsFor]'
1490
+ }]
1491
+ }], propDecorators: { bsFor: [{
1492
+ type: Input
1493
+ }], onMouseClick: [{
1494
+ type: HostListener,
1495
+ args: ['click']
1496
+ }] } });
1497
+
1498
+ class BsFormatBytesPipe {
1499
+ transform(value, decimals = 2) {
1500
+ if (value === 0) {
1501
+ return "0 Bytes";
1502
+ }
1503
+ const k = 1024;
1504
+ const dm = decimals <= 0 ? 0 : decimals;
1505
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
1506
+ const i = Math.floor(Math.log(value) / Math.log(k));
1507
+ return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
1508
+ }
1509
+ }
1510
+ BsFormatBytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1511
+ BsFormatBytesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, name: "bsFormatBytes" });
1512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, decorators: [{
1513
+ type: Pipe,
1514
+ args: [{
1515
+ name: 'bsFormatBytes'
1516
+ }]
1517
+ }] });
1518
+
1519
+ class BsFileUploadComponent {
1520
+ constructor() {
1521
+ this.dropFilesCaption = 'Drop your files here';
1522
+ this.browseFilesCaption = 'Browse for files';
1523
+ this.placeholder = 'Drop files to upload';
1524
+ this.isDraggingFile = false;
1525
+ this.files = [];
1526
+ this.filesDropped = new EventEmitter();
1527
+ }
1528
+ onChange(event) {
1529
+ console.log('event', event);
1530
+ if (!event.target)
1531
+ return;
1532
+ if (!('files' in event.target))
1533
+ return;
1534
+ if (!event.target['files'])
1535
+ return;
1536
+ const files = event.target.files;
1537
+ if (!files)
1538
+ return;
1539
+ this.processDroppedFiles(files);
1540
+ }
1541
+ onDragOver(event) {
1542
+ event.preventDefault();
1543
+ event.stopPropagation();
1544
+ if (event.dataTransfer) {
1545
+ this.isDraggingFile = true;
1546
+ event.dataTransfer.effectAllowed = "copy";
1547
+ }
1548
+ }
1549
+ onDragLeave(event) {
1550
+ event.preventDefault();
1551
+ event.stopPropagation();
1552
+ this.isDraggingFile = false;
1553
+ }
1554
+ onDrop(event) {
1555
+ event.preventDefault();
1556
+ event.stopPropagation();
1557
+ this.isDraggingFile = false;
1558
+ if (event.dataTransfer && event.dataTransfer.files) {
1559
+ this.processDroppedFiles(event.dataTransfer.files);
1560
+ }
1561
+ }
1562
+ processDroppedFiles(fileList) {
1563
+ const newFiles = [...Array(fileList.length).keys()]
1564
+ .map(i => fileList.item(i))
1565
+ .filter(f => !!f)
1566
+ .map(f => ({ file: f, progress: 0 }));
1567
+ this.files.push(...newFiles);
1568
+ this.filesDropped.emit(newFiles);
1569
+ }
1570
+ }
1571
+ BsFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1572
+ BsFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsFileUploadComponent, selector: "bs-file-upload", inputs: { dropFilesCaption: "dropFilesCaption", browseFilesCaption: "browseFilesCaption", placeholder: "placeholder", files: "files" }, outputs: { filesDropped: "filesDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0, template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder\" [placeholder]=\"placeholder\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption }}</label>\n</div>\n<ul class=\"list-group files-list\">\n <li class=\"list-group-item\" *ngFor=\"let upload of files\">\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </li>\n</ul>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#DC88A8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"], components: [{ type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate"] }, { type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: ["minimum", "maximum", "value", "color", "striped", "animated"] }], directives: [{ type: BsForDirective, selector: "[bsFor]", inputs: ["bsFor"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "bsFormatBytes": BsFormatBytesPipe } });
1573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, decorators: [{
1574
+ type: Component,
1575
+ args: [{ selector: 'bs-file-upload', template: "<div class=\"dropzone border position-relative p-5\" [class.dragging]=\"isDraggingFile\">\n <input type=\"file\" multiple #fileUpload (change)=\"onChange($event)\" [title]=\"placeholder\" [placeholder]=\"placeholder\" class=\"position-absolute w-100 h-100\">\n <!-- <img src=\"/assets/ic-file-upload.svg\" [alt]=\"placeholder\"> -->\n <span class=\"h3 d-block\">{{ dropFilesCaption }}</span>\n <label class=\"btn btn-primary position-relative\" [bsFor]=\"fileUpload\">{{ browseFilesCaption }}</label>\n</div>\n<ul class=\"list-group files-list\">\n <li class=\"list-group-item\" *ngFor=\"let upload of files\">\n <ng-container *ngTemplateOutlet=\"fileTemplate ?? defaultFileTemplate; context: { $implicit: upload }\"></ng-container>\n </li>\n</ul>\n\n<ng-template #defaultFileTemplate let-upload>\n <div class=\"d-flex flex-row mx-auto\">\n <div class=\"file-img\"></div>\n <div class=\"flex-grow-1 text-start px-2\">\n <span class=\"d-block text-truncate text-secondary\">{{ upload.file.name }}</span>\n <span class=\"d-block text-grey mb-0\">{{ upload.file.size | bsFormatBytes }}</span>\n <bs-progress [height]=\"4\">\n <bs-progress-bar [minimum]=\"0\" [maximum]=\"upload.file.size\" [value]=\"upload.progress\"></bs-progress-bar>\n </bs-progress>\n </div>\n </div>\n</ng-template>", styles: [".dropzone{z-index:1}.dropzone.dragging{border:4px solid #CB1535!important;background:#DC88A8;margin:-3px -3px -4px}.dropzone input{opacity:0;z-index:2;top:0;left:0}.dropzone .btn{z-index:5}.files-list{margin-top:-1px}.files-list .d-flex{max-width:400px}.text-grey{color:#999}.list-group span{margin:-5px auto}\n"] }]
1576
+ }], propDecorators: { dropFilesCaption: [{
1577
+ type: Input
1578
+ }], browseFilesCaption: [{
1579
+ type: Input
1580
+ }], placeholder: [{
1581
+ type: Input
1582
+ }], files: [{
1583
+ type: Input
1584
+ }], filesDropped: [{
1585
+ type: Output
1586
+ }], onDragOver: [{
1587
+ type: HostListener,
1588
+ args: ['dragover', ['$event']]
1589
+ }], onDragLeave: [{
1590
+ type: HostListener,
1591
+ args: ['dragleave', ['$event']]
1592
+ }], onDrop: [{
1593
+ type: HostListener,
1594
+ args: ['drop', ['$event']]
1595
+ }] } });
1596
+
1597
+ class BsFileUploadTemplateDirective {
1598
+ constructor(fileUploadComponent, templateRef) {
1599
+ fileUploadComponent.fileTemplate = templateRef;
1600
+ }
1601
+ }
1602
+ BsFileUploadTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadTemplateDirective, deps: [{ token: BsFileUploadComponent }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1603
+ BsFileUploadTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsFileUploadTemplateDirective, selector: "[bsFileUploadTemplate]", ngImport: i0 });
1604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadTemplateDirective, decorators: [{
1605
+ type: Directive,
1606
+ args: [{
1607
+ selector: '[bsFileUploadTemplate]'
1608
+ }]
1609
+ }], ctorParameters: function () { return [{ type: BsFileUploadComponent }, { type: i0.TemplateRef }]; } });
1610
+
1611
+ class BsForModule {
1612
+ }
1613
+ BsForModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1614
+ BsForModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, declarations: [BsForDirective], imports: [CommonModule], exports: [BsForDirective] });
1615
+ BsForModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, imports: [[
1616
+ CommonModule
1617
+ ]] });
1618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, decorators: [{
1619
+ type: NgModule,
1620
+ args: [{
1621
+ declarations: [
1622
+ BsForDirective
1623
+ ],
1624
+ imports: [
1625
+ CommonModule
1626
+ ],
1627
+ exports: [
1628
+ BsForDirective
1629
+ ]
1630
+ }]
1631
+ }] });
1632
+
1633
+ class BsProgressBarModule {
1634
+ }
1635
+ BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1636
+ BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
1637
+ BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
1638
+ BsProgressComponent] });
1639
+ BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
1640
+ CommonModule
1641
+ ]] });
1642
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
1643
+ type: NgModule,
1644
+ args: [{
1645
+ declarations: [
1646
+ BsProgressBarComponent,
1647
+ BsProgressComponent
1648
+ ],
1649
+ imports: [
1650
+ CommonModule
1651
+ ],
1652
+ exports: [
1653
+ BsProgressBarComponent,
1654
+ BsProgressComponent
1655
+ ]
1656
+ }]
1657
+ }] });
1658
+
1659
+ class BsFormatBytesModule {
1660
+ }
1661
+ BsFormatBytesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1662
+ BsFormatBytesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, declarations: [BsFormatBytesPipe], imports: [CommonModule], exports: [BsFormatBytesPipe] });
1663
+ BsFormatBytesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, imports: [[
1664
+ CommonModule
1665
+ ]] });
1666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, decorators: [{
1667
+ type: NgModule,
1668
+ args: [{
1669
+ declarations: [
1670
+ BsFormatBytesPipe
1671
+ ],
1672
+ imports: [
1673
+ CommonModule
1674
+ ],
1675
+ exports: [
1676
+ BsFormatBytesPipe
1677
+ ]
1678
+ }]
1679
+ }] });
1680
+
1681
+ class BsFileUploadModule {
1682
+ }
1683
+ BsFileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1684
+ BsFileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, declarations: [BsFileUploadComponent,
1685
+ BsFileUploadTemplateDirective], imports: [CommonModule,
1686
+ BsForModule,
1687
+ BsFormatBytesModule,
1688
+ BsProgressBarModule], exports: [BsFileUploadComponent,
1689
+ BsFileUploadTemplateDirective] });
1690
+ BsFileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, imports: [[
1691
+ CommonModule,
1692
+ BsForModule,
1693
+ BsFormatBytesModule,
1694
+ BsProgressBarModule
1695
+ ]] });
1696
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, decorators: [{
1697
+ type: NgModule,
1698
+ args: [{
1699
+ declarations: [
1700
+ BsFileUploadComponent,
1701
+ BsFileUploadTemplateDirective
1702
+ ],
1703
+ imports: [
1704
+ CommonModule,
1705
+ BsForModule,
1706
+ BsFormatBytesModule,
1707
+ BsProgressBarModule
1708
+ ],
1709
+ exports: [
1710
+ BsFileUploadComponent,
1711
+ BsFileUploadTemplateDirective
1712
+ ]
1713
+ }]
1714
+ }] });
1715
+
1716
+ class BsListGroupItemComponent {
1717
+ constructor() {
1718
+ }
1719
+ ngOnInit() {
1720
+ }
1721
+ }
1722
+ BsListGroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1723
+ BsListGroupItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsListGroupItemComponent, selector: "bs-list-group-item", ngImport: i0, template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] });
1724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
1725
+ type: Component,
1726
+ args: [{ selector: 'bs-list-group-item', template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] }]
1727
+ }], ctorParameters: function () { return []; } });
885
1728
 
886
1729
  class BsListGroupComponent {
887
1730
  constructor() {
@@ -909,58 +1752,154 @@ BsListGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
909
1752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupModule, decorators: [{
910
1753
  type: NgModule,
911
1754
  args: [{
912
- imports: [CommonModule],
1755
+ imports: [CommonModule],
1756
+ declarations: [
1757
+ BsListGroupComponent,
1758
+ BsListGroupItemComponent
1759
+ ],
1760
+ exports: [
1761
+ BsListGroupComponent,
1762
+ BsListGroupItemComponent
1763
+ ]
1764
+ }]
1765
+ }] });
1766
+
1767
+ class BsMultiselectComponent {
1768
+ constructor() {
1769
+ this.items = [];
1770
+ this.selectedItems = [];
1771
+ }
1772
+ itemChange(item, event) {
1773
+ if (!!event.target.checked) {
1774
+ this.selectedItems.push(item);
1775
+ }
1776
+ else {
1777
+ this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
1778
+ }
1779
+ }
1780
+ ngOnInit() {
1781
+ }
1782
+ }
1783
+ BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1784
+ BsMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsMultiselectComponent, selector: "bs-multiselect", inputs: { items: "items", selectedItems: "selectedItems" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white mw-250px p-3 border rounded shadow\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n <hr class=\"my-2\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [".mw-250px{min-width:250px}\n"], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
1786
+ type: Component,
1787
+ args: [{ selector: 'bs-multiselect', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white mw-250px p-3 border rounded shadow\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n <hr class=\"my-2\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [".mw-250px{min-width:250px}\n"] }]
1788
+ }], ctorParameters: function () { return []; }, propDecorators: { template: [{
1789
+ type: ContentChild,
1790
+ args: [TemplateRef]
1791
+ }], items: [{
1792
+ type: Input
1793
+ }], selectedItems: [{
1794
+ type: Input
1795
+ }] } });
1796
+
1797
+ class BsMultiselectModule {
1798
+ }
1799
+ BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1800
+ BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
1801
+ BsDropdownModule,
1802
+ FocusOnLoadModule], exports: [BsMultiselectComponent] });
1803
+ BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
1804
+ CommonModule,
1805
+ BsDropdownModule,
1806
+ FocusOnLoadModule,
1807
+ ]] });
1808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
1809
+ type: NgModule,
1810
+ args: [{
913
1811
  declarations: [
914
- BsListGroupComponent,
915
- BsListGroupItemComponent
1812
+ BsMultiselectComponent
1813
+ ],
1814
+ imports: [
1815
+ CommonModule,
1816
+ BsDropdownModule,
1817
+ FocusOnLoadModule,
916
1818
  ],
917
1819
  exports: [
918
- BsListGroupComponent,
919
- BsListGroupItemComponent
1820
+ BsMultiselectComponent
920
1821
  ]
921
1822
  }]
922
1823
  }] });
923
1824
 
924
1825
  class BsNavbarComponent {
925
1826
  constructor() {
926
- this.isExpanded = false;
1827
+ this.isExpanded$ = new BehaviorSubject(false);
927
1828
  }
928
1829
  toggleExpanded() {
929
- this.isExpanded = !this.isExpanded;
1830
+ this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
1831
+ this.isExpanded$.next(!isExpanded);
1832
+ });
930
1833
  }
931
1834
  }
932
1835
  BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
933
- 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"] });
1836
+ 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"] });
934
1837
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
935
1838
  type: Component,
936
- 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"] }]
937
- }], ctorParameters: function () { return []; }, propDecorators: { nav: [{
1839
+ 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"] }]
1840
+ }], propDecorators: { nav: [{
938
1841
  type: ViewChild,
939
1842
  args: ['nav']
940
1843
  }] } });
941
1844
 
942
1845
  class BsNavbarNavComponent {
943
1846
  constructor(bsNavbar) {
944
- //#region collapse
945
- this._collapse = true;
1847
+ this.collapse$ = new BehaviorSubject(true);
1848
+ this.windowWidth$ = new BehaviorSubject(null);
1849
+ this.isResizing$ = new BehaviorSubject(false);
1850
+ this.destroyed$ = new Subject();
946
1851
  this.bsNavbar = bsNavbar;
1852
+ this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.windowWidth$])
1853
+ .pipe(filter(([isExpanded, windowWidth]) => {
1854
+ return windowWidth !== null;
1855
+ }))
1856
+ .pipe(map(([isExpanded, windowWidth]) => {
1857
+ if (windowWidth === null) {
1858
+ throw 'windowWidth should not be null here';
1859
+ }
1860
+ else if (windowWidth >= 768) {
1861
+ return true;
1862
+ }
1863
+ else if (isExpanded) {
1864
+ return true;
1865
+ }
1866
+ else {
1867
+ return false;
1868
+ }
1869
+ }));
1870
+ this.windowWidth$
1871
+ .pipe(debounceTime(300), takeUntil(this.destroyed$))
1872
+ .subscribe(() => {
1873
+ this.isResizing$.next(false);
1874
+ });
1875
+ this.onWindowResize();
947
1876
  }
948
- ngOnInit() {
1877
+ ngOnDestroy() {
1878
+ this.destroyed$.next(true);
949
1879
  }
1880
+ //#region collapse
950
1881
  set collapse(value) {
951
- this._collapse = value;
1882
+ this.collapse$.next(value);
952
1883
  }
953
1884
  get collapse() {
954
- return this._collapse;
1885
+ return this.collapse$.value;
1886
+ }
1887
+ //#endregion
1888
+ onWindowResize() {
1889
+ this.isResizing$.next(true);
1890
+ this.windowWidth$.next(window.innerWidth);
955
1891
  }
956
1892
  }
957
1893
  BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
958
- 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 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] });
1894
+ 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] });
959
1895
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
960
1896
  type: Component,
961
- args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], 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"] }]
1897
+ 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"] }]
962
1898
  }], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
963
1899
  type: Input
1900
+ }], onWindowResize: [{
1901
+ type: HostListener,
1902
+ args: ['window:resize']
964
1903
  }] } });
965
1904
 
966
1905
  class BsNavbarItemComponent {
@@ -1019,7 +1958,7 @@ class BsNavbarDropdownComponent {
1019
1958
  }
1020
1959
  }
1021
1960
  BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, deps: [{ token: BsNavbarDropdownComponent, host: true, optional: true, skipSelf: true }, { token: forwardRef(() => BsNavbarItemComponent), host: true }], target: i0.ɵɵFactoryTarget.Component });
1022
- BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: i0.forwardRef(function () { return 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: i1$1.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
1961
+ BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: i0.forwardRef(function () { return 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: i1$2.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
1023
1962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
1024
1963
  type: Component,
1025
1964
  args: [{ selector: 'bs-navbar-dropdown', 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"] }]
@@ -1050,225 +1989,580 @@ class DropdownToggleDirective {
1050
1989
  }
1051
1990
  }
1052
1991
  }
1053
- DropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DropdownToggleDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarItemComponent) }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1054
- DropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: DropdownToggleDirective, selector: "bs-navbar-item", queries: [{ propertyName: "childDropdowns", predicate: BsNavbarDropdownComponent }], ngImport: i0 });
1055
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DropdownToggleDirective, decorators: [{
1056
- type: Directive,
1992
+ DropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DropdownToggleDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarItemComponent) }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1993
+ DropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: DropdownToggleDirective, selector: "bs-navbar-item", queries: [{ propertyName: "childDropdowns", predicate: BsNavbarDropdownComponent }], ngImport: i0 });
1994
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DropdownToggleDirective, decorators: [{
1995
+ type: Directive,
1996
+ args: [{
1997
+ // selector: 'bs-navbar-item > a[routerLink]',
1998
+ selector: 'bs-navbar-item',
1999
+ queries: {
2000
+ childDropdowns: new ContentChildren(BsNavbarDropdownComponent)
2001
+ }
2002
+ }]
2003
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarItemComponent, decorators: [{
2004
+ type: Inject,
2005
+ args: [forwardRef(() => BsNavbarItemComponent)]
2006
+ }] }, { type: BsNavbarDropdownComponent, decorators: [{
2007
+ type: Optional
2008
+ }, {
2009
+ type: Inject,
2010
+ args: [forwardRef(() => BsNavbarDropdownComponent)]
2011
+ }] }]; } });
2012
+
2013
+ class NavLinkDirective {
2014
+ constructor(elementRef, parentDropdown) {
2015
+ this.elementRef = elementRef;
2016
+ if (parentDropdown == null) {
2017
+ this.elementRef.nativeElement.classList.add('nav-link');
2018
+ }
2019
+ else {
2020
+ this.elementRef.nativeElement.classList.add('dropdown-item');
2021
+ }
2022
+ }
2023
+ }
2024
+ NavLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavLinkDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2025
+ NavLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
2026
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavLinkDirective, decorators: [{
2027
+ type: Directive,
2028
+ args: [{
2029
+ selector: 'bs-navbar-item > a[routerLink]'
2030
+ }]
2031
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarDropdownComponent, decorators: [{
2032
+ type: Optional
2033
+ }, {
2034
+ type: Inject,
2035
+ args: [forwardRef(() => BsNavbarDropdownComponent)]
2036
+ }] }]; } });
2037
+
2038
+ class NavbarContentDirective {
2039
+ constructor(element) {
2040
+ this.element = element;
2041
+ this.initialPadding = 0;
2042
+ this.resizeObserver = new ResizeObserver((entries) => {
2043
+ let height = entries[0].contentRect.height;
2044
+ this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
2045
+ });
2046
+ }
2047
+ ngAfterViewInit() {
2048
+ let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
2049
+ this.initialPadding = isNaN(p) ? 0 : p;
2050
+ this.resizeObserver.observe(this.navbar.nav.nativeElement);
2051
+ }
2052
+ ngOnDestroy() {
2053
+ this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
2054
+ }
2055
+ }
2056
+ NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2057
+ NavbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
2058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, decorators: [{
2059
+ type: Directive,
2060
+ args: [{
2061
+ selector: '[navbarContent]'
2062
+ }]
2063
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
2064
+ type: Input,
2065
+ args: ['navbarContent']
2066
+ }] } });
2067
+
2068
+ class BsNavbarModule {
2069
+ }
2070
+ BsNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2071
+ BsNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, declarations: [BsNavbarComponent,
2072
+ BsNavbarNavComponent,
2073
+ BsNavbarDropdownComponent,
2074
+ BsNavbarItemComponent,
2075
+ DropdownToggleDirective,
2076
+ NavLinkDirective,
2077
+ NavbarContentDirective], imports: [CommonModule,
2078
+ RouterModule,
2079
+ ClickOutsideModule], exports: [BsNavbarComponent,
2080
+ BsNavbarNavComponent,
2081
+ BsNavbarDropdownComponent,
2082
+ BsNavbarItemComponent,
2083
+ DropdownToggleDirective,
2084
+ NavLinkDirective,
2085
+ NavbarContentDirective] });
2086
+ BsNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, imports: [[
2087
+ CommonModule,
2088
+ RouterModule,
2089
+ ClickOutsideModule
2090
+ ]] });
2091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, decorators: [{
2092
+ type: NgModule,
2093
+ args: [{
2094
+ declarations: [
2095
+ BsNavbarComponent,
2096
+ BsNavbarNavComponent,
2097
+ BsNavbarDropdownComponent,
2098
+ BsNavbarItemComponent,
2099
+ DropdownToggleDirective,
2100
+ NavLinkDirective,
2101
+ NavbarContentDirective
2102
+ ],
2103
+ imports: [
2104
+ CommonModule,
2105
+ RouterModule,
2106
+ ClickOutsideModule
2107
+ ],
2108
+ exports: [
2109
+ BsNavbarComponent,
2110
+ BsNavbarNavComponent,
2111
+ BsNavbarDropdownComponent,
2112
+ BsNavbarItemComponent,
2113
+ DropdownToggleDirective,
2114
+ NavLinkDirective,
2115
+ NavbarContentDirective
2116
+ ]
2117
+ }]
2118
+ }] });
2119
+
2120
+ class BsScrollOffsetService {
2121
+ constructor(routerConfig) {
2122
+ this.routerConfig = routerConfig;
2123
+ }
2124
+ getScrollOffset() {
2125
+ if (!this.routerConfig.scrollOffset) {
2126
+ return [0, 0];
2127
+ }
2128
+ else if (Array.isArray(this.routerConfig.scrollOffset)) {
2129
+ return this.routerConfig.scrollOffset;
2130
+ }
2131
+ else {
2132
+ return this.routerConfig.scrollOffset();
2133
+ }
2134
+ }
2135
+ }
2136
+ BsScrollOffsetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, deps: [{ token: ROUTER_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
2137
+ BsScrollOffsetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, providedIn: 'root' });
2138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, decorators: [{
2139
+ type: Injectable,
2140
+ args: [{
2141
+ providedIn: 'root'
2142
+ }]
2143
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2144
+ type: Inject,
2145
+ args: [ROUTER_CONFIGURATION]
2146
+ }] }]; } });
2147
+
2148
+ class BsScrollspyDirective {
2149
+ constructor(element) {
2150
+ this.element = element;
2151
+ }
2152
+ }
2153
+ BsScrollspyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2154
+ BsScrollspyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyDirective, selector: "[bsScrollspy]", ngImport: i0 });
2155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, decorators: [{
2156
+ type: Directive,
2157
+ args: [{
2158
+ selector: '[bsScrollspy]'
2159
+ }]
2160
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
2161
+
2162
+ class BsScrollspyComponent {
2163
+ constructor(scrollOffsetService, document, zone) {
2164
+ this.scrollOffsetService = scrollOffsetService;
2165
+ this.zone = zone;
2166
+ this.destroyed$ = new Subject();
2167
+ this.viewInit$ = new BehaviorSubject(false);
2168
+ this.contentInit$ = new BehaviorSubject(false);
2169
+ this.activeDirective = null;
2170
+ this.doc = document;
2171
+ combineLatest([this.viewInit$, this.contentInit$])
2172
+ .pipe(filter(([viewInit, contentInit]) => viewInit && contentInit), take(1))
2173
+ .pipe(takeUntil(this.destroyed$))
2174
+ .subscribe(() => {
2175
+ // this.setActiveDirective();
2176
+ this.scrollToCurrentInSpy();
2177
+ });
2178
+ }
2179
+ ngAfterViewInit() {
2180
+ this.viewInit$.next(true);
2181
+ }
2182
+ ngAfterContentInit() {
2183
+ this.contentInit$.next(true);
2184
+ }
2185
+ ngOnDestroy() {
2186
+ this.destroyed$.next(true);
2187
+ }
2188
+ onWindowScroll() {
2189
+ this.setActiveDirective();
2190
+ this.scrollToCurrentInSpy();
2191
+ }
2192
+ setActiveDirective() {
2193
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2194
+ const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y < offsetY);
2195
+ if (this.directives.length === 0) {
2196
+ this.activeDirective = null;
2197
+ }
2198
+ else if (dirs.length === 0) {
2199
+ this.activeDirective = this.directives.get(0) ?? null;
2200
+ }
2201
+ else {
2202
+ this.activeDirective = dirs[dirs.length - 1];
2203
+ }
2204
+ }
2205
+ scrollToCurrentInSpy() {
2206
+ if (window && (window.innerWidth >= 768)) {
2207
+ if (this.activeDirective) {
2208
+ const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
2209
+ const anchor = this.anchors.get(index);
2210
+ if (anchor && anchor.nativeElement.parentElement) {
2211
+ anchor.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
2212
+ }
2213
+ }
2214
+ }
2215
+ }
2216
+ scrollToHeader(directive) {
2217
+ const header = directive.element.nativeElement;
2218
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2219
+ const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
2220
+ window.scrollTo({ top: y, behavior: 'smooth' });
2221
+ }
2222
+ }
2223
+ BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2224
+ 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 }], viewQueries: [{ propertyName: "anchors", predicate: ["anchor"], descendants: true }], ngImport: i0, template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives; let i = index\">\n <span [attr.data-index]=\"i\" class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\" #anchor>\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}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@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:calc(100vh - 7rem);overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.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"] }] });
2225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
2226
+ type: Component,
2227
+ args: [{ selector: 'bs-scrollspy', template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives; let i = index\">\n <span [attr.data-index]=\"i\" class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\" #anchor>\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}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@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:calc(100vh - 7rem);overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"] }]
2228
+ }], ctorParameters: function () { return [{ type: BsScrollOffsetService }, { type: undefined, decorators: [{
2229
+ type: Inject,
2230
+ args: [DOCUMENT]
2231
+ }] }, { type: i0.NgZone }]; }, propDecorators: { directives: [{
2232
+ type: ContentChildren,
2233
+ args: [BsScrollspyDirective, { descendants: true }]
2234
+ }], anchors: [{
2235
+ type: ViewChildren,
2236
+ args: ['anchor']
2237
+ }], onWindowScroll: [{
2238
+ type: HostListener,
2239
+ args: ['window:scroll', ['$event']]
2240
+ }] } });
2241
+
2242
+ class BsScrollspyModule {
2243
+ }
2244
+ BsScrollspyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2245
+ BsScrollspyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, declarations: [BsScrollspyComponent,
2246
+ BsScrollspyDirective], imports: [CommonModule], exports: [BsScrollspyComponent,
2247
+ BsScrollspyDirective] });
2248
+ BsScrollspyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, imports: [[
2249
+ CommonModule
2250
+ ]] });
2251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, decorators: [{
2252
+ type: NgModule,
2253
+ args: [{
2254
+ declarations: [
2255
+ BsScrollspyComponent,
2256
+ BsScrollspyDirective
2257
+ ],
2258
+ imports: [
2259
+ CommonModule
2260
+ ],
2261
+ exports: [
2262
+ BsScrollspyComponent,
2263
+ BsScrollspyDirective
2264
+ ]
2265
+ }]
2266
+ }] });
2267
+
2268
+ class BsInListPipe {
2269
+ transform(items, parameter) {
2270
+ return items.some(item => item.id === parameter);
2271
+ }
2272
+ }
2273
+ BsInListPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2274
+ BsInListPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, name: "inList" });
2275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, decorators: [{
2276
+ type: Pipe,
1057
2277
  args: [{
1058
- // selector: 'bs-navbar-item > a[routerLink]',
1059
- selector: 'bs-navbar-item',
1060
- queries: {
1061
- childDropdowns: new ContentChildren(BsNavbarDropdownComponent)
1062
- }
2278
+ name: 'inList'
1063
2279
  }]
1064
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarItemComponent, decorators: [{
1065
- type: Inject,
1066
- args: [forwardRef(() => BsNavbarItemComponent)]
1067
- }] }, { type: BsNavbarDropdownComponent, decorators: [{
1068
- type: Optional
1069
- }, {
1070
- type: Inject,
1071
- args: [forwardRef(() => BsNavbarDropdownComponent)]
1072
- }] }]; } });
2280
+ }] });
1073
2281
 
1074
- class NavLinkDirective {
1075
- constructor(elementRef, parentDropdown) {
1076
- this.elementRef = elementRef;
1077
- if (parentDropdown == null) {
1078
- this.elementRef.nativeElement.classList.add('nav-link');
2282
+ class BsSelect2Component {
2283
+ constructor() {
2284
+ this.isOpen = false;
2285
+ this.suggestions$ = new BehaviorSubject([]);
2286
+ this.isLoading$ = new BehaviorSubject(false);
2287
+ this.hostWidth$ = new BehaviorSubject(200);
2288
+ this.searchterm = '';
2289
+ this.suggestions = [];
2290
+ this.provideSuggestions = new EventEmitter();
2291
+ this.selectedItems = [];
2292
+ this.isFocused = false;
2293
+ this.charWidth = 10;
2294
+ this.searchWidth = 20;
2295
+ }
2296
+ ngAfterViewInit() {
2297
+ this.onResize();
2298
+ }
2299
+ onProvideSuggestions(value) {
2300
+ this.searchWidth = this.charWidth * (this.searchterm.length + 2);
2301
+ if (value === '') {
2302
+ this.isOpen = false;
2303
+ this.suggestions$.next([]);
1079
2304
  }
1080
2305
  else {
1081
- this.elementRef.nativeElement.classList.add('dropdown-item');
2306
+ this.isLoading$.next(true);
2307
+ this.isOpen = true;
2308
+ this.provideSuggestions.emit(value);
2309
+ }
2310
+ }
2311
+ onSuggestionClicked(suggestion) {
2312
+ this.searchterm = '';
2313
+ this.isOpen = false;
2314
+ const existing = this.selectedItems.find((value, index) => value.id === suggestion.id);
2315
+ if (existing === undefined) {
2316
+ this.selectedItems.push(suggestion);
2317
+ }
2318
+ else {
2319
+ this.selectedItems.splice(this.selectedItems.indexOf(existing), 1);
1082
2320
  }
2321
+ this.searchBox.nativeElement.focus();
2322
+ }
2323
+ onRemoveItem(item, event) {
2324
+ event.stopPropagation();
2325
+ this.selectedItems.splice(this.selectedItems.indexOf(item), 1);
2326
+ this.focus();
2327
+ }
2328
+ ngOnInit() {
2329
+ }
2330
+ onResize() {
2331
+ this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
2332
+ }
2333
+ focus() {
2334
+ this.searchBox.nativeElement.focus();
1083
2335
  }
1084
2336
  }
1085
- NavLinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavLinkDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => BsNavbarDropdownComponent), optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1086
- NavLinkDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
1087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavLinkDirective, decorators: [{
2337
+ BsSelect2Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
2338
+ BsSelect2Componentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsSelect2Component, selector: "bs-select2", inputs: { searchterm: "searchterm", suggestions: "suggestions", selectedItems: "selectedItems" }, outputs: { provideSuggestions: "provideSuggestions" }, host: { listeners: { "window:resize": "onResize()", "click": "focus()" }, properties: { "class.focus": "this.isFocused" } }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }, { propertyName: "itemsBox", first: true, predicate: ["itemsBox"], descendants: true }, { propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true, static: true }], ngImport: i0, template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\" #itemsBox class=\"items-box\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { item: item, select2: this }\"></ng-container>\n </ng-container>\n\n <input type=\"text\" autocomplete=\"off\"\n [(ngModel)]=\"searchterm\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth\"\n #searchBox />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static p-0\" [style.width.px]=\"hostWidth$ | async\">\n <li *ngFor=\"let suggestion of suggestions\" (click)=\"onSuggestionClicked(suggestion)\" [class.selected]=\"selectedItems | inList:suggestion.id\">{{ suggestion.text }}</li>\n </ul>\n </div>\n</div>\n\n<ng-template #defaultItemTemplate let-item=\"item\" let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">\u00D7</span>\n {{ item.text }}\n </span>\n</ng-template>\n", styles: [".items-box{display:block;position:relative;width:100%;min-height:38px;padding:0 5px 3px;cursor:text;border:1px solid #ccc}.items-box .select2-item{display:inline-block;background-color:#e4e4e4;color:#1a1a1a;border:1px solid #aaa;border-radius:4px;margin-top:5px;margin-right:5px;padding:0 5px;cursor:default;user-select:none;-webkit-user-select:none}.items-box .select2-item>span{cursor:pointer;color:#999}.items-box .select2-item>span:hover{color:#333}.items-box input{border:none;outline:0;margin:5px 0 2px;background:none}:host{display:block;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}:host.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}ul{max-height:200px;overflow-y:auto}ul>li{padding:10px;cursor:pointer}ul>li.selected{background:#ddd}ul>li:hover{color:#fff;background-color:#5897fb}\n"], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }], pipes: { "async": i1.AsyncPipe, "inList": BsInListPipe } });
2339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, decorators: [{
2340
+ type: Component,
2341
+ args: [{ selector: 'bs-select2', template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\" #itemsBox class=\"items-box\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { item: item, select2: this }\"></ng-container>\n </ng-container>\n\n <input type=\"text\" autocomplete=\"off\"\n [(ngModel)]=\"searchterm\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth\"\n #searchBox />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static p-0\" [style.width.px]=\"hostWidth$ | async\">\n <li *ngFor=\"let suggestion of suggestions\" (click)=\"onSuggestionClicked(suggestion)\" [class.selected]=\"selectedItems | inList:suggestion.id\">{{ suggestion.text }}</li>\n </ul>\n </div>\n</div>\n\n<ng-template #defaultItemTemplate let-item=\"item\" let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">\u00D7</span>\n {{ item.text }}\n </span>\n</ng-template>\n", styles: [".items-box{display:block;position:relative;width:100%;min-height:38px;padding:0 5px 3px;cursor:text;border:1px solid #ccc}.items-box .select2-item{display:inline-block;background-color:#e4e4e4;color:#1a1a1a;border:1px solid #aaa;border-radius:4px;margin-top:5px;margin-right:5px;padding:0 5px;cursor:default;user-select:none;-webkit-user-select:none}.items-box .select2-item>span{cursor:pointer;color:#999}.items-box .select2-item>span:hover{color:#333}.items-box input{border:none;outline:0;margin:5px 0 2px;background:none}:host{display:block;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}:host.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}ul{max-height:200px;overflow-y:auto}ul>li{padding:10px;cursor:pointer}ul>li.selected{background:#ddd}ul>li:hover{color:#fff;background-color:#5897fb}\n"] }]
2342
+ }], ctorParameters: function () { return []; }, propDecorators: { searchBox: [{
2343
+ type: ViewChild,
2344
+ args: ['searchBox']
2345
+ }], itemsBox: [{
2346
+ type: ViewChild,
2347
+ args: ['itemsBox']
2348
+ }], searchterm: [{
2349
+ type: Input
2350
+ }], suggestions: [{
2351
+ type: Input
2352
+ }], provideSuggestions: [{
2353
+ type: Output
2354
+ }], selectedItems: [{
2355
+ type: Input
2356
+ }], isFocused: [{
2357
+ type: HostBinding,
2358
+ args: ['class.focus']
2359
+ }], onResize: [{
2360
+ type: HostListener,
2361
+ args: ['window:resize']
2362
+ }], focus: [{
2363
+ type: HostListener,
2364
+ args: ['click']
2365
+ }], defaultItemTemplate: [{
2366
+ type: ViewChild,
2367
+ args: ['defaultItemTemplate', { static: true }]
2368
+ }] } });
2369
+
2370
+ class BsItemTemplateDirective {
2371
+ constructor(select2component, templateRef) {
2372
+ this.select2component = select2component;
2373
+ this.select2component.itemTemplate = templateRef;
2374
+ }
2375
+ }
2376
+ BsItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsItemTemplateDirective, deps: [{ token: BsSelect2Component }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
2377
+ BsItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsItemTemplateDirective, selector: "[bsItemTemplate]", ngImport: i0 });
2378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsItemTemplateDirective, decorators: [{
1088
2379
  type: Directive,
1089
2380
  args: [{
1090
- selector: 'bs-navbar-item > a[routerLink]'
2381
+ selector: '[bsItemTemplate]'
1091
2382
  }]
1092
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: BsNavbarDropdownComponent, decorators: [{
1093
- type: Optional
1094
- }, {
1095
- type: Inject,
1096
- args: [forwardRef(() => BsNavbarDropdownComponent)]
1097
- }] }]; } });
2383
+ }], ctorParameters: function () { return [{ type: BsSelect2Component }, { type: i0.TemplateRef }]; } });
1098
2384
 
1099
- class NavbarContentDirective {
1100
- constructor(element) {
1101
- this.element = element;
1102
- this.initialPadding = 0;
1103
- this.resizeObserver = new ResizeObserver((entries) => {
1104
- let height = entries[0].contentRect.height;
1105
- this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
1106
- });
1107
- }
1108
- ngAfterViewInit() {
1109
- let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
1110
- this.initialPadding = isNaN(p) ? 0 : p;
1111
- this.resizeObserver.observe(this.navbar.nav.nativeElement);
1112
- }
1113
- ngOnDestroy() {
1114
- this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
1115
- }
2385
+ class BsInListModule {
1116
2386
  }
1117
- NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1118
- NavbarContentDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
1119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, decorators: [{
1120
- type: Directive,
2387
+ BsInListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2388
+ BsInListModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, declarations: [BsInListPipe], imports: [CommonModule], exports: [BsInListPipe] });
2389
+ BsInListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, imports: [[
2390
+ CommonModule
2391
+ ]] });
2392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, decorators: [{
2393
+ type: NgModule,
1121
2394
  args: [{
1122
- selector: '[navbarContent]'
2395
+ declarations: [
2396
+ BsInListPipe
2397
+ ],
2398
+ imports: [
2399
+ CommonModule
2400
+ ],
2401
+ exports: [
2402
+ BsInListPipe
2403
+ ]
1123
2404
  }]
1124
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
1125
- type: Input,
1126
- args: ['navbarContent']
1127
- }] } });
2405
+ }] });
1128
2406
 
1129
- class BsNavbarModule {
2407
+ class BsSelect2Module {
1130
2408
  }
1131
- BsNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1132
- BsNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, declarations: [BsNavbarComponent,
1133
- BsNavbarNavComponent,
1134
- BsNavbarDropdownComponent,
1135
- BsNavbarItemComponent,
1136
- DropdownToggleDirective,
1137
- NavLinkDirective,
1138
- NavbarContentDirective], imports: [CommonModule,
1139
- RouterModule,
1140
- ClickOutsideModule], exports: [BsNavbarComponent,
1141
- BsNavbarNavComponent,
1142
- BsNavbarDropdownComponent,
1143
- BsNavbarItemComponent,
1144
- DropdownToggleDirective,
1145
- NavLinkDirective,
1146
- NavbarContentDirective] });
1147
- BsNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, imports: [[
2409
+ BsSelect2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2410
+ BsSelect2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, declarations: [BsSelect2Component,
2411
+ BsItemTemplateDirective], imports: [CommonModule,
2412
+ FormsModule,
2413
+ BsDropdownModule,
2414
+ BsInListModule], exports: [BsSelect2Component,
2415
+ BsItemTemplateDirective] });
2416
+ BsSelect2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, imports: [[
1148
2417
  CommonModule,
1149
- RouterModule,
1150
- ClickOutsideModule
2418
+ FormsModule,
2419
+ BsDropdownModule,
2420
+ BsInListModule
1151
2421
  ]] });
1152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, decorators: [{
2422
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, decorators: [{
1153
2423
  type: NgModule,
1154
2424
  args: [{
1155
2425
  declarations: [
1156
- BsNavbarComponent,
1157
- BsNavbarNavComponent,
1158
- BsNavbarDropdownComponent,
1159
- BsNavbarItemComponent,
1160
- DropdownToggleDirective,
1161
- NavLinkDirective,
1162
- NavbarContentDirective
2426
+ BsSelect2Component,
2427
+ BsItemTemplateDirective
1163
2428
  ],
1164
2429
  imports: [
1165
2430
  CommonModule,
1166
- RouterModule,
1167
- ClickOutsideModule
2431
+ FormsModule,
2432
+ BsDropdownModule,
2433
+ BsInListModule
1168
2434
  ],
1169
2435
  exports: [
1170
- BsNavbarComponent,
1171
- BsNavbarNavComponent,
1172
- BsNavbarDropdownComponent,
1173
- BsNavbarItemComponent,
1174
- DropdownToggleDirective,
1175
- NavLinkDirective,
1176
- NavbarContentDirective
2436
+ BsSelect2Component,
2437
+ BsItemTemplateDirective
1177
2438
  ]
1178
2439
  }]
1179
2440
  }] });
1180
2441
 
1181
- class BsAccordionTabComponent {
1182
- constructor(accordion) {
1183
- this.accordion = accordion;
1184
- }
1185
- ngOnInit() {
1186
- }
1187
- headerClicked(event) {
1188
- if (this.accordion.activeTab === this) {
1189
- this.accordion.activeTab = null;
1190
- }
1191
- else {
1192
- this.accordion.activeTab = this;
1193
- }
2442
+ const SNACKBAR_CONTENT = new InjectionToken('SnackbarContent');
2443
+
2444
+ class BsSnackbarComponent {
2445
+ constructor(content) {
2446
+ this.displayBlock = true;
2447
+ this.width100 = true;
2448
+ this.instance = null;
2449
+ //#region Monitor @slideUpDown hooks
2450
+ this.animationState = '';
2451
+ this.animationStateChanged = new EventEmitter();
2452
+ this.content = content;
2453
+ }
2454
+ onAnimationChanged(event) {
2455
+ this.animationStateChanged.emit(event);
1194
2456
  }
1195
2457
  }
1196
- BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
1197
- BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabComponent, selector: "bs-accordion-tab", ngImport: i0, template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown]=\"(accordion.activeTab === this) ? 'down' : 'up'\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], animations: [SlideUpDownAnimation] });
1198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
2458
+ BsSnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, deps: [{ token: SNACKBAR_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
2459
+ BsSnackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsSnackbarComponent, selector: "bs-snackbar", host: { properties: { "class.d-block": "this.displayBlock", "class.w-100": "this.width100" } }, ngImport: i0, template: "<div [@slideUpDown]=\"animationState\"\n (@slideUpDown.start)=\"onAnimationChanged($event)\"\n (@slideUpDown.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [":host{background:#232323;color:rgba(var(--bs-light-rgb))}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [SlideUpDownAnimation] });
2460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, decorators: [{
1199
2461
  type: Component,
1200
- args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown]=\"(accordion.activeTab === this) ? 'down' : 'up'\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
1201
- }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
2462
+ args: [{ selector: 'bs-snackbar', animations: [SlideUpDownAnimation], template: "<div [@slideUpDown]=\"animationState\"\n (@slideUpDown.start)=\"onAnimationChanged($event)\"\n (@slideUpDown.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [":host{background:#232323;color:rgba(var(--bs-light-rgb))}\n"] }]
2463
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
2464
+ type: Inject,
2465
+ args: [SNACKBAR_CONTENT]
2466
+ }] }]; }, propDecorators: { displayBlock: [{
2467
+ type: HostBinding,
2468
+ args: ['class.d-block']
2469
+ }], width100: [{
2470
+ type: HostBinding,
2471
+ args: ['class.w-100']
2472
+ }] } });
1202
2473
 
1203
- class BsAccordionComponent {
1204
- constructor() {
1205
- this.activeTab = null;
2474
+ class BsSnackbarService {
2475
+ constructor(overlay, parentInjector, componentFactoryResolver) {
2476
+ this.overlay = overlay;
2477
+ this.parentInjector = parentInjector;
2478
+ this.componentFactoryResolver = componentFactoryResolver;
1206
2479
  }
1207
- ngOnInit() {
2480
+ show(template) {
2481
+ const injector = Injector.create({
2482
+ providers: [{ provide: SNACKBAR_CONTENT, useValue: template }],
2483
+ parent: this.parentInjector
2484
+ });
2485
+ const portal = new ComponentPortal(BsSnackbarComponent, null, injector, this.componentFactoryResolver);
2486
+ const overlayRef = this.overlay.create({
2487
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2488
+ positionStrategy: this.overlay.position()
2489
+ .global().centerHorizontally().bottom('0'),
2490
+ width: '100%'
2491
+ });
2492
+ const componentInstance = overlayRef.attach(portal);
2493
+ componentInstance.instance['instance'] = {
2494
+ component: componentInstance,
2495
+ overlay: overlayRef
2496
+ };
2497
+ return componentInstance.instance;
2498
+ }
2499
+ hide(snackbar) {
2500
+ snackbar.animationStateChanged.pipe(filter(ev => ev.phaseName === 'done' && ev.toState === 'void'), take(1)).subscribe(() => {
2501
+ snackbar['instance']?.overlay.dispose();
2502
+ });
2503
+ snackbar.animationState = 'void';
1208
2504
  }
1209
2505
  }
1210
- BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1211
- BsAccordionComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionComponent, selector: "bs-accordion", queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
1212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
1213
- type: Component,
1214
- args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
1215
- }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
1216
- type: ContentChildren,
1217
- args: [BsAccordionTabComponent]
1218
- }] } });
2506
+ BsSnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
2507
+ BsSnackbarServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, providedIn: 'root' });
2508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, decorators: [{
2509
+ type: Injectable,
2510
+ args: [{
2511
+ providedIn: 'root'
2512
+ }]
2513
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; } });
1219
2514
 
1220
- class BsAccordionTabHeaderComponent {
1221
- constructor(accordionTab, accordion) {
1222
- this.accordionTab = accordionTab;
1223
- this.accordion = accordion;
2515
+ class BsSnackbarCloseDirective {
2516
+ constructor(snackbarService) {
2517
+ this.snackbarService = snackbarService;
1224
2518
  }
1225
- ngOnInit() {
1226
- }
1227
- headerClicked(event) {
1228
- if (this.accordion.activeTab === this.accordionTab) {
1229
- this.accordion.activeTab = null;
1230
- }
1231
- else {
1232
- this.accordion.activeTab = this.accordionTab;
1233
- }
2519
+ onClick() {
2520
+ this.snackbarService.hide(this.bsSnackbarClose);
1234
2521
  }
1235
2522
  }
1236
- BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
1237
- BsAccordionTabHeaderComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabHeaderComponent, selector: "bs-accordion-tab-header", ngImport: i0, template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] });
1238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
1239
- type: Component,
1240
- args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
1241
- }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
2523
+ BsSnackbarCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, deps: [{ token: BsSnackbarService }], target: i0.ɵɵFactoryTarget.Directive });
2524
+ BsSnackbarCloseDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsSnackbarCloseDirective, selector: "[bsSnackbarClose]", inputs: { bsSnackbarClose: "bsSnackbarClose" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
2525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, decorators: [{
2526
+ type: Directive,
2527
+ args: [{
2528
+ selector: '[bsSnackbarClose]'
2529
+ }]
2530
+ }], ctorParameters: function () { return [{ type: BsSnackbarService }]; }, propDecorators: { bsSnackbarClose: [{
2531
+ type: Input
2532
+ }], onClick: [{
2533
+ type: HostListener,
2534
+ args: ['click']
2535
+ }] } });
1242
2536
 
1243
- class BsAccordionModule {
2537
+ class BsSnackbarModule {
1244
2538
  }
1245
- BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1246
- BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
1247
- BsAccordionTabComponent,
1248
- BsAccordionTabHeaderComponent], imports: [CommonModule,
1249
- BrowserAnimationsModule], exports: [BsAccordionComponent,
1250
- BsAccordionTabComponent,
1251
- BsAccordionTabHeaderComponent] });
1252
- BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
1253
- CommonModule,
1254
- BrowserAnimationsModule
2539
+ BsSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2540
+ BsSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, declarations: [BsSnackbarComponent,
2541
+ BsSnackbarCloseDirective], imports: [CommonModule], exports: [BsSnackbarComponent,
2542
+ BsSnackbarCloseDirective] });
2543
+ BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, providers: [
2544
+ // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
2545
+ // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
2546
+ ], imports: [[
2547
+ CommonModule
1255
2548
  ]] });
1256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
2549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, decorators: [{
1257
2550
  type: NgModule,
1258
2551
  args: [{
1259
2552
  declarations: [
1260
- BsAccordionComponent,
1261
- BsAccordionTabComponent,
1262
- BsAccordionTabHeaderComponent
2553
+ BsSnackbarComponent,
2554
+ BsSnackbarCloseDirective
1263
2555
  ],
1264
2556
  imports: [
1265
- CommonModule,
1266
- BrowserAnimationsModule
2557
+ CommonModule
1267
2558
  ],
1268
2559
  exports: [
1269
- BsAccordionComponent,
1270
- BsAccordionTabComponent,
1271
- BsAccordionTabHeaderComponent
2560
+ BsSnackbarComponent,
2561
+ BsSnackbarCloseDirective
2562
+ ],
2563
+ providers: [
2564
+ // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
2565
+ // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
1272
2566
  ]
1273
2567
  }]
1274
2568
  }] });
@@ -1329,331 +2623,382 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1329
2623
  type: NgModule,
1330
2624
  args: [{
1331
2625
  declarations: [
1332
- BsTabControlComponent,
1333
- BsTabPageComponent,
1334
- ],
1335
- imports: [
1336
- CommonModule
1337
- ],
1338
- exports: [
1339
- BsTabControlComponent,
1340
- BsTabPageComponent,
1341
- ]
1342
- }]
1343
- }] });
1344
-
1345
- class BsScrollspyDirective {
1346
- constructor(element) {
1347
- this.element = element;
1348
- }
1349
- }
1350
- BsScrollspyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1351
- BsScrollspyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyDirective, selector: "[bsScrollspy]", ngImport: i0 });
1352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, decorators: [{
1353
- type: Directive,
1354
- args: [{
1355
- selector: '[bsScrollspy]'
2626
+ BsTabControlComponent,
2627
+ BsTabPageComponent,
2628
+ ],
2629
+ imports: [
2630
+ CommonModule
2631
+ ],
2632
+ exports: [
2633
+ BsTabControlComponent,
2634
+ BsTabPageComponent,
2635
+ ]
1356
2636
  }]
1357
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
2637
+ }] });
1358
2638
 
1359
- class BsScrollspyComponent {
1360
- constructor(document) {
1361
- this.activeDirective = null;
1362
- this.doc = document;
1363
- }
1364
- ngOnInit() {
2639
+ class BsToggleButtonComponent {
2640
+ constructor() {
2641
+ this.disableAnimations = true;
2642
+ //#region isToggled
2643
+ this._isToggled = false;
2644
+ this.isToggledChange = new EventEmitter();
2645
+ //#endregion
2646
+ this.offColor = '#CCCCCC';
2647
+ this.onColor = '#2196F3';
2648
+ this.round = true;
1365
2649
  }
1366
2650
  ngAfterViewInit() {
1367
- this.onWindowScroll();
2651
+ this.disableAnimations = false;
1368
2652
  }
1369
- onWindowScroll() {
1370
- const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y <= 0);
1371
- if (this.directives.length === 0) {
1372
- this.activeDirective = null;
1373
- }
1374
- else if (dirs.length === 0) {
1375
- this.activeDirective = this.directives.get(0) ?? null;
1376
- }
1377
- else {
1378
- this.activeDirective = dirs[dirs.length - 1];
1379
- }
2653
+ get isToggled() {
2654
+ return this._isToggled;
1380
2655
  }
1381
- scrollToHeader(directive) {
1382
- const header = directive.element.nativeElement;
1383
- header.scrollIntoView();
2656
+ set isToggled(value) {
2657
+ this._isToggled = value;
2658
+ this.isToggledChange.emit(this._isToggled);
1384
2659
  }
1385
2660
  }
1386
- BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
1387
- 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}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@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}}.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"] }] });
1388
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
2661
+ BsToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2662
+ BsToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsToggleButtonComponent, selector: "bs-toggle-button", inputs: { isToggled: "isToggled", offColor: "offColor", onColor: "onColor", round: "round" }, outputs: { isToggledChange: "isToggledChange" }, ngImport: i0, template: "<label (click)=\"isToggled = !isToggled\" class=\"switch\" [class.checked]=\"isToggled\">\n <span class=\"slider\" [class.round]=\"round\" [@colorTransition]=\"{ value: isToggled ? 'color2' : 'color1', params: { color1: offColor, color2: onColor, 'duration': '.4s' } }\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:30px;height:17px}.switch>.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;transition:transform .4s}.switch>.slider.round{border-radius:8.5px}.switch>.slider.round:before{border-radius:50%}.switch>.slider:before{position:absolute;content:\"\";height:13px;width:13px;left:2px;top:0;bottom:0;margin:auto 0;background-color:#fff;transition:transform .4s}.switch.checked .slider:before{transform:translate(13px)}\n"], animations: [ColorTransitionAnimation] });
2663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, decorators: [{
1389
2664
  type: Component,
1390
- 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}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@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}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"] }]
1391
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1392
- type: Inject,
1393
- args: [DOCUMENT]
1394
- }] }]; }, propDecorators: { directives: [{
1395
- type: ContentChildren,
1396
- args: [BsScrollspyDirective, { descendants: true }]
1397
- }], onWindowScroll: [{
1398
- type: HostListener,
1399
- args: ['window:scroll', ['$event']]
2665
+ args: [{ selector: 'bs-toggle-button', animations: [ColorTransitionAnimation], template: "<label (click)=\"isToggled = !isToggled\" class=\"switch\" [class.checked]=\"isToggled\">\n <span class=\"slider\" [class.round]=\"round\" [@colorTransition]=\"{ value: isToggled ? 'color2' : 'color1', params: { color1: offColor, color2: onColor, 'duration': '.4s' } }\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:30px;height:17px}.switch>.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;transition:transform .4s}.switch>.slider.round{border-radius:8.5px}.switch>.slider.round:before{border-radius:50%}.switch>.slider:before{position:absolute;content:\"\";height:13px;width:13px;left:2px;top:0;bottom:0;margin:auto 0;background-color:#fff;transition:transform .4s}.switch.checked .slider:before{transform:translate(13px)}\n"] }]
2666
+ }], propDecorators: { isToggledChange: [{
2667
+ type: Output
2668
+ }], isToggled: [{
2669
+ type: Input
2670
+ }], offColor: [{
2671
+ type: Input
2672
+ }], onColor: [{
2673
+ type: Input
2674
+ }], round: [{
2675
+ type: Input
1400
2676
  }] } });
1401
2677
 
1402
- class BsScrollspyModule {
2678
+ class BsToggleButtonModule {
1403
2679
  }
1404
- BsScrollspyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1405
- BsScrollspyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, declarations: [BsScrollspyComponent,
1406
- BsScrollspyDirective], imports: [CommonModule], exports: [BsScrollspyComponent,
1407
- BsScrollspyDirective] });
1408
- BsScrollspyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, imports: [[
2680
+ BsToggleButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2681
+ BsToggleButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, declarations: [BsToggleButtonComponent], imports: [CommonModule], exports: [BsToggleButtonComponent] });
2682
+ BsToggleButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, imports: [[
1409
2683
  CommonModule
1410
2684
  ]] });
1411
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, decorators: [{
2685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, decorators: [{
1412
2686
  type: NgModule,
1413
2687
  args: [{
1414
2688
  declarations: [
1415
- BsScrollspyComponent,
1416
- BsScrollspyDirective
2689
+ BsToggleButtonComponent
1417
2690
  ],
1418
2691
  imports: [
1419
2692
  CommonModule
1420
2693
  ],
1421
2694
  exports: [
1422
- BsScrollspyComponent,
1423
- BsScrollspyDirective
2695
+ BsToggleButtonComponent
1424
2696
  ]
1425
2697
  }]
1426
2698
  }] });
1427
2699
 
1428
- class BsDropdownMenuDirective {
1429
- constructor(dropdown, document, viewContainerRef, templateRef, overlay) {
1430
- this.dropdown = dropdown;
1431
- this.viewContainerRef = viewContainerRef;
1432
- this.templateRef = templateRef;
1433
- this.overlay = overlay;
1434
- this.destroyed$ = new Subject();
1435
- this.overlayRef = null;
1436
- this.templatePortal = null;
1437
- this.document = document;
1438
- this.dropdown.isOpen$
1439
- .pipe(takeUntil(this.destroyed$))
1440
- .subscribe((isOpen) => {
1441
- if (isOpen) {
1442
- this.overlayRef = this.overlay.create({
1443
- hasBackdrop: this.dropdown.hasBackdrop,
1444
- scrollStrategy: this.overlay.scrollStrategies.reposition(),
1445
- positionStrategy: this.overlay.position()
1446
- .flexibleConnectedTo(this.dropdown.toggle.toggleButton)
1447
- .withPositions([
1448
- { originX: "start", "originY": "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1449
- { originX: "start", "originY": "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1450
- ]),
1451
- });
1452
- this.overlayRef.backdropClick().subscribe(() => this.dropdown.isOpen$.next(false));
1453
- this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
1454
- this.overlayRef.attach(this.templatePortal);
1455
- }
1456
- else {
1457
- if (this.overlayRef) {
1458
- this.overlayRef.detach();
1459
- this.overlayRef.dispose();
1460
- }
1461
- }
1462
- });
2700
+ const TOOLTIP_CONTENT = new InjectionToken('TooltipContent');
2701
+
2702
+ class BsTooltipComponent {
2703
+ constructor(content) {
2704
+ this.positions = Position;
2705
+ this.position = Position.bottom;
2706
+ this.template = content;
1463
2707
  }
1464
2708
  }
1465
- BsDropdownMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, deps: [{ token: forwardRef(() => BsDropdownDirective) }, { token: DOCUMENT }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1$2.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
1466
- BsDropdownMenuDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]", host: { properties: { "class.show": "dropdown.isOpen" } }, ngImport: i0 });
1467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
1468
- type: Directive,
1469
- args: [{
1470
- selector: '[bsDropdownMenu]',
1471
- host: {
1472
- '[class.show]': 'dropdown.isOpen',
1473
- },
1474
- }]
1475
- }], ctorParameters: function () { return [{ type: BsDropdownDirective, decorators: [{
1476
- type: Inject,
1477
- args: [forwardRef(() => BsDropdownDirective)]
1478
- }] }, { type: undefined, decorators: [{
2709
+ BsTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, deps: [{ token: TOOLTIP_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
2710
+ BsTooltipComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipComponent, selector: "bs-tooltip", inputs: { position: "position" }, ngImport: i0, template: "<div [@fadeInOut] class=\"tooltip position-relative show\"\n [class.bs-tooltip-bottom]=\"position === positions.bottom\"\n [class.bs-tooltip-top]=\"position === positions.top\"\n [class.bs-tooltip-start]=\"position === positions.left\"\n [class.bs-tooltip-end]=\"position === positions.right\">\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [".tooltip.bs-tooltip-bottom .tooltip-arrow,.tooltip.bs-tooltip-top .tooltip-arrow{left:50%;transform:translate(-50%)}.tooltip.bs-tooltip-start .tooltip-arrow,.tooltip.bs-tooltip-end .tooltip-arrow{top:50%;transform:translateY(-50%)}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [FadeInOutAnimation] });
2711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, decorators: [{
2712
+ type: Component,
2713
+ args: [{ selector: 'bs-tooltip', animations: [FadeInOutAnimation], template: "<div [@fadeInOut] class=\"tooltip position-relative show\"\n [class.bs-tooltip-bottom]=\"position === positions.bottom\"\n [class.bs-tooltip-top]=\"position === positions.top\"\n [class.bs-tooltip-start]=\"position === positions.left\"\n [class.bs-tooltip-end]=\"position === positions.right\">\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [".tooltip.bs-tooltip-bottom .tooltip-arrow,.tooltip.bs-tooltip-top .tooltip-arrow{left:50%;transform:translate(-50%)}.tooltip.bs-tooltip-start .tooltip-arrow,.tooltip.bs-tooltip-end .tooltip-arrow{top:50%;transform:translateY(-50%)}\n"] }]
2714
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1479
2715
  type: Inject,
1480
- args: [DOCUMENT]
1481
- }] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$2.Overlay }]; } });
2716
+ args: [TOOLTIP_CONTENT]
2717
+ }] }]; }, propDecorators: { position: [{
2718
+ type: Input
2719
+ }] } });
1482
2720
 
1483
- class BsDropdownToggleDirective {
1484
- constructor(dropdown, toggleButton) {
1485
- this.dropdown = dropdown;
1486
- this.toggleButton = toggleButton;
2721
+ class BsTooltipDirective {
2722
+ constructor(overlay, templateRef, componentFactoryResolver, parentInjector, parent) {
2723
+ this.overlay = overlay;
2724
+ this.templateRef = templateRef;
2725
+ this.parentInjector = parentInjector;
2726
+ this.parent = parent;
2727
+ this.bsTooltip = Position.bottom;
2728
+ this.overlayRef = null;
2729
+ this.injector = Injector.create({
2730
+ providers: [{ provide: TOOLTIP_CONTENT, useValue: this.templateRef }],
2731
+ parent: this.parentInjector
2732
+ });
2733
+ this.portal = new ComponentPortal(BsTooltipComponent, null, this.injector, componentFactoryResolver);
2734
+ parent.nativeElement.onmouseenter = () => {
2735
+ this.showTooltip();
2736
+ };
2737
+ parent.nativeElement.onmouseleave = () => {
2738
+ this.hideTooltip();
2739
+ };
1487
2740
  }
1488
- onClick() {
1489
- console.log('clicked');
1490
- this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1491
- this.dropdown.isOpen$.next(!isOpen);
2741
+ onBlur() {
2742
+ this.hideTooltip();
2743
+ }
2744
+ showTooltip() {
2745
+ const positions = [];
2746
+ switch (this.bsTooltip) {
2747
+ case Position.bottom:
2748
+ {
2749
+ positions.push({
2750
+ originX: "center",
2751
+ originY: "bottom",
2752
+ overlayX: "center",
2753
+ overlayY: "top"
2754
+ });
2755
+ }
2756
+ break;
2757
+ case Position.top:
2758
+ {
2759
+ positions.push({
2760
+ originX: "center",
2761
+ originY: "top",
2762
+ overlayX: "center",
2763
+ overlayY: "bottom"
2764
+ });
2765
+ }
2766
+ break;
2767
+ case Position.left:
2768
+ {
2769
+ positions.push({
2770
+ originX: "start",
2771
+ originY: "center",
2772
+ overlayX: "end",
2773
+ overlayY: "center",
2774
+ });
2775
+ }
2776
+ break;
2777
+ case Position.right:
2778
+ {
2779
+ positions.push({
2780
+ originX: "end",
2781
+ originY: "center",
2782
+ overlayX: "start",
2783
+ overlayY: "center"
2784
+ });
2785
+ }
2786
+ break;
2787
+ }
2788
+ this.overlayRef = this.overlay.create({
2789
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2790
+ positionStrategy: this.overlay.position()
2791
+ .flexibleConnectedTo(this.parent)
2792
+ .withPositions(positions),
1492
2793
  });
2794
+ const component = this.overlayRef.attach(this.portal);
2795
+ component.instance.position = this.bsTooltip;
2796
+ }
2797
+ hideTooltip() {
2798
+ if (this.overlayRef) {
2799
+ this.overlayRef.detach();
2800
+ this.overlayRef.dispose();
2801
+ this.overlayRef = null;
2802
+ }
1493
2803
  }
1494
2804
  }
1495
- BsDropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, deps: [{ token: BsDropdownDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1496
- BsDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
2805
+ BsTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ElementRef, host: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
2806
+ BsTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipDirective, selector: "*[bsTooltip]", inputs: { bsTooltip: "bsTooltip" }, host: { listeners: { "window:blur": "onBlur()" } }, ngImport: i0 });
2807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, decorators: [{
1498
2808
  type: Directive,
1499
2809
  args: [{
1500
- selector: '[bsDropdownToggle]'
2810
+ selector: '*[bsTooltip]'
1501
2811
  }]
1502
- }], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
2812
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ElementRef, decorators: [{
2813
+ type: Host
2814
+ }, {
2815
+ type: SkipSelf
2816
+ }] }]; }, propDecorators: { onBlur: [{
1503
2817
  type: HostListener,
1504
- args: ['click']
1505
- }] } });
1506
-
1507
- class BsDropdownDirective {
1508
- constructor() {
1509
- this.isOpen$ = new BehaviorSubject(false);
1510
- this.hasBackdrop = false;
1511
- this.closeOnClickOutside = false;
1512
- }
1513
- }
1514
- BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1515
- BsDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: { hasBackdrop: "hasBackdrop", closeOnClickOutside: "closeOnClickOutside" }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
1516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
1517
- type: Directive,
1518
- args: [{
1519
- selector: '[bsDropdown]'
1520
- }]
1521
- }], propDecorators: { menu: [{
1522
- type: ContentChild,
1523
- args: [BsDropdownMenuDirective, { static: false }]
1524
- }], toggle: [{
1525
- type: ContentChild,
1526
- args: [BsDropdownToggleDirective, { static: false }]
1527
- }], hasBackdrop: [{
1528
- type: Input
1529
- }], closeOnClickOutside: [{
2818
+ args: ['window:blur']
2819
+ }], bsTooltip: [{
1530
2820
  type: Input
1531
2821
  }] } });
1532
2822
 
1533
- class BsDropdownModule {
2823
+ class BsTooltipModule {
1534
2824
  }
1535
- BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1536
- BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
1537
- BsDropdownToggleDirective,
1538
- BsDropdownMenuDirective], imports: [CommonModule,
1539
- OverlayModule], exports: [BsDropdownDirective,
1540
- BsDropdownToggleDirective,
1541
- BsDropdownMenuDirective] });
1542
- BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
1543
- CommonModule,
1544
- OverlayModule
2825
+ BsTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2826
+ BsTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, declarations: [BsTooltipDirective,
2827
+ BsTooltipComponent], imports: [CommonModule], exports: [BsTooltipDirective] });
2828
+ BsTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, imports: [[
2829
+ CommonModule
1545
2830
  ]] });
1546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
2831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, decorators: [{
1547
2832
  type: NgModule,
1548
2833
  args: [{
1549
2834
  declarations: [
1550
- BsDropdownDirective,
1551
- BsDropdownToggleDirective,
1552
- BsDropdownMenuDirective
2835
+ BsTooltipDirective,
2836
+ BsTooltipComponent
1553
2837
  ],
1554
2838
  imports: [
1555
- CommonModule,
1556
- OverlayModule
2839
+ CommonModule
1557
2840
  ],
1558
2841
  exports: [
1559
- BsDropdownDirective,
1560
- BsDropdownToggleDirective,
1561
- BsDropdownMenuDirective
2842
+ BsTooltipDirective
1562
2843
  ]
1563
2844
  }]
1564
2845
  }] });
1565
2846
 
1566
- class BsDatepickerComponent {
2847
+ class BsTypeaheadComponent {
1567
2848
  constructor() {
1568
- this.selectedDate = new Date();
1569
- this.currentMonth = new Date();
2849
+ this.isOpen = false;
2850
+ this.suggestions$ = new BehaviorSubject([]);
2851
+ this.isLoading$ = new BehaviorSubject(false);
2852
+ this.hostWidth$ = new BehaviorSubject(200);
2853
+ this.destroyed$ = new Subject();
2854
+ this.searchterm = '';
2855
+ this.isLoadingText = 'Loading...';
2856
+ this.noSuggestionsText = 'No suggestions found';
2857
+ this.provideSuggestions = new EventEmitter();
2858
+ this.suggestionSelected = new EventEmitter();
2859
+ this.searchtermChange = new EventEmitter();
2860
+ this.submitted = new EventEmitter();
2861
+ this.showNoSuggestions$ = this.suggestions$
2862
+ .pipe(map(suggestions => suggestions.length === 0));
1570
2863
  }
1571
- ngOnInit() {
2864
+ ngAfterViewInit() {
2865
+ this.onResize();
2866
+ }
2867
+ onProvideSuggestions(value) {
2868
+ this.searchtermChange.emit(value);
2869
+ if (value === '') {
2870
+ this.isOpen = false;
2871
+ this.suggestions$.next([]);
2872
+ }
2873
+ else {
2874
+ this.isLoading$.next(true);
2875
+ this.isOpen = true;
2876
+ this.provideSuggestions.emit(value);
2877
+ }
2878
+ }
2879
+ set suggestions(value) {
2880
+ this.isLoading$.next(false);
2881
+ this.suggestions$.next(value);
2882
+ }
2883
+ suggestionClicked(suggestion) {
2884
+ this.searchterm = suggestion.text;
2885
+ this.searchtermChange.emit(this.searchterm);
2886
+ this.isOpen = false;
2887
+ this.suggestionSelected.emit(suggestion);
2888
+ }
2889
+ onSubmit() {
2890
+ this.isOpen = false;
2891
+ this.submitted.emit(this.searchterm);
2892
+ }
2893
+ focus() {
2894
+ this.textbox.nativeElement.focus();
2895
+ }
2896
+ onResize() {
2897
+ this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
1572
2898
  }
1573
2899
  }
1574
- BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1575
- BsDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatepickerComponent, selector: "bs-datepicker", ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""], components: [{ type: BsCalendarComponent, selector: "bs-calendar", inputs: ["currentMonth", "selectedDate"], outputs: ["currentMonthChange", "selectedDateChange"] }], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "closeOnClickOutside"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }], pipes: { "date": i1.DatePipe } });
1576
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
2900
+ BsTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2901
+ BsTypeaheadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTypeaheadComponent, selector: "bs-typeahead", inputs: { searchterm: "searchterm", isLoadingText: "isLoadingText", noSuggestionsText: "noSuggestionsText", suggestions: "suggestions" }, outputs: { provideSuggestions: "provideSuggestions", suggestionSelected: "suggestionSelected", searchtermChange: "searchtermChange", submitted: "submitted" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textbox"], descendants: true }], ngImport: i0, template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\">\n <input type=\"text\" class=\"form-control\" #textbox [(ngModel)]=\"searchterm\" (ngModelChange)=\"onProvideSuggestions($event)\" (keyup.enter)=\"onSubmit()\" />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static\" [style.width.px]=\"hostWidth$ | async\">\n <bs-progress *ngIf=\"isLoading$ | async\" [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li *ngIf=\"isLoading$ | async\">\n <a class=\"dropdown-item disabled\">{{ isLoadingText }}</a>\n </li>\n <ng-container *ngIf=\"(isLoading$ | async) === false\">\n <li *ngIf=\"showNoSuggestions$ | async\">\n <a class=\"dropdown-item disabled\">{{ noSuggestionsText }}</a>\n </li>\n <li *ngFor=\"let suggestion of (suggestions$ | async)\" (click)=\"suggestionClicked(suggestion)\">\n <a class=\"dropdown-item cursor-pointer\">{{ suggestion.text }}</a>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>", styles: ["bs-progress{margin-top:-8px;margin-bottom:6px}\n"], components: [{ type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate"] }], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe } });
2902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
1577
2903
  type: Component,
1578
- args: [{ selector: 'bs-datepicker', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""] }]
1579
- }], ctorParameters: function () { return []; } });
2904
+ args: [{ selector: 'bs-typeahead', template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\">\n <input type=\"text\" class=\"form-control\" #textbox [(ngModel)]=\"searchterm\" (ngModelChange)=\"onProvideSuggestions($event)\" (keyup.enter)=\"onSubmit()\" />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static\" [style.width.px]=\"hostWidth$ | async\">\n <bs-progress *ngIf=\"isLoading$ | async\" [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li *ngIf=\"isLoading$ | async\">\n <a class=\"dropdown-item disabled\">{{ isLoadingText }}</a>\n </li>\n <ng-container *ngIf=\"(isLoading$ | async) === false\">\n <li *ngIf=\"showNoSuggestions$ | async\">\n <a class=\"dropdown-item disabled\">{{ noSuggestionsText }}</a>\n </li>\n <li *ngFor=\"let suggestion of (suggestions$ | async)\" (click)=\"suggestionClicked(suggestion)\">\n <a class=\"dropdown-item cursor-pointer\">{{ suggestion.text }}</a>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>", styles: ["bs-progress{margin-top:-8px;margin-bottom:6px}\n"] }]
2905
+ }], ctorParameters: function () { return []; }, propDecorators: { textbox: [{
2906
+ type: ViewChild,
2907
+ args: ['textbox']
2908
+ }], searchterm: [{
2909
+ type: Input
2910
+ }], isLoadingText: [{
2911
+ type: Input
2912
+ }], noSuggestionsText: [{
2913
+ type: Input
2914
+ }], provideSuggestions: [{
2915
+ type: Output
2916
+ }], suggestionSelected: [{
2917
+ type: Output
2918
+ }], searchtermChange: [{
2919
+ type: Output
2920
+ }], submitted: [{
2921
+ type: Output
2922
+ }], suggestions: [{
2923
+ type: Input
2924
+ }], onResize: [{
2925
+ type: HostListener,
2926
+ args: ['window:resize']
2927
+ }] } });
1580
2928
 
1581
- class BsDatepickerModule {
2929
+ class BsTypeaheadModule {
1582
2930
  }
1583
- BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1584
- BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
1585
- BsCalendarModule,
1586
- BsDropdownModule], exports: [BsDatepickerComponent] });
1587
- BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
2931
+ BsTypeaheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2932
+ BsTypeaheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, declarations: [BsTypeaheadComponent], imports: [CommonModule,
2933
+ FormsModule,
2934
+ BsDropdownModule,
2935
+ BsProgressBarModule], exports: [BsTypeaheadComponent] });
2936
+ BsTypeaheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, imports: [[
1588
2937
  CommonModule,
1589
- BsCalendarModule,
1590
- BsDropdownModule
2938
+ FormsModule,
2939
+ BsDropdownModule,
2940
+ BsProgressBarModule
1591
2941
  ]] });
1592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
2942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, decorators: [{
1593
2943
  type: NgModule,
1594
2944
  args: [{
1595
2945
  declarations: [
1596
- BsDatepickerComponent
2946
+ BsTypeaheadComponent
1597
2947
  ],
1598
2948
  imports: [
1599
2949
  CommonModule,
1600
- BsCalendarModule,
1601
- BsDropdownModule
2950
+ FormsModule,
2951
+ BsDropdownModule,
2952
+ BsProgressBarModule
1602
2953
  ],
1603
2954
  exports: [
1604
- BsDatepickerComponent
2955
+ BsTypeaheadComponent
1605
2956
  ]
1606
2957
  }]
1607
2958
  }] });
1608
2959
 
1609
- class BsMultiselectComponent {
1610
- constructor() {
1611
- this.items = [];
1612
- this.selectedItems = [];
1613
- }
1614
- itemChange(item, event) {
1615
- if (!!event.target.checked) {
1616
- this.selectedItems.push(item);
1617
- }
1618
- else {
1619
- this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
2960
+ class BsFontColorPipe {
2961
+ transform(color_hex) {
2962
+ if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {
2963
+ return '#FFFFFF';
1620
2964
  }
1621
- }
1622
- ngOnInit() {
2965
+ const R_HEX = color_hex.substr(1, 2);
2966
+ const G_HEX = color_hex.substr(3, 2);
2967
+ const B_HEX = color_hex.substr(5, 2);
2968
+ const R_DEC = parseInt(R_HEX, 16);
2969
+ const G_DEC = parseInt(G_HEX, 16);
2970
+ const B_DEC = parseInt(B_HEX, 16);
2971
+ const CONTRAST_HEX = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';
2972
+ return CONTRAST_HEX;
1623
2973
  }
1624
2974
  }
1625
- BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1626
- BsMultiselectComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsMultiselectComponent, selector: "bs-multiselect", inputs: { items: "items", selectedItems: "selectedItems" }, ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white p-3 border shadow\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [""], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "closeOnClickOutside"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1627
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
1628
- type: Component,
1629
- args: [{ selector: 'bs-multiselect', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white p-3 border shadow\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [""] }]
1630
- }], ctorParameters: function () { return []; }, propDecorators: { items: [{
1631
- type: Input
1632
- }], selectedItems: [{
1633
- type: Input
1634
- }] } });
2975
+ BsFontColorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2976
+ BsFontColorPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, name: "bsFontColor" });
2977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, decorators: [{
2978
+ type: Pipe,
2979
+ args: [{
2980
+ name: 'bsFontColor'
2981
+ }]
2982
+ }] });
1635
2983
 
1636
- class BsMultiselectModule {
2984
+ class BsFontColorPipeModule {
1637
2985
  }
1638
- BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1639
- BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
1640
- BsDropdownModule], exports: [BsMultiselectComponent] });
1641
- BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
1642
- CommonModule,
1643
- BsDropdownModule
2986
+ BsFontColorPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2987
+ BsFontColorPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, declarations: [BsFontColorPipe], imports: [CommonModule], exports: [BsFontColorPipe] });
2988
+ BsFontColorPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, imports: [[
2989
+ CommonModule
1644
2990
  ]] });
1645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
2991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, decorators: [{
1646
2992
  type: NgModule,
1647
2993
  args: [{
1648
2994
  declarations: [
1649
- BsMultiselectComponent
2995
+ BsFontColorPipe
1650
2996
  ],
1651
2997
  imports: [
1652
- CommonModule,
1653
- BsDropdownModule
2998
+ CommonModule
1654
2999
  ],
1655
3000
  exports: [
1656
- BsMultiselectComponent
3001
+ BsFontColorPipe
1657
3002
  ]
1658
3003
  }]
1659
3004
  }] });
@@ -1662,5 +3007,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1662
3007
  * Generated bundle index. Do not edit.
1663
3008
  */
1664
3009
 
1665
- export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective };
3010
+ export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsContextMenuDirective, BsContextMenuModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsFileUploadComponent, BsFileUploadModule, BsFileUploadTemplateDirective, BsFontColorPipe, BsFontColorPipeModule, BsForDirective, BsForModule, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
1666
3011
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map