@mintplayer/ng-bootstrap 13.1.7 → 13.1.9

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 (115) 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 +57 -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 +26 -6
  12. package/esm2020/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.mjs +40 -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/index.mjs +15 -7
  16. package/esm2020/lib/components/multiselect/multiselect.component.mjs +8 -5
  17. package/esm2020/lib/components/multiselect/multiselect.module.mjs +8 -4
  18. package/esm2020/lib/components/navbar/navbar-nav/navbar-nav.component.mjs +4 -3
  19. package/esm2020/lib/components/pagination/index.mjs +3 -0
  20. package/esm2020/lib/components/progress-bar/index.mjs +4 -0
  21. package/esm2020/lib/components/progress-bar/progress/progress.component.mjs +27 -0
  22. package/esm2020/lib/components/progress-bar/progress-bar/progress-bar.component.mjs +121 -0
  23. package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +31 -0
  24. package/esm2020/lib/components/scrollspy/component/scrollspy.component.mjs +28 -12
  25. package/esm2020/lib/components/select2/component/select2.component.mjs +96 -0
  26. package/esm2020/lib/components/select2/directive/item-template.directive.mjs +20 -0
  27. package/esm2020/lib/components/select2/index.mjs +4 -0
  28. package/esm2020/lib/components/select2/select2.module.mjs +43 -0
  29. package/esm2020/lib/components/snackbar/component/snackbar.component.mjs +35 -0
  30. package/esm2020/lib/components/snackbar/directives/index.mjs +2 -0
  31. package/esm2020/lib/components/snackbar/directives/snackbar-close/snackbar-close.directive.mjs +27 -0
  32. package/esm2020/lib/components/snackbar/index.mjs +6 -0
  33. package/esm2020/lib/components/snackbar/interfaces/index.mjs +2 -0
  34. package/esm2020/lib/components/snackbar/interfaces/snackbar-animation-meta.mjs +2 -0
  35. package/esm2020/lib/components/snackbar/providers/snackbar-content.provider.mjs +3 -0
  36. package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +50 -0
  37. package/esm2020/lib/components/snackbar/snackbar.module.mjs +38 -0
  38. package/esm2020/lib/components/toggle-button/index.mjs +3 -0
  39. package/esm2020/lib/components/toggle-button/toggle-button.component.mjs +42 -0
  40. package/esm2020/lib/components/toggle-button/toggle-button.module.mjs +26 -0
  41. package/esm2020/lib/components/tooltip/component/tooltip.component.mjs +25 -0
  42. package/esm2020/lib/components/tooltip/directive/tooltip.directive.mjs +104 -0
  43. package/esm2020/lib/components/tooltip/index.mjs +4 -0
  44. package/esm2020/lib/components/tooltip/providers/tooltip-content.provider.mjs +3 -0
  45. package/esm2020/lib/components/tooltip/tooltip.module.mjs +29 -0
  46. package/esm2020/lib/components/typeahead/index.mjs +3 -0
  47. package/esm2020/lib/components/typeahead/typeahead.component.mjs +90 -0
  48. package/esm2020/lib/components/typeahead/typeahead.module.mjs +38 -0
  49. package/esm2020/lib/enums/index.mjs +2 -1
  50. package/esm2020/lib/enums/position.enum.mjs +8 -0
  51. package/esm2020/lib/pipes/font-color/font-color.module.mjs +26 -0
  52. package/esm2020/lib/pipes/font-color/font-color.pipe.mjs +26 -0
  53. package/esm2020/lib/pipes/font-color/index.mjs +3 -0
  54. package/esm2020/lib/pipes/in-list/in-list.module.mjs +26 -0
  55. package/esm2020/lib/pipes/in-list/in-list.pipe.mjs +16 -0
  56. package/esm2020/lib/pipes/index.mjs +2 -0
  57. package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +12 -14
  58. package/esm2020/lib/services/scroll-offset/scroll-offset.service.mjs +31 -0
  59. package/fesm2015/mintplayer-ng-bootstrap.mjs +1434 -393
  60. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  61. package/fesm2020/mintplayer-ng-bootstrap.mjs +1419 -390
  62. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  63. package/index.d.ts +1 -0
  64. package/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.d.ts +1 -0
  65. package/lib/components/carousel/carousel/carousel.component.d.ts +4 -1
  66. package/lib/components/context-menu/context-menu.directive.d.ts +16 -0
  67. package/lib/components/context-menu/context-menu.module.d.ts +8 -0
  68. package/lib/components/context-menu/index.d.ts +2 -0
  69. package/lib/components/dropdown/dropdown/dropdown.directive.d.ts +9 -2
  70. package/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.d.ts +6 -3
  71. package/lib/components/dropdown/dropdown.module.d.ts +2 -1
  72. package/lib/components/index.d.ts +14 -6
  73. package/lib/components/multiselect/multiselect.component.d.ts +3 -2
  74. package/lib/components/multiselect/multiselect.module.d.ts +2 -1
  75. package/lib/components/pagination/index.d.ts +2 -0
  76. package/lib/components/progress-bar/index.d.ts +3 -0
  77. package/lib/components/progress-bar/progress/progress.component.d.ts +8 -0
  78. package/lib/components/progress-bar/progress-bar/progress-bar.component.d.ts +31 -0
  79. package/lib/components/progress-bar/progress-bar.module.d.ts +9 -0
  80. package/lib/components/scrollspy/component/scrollspy.component.d.ts +6 -4
  81. package/lib/components/select2/component/select2.component.d.ts +30 -0
  82. package/lib/components/select2/directive/item-template.directive.d.ts +9 -0
  83. package/lib/components/select2/index.d.ts +3 -0
  84. package/lib/components/select2/select2.module.d.ts +12 -0
  85. package/lib/components/snackbar/component/snackbar.component.d.ts +16 -0
  86. package/lib/components/snackbar/directives/index.d.ts +1 -0
  87. package/lib/components/snackbar/directives/snackbar-close/snackbar-close.directive.d.ts +11 -0
  88. package/lib/components/snackbar/index.d.ts +5 -0
  89. package/lib/components/snackbar/interfaces/index.d.ts +1 -0
  90. package/lib/components/snackbar/interfaces/snackbar-animation-meta.d.ts +7 -0
  91. package/lib/components/snackbar/providers/snackbar-content.provider.d.ts +2 -0
  92. package/lib/components/snackbar/service/snackbar.service.d.ts +14 -0
  93. package/lib/components/snackbar/snackbar.module.d.ts +9 -0
  94. package/lib/components/toggle-button/index.d.ts +2 -0
  95. package/lib/components/toggle-button/toggle-button.component.d.ts +15 -0
  96. package/lib/components/toggle-button/toggle-button.module.d.ts +8 -0
  97. package/lib/components/tooltip/component/tooltip.component.d.ts +11 -0
  98. package/lib/components/tooltip/directive/tooltip.directive.d.ts +19 -0
  99. package/lib/components/tooltip/index.d.ts +2 -0
  100. package/lib/components/tooltip/providers/tooltip-content.provider.d.ts +2 -0
  101. package/lib/components/tooltip/tooltip.module.d.ts +9 -0
  102. package/lib/components/typeahead/index.d.ts +2 -0
  103. package/lib/components/typeahead/typeahead.component.d.ts +29 -0
  104. package/lib/components/typeahead/typeahead.module.d.ts +11 -0
  105. package/lib/enums/index.d.ts +1 -0
  106. package/lib/enums/position.enum.d.ts +6 -0
  107. package/lib/pipes/font-color/font-color.module.d.ts +8 -0
  108. package/lib/pipes/font-color/font-color.pipe.d.ts +7 -0
  109. package/lib/pipes/font-color/index.d.ts +2 -0
  110. package/lib/pipes/in-list/in-list.module.d.ts +8 -0
  111. package/lib/pipes/in-list/in-list.pipe.d.ts +7 -0
  112. package/lib/pipes/index.d.ts +1 -0
  113. package/lib/services/calendar-month/calendar-month.service.d.ts +0 -1
  114. package/lib/services/scroll-offset/scroll-offset.service.d.ts +9 -0
  115. package/package.json +4 -2
@@ -1,18 +1,120 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Injectable, Pipe, EventEmitter, Output, Directive, ContentChildren, ViewChild, Optional, forwardRef, SkipSelf, Host, Inject, TemplateRef, ContentChild, HostListener } from '@angular/core';
2
+ import { Component, ContentChildren, NgModule, Input, Injectable, Pipe, EventEmitter, Output, Directive, HostBinding, Host, SkipSelf, HostListener, forwardRef, PLATFORM_ID, Inject, ContentChild, TemplateRef, ViewChild, Optional, ViewChildren, InjectionToken, Injector } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT } from '@angular/common';
5
- import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation } from '@mintplayer/ng-animations';
5
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
6
+ import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
6
7
  import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest } from 'rxjs';
7
8
  import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
8
- import '@mintplayer/ng-pagination';
9
- import { RouterModule } from '@angular/router';
10
- import * as i1$1 from '@mintplayer/ng-click-outside';
11
- import { ClickOutsideModule } from '@mintplayer/ng-click-outside';
12
- import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
13
- import * as i1$2 from '@angular/cdk/overlay';
9
+ import * as i1$1 from '@angular/cdk/overlay';
14
10
  import { OverlayModule } from '@angular/cdk/overlay';
