@mintplayer/ng-bootstrap 13.1.23 → 13.1.24

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 (37) hide show
  1. package/_bootstrap.scss +0 -1
  2. package/esm2020/lib/components/index.mjs +2 -1
  3. package/esm2020/lib/components/scheduler/components/index.mjs +2 -0
  4. package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +261 -0
  5. package/esm2020/lib/components/scheduler/enums/drag-operation.mjs +8 -0
  6. package/esm2020/lib/components/scheduler/index.mjs +3 -0
  7. package/esm2020/lib/components/scheduler/interfaces/drag-operation.mjs +2 -0
  8. package/esm2020/lib/components/scheduler/interfaces/scheduler-event-part.mjs +2 -0
  9. package/esm2020/lib/components/scheduler/interfaces/scheduler-event-with-parts.mjs +2 -0
  10. package/esm2020/lib/components/scheduler/interfaces/scheduler-event.mjs +2 -0
  11. package/esm2020/lib/components/scheduler/interfaces/time-slot.mjs +2 -0
  12. package/esm2020/lib/components/scheduler/pipes/bs-seconds-timespan.pipe/bs-seconds-timespan.pipe.mjs +16 -0
  13. package/esm2020/lib/components/scheduler/pipes/bs-seconds-today-offset/bs-seconds-today-offset.pipe.mjs +20 -0
  14. package/esm2020/lib/components/scheduler/pipes/date-offset/date-offset.pipe.mjs +20 -0
  15. package/esm2020/lib/components/scheduler/pipes/day-of-week/day-of-week.pipe.mjs +22 -0
  16. package/esm2020/lib/components/scheduler/scheduler.module.mjs +38 -0
  17. package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +1 -1
  18. package/fesm2015/mintplayer-ng-bootstrap.mjs +361 -2
  19. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  20. package/fesm2020/mintplayer-ng-bootstrap.mjs +361 -2
  21. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  22. package/lib/components/index.d.ts +1 -0
  23. package/lib/components/scheduler/components/index.d.ts +1 -0
  24. package/lib/components/scheduler/components/scheduler/scheduler.component.d.ts +42 -0
  25. package/lib/components/scheduler/enums/drag-operation.d.ts +6 -0
  26. package/lib/components/scheduler/index.d.ts +2 -0
  27. package/lib/components/scheduler/interfaces/drag-operation.d.ts +6 -0
  28. package/lib/components/scheduler/interfaces/scheduler-event-part.d.ts +6 -0
  29. package/lib/components/scheduler/interfaces/scheduler-event-with-parts.d.ts +6 -0
  30. package/lib/components/scheduler/interfaces/scheduler-event.d.ts +6 -0
  31. package/lib/components/scheduler/interfaces/time-slot.d.ts +4 -0
  32. package/lib/components/scheduler/pipes/bs-seconds-timespan.pipe/bs-seconds-timespan.pipe.d.ts +9 -0
  33. package/lib/components/scheduler/pipes/bs-seconds-today-offset/bs-seconds-today-offset.pipe.d.ts +9 -0
  34. package/lib/components/scheduler/pipes/date-offset/date-offset.pipe.d.ts +8 -0
  35. package/lib/components/scheduler/pipes/day-of-week/day-of-week.pipe.d.ts +9 -0
  36. package/lib/components/scheduler/scheduler.module.d.ts +12 -0
  37. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ContentChildren, NgModule, Input, Injectable, Pipe, EventEmitter, Output, Directive, HostBinding, InjectionToken, Inject, HostListener, Injector, ViewChild, Host, SkipSelf, forwardRef, PLATFORM_ID, ContentChild, Optional, ViewChildren, TemplateRef } from '@angular/core';
2
+ import { Component, ContentChildren, NgModule, Input, Injectable, Pipe, EventEmitter, Output, Directive, HostBinding, InjectionToken, Inject, HostListener, Injector, ViewChild, Host, SkipSelf, forwardRef, PLATFORM_ID, ContentChild, ViewChildren, Optional, TemplateRef } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT } from '@angular/common';
5
5
  import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
