@mintplayer/ng-bootstrap 14.5.0 → 14.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/esm2020/lib/components/accordion/accordion/accordion.component.mjs +7 -4
  2. package/esm2020/lib/components/accordion/accordion-tab/accordion-tab.component.mjs +16 -5
  3. package/esm2020/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.mjs +6 -9
  4. package/esm2020/lib/components/accordion/accordion.module.mjs +5 -15
  5. package/esm2020/lib/components/accordion/index.mjs +1 -3
  6. package/esm2020/lib/components/modal/components/modal-host/modal-host.component.mjs +13 -3
  7. package/esm2020/lib/components/offcanvas/components/offcanvas-host/offcanvas-host.component.mjs +13 -4
  8. package/esm2020/lib/components/offcanvas/index.mjs +1 -3
  9. package/fesm2015/mintplayer-ng-bootstrap.mjs +53 -127
  10. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  11. package/fesm2020/mintplayer-ng-bootstrap.mjs +53 -127
  12. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  13. package/lib/components/accordion/accordion/accordion.component.d.ts +2 -1
  14. package/lib/components/accordion/accordion-tab/accordion-tab.component.d.ts +3 -1
  15. package/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.d.ts +2 -4
  16. package/lib/components/accordion/accordion.module.d.ts +2 -4
  17. package/lib/components/accordion/index.d.ts +0 -2
  18. package/lib/components/modal/components/modal-host/modal-host.component.d.ts +7 -3
  19. package/lib/components/offcanvas/components/offcanvas-host/offcanvas-host.component.d.ts +2 -1
  20. package/lib/components/offcanvas/index.d.ts +0 -1
  21. package/package.json +1 -1
  22. package/esm2020/lib/components/accordion/from-overlay/from-overlay.directive.mjs +0 -62
  23. package/esm2020/lib/components/accordion/from-overlay-id/from-overlay-id.directive.mjs +0 -46
  24. package/esm2020/lib/components/offcanvas/interfaces/index.mjs +0 -2
  25. package/esm2020/lib/components/offcanvas/interfaces/offcanvas-animation-meta.mjs +0 -2
  26. package/lib/components/accordion/from-overlay/from-overlay.directive.d.ts +0 -21
  27. package/lib/components/accordion/from-overlay-id/from-overlay-id.directive.d.ts +0 -17
  28. package/lib/components/offcanvas/interfaces/index.d.ts +0 -1
  29. package/lib/components/offcanvas/interfaces/offcanvas-animation-meta.d.ts +0 -7
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ContentChildren, forwardRef, Output, Input, Directive, ElementRef, NgModule, Injectable, Pipe, HostBinding, InjectionToken, Inject, HostListener, Injector, ViewChild, Host, SkipSelf, PLATFORM_ID, ContentChild, ViewChildren, Optional, TemplateRef } from '@angular/core';
2
+ import { EventEmitter, Component, ContentChildren, forwardRef, HostBinding, Output, Input, NgModule, Injectable, Pipe, Directive, InjectionToken, Inject, HostListener, Injector, ViewChild, ElementRef, Host, SkipSelf, PLATFORM_ID, ContentChild, ViewChildren, Optional, TemplateRef } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, isPlatformServer } from '@angular/common';
5
5
  import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, EnterFromTopAnimation } from '@mintplayer/ng-animations';
6
- import { Subject, takeUntil, BehaviorSubject, combineLatest, filter, map, take, Observable, debounceTime, delayWhen, of, interval } from 'rxjs';
6
+ import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest, debounceTime, delayWhen, of, interval } from 'rxjs';
7
7
  import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
8
8
  import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
9
9
  import * as i1$1 from '@angular/cdk/overlay';
@@ -20,7 +20,9 @@ import { FormsModule } from '@angular/forms';
20
20
 