15
- import { TemplatePortal } from '@angular/cdk/portal';
11
+ import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
12
+ import '@mintplayer/ng-pagination';
13
+ import * as i1$2 from '@mintplayer/ng-click-outside';
14
+ import { ClickOutsideDirective, ClickOutsideModule } from '@mintplayer/ng-click-outside';
15
+ import { FocusOnLoadModule } from '@mintplayer/ng-focus-on-load';
16
+ import { RouterModule, ROUTER_CONFIGURATION } from '@angular/router';
17
+ import * as i3 from '@angular/forms';
18
+ import { FormsModule } from '@angular/forms';
19
+
20
+ class BsAccordionTabComponent {
21
+ constructor(accordion) {
22
+ this.accordion = accordion;
23
+ }
24
+ ngOnInit() {
25
+ }
26
+ headerClicked(event) {
27
+ if (this.accordion.activeTab === this) {
28
+ this.accordion.activeTab = null;
29
+ }
30
+ else {
31
+ this.accordion.activeTab = this;
32
+ }
33
+ }
34
+ }
35
+ BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
36
+ BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabComponent, selector: "bs-accordion-tab", ngImport: i0, template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"accordion.activeTab === this\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [SlideUpDownAnimation] });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"accordion.activeTab === this\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
40
+ }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
41
+
42
+ class BsAccordionComponent {
43
+ constructor() {
44
+ this.activeTab = null;
45
+ }
46
+ ngOnInit() {
47
+ }
48
+ }
49
+ BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50
+ BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionComponent, selector: "bs-accordion", queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
52
+ type: Component,
53
+ args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
54
+ }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
55
+ type: ContentChildren,
56
+ args: [BsAccordionTabComponent]
57
+ }] } });
58
+
59
+ class BsAccordionTabHeaderComponent {
60
+ constructor(accordionTab, accordion) {
61
+ this.accordionTab = accordionTab;
62
+ this.accordion = accordion;
63
+ }
64
+ ngOnInit() {
65
+ }
66
+ headerClicked(event) {
67
+ event.preventDefault();
68
+ if (this.accordion.activeTab === this.accordionTab) {
69
+ this.accordion.activeTab = null;
70
+ }
71
+ else {
72
+ this.accordion.activeTab = this.accordionTab;
73
+ }
74
+ }
75
+ foo(event) {
76
+ event.preventDefault();
77
+ }
78
+ }
79
+ BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
80
+ BsAccordionTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabHeaderComponent, selector: "bs-accordion-tab-header", ngImport: i0, template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\" (contextmenu)=\"foo($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
82
+ type: Component,
83
+ args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\" (contextmenu)=\"foo($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
84
+ }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
85
+
86
+ class BsAccordionModule {
87
+ }
88
+ BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
89
+ BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
90
+ BsAccordionTabComponent,
91
+ BsAccordionTabHeaderComponent], imports: [CommonModule,
92
+ BrowserAnimationsModule], exports: [BsAccordionComponent,
93
+ BsAccordionTabComponent,
94
+ BsAccordionTabHeaderComponent] });
95
+ BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
96
+ CommonModule,
97
+ BrowserAnimationsModule
98
+ ]] });
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
100
+ type: NgModule,
101
+ args: [{
102
+ declarations: [
103
+ BsAccordionComponent,
104
+ BsAccordionTabComponent,
105
+ BsAccordionTabHeaderComponent
106
+ ],
107
+ imports: [
108
+ CommonModule,
109
+ BrowserAnimationsModule
110
+ ],
111
+ exports: [
112
+ BsAccordionComponent,
113
+ BsAccordionTabComponent,
114
+ BsAccordionTabHeaderComponent
115
+ ]
116
+ }]
117
+ }] });
16
118
 
17
119
  var Color;
18
120
  (function (Color) {
@@ -29,6 +131,14 @@ var Color;
29
131
  Color[Color["transparent"] = 10] = "transparent";
30
132
  })(Color || (Color = {}));
31
133
 
134
+ var Position;
135
+ (function (Position) {
136
+ Position[Position["top"] = 0] = "top";
137
+ Position[Position["left"] = 1] = "left";
138
+ Position[Position["bottom"] = 2] = "bottom";
139
+ Position[Position["right"] = 3] = "right";
140
+ })(Position || (Position = {}));
141
+
32
142
  class BsAlertComponent {
33
143
  constructor() {
34
144
  this.type = Color.primary;
@@ -39,10 +149,10 @@ class BsAlertComponent {
39
149
  }
40
150
  }
41
151
  BsAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
42
- BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [SlideUpDownAnimation, FadeInOutAnimation] });
152
+ BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [FadeInOutAnimation] });
43
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, decorators: [{
44
154
  type: Component,
45
- args: [{ selector: 'bs-alert', animations: [SlideUpDownAnimation, FadeInOutAnimation], template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"] }]
155
+ args: [{ selector: 'bs-alert', animations: [FadeInOutAnimation], template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"] }]
46
156
  }], ctorParameters: function () { return []; }, propDecorators: { type: [{
47
157
  type: Input
48
158
  }] } });
@@ -86,63 +196,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
86
196
  }]
87
197
  }] });
88
198
 
89
- class BsCardComponent {
90
- constructor() {
91
- }
92
- ngOnInit() {
93
- }
94
- ngAfterViewInit() {
95
- }
96
- }
97
- BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- BsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardComponent, selector: "bs-card", ngImport: i0, template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] });
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
100
- type: Component,
101
- args: [{ selector: 'bs-card', template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] }]
102
- }], ctorParameters: function () { return []; } });
103
-
104
- class BsCardHeaderComponent {
105
- constructor() {
106
- }
107
- ngOnInit() {
108
- }
109
- }
110
- BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- BsCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardHeaderComponent, selector: "bs-card-header", ngImport: i0, template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] });
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
113
- type: Component,
114
- args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
115
- }], ctorParameters: function () { return []; } });
116
-
117
- class BsCardModule {
118
- }
119
- BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
120
- BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
121
- BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
122
- BsCardHeaderComponent] });
123
- BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
125
- type: NgModule,
126
- args: [{
127
- imports: [CommonModule],
128
- declarations: [
129
- BsCardComponent,
130
- BsCardHeaderComponent
131
- ],
132
- exports: [
133
- BsCardComponent,
134
- BsCardHeaderComponent
135
- ]
136
- }]
137
- }] });
138
-
139
199
  class BsCalendarMonthService {
140
- constructor() {
141
- }
142
200
  getWeeks(month) {
143
- let firstAndLast = this.getFirstAndLastDayOfMonth(month);
144
- let days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
145
- let allDays = [
201
+ const firstAndLast = this.getFirstAndLastDayOfMonth(month);
202
+ const days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
203
+ const allDays = [
146
204
  ...this.generateList(this.dayOfWeekMondayBased(firstAndLast.first)).map(d => null),
147
205
  ...this.generateList(days).map(d => {
148
206
  return {
@@ -152,8 +210,8 @@ class BsCalendarMonthService {
152
210
  }),
153
211
  ...this.generateList(6 - this.dayOfWeekMondayBased(firstAndLast.last)).map(d => null),
154
212
  ];
155
- let weeks = this.chunk(allDays, 7);
156
- let weeksMapped = weeks.map((w, i) => {
213
+ const weeks = this.chunk(allDays, 7);
214
+ const weeksMapped = weeks.map((w, i) => {
157
215
  return {
158
216
  number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), w.find(d => d !== null)?.dayOfMonth)),
159
217
  week: w
@@ -165,7 +223,7 @@ class BsCalendarMonthService {
165
223
  return [...Array(count).keys()];
166
224
  }
167
225
  dayOfWeekMondayBased(date) {
168
- let d = date.getDay() - 1;
226
+ const d = date.getDay() - 1;
169
227
  if (d < 0) {
170
228
  return 6;
171
229
  }
@@ -174,10 +232,10 @@ class BsCalendarMonthService {
174
232
  }
175
233
  }
176
234
  weekOfYear(date) {
177
- let dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
235
+ const dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
178
236
  dateClone.setUTCDate(dateClone.getUTCDate() + 4 - (dateClone.getUTCDay() || 7));
179
- let yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));
180
- let utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);
237
+ const yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));
238
+ const utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);
181
239
  return Math.ceil((utcDiff / (1000 * 60 * 60 * 24) + 1) / 7);
182
240
  }
183
241
  getFirstAndLastDayOfMonth(date) {
@@ -200,7 +258,7 @@ class BsCalendarMonthService {
200
258
  return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
201
259
  }
202
260
  chunk(items, size) {
203
- let result = [];
261
+ const result = [];
204
262
  for (let i = 0; i < items.length; i += size) {
205
263
  result.push(items.slice(i, i + size));
206
264
  }
@@ -214,7 +272,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
214
272
  args: [{
215
273
  providedIn: 'root'
216
274
  }]
217
- }], ctorParameters: function () { return []; } });
275
+ }] });
218
276
 
219
277
  class UcFirstPipe {
220
278
  transform(value, ...args) {
@@ -456,6 +514,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
456
514
  }]
457
515
  }] });
458
516
 
517
+ class BsCardComponent {
518
+ constructor() {
519
+ }
520
+ ngOnInit() {
521
+ }
522
+ ngAfterViewInit() {
523
+ }
524
+ }
525
+ BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
526
+ BsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardComponent, selector: "bs-card", ngImport: i0, template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] });
527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
528
+ type: Component,
529
+ args: [{ selector: 'bs-card', template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] }]
530
+ }], ctorParameters: function () { return []; } });
531
+
532
+ class BsCardHeaderComponent {
533
+ constructor() {
534
+ }
535
+ ngOnInit() {
536
+ }
537
+ }
538
+ BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
539
+ BsCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardHeaderComponent, selector: "bs-card-header", ngImport: i0, template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] });
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
541
+ type: Component,
542
+ args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
543
+ }], ctorParameters: function () { return []; } });
544
+
545
+ class BsCardModule {
546
+ }
547
+ BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
548
+ BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
549
+ BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
550
+ BsCardHeaderComponent] });
551
+ BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
553
+ type: NgModule,
554
+ args: [{
555
+ imports: [CommonModule],
556
+ declarations: [
557
+ BsCardComponent,
558
+ BsCardHeaderComponent
559
+ ],
560
+ exports: [
561
+ BsCardComponent,
562
+ BsCardHeaderComponent
563
+ ]
564
+ }]
565
+ }] });
566
+
459
567
  class BsCarouselImageDirective {
460
568
  constructor(templateRef) {
461
569
  this.templateRef = templateRef;
@@ -473,9 +581,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
473
581
 
474
582
  class BsCarouselComponent {
475
583
  constructor() {
476
- // @HostBinding('@.disabled')
477
- // public animationsDisabled = false;
478
- this.animation = 'slide';
584
+ this.animationsDisabled = false;
585
+ //#region Animation
586
+ this._animation = 'slide';
587
+ //#endregion
479
588
  this.destroyed$ = new Subject();
480
589
  this.currentImageCounter$ = new BehaviorSubject(-1);
481
590
  this.currentImageIndex$ = this.currentImageCounter$
@@ -500,6 +609,16 @@ class BsCarouselComponent {
500
609
  this.currentImageCounter$.next(-1);
501
610
  }
502
611
  }
612
+ set animation(value) {
613
+ this.animationsDisabled = true;
614
+ this._animation = value;
615
+ setTimeout(() => {
616
+ this.animationsDisabled = false;
617
+ }, 20);
618
+ }
619
+ get animation() {
620
+ return this._animation;
621
+ }
503
622
  previousImage() {
504
623
  this.currentImageCounter$
505
624
  .pipe(take$1(1))
@@ -523,11 +642,14 @@ class BsCarouselComponent {
523
642
  }
524
643
  }
525
644
  BsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
526
- BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselComponent, selector: "bs-carousel", inputs: { animation: "animation" }, queries: [{ propertyName: "images", predicate: BsCarouselImageDirective }], ngImport: i0, template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [".carousel{min-height:100px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation, CarouselSlideAnimation] });
645
+ BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselComponent, selector: "bs-carousel", inputs: { animation: "animation" }, host: { properties: { "@.disabled": "this.animationsDisabled" } }, queries: [{ propertyName: "images", predicate: BsCarouselImageDirective }], ngImport: i0, template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [".carousel{min-height:100px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation, CarouselSlideAnimation] });
527
646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, decorators: [{
528
647
  type: Component,
529
648
  args: [{ selector: 'bs-carousel', animations: [FadeInOutAnimation, CarouselSlideAnimation], template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [".carousel{min-height:100px}\n"] }]
530
- }], ctorParameters: function () { return []; }, propDecorators: { animation: [{
649
+ }], ctorParameters: function () { return []; }, propDecorators: { animationsDisabled: [{
650
+ type: HostBinding,
651
+ args: ['@.disabled']
652
+ }], animation: [{
531
653
  type: Input
532
654
  }], images: [{
533
655
  type: ContentChildren,
@@ -560,6 +682,80 @@ 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
+ this.overlayRef = this.overlay.create({
697
+ scrollStrategy: this.overlay.scrollStrategies.noop(),
698
+ positionStrategy: this.overlay.position()
699
+ .global()
700
+ .left(ev.x + 'px')
701
+ .bottom((window.innerHeight - ev.y) + 'px')
702
+ .top(ev.y + 'px')
703
+ });
704
+ this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
705
+ this.overlayRef.attach(this.templatePortal);
706
+ };
707
+ }
708
+ clickAnywhere(ev) {
709
+ this.checkAndCloseExisting(ev);
710
+ }
711
+ checkAndCloseExisting(ev) {
712
+ if (this.overlayRef) {
713
+ if (!this.overlayRef.overlayElement.contains(ev.target)) {
714
+ this.overlayRef.detach();
715
+ this.overlayRef.dispose();
716
+ this.overlayRef = null;
717
+ }
718
+ }
719
+ }
720
+ }
721
+ 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 });
722
+ BsContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsContextMenuDirective, selector: "[bsContextMenu]", host: { listeners: { "document:click": "clickAnywhere($event)" } }, ngImport: i0 });
723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, decorators: [{
724
+ type: Directive,
725
+ args: [{
726
+ selector: '[bsContextMenu]'
727
+ }]
728
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef, decorators: [{
729
+ type: Host
730
+ }, {
731
+ type: SkipSelf
732
+ }] }]; }, propDecorators: { clickAnywhere: [{
733
+ type: HostListener,
734
+ args: ['document:click', ['$event']]
735
+ }] } });
736
+
737
+ class BsContextMenuModule {
738
+ }
739
+ BsContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
740
+ BsContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, declarations: [BsContextMenuDirective], imports: [CommonModule], exports: [BsContextMenuDirective] });
741
+ BsContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, imports: [[
742
+ CommonModule
743
+ ]] });
744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, decorators: [{
745
+ type: NgModule,
746
+ args: [{
747
+ declarations: [
748
+ BsContextMenuDirective
749
+ ],
750
+ imports: [
751
+ CommonModule
752
+ ],
753
+ exports: [
754
+ BsContextMenuDirective
755
+ ]
756
+ }]
757
+ }] });
758
+
563
759
  class BsDatatableColumnDirective {
564
760
  constructor(templateRef) {
565
761
  this.bsDatatableColumn = { name: '', sortable: true };
@@ -870,21 +1066,250 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
870
1066
  }]
