@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,17 +1,119 @@
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 { RouterModule } from '@angular/router';
9
- import * as i1$1 from '@mintplayer/ng-click-outside';
10
- import { ClickOutsideModule } from '@mintplayer/ng-click-outside';
11
5
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
12
- import { TemplatePortal } from '@angular/cdk/portal';
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 { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
10
+ import * as i1$1 from '@angular/cdk/overlay';
14
11
  import { OverlayModule } from '@angular/cdk/overlay';
12
+ import * as i1$2 from '@mintplayer/ng-click-outside';
13
+ import { ClickOutsideDirective, ClickOutsideModule } from '@mintplayer/ng-click-outside';
14
+ import { FocusOnLoadModule } from '@mintplayer/ng-focus-on-load';
15
+ import { RouterModule, ROUTER_CONFIGURATION } from '@angular/router';
16
+ import * as i3 from '@angular/forms';
17
+ import { FormsModule } from '@angular/forms';
18
+
19
+ class BsAccordionTabComponent {
20
+ constructor(accordion) {
21
+ this.accordion = accordion;
22
+ }
23
+ ngOnInit() {
24
+ }
25
+ headerClicked(event) {
26
+ if (this.accordion.activeTab === this) {
27
+ this.accordion.activeTab = null;
28
+ }
29
+ else {
30
+ this.accordion.activeTab = this;
31
+ }
32
+ }
33
+ }
34
+ BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
35
+ 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] });
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
37
+ type: Component,
38
+ 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"] }]
39
+ }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
40
+
41
+ class BsAccordionComponent {
42
+ constructor() {
43
+ this.activeTab = null;
44
+ }
45
+ ngOnInit() {
46
+ }
47
+ }
48
+ BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
49
+ 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: [""] });
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
51
+ type: Component,
52
+ args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
53
+ }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
54
+ type: ContentChildren,
55
+ args: [BsAccordionTabComponent]
56
+ }] } });
57
+
58
+ class BsAccordionTabHeaderComponent {
59
+ constructor(accordionTab, accordion) {
60
+ this.accordionTab = accordionTab;
61
+ this.accordion = accordion;
62
+ }
63
+ ngOnInit() {
64
+ }
65
+ headerClicked(event) {
66
+ event.preventDefault();
67
+ if (this.accordion.activeTab === this.accordionTab) {
68
+ this.accordion.activeTab = null;
69
+ }
70
+ else {
71
+ this.accordion.activeTab = this.accordionTab;
72
+ }
73
+ }
74
+ foo(event) {
75
+ event.preventDefault();
76
+ }
77
+ }
78
+ 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 });
79
+ 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: [""] });
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
81
+ type: Component,
82
+ 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: [""] }]
83
+ }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
84
+
85
+ class BsAccordionModule {
86
+ }
87
+ BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
88
+ BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
89
+ BsAccordionTabComponent,
90
+ BsAccordionTabHeaderComponent], imports: [CommonModule,
91
+ BrowserAnimationsModule], exports: [BsAccordionComponent,
92
+ BsAccordionTabComponent,
93
+ BsAccordionTabHeaderComponent] });
94
+ BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
95
+ CommonModule,
96
+ BrowserAnimationsModule
97
+ ]] });
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
99
+ type: NgModule,
100
+ args: [{
101
+ declarations: [
102
+ BsAccordionComponent,
103
+ BsAccordionTabComponent,
104
+ BsAccordionTabHeaderComponent
105
+ ],
106
+ imports: [
107
+ CommonModule,
108
+ BrowserAnimationsModule
109
+ ],
110
+ exports: [
111
+ BsAccordionComponent,
112
+ BsAccordionTabComponent,
113
+ BsAccordionTabHeaderComponent
114
+ ]
115
+ }]
116
+ }] });
15
117
 
16
118
  var Color;
17
119
  (function (Color) {
@@ -28,6 +130,14 @@ var Color;
28
130
  Color[Color["transparent"] = 10] = "transparent";
29
131
  })(Color || (Color = {}));
30
132
 
133
+ var Position;
134
+ (function (Position) {
135
+ Position[Position["top"] = 0] = "top";
136
+ Position[Position["left"] = 1] = "left";
137
+ Position[Position["bottom"] = 2] = "bottom";
138
+ Position[Position["right"] = 3] = "right";
139
+ })(Position || (Position = {}));
140
+
31
141
  class BsAlertComponent {
32
142
  constructor() {
33
143
  this.type = Color.primary;
@@ -38,10 +148,10 @@ class BsAlertComponent {
38
148
  }
39
149
  }
40
150
  BsAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
- 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] });
151
+ 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] });
42
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, decorators: [{
43
153
  type: Component,
44
- 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"] }]
154
+ 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"] }]
45
155
  }], ctorParameters: function () { return []; }, propDecorators: { type: [{
46
156
  type: Input
47
157
  }] } });
@@ -85,63 +195,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
85
195
  }]
86
196
  }] });
87
197
 
88
- class BsCardComponent {
89
- constructor() {
90
- }
91
- ngOnInit() {
92
- }
93
- ngAfterViewInit() {
94
- }
95
- }
96
- BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
97
- 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"] });
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
99
- type: Component,
100
- 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"] }]
101
- }], ctorParameters: function () { return []; } });
102
-
103
- class BsCardHeaderComponent {
104
- constructor() {
105
- }
106
- ngOnInit() {
107
- }
108
- }
109
- BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
110
- 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: [""] });
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
112
- type: Component,
113
- args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
114
- }], ctorParameters: function () { return []; } });
115
-
116
- class BsCardModule {
117
- }
118
- BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
119
- BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
120
- BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
121
- BsCardHeaderComponent] });
122
- BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
124
- type: NgModule,
125
- args: [{
126
- imports: [CommonModule],
127
- declarations: [
128
- BsCardComponent,
129
- BsCardHeaderComponent
130
- ],
131
- exports: [
132
- BsCardComponent,
133
- BsCardHeaderComponent
134
- ]
135
- }]
136
- }] });
137
-
138
198
  class BsCalendarMonthService {
139
- constructor() {
140
- }
141
199
  getWeeks(month) {
142
- let firstAndLast = this.getFirstAndLastDayOfMonth(month);
143
- let days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
144
- let allDays = [
200
+ const firstAndLast = this.getFirstAndLastDayOfMonth(month);
201
+ const days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
202
+ const allDays = [
145
203
  ...this.generateList(this.dayOfWeekMondayBased(firstAndLast.first)).map(d => null),
146
204
  ...this.generateList(days).map(d => {
147
205
  return {
@@ -151,8 +209,8 @@ class BsCalendarMonthService {
151
209
  }),
152
210
  ...this.generateList(6 - this.dayOfWeekMondayBased(firstAndLast.last)).map(d => null),
153
211
  ];
154
- let weeks = this.chunk(allDays, 7);
155
- let weeksMapped = weeks.map((w, i) => {
212
+ const weeks = this.chunk(allDays, 7);
213
+ const weeksMapped = weeks.map((w, i) => {
156
214
  var _a;
157
215
  return {
158
216
  number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), (_a = w.find(d => d !== null)) === null || _a === void 0 ? void 0 : _a.dayOfMonth)),
@@ -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,102 @@ 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 () {
746
+ return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef, decorators: [{
747
+ type: Host
748
+ }, {
749
+ type: SkipSelf
750
+ }] }];
751
+ }, propDecorators: { clickAnywhere: [{
752
+ type: HostListener,
753
+ args: ['document:click', ['$event']]
754
+ }], onBlur: [{
755
+ type: HostListener,
756
+ args: ['window:blur']
757
+ }] } });
758
+
759
+ class BsContextMenuModule {
760
+ }
761
+ BsContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
762
+ BsContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, declarations: [BsContextMenuDirective], imports: [CommonModule], exports: [BsContextMenuDirective] });
763
+ BsContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, imports: [[
764
+ CommonModule
765
+ ]] });
766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, decorators: [{
767
+ type: NgModule,
768
+ args: [{
769
+ declarations: [
770
+ BsContextMenuDirective
771
+ ],
772
+ imports: [
773
+ CommonModule
774
+ ],
775
+ exports: [
776
+ BsContextMenuDirective
777
+ ]
778
+ }]
779
+ }] });
780
+
563
781
  class BsDatatableColumnDirective {
564
782
  constructor(templateRef) {
565
783
  this.bsDatatableColumn = { name: '', sortable: true };
@@ -870,18 +1088,648 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
870
1088
  }]
871
1089
  }] });