21
21
  class BsAccordionTabComponent {
22
22
  constructor(accordion) {
23
- this.tabOverlayIdentifier = null;
23
+ this.accordionItemClass = true;
24
+ this.dBlock = true;
25
+ this.noBorder = false;
24
26
  //#region IsActive
25
27
  this.isActiveChange = new EventEmitter();
26
28
  this._isActive = false;
@@ -51,13 +53,22 @@ class BsAccordionTabComponent {
51
53
  }
52
54
  }
53
55
  BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
54
- BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BsAccordionTabComponent, selector: "bs-accordion-tab", inputs: { isActive: "isActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "childAccordions", predicate: i0.forwardRef(function () { return BsAccordionComponent; }) }], ngImport: i0, template: "<div class=\"card\" [@.disabled]=\"accordion.disableAnimations\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"isActive\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [SlideUpDownAnimation] });
56
+ BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BsAccordionTabComponent, selector: "bs-accordion-tab", inputs: { isActive: "isActive" }, outputs: { isActiveChange: "isActiveChange" }, host: { properties: { "class.accordion-item": "this.accordionItemClass", "class.d-block": "this.dBlock", "class.border-0": "this.noBorder" } }, queries: [{ propertyName: "childAccordions", predicate: i0.forwardRef(function () { return BsAccordionComponent; }) }], ngImport: i0, template: "<div [class.border-0]=\"false\" [@.disabled]=\"accordion.disableAnimations\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"accordion-collapse collapse show overflow-hidden\" [@slideUpDown] *ngIf=\"isActive\">\n <div class=\"accordion-body p-0\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [SlideUpDownAnimation] });
55
57
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
56
58
  type: Component,
57
- args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"card\" [@.disabled]=\"accordion.disableAnimations\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"isActive\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
59
+ args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div [class.border-0]=\"false\" [@.disabled]=\"accordion.disableAnimations\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"accordion-collapse collapse show overflow-hidden\" [@slideUpDown] *ngIf=\"isActive\">\n <div class=\"accordion-body p-0\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
58
60
  }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; }, propDecorators: { childAccordions: [{
59
61
  type: ContentChildren,
60
62
  args: [forwardRef(() => BsAccordionComponent)]
63
+ }], accordionItemClass: [{
64
+ type: HostBinding,
65
+ args: ['class.accordion-item']
66
+ }], dBlock: [{
67
+ type: HostBinding,
68
+ args: ['class.d-block']
69
+ }], noBorder: [{
70
+ type: HostBinding,
71
+ args: ['class.border-0']
61
72
  }], isActiveChange: [{
62
73
  type: Output
63
74
  }], isActive: [{
@@ -67,142 +78,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
67
78
  class BsAccordionComponent {
68
79
  constructor() {
69
80
  this.disableAnimations = false;
81
+ this.highlightActiveTab = false;
70
82
  }
71
83
  }
72
84
  BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BsAccordionComponent, selector: "bs-accordion", queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
85
+ BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BsAccordionComponent, selector: "bs-accordion", inputs: { highlightActiveTab: "highlightActiveTab" }, queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<div class=\"accordion\">\n <ng-content></ng-content>\n</div>", styles: [""] });
74
86
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionComponent, decorators: [{
75
87
  type: Component,
76
- args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>" }]
88
+ args: [{ selector: 'bs-accordion', template: "<div class=\"accordion\">\n <ng-content></ng-content>\n</div>" }]
77
89
  }], propDecorators: { tabPages: [{
78
90
  type: ContentChildren,
79
91
  args: [BsAccordionTabComponent]
92
+ }], highlightActiveTab: [{
93
+ type: Input
80
94
  }] } });
81
95
 
82
96
  class BsAccordionTabHeaderComponent {
83
- constructor(accordionTab, accordion) {
97
+ constructor(accordionTab) {
84
98
  this.accordionTab = accordionTab;
85
- this.accordion = accordion;
86
99
  }
87
100
  headerClicked(event) {
88
101
  event.preventDefault();
89
102
  this.accordionTab.isActive = !this.accordionTab.isActive;
90
103
  }
91
104
  }
92
- BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
93
- BsAccordionTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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: [""] });
105
+ BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }], target: i0.ɵɵFactoryTarget.Component });
106
+ BsAccordionTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BsAccordionTabHeaderComponent, selector: "bs-accordion-tab-header", ngImport: i0, template: "<h2 class=\"accordion-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <button class=\"accordion-button\" [class.bg-none]=\"!accordionTab.accordion.highlightActiveTab\" [class.collapsed]=\"!accordionTab.isActive\" type=\"button\">\n <ng-content></ng-content>\n </button>\n</h2>", styles: [".bg-none{background:none}\n"] });
94
107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
95
108
  type: Component,