871
1067
  }] });
872
1068
 
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 []; } });
885
-
886
- class BsListGroupComponent {
887
- constructor() {
1069
+ class BsDropdownMenuDirective extends ClickOutsideDirective {
1070
+ constructor(dropdown, document, viewContainerRef, templateRef, overlay, elementRef, zone, platformId) {
1071
+ super(elementRef, zone, platformId);
1072
+ this.dropdown = dropdown;
1073
+ this.viewContainerRef = viewContainerRef;
1074
+ this.templateRef = templateRef;
1075
+ this.overlay = overlay;
1076
+ this.wait = false;
1077
+ this.destroyed$ = new Subject();
1078
+ this.overlayRef = null;
1079
+ this.templatePortal = null;
1080
+ this.document = document;
1081
+ this.dropdown.isOpen$
1082
+ .pipe(takeUntil(this.destroyed$))
1083
+ .subscribe((isOpen) => {
1084
+ if (isOpen) {
1085
+ this.wait = true;
1086
+ setTimeout(() => this.wait = false, 100);
1087
+ this.overlayRef = this.overlay.create({
1088
+ hasBackdrop: this.dropdown.hasBackdrop,
1089
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
1090
+ positionStrategy: this.overlay.position()
1091
+ .flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
1092
+ .withPositions([
1093
+ { originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1094
+ { originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1095
+ ]),
1096
+ });
1097
+ if (this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
1098
+ this.overlayRef.backdropClick().subscribe(() => {
1099
+ this.dropdown.isOpen = false;
1100
+ });
1101
+ }
1102
+ this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
1103
+ this.overlayRef.attach(this.templatePortal);
1104
+ }
1105
+ else {
1106
+ if (this.overlayRef) {
1107
+ this.overlayRef.detach();
1108
+ this.overlayRef.dispose();
1109
+ this.overlayRef = null;
1110
+ }
1111
+ }
1112
+ });
1113
+ }
1114
+ clickedOutside(ev) {
1115
+ if (!this.wait) {
1116
+ if (!this.overlayRef?.overlayElement.contains(ev.target)) {
1117
+ this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1118
+ if (isOpen && !this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
1119
+ this.dropdown.isOpen = false;
1120
+ }
1121
+ });
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ 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 });
1127
+ 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 });
1128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
1129
+ type: Directive,
1130
+ args: [{
1131
+ selector: '[bsDropdownMenu]',
1132
+ host: {
1133
+ '[class.show]': 'dropdown.isOpen',
1134
+ },
1135
+ }]
1136
+ }], ctorParameters: function () { return [{ type: BsDropdownDirective, decorators: [{
1137
+ type: Inject,
1138
+ args: [forwardRef(() => BsDropdownDirective)]
1139
+ }] }, { type: undefined, decorators: [{
1140
+ type: Inject,
1141
+ args: [DOCUMENT]
1142
+ }] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: Object, decorators: [{
1143
+ type: Inject,
1144
+ args: [PLATFORM_ID]
1145
+ }] }]; }, propDecorators: { clickedOutside: [{
1146
+ type: HostListener,
1147
+ args: ['clickOutside', ['$event']]
1148
+ }] } });
1149
+
1150
+ class BsDropdownToggleDirective {
1151
+ constructor(dropdown, toggleButton) {
1152
+ this.dropdown = dropdown;
1153
+ this.toggleButton = toggleButton;
1154
+ }
1155
+ onClick() {
1156
+ this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1157
+ this.dropdown.isOpen$.next(!isOpen);
1158
+ });
1159
+ }
1160
+ }
1161
+ 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 });
1162
+ BsDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
1164
+ type: Directive,
1165
+ args: [{
1166
+ selector: '[bsDropdownToggle]'
1167
+ }]
1168
+ }], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
1169
+ type: HostListener,
1170
+ args: ['click']
1171
+ }] } });
1172
+
1173
+ class BsDropdownDirective {
1174
+ constructor(elementRef) {
1175
+ this.isOpen$ = new BehaviorSubject(false);
1176
+ this.toggle = null;
1177
+ this.hasBackdrop = false;
1178
+ this.sameWidth = false;
1179
+ this.closeOnClickOutside = false;
1180
+ this.isOpenChange = new EventEmitter();
1181
+ this.elementRef = elementRef;
1182
+ }
1183
+ //#region IsOpen
1184
+ get isOpen() {
1185
+ return this.isOpen$.value;
1186
+ }
1187
+ set isOpen(value) {
1188
+ if (this.isOpen$.value !== value) {
1189
+ this.isOpen$.next(value);
1190
+ this.isOpenChange.emit(value);
1191
+ }
1192
+ }
1193
+ }
1194
+ BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1195
+ 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" }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
1196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
1197
+ type: Directive,
1198
+ args: [{
1199
+ selector: '[bsDropdown]'
1200
+ }]
1201
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { menu: [{
1202
+ type: ContentChild,
1203
+ args: [BsDropdownMenuDirective, { static: false }]
1204
+ }], toggle: [{
1205
+ type: ContentChild,
1206
+ args: [BsDropdownToggleDirective, { static: false }]
1207
+ }], hasBackdrop: [{
1208
+ type: Input
1209
+ }], sameWidth: [{
1210
+ type: Input
1211
+ }], closeOnClickOutside: [{
1212
+ type: Input
1213
+ }], isOpenChange: [{
1214
+ type: Output
1215
+ }], isOpen: [{
1216
+ type: Input
1217
+ }] } });
1218
+
1219
+ class BsDatepickerComponent {
1220
+ constructor() {
1221
+ this.selectedDate = new Date();
1222
+ this.currentMonth = new Date();
1223
+ }
1224
+ ngOnInit() {
1225
+ }
1226
+ }
1227
+ BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1228
+ 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 } });
1229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
1230
+ type: Component,
1231
+ 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: [""] }]
1232
+ }], ctorParameters: function () { return []; } });
1233
+
1234
+ class BsDropdownModule {
1235
+ }
1236
+ BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1237
+ BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
1238
+ BsDropdownToggleDirective,
1239
+ BsDropdownMenuDirective], imports: [CommonModule,
1240
+ OverlayModule,
1241
+ ClickOutsideModule], exports: [BsDropdownDirective,
1242
+ BsDropdownToggleDirective,
1243
+ BsDropdownMenuDirective] });
1244
+ BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
1245
+ CommonModule,
1246
+ OverlayModule,
1247
+ ClickOutsideModule
1248
+ ]] });
1249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
1250
+ type: NgModule,
1251
+ args: [{
1252
+ declarations: [
1253
+ BsDropdownDirective,
1254
+ BsDropdownToggleDirective,
1255
+ BsDropdownMenuDirective
1256
+ ],
1257
+ imports: [
1258
+ CommonModule,
1259
+ OverlayModule,
1260
+ ClickOutsideModule
1261
+ ],
1262
+ exports: [
1263
+ BsDropdownDirective,
1264
+ BsDropdownToggleDirective,
1265
+ BsDropdownMenuDirective
1266
+ ]
1267
+ }]
1268
+ }] });
1269
+
1270
+ class BsDatepickerModule {
1271
+ }
1272
+ BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1273
+ BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
1274
+ BsCalendarModule,
1275
+ BsDropdownModule], exports: [BsDatepickerComponent] });
1276
+ BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
1277
+ CommonModule,
1278
+ BsCalendarModule,
1279
+ BsDropdownModule
1280
+ ]] });
1281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
1282
+ type: NgModule,
1283
+ args: [{
1284
+ declarations: [
1285
+ BsDatepickerComponent
1286
+ ],
1287
+ imports: [
1288
+ CommonModule,
1289
+ BsCalendarModule,
1290
+ BsDropdownModule
1291
+ ],
1292
+ exports: [
1293
+ BsDatepickerComponent
1294
+ ]
1295
+ }]
1296
+ }] });
1297
+
1298
+ class BsListGroupItemComponent {
1299
+ constructor() {
1300
+ }
1301
+ ngOnInit() {
1302
+ }
1303
+ }
1304
+ BsListGroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1305
+ 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"] });
1306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
1307
+ type: Component,
1308
+ 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"] }]
1309
+ }], ctorParameters: function () { return []; } });
1310
+
1311
+ class BsListGroupComponent {
1312
+ constructor() {
888
1313
  }
889
1314
  ngOnInit() {
890
1315
  }
@@ -921,6 +1346,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
921
1346
  }]