872
1090
 
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 []; } });
1091
+ class BsDropdownMenuDirective extends ClickOutsideDirective {
1092
+ constructor(dropdown, document, viewContainerRef, templateRef, overlay, elementRef, zone, platformId) {
1093
+ super(elementRef, zone, platformId);
1094
+ this.dropdown = dropdown;
1095
+ this.viewContainerRef = viewContainerRef;
1096
+ this.templateRef = templateRef;
1097
+ this.overlay = overlay;
1098
+ this.wait = false;
1099
+ this.destroyed$ = new Subject();
1100
+ this.overlayRef = null;
1101
+ this.templatePortal = null;
1102
+ this.document = document;
1103
+ this.dropdown.isOpen$
1104
+ .pipe(takeUntil(this.destroyed$))
1105
+ .subscribe((isOpen) => {
1106
+ if (isOpen) {
1107
+ this.wait = true;
1108
+ setTimeout(() => this.wait = false, 100);
1109
+ this.overlayRef = this.overlay.create({
1110
+ hasBackdrop: this.dropdown.hasBackdrop,
1111
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
1112
+ positionStrategy: this.overlay.position()
1113
+ .flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
1114
+ .withPositions([
1115
+ // element: BottomLeft - dropdown: TopLeft
1116
+ { originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1117
+ // element: TopLeft - dropdown: BottomLeft
1118
+ { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1119
+ ]),
1120
+ });
1121
+ if (this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
1122
+ this.overlayRef.backdropClick().subscribe(() => {
1123
+ this.dropdown.isOpen = false;
1124
+ });
1125
+ }
1126
+ this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
1127
+ this.overlayRef.attach(this.templatePortal);
1128
+ }
1129
+ else {
1130
+ if (this.overlayRef) {
1131
+ this.overlayRef.detach();
1132
+ this.overlayRef.dispose();
1133
+ this.overlayRef = null;
1134
+ }
1135
+ }
1136
+ });
1137
+ }
1138
+ clickedOutside(ev) {
1139
+ var _a;
1140
+ if (!this.wait) {
1141
+ if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.overlayElement.contains(ev.target))) {
1142
+ this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1143
+ if (isOpen && !this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
1144
+ this.dropdown.isOpen = false;
1145
+ }
1146
+ });
1147
+ }
1148
+ }
1149
+ }
1150
+ }
1151
+ 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 });
1152
+ 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 });
1153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
1154
+ type: Directive,
1155
+ args: [{
1156
+ selector: '[bsDropdownMenu]',
1157
+ host: {
1158
+ '[class.show]': 'dropdown.isOpen',
1159
+ },
1160
+ }]
1161
+ }], ctorParameters: function () {
1162
+ return [{ type: BsDropdownDirective, decorators: [{
1163
+ type: Inject,
1164
+ args: [forwardRef(() => BsDropdownDirective)]
1165
+ }] }, { type: undefined, decorators: [{
1166
+ type: Inject,
1167
+ args: [DOCUMENT]
1168
+ }] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: Object, decorators: [{
1169
+ type: Inject,
1170
+ args: [PLATFORM_ID]
1171
+ }] }];
1172
+ }, propDecorators: { clickedOutside: [{
1173
+ type: HostListener,
1174
+ args: ['clickOutside', ['$event']]
1175
+ }] } });
1176
+
1177
+ class BsDropdownToggleDirective {
1178
+ constructor(dropdown, toggleButton) {
1179
+ this.dropdown = dropdown;
1180
+ this.toggleButton = toggleButton;
1181
+ }
1182
+ onClick() {
1183
+ this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1184
+ this.dropdown.isOpen$.next(!isOpen);
1185
+ });
1186
+ }
1187
+ }
1188
+ 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 });
1189
+ BsDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
1191
+ type: Directive,
1192
+ args: [{
1193
+ selector: '[bsDropdownToggle]'
1194
+ }]
1195
+ }], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
1196
+ type: HostListener,
1197
+ args: ['click']
1198
+ }] } });
1199
+
1200
+ class BsDropdownDirective {
1201
+ constructor(elementRef) {
1202
+ this.isOpen$ = new BehaviorSubject(false);
1203
+ this.toggle = null;
1204
+ this.hasBackdrop = false;
1205
+ this.sameWidth = false;
1206
+ this.closeOnClickOutside = false;
1207
+ this.isOpenChange = new EventEmitter();
1208
+ this.elementRef = elementRef;
1209
+ }
1210
+ //#region IsOpen
1211
+ get isOpen() {
1212
+ return this.isOpen$.value;
1213
+ }
1214
+ set isOpen(value) {
1215
+ if (this.isOpen$.value !== value) {
1216
+ this.isOpen$.next(value);
1217
+ this.isOpenChange.emit(value);
1218
+ }
1219
+ }
1220
+ //#endregion
1221
+ onBlur() {
1222
+ this.isOpen = false;
1223
+ }
1224
+ }
1225
+ BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1226
+ 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 });
1227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
1228
+ type: Directive,
1229
+ args: [{
1230
+ selector: '[bsDropdown]'
1231
+ }]
1232
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { menu: [{
1233
+ type: ContentChild,
1234
+ args: [BsDropdownMenuDirective, { static: false }]
1235
+ }], toggle: [{
1236
+ type: ContentChild,
1237
+ args: [BsDropdownToggleDirective, { static: false }]
1238
+ }], hasBackdrop: [{
1239
+ type: Input
1240
+ }], sameWidth: [{
1241
+ type: Input
1242
+ }], closeOnClickOutside: [{
1243
+ type: Input
1244
+ }], isOpenChange: [{
1245
+ type: Output
1246
+ }], isOpen: [{
1247
+ type: Input
1248
+ }], onBlur: [{
1249
+ type: HostListener,
1250
+ args: ['window:blur']
1251
+ }] } });
1252
+
1253
+ class BsDatepickerComponent {
1254
+ constructor() {
1255
+ this.selectedDate = new Date();
1256
+ this.currentMonth = new Date();
1257
+ }
1258
+ ngOnInit() {
1259
+ }
1260
+ }
1261
+ BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1262
+ 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 } });
1263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
1264
+ type: Component,
1265
+ 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: [""] }]
1266
+ }], ctorParameters: function () { return []; } });
1267
+
1268
+ class BsDropdownModule {
1269
+ }
1270
+ BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1271
+ BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
1272
+ BsDropdownToggleDirective,
1273
+ BsDropdownMenuDirective], imports: [CommonModule,
1274
+ OverlayModule,
1275
+ ClickOutsideModule], exports: [BsDropdownDirective,
1276
+ BsDropdownToggleDirective,
1277
+ BsDropdownMenuDirective] });
1278
+ BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
1279
+ CommonModule,
1280
+ OverlayModule,
1281
+ ClickOutsideModule
1282
+ ]] });
1283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
1284
+ type: NgModule,
1285
+ args: [{
1286
+ declarations: [
1287
+ BsDropdownDirective,
1288
+ BsDropdownToggleDirective,
1289
+ BsDropdownMenuDirective
1290
+ ],
1291
+ imports: [
1292
+ CommonModule,
1293
+ OverlayModule,
1294
+ ClickOutsideModule
1295
+ ],
1296
+ exports: [
1297
+ BsDropdownDirective,
1298
+ BsDropdownToggleDirective,
1299
+ BsDropdownMenuDirective
1300
+ ]
1301
+ }]
1302
+ }] });
1303
+
1304
+ class BsDatepickerModule {
1305
+ }
1306
+ BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1307
+ BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
1308
+ BsCalendarModule,
1309
+ BsDropdownModule], exports: [BsDatepickerComponent] });
1310
+ BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
1311
+ CommonModule,
1312
+ BsCalendarModule,
1313
+ BsDropdownModule
1314
+ ]] });
1315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
1316
+ type: NgModule,
1317
+ args: [{
1318
+ declarations: [
1319
+ BsDatepickerComponent
1320
+ ],
1321
+ imports: [
1322
+ CommonModule,
1323
+ BsCalendarModule,
1324
+ BsDropdownModule
1325
+ ],
1326
+ exports: [
1327
+ BsDatepickerComponent
1328
+ ]
1329
+ }]
1330
+ }] });
1331
+
1332
+ class BsProgressComponent {
1333
+ constructor() {
1334
+ this.progressClass = true;
1335
+ this.height = null;
1336
+ this.isIndeterminate = false;
1337
+ }
1338
+ }
1339
+ BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1340
+ 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"] }] });
1341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
1342
+ type: Component,
1343
+ 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"] }]
1344
+ }], propDecorators: { progressClass: [{
1345
+ type: HostBinding,
1346
+ args: ['class.progress']
1347
+ }], height: [{
1348
+ type: Input
1349
+ }, {
1350
+ type: HostBinding,
1351
+ args: ['style.height.px']
1352
+ }], isIndeterminate: [{
1353
+ type: Input
1354
+ }] } });
1355
+
1356
+ class BsProgressBarComponent {
1357
+ constructor() {
1358
+ this.destroyed$ = new Subject();
1359
+ this.minimum$ = new BehaviorSubject(0);
1360
+ this.maximum$ = new BehaviorSubject(100);
1361
+ this.value$ = new BehaviorSubject(50);
1362
+ this.color$ = new BehaviorSubject(Color.primary);
1363
+ this.striped = false;
1364
+ this.animated = false;
1365
+ this.progressBar = true;
1366
+ this.colorClass = 'bg-primary';
1367
+ this.widthStyle = '0';
1368
+ this.role = 'progressbar';
1369
+ this.valueNow = 50;
1370
+ this.valueMin = 0;
1371
+ this.valueMax = 100;
1372
+ this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
1373
+ .pipe(map(([minimum, maximum, value]) => {
1374
+ return (value - minimum) / (maximum - minimum) * 100;
1375
+ }));
1376
+ this.width$ = this.percentage$
1377
+ .pipe(map((width) => {
1378
+ return String(width) + '%';
1379
+ }));
1380
+ this.colorClass$ = this.color$
1381
+ .pipe(map((color) => {
1382
+ const name = Color[color];
1383
+ return `bg-${name}`;
1384
+ }));
1385
+ this.colorClass$
1386
+ .pipe(takeUntil(this.destroyed$))
1387
+ .subscribe((color) => {
1388
+ this.colorClass = color;
1389
+ });
1390
+ this.width$
1391
+ .pipe(takeUntil(this.destroyed$))
1392
+ .subscribe((width) => {
1393
+ this.widthStyle = width;
1394
+ });
1395
+ this.value$
1396
+ .pipe(takeUntil(this.destroyed$))
1397
+ .subscribe((value) => {
1398
+ this.valueNow = value;
1399
+ });
1400
+ this.minimum$
1401
+ .pipe(takeUntil(this.destroyed$))
1402
+ .subscribe((value) => {
1403
+ this.valueMin = value;
1404
+ });
1405
+ this.maximum$
1406
+ .pipe(takeUntil(this.destroyed$))
1407
+ .subscribe((value) => {
1408
+ this.valueMax = value;
1409
+ });
1410
+ }
1411
+ set minimum(value) {
1412
+ this.minimum$.next(value);
1413
+ }
1414
+ set maximum(value) {
1415
+ this.maximum$.next(value);
1416
+ }
1417
+ set value(value) {
1418
+ this.value$.next(value);
1419
+ }
1420
+ set color(value) {
1421
+ this.color$.next(value);
1422
+ }
1423
+ ngOnDestroy() {
1424
+ this.destroyed$.next(true);
1425
+ }
1426
+ }
1427
+ BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1428
+ 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: [""] });
1429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
1430
+ type: Component,
1431
+ args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
1432
+ }], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
1433
+ type: Input
1434
+ }], maximum: [{
1435
+ type: Input
1436
+ }], value: [{
1437
+ type: Input
1438
+ }], color: [{
1439
+ type: Input
1440
+ }], striped: [{
1441
+ type: Input
1442
+ }, {
1443
+ type: HostBinding,
1444
+ args: ['class.progress-bar-striped']
1445
+ }], animated: [{
1446
+ type: Input
1447
+ }, {
1448
+ type: HostBinding,
1449
+ args: ['class.progress-bar-animated']
1450
+ }], progressBar: [{
1451
+ type: HostBinding,
1452
+ args: ['class.progress-bar']
1453
+ }], colorClass: [{
1454
+ type: HostBinding,
1455
+ args: ['class']
1456
+ }], widthStyle: [{
1457
+ type: HostBinding,
1458
+ args: ['style.width']
1459
+ }], role: [{
1460
+ type: HostBinding,
1461
+ args: ['attr.role']
1462
+ }], valueNow: [{
1463
+ type: HostBinding,
1464
+ args: ['attr.aria-valuenow']
1465
+ }], valueMin: [{
1466
+ type: HostBinding,
1467
+ args: ['attr.aria-valuemin']
1468
+ }], valueMax: [{
1469
+ type: HostBinding,
1470
+ args: ['attr.aria-valuemax']
1471
+ }] } });
1472
+
1473
+ class BsForDirective {
1474
+ onMouseClick() {
1475
+ if (!('tagName' in this.bsFor)) {
1476
+ this.bsFor.focus();
1477
+ }
1478
+ else if (this.bsFor.tagName.toLowerCase() !== 'input') {
1479
+ this.bsFor.focus();
1480
+ }
1481
+ else if (this.bsFor.type.toLowerCase() === 'file') {
1482
+ this.bsFor.click();
1483
+ }
1484
+ else {
1485
+ this.bsFor.focus();
1486
+ }
1487
+ }
1488
+ }
1489
+ BsForDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1490
+ 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 });
1491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForDirective, decorators: [{
1492
+ type: Directive,
1493
+ args: [{
1494
+ selector: '[bsFor]'
1495
+ }]
1496
+ }], propDecorators: { bsFor: [{
1497
+ type: Input
1498
+ }], onMouseClick: [{
1499
+ type: HostListener,
1500
+ args: ['click']
1501
+ }] } });
1502
+
1503
+ class BsFormatBytesPipe {
1504
+ transform(value, decimals = 2) {
1505
+ if (value === 0) {
1506
+ return "0 Bytes";
1507
+ }
1508
+ const k = 1024;
1509
+ const dm = decimals <= 0 ? 0 : decimals;
1510
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
1511
+ const i = Math.floor(Math.log(value) / Math.log(k));
1512
+ return parseFloat((value / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
1513
+ }
1514
+ }
1515
+ BsFormatBytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1516
+ BsFormatBytesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, name: "bsFormatBytes" });
1517
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesPipe, decorators: [{
1518
+ type: Pipe,
1519
+ args: [{
1520
+ name: 'bsFormatBytes'
1521
+ }]
1522
+ }] });
1523
+
1524
+ class BsFileUploadComponent {
1525
+ constructor() {
1526
+ this.dropFilesCaption = 'Drop your files here';
1527
+ this.browseFilesCaption = 'Browse for files';
1528
+ this.placeholder = 'Drop files to upload';
1529
+ this.isDraggingFile = false;
1530
+ this.files = [];
1531
+ this.filesDropped = new EventEmitter();
1532
+ }
1533
+ onChange(event) {
1534
+ console.log('event', event);
1535
+ if (!event.target)
1536
+ return;
1537
+ if (!('files' in event.target))
1538
+ return;
1539
+ if (!event.target['files'])
1540
+ return;
1541
+ const files = event.target.files;
1542
+ if (!files)
1543
+ return;
1544
+ this.processDroppedFiles(files);
1545
+ }
1546
+ onDragOver(event) {
1547
+ event.preventDefault();
1548
+ event.stopPropagation();
1549
+ if (event.dataTransfer) {
1550
+ this.isDraggingFile = true;
1551
+ event.dataTransfer.effectAllowed = "copy";
1552
+ }
1553
+ }
1554
+ onDragLeave(event) {
1555
+ event.preventDefault();
1556
+ event.stopPropagation();
1557
+ this.isDraggingFile = false;
1558
+ }
1559
+ onDrop(event) {
1560
+ event.preventDefault();
1561
+ event.stopPropagation();
1562
+ this.isDraggingFile = false;
1563
+ if (event.dataTransfer && event.dataTransfer.files) {
1564
+ this.processDroppedFiles(event.dataTransfer.files);
1565
+ }
1566
+ }
1567
+ processDroppedFiles(fileList) {
1568
+ const newFiles = [...Array(fileList.length).keys()]
1569
+ .map(i => fileList.item(i))
1570
+ .filter(f => !!f)
1571
+ .map(f => ({ file: f, progress: 0 }));
1572
+ this.files.push(...newFiles);
1573
+ this.filesDropped.emit(newFiles);
1574
+ }
1575
+ }
1576
+ BsFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1577
+ 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 } });
1578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadComponent, decorators: [{
1579
+ type: Component,
1580
+ 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"] }]
1581
+ }], propDecorators: { dropFilesCaption: [{
1582
+ type: Input
1583
+ }], browseFilesCaption: [{
1584
+ type: Input
1585
+ }], placeholder: [{
1586
+ type: Input
1587
+ }], files: [{
1588
+ type: Input
1589
+ }], filesDropped: [{
1590
+ type: Output
1591
+ }], onDragOver: [{
1592
+ type: HostListener,
1593
+ args: ['dragover', ['$event']]
1594
+ }], onDragLeave: [{
1595
+ type: HostListener,
1596
+ args: ['dragleave', ['$event']]
1597
+ }], onDrop: [{
1598
+ type: HostListener,
1599
+ args: ['drop', ['$event']]
1600
+ }] } });
1601
+
1602
+ class BsFileUploadTemplateDirective {
1603
+ constructor(fileUploadComponent, templateRef) {
1604
+ fileUploadComponent.fileTemplate = templateRef;
1605
+ }
1606
+ }
1607
+ 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 });
1608
+ BsFileUploadTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsFileUploadTemplateDirective, selector: "[bsFileUploadTemplate]", ngImport: i0 });
1609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadTemplateDirective, decorators: [{
1610
+ type: Directive,
1611
+ args: [{
1612
+ selector: '[bsFileUploadTemplate]'
1613
+ }]
1614
+ }], ctorParameters: function () { return [{ type: BsFileUploadComponent }, { type: i0.TemplateRef }]; } });
1615
+
1616
+ class BsForModule {
1617
+ }
1618
+ BsForModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1619
+ BsForModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, declarations: [BsForDirective], imports: [CommonModule], exports: [BsForDirective] });
1620
+ BsForModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, imports: [[
1621
+ CommonModule
1622
+ ]] });
1623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsForModule, decorators: [{
1624
+ type: NgModule,
1625
+ args: [{
1626
+ declarations: [
1627
+ BsForDirective
1628
+ ],
1629
+ imports: [
1630
+ CommonModule
1631
+ ],
1632
+ exports: [
1633
+ BsForDirective
1634
+ ]
1635
+ }]
1636
+ }] });
1637
+
1638
+ class BsProgressBarModule {
1639
+ }
1640
+ BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1641
+ BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
1642
+ BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
1643
+ BsProgressComponent] });
1644
+ BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
1645
+ CommonModule
1646
+ ]] });
1647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
1648
+ type: NgModule,
1649
+ args: [{
1650
+ declarations: [
1651
+ BsProgressBarComponent,
1652
+ BsProgressComponent
1653
+ ],
1654
+ imports: [
1655
+ CommonModule
1656
+ ],
1657
+ exports: [
1658
+ BsProgressBarComponent,
1659
+ BsProgressComponent
1660
+ ]
1661
+ }]
1662
+ }] });
1663
+
1664
+ class BsFormatBytesModule {
1665
+ }
1666
+ BsFormatBytesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1667
+ BsFormatBytesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, declarations: [BsFormatBytesPipe], imports: [CommonModule], exports: [BsFormatBytesPipe] });
1668
+ BsFormatBytesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, imports: [[
1669
+ CommonModule
1670
+ ]] });
1671
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFormatBytesModule, decorators: [{
1672
+ type: NgModule,
1673
+ args: [{
1674
+ declarations: [
1675
+ BsFormatBytesPipe
1676
+ ],
1677
+ imports: [
1678
+ CommonModule
1679
+ ],
1680
+ exports: [
1681
+ BsFormatBytesPipe
1682
+ ]
1683
+ }]
1684
+ }] });
1685
+
1686
+ class BsFileUploadModule {
1687
+ }
1688
+ BsFileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1689
+ BsFileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, declarations: [BsFileUploadComponent,
1690
+ BsFileUploadTemplateDirective], imports: [CommonModule,
1691
+ BsForModule,
1692
+ BsFormatBytesModule,
1693
+ BsProgressBarModule], exports: [BsFileUploadComponent,
1694
+ BsFileUploadTemplateDirective] });
1695
+ BsFileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, imports: [[
1696
+ CommonModule,
1697
+ BsForModule,
1698
+ BsFormatBytesModule,
1699
+ BsProgressBarModule
1700
+ ]] });
1701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFileUploadModule, decorators: [{
1702
+ type: NgModule,
1703
+ args: [{
1704
+ declarations: [
1705
+ BsFileUploadComponent,
1706
+ BsFileUploadTemplateDirective
1707
+ ],
1708
+ imports: [
1709
+ CommonModule,
1710
+ BsForModule,
1711
+ BsFormatBytesModule,
1712
+ BsProgressBarModule
1713
+ ],
1714
+ exports: [
1715
+ BsFileUploadComponent,
1716
+ BsFileUploadTemplateDirective
1717
+ ]
1718
+ }]
1719
+ }] });
1720
+
1721
+ class BsListGroupItemComponent {
1722
+ constructor() {
1723
+ }
1724
+ ngOnInit() {
1725
+ }
1726
+ }
1727
+ BsListGroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1728
+ 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"] });
1729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
1730
+ type: Component,
1731
+ 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"] }]
1732
+ }], ctorParameters: function () { return []; } });
885
1733
 