96
- args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <ng-content></ng-content>\n</div>" }]
97
- }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
98
-
99
- class BsFromOverlayIdDirective {
100
- constructor(accordionTab, bsFromOverlay) {
101
- this.accordionTab = accordionTab;
102
- this.bsFromOverlay = bsFromOverlay;
103
- this.destroyed$ = new Subject();
104
- this.accordionTab.isActiveChange
105
- .pipe(takeUntil(this.destroyed$))
106
- .subscribe((isActive) => {
107
- if (isActive) {
108
- bsFromOverlay.bsFromOverlay = this.bsFromOverlayId;
109
- }
110
- else {
111
- bsFromOverlay.bsFromOverlay = null;
112
- }
113
- });
114
- }
115
- ngOnDestroy() {
116
- this.destroyed$.next(true);
117
- }
118
- /** String value containing the accordion tab identifier. */
119
- get bsFromOverlayId() {
120
- return this._bsFromOverlayId;
121
- }
122
- set bsFromOverlayId(value) {
123
- this._bsFromOverlayId = value;
124
- this.accordionTab['tabOverlayIdentifier'] = value;
125
- }
126
- }
127
- BsFromOverlayIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayIdDirective, deps: [{ token: BsAccordionTabComponent }, { token: BsFromOverlayDirective }], target: i0.ɵɵFactoryTarget.Directive });
128
- BsFromOverlayIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: BsFromOverlayIdDirective, selector: "bs-accordion-tab[bsFromOverlayId]", inputs: { bsFromOverlayId: "bsFromOverlayId" }, ngImport: i0 });
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayIdDirective, decorators: [{
130
- type: Directive,
131
- args: [{
132
- selector: 'bs-accordion-tab[bsFromOverlayId]'
133
- }]
134
- }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsFromOverlayDirective }]; }, propDecorators: { bsFromOverlayId: [{
135
- type: Input
136
- }] } });
137
-
138
- class BsFromOverlayDirective {
139
- constructor(accordion) {
140
- this.accordion = accordion;
141
- this.inited$ = new BehaviorSubject(false);
142
- this.destroyed$ = new Subject();
143
- this.activeOverlayIdentifier$ = new BehaviorSubject(null);
144
- this.bsFromOverlayChange = new EventEmitter();
145
- this._bsFromOverlay = null;
146
- this.accordion.disableAnimations = true;
147
- combineLatest([this.inited$, this.activeOverlayIdentifier$])
148
- .pipe(filter(([inited, activeOverlayIdentifier]) => {
149
- return inited;
150
- }))
151
- // .pipe(debounceTime(5))
152
- .pipe(takeUntil(this.destroyed$))
153
- .subscribe(([inited, activeOverlayIdentifier]) => {
154
- this.bsFromOverlayChange.emit(activeOverlayIdentifier);
155
- this.accordion.tabPages.forEach((tab) => {
156
- tab.isActive = (tab["tabOverlayIdentifier"] == activeOverlayIdentifier);
157
- });
158
- setTimeout(() => this.accordion.disableAnimations = false, 30);
159
- });
160
- }
161
- /** Binds the active tab of an accordion to a field, in case the accordion is rendered in an overlay. */
162
- get bsFromOverlay() {
163
- return this._bsFromOverlay;
164
- }
165
- set bsFromOverlay(value) {
166
- if (this._bsFromOverlay != value) {
167
- this._bsFromOverlay = value;
168
- this.activeOverlayIdentifier$.next(value);
169
- }
170
- }
171
- ngAfterContentInit() {
172
- this.inited$.next(true);
173
- }
174
- ngOnDestroy() {
175
- this.destroyed$.next(true);
176
- }
177
- }
178
- BsFromOverlayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayDirective, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Directive });
179
- BsFromOverlayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: BsFromOverlayDirective, selector: "bs-accordion[bsFromOverlay]", inputs: { bsFromOverlay: "bsFromOverlay" }, outputs: { bsFromOverlayChange: "bsFromOverlayChange" }, queries: [{ propertyName: "tabPages", predicate: BsFromOverlayIdDirective, read: ElementRef }], ngImport: i0 });
180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayDirective, decorators: [{
181
- type: Directive,
182
- args: [{
183
- selector: 'bs-accordion[bsFromOverlay]'
184
- }]
185
- }], ctorParameters: function () { return [{ type: BsAccordionComponent }]; }, propDecorators: { bsFromOverlayChange: [{
186
- type: Output
187
- }], bsFromOverlay: [{
188
- type: Input
189
- }], tabPages: [{
190
- type: ContentChildren,
191
- args: [BsFromOverlayIdDirective, { read: ElementRef }]
192
- }] } });
109
+ args: [{ selector: 'bs-accordion-tab-header', template: "<h2 class=\"accordion-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <button class=\"accordion-button\" [class.bg-none]=\"!accordionTab.accordion.highlightActiveTab\" [class.collapsed]=\"!accordionTab.isActive\" type=\"button\">\n <ng-content></ng-content>\n </button>\n</h2>", styles: [".bg-none{background:none}\n"] }]
110
+ }], ctorParameters: function () { return [{ type: BsAccordionTabComponent }]; } });
193
111
 