922
1347
  }] });
923
1348
 
1349
+ class BsMultiselectComponent {
1350
+ constructor() {
1351
+ this.items = [];
1352
+ this.selectedItems = [];
1353
+ }
1354
+ itemChange(item, event) {
1355
+ if (!!event.target.checked) {
1356
+ this.selectedItems.push(item);
1357
+ }
1358
+ else {
1359
+ this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
1360
+ }
1361
+ }
1362
+ ngOnInit() {
1363
+ }
1364
+ }
1365
+ BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1366
+ 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"] }] });
1367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
1368
+ type: Component,
1369
+ 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"] }]
1370
+ }], ctorParameters: function () { return []; }, propDecorators: { template: [{
1371
+ type: ContentChild,
1372
+ args: [TemplateRef]
1373
+ }], items: [{
1374
+ type: Input
1375
+ }], selectedItems: [{
1376
+ type: Input
1377
+ }] } });
1378
+
1379
+ class BsMultiselectModule {
1380
+ }
1381
+ BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1382
+ BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
1383
+ BsDropdownModule,
1384
+ FocusOnLoadModule], exports: [BsMultiselectComponent] });
1385
+ BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
1386
+ CommonModule,
1387
+ BsDropdownModule,
1388
+ FocusOnLoadModule,
1389
+ ]] });
1390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
1391
+ type: NgModule,
1392
+ args: [{
1393
+ declarations: [
1394
+ BsMultiselectComponent
1395
+ ],
1396
+ imports: [
1397
+ CommonModule,
1398
+ BsDropdownModule,
1399
+ FocusOnLoadModule,
1400
+ ],
1401
+ exports: [
1402
+ BsMultiselectComponent
1403
+ ]
1404
+ }]
1405
+ }] });
1406
+
924
1407
  class BsNavbarComponent {
925
1408
  constructor() {
926
1409
  this.isExpanded = false;
@@ -955,10 +1438,10 @@ class BsNavbarNavComponent {
955
1438
  }
956
1439
  }
957
1440
  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] });
1441
+ 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\" *ngIf=\"bsNavbar.isExpanded\" [@slideUpDown]>\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"] }], animations: [SlideUpDownAnimation] });
959
1442
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
960
1443
  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"] }]
1444
+ args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse collapse w-100 show\" *ngIf=\"bsNavbar.isExpanded\" [@slideUpDown]>\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
1445
  }], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
963
1446
  type: Input
964
1447
  }] } });
@@ -1019,7 +1502,7 @@ class BsNavbarDropdownComponent {
1019
1502
  }
1020
1503
  }
1021
1504
  BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, deps: [{ token: BsNavbarDropdownComponent, host: true, optional: true, skipSelf: true }, { token: forwardRef(() => BsNavbarItemComponent), host: true }], target: i0.ɵɵFactoryTarget.Component });
1022
- BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: i0.forwardRef(function () { return BsNavbarDropdownComponent; }), descendants: true }], ngImport: i0, template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"], directives: [{ type: i1$1.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
1505
+ BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: i0.forwardRef(function () { return BsNavbarDropdownComponent; }), descendants: true }], ngImport: i0, template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"], directives: [{ type: i1$2.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
1023
1506
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
1024
1507
  type: Component,
1025
1508
  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"] }]
@@ -1178,169 +1661,200 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1178
1661
  }]
1179
1662
  }] });
1180
1663
 
1181
- class BsAccordionTabComponent {
1182
- constructor(accordion) {
1183
- this.accordion = accordion;
1184
- }
1185
- ngOnInit() {
1186
- }
1187
- headerClicked(event) {
1188
- if (this.accordion.activeTab === this) {
1189
- this.accordion.activeTab = null;
1190
- }
1191
- else {
1192
- this.accordion.activeTab = this;
1193
- }
1664
+ class BsProgressComponent {
1665
+ constructor() {
1666
+ this.progressClass = true;
1667
+ this.height = null;
1668
+ this.isIndeterminate = false;
1194
1669
  }
1195
1670
  }
1196
- BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
1197
- BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabComponent, selector: "bs-accordion-tab", ngImport: i0, template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown]=\"(accordion.activeTab === this) ? 'down' : 'up'\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], animations: [SlideUpDownAnimation] });
1198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
1671
+ BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1672
+ 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"] }] });
1673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
1199
1674
  type: Component,
1200
- args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown]=\"(accordion.activeTab === this) ? 'down' : 'up'\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
1201
- }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
1675
+ 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"] }]
1676
+ }], propDecorators: { progressClass: [{
1677
+ type: HostBinding,
1678
+ args: ['class.progress']
1679
+ }], height: [{
1680
+ type: Input
1681
+ }, {
1682
+ type: HostBinding,
1683
+ args: ['style.height.px']
1684
+ }], isIndeterminate: [{
1685
+ type: Input
1686
+ }] } });
1202
1687
 
1203
- class BsAccordionComponent {
1688
+ class BsProgressBarComponent {
1204
1689
  constructor() {
1205
- this.activeTab = null;
1690
+ this.destroyed$ = new Subject();
1691
+ this.minimum$ = new BehaviorSubject(0);
1692
+ this.maximum$ = new BehaviorSubject(100);
1693
+ this.value$ = new BehaviorSubject(50);
1694
+ this.color$ = new BehaviorSubject(Color.primary);
1695
+ this.striped = false;
1696
+ this.animated = false;
1697
+ this.progressBar = true;
1698
+ this.colorClass = 'bg-primary';
1699
+ this.widthStyle = '0';
1700
+ this.role = 'progressbar';
1701
+ this.valueNow = 50;
1702
+ this.valueMin = 0;
1703
+ this.valueMax = 100;
1704
+ this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
1705
+ .pipe(map(([minimum, maximum, value]) => {
1706
+ return (value - minimum) / (maximum - minimum) * 100;
1707
+ }));
1708
+ this.width$ = this.percentage$
1709
+ .pipe(map((width) => {
1710
+ return String(width) + '%';
1711
+ }));
1712
+ this.colorClass$ = this.color$
1713
+ .pipe(map((color) => {
1714
+ const name = Color[color];
1715
+ return `bg-${name}`;
1716
+ }));
1717
+ this.colorClass$
1718
+ .pipe(takeUntil(this.destroyed$))
1719
+ .subscribe((color) => {
1720
+ this.colorClass = color;
1721
+ });
1722
+ this.width$
1723
+ .pipe(takeUntil(this.destroyed$))
1724
+ .subscribe((width) => {
1725
+ this.widthStyle = width;
1726
+ });
1727
+ this.value$
1728
+ .pipe(takeUntil(this.destroyed$))
1729
+ .subscribe((value) => {
1730
+ this.valueNow = value;
1731
+ });
1732
+ this.minimum$
1733
+ .pipe(takeUntil(this.destroyed$))
1734
+ .subscribe((value) => {
1735
+ this.valueMin = value;
1736
+ });
1737
+ this.maximum$
1738
+ .pipe(takeUntil(this.destroyed$))
1739
+ .subscribe((value) => {
1740
+ this.valueMax = value;
1741
+ });
1206
1742
  }
1207
- ngOnInit() {
1743
+ set minimum(value) {
1744
+ this.minimum$.next(value);
1208
1745
  }
1209
- }
1210
- BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1211
- 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: [""] });
1212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
1213
- type: Component,
1214
- args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
1215
- }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
1216
- type: ContentChildren,
1217
- args: [BsAccordionTabComponent]
1218
- }] } });
1219
-
1220
- class BsAccordionTabHeaderComponent {
1221
- constructor(accordionTab, accordion) {
1222
- this.accordionTab = accordionTab;
1223
- this.accordion = accordion;
1746
+ set maximum(value) {
1747
+ this.maximum$.next(value);
1224
1748
  }
1225
- ngOnInit() {
1749
+ set value(value) {
1750
+ this.value$.next(value);
1226
1751
  }
1227
- headerClicked(event) {
1228
- if (this.accordion.activeTab === this.accordionTab) {
1229
- this.accordion.activeTab = null;
1230
- }
1231
- else {
1232
- this.accordion.activeTab = this.accordionTab;
1233
- }
1752
+ set color(value) {
1753
+ this.color$.next(value);
1754
+ }
1755
+ ngOnDestroy() {
1756
+ this.destroyed$.next(true);
1234
1757
  }
1235
1758
  }
1236
- BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
1237
- 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)\">\n <ng-content></ng-content>\n</div>", styles: [""] });
1238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
1759
+ BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1760
+ 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: [""] });
1761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
1239
1762
  type: Component,
1240
- args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
1241
- }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
1763
+ args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
1764
+ }], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
1765
+ type: Input
1766
+ }], maximum: [{
1767
+ type: Input
1768
+ }], value: [{
1769
+ type: Input
1770
+ }], color: [{
1771
+ type: Input
1772
+ }], striped: [{
1773
+ type: Input
1774
+ }, {
1775
+ type: HostBinding,
1776
+ args: ['class.progress-bar-striped']
1777
+ }], animated: [{
1778
+ type: Input
1779
+ }, {
1780
+ type: HostBinding,
1781
+ args: ['class.progress-bar-animated']
1782
+ }], progressBar: [{
1783
+ type: HostBinding,
1784
+ args: ['class.progress-bar']
1785
+ }], colorClass: [{
1786
+ type: HostBinding,
1787
+ args: ['class']
1788
+ }], widthStyle: [{
1789
+ type: HostBinding,
1790
+ args: ['style.width']
1791
+ }], role: [{
1792
+ type: HostBinding,
1793
+ args: ['attr.role']
1794
+ }], valueNow: [{
1795
+ type: HostBinding,
1796
+ args: ['attr.aria-valuenow']
1797
+ }], valueMin: [{
1798
+ type: HostBinding,
1799
+ args: ['attr.aria-valuemin']
1800
+ }], valueMax: [{
1801
+ type: HostBinding,
1802
+ args: ['attr.aria-valuemax']
1803
+ }] } });
1242
1804
 
1243
- class BsAccordionModule {
1805
+ class BsProgressBarModule {
1244
1806
  }
1245
- BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1246
- BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
1247
- BsAccordionTabComponent,
1248
- BsAccordionTabHeaderComponent], imports: [CommonModule,
1249
- BrowserAnimationsModule], exports: [BsAccordionComponent,
1250
- BsAccordionTabComponent,
1251
- BsAccordionTabHeaderComponent] });
1252
- BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
1253
- CommonModule,
1254
- BrowserAnimationsModule
1807
+ BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1808
+ BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
1809
+ BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
1810
+ BsProgressComponent] });
1811
+ BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
1812
+ CommonModule
1255
1813
  ]] });
1256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
1814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
1257
1815
  type: NgModule,