@@ -1991,6 +1991,365 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
1991
1991
  }]
1992
1992
  }] });
1993
1993
 
1994
+ var EDragOperation;
1995
+ (function (EDragOperation) {
1996
+ EDragOperation[EDragOperation["none"] = 0] = "none";
1997
+ EDragOperation[EDragOperation["createEvent"] = 1] = "createEvent";
1998
+ EDragOperation[EDragOperation["resizeEvent"] = 2] = "resizeEvent";
1999
+ EDragOperation[EDragOperation["moveEvent"] = 3] = "moveEvent";
2000
+ })(EDragOperation || (EDragOperation = {}));
2001
+
2002
+ class BsSecondsTodayOffsetPipe {
2003
+ transform(value) {
2004
+ const today = new Date(value.start);
2005
+ today.setHours(0);
2006
+ today.setMinutes(0);
2007
+ today.setSeconds(0);
2008
+ return (value.start.getTime() - today.getTime()) / 1000;
2009
+ }
2010
+ }
2011
+ BsSecondsTodayOffsetPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTodayOffsetPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2012
+ BsSecondsTodayOffsetPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTodayOffsetPipe, name: "bsSecondsTodayOffset" });
2013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTodayOffsetPipe, decorators: [{
2014
+ type: Pipe,
2015
+ args: [{
2016
+ name: 'bsSecondsTodayOffset'
2017
+ }]
2018
+ }] });
2019
+
2020
+ class BsSecondsTimespanPipe {
2021
+ transform(value) {
2022
+ return (value.end.getTime() - value.start.getTime()) / 1000;
2023
+ }
2024
+ }
2025
+ BsSecondsTimespanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTimespanPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2026
+ BsSecondsTimespanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTimespanPipe, name: "bsSecondsTimespan" });
2027
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTimespanPipe, decorators: [{
2028
+ type: Pipe,
2029
+ args: [{
2030
+ name: 'bsSecondsTimespan'
2031
+ }]
2032
+ }] });
2033
+
2034
+ class DayOfWeekPipe {
2035
+ transform(value) {
2036
+ const dayOfWeek = value.start.getDay();
2037
+ if (dayOfWeek === 0) {
2038
+ return 7;
2039
+ }
2040
+ else {
2041
+ return dayOfWeek;
2042
+ }
2043
+ }
2044
+ }
2045
+ DayOfWeekPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DayOfWeekPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2046
+ DayOfWeekPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DayOfWeekPipe, name: "dayOfWeek" });
2047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DayOfWeekPipe, decorators: [{
2048
+ type: Pipe,
2049
+ args: [{
2050
+ name: 'dayOfWeek'
2051
+ }]
2052
+ }] });
2053
+
2054
+ class BsSchedulerComponent {
2055
+ constructor(calendarMonthService) {
2056
+ this.calendarMonthService = calendarMonthService;
2057
+ this.eventPartsForThisWeek$ = new BehaviorSubject([]);
2058
+ this.timeSlotDuration$ = new BehaviorSubject(1800);
2059
+ this.mouseState$ = new BehaviorSubject(false);
2060
+ this.hoveredTimeSlot$ = new BehaviorSubject(null);
2061
+ this.destroyed$ = new Subject();
2062
+ //#region UnitHeight
2063
+ this.unitHeight$ = new BehaviorSubject(40);
2064
+ this.unitHeightChange = new EventEmitter();
2065
+ this.operation = null;
2066
+ this.dragStartTimeslot = null;
2067
+ const monday = this.calendarMonthService.getMondayBefore(new Date());
2068
+ this.currentWeek$ = new BehaviorSubject(monday);
2069
+ this.daysOfWeek$ = this.currentWeek$.pipe(map((weekMonday) => {
2070
+ weekMonday.setHours(0);
2071
+ weekMonday.setMinutes(0);
2072
+ weekMonday.setSeconds(0);
2073
+ return Array.from(Array(7).keys()).map((x) => this.addDays(weekMonday, x));
2074
+ }));
2075
+ this.events$ = new BehaviorSubject([]);
2076
+ this.eventParts$ = this.events$.pipe(map((events) => {
2077
+ return events.map((ev) => {
2078
+ let startTime = ev.start;
2079
+ const result = [];
2080
+ while (!this.dateEquals(startTime, ev.end)) {
2081
+ const end = new Date(startTime.getFullYear(), startTime.getMonth(), startTime.getDate() + 1, 0, 0, 0);
2082
+ result.push({ start: startTime, end: end, event: ev });
2083
+ startTime = end;
2084
+ }
2085
+ if (startTime != ev.end) {
2086
+ result.push({ start: startTime, end: ev.end, event: ev });
2087
+ }
2088
+ return { event: ev, parts: result };
2089
+ });
2090
+ }));
2091
+ combineLatest([
2092
+ this.daysOfWeek$
2093
+ .pipe(map((daysOfWeek) => {
2094
+ return { start: daysOfWeek[0].getTime(), end: daysOfWeek[daysOfWeek.length - 1].getTime() + 24 * 60 * 60 * 1000 };
2095
+ })),
2096
+ this.eventParts$
2097
+ .pipe(map(eventParts => eventParts.map(evp => evp.parts)))
2098
+ .pipe(map(jaggedParts => {
2099
+ return jaggedParts.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
2100
+ })),
2101
+ this.eventParts$
2102
+ ])
2103
+ .pipe(map(([startAndEnd, eventParts, originalEventParts]) => {
2104
+ return eventParts.filter(eventPart => {
2105
+ return !((eventPart.end.getTime() < startAndEnd.start) || (eventPart.start.getTime() > startAndEnd.end));
2106
+ });
2107
+ }))
2108
+ .pipe(takeUntil(this.destroyed$))
2109
+ .subscribe((eventPartsForThisWeek) => {
2110
+ this.eventPartsForThisWeek$.next(eventPartsForThisWeek);
2111
+ });
2112
+ this.timeSlots$ = combineLatest([this.daysOfWeek$, this.timeSlotDuration$])
2113
+ .pipe(map(([daysOfWeek, duration]) => {
2114
+ const timeSlotsPerDay = Math.floor((60 * 60 * 24) / duration);
2115
+ return Array.from(Array(timeSlotsPerDay).keys()).map((index) => {
2116
+ const timeSlotStart = new Date(daysOfWeek[0]);
2117
+ timeSlotStart.setSeconds(timeSlotStart.getSeconds() + index * duration);
2118
+ const timeSlotEnd = new Date(timeSlotStart);
2119
+ timeSlotEnd.setSeconds(timeSlotEnd.getSeconds() + duration);
2120
+ return daysOfWeek.map((day) => {
2121
+ const start = new Date(day);
2122
+ start.setHours(timeSlotStart.getHours());
2123
+ start.setMinutes(timeSlotStart.getMinutes());
2124
+ start.setSeconds(timeSlotStart.getSeconds());
2125
+ const end = new Date(day);
2126
+ end.setHours(timeSlotEnd.getHours());
2127
+ end.setMinutes(timeSlotEnd.getMinutes());
2128
+ end.setSeconds(timeSlotEnd.getSeconds());
2129
+ return { start, end };
2130
+ });
2131
+ });
2132
+ }));
2133
+ this.unitHeight$
2134
+ .pipe(takeUntil(this.destroyed$))
2135
+ .subscribe((unitHeight) => {
2136
+ this.unitHeightChange.emit(unitHeight);
2137
+ });
2138
+ }
2139
+ get unitHeight() {
2140
+ return this.unitHeight$.value;
2141
+ }
2142
+ set unitHeight(value) {
2143
+ this.unitHeight$.next(value);
2144
+ }
2145
+ //#endregion
2146
+ dateEquals(date1, date2) {
2147
+ return (date1.getFullYear() === date2.getFullYear() &&
2148
+ date1.getMonth() === date2.getMonth() &&
2149
+ date1.getDate() === date2.getDate());
2150
+ }
2151
+ addDays(date, days) {
2152
+ const result = new Date(date);
2153
+ result.setDate(result.getDate() + days);
2154
+ return result;
2155
+ }
2156
+ onPreviousWeek() {
2157
+ this.currentWeek$
2158
+ .pipe(map((w) => this.addDays(w, -7)), take(1))
2159
+ .subscribe((w) => this.currentWeek$.next(w));
2160
+ }
2161
+ onNextWeek() {
2162
+ this.currentWeek$
2163
+ .pipe(map((w) => this.addDays(w, 7)), take(1))
2164
+ .subscribe((w) => this.currentWeek$.next(w));
2165
+ }
2166
+ onCreateEvent(ev, slot) {
2167
+ ev.preventDefault();
2168
+ this.mouseState$.next(true);
2169
+ this.dragStartTimeslot = slot;
2170
+ this.operation = {
2171
+ operation: EDragOperation.createEvent,
2172
+ event: {
2173
+ start: slot.start,
2174
+ end: slot.end,
2175
+ color: '#F00',
2176
+ description: 'Test event',
2177
+ }
2178
+ };
2179
+ this.events$.next([...this.events$.value, this.operation.event]);
2180
+ }
2181
+ onStartDragEvent(eventPart, ev) {
2182
+ ev.preventDefault();
2183
+ this.hoveredTimeSlot$.pipe(take(1)).subscribe((hoveredTimeSlot) => {
2184
+ this.dragStartTimeslot = hoveredTimeSlot;
2185
+ this.operation = {
2186
+ operation: EDragOperation.moveEvent,
2187
+ event: eventPart.event
2188
+ };
2189
+ });
2190
+ }
2191
+ //#region hoveredTimeslot$
2192
+ getHoveredTimeslot(ev, timeSlots) {
2193
+ const hoveredSlots = this.timeSlotElements.filter((el) => {
2194
+ const rct = el.nativeElement.getBoundingClientRect();
2195
+ if (rct.left <= ev.x && ev.x <= rct.right && rct.top <= ev.y && ev.y <= rct.bottom) {
2196
+ return true;
2197
+ }
2198
+ else {
2199
+ return false;
2200
+ }
2201
+ });
2202
+ if (!hoveredSlots || hoveredSlots.length === 0) {
2203
+ return null;
2204
+ }
2205
+ const slotElement = hoveredSlots[0].nativeElement;
2206
+ const strRow = slotElement.getAttribute('data-row');
2207
+ if (!strRow) {
2208
+ return null;
2209
+ }
2210
+ const row = parseInt(strRow);
2211
+ const strColumn = slotElement.getAttribute('data-column');
2212
+ if (!strColumn) {
2213
+ return null;
2214
+ }
2215
+ const column = parseInt(strColumn);
2216
+ const slot = timeSlots[row][column];
2217
+ return slot;
2218
+ }
2219
+ onMousemove(ev) {
2220
+ this.timeSlots$.pipe(take(1)).subscribe((timeSlots) => {
2221
+ const hovered = this.getHoveredTimeslot(ev, timeSlots);
2222
+ this.hoveredTimeSlot$.next(hovered);
2223
+ if (this.operation) {
2224
+ switch (this.operation.operation) {
2225
+ case EDragOperation.createEvent:
2226
+ {
2227
+ if (this.operation.event && this.dragStartTimeslot && hovered && (this.operation.event.end.getTime() != hovered.end.getTime())) {
2228
+ if (this.dragStartTimeslot.start.getTime() === hovered.start.getTime()) {
2229
+ // 1 slot
2230
+ }
2231
+ else if (this.dragStartTimeslot.start.getTime() < hovered.start.getTime()) {
2232
+ // Drag down
2233
+ this.operation.event.start = this.dragStartTimeslot.start;
2234
+ this.operation.event.end = hovered.end;
2235
+ this.events$.next(this.events$.value);
2236
+ }
2237
+ else if (this.dragStartTimeslot.start.getTime() > hovered.start.getTime()) {
2238
+ // Drag up
2239
+ this.operation.event.start = hovered.start;
2240
+ this.operation.event.end = this.dragStartTimeslot.end;
2241
+ this.events$.next(this.events$.value);
2242
+ }
2243
+ }
2244
+ }
2245
+ break;
2246
+ case EDragOperation.moveEvent:
2247
+ {
2248
+ if (hovered && this.dragStartTimeslot) {
2249
+ this.operation.event.start.setTime(this.operation.event.start.getTime() + hovered.start.getTime() - this.dragStartTimeslot.start.getTime());
2250
+ this.operation.event.end.setTime(this.operation.event.end.getTime() + hovered.start.getTime() - this.dragStartTimeslot.start.getTime());
2251
+ this.dragStartTimeslot = hovered;
2252
+ this.events$.next(this.events$.value);
2253
+ }
2254
+ }
2255
+ break;
2256
+ }
2257
+ }
2258
+ });
2259
+ }
2260
+ //#endregion
2261
+ onMouseUp(ev) {
2262
+ if (this.operation) {
2263
+ switch (this.operation.operation) {
2264
+ case EDragOperation.createEvent:
2265
+ {
2266
+ if (this.operation.event) {
2267
+ this.operation = null;
2268
+ this.dragStartTimeslot = null;
2269
+ }
2270
+ }
2271
+ break;
2272
+ case EDragOperation.moveEvent:
2273
+ {
2274
+ this.operation = null;
2275
+ this.dragStartTimeslot = null;
2276
+ }
2277
+ break;
2278
+ }
2279
+ }
2280
+ }
2281
+ ngOnDestroy() {
2282
+ this.destroyed$.next(true);
2283
+ }
2284
+ }
2285
+ BsSchedulerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerComponent, deps: [{ token: BsCalendarMonthService }], target: i0.ɵɵFactoryTarget.Component });
2286
+ BsSchedulerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsSchedulerComponent, selector: "bs-scheduler", inputs: { unitHeight: "unitHeight" }, outputs: { unitHeightChange: "unitHeightChange" }, host: { listeners: { "document:mousemove": "onMousemove($event)", "document:mouseup": "onMouseUp($event)" } }, viewQueries: [{ propertyName: "timeSlotElements", predicate: ["slot"], descendants: true }], ngImport: i0, template: "{{ unitHeight$ | async }}\n<div class=\"table d-flex w-100 overflow-y-auto\" [style.max-height.px]=\"400\">\n <div class=\"calendar-head\">\n <div class=\"w-100 d-flex flex-row\">\n <div class=\"d-flex calendar-left justify-content-between\">\n <button class=\"btn btn-default flex-start\" (click)=\"onPreviousWeek()\">&lt;</button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeek()\">&gt;</button>\n </div>\n <div class=\"flex-grow-1\" *ngFor=\"let day of (daysOfWeek$ | async)\">\n <span class=\"d-block col-form-label text-center\">\n {{ day | date: 'dd-MM-yyyy' }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"calendar-body\">\n <div class=\"position-relative\">\n <!-- Timeslots -->\n <div *ngFor=\"let timeslots of (timeSlots$ | async); let i = index\" class=\"d-flex flex-row p-0 timeslot\" [style.height.px]=\"unitHeight$ | async\">\n <div class=\"calendar-cell calendar-left align-top py-0\">{{ timeslots[0].start | date: 'HH:mm:ss' }}</div>\n <div class=\"calendar-cell flex-grow-1\" *ngFor=\"let slot of timeslots; let j = index\" #slot (mousedown)=\"onCreateEvent($event, slot)\" [attr.data-row]=\"i\" [attr.data-column]=\"j\"></div>\n </div>\n \n <!-- Events -->\n <ng-container *ngIf=\"(timeSlotDuration$ | async) as timeSlotDuration\">\n\n <div *ngFor=\"let eventPart of (eventPartsForThisWeek$ | async)\" class=\"position-absolute event\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * (unitHeight$ | async)!\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * (unitHeight$ | async)!\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\" [style.background-color]=\"eventPart.event.color\" (mousedown)=\"onStartDragEvent(eventPart, $event)\">\n {{ eventPart.event.description }}\n <br>\n {{ eventPart.start | date: 'HH:mm:ss' }}\n <br>\n {{ eventPart.end | date: 'HH:mm:ss' }}\n </div>\n </div>\n \n <!-- <ng-container *ngFor=\"let eventWithParts of (eventParts$ | async)\">\n <div *ngFor=\"let eventPart of eventWithParts.parts\" class=\"position-absolute event\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * 40\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * 40\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\">\n {{ eventPart.start | date: 'HH:mm:ss' }} - {{ eventPart.end | date: 'HH:mm:ss' }}\n </div>\n </div>\n </ng-container> -->\n \n </ng-container>\n </div>\n </div>\n</div>", styles: [":host{display:block}.table{flex-flow:column}.table .calendar-head{flex:0 0 auto}.table .calendar-head>div{padding-right:18px}.table .calendar-body{flex:1 1 auto;display:block;overflow-y:visible;overflow-x:hidden}.table .calendar-body .calendar-cell{border-right:1px solid #DEE2E6;border-bottom:1px solid #DEE2E6;cursor:default}.table .calendar-body .calendar-cell.hover{border-top-width:3px}.table .calendar-left{width:90px}.event{z-index:5;width:calc((100% - 90px) / 7);height:100px;overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.event .event-inner{position:absolute;left:4px;right:5px;top:4px;bottom:5px;cursor:move}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe, "date": i1.DatePipe, "bsSecondsTodayOffset": BsSecondsTodayOffsetPipe, "bsSecondsTimespan": BsSecondsTimespanPipe, "dayOfWeek": DayOfWeekPipe } });
2287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerComponent, decorators: [{
2288
+ type: Component,
2289
+ args: [{ selector: 'bs-scheduler', template: "{{ unitHeight$ | async }}\n<div class=\"table d-flex w-100 overflow-y-auto\" [style.max-height.px]=\"400\">\n <div class=\"calendar-head\">\n <div class=\"w-100 d-flex flex-row\">\n <div class=\"d-flex calendar-left justify-content-between\">\n <button class=\"btn btn-default flex-start\" (click)=\"onPreviousWeek()\">&lt;</button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeek()\">&gt;</button>\n </div>\n <div class=\"flex-grow-1\" *ngFor=\"let day of (daysOfWeek$ | async)\">\n <span class=\"d-block col-form-label text-center\">\n {{ day | date: 'dd-MM-yyyy' }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"calendar-body\">\n <div class=\"position-relative\">\n <!-- Timeslots -->\n <div *ngFor=\"let timeslots of (timeSlots$ | async); let i = index\" class=\"d-flex flex-row p-0 timeslot\" [style.height.px]=\"unitHeight$ | async\">\n <div class=\"calendar-cell calendar-left align-top py-0\">{{ timeslots[0].start | date: 'HH:mm:ss' }}</div>\n <div class=\"calendar-cell flex-grow-1\" *ngFor=\"let slot of timeslots; let j = index\" #slot (mousedown)=\"onCreateEvent($event, slot)\" [attr.data-row]=\"i\" [attr.data-column]=\"j\"></div>\n </div>\n \n <!-- Events -->\n <ng-container *ngIf=\"(timeSlotDuration$ | async) as timeSlotDuration\">\n\n <div *ngFor=\"let eventPart of (eventPartsForThisWeek$ | async)\" class=\"position-absolute event\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * (unitHeight$ | async)!\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * (unitHeight$ | async)!\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\" [style.background-color]=\"eventPart.event.color\" (mousedown)=\"onStartDragEvent(eventPart, $event)\">\n {{ eventPart.event.description }}\n <br>\n {{ eventPart.start | date: 'HH:mm:ss' }}\n <br>\n {{ eventPart.end | date: 'HH:mm:ss' }}\n </div>\n </div>\n \n <!-- <ng-container *ngFor=\"let eventWithParts of (eventParts$ | async)\">\n <div *ngFor=\"let eventPart of eventWithParts.parts\" class=\"position-absolute event\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * 40\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * 40\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\">\n {{ eventPart.start | date: 'HH:mm:ss' }} - {{ eventPart.end | date: 'HH:mm:ss' }}\n </div>\n </div>\n </ng-container> -->\n \n </ng-container>\n </div>\n </div>\n</div>", styles: [":host{display:block}.table{flex-flow:column}.table .calendar-head{flex:0 0 auto}.table .calendar-head>div{padding-right:18px}.table .calendar-body{flex:1 1 auto;display:block;overflow-y:visible;overflow-x:hidden}.table .calendar-body .calendar-cell{border-right:1px solid #DEE2E6;border-bottom:1px solid #DEE2E6;cursor:default}.table .calendar-body .calendar-cell.hover{border-top-width:3px}.table .calendar-left{width:90px}.event{z-index:5;width:calc((100% - 90px) / 7);height:100px;overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.event .event-inner{position:absolute;left:4px;right:5px;top:4px;bottom:5px;cursor:move}\n"] }]
2290
+ }], ctorParameters: function () { return [{ type: BsCalendarMonthService }]; }, propDecorators: { timeSlotElements: [{
2291
+ type: ViewChildren,
2292
+ args: ['slot']
2293
+ }], unitHeightChange: [{
2294
+ type: Output
2295
+ }], unitHeight: [{
2296
+ type: Input
2297
+ }], onMousemove: [{
2298
+ type: HostListener,
2299
+ args: ['document:mousemove', ['$event']]
2300
+ }], onMouseUp: [{
2301
+ type: HostListener,
2302
+ args: ['document:mouseup', ['$event']]
2303
+ }] } });
2304
+
2305
+ class DateOffsetPipe {
2306
+ transform(value) {
2307
+ const today = new Date(value.start);
2308
+ today.setHours(0);
2309
+ today.setMinutes(0);
2310
+ today.setSeconds(0);
2311
+ return (value.start.getTime() - today.getTime()) / 1000;
2312
+ }
2313
+ }
2314
+ DateOffsetPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateOffsetPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2315
+ DateOffsetPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateOffsetPipe, name: "dateOffset" });
2316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateOffsetPipe, decorators: [{
2317
+ type: Pipe,
2318
+ args: [{
2319
+ name: 'dateOffset'
2320
+ }]
2321
+ }] });
2322
+
2323
+ class BsSchedulerModule {
2324
+ }
2325
+ BsSchedulerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2326
+ BsSchedulerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, declarations: [BsSchedulerComponent,
2327
+ BsSecondsTimespanPipe,
2328
+ BsSecondsTodayOffsetPipe,
2329
+ DateOffsetPipe,
2330
+ DayOfWeekPipe], imports: [CommonModule], exports: [BsSchedulerComponent] });
2331
+ BsSchedulerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, imports: [[
2332
+ CommonModule
2333
+ ]] });
2334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, decorators: [{
2335
+ type: NgModule,
2336
+ args: [{
2337
+ declarations: [
2338
+ BsSchedulerComponent,
2339
+ BsSecondsTimespanPipe,
2340
+ BsSecondsTodayOffsetPipe,
2341
+ DateOffsetPipe,
2342
+ DayOfWeekPipe
2343
+ ],
2344
+ imports: [
2345
+ CommonModule
2346
+ ],
2347
+ exports: [
2348
+ BsSchedulerComponent
2349
+ ]
2350
+ }]
2351
+ }] });
2352
+
1994
2353
  class BsListGroupItemComponent {
1995
2354
  constructor() {
1996
2355
  }
@@ -3572,5 +3931,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
3572
3931
  * Generated bundle index. Do not edit.
3573
3932
  */
3574
3933
 
3575
- 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, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRatingComponent, BsRatingModule, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
3934
+ 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, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRatingComponent, BsRatingModule, BsRowTemplateDirective, BsSchedulerComponent, BsSchedulerModule, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
3576
3935
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map