@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.
- package/esm2020/lib/components/accordion/accordion/accordion.component.mjs +7 -4
- package/esm2020/lib/components/accordion/accordion-tab/accordion-tab.component.mjs +16 -5
- package/esm2020/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.mjs +6 -9
- package/esm2020/lib/components/accordion/accordion.module.mjs +5 -15
- package/esm2020/lib/components/accordion/index.mjs +1 -3
- package/esm2020/lib/components/modal/components/modal-host/modal-host.component.mjs +13 -3
- package/esm2020/lib/components/offcanvas/components/offcanvas-host/offcanvas-host.component.mjs +13 -4
- package/esm2020/lib/components/offcanvas/index.mjs +1 -3
- package/fesm2015/mintplayer-ng-bootstrap.mjs +53 -127
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +53 -127
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/accordion/accordion/accordion.component.d.ts +2 -1
- package/lib/components/accordion/accordion-tab/accordion-tab.component.d.ts +3 -1
- package/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.d.ts +2 -4
- package/lib/components/accordion/accordion.module.d.ts +2 -4
- package/lib/components/accordion/index.d.ts +0 -2
- package/lib/components/modal/components/modal-host/modal-host.component.d.ts +7 -3
- package/lib/components/offcanvas/components/offcanvas-host/offcanvas-host.component.d.ts +2 -1
- package/lib/components/offcanvas/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2020/lib/components/accordion/from-overlay/from-overlay.directive.mjs +0 -62
- package/esm2020/lib/components/accordion/from-overlay-id/from-overlay-id.directive.mjs +0 -46
- package/esm2020/lib/components/offcanvas/interfaces/index.mjs +0 -2
- package/esm2020/lib/components/offcanvas/interfaces/offcanvas-animation-meta.mjs +0 -2
- package/lib/components/accordion/from-overlay/from-overlay.directive.d.ts +0 -21
- package/lib/components/accordion/from-overlay-id/from-overlay-id.directive.d.ts +0 -17
- package/lib/components/offcanvas/interfaces/index.d.ts +0 -1
- 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,
|
|
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,
|
|
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 * as i1$1 from '@angular/cdk/overlay';
|
|
9
9
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
@@ -21,7 +21,9 @@ import { FormsModule } from '@angular/forms';
|
|
|
21
21
|
|
|
22
22
|
class BsAccordionTabComponent {
|
|
23
23
|
constructor(accordion) {
|
|
24
|
-
this.
|
|
24
|
+
this.accordionItemClass = true;
|
|
25
|
+
this.dBlock = true;
|
|
26
|
+
this.noBorder = false;
|
|
25
27
|
//#region IsActive
|
|
26
28
|
this.isActiveChange = new EventEmitter();
|
|
27
29
|
this._isActive = false;
|
|
@@ -52,13 +54,22 @@ class BsAccordionTabComponent {
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
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=\"
|
|
57
|
+
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] });
|
|
56
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
|
|
57
59
|
type: Component,
|
|
58
|
-
args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"
|
|
60
|
+
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"] }]
|
|
59
61
|
}], ctorParameters: function () { return [{ type: BsAccordionComponent }]; }, propDecorators: { childAccordions: [{
|
|
60
62
|
type: ContentChildren,
|
|
61
63
|
args: [forwardRef(() => BsAccordionComponent)]
|
|
64
|
+
}], accordionItemClass: [{
|
|
65
|
+
type: HostBinding,
|
|
66
|
+
args: ['class.accordion-item']
|
|
67
|
+
}], dBlock: [{
|
|
68
|
+
type: HostBinding,
|
|
69
|
+
args: ['class.d-block']
|
|
70
|
+
}], noBorder: [{
|
|
71
|
+
type: HostBinding,
|
|
72
|
+
args: ['class.border-0']
|
|
62
73
|
}], isActiveChange: [{
|
|
63
74
|
type: Output
|
|
64
75
|
}], isActive: [{
|
|
@@ -68,142 +79,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
68
79
|
class BsAccordionComponent {
|
|
69
80
|
constructor() {
|
|
70
81
|
this.disableAnimations = false;
|
|
82
|
+
this.highlightActiveTab = false;
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
-
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: [""] });
|
|
86
|
+
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: [""] });
|
|
75
87
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionComponent, decorators: [{
|
|
76
88
|
type: Component,
|
|
77
|
-
args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>" }]
|
|
89
|
+
args: [{ selector: 'bs-accordion', template: "<div class=\"accordion\">\n <ng-content></ng-content>\n</div>" }]
|
|
78
90
|
}], propDecorators: { tabPages: [{
|
|
79
91
|
type: ContentChildren,
|
|
80
92
|
args: [BsAccordionTabComponent]
|
|
93
|
+
}], highlightActiveTab: [{
|
|
94
|
+
type: Input
|
|
81
95
|
}] } });
|
|
82
96
|
|
|
83
97
|
class BsAccordionTabHeaderComponent {
|
|
84
|
-
constructor(accordionTab
|
|
98
|
+
constructor(accordionTab) {
|
|
85
99
|
this.accordionTab = accordionTab;
|
|
86
|
-
this.accordion = accordion;
|
|
87
100
|
}
|
|
88
101
|
headerClicked(event) {
|
|
89
102
|
event.preventDefault();
|
|
90
103
|
this.accordionTab.isActive = !this.accordionTab.isActive;
|
|
91
104
|
}
|
|
92
105
|
}
|
|
93
|
-
BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }
|
|
94
|
-
BsAccordionTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BsAccordionTabHeaderComponent, selector: "bs-accordion-tab-header", ngImport: i0, template: "<
|
|
106
|
+
BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
107
|
+
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"] });
|
|
95
108
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
|
|
96
109
|
type: Component,
|
|
97
|
-
args: [{ selector: 'bs-accordion-tab-header', template: "<
|
|
98
|
-
}], ctorParameters: function () { return [{ type: BsAccordionTabComponent }
|
|
99
|
-
|
|
100
|
-
class BsFromOverlayIdDirective {
|
|
101
|
-
constructor(accordionTab, bsFromOverlay) {
|
|
102
|
-
this.accordionTab = accordionTab;
|
|
103
|
-
this.bsFromOverlay = bsFromOverlay;
|
|
104
|
-
this.destroyed$ = new Subject();
|
|
105
|
-
this.accordionTab.isActiveChange
|
|
106
|
-
.pipe(takeUntil(this.destroyed$))
|
|
107
|
-
.subscribe((isActive) => {
|
|
108
|
-
if (isActive) {
|
|
109
|
-
bsFromOverlay.bsFromOverlay = this.bsFromOverlayId;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
bsFromOverlay.bsFromOverlay = null;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
ngOnDestroy() {
|
|
117
|
-
this.destroyed$.next(true);
|
|
118
|
-
}
|
|
119
|
-
/** String value containing the accordion tab identifier. */
|
|
120
|
-
get bsFromOverlayId() {
|
|
121
|
-
return this._bsFromOverlayId;
|
|
122
|
-
}
|
|
123
|
-
set bsFromOverlayId(value) {
|
|
124
|
-
this._bsFromOverlayId = value;
|
|
125
|
-
this.accordionTab['tabOverlayIdentifier'] = value;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
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 });
|
|
129
|
-
BsFromOverlayIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: BsFromOverlayIdDirective, selector: "bs-accordion-tab[bsFromOverlayId]", inputs: { bsFromOverlayId: "bsFromOverlayId" }, ngImport: i0 });
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayIdDirective, decorators: [{
|
|
131
|
-
type: Directive,
|
|
132
|
-
args: [{
|
|
133
|
-
selector: 'bs-accordion-tab[bsFromOverlayId]'
|
|
134
|
-
}]
|
|
135
|
-
}], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsFromOverlayDirective }]; }, propDecorators: { bsFromOverlayId: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}] } });
|
|
138
|
-
|
|
139
|
-
class BsFromOverlayDirective {
|
|
140
|
-
constructor(accordion) {
|
|
141
|
-
this.accordion = accordion;
|
|
142
|
-
this.inited$ = new BehaviorSubject(false);
|
|
143
|
-
this.destroyed$ = new Subject();
|
|
144
|
-
this.activeOverlayIdentifier$ = new BehaviorSubject(null);
|
|
145
|
-
this.bsFromOverlayChange = new EventEmitter();
|
|
146
|
-
this._bsFromOverlay = null;
|
|
147
|
-
this.accordion.disableAnimations = true;
|
|
148
|
-
combineLatest([this.inited$, this.activeOverlayIdentifier$])
|
|
149
|
-
.pipe(filter(([inited, activeOverlayIdentifier]) => {
|
|
150
|
-
return inited;
|
|
151
|
-
}))
|
|
152
|
-
// .pipe(debounceTime(5))
|
|
153
|
-
.pipe(takeUntil(this.destroyed$))
|
|
154
|
-
.subscribe(([inited, activeOverlayIdentifier]) => {
|
|
155
|
-
this.bsFromOverlayChange.emit(activeOverlayIdentifier);
|
|
156
|
-
this.accordion.tabPages.forEach((tab) => {
|
|
157
|
-
tab.isActive = (tab["tabOverlayIdentifier"] == activeOverlayIdentifier);
|
|
158
|
-
});
|
|
159
|
-
setTimeout(() => this.accordion.disableAnimations = false, 30);
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
/** Binds the active tab of an accordion to a field, in case the accordion is rendered in an overlay. */
|
|
163
|
-
get bsFromOverlay() {
|
|
164
|
-
return this._bsFromOverlay;
|
|
165
|
-
}
|
|
166
|
-
set bsFromOverlay(value) {
|
|
167
|
-
if (this._bsFromOverlay != value) {
|
|
168
|
-
this._bsFromOverlay = value;
|
|
169
|
-
this.activeOverlayIdentifier$.next(value);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
ngAfterContentInit() {
|
|
173
|
-
this.inited$.next(true);
|
|
174
|
-
}
|
|
175
|
-
ngOnDestroy() {
|
|
176
|
-
this.destroyed$.next(true);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
BsFromOverlayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayDirective, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
180
|
-
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 });
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsFromOverlayDirective, decorators: [{
|
|
182
|
-
type: Directive,
|
|
183
|
-
args: [{
|
|
184
|
-
selector: 'bs-accordion[bsFromOverlay]'
|
|
185
|
-
}]
|
|
186
|
-
}], ctorParameters: function () { return [{ type: BsAccordionComponent }]; }, propDecorators: { bsFromOverlayChange: [{
|
|
187
|
-
type: Output
|
|
188
|
-
}], bsFromOverlay: [{
|
|
189
|
-
type: Input
|
|
190
|
-
}], tabPages: [{
|
|
191
|
-
type: ContentChildren,
|
|
192
|
-
args: [BsFromOverlayIdDirective, { read: ElementRef }]
|
|
193
|
-
}] } });
|
|
110
|
+
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"] }]
|
|
111
|
+
}], ctorParameters: function () { return [{ type: BsAccordionTabComponent }]; } });
|
|
194
112
|
|
|
195
113
|
class BsAccordionModule {
|
|
196
114
|
}
|
|
197
115
|
BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
198
116
|
BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
|
|
199
117
|
BsAccordionTabComponent,
|
|
200
|
-
BsAccordionTabHeaderComponent,
|
|
201
|
-
BsFromOverlayDirective,
|
|
202
|
-
BsFromOverlayIdDirective], imports: [CommonModule], exports: [BsAccordionComponent,
|
|
118
|
+
BsAccordionTabHeaderComponent], imports: [CommonModule], exports: [BsAccordionComponent,
|
|
203
119
|
BsAccordionTabComponent,
|
|
204
|
-
BsAccordionTabHeaderComponent
|
|
205
|
-
BsFromOverlayDirective,
|
|
206
|
-
BsFromOverlayIdDirective] });
|
|
120
|
+
BsAccordionTabHeaderComponent] });
|
|
207
121
|
BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, imports: [CommonModule] });
|
|
208
122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BsAccordionModule, decorators: [{
|
|
209
123
|
type: NgModule,
|
|
@@ -211,9 +125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
211
125
|
declarations: [
|
|
212
126
|
BsAccordionComponent,
|
|
213
127
|
BsAccordionTabComponent,
|
|
214
|
-
BsAccordionTabHeaderComponent
|
|
215
|
-
BsFromOverlayDirective,
|
|
216
|
-
BsFromOverlayIdDirective
|
|
128
|
+
BsAccordionTabHeaderComponent
|
|
217
129
|
],
|
|
218
130
|
imports: [
|
|
219
131
|
CommonModule
|
|
@@ -221,9 +133,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
221
133
|
exports: [
|
|
222
134
|
BsAccordionComponent,
|
|
223
135
|
BsAccordionTabComponent,
|
|
224
|
-
BsAccordionTabHeaderComponent
|
|
225
|
-
BsFromOverlayDirective,
|
|
226
|
-
BsFromOverlayIdDirective
|
|
136
|
+
BsAccordionTabHeaderComponent
|
|
227
137
|
]
|
|
228
138
|
}]
|
|
229
139
|
}] });
|
|
@@ -2988,11 +2898,17 @@ class BsModalHostComponent {
|
|
|
2988
2898
|
this.parentInjector = parentInjector;
|
|
2989
2899
|
this.portalFactory = portalFactory;
|
|
2990
2900
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
2901
|
+
this.destroyed$ = new Subject();
|
|
2991
2902
|
//#region isOpen
|
|
2992
2903
|
this._isOpen = false;
|
|
2993
2904
|
this.isOpenChange = new EventEmitter();
|
|
2994
2905
|
//#endregion
|
|
2995
2906
|
this.closeOnEscape = true;
|
|
2907
|
+
this.destroyed$.pipe(take(1))
|
|
2908
|
+
.subscribe(() => {
|
|
2909
|
+
this.isOpen = false;
|
|
2910
|
+
setTimeout(() => this.overlayRef && this.overlayRef.dispose(), 500);
|
|
2911
|
+
});
|
|
2996
2912
|
}
|
|
2997
2913
|
get isOpen() {
|
|
2998
2914
|
return this._isOpen;
|
|
@@ -3013,16 +2929,19 @@ class BsModalHostComponent {
|
|
|
3013
2929
|
});
|
|
3014
2930
|
// const portal = new ComponentPortal(BsModalComponent, null, injector, this.componentFactoryResolver);
|
|
3015
2931
|
const portal = this.portalFactory(injector);
|
|
3016
|
-
|
|
2932
|
+
this.overlayRef = this.overlay.create({
|
|
3017
2933
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
3018
2934
|
positionStrategy: this.overlay.position()
|
|
3019
2935
|
.global().centerHorizontally().bottom('0').top('0').left('0').right('0'),
|
|
3020
2936
|
width: '100%',
|
|
3021
2937
|
hasBackdrop: false
|
|
3022
2938
|
});
|
|
3023
|
-
this.componentInstance = overlayRef.attach(portal);
|
|
2939
|
+
this.componentInstance = this.overlayRef.attach(portal);
|
|
3024
2940
|
this.componentInstance.instance.isOpen = this._isOpen;
|
|
3025
2941
|
}
|
|
2942
|
+
ngOnDestroy() {
|
|
2943
|
+
this.destroyed$.next(true);
|
|
2944
|
+
}
|
|
3026
2945
|
onKeyDown(ev) {
|
|
3027
2946
|
if (this.isOpen && this.closeOnEscape && ev.code === 'Escape') {
|
|
3028
2947
|
this.isOpen = false;
|
|
@@ -3883,6 +3802,11 @@ class BsOffcanvasHostComponent {
|
|
|
3883
3802
|
this.component.instance.hasBackdrop$.next(hasBackdrop);
|
|
3884
3803
|
}
|
|
3885
3804
|
});
|
|
3805
|
+
this.destroyed$.pipe(take(1))
|
|
3806
|
+
.subscribe(() => {
|
|
3807
|
+
this.state = 'closed';
|
|
3808
|
+
setTimeout(() => this.overlayRef && this.overlayRef.dispose(), 3000);
|
|
3809
|
+
});
|
|
3886
3810
|
}
|
|
3887
3811
|
ngAfterViewInit() {
|
|
3888
3812
|
const injector = Injector.create({
|
|
@@ -3893,13 +3817,13 @@ class BsOffcanvasHostComponent {
|
|
|
3893
3817
|
});
|
|
3894
3818
|
// const portal = new ComponentPortal(BsOffcanvasComponent, null, injector);
|
|
3895
3819
|
const portal = this.portalFactory(injector);
|
|
3896
|
-
|
|
3820
|
+
this.overlayRef = this.overlayService.create({
|
|
3897
3821
|
scrollStrategy: this.overlayService.scrollStrategies.block(),
|
|
3898
3822
|
positionStrategy: this.overlayService.position().global()
|
|
3899
3823
|
.top('0').left('0').bottom('0').right('0'),
|
|
3900
3824
|
hasBackdrop: false
|
|
3901
3825
|
});
|
|
3902
|
-
this.component = overlayRef.attach(portal);
|
|
3826
|
+
this.component = this.overlayRef.attach(portal);
|
|
3903
3827
|
this.component.instance.backdropClick
|
|
3904
3828
|
.pipe(takeUntil(this.destroyed$))
|
|
3905
3829
|
.subscribe((ev) => {
|
|
@@ -3912,6 +3836,10 @@ class BsOffcanvasHostComponent {
|
|
|
3912
3836
|
}
|
|
3913
3837
|
set state(value) {
|
|
3914
3838
|
this.state$.next(value);
|
|
3839
|
+
if (this.component) {
|
|
3840
|
+
this.component.instance.state = value;
|
|
3841
|
+
}
|
|
3842
|
+
this.stateChange.emit(value);
|
|
3915
3843
|
}
|
|
3916
3844
|
get state() {
|
|
3917
3845
|
return this.state$.value;
|
|
@@ -4079,8 +4007,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
4079
4007
|
}]
|
|
4080
4008
|
}] });
|
|
4081
4009
|
|
|
4082
|
-
// export * from './services';
|
|
4083
|
-
|
|
4084
4010
|
class BsRatingComponent {
|
|
4085
4011
|
constructor() {
|
|
4086
4012
|
this.destroyed$ = new Subject();
|
|
@@ -5135,5 +5061,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
5135
5061
|
* Generated bundle index. Do not edit.
|
|
5136
5062
|
*/
|
|
5137
5063
|
|
|
5138
|
-
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,
|
|
5064
|
+
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 };
|
|
5139
5065
|
//# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map
|