1258
1816
  args: [{
1259
1817
  declarations: [
1260
- BsAccordionComponent,
1261
- BsAccordionTabComponent,
1262
- BsAccordionTabHeaderComponent
1818
+ BsProgressBarComponent,
1819
+ BsProgressComponent
1263
1820
  ],
1264
1821
  imports: [
1265
- CommonModule,
1266
- BrowserAnimationsModule
1822
+ CommonModule
1267
1823
  ],
1268
1824
  exports: [
1269
- BsAccordionComponent,
1270
- BsAccordionTabComponent,
1271
- BsAccordionTabHeaderComponent
1825
+ BsProgressBarComponent,
1826
+ BsProgressComponent
1272
1827
  ]
1273
1828
  }]
1274
1829
  }] });
1275
1830
 
1276
- class BsTabPageComponent {
1277
- constructor(tabControl) {
1278
- this.disabled = false;
1279
- this.tabControl = tabControl;
1280
- }
1281
- ngOnInit() {
1282
- }
1283
- }
1284
- BsTabPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabPageComponent, deps: [{ token: BsTabControlComponent }], target: i0.ɵɵFactoryTarget.Component });
1285
- BsTabPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTabPageComponent, selector: "bs-tab-page", inputs: { disabled: "disabled" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-content *ngIf=\"tabControl.activeTab === this\"></ng-content>", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabPageComponent, decorators: [{
1287
- type: Component,
1288
- args: [{ selector: 'bs-tab-page', template: "<ng-content *ngIf=\"tabControl.activeTab === this\"></ng-content>", styles: [""] }]
1289
- }], ctorParameters: function () { return [{ type: BsTabControlComponent }]; }, propDecorators: { headerTemplate: [{
1290
- type: ContentChild,
1291
- args: [TemplateRef]
1292
- }], disabled: [{
1293
- type: Input
1294
- }] } });
1295
-
1296
- class BsTabControlComponent {
1297
- constructor() {
1298
- this.activeTab = null;
1299
- }
1300
- ngOnInit() {
1831
+ class BsScrollOffsetService {
1832
+ constructor(routerConfig) {
1833
+ this.routerConfig = routerConfig;
1301
1834
  }
1302
- setActiveTab(tab) {
1303
- if (!tab.disabled) {
1304
- this.activeTab = tab;
1835
+ getScrollOffset() {
1836
+ if (!this.routerConfig.scrollOffset) {
1837
+ return [0, 0];
1838
+ }
1839
+ else if (Array.isArray(this.routerConfig.scrollOffset)) {
1840
+ return this.routerConfig.scrollOffset;
1841
+ }
1842
+ else {
1843
+ return this.routerConfig.scrollOffset();
1305
1844
  }
1306
- return false;
1307
1845
  }
1308
1846
  }
1309
- BsTabControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1310
- BsTabControlComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTabControlComponent, selector: "bs-tab-control", queries: [{ propertyName: "tabPages", predicate: BsTabPageComponent }], ngImport: i0, template: "<ul class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let tab of tabPages\">\n <li class=\"nav-item\" (click)=\"setActiveTab(tab)\" *ngIf=\"!!tab.headerTemplate\">\n <a class=\"nav-link\" [class.active]=\"activeTab === tab\" [class.disabled]=\"tab.disabled\" [attr.aria-current]=\"activeTab === tab ? 'page' : null\" [attr.aria-disabled]=\"tab.disabled\" href=\"\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate\"></ng-container>\n </a>\n </li>\n </ng-container>\n</ul>\n<!-- <div class=\"container\"> -->\n <ng-content></ng-content>\n<!-- </div> -->", styles: [""], 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"] }] });
1311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlComponent, decorators: [{
1312
- type: Component,
1313
- args: [{ selector: 'bs-tab-control', template: "<ul class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let tab of tabPages\">\n <li class=\"nav-item\" (click)=\"setActiveTab(tab)\" *ngIf=\"!!tab.headerTemplate\">\n <a class=\"nav-link\" [class.active]=\"activeTab === tab\" [class.disabled]=\"tab.disabled\" [attr.aria-current]=\"activeTab === tab ? 'page' : null\" [attr.aria-disabled]=\"tab.disabled\" href=\"\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate\"></ng-container>\n </a>\n </li>\n </ng-container>\n</ul>\n<!-- <div class=\"container\"> -->\n <ng-content></ng-content>\n<!-- </div> -->", styles: [""] }]
1314
- }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
1315
- type: ContentChildren,
1316
- args: [BsTabPageComponent]
1317
- }] } });
1318
-
1319
- class BsTabControlModule {
1320
- }
1321
- BsTabControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1322
- BsTabControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, declarations: [BsTabControlComponent,
1323
- BsTabPageComponent], imports: [CommonModule], exports: [BsTabControlComponent,
1324
- BsTabPageComponent] });
1325
- BsTabControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, imports: [[
1326
- CommonModule
1327
- ]] });
1328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, decorators: [{
1329
- type: NgModule,
1847
+ BsScrollOffsetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, deps: [{ token: ROUTER_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
1848
+ BsScrollOffsetServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, providedIn: 'root' });
1849
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, decorators: [{
1850
+ type: Injectable,
1330
1851
  args: [{
1331
- declarations: [
1332
- BsTabControlComponent,
1333
- BsTabPageComponent,
1334
- ],
1335
- imports: [
1336
- CommonModule
1337
- ],
1338
- exports: [
1339
- BsTabControlComponent,
1340
- BsTabPageComponent,
1341
- ]
1852
+ providedIn: 'root'
1342
1853
  }]
1343
- }] });
1854
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1855
+ type: Inject,
1856
+ args: [ROUTER_CONFIGURATION]
1857
+ }] }]; } });
1344
1858
 
1345
1859
  class BsScrollspyDirective {
1346
1860
  constructor(element) {
@@ -1357,17 +1871,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1357
1871
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
1358
1872
 
1359
1873
  class BsScrollspyComponent {
1360
- constructor(document) {
1874
+ constructor(scrollOffsetService, document) {
1875
+ this.scrollOffsetService = scrollOffsetService;
1361
1876
  this.activeDirective = null;
1362
1877
  this.doc = document;
1363
1878
  }
1364
- ngOnInit() {
1365
- }
1366
1879
  ngAfterViewInit() {
1367
1880
  this.onWindowScroll();
1368
1881
  }
1369
1882
  onWindowScroll() {
1370
- const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y <= 0);
1883
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
1884
+ const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y < offsetY);
1371
1885
  if (this.directives.length === 0) {
1372
1886
  this.activeDirective = null;
1373
1887
  }
@@ -1377,23 +1891,37 @@ class BsScrollspyComponent {
1377
1891
  else {
1378
1892
  this.activeDirective = dirs[dirs.length - 1];
1379
1893
  }
1894
+ if (window && (window.innerWidth >= 768)) {
1895
+ if (this.activeDirective) {
1896
+ const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
1897
+ const anchor = this.anchors.get(index);
1898
+ if (anchor && anchor.nativeElement.parentElement) {
1899
+ anchor.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
1900
+ }
1901
+ }
1902
+ }
1380
1903
  }
1381
1904
  scrollToHeader(directive) {
1382
1905
  const header = directive.element.nativeElement;
1383
- header.scrollIntoView();
1906
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
1907
+ const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
1908
+ window.scrollTo({ top: y, behavior: 'smooth' });
1384
1909
  }
1385
1910
  }
1386
- BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
1387
- BsScrollspyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyComponent, selector: "bs-scrollspy", host: { listeners: { "window:scroll": "onWindowScroll($event)" } }, queries: [{ propertyName: "directives", predicate: BsScrollspyDirective, descendants: true }], ngImport: i0, template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives\">\n <span class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\">\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:25%;overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1911
+ BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
1912
+ 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"] }] });
1388
1913
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
1389
1914
  type: Component,
1390
- args: [{ selector: 'bs-scrollspy', template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives\">\n <span class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\">\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:25%;overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"] }]
1391
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1915
+ 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"] }]
1916
+ }], ctorParameters: function () { return [{ type: BsScrollOffsetService }, { type: undefined, decorators: [{
1392
1917
  type: Inject,
1393
1918
  args: [DOCUMENT]
1394
1919
  }] }]; }, propDecorators: { directives: [{
1395
1920
  type: ContentChildren,
1396
1921
  args: [BsScrollspyDirective, { descendants: true }]
1922
+ }], anchors: [{
1923
+ type: ViewChildren,
1924
+ args: ['anchor']
1397
1925
  }], onWindowScroll: [{
1398
1926
  type: HostListener,
1399
1927
  args: ['window:scroll', ['$event']]
@@ -1425,235 +1953,736 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1425
1953
  }]
1426
1954
  }] });
1427
1955
 
1428
- class BsDropdownMenuDirective {
1429
- constructor(dropdown, document, viewContainerRef, templateRef, overlay) {
1430
- this.dropdown = dropdown;
1431
- this.viewContainerRef = viewContainerRef;
1432
- this.templateRef = templateRef;
1433
- this.overlay = overlay;
1434
- this.destroyed$ = new Subject();
1435
- this.overlayRef = null;
1436
- this.templatePortal = null;
1437
- this.document = document;
1438
- this.dropdown.isOpen$
1439
- .pipe(takeUntil(this.destroyed$))
1440
- .subscribe((isOpen) => {
1441
- if (isOpen) {
1442
- this.overlayRef = this.overlay.create({
1443
- hasBackdrop: this.dropdown.hasBackdrop,
1444
- scrollStrategy: this.overlay.scrollStrategies.reposition(),
1445
- positionStrategy: this.overlay.position()
1446
- .flexibleConnectedTo(this.dropdown.toggle.toggleButton)
1447
- .withPositions([
1448
- { originX: "start", "originY": "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
1449
- { originX: "start", "originY": "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
1450
- ]),
1451
- });
1452
- this.overlayRef.backdropClick().subscribe(() => this.dropdown.isOpen$.next(false));
1453
- this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
1454
- this.overlayRef.attach(this.templatePortal);
1455
- }
1456
- else {
1457
- if (this.overlayRef) {
1458
- this.overlayRef.detach();
1459
- this.overlayRef.dispose();
1460
- }
1461
- }
1462
- });
1956
+ class BsInListPipe {
1957
+ transform(items, parameter) {
1958
+ return items.some(item => item.id === parameter);
1463
1959
  }
1464
1960
  }
1465
- BsDropdownMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, deps: [{ token: forwardRef(() => BsDropdownDirective) }, { token: DOCUMENT }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1$2.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
1466
- BsDropdownMenuDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]", host: { properties: { "class.show": "dropdown.isOpen" } }, ngImport: i0 });
1467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
1468
- type: Directive,
1961
+ BsInListPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1962
+ BsInListPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, name: "inList" });
1963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, decorators: [{
1964
+ type: Pipe,
1469
1965
  args: [{
1470
- selector: '[bsDropdownMenu]',
1471
- host: {
1472
- '[class.show]': 'dropdown.isOpen',
1473
- },
1966
+ name: 'inList'
1474
1967
  }]
1475
- }], ctorParameters: function () { return [{ type: BsDropdownDirective, decorators: [{
1476
- type: Inject,
1477
- args: [forwardRef(() => BsDropdownDirective)]
1478
- }] }, { type: undefined, decorators: [{
1479
- type: Inject,
1480
- args: [DOCUMENT]
1481
- }] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$2.Overlay }]; } });
1968
+ }] });
1482
1969
 