886
1734
  class BsListGroupComponent {
887
1735
  constructor() {
@@ -915,52 +1763,148 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
915
1763
  BsListGroupItemComponent
916
1764
  ],
917
1765
  exports: [
918
- BsListGroupComponent,
919
- BsListGroupItemComponent
1766
+ BsListGroupComponent,
1767
+ BsListGroupItemComponent
1768
+ ]
1769
+ }]
1770
+ }] });
1771
+
1772
+ class BsMultiselectComponent {
1773
+ constructor() {
1774
+ this.items = [];
1775
+ this.selectedItems = [];
1776
+ }
1777
+ itemChange(item, event) {
1778
+ if (!!event.target.checked) {
1779
+ this.selectedItems.push(item);
1780
+ }
1781
+ else {
1782
+ this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
1783
+ }
1784
+ }
1785
+ ngOnInit() {
1786
+ }
1787
+ }
1788
+ BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1789
+ 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"] }] });
1790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
1791
+ type: Component,
1792
+ 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"] }]
1793
+ }], ctorParameters: function () { return []; }, propDecorators: { template: [{
1794
+ type: ContentChild,
1795
+ args: [TemplateRef]
1796
+ }], items: [{
1797
+ type: Input
1798
+ }], selectedItems: [{
1799
+ type: Input
1800
+ }] } });
1801
+
1802
+ class BsMultiselectModule {
1803
+ }
1804
+ BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1805
+ BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
1806
+ BsDropdownModule,
1807
+ FocusOnLoadModule], exports: [BsMultiselectComponent] });
1808
+ BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
1809
+ CommonModule,
1810
+ BsDropdownModule,
1811
+ FocusOnLoadModule,
1812
+ ]] });
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
1814
+ type: NgModule,
1815
+ args: [{
1816
+ declarations: [
1817
+ BsMultiselectComponent
1818
+ ],
1819
+ imports: [
1820
+ CommonModule,
1821
+ BsDropdownModule,
1822
+ FocusOnLoadModule,
1823
+ ],
1824
+ exports: [
1825
+ BsMultiselectComponent
920
1826
  ]
921
1827
  }]