194
112
  class BsAccordionModule {
195
113
  }
196
114
  BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
197
115
  BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
198
116
  BsAccordionTabComponent,
199
- BsAccordionTabHeaderComponent,
200
- BsFromOverlayDirective,
201
- BsFromOverlayIdDirective], imports: [CommonModule], exports: [BsAccordionComponent,
117
+ BsAccordionTabHeaderComponent], imports: [CommonModule], exports: [BsAccordionComponent,
202
118
  BsAccordionTabComponent,
203
- BsAccordionTabHeaderComponent,
204
- BsFromOverlayDirective,
205
- BsFromOverlayIdDirective] });
119
+ BsAccordionTabHeaderComponent] });
206
120
  BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, imports: [CommonModule] });
207
121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, decorators: [{
208
122
  type: NgModule,
@@ -210,9 +124,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
210
124
  declarations: [
211
125
  BsAccordionComponent,
212
126
  BsAccordionTabComponent,
213
- BsAccordionTabHeaderComponent,
214
- BsFromOverlayDirective,
215
- BsFromOverlayIdDirective
127
+ BsAccordionTabHeaderComponent
216
128
  ],
217
129
  imports: [
218
130
  CommonModule
@@ -220,9 +132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
220
132
  exports: [
221
133
  BsAccordionComponent,
222
134
  BsAccordionTabComponent,
223
- BsAccordionTabHeaderComponent,
224
- BsFromOverlayDirective,
225
- BsFromOverlayIdDirective
135
+ BsAccordionTabHeaderComponent
226
136
  ]
227
137
  }]
228
138
  }] });
@@ -3003,11 +2913,17 @@ class BsModalHostComponent {
3003
2913
  this.parentInjector = parentInjector;
3004
2914
  this.portalFactory = portalFactory;
3005
2915
  this.componentFactoryResolver = componentFactoryResolver;
2916
+ this.destroyed$ = new Subject();
3006
2917
  //#region isOpen
3007
2918
  this._isOpen = false;
3008
2919
  this.isOpenChange = new EventEmitter();
3009
2920
  //#endregion
3010
2921
  this.closeOnEscape = true;
2922
+ this.destroyed$.pipe(take(1))
2923
+ .subscribe(() => {
2924
+ this.isOpen = false;
2925
+ setTimeout(() => this.overlayRef && this.overlayRef.dispose(), 500);
2926
+ });
3011
2927
  }
3012
2928
  get isOpen() {
3013
2929
  return this._isOpen;
@@ -3028,16 +2944,19 @@ class BsModalHostComponent {
3028
2944
  });
3029
2945
  // const portal = new ComponentPortal(BsModalComponent, null, injector, this.componentFactoryResolver);
3030
2946
  const portal = this.portalFactory(injector);
3031
- const overlayRef = this.overlay.create({
2947
+ this.overlayRef = this.overlay.create({
3032
2948
  scrollStrategy: this.overlay.scrollStrategies.reposition(),
3033
2949
  positionStrategy: this.overlay.position()
3034
2950
  .global().centerHorizontally().bottom('0').top('0').left('0').right('0'),
3035
2951
  width: '100%',
3036
2952
  hasBackdrop: false
3037
2953
  });
3038
- this.componentInstance = overlayRef.attach(portal);
2954
+ this.componentInstance = this.overlayRef.attach(portal);
3039
2955
  this.componentInstance.instance.isOpen = this._isOpen;
3040
2956
  }
2957
+ ngOnDestroy() {
2958
+ this.destroyed$.next(true);
2959
+ }
3041
2960
  onKeyDown(ev) {
3042
2961
  if (this.isOpen && this.closeOnEscape && ev.code === 'Escape') {
3043
2962
  this.isOpen = false;
@@ -3913,6 +3832,11 @@ class BsOffcanvasHostComponent {
3913
3832
  this.component.instance.hasBackdrop$.next(hasBackdrop);
3914
3833
  }
3915
3834
  });
3835
+ this.destroyed$.pipe(take(1))
3836
+ .subscribe(() => {
3837
+ this.state = 'closed';
3838
+ setTimeout(() => this.overlayRef && this.overlayRef.dispose(), 3000);
3839
+ });
3916
3840
  }