1483
- class BsDropdownToggleDirective {
1484
- constructor(dropdown, toggleButton) {
1485
- this.dropdown = dropdown;
1486
- this.toggleButton = toggleButton;
1970
+ class BsSelect2Component {
1971
+ constructor() {
1972
+ this.isOpen = false;
1973
+ this.suggestions$ = new BehaviorSubject([]);
1974
+ this.isLoading$ = new BehaviorSubject(false);
1975
+ this.hostWidth$ = new BehaviorSubject(200);
1976
+ this.searchterm = '';
1977
+ this.suggestions = [];
1978
+ this.provideSuggestions = new EventEmitter();
1979
+ this.selectedItems = [];
1980
+ this.isFocused = false;
1981
+ this.charWidth = 10;
1982
+ this.searchWidth = 20;
1487
1983
  }
1488
- onClick() {
1489
- console.log('clicked');
1490
- this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
1491
- this.dropdown.isOpen$.next(!isOpen);
1492
- });
1984
+ ngAfterViewInit() {
1985
+ this.onResize();
1986
+ }
1987
+ onProvideSuggestions(value) {
1988
+ this.searchWidth = this.charWidth * (this.searchterm.length + 2);
1989
+ if (value === '') {
1990
+ this.isOpen = false;
1991
+ this.suggestions$.next([]);
1992
+ }
1993
+ else {
1994
+ this.isLoading$.next(true);
1995
+ this.isOpen = true;
1996
+ this.provideSuggestions.emit(value);
1997
+ }
1998
+ }
1999
+ onSuggestionClicked(suggestion) {
2000
+ this.searchterm = '';
2001
+ this.isOpen = false;
2002
+ const existing = this.selectedItems.find((value, index) => value.id === suggestion.id);
2003
+ if (existing === undefined) {
2004
+ this.selectedItems.push(suggestion);
2005
+ }
2006
+ else {
2007
+ this.selectedItems.splice(this.selectedItems.indexOf(existing), 1);
2008
+ }
2009
+ this.searchBox.nativeElement.focus();
2010
+ }
2011
+ onRemoveItem(item, event) {
2012
+ event.stopPropagation();
2013
+ this.selectedItems.splice(this.selectedItems.indexOf(item), 1);
2014
+ this.focus();
2015
+ }
2016
+ ngOnInit() {
2017
+ }
2018
+ onResize() {
2019
+ this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
2020
+ }
2021
+ focus() {
2022
+ this.searchBox.nativeElement.focus();
1493
2023
  }
1494
2024
  }
1495
- BsDropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, deps: [{ token: BsDropdownDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1496
- BsDropdownToggleDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
1497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
1498
- type: Directive,
1499
- args: [{
1500
- selector: '[bsDropdownToggle]'
1501
- }]
1502
- }], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
2025
+ BsSelect2Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
2026
+ 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 } });
2027
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, decorators: [{
2028
+ type: Component,
2029
+ 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"] }]
2030
+ }], ctorParameters: function () { return []; }, propDecorators: { searchBox: [{
2031
+ type: ViewChild,
2032
+ args: ['searchBox']
2033
+ }], itemsBox: [{
2034
+ type: ViewChild,
2035
+ args: ['itemsBox']
2036
+ }], searchterm: [{
2037
+ type: Input
2038
+ }], suggestions: [{
2039
+ type: Input
2040
+ }], provideSuggestions: [{
2041
+ type: Output
2042
+ }], selectedItems: [{
2043
+ type: Input
2044
+ }], isFocused: [{
2045
+ type: HostBinding,
2046
+ args: ['class.focus']
2047
+ }], onResize: [{
2048
+ type: HostListener,
2049
+ args: ['window:resize']
2050
+ }], focus: [{
1503
2051
  type: HostListener,
1504
2052
  args: ['click']
2053
+ }], defaultItemTemplate: [{
2054
+ type: ViewChild,
2055
+ args: ['defaultItemTemplate', { static: true }]
1505
2056
  }] } });
1506
2057
 
1507
- class BsDropdownDirective {
1508
- constructor() {
1509
- this.isOpen$ = new BehaviorSubject(false);
1510
- this.hasBackdrop = false;
1511
- this.closeOnClickOutside = false;
2058
+ class BsItemTemplateDirective {
2059
+ constructor(select2component, templateRef) {
2060
+ this.select2component = select2component;
2061
+ console.log('template', templateRef);
2062
+ this.select2component.itemTemplate = templateRef;
1512
2063
  }
1513
2064
  }
1514
- BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1515
- BsDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: { hasBackdrop: "hasBackdrop", closeOnClickOutside: "closeOnClickOutside" }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
1516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
2065
+ 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 });
2066
+ BsItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsItemTemplateDirective, selector: "[bsItemTemplate]", ngImport: i0 });
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsItemTemplateDirective, decorators: [{
1517
2068
  type: Directive,
1518
2069
  args: [{
1519
- selector: '[bsDropdown]'
2070
+ selector: '[bsItemTemplate]'
1520
2071
  }]
1521
- }], propDecorators: { menu: [{
1522
- type: ContentChild,
1523
- args: [BsDropdownMenuDirective, { static: false }]
1524
- }], toggle: [{
1525
- type: ContentChild,
1526
- args: [BsDropdownToggleDirective, { static: false }]
1527
- }], hasBackdrop: [{
1528
- type: Input
1529
- }], closeOnClickOutside: [{
1530
- type: Input
1531
- }] } });
2072
+ }], ctorParameters: function () { return [{ type: BsSelect2Component }, { type: i0.TemplateRef }]; } });
1532
2073
 
1533
- class BsDropdownModule {
2074
+ class BsInListModule {
1534
2075
  }
1535
- BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1536
- BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
1537
- BsDropdownToggleDirective,
1538
- BsDropdownMenuDirective], imports: [CommonModule,
1539
- OverlayModule], exports: [BsDropdownDirective,
1540
- BsDropdownToggleDirective,
1541
- BsDropdownMenuDirective] });
1542
- BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
2076
+ BsInListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2077
+ BsInListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, declarations: [BsInListPipe], imports: [CommonModule], exports: [BsInListPipe] });
2078
+ BsInListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, imports: [[
2079
+ CommonModule
2080
+ ]] });
2081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, decorators: [{
2082
+ type: NgModule,
2083
+ args: [{
2084
+ declarations: [
2085
+ BsInListPipe
2086
+ ],
2087
+ imports: [
2088
+ CommonModule
2089
+ ],
2090
+ exports: [
2091
+ BsInListPipe
2092
+ ]
2093
+ }]
2094
+ }] });
2095
+
2096
+ class BsSelect2Module {
2097
+ }
2098
+ BsSelect2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2099
+ BsSelect2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, declarations: [BsSelect2Component,
2100
+ BsItemTemplateDirective], imports: [CommonModule,
2101
+ FormsModule,
2102
+ BsDropdownModule,
2103
+ BsInListModule], exports: [BsSelect2Component,
2104
+ BsItemTemplateDirective] });
2105
+ BsSelect2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, imports: [[
1543
2106
  CommonModule,
1544
- OverlayModule
2107
+ FormsModule,
2108
+ BsDropdownModule,
2109
+ BsInListModule
1545
2110
  ]] });
1546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
2111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, decorators: [{
1547
2112
  type: NgModule,
1548
2113
  args: [{
1549
2114
  declarations: [
1550
- BsDropdownDirective,
1551
- BsDropdownToggleDirective,
1552
- BsDropdownMenuDirective
2115
+ BsSelect2Component,
2116
+ BsItemTemplateDirective
1553
2117
  ],
1554
2118
  imports: [
1555
2119
  CommonModule,
1556
- OverlayModule
2120
+ FormsModule,
2121
+ BsDropdownModule,
2122
+ BsInListModule
1557
2123
  ],
1558
2124
  exports: [
1559
- BsDropdownDirective,
1560
- BsDropdownToggleDirective,
1561
- BsDropdownMenuDirective
2125
+ BsSelect2Component,
2126
+ BsItemTemplateDirective
1562
2127
  ]
1563
2128
  }]
1564
2129
  }] });
1565
2130
 