922
1828
  }] });
923
1829
 
924
1830
  class BsNavbarComponent {
925
1831
  constructor() {
926
- this.isExpanded = false;
1832
+ this.isExpanded$ = new BehaviorSubject(false);
927
1833
  }
928
1834
  toggleExpanded() {
929
- this.isExpanded = !this.isExpanded;
1835
+ this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
1836
+ this.isExpanded$.next(!isExpanded);
1837
+ });
930
1838
  }
931
1839
  }
932
1840
  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"] });
1841
+ 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
1842
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
935
1843
  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: [{
1844
+ 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"] }]
1845
+ }], propDecorators: { nav: [{
938
1846
  type: ViewChild,
939
1847
  args: ['nav']
940
1848
  }] } });
941
1849
 
942
1850
  class BsNavbarNavComponent {
943
1851
  constructor(bsNavbar) {
944
- //#region collapse
945
- this._collapse = true;
1852
+ this.collapse$ = new BehaviorSubject(true);
1853
+ this.windowWidth$ = new BehaviorSubject(null);
1854
+ this.isResizing$ = new BehaviorSubject(false);
1855
+ this.destroyed$ = new Subject();
946
1856
  this.bsNavbar = bsNavbar;
1857
+ this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.windowWidth$])
1858
+ .pipe(filter(([isExpanded, windowWidth]) => {
1859
+ return windowWidth !== null;
1860
+ }))
1861
+ .pipe(map(([isExpanded, windowWidth]) => {
1862
+ if (windowWidth === null) {
1863
+ throw 'windowWidth should not be null here';
1864
+ }
1865
+ else if (windowWidth >= 768) {
1866
+ return true;
1867
+ }
1868
+ else if (isExpanded) {
1869
+ return true;
1870
+ }
1871
+ else {
1872
+ return false;
1873
+ }
1874
+ }));
1875
+ this.windowWidth$
1876
+ .pipe(debounceTime(300), takeUntil(this.destroyed$))
1877
+ .subscribe(() => {
1878
+ this.isResizing$.next(false);
1879
+ });
1880
+ this.onWindowResize();
947
1881
  }
948
- ngOnInit() {
1882
+ ngOnDestroy() {
1883
+ this.destroyed$.next(true);
949
1884
  }
1885
+ //#region collapse
950
1886
  set collapse(value) {
951
- this._collapse = value;
1887
+ this.collapse$.next(value);
952
1888
  }
953
1889
  get collapse() {
954
- return this._collapse;
1890
+ return this.collapse$.value;
1891
+ }
1892
+ //#endregion
1893
+ onWindowResize() {
1894
+ this.isResizing$.next(true);
1895
+ this.windowWidth$.next(window.innerWidth);
955
1896
  }
956
1897
  }
957
1898
  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] });
1899
+ 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
1900
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
960
1901
  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"] }]
1902
+ 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
1903
  }], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
963
1904
  type: Input
1905
+ }], onWindowResize: [{
1906
+ type: HostListener,
1907
+ args: ['window:resize']
964
1908
  }] } });
965
1909
 
966
1910
  class BsNavbarItemComponent {
@@ -1021,7 +1965,7 @@ class BsNavbarDropdownComponent {
1021
1965
  }
1022
1966
  }
1023
1967
  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 });
1024
- 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"] }] });
1968
+ 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"] }] });
1025
1969
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
1026
1970
  type: Component,
1027
1971
  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"] }]
@@ -1054,229 +1998,592 @@ class DropdownToggleDirective {
1054
1998
  }
1055
1999
  }
1056
2000
  }
1057
- 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 });
1058
- 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 });
1059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DropdownToggleDirective, decorators: [{
1060
- type: Directive,
2001
+ 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 });
2002
+ 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 });
2003
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DropdownToggleDirective, decorators: [{
2004
+ type: Directive,
2005
+ args: [{
2006
+ // selector: 'bs-navbar-item > a[routerLink]',
2007
+ selector: 'bs-navbar-item',
2008
+ queries: {
2009
+ childDropdowns: new ContentChildren(BsNavbarDropdownComponent)
2010
+ }
2011
+ }]
2012
+ }], ctorParameters: function () {
2013
+ return [{ type: i0.ElementRef }, { type: BsNavbarItemComponent, decorators: [{
2014
+ type: Inject,
2015
+ args: [forwardRef(() => BsNavbarItemComponent)]
2016
+ }] }, { type: BsNavbarDropdownComponent, decorators: [{
2017
+ type: Optional
2018
+ }, {
2019
+ type: Inject,
2020
+ args: [forwardRef(() => BsNavbarDropdownComponent)]
2021
+ }] }];
2022
+ } });
2023
+
2024
+ class NavLinkDirective {
2025
+ constructor(elementRef, parentDropdown) {
2026
+ this.elementRef = elementRef;
2027
+ if (parentDropdown == null) {
2028
+ this.elementRef.nativeElement.classList.add('nav-link');
2029
+ }
2030
+ else {
2031
+ this.elementRef.nativeElement.classList.add('dropdown-item');
2032
+ }
2033
+ }
2034
+ }
2035
+ 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 });
2036
+ NavLinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
2037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavLinkDirective, decorators: [{
2038
+ type: Directive,
2039
+ args: [{
2040
+ selector: 'bs-navbar-item > a[routerLink]'
2041
+ }]
2042
+ }], ctorParameters: function () {
2043
+ return [{ type: i0.ElementRef }, { type: BsNavbarDropdownComponent, decorators: [{
2044
+ type: Optional
2045
+ }, {
2046
+ type: Inject,
2047
+ args: [forwardRef(() => BsNavbarDropdownComponent)]
2048
+ }] }];
2049
+ } });
2050
+
2051
+ class NavbarContentDirective {
2052
+ constructor(element) {
2053
+ this.element = element;
2054
+ this.initialPadding = 0;
2055
+ this.resizeObserver = new ResizeObserver((entries) => {
2056
+ let height = entries[0].contentRect.height;
2057
+ this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
2058
+ });
2059
+ }
2060
+ ngAfterViewInit() {
2061
+ let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
2062
+ this.initialPadding = isNaN(p) ? 0 : p;
2063
+ this.resizeObserver.observe(this.navbar.nav.nativeElement);
2064
+ }
2065
+ ngOnDestroy() {
2066
+ this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
2067
+ }
2068
+ }
2069
+ NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2070
+ NavbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
2071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, decorators: [{
2072
+ type: Directive,
2073
+ args: [{
2074
+ selector: '[navbarContent]'
2075
+ }]
2076
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
2077
+ type: Input,
2078
+ args: ['navbarContent']
2079
+ }] } });
2080
+
2081
+ class BsNavbarModule {
2082
+ }
2083
+ BsNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2084
+ BsNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, declarations: [BsNavbarComponent,
2085
+ BsNavbarNavComponent,
2086
+ BsNavbarDropdownComponent,
2087
+ BsNavbarItemComponent,
2088
+ DropdownToggleDirective,
2089
+ NavLinkDirective,
2090
+ NavbarContentDirective], imports: [CommonModule,
2091
+ RouterModule,
2092
+ ClickOutsideModule], exports: [BsNavbarComponent,
2093
+ BsNavbarNavComponent,
2094
+ BsNavbarDropdownComponent,
2095
+ BsNavbarItemComponent,
2096
+ DropdownToggleDirective,
2097
+ NavLinkDirective,
2098
+ NavbarContentDirective] });
2099
+ BsNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, imports: [[
2100
+ CommonModule,
2101
+ RouterModule,
2102
+ ClickOutsideModule
2103
+ ]] });
2104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, decorators: [{
2105
+ type: NgModule,
2106
+ args: [{
2107
+ declarations: [
2108
+ BsNavbarComponent,
2109
+ BsNavbarNavComponent,
2110
+ BsNavbarDropdownComponent,
2111
+ BsNavbarItemComponent,
2112
+ DropdownToggleDirective,
2113
+ NavLinkDirective,
2114
+ NavbarContentDirective
2115
+ ],
2116
+ imports: [
2117
+ CommonModule,
2118
+ RouterModule,
2119
+ ClickOutsideModule
2120
+ ],
2121
+ exports: [
2122
+ BsNavbarComponent,
2123
+ BsNavbarNavComponent,
2124
+ BsNavbarDropdownComponent,
2125
+ BsNavbarItemComponent,
2126
+ DropdownToggleDirective,
2127
+ NavLinkDirective,
2128
+ NavbarContentDirective
2129
+ ]
2130
+ }]
2131
+ }] });
2132
+
2133
+ class BsScrollspyDirective {
2134
+ constructor(element) {
2135
+ this.element = element;
2136
+ }
2137
+ }
2138
+ BsScrollspyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2139
+ BsScrollspyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyDirective, selector: "[bsScrollspy]", ngImport: i0 });
2140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, decorators: [{
2141
+ type: Directive,
2142
+ args: [{
2143
+ selector: '[bsScrollspy]'
2144
+ }]
2145
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
2146
+
2147
+ class BsScrollOffsetService {
2148
+ constructor(routerConfig) {
2149
+ this.routerConfig = routerConfig;
2150
+ }
2151
+ getScrollOffset() {
2152
+ if (!this.routerConfig.scrollOffset) {
2153
+ return [0, 0];
2154
+ }
2155
+ else if (Array.isArray(this.routerConfig.scrollOffset)) {
2156
+ return this.routerConfig.scrollOffset;
2157
+ }
2158
+ else {
2159
+ return this.routerConfig.scrollOffset();
2160
+ }
2161
+ }
2162
+ }
2163
+ BsScrollOffsetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, deps: [{ token: ROUTER_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
2164
+ BsScrollOffsetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, providedIn: 'root' });
2165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, decorators: [{
2166
+ type: Injectable,
2167
+ args: [{
2168
+ providedIn: 'root'
2169
+ }]
2170
+ }], ctorParameters: function () {
2171
+ return [{ type: undefined, decorators: [{
2172
+ type: Inject,
2173
+ args: [ROUTER_CONFIGURATION]
2174
+ }] }];
2175
+ } });
2176
+
2177
+ class BsScrollspyComponent {
2178
+ constructor(scrollOffsetService, document, zone) {
2179
+ this.scrollOffsetService = scrollOffsetService;
2180
+ this.zone = zone;
2181
+ this.destroyed$ = new Subject();
2182
+ this.viewInit$ = new BehaviorSubject(false);
2183
+ this.contentInit$ = new BehaviorSubject(false);
2184
+ this.activeDirective = null;
2185
+ this.doc = document;
2186
+ combineLatest([this.viewInit$, this.contentInit$])
2187
+ .pipe(filter(([viewInit, contentInit]) => viewInit && contentInit), take(1))
2188
+ .pipe(takeUntil(this.destroyed$))
2189
+ .subscribe(() => {
2190
+ // this.setActiveDirective();
2191
+ this.scrollToCurrentInSpy();
2192
+ });
2193
+ }
2194
+ ngAfterViewInit() {
2195
+ this.viewInit$.next(true);
2196
+ }
2197
+ ngAfterContentInit() {
2198
+ this.contentInit$.next(true);
2199
+ }
2200
+ ngOnDestroy() {
2201
+ this.destroyed$.next(true);
2202
+ }
2203
+ onWindowScroll() {
2204
+ this.setActiveDirective();
2205
+ this.scrollToCurrentInSpy();
2206
+ }
2207
+ setActiveDirective() {
2208
+ var _a;
2209
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2210
+ const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y < offsetY);
2211
+ if (this.directives.length === 0) {
2212
+ this.activeDirective = null;
2213
+ }
2214
+ else if (dirs.length === 0) {
2215
+ this.activeDirective = (_a = this.directives.get(0)) !== null && _a !== void 0 ? _a : null;
2216
+ }
2217
+ else {
2218
+ this.activeDirective = dirs[dirs.length - 1];
2219
+ }
2220
+ }
2221
+ scrollToCurrentInSpy() {
2222
+ if (window && (window.innerWidth >= 768)) {
2223
+ if (this.activeDirective) {
2224
+ const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
2225
+ const anchor = this.anchors.get(index);
2226
+ if (anchor && anchor.nativeElement.parentElement) {
2227
+ anchor.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
2228
+ }
2229
+ }
2230
+ }
2231
+ }
2232
+ scrollToHeader(directive) {
2233
+ const header = directive.element.nativeElement;
2234
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2235
+ const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
2236
+ window.scrollTo({ top: y, behavior: 'smooth' });
2237
+ }
2238
+ }
2239
+ 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 });
2240
+ 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"] }] });
2241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
2242
+ type: Component,
2243
+ 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"] }]
2244
+ }], ctorParameters: function () {
2245
+ return [{ type: BsScrollOffsetService }, { type: undefined, decorators: [{
2246
+ type: Inject,
2247
+ args: [DOCUMENT]
2248
+ }] }, { type: i0.NgZone }];
2249
+ }, propDecorators: { directives: [{
2250
+ type: ContentChildren,
2251
+ args: [BsScrollspyDirective, { descendants: true }]
2252
+ }], anchors: [{
2253
+ type: ViewChildren,
2254
+ args: ['anchor']
2255
+ }], onWindowScroll: [{
2256
+ type: HostListener,
2257
+ args: ['window:scroll', ['$event']]
2258
+ }] } });
2259
+
2260
+ class BsScrollspyModule {
2261
+ }
2262
+ BsScrollspyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2263
+ BsScrollspyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, declarations: [BsScrollspyComponent,
2264
+ BsScrollspyDirective], imports: [CommonModule], exports: [BsScrollspyComponent,
2265
+ BsScrollspyDirective] });
2266
+ BsScrollspyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, imports: [[
2267
+ CommonModule
2268
+ ]] });
2269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, decorators: [{
2270
+ type: NgModule,
2271
+ args: [{
2272
+ declarations: [
2273
+ BsScrollspyComponent,
2274
+ BsScrollspyDirective
2275
+ ],
2276
+ imports: [
2277
+ CommonModule
2278
+ ],
2279
+ exports: [
2280
+ BsScrollspyComponent,
2281
+ BsScrollspyDirective
2282
+ ]
2283
+ }]
2284
+ }] });
2285
+
2286
+ class BsInListPipe {
2287
+ transform(items, parameter) {
2288
+ return items.some(item => item.id === parameter);
2289
+ }
2290
+ }
2291
+ BsInListPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2292
+ BsInListPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, name: "inList" });
2293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, decorators: [{
2294
+ type: Pipe,
1061
2295
  args: [{
1062
- // selector: 'bs-navbar-item > a[routerLink]',
1063
- selector: 'bs-navbar-item',
1064
- queries: {
1065
- childDropdowns: new ContentChildren(BsNavbarDropdownComponent)
1066
- }
2296
+ name: 'inList'
1067
2297
  }]
1068
- }], ctorParameters: function () {
1069
- return [{ type: i0.ElementRef }, { type: BsNavbarItemComponent, decorators: [{
1070
- type: Inject,
1071
- args: [forwardRef(() => BsNavbarItemComponent)]
1072
- }] }, { type: BsNavbarDropdownComponent, decorators: [{
1073
- type: Optional
1074
- }, {
1075
- type: Inject,
1076
- args: [forwardRef(() => BsNavbarDropdownComponent)]
1077
- }] }];
1078
- } });
2298
+ }] });
1079
2299
 
