@mintplayer/ng-bootstrap 13.3.10 → 13.3.11
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 +9 -3
- package/esm2020/lib/components/context-menu/context-menu.directive.mjs +24 -11
- 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 +36 -25
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +38 -29
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/accordion/accordion/accordion.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ContentChildren, forwardRef,
|
|
2
|
+
import { Component, ContentChildren, forwardRef, EventEmitter, Output, Input, NgModule, Injectable, Pipe, Directive, HostBinding, 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, ColorTransitionAnimation } from '@mintplayer/ng-animations';
|
|
@@ -36,6 +36,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
36
36
|
class BsAccordionComponent {
|
|
37
37
|
constructor() {
|
|
38
38
|
//#region ActiveTab
|
|
39
|
+
this.activeTabChange = new EventEmitter();
|
|
39
40
|
this._activeTab = null;
|
|
40
41
|
}
|
|
41
42
|
get activeTab() {
|
|
@@ -49,16 +50,21 @@ class BsAccordionComponent {
|
|
|
49
50
|
acc.activeTab = null;
|
|
50
51
|
});
|
|
51
52
|
});
|
|
53
|
+
this.activeTabChange.emit(value);
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BsAccordionComponent, selector: "bs-accordion", queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
|
|
57
|
+
BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: BsAccordionComponent, selector: "bs-accordion", inputs: { activeTab: "activeTab" }, outputs: { activeTabChange: "activeTabChange" }, queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
|
|
56
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionComponent, decorators: [{
|
|
57
59
|
type: Component,
|
|
58
60
|
args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
|
|
59
61
|
}], propDecorators: { tabPages: [{
|
|
60
62
|
type: ContentChildren,
|
|
61
63
|
args: [BsAccordionTabComponent]
|
|
64
|
+
}], activeTabChange: [{
|
|
65
|
+
type: Output
|
|
66
|
+
}], activeTab: [{
|
|
67
|
+
type: Input
|
|
62
68
|
}] } });
|
|
63
69
|
|
|
64
70
|
class BsAccordionTabHeaderComponent {
|
|
@@ -208,10 +214,10 @@ class BsCalendarMonthService {
|
|
|
208
214
|
const weeks = this.chunk(allDays, 7);
|
|
209
215
|
const weeksMapped = weeks.map((w, i) => {
|
|
210
216
|
var _a;
|
|
211
|
-
return {
|
|
217
|
+
return ({
|
|
212
218
|
number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), (_a = w.find(d => d.isInMonth)) === null || _a === void 0 ? void 0 : _a.dayOfMonth)),
|
|
213
219
|
days: w
|
|
214
|
-
};
|
|
220
|
+
});
|
|
215
221
|
});
|
|
216
222
|
return weeksMapped;
|
|
217
223
|
}
|
|
@@ -939,21 +945,34 @@ class BsContextMenuDirective {
|
|
|
939
945
|
this.element.nativeElement.oncontextmenu = (ev) => {
|
|
940
946
|
ev.preventDefault();
|
|
941
947
|
this.checkAndCloseExisting(ev);
|
|
948
|
+
const target = {
|
|
949
|
+
getBoundingClientRect: () => {
|
|
950
|
+
console.log('getBoundingClientRect', {
|
|
951
|
+
clientX: ev.clientX,
|
|
952
|
+
clientY: ev.clientY,
|
|
953
|
+
scrollY: window.scrollY,
|
|
954
|
+
});
|
|
955
|
+
return ({
|
|
956
|
+
width: 0,
|
|
957
|
+
height: 0,
|
|
958
|
+
top: ev.clientY + window.scrollY,
|
|
959
|
+
left: ev.clientX,
|
|
960
|
+
bottom: ev.clientY + window.scrollY,
|
|
961
|
+
right: ev.clientX,
|
|
962
|
+
});
|
|
963
|
+
},
|
|
964
|
+
};
|
|
965
|
+
const element = new ElementRef(target);
|
|
942
966
|
this.overlayRef = this.overlay.create({
|
|
943
967
|
hasBackdrop: false,
|
|
944
968
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
945
969
|
positionStrategy: this.overlay.position()
|
|
946
|
-
|
|
947
|
-
.flexibleConnectedTo(this.element)
|
|
970
|
+
.flexibleConnectedTo(element)
|
|
948
971
|
.withPositions([
|
|
949
|
-
|
|
950
|
-
{ originX: "
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
// // element: TopLeft - dropdown: TopRight
|
|
954
|
-
// { originX: "start", originY: "top", overlayX: "end", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
955
|
-
// // element: TopLeft - dropdown: BottomRight
|
|
956
|
-
// { originX: "start", originY: "top", overlayX: "end", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
972
|
+
{ originX: "end", originY: "top", overlayX: "start", overlayY: "top" },
|
|
973
|
+
{ originX: "end", originY: "bottom", overlayX: "start", overlayY: "bottom" },
|
|
974
|
+
{ originX: "start", originY: "top", overlayX: "end", overlayY: "top" },
|
|
975
|
+
{ originX: "start", originY: "bottom", overlayX: "end", overlayY: "bottom" },
|
|
957
976
|
])
|
|
958
977
|
});
|
|
959
978
|
this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
|
@@ -2283,9 +2302,7 @@ class BsSchedulerComponent {
|
|
|
2283
2302
|
}
|
|
2284
2303
|
}));
|
|
2285
2304
|
this.daysOfWeekWithTimestamps$ = this.shownDays$
|
|
2286
|
-
.pipe(map((shownDays) => {
|
|
2287
|
-
return { start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 };
|
|
2288
|
-
}));
|
|
2305
|
+
.pipe(map((shownDays) => ({ start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 })));
|
|
2289
2306
|
this.events$ = this.resources$
|
|
2290
2307
|
.pipe(map((resourcesOrGroups) => resourcesOrGroups.map(resOrGroup => this.getResourcesForGroup(resOrGroup))))
|
|
2291
2308
|
.pipe(map(jaggedResources => jaggedResources.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
|
|
@@ -2331,15 +2348,9 @@ class BsSchedulerComponent {
|
|
|
2331
2348
|
.filter((e) => !!e)
|
|
2332
2349
|
.map((e) => e);
|
|
2333
2350
|
const timeline = this.timelineService.getTimeline(events);
|
|
2334
|
-
const result = timeline.map(track => {
|
|
2335
|
-
return track.events.map(ev => {
|
|
2336
|
-
return { event: ev, index: track.index };
|
|
2337
|
-
});
|
|
2338
|
-
})
|
|
2351
|
+
const result = timeline.map(track => track.events.map(ev => ({ event: ev, index: track.index })))
|
|
2339
2352
|
.reduce((flat, toFlatten) => flat.concat(toFlatten), [])
|
|
2340
|
-
.map((evi) => eventParts.filter(p => p.event === evi.event).map(p => {
|
|
2341
|
-
return { part: p, index: evi.index };
|
|
2342
|
-
}))
|
|
2353
|
+
.map((evi) => eventParts.filter(p => p.event === evi.event).map(p => ({ part: p, index: evi.index })))
|
|
2343
2354
|
.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
|
|
2344
2355
|
return {
|
|
2345
2356
|
total: timeline.length,
|