1566
- class BsDatepickerComponent {
2131
+ const SNACKBAR_CONTENT = new InjectionToken('SnackbarContent');
2132
+
2133
+ class BsSnackbarComponent {
2134
+ constructor(content) {
2135
+ this.displayBlock = true;
2136
+ this.width100 = true;
2137
+ this.instance = null;
2138
+ //#region Monitor @slideUpDown hooks
2139
+ this.animationState = '';
2140
+ this.animationStateChanged = new EventEmitter();
2141
+ this.content = content;
2142
+ }
2143
+ onAnimationChanged(event) {
2144
+ this.animationStateChanged.emit(event);
2145
+ }
2146
+ }
2147
+ BsSnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, deps: [{ token: SNACKBAR_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
2148
+ 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] });
2149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, decorators: [{
2150
+ type: Component,
2151
+ 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"] }]
2152
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
2153
+ type: Inject,
2154
+ args: [SNACKBAR_CONTENT]
2155
+ }] }]; }, propDecorators: { displayBlock: [{
2156
+ type: HostBinding,
2157
+ args: ['class.d-block']
2158
+ }], width100: [{
2159
+ type: HostBinding,
2160
+ args: ['class.w-100']
2161
+ }] } });
2162
+
2163
+ class BsSnackbarService {
2164
+ constructor(overlay, parentInjector, componentFactoryResolver) {
2165
+ this.overlay = overlay;
2166
+ this.parentInjector = parentInjector;
2167
+ this.componentFactoryResolver = componentFactoryResolver;
2168
+ }
2169
+ show(template) {
2170
+ const injector = Injector.create({
2171
+ providers: [{ provide: SNACKBAR_CONTENT, useValue: template }],
2172
+ parent: this.parentInjector
2173
+ });
2174
+ const portal = new ComponentPortal(BsSnackbarComponent, null, injector, this.componentFactoryResolver);
2175
+ const overlayRef = this.overlay.create({
2176
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2177
+ positionStrategy: this.overlay.position()
2178
+ .global().centerHorizontally().bottom('0'),
2179
+ width: '100%'
2180
+ });
2181
+ const componentInstance = overlayRef.attach(portal);
2182
+ // componentInstance.
2183
+ componentInstance.instance['instance'] = {
2184
+ component: componentInstance,
2185
+ overlay: overlayRef
2186
+ };
2187
+ return componentInstance.instance;
2188
+ }
2189
+ hide(snackbar) {
2190
+ snackbar.animationStateChanged.pipe(filter(ev => ev.phaseName === 'done' && ev.toState === 'void'), take(1)).subscribe(() => {
2191
+ snackbar['instance']?.overlay.dispose();
2192
+ });
2193
+ snackbar.animationState = 'void';
2194
+ }
2195
+ }
2196
+ 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 });
2197
+ BsSnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, providedIn: 'root' });
2198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, decorators: [{
2199
+ type: Injectable,
2200
+ args: [{
2201
+ providedIn: 'root'
2202
+ }]
2203
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; } });
2204
+
2205
+ class BsSnackbarCloseDirective {
2206
+ constructor(snackbarService) {
2207
+ this.snackbarService = snackbarService;
2208
+ }
2209
+ onClick() {
2210
+ this.snackbarService.hide(this.bsSnackbarClose);
2211
+ }
2212
+ }
2213
+ BsSnackbarCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, deps: [{ token: BsSnackbarService }], target: i0.ɵɵFactoryTarget.Directive });
2214
+ BsSnackbarCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsSnackbarCloseDirective, selector: "[bsSnackbarClose]", inputs: { bsSnackbarClose: "bsSnackbarClose" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
2215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, decorators: [{
2216
+ type: Directive,
2217
+ args: [{
2218
+ selector: '[bsSnackbarClose]'
2219
+ }]
2220
+ }], ctorParameters: function () { return [{ type: BsSnackbarService }]; }, propDecorators: { bsSnackbarClose: [{
2221
+ type: Input
2222
+ }], onClick: [{
2223
+ type: HostListener,
2224
+ args: ['click']
2225
+ }] } });
2226
+
2227
+ class BsSnackbarModule {
2228
+ }
2229
+ BsSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2230
+ BsSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, declarations: [BsSnackbarComponent,
2231
+ BsSnackbarCloseDirective], imports: [CommonModule], exports: [BsSnackbarComponent,
2232
+ BsSnackbarCloseDirective] });
2233
+ BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, providers: [
2234
+ // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
2235
+ // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
2236
+ ], imports: [[
2237
+ CommonModule
2238
+ ]] });
2239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, decorators: [{
2240
+ type: NgModule,
2241
+ args: [{
2242
+ declarations: [
2243
+ BsSnackbarComponent,
2244
+ BsSnackbarCloseDirective
2245
+ ],
2246
+ imports: [
2247
+ CommonModule
2248
+ ],
2249
+ exports: [
2250
+ BsSnackbarComponent,
2251
+ BsSnackbarCloseDirective
2252
+ ],
2253
+ providers: [
2254
+ // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
2255
+ // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
2256
+ ]
2257
+ }]
2258
+ }] });
2259
+
2260
+ class BsTabPageComponent {
2261
+ constructor(tabControl) {
2262
+ this.disabled = false;
2263
+ this.tabControl = tabControl;
2264
+ }
2265
+ ngOnInit() {
2266
+ }
2267
+ }
2268
+ BsTabPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabPageComponent, deps: [{ token: BsTabControlComponent }], target: i0.ɵɵFactoryTarget.Component });
2269
+ BsTabPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTabPageComponent, selector: "bs-tab-page", inputs: { disabled: "disabled" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-content *ngIf=\"tabControl.activeTab === this\"></ng-content>", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabPageComponent, decorators: [{
2271
+ type: Component,
2272
+ args: [{ selector: 'bs-tab-page', template: "<ng-content *ngIf=\"tabControl.activeTab === this\"></ng-content>", styles: [""] }]
2273
+ }], ctorParameters: function () { return [{ type: BsTabControlComponent }]; }, propDecorators: { headerTemplate: [{
2274
+ type: ContentChild,
2275
+ args: [TemplateRef]
2276
+ }], disabled: [{
2277
+ type: Input
2278
+ }] } });
2279
+
2280
+ class BsTabControlComponent {
1567
2281
  constructor() {
1568
- this.selectedDate = new Date();
1569
- this.currentMonth = new Date();
2282
+ this.activeTab = null;
1570
2283
  }
1571
2284
  ngOnInit() {
1572
2285
  }
2286
+ setActiveTab(tab) {
2287
+ if (!tab.disabled) {
2288
+ this.activeTab = tab;
2289
+ }
2290
+ return false;
2291
+ }
1573
2292
  }
1574
- BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1575
- BsDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatepickerComponent, selector: "bs-datepicker", ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""], components: [{ type: BsCalendarComponent, selector: "bs-calendar", inputs: ["currentMonth", "selectedDate"], outputs: ["currentMonthChange", "selectedDateChange"] }], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "closeOnClickOutside"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }], pipes: { "date": i1.DatePipe } });
1576
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
2293
+ BsTabControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2294
+ BsTabControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTabControlComponent, selector: "bs-tab-control", queries: [{ propertyName: "tabPages", predicate: BsTabPageComponent }], ngImport: i0, template: "<ul class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let tab of tabPages\">\n <li class=\"nav-item\" (click)=\"setActiveTab(tab)\" *ngIf=\"!!tab.headerTemplate\">\n <a class=\"nav-link\" [class.active]=\"activeTab === tab\" [class.disabled]=\"tab.disabled\" [attr.aria-current]=\"activeTab === tab ? 'page' : null\" [attr.aria-disabled]=\"tab.disabled\" href=\"\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate\"></ng-container>\n </a>\n </li>\n </ng-container>\n</ul>\n<!-- <div class=\"container\"> -->\n <ng-content></ng-content>\n<!-- </div> -->", styles: [""], 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"] }] });
2295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlComponent, decorators: [{
1577
2296
  type: Component,
1578
- args: [{ selector: 'bs-datepicker', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""] }]
1579
- }], ctorParameters: function () { return []; } });
2297
+ args: [{ selector: 'bs-tab-control', template: "<ul class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let tab of tabPages\">\n <li class=\"nav-item\" (click)=\"setActiveTab(tab)\" *ngIf=\"!!tab.headerTemplate\">\n <a class=\"nav-link\" [class.active]=\"activeTab === tab\" [class.disabled]=\"tab.disabled\" [attr.aria-current]=\"activeTab === tab ? 'page' : null\" [attr.aria-disabled]=\"tab.disabled\" href=\"\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate\"></ng-container>\n </a>\n </li>\n </ng-container>\n</ul>\n<!-- <div class=\"container\"> -->\n <ng-content></ng-content>\n<!-- </div> -->", styles: [""] }]
2298
+ }], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
2299
+ type: ContentChildren,
2300
+ args: [BsTabPageComponent]
2301
+ }] } });
1580
2302
 
1581
- class BsDatepickerModule {
2303
+ class BsTabControlModule {
1582
2304
  }
1583
- BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1584
- BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
1585
- BsCalendarModule,
1586
- BsDropdownModule], exports: [BsDatepickerComponent] });
1587
- BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
1588
- CommonModule,
1589
- BsCalendarModule,
1590
- BsDropdownModule
2305
+ BsTabControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2306
+ BsTabControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, declarations: [BsTabControlComponent,
2307
+ BsTabPageComponent], imports: [CommonModule], exports: [BsTabControlComponent,
2308
+ BsTabPageComponent] });
2309
+ BsTabControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, imports: [[
2310
+ CommonModule
1591
2311
  ]] });
1592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
2312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTabControlModule, decorators: [{
1593
2313
  type: NgModule,
1594
2314
  args: [{
1595
2315
  declarations: [
1596
- BsDatepickerComponent
2316
+ BsTabControlComponent,
2317
+ BsTabPageComponent,
1597
2318
  ],
1598
2319
  imports: [
1599
- CommonModule,
1600
- BsCalendarModule,
1601
- BsDropdownModule
2320
+ CommonModule
1602
2321
  ],
1603
2322
  exports: [
1604
- BsDatepickerComponent
2323
+ BsTabControlComponent,
2324
+ BsTabPageComponent,
1605
2325
  ]
1606
2326
  }]
1607
2327
  }] });
1608
2328
 