1080
- class NavLinkDirective {
1081
- constructor(elementRef, parentDropdown) {
1082
- this.elementRef = elementRef;
1083
- if (parentDropdown == null) {
1084
- this.elementRef.nativeElement.classList.add('nav-link');
2300
+ class BsSelect2Component {
2301
+ constructor() {
2302
+ this.isOpen = false;
2303
+ this.suggestions$ = new BehaviorSubject([]);
2304
+ this.isLoading$ = new BehaviorSubject(false);
2305
+ this.hostWidth$ = new BehaviorSubject(200);
2306
+ this.searchterm = '';
2307
+ this.suggestions = [];
2308
+ this.provideSuggestions = new EventEmitter();
2309
+ this.selectedItems = [];
2310
+ this.isFocused = false;
2311
+ this.charWidth = 10;
2312
+ this.searchWidth = 20;
2313
+ }
2314
+ ngAfterViewInit() {
2315
+ this.onResize();
2316
+ }
2317
+ onProvideSuggestions(value) {
2318
+ this.searchWidth = this.charWidth * (this.searchterm.length + 2);
2319
+ if (value === '') {
2320
+ this.isOpen = false;
2321
+ this.suggestions$.next([]);
1085
2322
  }
1086
2323
  else {
1087
- this.elementRef.nativeElement.classList.add('dropdown-item');
2324
+ this.isLoading$.next(true);
2325
+ this.isOpen = true;
2326
+ this.provideSuggestions.emit(value);
2327
+ }
2328
+ }
2329
+ onSuggestionClicked(suggestion) {
2330
+ this.searchterm = '';
2331
+ this.isOpen = false;
2332
+ const existing = this.selectedItems.find((value, index) => value.id === suggestion.id);
2333
+ if (existing === undefined) {
2334
+ this.selectedItems.push(suggestion);
2335
+ }
2336
+ else {
2337
+ this.selectedItems.splice(this.selectedItems.indexOf(existing), 1);
1088
2338
  }
2339
+ this.searchBox.nativeElement.focus();
2340
+ }
2341
+ onRemoveItem(item, event) {
2342
+ event.stopPropagation();
2343
+ this.selectedItems.splice(this.selectedItems.indexOf(item), 1);
2344
+ this.focus();
2345
+ }
2346
+ ngOnInit() {
2347
+ }
2348
+ onResize() {
2349
+ this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
2350
+ }
2351
+ focus() {
2352
+ this.searchBox.nativeElement.focus();
1089
2353
  }
1090
2354
  }
1091
- 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 });
1092
- NavLinkDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavLinkDirective, selector: "bs-navbar-item > a[routerLink]", ngImport: i0 });
1093
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavLinkDirective, decorators: [{
2355
+ BsSelect2Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
2356
+ 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 } });
2357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, decorators: [{
2358
+ type: Component,
2359
+ 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"] }]
2360
+ }], ctorParameters: function () { return []; }, propDecorators: { searchBox: [{
2361
+ type: ViewChild,
2362
+ args: ['searchBox']
2363
+ }], itemsBox: [{
2364
+ type: ViewChild,
2365
+ args: ['itemsBox']
2366
+ }], searchterm: [{
2367
+ type: Input
2368
+ }], suggestions: [{
2369
+ type: Input
2370
+ }], provideSuggestions: [{
2371
+ type: Output
2372
+ }], selectedItems: [{
2373
+ type: Input
2374
+ }], isFocused: [{
2375
+ type: HostBinding,
2376
+ args: ['class.focus']
2377
+ }], onResize: [{
2378
+ type: HostListener,
2379
+ args: ['window:resize']
2380
+ }], focus: [{
2381
+ type: HostListener,
2382
+ args: ['click']
2383
+ }], defaultItemTemplate: [{
2384
+ type: ViewChild,
2385
+ args: ['defaultItemTemplate', { static: true }]
2386
+ }] } });
2387
+
2388
+ class BsItemTemplateDirective {
2389
+ constructor(select2component, templateRef) {
2390
+ this.select2component = select2component;
2391
+ this.select2component.itemTemplate = templateRef;
2392
+ }
2393
+ }
2394
+ 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 });
2395
+ BsItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsItemTemplateDirective, selector: "[bsItemTemplate]", ngImport: i0 });
2396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsItemTemplateDirective, decorators: [{
1094
2397
  type: Directive,
1095
2398
  args: [{
1096
- selector: 'bs-navbar-item > a[routerLink]'
2399
+ selector: '[bsItemTemplate]'
1097
2400
  }]
1098
- }], ctorParameters: function () {
1099
- return [{ type: i0.ElementRef }, { type: BsNavbarDropdownComponent, decorators: [{
1100
- type: Optional
1101
- }, {
1102
- type: Inject,
1103
- args: [forwardRef(() => BsNavbarDropdownComponent)]
1104
- }] }];
1105
- } });
2401
+ }], ctorParameters: function () { return [{ type: BsSelect2Component }, { type: i0.TemplateRef }]; } });
1106
2402
 
1107
- class NavbarContentDirective {
1108
- constructor(element) {
1109
- this.element = element;
1110
- this.initialPadding = 0;
1111
- this.resizeObserver = new ResizeObserver((entries) => {
1112
- let height = entries[0].contentRect.height;
1113
- this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
1114
- });
1115
- }
1116
- ngAfterViewInit() {
1117
- let p = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
1118
- this.initialPadding = isNaN(p) ? 0 : p;
1119
- this.resizeObserver.observe(this.navbar.nav.nativeElement);
1120
- }
1121
- ngOnDestroy() {
1122
- this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
1123
- }
2403
+ class BsInListModule {
1124
2404
  }
1125
- NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1126
- NavbarContentDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: NavbarContentDirective, selector: "[navbarContent]", inputs: { navbar: ["navbarContent", "navbar"] }, ngImport: i0 });
1127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: NavbarContentDirective, decorators: [{
1128
- type: Directive,
2405
+ BsInListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2406
+ BsInListModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, declarations: [BsInListPipe], imports: [CommonModule], exports: [BsInListPipe] });
2407
+ BsInListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, imports: [[
2408
+ CommonModule
2409
+ ]] });
2410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, decorators: [{
2411
+ type: NgModule,
1129
2412
  args: [{
1130
- selector: '[navbarContent]'
2413
+ declarations: [
2414
+ BsInListPipe
2415
+ ],
2416
+ imports: [
2417
+ CommonModule
2418
+ ],
2419
+ exports: [
2420
+ BsInListPipe
2421
+ ]
1131
2422
  }]
1132
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { navbar: [{
1133
- type: Input,
1134
- args: ['navbarContent']
1135
- }] } });
2423
+ }] });
1136
2424
 
