@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';
|
|
@@ -37,6 +37,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImpor
|
|
|
37
37
|
class BsAccordionComponent {
|
|
38
38
|
constructor() {
|
|
39
39
|
//#region ActiveTab
|
|
40
|
+
this.activeTabChange = new EventEmitter();
|
|
40
41
|
this._activeTab = null;
|
|
41
42
|
}
|
|
42
43
|
get activeTab() {
|
|
@@ -50,16 +51,21 @@ class BsAccordionComponent {
|
|
|
50
51
|
acc.activeTab = null;
|
|
51
52
|
});
|
|
52
53
|
});
|
|
54
|
+
this.activeTabChange.emit(value);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
-
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: [""] });
|
|
58
|
+
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: [""] });
|
|
57
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: BsAccordionComponent, decorators: [{
|
|
58
60
|
type: Component,
|
|
59
61
|
args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
|
|
60
62
|
}], propDecorators: { tabPages: [{
|
|
61
63
|
type: ContentChildren,
|
|
62
64
|
args: [BsAccordionTabComponent]
|
|
65
|
+
}], activeTabChange: [{
|
|
66
|
+
type: Output
|
|
67
|
+
}], activeTab: [{
|
|
68
|
+
type: Input
|
|
63
69
|
}] } });
|
|
64
70
|
|
|
65
71
|
class BsAccordionTabHeaderComponent {
|
|
@@ -207,12 +213,10 @@ class BsCalendarMonthService {
|
|
|
207
213
|
};
|
|
208
214
|
});
|
|
209
215
|
const weeks = this.chunk(allDays, 7);
|
|
210
|
-
const weeksMapped = weeks.map((w, i) => {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
+
const weeksMapped = weeks.map((w, i) => ({
|
|
217
|
+
number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), w.find(d => d.isInMonth)?.dayOfMonth)),
|
|
218
|
+
days: w
|
|
219
|
+
}));
|
|
216
220
|
return weeksMapped;
|
|
217
221
|
}
|
|
218
222
|
generateList(count) {
|
|
@@ -933,21 +937,34 @@ class BsContextMenuDirective {
|
|
|
933
937
|
this.element.nativeElement.oncontextmenu = (ev) => {
|
|
934
938
|
ev.preventDefault();
|
|
935
939
|
this.checkAndCloseExisting(ev);
|
|
940
|
+
const target = {
|
|
941
|
+
getBoundingClientRect: () => {
|
|
942
|
+
console.log('getBoundingClientRect', {
|
|
943
|
+
clientX: ev.clientX,
|
|
944
|
+
clientY: ev.clientY,
|
|
945
|
+
scrollY: window.scrollY,
|
|
946
|
+
});
|
|
947
|
+
return ({
|
|
948
|
+
width: 0,
|
|
949
|
+
height: 0,
|
|
950
|
+
top: ev.clientY + window.scrollY,
|
|
951
|
+
left: ev.clientX,
|
|
952
|
+
bottom: ev.clientY + window.scrollY,
|
|
953
|
+
right: ev.clientX,
|
|
954
|
+
});
|
|
955
|
+
},
|
|
956
|
+
};
|
|
957
|
+
const element = new ElementRef(target);
|
|
936
958
|
this.overlayRef = this.overlay.create({
|
|
937
959
|
hasBackdrop: false,
|
|
938
960
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
939
961
|
positionStrategy: this.overlay.position()
|
|
940
|
-
|
|
941
|
-
.flexibleConnectedTo(this.element)
|
|
962
|
+
.flexibleConnectedTo(element)
|
|
942
963
|
.withPositions([
|
|
943
|
-
|
|
944
|
-
{ originX: "
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
// // element: TopLeft - dropdown: TopRight
|
|
948
|
-
// { originX: "start", originY: "top", overlayX: "end", overlayY: "top", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
949
|
-
// // element: TopLeft - dropdown: BottomRight
|
|
950
|
-
// { originX: "start", originY: "top", overlayX: "end", overlayY: "bottom", offsetX: ev.offsetX, offsetY: ev.offsetY },
|
|
964
|
+
{ originX: "end", originY: "top", overlayX: "start", overlayY: "top" },
|
|
965
|
+
{ originX: "end", originY: "bottom", overlayX: "start", overlayY: "bottom" },
|
|
966
|
+
{ originX: "start", originY: "top", overlayX: "end", overlayY: "top" },
|
|
967
|
+
{ originX: "start", originY: "bottom", overlayX: "end", overlayY: "bottom" },
|
|
951
968
|
])
|
|
952
969
|
});
|
|
953
970
|
this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
|
@@ -2272,9 +2289,7 @@ class BsSchedulerComponent {
|
|
|
2272
2289
|
}
|
|
2273
2290
|
}));
|
|
2274
2291
|
this.daysOfWeekWithTimestamps$ = this.shownDays$
|
|
2275
|
-
.pipe(map((shownDays) => {
|
|
2276
|
-
return { start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 };
|
|
2277
|
-
}));
|
|
2292
|
+
.pipe(map((shownDays) => ({ start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 })));
|
|
2278
2293
|
this.events$ = this.resources$
|
|
2279
2294
|
.pipe(map((resourcesOrGroups) => resourcesOrGroups.map(resOrGroup => this.getResourcesForGroup(resOrGroup))))
|
|
2280
2295
|
.pipe(map(jaggedResources => jaggedResources.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
|
|
@@ -2320,15 +2335,9 @@ class BsSchedulerComponent {
|
|
|
2320
2335
|
.filter((e) => !!e)
|
|
2321
2336
|
.map((e) => e);
|
|
2322
2337
|
const timeline = this.timelineService.getTimeline(events);
|
|
2323
|
-
const result = timeline.map(track => {
|
|
2324
|
-
return track.events.map(ev => {
|
|
2325
|
-
return { event: ev, index: track.index };
|
|
2326
|
-
});
|
|
2327
|
-
})
|
|
2338
|
+
const result = timeline.map(track => track.events.map(ev => ({ event: ev, index: track.index })))
|
|
2328
2339
|
.reduce((flat, toFlatten) => flat.concat(toFlatten), [])
|
|
2329
|
-
.map((evi) => eventParts.filter(p => p.event === evi.event).map(p => {
|
|
2330
|
-
return { part: p, index: evi.index };
|
|
2331
|
-
}))
|
|
2340
|
+
.map((evi) => eventParts.filter(p => p.event === evi.event).map(p => ({ part: p, index: evi.index })))
|
|
2332
2341
|
.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
|
|
2333
2342
|
return {
|
|
2334
2343
|
total: timeline.length,
|