1609
- class BsMultiselectComponent {
2329
+ class BsToggleButtonComponent {
1610
2330
  constructor() {
1611
- this.items = [];
1612
- this.selectedItems = [];
2331
+ this.disableAnimations = true;
2332
+ //#region isToggled
2333
+ this._isToggled = false;
2334
+ this.isToggledChange = new EventEmitter();
2335
+ //#endregion
2336
+ this.offColor = '#CCCCCC';
2337
+ this.onColor = '#2196F3';
2338
+ this.round = true;
1613
2339
  }
1614
- itemChange(item, event) {
1615
- if (!!event.target.checked) {
1616
- this.selectedItems.push(item);
2340
+ ngAfterViewInit() {
2341
+ this.disableAnimations = false;
2342
+ }
2343
+ get isToggled() {
2344
+ return this._isToggled;
2345
+ }
2346
+ set isToggled(value) {
2347
+ this._isToggled = value;
2348
+ this.isToggledChange.emit(this._isToggled);
2349
+ }
2350
+ }
2351
+ BsToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2352
+ 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] });
2353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, decorators: [{
2354
+ type: Component,
2355
+ 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"] }]
2356
+ }], propDecorators: { isToggledChange: [{
2357
+ type: Output
2358
+ }], isToggled: [{
2359
+ type: Input
2360
+ }], offColor: [{
2361
+ type: Input
2362
+ }], onColor: [{
2363
+ type: Input
2364
+ }], round: [{
2365
+ type: Input
2366
+ }] } });
2367
+
2368
+ class BsToggleButtonModule {
2369
+ }
2370
+ BsToggleButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2371
+ BsToggleButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, declarations: [BsToggleButtonComponent], imports: [CommonModule], exports: [BsToggleButtonComponent] });
2372
+ BsToggleButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, imports: [[
2373
+ CommonModule
2374
+ ]] });
2375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, decorators: [{
2376
+ type: NgModule,
2377
+ args: [{
2378
+ declarations: [
2379
+ BsToggleButtonComponent
2380
+ ],
2381
+ imports: [
2382
+ CommonModule
2383
+ ],
2384
+ exports: [
2385
+ BsToggleButtonComponent
2386
+ ]
2387
+ }]
2388
+ }] });
2389
+
2390
+ const TOOLTIP_CONTENT = new InjectionToken('TooltipContent');
2391
+
2392
+ class BsTooltipComponent {
2393
+ constructor(content) {
2394
+ this.positions = Position;
2395
+ this.position = Position.bottom;
2396
+ this.template = content;
2397
+ }
2398
+ }
2399
+ BsTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, deps: [{ token: TOOLTIP_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
2400
+ BsTooltipComponent.ɵcmp = 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] });
2401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, decorators: [{
2402
+ type: Component,
2403
+ 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"] }]
2404
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
2405
+ type: Inject,
2406
+ args: [TOOLTIP_CONTENT]
2407
+ }] }]; }, propDecorators: { position: [{
2408
+ type: Input
2409
+ }] } });
2410
+
2411
+ class BsTooltipDirective {
2412
+ constructor(overlay, templateRef, componentFactoryResolver, parentInjector, parent) {
2413
+ this.overlay = overlay;
2414
+ this.templateRef = templateRef;
2415
+ this.parentInjector = parentInjector;
2416
+ this.parent = parent;
2417
+ this.bsTooltip = Position.bottom;
2418
+ this.overlayRef = null;
2419
+ this.injector = Injector.create({
2420
+ providers: [{ provide: TOOLTIP_CONTENT, useValue: this.templateRef }],
2421
+ parent: this.parentInjector
2422
+ });
2423
+ this.portal = new ComponentPortal(BsTooltipComponent, null, this.injector, componentFactoryResolver);
2424
+ parent.nativeElement.onmouseenter = () => {
2425
+ this.showTooltip();
2426
+ };
2427
+ parent.nativeElement.onmouseleave = () => {
2428
+ this.hideTooltip();
2429
+ };
2430
+ }
2431
+ showTooltip() {
2432
+ const positions = [];
2433
+ switch (this.bsTooltip) {
2434
+ case Position.bottom:
2435
+ {
2436
+ positions.push({
2437
+ originX: "center",
2438
+ originY: "bottom",
2439
+ overlayX: "center",
2440
+ overlayY: "top"
2441
+ });
2442
+ }
2443
+ break;
2444
+ case Position.top:
2445
+ {
2446
+ positions.push({
2447
+ originX: "center",
2448
+ originY: "top",
2449
+ overlayX: "center",
2450
+ overlayY: "bottom"
2451
+ });
2452
+ }
2453
+ break;
2454
+ case Position.left:
2455
+ {
2456
+ positions.push({
2457
+ originX: "start",
2458
+ originY: "center",
2459
+ overlayX: "end",
2460
+ overlayY: "center",
2461
+ });
2462
+ }
2463
+ break;
2464
+ case Position.right:
2465
+ {
2466
+ positions.push({
2467
+ originX: "end",
2468
+ originY: "center",
2469
+ overlayX: "start",
2470
+ overlayY: "center"
2471
+ });
2472
+ }
2473
+ break;
2474
+ }
2475
+ this.overlayRef = this.overlay.create({
2476
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2477
+ positionStrategy: this.overlay.position()
2478
+ .flexibleConnectedTo(this.parent)
2479
+ .withPositions(positions),
2480
+ });
2481
+ const component = this.overlayRef.attach(this.portal);
2482
+ component.instance.position = this.bsTooltip;
2483
+ }
2484
+ hideTooltip() {
2485
+ if (this.overlayRef) {
2486
+ this.overlayRef.detach();
2487
+ this.overlayRef.dispose();
2488
+ this.overlayRef = null;
2489
+ }
2490
+ }
2491
+ }
2492
+ 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 });
2493
+ BsTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipDirective, selector: "*[bsTooltip]", inputs: { bsTooltip: "bsTooltip" }, ngImport: i0 });
2494
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, decorators: [{
2495
+ type: Directive,
2496
+ args: [{
2497
+ selector: '*[bsTooltip]'
2498
+ }]
2499
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ElementRef, decorators: [{
2500
+ type: Host
2501
+ }, {
2502
+ type: SkipSelf
2503
+ }] }]; }, propDecorators: { bsTooltip: [{
2504
+ type: Input
2505
+ }] } });
2506
+
2507
+ class BsTooltipModule {
2508
+ }
2509
+ BsTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2510
+ BsTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, declarations: [BsTooltipDirective,
2511
+ BsTooltipComponent], imports: [CommonModule], exports: [BsTooltipDirective] });
2512
+ BsTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, imports: [[
2513
+ CommonModule
2514
+ ]] });
2515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, decorators: [{
2516
+ type: NgModule,
2517
+ args: [{
2518
+ declarations: [
2519
+ BsTooltipDirective,
2520
+ BsTooltipComponent
2521
+ ],
2522
+ imports: [
2523
+ CommonModule
2524
+ ],
2525
+ exports: [
2526
+ BsTooltipDirective
2527
+ ]
2528
+ }]
2529
+ }] });
2530
+
2531
+ class BsTypeaheadComponent {
2532
+ constructor() {
2533
+ this.isOpen = false;
2534
+ this.suggestions$ = new BehaviorSubject([]);
2535
+ this.isLoading$ = new BehaviorSubject(false);
2536
+ this.hostWidth$ = new BehaviorSubject(200);
2537
+ this.destroyed$ = new Subject();
2538
+ this.searchterm = '';
2539
+ this.isLoadingText = 'Loading...';
2540
+ this.noSuggestionsText = 'No suggestions found';
2541
+ this.provideSuggestions = new EventEmitter();
2542
+ this.suggestionSelected = new EventEmitter();
2543
+ this.searchtermChange = new EventEmitter();
2544
+ this.submitted = new EventEmitter();
2545
+ this.showNoSuggestions$ = this.suggestions$
2546
+ .pipe(map(suggestions => suggestions.length === 0));
2547
+ }
2548
+ ngAfterViewInit() {
2549
+ this.onResize();
2550
+ }
2551
+ onProvideSuggestions(value) {
2552
+ this.searchtermChange.emit(value);
2553
+ if (value === '') {
2554
+ this.isOpen = false;
2555
+ this.suggestions$.next([]);
1617
2556
  }
1618
2557
  else {
1619
- this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
2558
+ this.isLoading$.next(true);
2559
+ this.isOpen = true;
2560
+ this.provideSuggestions.emit(value);
1620
2561
  }
1621
2562
  }
1622
- ngOnInit() {
2563
+ set suggestions(value) {
2564
+ this.isLoading$.next(false);
2565
+ this.suggestions$.next(value);
2566
+ }
2567
+ suggestionClicked(suggestion) {
2568
+ this.searchterm = suggestion.text;
2569
+ this.searchtermChange.emit(this.searchterm);
2570
+ this.isOpen = false;
2571
+ this.suggestionSelected.emit(suggestion);
2572
+ }
2573
+ onSubmit() {
2574
+ this.isOpen = false;
2575
+ this.submitted.emit(this.searchterm);
2576
+ }
2577
+ focus() {
2578
+ this.textbox.nativeElement.focus();
2579
+ }
2580
+ onResize() {
2581
+ this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
1623
2582
  }
1624
2583
  }
1625
- BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1626
- BsMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsMultiselectComponent, selector: "bs-multiselect", inputs: { items: "items", selectedItems: "selectedItems" }, ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white p-3 border shadow\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [""], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "closeOnClickOutside"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1627
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
2584
+ BsTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2585
+ 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 } });
2586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
1628
2587
  type: Component,
1629
- args: [{ selector: 'bs-multiselect', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white p-3 border shadow\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [""] }]
1630
- }], ctorParameters: function () { return []; }, propDecorators: { items: [{
2588
+ 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"] }]
2589
+ }], ctorParameters: function () { return []; }, propDecorators: { textbox: [{
2590
+ type: ViewChild,
2591
+ args: ['textbox']
2592
+ }], searchterm: [{
1631
2593
  type: Input
1632
- }], selectedItems: [{
2594
+ }], isLoadingText: [{
2595
+ type: Input
2596
+ }], noSuggestionsText: [{
2597
+ type: Input
2598
+ }], provideSuggestions: [{
2599
+ type: Output
2600
+ }], suggestionSelected: [{
2601
+ type: Output
2602
+ }], searchtermChange: [{
2603
+ type: Output
2604
+ }], submitted: [{
2605
+ type: Output
2606
+ }], suggestions: [{
1633
2607
  type: Input
2608
+ }], onResize: [{
2609
+ type: HostListener,
2610
+ args: ['window:resize']
1634
2611
  }] } });
1635
2612
 
1636
- class BsMultiselectModule {
2613
+ class BsTypeaheadModule {
1637
2614
  }
1638
- BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1639
- BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
1640
- BsDropdownModule], exports: [BsMultiselectComponent] });
1641
- BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
2615
+ BsTypeaheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2616
+ BsTypeaheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, declarations: [BsTypeaheadComponent], imports: [CommonModule,
2617
+ FormsModule,
2618
+ BsDropdownModule,
2619
+ BsProgressBarModule], exports: [BsTypeaheadComponent] });
2620
+ BsTypeaheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, imports: [[
1642
2621
  CommonModule,
1643
- BsDropdownModule
2622
+ FormsModule,
2623
+ BsDropdownModule,
2624
+ BsProgressBarModule
1644
2625
  ]] });
1645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
2626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, decorators: [{
1646
2627
  type: NgModule,
1647
2628
  args: [{
1648
2629
  declarations: [
1649
- BsMultiselectComponent
2630
+ BsTypeaheadComponent
1650
2631
  ],
1651
2632
  imports: [
1652
2633
  CommonModule,
1653
- BsDropdownModule
2634
+ FormsModule,
2635
+ BsDropdownModule,
2636
+ BsProgressBarModule
1654
2637
  ],
1655
2638
  exports: [
1656
- BsMultiselectComponent
2639
+ BsTypeaheadComponent
2640
+ ]
2641
+ }]
2642
+ }] });
2643
+
2644
+ class BsFontColorPipe {
2645
+ transform(color_hex) {
2646
+ if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {
2647
+ return '#FFFFFF';
2648
+ }
2649
+ const R_HEX = color_hex.substr(1, 2);
2650
+ const G_HEX = color_hex.substr(3, 2);
2651
+ const B_HEX = color_hex.substr(5, 2);
2652
+ const R_DEC = parseInt(R_HEX, 16);
2653
+ const G_DEC = parseInt(G_HEX, 16);
2654
+ const B_DEC = parseInt(B_HEX, 16);
2655
+ const CONTRAST_HEX = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';
2656
+ return CONTRAST_HEX;
2657
+ }
2658
+ }
2659
+ BsFontColorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2660
+ BsFontColorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, name: "bsFontColor" });
2661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, decorators: [{
2662
+ type: Pipe,
2663
+ args: [{
2664
+ name: 'bsFontColor'
2665
+ }]
2666
+ }] });
2667
+
2668
+ class BsFontColorPipeModule {
2669
+ }
2670
+ BsFontColorPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2671
+ BsFontColorPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, declarations: [BsFontColorPipe], imports: [CommonModule], exports: [BsFontColorPipe] });
2672
+ BsFontColorPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, imports: [[
2673
+ CommonModule
2674
+ ]] });
2675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, decorators: [{
2676
+ type: NgModule,
2677
+ args: [{
2678
+ declarations: [
2679
+ BsFontColorPipe
2680
+ ],
2681
+ imports: [
2682
+ CommonModule
2683
+ ],
2684
+ exports: [
2685
+ BsFontColorPipe
1657
2686
  ]
1658
2687
  }]
1659
2688
  }] });
@@ -1662,5 +2691,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1662
2691
  * Generated bundle index. Do not edit.
1663
2692
  */
1664
2693
 
1665
- export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective };
2694
+ 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, BsFontColorPipe, BsFontColorPipeModule, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
1666
2695
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map