1137
- class BsNavbarModule {
2425
+ class BsSelect2Module {
1138
2426
  }
1139
- BsNavbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1140
- BsNavbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, declarations: [BsNavbarComponent,
1141
- BsNavbarNavComponent,
1142
- BsNavbarDropdownComponent,
1143
- BsNavbarItemComponent,
1144
- DropdownToggleDirective,
1145
- NavLinkDirective,
1146
- NavbarContentDirective], imports: [CommonModule,
1147
- RouterModule,
1148
- ClickOutsideModule], exports: [BsNavbarComponent,
1149
- BsNavbarNavComponent,
1150
- BsNavbarDropdownComponent,
1151
- BsNavbarItemComponent,
1152
- DropdownToggleDirective,
1153
- NavLinkDirective,
1154
- NavbarContentDirective] });
1155
- BsNavbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, imports: [[
2427
+ BsSelect2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2428
+ BsSelect2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, declarations: [BsSelect2Component,
2429
+ BsItemTemplateDirective], imports: [CommonModule,
2430
+ FormsModule,
2431
+ BsDropdownModule,
2432
+ BsInListModule], exports: [BsSelect2Component,
2433
+ BsItemTemplateDirective] });
2434
+ BsSelect2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, imports: [[
1156
2435
  CommonModule,
1157
- RouterModule,
1158
- ClickOutsideModule
2436
+ FormsModule,
2437
+ BsDropdownModule,
2438
+ BsInListModule
1159
2439
  ]] });
1160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarModule, decorators: [{
2440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, decorators: [{
1161
2441
  type: NgModule,
1162
2442
  args: [{
1163
2443
  declarations: [
1164
- BsNavbarComponent,
1165
- BsNavbarNavComponent,
1166
- BsNavbarDropdownComponent,
1167
- BsNavbarItemComponent,
1168
- DropdownToggleDirective,
1169
- NavLinkDirective,
1170
- NavbarContentDirective
2444
+ BsSelect2Component,
2445
+ BsItemTemplateDirective
1171
2446
  ],
1172
2447
  imports: [
1173
2448
  CommonModule,
1174
- RouterModule,
1175
- ClickOutsideModule
2449
+ FormsModule,
2450
+ BsDropdownModule,
2451
+ BsInListModule
1176
2452
  ],
1177
2453
  exports: [
1178
- BsNavbarComponent,
1179
- BsNavbarNavComponent,
1180
- BsNavbarDropdownComponent,
1181
- BsNavbarItemComponent,
1182
- DropdownToggleDirective,
1183
- NavLinkDirective,
1184
- NavbarContentDirective
2454
+ BsSelect2Component,
2455
+ BsItemTemplateDirective
1185
2456
  ]
1186
2457
  }]
1187
2458
  }] });
1188
2459
 
1189
- class BsAccordionTabComponent {
1190
- constructor(accordion) {
1191
- this.accordion = accordion;
1192
- }
1193
- ngOnInit() {
1194
- }
1195
- headerClicked(event) {
1196
- if (this.accordion.activeTab === this) {
1197
- this.accordion.activeTab = null;
1198
- }
1199
- else {
1200
- this.accordion.activeTab = this;
1201
- }
2460
+ const SNACKBAR_CONTENT = new InjectionToken('SnackbarContent');
2461
+
2462
+ class BsSnackbarComponent {
2463
+ constructor(content) {
2464
+ this.displayBlock = true;
2465
+ this.width100 = true;
2466
+ this.instance = null;
2467
+ //#region Monitor @slideUpDown hooks
2468
+ this.animationState = '';
2469
+ this.animationStateChanged = new EventEmitter();
2470
+ this.content = content;
2471
+ }
2472
+ onAnimationChanged(event) {
2473
+ this.animationStateChanged.emit(event);
1202
2474
  }
1203
2475
  }
1204
- BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
1205
- 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] });
1206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
2476
+ BsSnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, deps: [{ token: SNACKBAR_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
2477
+ 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] });
2478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, decorators: [{
1207
2479
  type: Component,
1208
- 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"] }]
1209
- }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
2480
+ 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"] }]
2481
+ }], ctorParameters: function () {
2482
+ return [{ type: i0.TemplateRef, decorators: [{
2483
+ type: Inject,
2484
+ args: [SNACKBAR_CONTENT]
2485
+ }] }];
2486
+ }, propDecorators: { displayBlock: [{
2487
+ type: HostBinding,
2488
+ args: ['class.d-block']
2489
+ }], width100: [{
2490
+ type: HostBinding,
2491
+ args: ['class.w-100']
2492
+ }] } });
1210
2493
 
1211
- class BsAccordionComponent {
1212
- constructor() {
1213
- this.activeTab = null;
2494
+ class BsSnackbarService {
2495
+ constructor(overlay, parentInjector, componentFactoryResolver) {
2496
+ this.overlay = overlay;
2497
+ this.parentInjector = parentInjector;
2498
+ this.componentFactoryResolver = componentFactoryResolver;
1214
2499
  }
1215
- ngOnInit() {
2500
+ show(template) {
2501
+ const injector = Injector.create({
2502
+ providers: [{ provide: SNACKBAR_CONTENT, useValue: template }],
2503
+ parent: this.parentInjector
2504
+ });
2505
+ const portal = new ComponentPortal(BsSnackbarComponent, null, injector, this.componentFactoryResolver);
2506
+ const overlayRef = this.overlay.create({
2507
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2508
+ positionStrategy: this.overlay.position()
2509
+ .global().centerHorizontally().bottom('0'),
2510
+ width: '100%'
2511
+ });
2512
+ const componentInstance = overlayRef.attach(portal);
2513
+ componentInstance.instance['instance'] = {
2514
+ component: componentInstance,
2515
+ overlay: overlayRef
2516
+ };
2517
+ return componentInstance.instance;
2518
+ }
2519
+ hide(snackbar) {
2520
+ snackbar.animationStateChanged.pipe(filter(ev => ev.phaseName === 'done' && ev.toState === 'void'), take(1)).subscribe(() => {
2521
+ var _a;
2522
+ (_a = snackbar['instance']) === null || _a === void 0 ? void 0 : _a.overlay.dispose();
2523
+ });
2524
+ snackbar.animationState = 'void';
1216
2525
  }
1217
2526
  }
1218
- BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1219
- 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: [""] });
1220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
1221
- type: Component,
1222
- args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
1223
- }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
1224
- type: ContentChildren,
1225
- args: [BsAccordionTabComponent]
1226
- }] } });
2527
+ 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 });
2528
+ BsSnackbarServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, providedIn: 'root' });
2529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, decorators: [{
2530
+ type: Injectable,
2531
+ args: [{
2532
+ providedIn: 'root'
2533
+ }]
2534
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; } });
1227
2535
 
1228
- class BsAccordionTabHeaderComponent {
1229
- constructor(accordionTab, accordion) {
1230
- this.accordionTab = accordionTab;
1231
- this.accordion = accordion;
2536
+ class BsSnackbarCloseDirective {
2537
+ constructor(snackbarService) {
2538
+ this.snackbarService = snackbarService;
1232
2539
  }
1233
- ngOnInit() {
1234
- }
1235
- headerClicked(event) {
1236
- if (this.accordion.activeTab === this.accordionTab) {
1237
- this.accordion.activeTab = null;
1238
- }
1239
- else {
1240
- this.accordion.activeTab = this.accordionTab;
1241
- }
2540
+ onClick() {
2541
+ this.snackbarService.hide(this.bsSnackbarClose);
1242
2542
  }
1243
2543
  }
1244
- 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 });
1245
- 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: [""] });
1246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
1247
- type: Component,
1248
- args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
1249
- }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
2544
+ BsSnackbarCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, deps: [{ token: BsSnackbarService }], target: i0.ɵɵFactoryTarget.Directive });
2545
+ BsSnackbarCloseDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsSnackbarCloseDirective, selector: "[bsSnackbarClose]", inputs: { bsSnackbarClose: "bsSnackbarClose" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
2546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, decorators: [{
2547
+ type: Directive,
2548
+ args: [{
2549
+ selector: '[bsSnackbarClose]'
2550
+ }]
2551
+ }], ctorParameters: function () { return [{ type: BsSnackbarService }]; }, propDecorators: { bsSnackbarClose: [{
2552
+ type: Input
2553
+ }], onClick: [{
2554
+ type: HostListener,
2555
+ args: ['click']
2556
+ }] } });
1250
2557
 
1251
- class BsAccordionModule {
2558
+ class BsSnackbarModule {
1252
2559
  }
1253
- BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1254
- BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
1255
- BsAccordionTabComponent,
1256
- BsAccordionTabHeaderComponent], imports: [CommonModule,
1257
- BrowserAnimationsModule], exports: [BsAccordionComponent,
1258
- BsAccordionTabComponent,
1259
- BsAccordionTabHeaderComponent] });
1260
- BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
1261
- CommonModule,
1262
- BrowserAnimationsModule
2560
+ BsSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2561
+ BsSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, declarations: [BsSnackbarComponent,
2562
+ BsSnackbarCloseDirective], imports: [CommonModule], exports: [BsSnackbarComponent,
2563
+ BsSnackbarCloseDirective] });
2564
+ BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, providers: [
2565
+ // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
2566
+ // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
2567
+ ], imports: [[
2568
+ CommonModule
1263
2569
  ]] });
1264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
2570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, decorators: [{
1265
2571
  type: NgModule,
1266
2572
  args: [{
1267
2573
  declarations: [
1268
- BsAccordionComponent,
1269
- BsAccordionTabComponent,
1270
- BsAccordionTabHeaderComponent
2574
+ BsSnackbarComponent,
2575
+ BsSnackbarCloseDirective
1271
2576
  ],
1272
2577
  imports: [
1273
- CommonModule,
1274
- BrowserAnimationsModule
2578
+ CommonModule
1275
2579
  ],
1276
2580
  exports: [
1277
- BsAccordionComponent,
1278
- BsAccordionTabComponent,
1279
- BsAccordionTabHeaderComponent
2581
+ BsSnackbarComponent,
2582
+ BsSnackbarCloseDirective
2583
+ ],
2584
+ providers: [
2585
+ // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
2586
+ // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
1280
2587
  ]
1281
2588
  }]
1282
2589
  }] });
@@ -1345,328 +2652,378 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1345
2652
  ],