3917
3841
  ngAfterViewInit() {
3918
3842
  const injector = Injector.create({
@@ -3923,13 +3847,13 @@ class BsOffcanvasHostComponent {
3923
3847
  });
3924
3848
  // const portal = new ComponentPortal(BsOffcanvasComponent, null, injector);
3925
3849
  const portal = this.portalFactory(injector);
3926
- const overlayRef = this.overlayService.create({
3850
+ this.overlayRef = this.overlayService.create({
3927
3851
  scrollStrategy: this.overlayService.scrollStrategies.block(),
3928
3852
  positionStrategy: this.overlayService.position().global()
3929
3853
  .top('0').left('0').bottom('0').right('0'),
3930
3854
  hasBackdrop: false
3931
3855
  });
3932
- this.component = overlayRef.attach(portal);
3856
+ this.component = this.overlayRef.attach(portal);
3933
3857
  this.component.instance.backdropClick
3934
3858
  .pipe(takeUntil(this.destroyed$))
3935
3859
  .subscribe((ev) => {
@@ -3942,6 +3866,10 @@ class BsOffcanvasHostComponent {
3942
3866
  }
3943
3867
  set state(value) {
3944
3868
  this.state$.next(value);
3869
+ if (this.component) {
3870
+ this.component.instance.state = value;
3871
+ }
3872
+ this.stateChange.emit(value);
3945
3873
  }
3946
3874
  get state() {
3947
3875
  return this.state$.value;
@@ -4111,8 +4039,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
4111
4039
  }]
4112
4040
  }] });
4113
4041
 
4114
- // export * from './services';
4115
-
4116
4042
  class BsRatingComponent {
4117
4043
  constructor() {
4118
4044
  this.destroyed$ = new Subject();
@@ -5176,5 +5102,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
5176
5102
  * Generated bundle index. Do not edit.
5177
5103
  */
5178
5104
 
5179
- export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsButtonTemplateDirective, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsCodeSnippetComponent, BsCodeSnippetModule, BsContextMenuDirective, BsContextMenuModule, BsCopyDirective, BsCopyModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsExpandButtonDirective, BsFileUploadComponent, BsFileUploadModule, BsFileUploadTemplateDirective, BsFontColorPipe, BsFontColorPipeModule, BsFooterTemplateDirective, BsForDirective, BsForModule, BsFormatBytesModule, BsFormatBytesPipe, BsFromOverlayDirective, BsFromOverlayIdDirective, BsHeaderTemplateDirective, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsModalBodyDirective, BsModalCloseDirective, BsModalComponent, BsModalDirective, BsModalFooterDirective, BsModalHeaderDirective, BsModalHostComponent, BsModalModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarBrandComponent, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsNavbarTogglerComponent, BsOffcanvasCloseDirective, BsOffcanvasComponent, BsOffcanvasContentDirective, BsOffcanvasHostComponent, BsOffcanvasModule, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRatingComponent, BsRatingModule, BsRowTemplateDirective, BsSchedulerComponent, BsSchedulerModule, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsTimepickerComponent, BsTimepickerModule, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, ESchedulerMode, EnhancedPasteDirective, NavLinkDirective, NavbarContentDirective, OffcanvasBodyComponent, OffcanvasHeaderComponent, Position, ResourceGroupPresenterComponent, availableScales };
5105
+ export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsButtonTemplateDirective, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsCodeSnippetComponent, BsCodeSnippetModule, BsContextMenuDirective, BsContextMenuModule, BsCopyDirective, BsCopyModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsExpandButtonDirective, BsFileUploadComponent, BsFileUploadModule, BsFileUploadTemplateDirective, BsFontColorPipe, BsFontColorPipeModule, BsFooterTemplateDirective, BsForDirective, BsForModule, BsFormatBytesModule, BsFormatBytesPipe, BsHeaderTemplateDirective, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsModalBodyDirective, BsModalCloseDirective, BsModalComponent, BsModalDirective, BsModalFooterDirective, BsModalHeaderDirective, BsModalHostComponent, BsModalModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarBrandComponent, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsNavbarTogglerComponent, BsOffcanvasCloseDirective, BsOffcanvasComponent, BsOffcanvasContentDirective, BsOffcanvasHostComponent, BsOffcanvasModule, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRatingComponent, BsRatingModule, BsRowTemplateDirective, BsSchedulerComponent, BsSchedulerModule, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsTimepickerComponent, BsTimepickerModule, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, ESchedulerMode, EnhancedPasteDirective, NavLinkDirective, NavbarContentDirective, OffcanvasBodyComponent, OffcanvasHeaderComponent, Position, ResourceGroupPresenterComponent, availableScales };
5180
5106
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map