@mintplayer/ng-bootstrap 13.3.9 → 13.3.12
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 +3 -15
- package/esm2020/lib/components/accordion/accordion-tab/accordion-tab.component.mjs +36 -5
- package/esm2020/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.mjs +2 -7
- package/esm2020/lib/components/accordion/accordion.module.mjs +15 -5
- package/esm2020/lib/components/accordion/from-overlay/from-overlay.directive.mjs +61 -0
- package/esm2020/lib/components/accordion/from-overlay-id/from-overlay-id.directive.mjs +45 -0
- package/esm2020/lib/components/accordion/index.mjs +3 -1
- package/esm2020/lib/components/context-menu/context-menu.directive.mjs +24 -11
- package/esm2020/lib/components/modal/component/modal/modal.component.mjs +1 -1
- package/esm2020/lib/components/modal/component/modal-content/modal-content.component.mjs +17 -5
- package/esm2020/lib/components/modal/service/modal.service.mjs +3 -2
- package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +4 -12
- package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +5 -7
- package/fesm2015/mintplayer-ng-bootstrap.mjs +188 -56
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +190 -60
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/accordion/accordion/accordion.component.d.ts +3 -4
- package/lib/components/accordion/accordion-tab/accordion-tab.component.d.ts +7 -2
- package/lib/components/accordion/accordion.module.d.ts +4 -2
- package/lib/components/accordion/from-overlay/from-overlay.directive.d.ts +20 -0
- package/lib/components/accordion/from-overlay-id/from-overlay-id.directive.d.ts +16 -0
- package/lib/components/accordion/index.d.ts +2 -0
- package/lib/components/modal/component/modal-content/modal-content.component.d.ts +2 -0
- package/lib/components/modal/service/modal.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
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';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, isPlatformServer } from '@angular/common';
|
|
5
5
|
import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
|
|
6
|
-
import { Subject,
|
|
6
|
+
import { Subject, takeUntil, BehaviorSubject, combineLatest, filter, map, take, Observable, debounceTime } 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,34 +20,53 @@ import { FormsModule } from '@angular/forms';
|
|
|
20
20
|
|
|
21
21
|
class BsAccordionTabComponent {
|
|
22
22
|
constructor(accordion) {
|
|
23
|
+
this.tabOverlayIdentifier = null;
|
|
24
|
+
//#region IsActive
|
|
25
|
+
this.isActiveChange = new EventEmitter();
|
|
26
|
+
this._isActive = false;
|
|
23
27
|
this.accordion = accordion;
|
|
24
28
|
}
|
|
29
|
+
get isActive() {
|
|
30
|
+
return this._isActive;
|
|
31
|
+
}
|
|
32
|
+
set isActive(value) {
|
|
33
|
+
if (this._isActive !== value) {
|
|
34
|
+
this._isActive = value;
|
|
35
|
+
if (this._isActive) {
|
|
36
|
+
this.accordion.tabPages.filter((tab) => {
|
|
37
|
+
return tab !== this;
|
|
38
|
+
}).forEach((tab) => {
|
|
39
|
+
tab.isActive = false;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.childAccordions.forEach((accordion) => {
|
|
44
|
+
accordion.tabPages.forEach((tab) => {
|
|
45
|
+
tab.isActive = false;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
this.isActiveChange.emit(value);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
25
52
|
}
|
|
26
53
|
BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
-
BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BsAccordionTabComponent, selector: "bs-accordion-tab", queries: [{ propertyName: "childAccordions", predicate: (
|
|
54
|
+
BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", 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"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [SlideUpDownAnimation] });
|
|
28
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
|
|
29
56
|
type: Component,
|
|
30
|
-
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=\"
|
|
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"] }]
|
|
31
58
|
}], ctorParameters: function () { return [{ type: BsAccordionComponent }]; }, propDecorators: { childAccordions: [{
|
|
32
59
|
type: ContentChildren,
|
|
33
|
-
args: [
|
|
60
|
+
args: [forwardRef(() => BsAccordionComponent)]
|
|
61
|
+
}], isActiveChange: [{
|
|
62
|
+
type: Output
|
|
63
|
+
}], isActive: [{
|
|
64
|
+
type: Input
|
|
34
65
|
}] } });
|
|
35
66
|
|
|
36
67
|
class BsAccordionComponent {
|
|
37
68
|
constructor() {
|
|
38
|
-
|
|
39
|
-
this._activeTab = null;
|
|
40
|
-
}
|
|
41
|
-
get activeTab() {
|
|
42
|
-
return this._activeTab;
|
|
43
|
-
}
|
|
44
|
-
set activeTab(value) {
|
|
45
|
-
this._activeTab = value;
|
|
46
|
-
// this.tabPages.filter((tab) => tab !== value).forEach((tab) => {
|
|
47
|
-
// tab.childAccordions.forEach((acc) => {
|
|
48
|
-
// acc.activeTab = null;
|
|
49
|
-
// });
|
|
50
|
-
// });
|
|
69
|
+
this.disableAnimations = false;
|
|
51
70
|
}
|
|
52
71
|
}
|
|
53
72
|
BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -67,12 +86,7 @@ class BsAccordionTabHeaderComponent {
|
|
|
67
86
|
}
|
|
68
87
|
headerClicked(event) {
|
|
69
88
|
event.preventDefault();
|
|
70
|
-
|
|
71
|
-
this.accordion.activeTab = null;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
this.accordion.activeTab = this.accordionTab;
|
|
75
|
-
}
|
|
89
|
+
this.accordionTab.isActive = !this.accordionTab.isActive;
|
|
76
90
|
}
|
|
77
91
|
}
|
|
78
92
|
BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -82,14 +96,111 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
82
96
|
args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
|
|
83
97
|
}], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
|
|
84
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
|
+
get bsFromOverlayId() {
|
|
119
|
+
return this._bsFromOverlayId;
|
|
120
|
+
}
|
|
121
|
+
set bsFromOverlayId(value) {
|
|
122
|
+
this._bsFromOverlayId = value;
|
|
123
|
+
this.accordionTab['tabOverlayIdentifier'] = value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
BsFromOverlayIdDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsFromOverlayIdDirective, deps: [{ token: BsAccordionTabComponent }, { token: BsFromOverlayDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
|
+
BsFromOverlayIdDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: BsFromOverlayIdDirective, selector: "bs-accordion-tab[bsFromOverlayId]", inputs: { bsFromOverlayId: "bsFromOverlayId" }, ngImport: i0 });
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsFromOverlayIdDirective, decorators: [{
|
|
129
|
+
type: Directive,
|
|
130
|
+
args: [{
|
|
131
|
+
selector: 'bs-accordion-tab[bsFromOverlayId]'
|
|
132
|
+
}]
|
|
133
|
+
}], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsFromOverlayDirective }]; }, propDecorators: { bsFromOverlayId: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}] } });
|
|
136
|
+
|
|
137
|
+
class BsFromOverlayDirective {
|
|
138
|
+
constructor(accordion) {
|
|
139
|
+
this.accordion = accordion;
|
|
140
|
+
this.inited$ = new BehaviorSubject(false);
|
|
141
|
+
this.destroyed$ = new Subject();
|
|
142
|
+
this.activeOverlayIdentifier$ = new BehaviorSubject(null);
|
|
143
|
+
this.bsFromOverlayChange = new EventEmitter();
|
|
144
|
+
this._bsFromOverlay = null;
|
|
145
|
+
this.accordion.disableAnimations = true;
|
|
146
|
+
combineLatest([this.inited$, this.activeOverlayIdentifier$])
|
|
147
|
+
.pipe(filter(([inited, activeOverlayIdentifier]) => {
|
|
148
|
+
return inited;
|
|
149
|
+
}))
|
|
150
|
+
// .pipe(debounceTime(5))
|
|
151
|
+
.pipe(takeUntil(this.destroyed$))
|
|
152
|
+
.subscribe(([inited, activeOverlayIdentifier]) => {
|
|
153
|
+
this.bsFromOverlayChange.emit(activeOverlayIdentifier);
|
|
154
|
+
this.accordion.tabPages.forEach((tab) => {
|
|
155
|
+
tab.isActive = (tab["tabOverlayIdentifier"] == activeOverlayIdentifier);
|
|
156
|
+
});
|
|
157
|
+
setTimeout(() => this.accordion.disableAnimations = false, 30);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
get bsFromOverlay() {
|
|
161
|
+
return this._bsFromOverlay;
|
|
162
|
+
}
|
|
163
|
+
set bsFromOverlay(value) {
|
|
164
|
+
if (this._bsFromOverlay != value) {
|
|
165
|
+
this._bsFromOverlay = value;
|
|
166
|
+
this.activeOverlayIdentifier$.next(value);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
ngAfterContentInit() {
|
|
170
|
+
this.inited$.next(true);
|
|
171
|
+
}
|
|
172
|
+
ngOnDestroy() {
|
|
173
|
+
this.destroyed$.next(true);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
BsFromOverlayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsFromOverlayDirective, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
177
|
+
BsFromOverlayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: BsFromOverlayDirective, selector: "bs-accordion[bsFromOverlay]", inputs: { bsFromOverlay: "bsFromOverlay" }, outputs: { bsFromOverlayChange: "bsFromOverlayChange" }, queries: [{ propertyName: "tabPages", predicate: BsFromOverlayIdDirective, read: ElementRef }], ngImport: i0 });
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsFromOverlayDirective, decorators: [{
|
|
179
|
+
type: Directive,
|
|
180
|
+
args: [{
|
|
181
|
+
selector: 'bs-accordion[bsFromOverlay]'
|
|
182
|
+
}]
|
|
183
|
+
}], ctorParameters: function () { return [{ type: BsAccordionComponent }]; }, propDecorators: { bsFromOverlayChange: [{
|
|
184
|
+
type: Output
|
|
185
|
+
}], bsFromOverlay: [{
|
|
186
|
+
type: Input
|
|
187
|
+
}], tabPages: [{
|
|
188
|
+
type: ContentChildren,
|
|
189
|
+
args: [BsFromOverlayIdDirective, { read: ElementRef }]
|
|
190
|
+
}] } });
|
|
191
|
+
|
|
85
192
|
class BsAccordionModule {
|
|
86
193
|
}
|
|
87
194
|
BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
195
|
BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
|
|
89
196
|
BsAccordionTabComponent,
|
|
90
|
-
BsAccordionTabHeaderComponent
|
|
197
|
+
BsAccordionTabHeaderComponent,
|
|
198
|
+
BsFromOverlayDirective,
|
|
199
|
+
BsFromOverlayIdDirective], imports: [CommonModule], exports: [BsAccordionComponent,
|
|
91
200
|
BsAccordionTabComponent,
|
|
92
|
-
BsAccordionTabHeaderComponent
|
|
201
|
+
BsAccordionTabHeaderComponent,
|
|
202
|
+
BsFromOverlayDirective,
|
|
203
|
+
BsFromOverlayIdDirective] });
|
|
93
204
|
BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionModule, imports: [[
|
|
94
205
|
CommonModule
|
|
95
206
|
]] });
|
|
@@ -99,7 +210,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
99
210
|
declarations: [
|
|
100
211
|
BsAccordionComponent,
|
|
101
212
|
BsAccordionTabComponent,
|
|
102
|
-
BsAccordionTabHeaderComponent
|
|
213
|
+
BsAccordionTabHeaderComponent,
|
|
214
|
+
BsFromOverlayDirective,
|
|
215
|
+
BsFromOverlayIdDirective
|
|
103
216
|
],
|
|
104
217
|
imports: [
|
|
105
218
|
CommonModule
|
|
@@ -107,7 +220,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
107
220
|
exports: [
|
|
108
221
|
BsAccordionComponent,
|
|
109
222
|
BsAccordionTabComponent,
|
|
110
|
-
BsAccordionTabHeaderComponent
|
|
223
|
+
BsAccordionTabHeaderComponent,
|
|
224
|
+
BsFromOverlayDirective,
|
|
225
|
+
BsFromOverlayIdDirective
|
|
111
226
|
]
|
|
112
227
|
}]
|
|
113
228
|
}] });
|
|
@@ -207,10 +322,10 @@ class BsCalendarMonthService {
|
|
|
207
322
|
const weeks = this.chunk(allDays, 7);
|
|
208
323
|
const weeksMapped = weeks.map((w, i) => {
|
|
209
324
|
var _a;
|
|
210
|
-
return {
|
|
325
|
+
return ({
|
|
211
326
|
number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), (_a = w.find(d => d.isInMonth)) === null || _a === void 0 ? void 0 : _a.dayOfMonth)),
|
|
212
327
|
days: w
|
|
213
|
-
};
|
|
328
|
+
});
|
|
214
329
|
});
|
|
215
330
|
return weeksMapped;
|
|
216
331
|
}
|
|
@@ -938,21 +1053,34 @@ class BsContextMenuDirective {
|
|
|
938
1053
|
this.element.nativeElement.oncontextmenu = (ev) => {
|
|
939
1054
|
ev.preventDefault();
|
|
940
1055
|
this.checkAndCloseExisting(ev);
|
|
1056
|
+
const target = {
|
|
1057
|
+
getBoundingClientRect: () => {
|
|
1058
|
+
console.log('getBoundingClientRect', {
|
|
1059
|
+
clientX: ev.clientX,
|
|
1060
|
+
clientY: ev.clientY,
|
|
1061
|
+
scrollY: window.scrollY,
|
|
1062
|
+
});
|
|
1063
|
+
return ({
|
|
1064
|
+
width: 0,
|
|
1065
|
+
height: 0,
|
|
1066
|
+
top: ev.clientY + window.scrollY,
|
|
1067
|
+
left: ev.clientX,
|
|
1068
|
+
bottom: ev.clientY + window.scrollY,
|
|
1069
|
+
right: ev.clientX,
|
|
1070
|
+
});
|
|
1071
|
+
},
|
|
1072
|
+
};
|
|
1073
|
+
const element = new ElementRef(target);
|
|
941
1074
|
this.overlayRef = this.overlay.create({
|
|
942
1075
|
hasBackdrop: false,
|
|
943
1076
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
944
1077
|
positionStrategy: this.overlay.position()
|
|
945
|
-
|
|
946
|
-
.flexibleConnectedTo(this.element)
|
|
1078
|
+
.flexibleConnectedTo(element)
|
|
947
1079
|
.withPositions([
|
|
948
|
-
|
|
949
|
-
{ originX: "
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
// // element: TopLeft - dropdown: TopRight
|
|
953
|
-
// { originX: "start", originY: "top", overlayX: "end", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
954
|
-
// // element: TopLeft - dropdown: BottomRight
|
|
955
|
-
// { originX: "start", originY: "top", overlayX: "end", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
1080
|
+
{ originX: "end", originY: "top", overlayX: "start", overlayY: "top" },
|
|
1081
|
+
{ originX: "end", originY: "bottom", overlayX: "start", overlayY: "bottom" },
|
|
1082
|
+
{ originX: "start", originY: "top", overlayX: "end", overlayY: "top" },
|
|
1083
|
+
{ originX: "start", originY: "bottom", overlayX: "end", overlayY: "bottom" },
|
|
956
1084
|
])
|
|
957
1085
|
});
|
|
958
1086
|
this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
|
@@ -2282,9 +2410,7 @@ class BsSchedulerComponent {
|
|
|
2282
2410
|
}
|
|
2283
2411
|
}));
|
|
2284
2412
|
this.daysOfWeekWithTimestamps$ = this.shownDays$
|
|
2285
|
-
.pipe(map((shownDays) => {
|
|
2286
|
-
return { start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 };
|
|
2287
|
-
}));
|
|
2413
|
+
.pipe(map((shownDays) => ({ start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 })));
|
|
2288
2414
|
this.events$ = this.resources$
|
|
2289
2415
|
.pipe(map((resourcesOrGroups) => resourcesOrGroups.map(resOrGroup => this.getResourcesForGroup(resOrGroup))))
|
|
2290
2416
|
.pipe(map(jaggedResources => jaggedResources.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
|
|
@@ -2330,15 +2456,9 @@ class BsSchedulerComponent {
|
|
|
2330
2456
|
.filter((e) => !!e)
|
|
2331
2457
|
.map((e) => e);
|
|
2332
2458
|
const timeline = this.timelineService.getTimeline(events);
|
|
2333
|
-
const result = timeline.map(track => {
|
|
2334
|
-
return track.events.map(ev => {
|
|
2335
|
-
return { event: ev, index: track.index };
|
|
2336
|
-
});
|
|
2337
|
-
})
|
|
2459
|
+
const result = timeline.map(track => track.events.map(ev => ({ event: ev, index: track.index })))
|
|
2338
2460
|
.reduce((flat, toFlatten) => flat.concat(toFlatten), [])
|
|
2339
|
-
.map((evi) => eventParts.filter(p => p.event === evi.event).map(p => {
|
|
2340
|
-
return { part: p, index: evi.index };
|
|
2341
|
-
}))
|
|
2461
|
+
.map((evi) => eventParts.filter(p => p.event === evi.event).map(p => ({ part: p, index: evi.index })))
|
|
2342
2462
|
.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
|
|
2343
2463
|
return {
|
|
2344
2464
|
total: timeline.length,
|
|
@@ -2885,7 +3005,8 @@ const MODAL_CONTENT = new InjectionToken('ModalContent');
|
|
|
2885
3005
|
class BsModalContentComponent {
|
|
2886
3006
|
constructor(content) {
|
|
2887
3007
|
this.instance = null;
|
|
2888
|
-
|
|
3008
|
+
this.closeOnEscape = false;
|
|
3009
|
+
//#region Monitor @fadeInOut hooks
|
|
2889
3010
|
this.animationState = '';
|
|
2890
3011
|
this.animationStateChanged = new EventEmitter();
|
|
2891
3012
|
this.content = content;
|
|
@@ -2893,9 +3014,16 @@ class BsModalContentComponent {
|
|
|
2893
3014
|
onAnimationChanged(event) {
|
|
2894
3015
|
this.animationStateChanged.emit(event);
|
|
2895
3016
|
}
|
|
3017
|
+
//#endregion
|
|
3018
|
+
onKeyDown(ev) {
|
|
3019
|
+
if (this.closeOnEscape && ev.code === 'Escape') {
|
|
3020
|
+
this.animationStateChanged.pipe(filter(ev => ev.phaseName === 'done' && ev.toState === 'void'), take(1)).subscribe(() => { var _a; return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.overlay.dispose(); });
|
|
3021
|
+
this.animationState = 'void';
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
2896
3024
|
}
|
|
2897
3025
|
BsModalContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsModalContentComponent, deps: [{ token: MODAL_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
2898
|
-
BsModalContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BsModalContentComponent, selector: "bs-modal-content", ngImport: i0, template: "<div class=\"modal d-block\" tabindex=\"-1\"\n [@fadeInOut]=\"animationState\"\n (@fadeInOut.start)=\"onAnimationChanged($event)\"\n (@fadeInOut.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n\n</div>", styles: [""], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [FadeInOutAnimation] });
|
|
3026
|
+
BsModalContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BsModalContentComponent, selector: "bs-modal-content", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0, template: "<div class=\"modal d-block\" tabindex=\"-1\"\n [@fadeInOut]=\"animationState\"\n (@fadeInOut.start)=\"onAnimationChanged($event)\"\n (@fadeInOut.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n\n</div>", styles: [""], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [FadeInOutAnimation] });
|
|
2899
3027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsModalContentComponent, decorators: [{
|
|
2900
3028
|
type: Component,
|
|
2901
3029
|
args: [{ selector: 'bs-modal-content', animations: [FadeInOutAnimation], template: "<div class=\"modal d-block\" tabindex=\"-1\"\n [@fadeInOut]=\"animationState\"\n (@fadeInOut.start)=\"onAnimationChanged($event)\"\n (@fadeInOut.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n\n</div>", styles: [""] }]
|
|
@@ -2904,7 +3032,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
2904
3032
|
type: Inject,
|
|
2905
3033
|
args: [MODAL_CONTENT]
|
|
2906
3034
|
}] }];
|
|
2907
|
-
}
|
|
3035
|
+
}, propDecorators: { onKeyDown: [{
|
|
3036
|
+
type: HostListener,
|
|
3037
|
+
args: ['keydown', ['$event']]
|
|
3038
|
+
}] } });
|
|
2908
3039
|
|
|
2909
3040
|
class BsModalHeaderDirective {
|
|
2910
3041
|
constructor(modal, template) {
|
|
@@ -2993,7 +3124,7 @@ class BsModalService {
|
|
|
2993
3124
|
this.parentInjector = parentInjector;
|
|
2994
3125
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
2995
3126
|
}
|
|
2996
|
-
show(template) {
|
|
3127
|
+
show(template, closeOnEscape = false) {
|
|
2997
3128
|
const injector = Injector.create({
|
|
2998
3129
|
providers: [{ provide: MODAL_CONTENT, useValue: template }],
|
|
2999
3130
|
parent: this.parentInjector
|
|
@@ -3011,6 +3142,7 @@ class BsModalService {
|
|
|
3011
3142
|
component: componentInstance,
|
|
3012
3143
|
overlay: overlayRef
|
|
3013
3144
|
};
|
|
3145
|
+
componentInstance.instance.closeOnEscape = closeOnEscape;
|
|
3014
3146
|
return componentInstance.instance;
|
|
3015
3147
|
}
|
|
3016
3148
|
hide(modal) {
|
|
@@ -4874,5 +5006,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
4874
5006
|
* Generated bundle index. Do not edit.
|
|
4875
5007
|
*/
|
|
4876
5008
|
|
|
4877
|
-
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, BsModalComponent, BsModalContentComponent, BsModalFooterDirective, BsModalHeaderDirective, BsModalModule, BsModalService, BsMultiselectComponent, BsMultiselectModule, BsNavbarBrandComponent, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsNavbarTogglerComponent, BsOffcanvasBodyComponent, BsOffcanvasCloseDirective, BsOffcanvasComponent, BsOffcanvasHeaderComponent, BsOffcanvasModule, BsOffcanvasService, 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, NavLinkDirective, NavbarContentDirective, Position, ResourceGroupPresenterComponent, availableScales };
|
|
5009
|
+
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, BsModalComponent, BsModalContentComponent, BsModalFooterDirective, BsModalHeaderDirective, BsModalModule, BsModalService, BsMultiselectComponent, BsMultiselectModule, BsNavbarBrandComponent, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsNavbarTogglerComponent, BsOffcanvasBodyComponent, BsOffcanvasCloseDirective, BsOffcanvasComponent, BsOffcanvasHeaderComponent, BsOffcanvasModule, BsOffcanvasService, 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, NavLinkDirective, NavbarContentDirective, Position, ResourceGroupPresenterComponent, availableScales };
|
|
4878
5010
|
//# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map
|