1346
2653
  exports: [
1347
2654
  BsTabControlComponent,
1348
- BsTabPageComponent,
1349
- ]
1350
- }]
1351
- }] });
1352
-
1353
- class BsScrollspyDirective {
1354
- constructor(element) {
1355
- this.element = element;
1356
- }
1357
- }
1358
- BsScrollspyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1359
- BsScrollspyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyDirective, selector: "[bsScrollspy]", ngImport: i0 });
1360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, decorators: [{
1361
- type: Directive,
1362
- args: [{
1363
- selector: '[bsScrollspy]'
2655
+ BsTabPageComponent,
2656
+ ]
1364
2657
  }]
1365
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
2658
+ }] });
1366
2659
 
1367
- class BsScrollspyComponent {
1368
- constructor(document) {
1369
- this.activeDirective = null;
1370
- this.doc = document;
1371
- }
1372
- ngOnInit() {
2660
+ class BsToggleButtonComponent {
2661
+ constructor() {
2662
+ this.disableAnimations = true;
2663
+ //#region isToggled
2664
+ this._isToggled = false;
2665
+ this.isToggledChange = new EventEmitter();
2666
+ //#endregion
2667
+ this.offColor = '#CCCCCC';
2668
+ this.onColor = '#2196F3';
2669
+ this.round = true;
1373
2670
  }
1374
2671
  ngAfterViewInit() {
1375
- this.onWindowScroll();
2672
+ this.disableAnimations = false;
1376
2673
  }
1377
- onWindowScroll() {
1378
- var _a;
1379
- const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y <= 0);
1380
- if (this.directives.length === 0) {
1381
- this.activeDirective = null;
1382
- }
1383
- else if (dirs.length === 0) {
1384
- this.activeDirective = (_a = this.directives.get(0)) !== null && _a !== void 0 ? _a : null;
1385
- }
1386
- else {
1387
- this.activeDirective = dirs[dirs.length - 1];
1388
- }
2674
+ get isToggled() {
2675
+ return this._isToggled;
1389
2676
  }
1390
- scrollToHeader(directive) {
1391
- const header = directive.element.nativeElement;
1392
- header.scrollIntoView();
2677
+ set isToggled(value) {
2678
+ this._isToggled = value;
2679
+ this.isToggledChange.emit(this._isToggled);
1393
2680
  }
1394
2681
  }
1395
- BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
1396
- 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"] }] });
1397
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
2682
+ BsToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2683
+ 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] });
2684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, decorators: [{
1398
2685
  type: Component,
1399
- 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"] }]
1400
- }], ctorParameters: function () {
1401
- return [{ type: undefined, decorators: [{
1402
- type: Inject,
1403
- args: [DOCUMENT]
1404
- }] }];
1405
- }, propDecorators: { directives: [{
1406
- type: ContentChildren,
1407
- args: [BsScrollspyDirective, { descendants: true }]
1408
- }], onWindowScroll: [{
1409
- type: HostListener,
1410
- args: ['window:scroll', ['$event']]
2686
+ 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"] }]
2687
+ }], propDecorators: { isToggledChange: [{
2688
+ type: Output
2689
+ }], isToggled: [{
2690
+ type: Input
2691
+ }], offColor: [{
2692
+ type: Input
2693
+ }], onColor: [{
2694
+ type: Input
2695
+ }], round: [{
2696
+ type: Input
1411
2697
  }] } });
1412
2698
 
1413
- class BsScrollspyModule {
2699
+ class BsToggleButtonModule {
1414
2700
  }
1415
- BsScrollspyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1416
- BsScrollspyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, declarations: [BsScrollspyComponent,
1417
- BsScrollspyDirective], imports: [CommonModule], exports: [BsScrollspyComponent,
1418
- BsScrollspyDirective] });
1419
- BsScrollspyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, imports: [[
2701
+ BsToggleButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2702
+ BsToggleButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, declarations: [BsToggleButtonComponent], imports: [CommonModule], exports: [BsToggleButtonComponent] });
2703
+ BsToggleButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, imports: [[
1420
2704
  CommonModule
1421
2705
  ]] });
1422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, decorators: [{
2706
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, decorators: [{
1423
2707
  type: NgModule,
1424
2708
  args: [{
1425
2709
  declarations: [
1426
- BsScrollspyComponent,
1427
- BsScrollspyDirective
2710
+ BsToggleButtonComponent
1428
2711
  ],
1429
2712
  imports: [
1430
2713
  CommonModule
1431
2714
  ],
1432
2715
  exports: [
1433
- BsScrollspyComponent,
1434
- BsScrollspyDirective
2716
+ BsToggleButtonComponent
1435
2717
  ]
1436
2718
  }]
1437
2719
  }] });
1438
2720
 
1439
- class BsDropdownMenuDirective {
1440
- constructor(dropdown, document, viewContainerRef, templateRef, overlay) {
1441
- this.dropdown = dropdown;
1442
- this.viewContainerRef = viewContainerRef;
1443
- this.templateRef = templateRef;
1444
- this.overlay = overlay;
1445
- this.destroyed$ = new Subject();
1446
- this.overlayRef = null;
1447
- this.templatePortal = null;
1448
- this.document = document;
1449
- this.dropdown.isOpen$
1450
- .pipe(takeUntil(this.destroyed$))
1451
- .subscribe((isOpen) => {
1452
- if (isOpen) {
1453
- this.overlayRef = this.overlay.create({
1454
- hasBackdrop: this.dropdown.hasBackdrop,
1455
- scrollStrategy: this.overlay.scrollStrategies.reposition(),
1456
- positionStrategy: this.overlay.position()
1457
- .flexibleConnectedTo(this.dropdown.toggle.toggleButton)
1458
- .withPositions([
1459
- { originX: "start", "originY": "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1460
- { originX: "start", "originY": "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1461
- ]),
1462
- });
1463
- this.overlayRef.backdropClick().subscribe(() => this.dropdown.isOpen$.next(false));
1464
- this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
1465
- this.overlayRef.attach(this.templatePortal);
1466
- }
1467
- else {
1468
- if (this.overlayRef) {
1469
- this.overlayRef.detach();
1470
- this.overlayRef.dispose();
1471
- }
1472
- }
1473
- });
2721
+ const TOOLTIP_CONTENT = new InjectionToken('TooltipContent');
2722
+
2723
+ class BsTooltipComponent {
2724
+ constructor(content) {
2725
+ this.positions = Position;
2726
+ this.position = Position.bottom;
2727
+ this.template = content;
1474
2728
  }
1475
2729
  }
1476
- 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 });
1477
- BsDropdownMenuDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]", host: { properties: { "class.show": "dropdown.isOpen" } }, ngImport: i0 });
1478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
1479
- type: Directive,
1480
- args: [{
1481
- selector: '[bsDropdownMenu]',
1482
- host: {
1483
- '[class.show]': 'dropdown.isOpen',
1484
- },
1485
- }]
2730
+ BsTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, deps: [{ token: TOOLTIP_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
2731
+ 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] });
2732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, decorators: [{
2733
+ type: Component,
2734
+ 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"] }]
1486
2735
  }], ctorParameters: function () {
1487
- return [{ type: BsDropdownDirective, decorators: [{
2736
+ return [{ type: i0.TemplateRef, decorators: [{
1488
2737
  type: Inject,
1489
- args: [forwardRef(() => BsDropdownDirective)]
1490
- }] }, { type: undefined, decorators: [{
1491
- type: Inject,
1492
- args: [DOCUMENT]
1493
- }] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$2.Overlay }];
1494
- } });
2738
+ args: [TOOLTIP_CONTENT]
2739
+ }] }];
2740
+ }, propDecorators: { position: [{
2741
+ type: Input
2742
+ }] } });
1495
2743
 
1496
- class BsDropdownToggleDirective {
1497
- constructor(dropdown, toggleButton) {
1498
- this.dropdown = dropdown;
1499
- this.toggleButton = toggleButton;
2744
+ class BsTooltipDirective {
2745
+ constructor(overlay, templateRef, componentFactoryResolver, parentInjector, parent) {
2746
+ this.overlay = overlay;
2747
+ this.templateRef = templateRef;
2748
+ this.parentInjector = parentInjector;
2749
+ this.parent = parent;
2750
+ this.bsTooltip = Position.bottom;
2751
+ this.overlayRef = null;
2752
+ this.injector = Injector.create({
2753
+ providers: [{ provide: TOOLTIP_CONTENT, useValue: this.templateRef }],
2754
+ parent: this.parentInjector
2755
+ });
2756
+ this.portal = new ComponentPortal(BsTooltipComponent, null, this.injector, componentFactoryResolver);
2757
+ parent.nativeElement.onmouseenter = () => {
2758
+ this.showTooltip();
2759
+ };
2760
+ parent.nativeElement.onmouseleave = () => {
2761
+ this.hideTooltip();
2762
+ };
1500
2763
  }
1501
- onClick() {
1502
- console.log('clicked');
1503
- this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1504
- this.dropdown.isOpen$.next(!isOpen);
2764
+ onBlur() {
2765
+ this.hideTooltip();
2766
+ }
2767
+ showTooltip() {
2768
+ const positions = [];
2769
+ switch (this.bsTooltip) {
2770
+ case Position.bottom:
2771
+ {
2772
+ positions.push({
2773
+ originX: "center",
2774
+ originY: "bottom",
2775
+ overlayX: "center",
2776
+ overlayY: "top"
2777
+ });
2778
+ }
2779
+ break;
2780
+ case Position.top:
2781
+ {
2782
+ positions.push({
2783
+ originX: "center",
2784
+ originY: "top",
2785
+ overlayX: "center",
2786
+ overlayY: "bottom"
2787
+ });
2788
+ }
2789
+ break;
2790
+ case Position.left:
2791
+ {
2792
+ positions.push({
2793
+ originX: "start",
2794
+ originY: "center",
2795
+ overlayX: "end",
2796
+ overlayY: "center",
2797
+ });
2798
+ }
2799
+ break;
2800
+ case Position.right:
2801
+ {
2802
+ positions.push({
2803
+ originX: "end",
2804
+ originY: "center",
2805
+ overlayX: "start",
2806
+ overlayY: "center"
2807
+ });
2808
+ }
2809
+ break;
2810
+ }
2811
+ this.overlayRef = this.overlay.create({
2812
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2813
+ positionStrategy: this.overlay.position()
2814
+ .flexibleConnectedTo(this.parent)
2815
+ .withPositions(positions),
1505
2816
  });
2817
+ const component = this.overlayRef.attach(this.portal);
2818
+ component.instance.position = this.bsTooltip;
2819
+ }
2820
+ hideTooltip() {
2821
+ if (this.overlayRef) {
2822
+ this.overlayRef.detach();
2823
+ this.overlayRef.dispose();
2824
+ this.overlayRef = null;
2825
+ }
1506
2826
  }
1507
2827
  }
1508
- 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 });
1509
- BsDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1510
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
2828
+ 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 });
2829
+ 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 });
2830
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, decorators: [{
1511
2831
  type: Directive,
1512
2832
  args: [{
1513
- selector: '[bsDropdownToggle]'
2833
+ selector: '*[bsTooltip]'
1514
2834
  }]
1515
- }], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
2835
+ }], ctorParameters: function () {
2836
+ return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ElementRef, decorators: [{
2837
+ type: Host
2838
+ }, {
2839
+ type: SkipSelf
2840
+ }] }];
2841
+ }, propDecorators: { onBlur: [{
1516
2842
  type: HostListener,
1517
- args: ['click']
1518
- }] } });
1519
-
1520
- class BsDropdownDirective {
1521
- constructor() {
1522
- this.isOpen$ = new BehaviorSubject(false);
1523
- this.hasBackdrop = false;
1524
- this.closeOnClickOutside = false;
1525
- }
1526
- }
1527
- BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1528
- 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 });
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
1530
- type: Directive,
1531
- args: [{
1532
- selector: '[bsDropdown]'
1533
- }]
1534
- }], propDecorators: { menu: [{
1535
- type: ContentChild,
1536
- args: [BsDropdownMenuDirective, { static: false }]
1537
- }], toggle: [{
1538
- type: ContentChild,
1539
- args: [BsDropdownToggleDirective, { static: false }]
1540
- }], hasBackdrop: [{
1541
- type: Input
1542
- }], closeOnClickOutside: [{
2843
+ args: ['window:blur']
2844
+ }], bsTooltip: [{
1543
2845
  type: Input
1544
2846
  }] } });
1545
2847
 
1546
- class BsDropdownModule {
2848
+ class BsTooltipModule {
1547
2849
  }
1548
- BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1549
- BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
1550
- BsDropdownToggleDirective,
1551
- BsDropdownMenuDirective], imports: [CommonModule,
1552
- OverlayModule], exports: [BsDropdownDirective,
1553
- BsDropdownToggleDirective,
1554
- BsDropdownMenuDirective] });
1555
- BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
1556
- CommonModule,
1557
- OverlayModule
2850
+ BsTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2851
+ BsTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, declarations: [BsTooltipDirective,
2852
+ BsTooltipComponent], imports: [CommonModule], exports: [BsTooltipDirective] });
2853
+ BsTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, imports: [[
2854
+ CommonModule
1558
2855
  ]] });
1559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
2856
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, decorators: [{
1560
2857
  type: NgModule,
1561
2858
  args: [{
1562
2859
  declarations: [
1563
- BsDropdownDirective,
1564
- BsDropdownToggleDirective,
1565
- BsDropdownMenuDirective
2860
+ BsTooltipDirective,
2861
+ BsTooltipComponent
1566
2862
  ],
1567
2863
  imports: [
1568
- CommonModule,
1569
- OverlayModule
2864
+ CommonModule
1570
2865
  ],
1571
2866
  exports: [
1572
- BsDropdownDirective,
1573
- BsDropdownToggleDirective,
1574
- BsDropdownMenuDirective
2867
+ BsTooltipDirective
1575
2868
  ]
1576
2869
  }]
1577
2870
  }] });
1578
2871
 
1579
- class BsDatepickerComponent {
2872
+ class BsTypeaheadComponent {
1580
2873
  constructor() {
1581
- this.selectedDate = new Date();
1582
- this.currentMonth = new Date();
2874
+ this.isOpen = false;
2875
+ this.suggestions$ = new BehaviorSubject([]);
2876
+ this.isLoading$ = new BehaviorSubject(false);
2877
+ this.hostWidth$ = new BehaviorSubject(200);
2878
+ this.destroyed$ = new Subject();
2879
+ this.searchterm = '';
2880
+ this.isLoadingText = 'Loading...';
2881
+ this.noSuggestionsText = 'No suggestions found';
2882
+ this.provideSuggestions = new EventEmitter();
2883
+ this.suggestionSelected = new EventEmitter();
2884
+ this.searchtermChange = new EventEmitter();
2885
+ this.submitted = new EventEmitter();
2886
+ this.showNoSuggestions$ = this.suggestions$
2887
+ .pipe(map(suggestions => suggestions.length === 0));
1583
2888
  }
1584
- ngOnInit() {
2889
+ ngAfterViewInit() {
2890
+ this.onResize();
2891
+ }
2892
+ onProvideSuggestions(value) {
2893
+ this.searchtermChange.emit(value);
2894
+ if (value === '') {
2895
+ this.isOpen = false;
2896
+ this.suggestions$.next([]);
2897
+ }
2898
+ else {
2899
+ this.isLoading$.next(true);
2900
+ this.isOpen = true;
2901
+ this.provideSuggestions.emit(value);
2902
+ }
2903
+ }
2904
+ set suggestions(value) {
2905
+ this.isLoading$.next(false);
2906
+ this.suggestions$.next(value);
2907
+ }
2908
+ suggestionClicked(suggestion) {
2909
+ this.searchterm = suggestion.text;
2910
+ this.searchtermChange.emit(this.searchterm);
2911
+ this.isOpen = false;
2912
+ this.suggestionSelected.emit(suggestion);
2913
+ }
2914
+ onSubmit() {
2915
+ this.isOpen = false;
2916
+ this.submitted.emit(this.searchterm);
2917
+ }
2918
+ focus() {
2919
+ this.textbox.nativeElement.focus();
2920
+ }
2921
+ onResize() {
2922
+ this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
1585
2923
  }
1586
2924
  }
1587
- BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1588
- 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 } });
1589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
2925
+ BsTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2926
+ 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 } });
2927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
1590
2928
  type: Component,
1591
- 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: [""] }]
1592
- }], ctorParameters: function () { return []; } });
2929
+ 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"] }]
2930
+ }], ctorParameters: function () { return []; }, propDecorators: { textbox: [{
2931
+ type: ViewChild,
2932
+ args: ['textbox']
2933
+ }], searchterm: [{
2934
+ type: Input
2935
+ }], isLoadingText: [{
2936
+ type: Input
2937
+ }], noSuggestionsText: [{
2938
+ type: Input
2939
+ }], provideSuggestions: [{
2940
+ type: Output
2941
+ }], suggestionSelected: [{
2942
+ type: Output
2943
+ }], searchtermChange: [{
2944
+ type: Output
2945
+ }], submitted: [{
2946
+ type: Output
2947
+ }], suggestions: [{
2948
+ type: Input
2949
+ }], onResize: [{
2950
+ type: HostListener,
2951
+ args: ['window:resize']
2952
+ }] } });
1593
2953
 
1594
- class BsDatepickerModule {
2954
+ class BsTypeaheadModule {
1595
2955
  }
1596
- BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1597
- BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
1598
- BsCalendarModule,
1599
- BsDropdownModule], exports: [BsDatepickerComponent] });
1600
- BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
2956
+ BsTypeaheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2957
+ BsTypeaheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, declarations: [BsTypeaheadComponent], imports: [CommonModule,
2958
+ FormsModule,
2959
+ BsDropdownModule,
2960
+ BsProgressBarModule], exports: [BsTypeaheadComponent] });
2961
+ BsTypeaheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, imports: [[
1601
2962
  CommonModule,
1602
- BsCalendarModule,
1603
- BsDropdownModule
2963
+ FormsModule,
2964
+ BsDropdownModule,
2965
+ BsProgressBarModule
1604
2966
  ]] });
1605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
2967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, decorators: [{
1606
2968
  type: NgModule,
1607
2969
  args: [{
1608
2970
  declarations: [
1609
- BsDatepickerComponent
2971
+ BsTypeaheadComponent
1610
2972
  ],
1611
2973
  imports: [
1612
2974
  CommonModule,
1613
- BsCalendarModule,
1614
- BsDropdownModule
2975
+ FormsModule,
2976
+ BsDropdownModule,
2977
+ BsProgressBarModule
1615
2978
  ],
1616
2979
  exports: [
1617
- BsDatepickerComponent
2980
+ BsTypeaheadComponent
1618
2981
  ]
1619
2982
  }]
1620
2983
  }] });
1621
2984
 
1622
- class BsMultiselectComponent {
1623
- constructor() {
1624
- this.items = [];
1625
- this.selectedItems = [];
1626
- }
1627
- itemChange(item, event) {
1628
- if (!!event.target.checked) {
1629
- this.selectedItems.push(item);
1630
- }
1631
- else {
1632
- this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
2985
+ class BsFontColorPipe {
2986
+ transform(color_hex) {
2987
+ if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {
2988
+ return '#FFFFFF';
1633
2989
  }
1634
- }
1635
- ngOnInit() {
2990
+ const R_HEX = color_hex.substr(1, 2);
2991
+ const G_HEX = color_hex.substr(3, 2);
2992
+ const B_HEX = color_hex.substr(5, 2);
2993
+ const R_DEC = parseInt(R_HEX, 16);
2994
+ const G_DEC = parseInt(G_HEX, 16);
2995
+ const B_DEC = parseInt(B_HEX, 16);
2996
+ const CONTRAST_HEX = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';
2997
+ return CONTRAST_HEX;
1636
2998
  }
1637
2999
  }
1638
- BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1639
- 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"] }] });
1640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
1641
- type: Component,
1642
- 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: [""] }]
1643
- }], ctorParameters: function () { return []; }, propDecorators: { items: [{
1644
- type: Input
1645
- }], selectedItems: [{
1646
- type: Input
1647
- }] } });
3000
+ BsFontColorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
3001
+ BsFontColorPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, name: "bsFontColor" });
3002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, decorators: [{
3003
+ type: Pipe,
3004
+ args: [{
3005
+ name: 'bsFontColor'
3006
+ }]
3007
+ }] });
1648
3008
 
1649
- class BsMultiselectModule {
3009
+ class BsFontColorPipeModule {
1650
3010
  }
1651
- BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1652
- BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
1653
- BsDropdownModule], exports: [BsMultiselectComponent] });
1654
- BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
1655
- CommonModule,
1656
- BsDropdownModule
3011
+ BsFontColorPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3012
+ BsFontColorPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, declarations: [BsFontColorPipe], imports: [CommonModule], exports: [BsFontColorPipe] });
3013
+ BsFontColorPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, imports: [[
3014
+ CommonModule
1657
3015
  ]] });
1658
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
3016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, decorators: [{
1659
3017
  type: NgModule,
1660
3018
  args: [{
1661
3019
  declarations: [
1662
- BsMultiselectComponent
3020
+ BsFontColorPipe
1663
3021
  ],
1664
3022
  imports: [
1665
- CommonModule,
1666
- BsDropdownModule
3023
+ CommonModule
1667
3024
  ],
1668
3025
  exports: [
1669
- BsMultiselectComponent
3026
+ BsFontColorPipe
1670
3027
  ]
1671
3028
  }]
1672
3029
  }] });
@@ -1675,5 +3032,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1675
3032
  * Generated bundle index. Do not edit.
1676
3033
  */
1677
3034
 
1678
- 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 };
3035
+ 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 };
1679
3036
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map