@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.
- package/_bootstrap.scss +0 -1
- package/esm2020/lib/components/index.mjs +2 -1
- package/esm2020/lib/components/scheduler/components/index.mjs +2 -0
- package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +261 -0
- package/esm2020/lib/components/scheduler/enums/drag-operation.mjs +8 -0
- package/esm2020/lib/components/scheduler/index.mjs +3 -0
- package/esm2020/lib/components/scheduler/interfaces/drag-operation.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/scheduler-event-part.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/scheduler-event-with-parts.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/scheduler-event.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/time-slot.mjs +2 -0
- package/esm2020/lib/components/scheduler/pipes/bs-seconds-timespan.pipe/bs-seconds-timespan.pipe.mjs +16 -0
- package/esm2020/lib/components/scheduler/pipes/bs-seconds-today-offset/bs-seconds-today-offset.pipe.mjs +20 -0
- package/esm2020/lib/components/scheduler/pipes/date-offset/date-offset.pipe.mjs +20 -0
- package/esm2020/lib/components/scheduler/pipes/day-of-week/day-of-week.pipe.mjs +22 -0
- package/esm2020/lib/components/scheduler/scheduler.module.mjs +38 -0
- package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +1 -1
- package/fesm2015/mintplayer-ng-bootstrap.mjs +361 -2
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +361 -2
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/scheduler/components/index.d.ts +1 -0
- package/lib/components/scheduler/components/scheduler/scheduler.component.d.ts +42 -0
- package/lib/components/scheduler/enums/drag-operation.d.ts +6 -0
- package/lib/components/scheduler/index.d.ts +2 -0
- package/lib/components/scheduler/interfaces/drag-operation.d.ts +6 -0
- package/lib/components/scheduler/interfaces/scheduler-event-part.d.ts +6 -0
- package/lib/components/scheduler/interfaces/scheduler-event-with-parts.d.ts +6 -0
- package/lib/components/scheduler/interfaces/scheduler-event.d.ts +6 -0
- package/lib/components/scheduler/interfaces/time-slot.d.ts +4 -0
- package/lib/components/scheduler/pipes/bs-seconds-timespan.pipe/bs-seconds-timespan.pipe.d.ts +9 -0
- package/lib/components/scheduler/pipes/bs-seconds-today-offset/bs-seconds-today-offset.pipe.d.ts +9 -0
- package/lib/components/scheduler/pipes/date-offset/date-offset.pipe.d.ts +8 -0
- package/lib/components/scheduler/pipes/day-of-week/day-of-week.pipe.d.ts +9 -0
- package/lib/components/scheduler/scheduler.module.d.ts +12 -0
- 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,
|
|
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';
|
|
@@ -2002,6 +2002,365 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
2002
2002
|
}]
|
|
2003
2003
|
}] });
|
|
2004
2004
|
|
|
2005
|
+
var EDragOperation;
|
|
2006
|
+
(function (EDragOperation) {
|
|
2007
|
+
EDragOperation[EDragOperation["none"] = 0] = "none";
|
|
2008
|
+
EDragOperation[EDragOperation["createEvent"] = 1] = "createEvent";
|
|
2009
|
+
EDragOperation[EDragOperation["resizeEvent"] = 2] = "resizeEvent";
|
|
2010
|
+
EDragOperation[EDragOperation["moveEvent"] = 3] = "moveEvent";
|
|
2011
|
+
})(EDragOperation || (EDragOperation = {}));
|
|
2012
|
+
|
|
2013
|
+
class BsSecondsTodayOffsetPipe {
|
|
2014
|
+
transform(value) {
|
|
2015
|
+
const today = new Date(value.start);
|
|
2016
|
+
today.setHours(0);
|
|
2017
|
+
today.setMinutes(0);
|
|
2018
|
+
today.setSeconds(0);
|
|
2019
|
+
return (value.start.getTime() - today.getTime()) / 1000;
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
BsSecondsTodayOffsetPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTodayOffsetPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2023
|
+
BsSecondsTodayOffsetPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTodayOffsetPipe, name: "bsSecondsTodayOffset" });
|
|
2024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTodayOffsetPipe, decorators: [{
|
|
2025
|
+
type: Pipe,
|
|
2026
|
+
args: [{
|
|
2027
|
+
name: 'bsSecondsTodayOffset'
|
|
2028
|
+
}]
|
|
2029
|
+
}] });
|
|
2030
|
+
|
|
2031
|
+
class BsSecondsTimespanPipe {
|
|
2032
|
+
transform(value) {
|
|
2033
|
+
return (value.end.getTime() - value.start.getTime()) / 1000;
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
BsSecondsTimespanPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTimespanPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2037
|
+
BsSecondsTimespanPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTimespanPipe, name: "bsSecondsTimespan" });
|
|
2038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSecondsTimespanPipe, decorators: [{
|
|
2039
|
+
type: Pipe,
|
|
2040
|
+
args: [{
|
|
2041
|
+
name: 'bsSecondsTimespan'
|
|
2042
|
+
}]
|
|
2043
|
+
}] });
|
|
2044
|
+
|
|
2045
|
+
class DayOfWeekPipe {
|
|
2046
|
+
transform(value) {
|
|
2047
|
+
const dayOfWeek = value.start.getDay();
|
|
2048
|
+
if (dayOfWeek === 0) {
|
|
2049
|
+
return 7;
|
|
2050
|
+
}
|
|
2051
|
+
else {
|
|
2052
|
+
return dayOfWeek;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
DayOfWeekPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DayOfWeekPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2057
|
+
DayOfWeekPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DayOfWeekPipe, name: "dayOfWeek" });
|
|
2058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DayOfWeekPipe, decorators: [{
|
|
2059
|
+
type: Pipe,
|
|
2060
|
+
args: [{
|
|
2061
|
+
name: 'dayOfWeek'
|
|
2062
|
+
}]
|
|
2063
|
+
}] });
|
|
2064
|
+
|
|
2065
|
+
class BsSchedulerComponent {
|
|
2066
|
+
constructor(calendarMonthService) {
|
|
2067
|
+
this.calendarMonthService = calendarMonthService;
|
|
2068
|
+
this.eventPartsForThisWeek$ = new BehaviorSubject([]);
|
|
2069
|
+
this.timeSlotDuration$ = new BehaviorSubject(1800);
|
|
2070
|
+
this.mouseState$ = new BehaviorSubject(false);
|
|
2071
|
+
this.hoveredTimeSlot$ = new BehaviorSubject(null);
|
|
2072
|
+
this.destroyed$ = new Subject();
|
|
2073
|
+
//#region UnitHeight
|
|
2074
|
+
this.unitHeight$ = new BehaviorSubject(40);
|
|
2075
|
+
this.unitHeightChange = new EventEmitter();
|
|
2076
|
+
this.operation = null;
|
|
2077
|
+
this.dragStartTimeslot = null;
|
|
2078
|
+
const monday = this.calendarMonthService.getMondayBefore(new Date());
|
|
2079
|
+
this.currentWeek$ = new BehaviorSubject(monday);
|
|
2080
|
+
this.daysOfWeek$ = this.currentWeek$.pipe(map((weekMonday) => {
|
|
2081
|
+
weekMonday.setHours(0);
|
|
2082
|
+
weekMonday.setMinutes(0);
|
|
2083
|
+
weekMonday.setSeconds(0);
|
|
2084
|
+
return Array.from(Array(7).keys()).map((x) => this.addDays(weekMonday, x));
|
|
2085
|
+
}));
|
|
2086
|
+
this.events$ = new BehaviorSubject([]);
|
|
2087
|
+
this.eventParts$ = this.events$.pipe(map((events) => {
|
|
2088
|
+
return events.map((ev) => {
|
|
2089
|
+
let startTime = ev.start;
|
|
2090
|
+
const result = [];
|
|
2091
|
+
while (!this.dateEquals(startTime, ev.end)) {
|
|
2092
|
+
const end = new Date(startTime.getFullYear(), startTime.getMonth(), startTime.getDate() + 1, 0, 0, 0);
|
|
2093
|
+
result.push({ start: startTime, end: end, event: ev });
|
|
2094
|
+
startTime = end;
|
|
2095
|
+
}
|
|
2096
|
+
if (startTime != ev.end) {
|
|
2097
|
+
result.push({ start: startTime, end: ev.end, event: ev });
|
|
2098
|
+
}
|
|
2099
|
+
return { event: ev, parts: result };
|
|
2100
|
+
});
|
|
2101
|
+
}));
|
|
2102
|
+
combineLatest([
|
|
2103
|
+
this.daysOfWeek$
|
|
2104
|
+
.pipe(map((daysOfWeek) => {
|
|
2105
|
+
return { start: daysOfWeek[0].getTime(), end: daysOfWeek[daysOfWeek.length - 1].getTime() + 24 * 60 * 60 * 1000 };
|
|
2106
|
+
})),
|
|
2107
|
+
this.eventParts$
|
|
2108
|
+
.pipe(map(eventParts => eventParts.map(evp => evp.parts)))
|
|
2109
|
+
.pipe(map(jaggedParts => {
|
|
2110
|
+
return jaggedParts.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
|
|
2111
|
+
})),
|
|
2112
|
+
this.eventParts$
|
|
2113
|
+
])
|
|
2114
|
+
.pipe(map(([startAndEnd, eventParts, originalEventParts]) => {
|
|
2115
|
+
return eventParts.filter(eventPart => {
|
|
2116
|
+
return !((eventPart.end.getTime() < startAndEnd.start) || (eventPart.start.getTime() > startAndEnd.end));
|
|
2117
|
+
});
|
|
2118
|
+
}))
|
|
2119
|
+
.pipe(takeUntil(this.destroyed$))
|
|
2120
|
+
.subscribe((eventPartsForThisWeek) => {
|
|
2121
|
+
this.eventPartsForThisWeek$.next(eventPartsForThisWeek);
|
|
2122
|
+
});
|
|
2123
|
+
this.timeSlots$ = combineLatest([this.daysOfWeek$, this.timeSlotDuration$])
|
|
2124
|
+
.pipe(map(([daysOfWeek, duration]) => {
|
|
2125
|
+
const timeSlotsPerDay = Math.floor((60 * 60 * 24) / duration);
|
|
2126
|
+
return Array.from(Array(timeSlotsPerDay).keys()).map((index) => {
|
|
2127
|
+
const timeSlotStart = new Date(daysOfWeek[0]);
|
|
2128
|
+
timeSlotStart.setSeconds(timeSlotStart.getSeconds() + index * duration);
|
|
2129
|
+
const timeSlotEnd = new Date(timeSlotStart);
|
|
2130
|
+
timeSlotEnd.setSeconds(timeSlotEnd.getSeconds() + duration);
|
|
2131
|
+
return daysOfWeek.map((day) => {
|
|
2132
|
+
const start = new Date(day);
|
|
2133
|
+
start.setHours(timeSlotStart.getHours());
|
|
2134
|
+
start.setMinutes(timeSlotStart.getMinutes());
|
|
2135
|
+
start.setSeconds(timeSlotStart.getSeconds());
|
|
2136
|
+
const end = new Date(day);
|
|
2137
|
+
end.setHours(timeSlotEnd.getHours());
|
|
2138
|
+
end.setMinutes(timeSlotEnd.getMinutes());
|
|
2139
|
+
end.setSeconds(timeSlotEnd.getSeconds());
|
|
2140
|
+
return { start, end };
|
|
2141
|
+
});
|
|
2142
|
+
});
|
|
2143
|
+
}));
|
|
2144
|
+
this.unitHeight$
|
|
2145
|
+
.pipe(takeUntil(this.destroyed$))
|
|
2146
|
+
.subscribe((unitHeight) => {
|
|
2147
|
+
this.unitHeightChange.emit(unitHeight);
|
|
2148
|
+
});
|
|
2149
|
+
}
|
|
2150
|
+
get unitHeight() {
|
|
2151
|
+
return this.unitHeight$.value;
|
|
2152
|
+
}
|
|
2153
|
+
set unitHeight(value) {
|
|
2154
|
+
this.unitHeight$.next(value);
|
|
2155
|
+
}
|
|
2156
|
+
//#endregion
|
|
2157
|
+
dateEquals(date1, date2) {
|
|
2158
|
+
return (date1.getFullYear() === date2.getFullYear() &&
|
|
2159
|
+
date1.getMonth() === date2.getMonth() &&
|
|
2160
|
+
date1.getDate() === date2.getDate());
|
|
2161
|
+
}
|
|
2162
|
+
addDays(date, days) {
|
|
2163
|
+
const result = new Date(date);
|
|
2164
|
+
result.setDate(result.getDate() + days);
|
|
2165
|
+
return result;
|
|
2166
|
+
}
|
|
2167
|
+
onPreviousWeek() {
|
|
2168
|
+
this.currentWeek$
|
|
2169
|
+
.pipe(map((w) => this.addDays(w, -7)), take(1))
|
|
2170
|
+
.subscribe((w) => this.currentWeek$.next(w));
|
|
2171
|
+
}
|
|
2172
|
+
onNextWeek() {
|
|
2173
|
+
this.currentWeek$
|
|
2174
|
+
.pipe(map((w) => this.addDays(w, 7)), take(1))
|
|
2175
|
+
.subscribe((w) => this.currentWeek$.next(w));
|
|
2176
|
+
}
|
|
2177
|
+
onCreateEvent(ev, slot) {
|
|
2178
|
+
ev.preventDefault();
|
|
2179
|
+
this.mouseState$.next(true);
|
|
2180
|
+
this.dragStartTimeslot = slot;
|
|
2181
|
+
this.operation = {
|
|
2182
|
+
operation: EDragOperation.createEvent,
|
|
2183
|
+
event: {
|
|
2184
|
+
start: slot.start,
|
|
2185
|
+
end: slot.end,
|
|
2186
|
+
color: '#F00',
|
|
2187
|
+
description: 'Test event',
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
this.events$.next([...this.events$.value, this.operation.event]);
|
|
2191
|
+
}
|
|
2192
|
+
onStartDragEvent(eventPart, ev) {
|
|
2193
|
+
ev.preventDefault();
|
|
2194
|
+
this.hoveredTimeSlot$.pipe(take(1)).subscribe((hoveredTimeSlot) => {
|
|
2195
|
+
this.dragStartTimeslot = hoveredTimeSlot;
|
|
2196
|
+
this.operation = {
|
|
2197
|
+
operation: EDragOperation.moveEvent,
|
|
2198
|
+
event: eventPart.event
|
|
2199
|
+
};
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
2202
|
+
//#region hoveredTimeslot$
|
|
2203
|
+
getHoveredTimeslot(ev, timeSlots) {
|
|
2204
|
+
const hoveredSlots = this.timeSlotElements.filter((el) => {
|
|
2205
|
+
const rct = el.nativeElement.getBoundingClientRect();
|
|
2206
|
+
if (rct.left <= ev.x && ev.x <= rct.right && rct.top <= ev.y && ev.y <= rct.bottom) {
|
|
2207
|
+
return true;
|
|
2208
|
+
}
|
|
2209
|
+
else {
|
|
2210
|
+
return false;
|
|
2211
|
+
}
|
|
2212
|
+
});
|
|
2213
|
+
if (!hoveredSlots || hoveredSlots.length === 0) {
|
|
2214
|
+
return null;
|
|
2215
|
+
}
|
|
2216
|
+
const slotElement = hoveredSlots[0].nativeElement;
|
|
2217
|
+
const strRow = slotElement.getAttribute('data-row');
|
|
2218
|
+
if (!strRow) {
|
|
2219
|
+
return null;
|
|
2220
|
+
}
|
|
2221
|
+
const row = parseInt(strRow);
|
|
2222
|
+
const strColumn = slotElement.getAttribute('data-column');
|
|
2223
|
+
if (!strColumn) {
|
|
2224
|
+
return null;
|
|
2225
|
+
}
|
|
2226
|
+
const column = parseInt(strColumn);
|
|
2227
|
+
const slot = timeSlots[row][column];
|
|
2228
|
+
return slot;
|
|
2229
|
+
}
|
|
2230
|
+
onMousemove(ev) {
|
|
2231
|
+
this.timeSlots$.pipe(take(1)).subscribe((timeSlots) => {
|
|
2232
|
+
const hovered = this.getHoveredTimeslot(ev, timeSlots);
|
|
2233
|
+
this.hoveredTimeSlot$.next(hovered);
|
|
2234
|
+
if (this.operation) {
|
|
2235
|
+
switch (this.operation.operation) {
|
|
2236
|
+
case EDragOperation.createEvent:
|
|
2237
|
+
{
|
|
2238
|
+
if (this.operation.event && this.dragStartTimeslot && hovered && (this.operation.event.end.getTime() != hovered.end.getTime())) {
|
|
2239
|
+
if (this.dragStartTimeslot.start.getTime() === hovered.start.getTime()) {
|
|
2240
|
+
// 1 slot
|
|
2241
|
+
}
|
|
2242
|
+
else if (this.dragStartTimeslot.start.getTime() < hovered.start.getTime()) {
|
|
2243
|
+
// Drag down
|
|
2244
|
+
this.operation.event.start = this.dragStartTimeslot.start;
|
|
2245
|
+
this.operation.event.end = hovered.end;
|
|
2246
|
+
this.events$.next(this.events$.value);
|
|
2247
|
+
}
|
|
2248
|
+
else if (this.dragStartTimeslot.start.getTime() > hovered.start.getTime()) {
|
|
2249
|
+
// Drag up
|
|
2250
|
+
this.operation.event.start = hovered.start;
|
|
2251
|
+
this.operation.event.end = this.dragStartTimeslot.end;
|
|
2252
|
+
this.events$.next(this.events$.value);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
break;
|
|
2257
|
+
case EDragOperation.moveEvent:
|
|
2258
|
+
{
|
|
2259
|
+
if (hovered && this.dragStartTimeslot) {
|
|
2260
|
+
this.operation.event.start.setTime(this.operation.event.start.getTime() + hovered.start.getTime() - this.dragStartTimeslot.start.getTime());
|
|
2261
|
+
this.operation.event.end.setTime(this.operation.event.end.getTime() + hovered.start.getTime() - this.dragStartTimeslot.start.getTime());
|
|
2262
|
+
this.dragStartTimeslot = hovered;
|
|
2263
|
+
this.events$.next(this.events$.value);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
break;
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
//#endregion
|
|
2272
|
+
onMouseUp(ev) {
|
|
2273
|
+
if (this.operation) {
|
|
2274
|
+
switch (this.operation.operation) {
|
|
2275
|
+
case EDragOperation.createEvent:
|
|
2276
|
+
{
|
|
2277
|
+
if (this.operation.event) {
|
|
2278
|
+
this.operation = null;
|
|
2279
|
+
this.dragStartTimeslot = null;
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
break;
|
|
2283
|
+
case EDragOperation.moveEvent:
|
|
2284
|
+
{
|
|
2285
|
+
this.operation = null;
|
|
2286
|
+
this.dragStartTimeslot = null;
|
|
2287
|
+
}
|
|
2288
|
+
break;
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
ngOnDestroy() {
|
|
2293
|
+
this.destroyed$.next(true);
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
BsSchedulerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerComponent, deps: [{ token: BsCalendarMonthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2297
|
+
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()\"><</button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeek()\">></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 } });
|
|
2298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerComponent, decorators: [{
|
|
2299
|
+
type: Component,
|
|
2300
|
+
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()\"><</button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeek()\">></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"] }]
|
|
2301
|
+
}], ctorParameters: function () { return [{ type: BsCalendarMonthService }]; }, propDecorators: { timeSlotElements: [{
|
|
2302
|
+
type: ViewChildren,
|
|
2303
|
+
args: ['slot']
|
|
2304
|
+
}], unitHeightChange: [{
|
|
2305
|
+
type: Output
|
|
2306
|
+
}], unitHeight: [{
|
|
2307
|
+
type: Input
|
|
2308
|
+
}], onMousemove: [{
|
|
2309
|
+
type: HostListener,
|
|
2310
|
+
args: ['document:mousemove', ['$event']]
|
|
2311
|
+
}], onMouseUp: [{
|
|
2312
|
+
type: HostListener,
|
|
2313
|
+
args: ['document:mouseup', ['$event']]
|
|
2314
|
+
}] } });
|
|
2315
|
+
|
|
2316
|
+
class DateOffsetPipe {
|
|
2317
|
+
transform(value) {
|
|
2318
|
+
const today = new Date(value.start);
|
|
2319
|
+
today.setHours(0);
|
|
2320
|
+
today.setMinutes(0);
|
|
2321
|
+
today.setSeconds(0);
|
|
2322
|
+
return (value.start.getTime() - today.getTime()) / 1000;
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
DateOffsetPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateOffsetPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2326
|
+
DateOffsetPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateOffsetPipe, name: "dateOffset" });
|
|
2327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateOffsetPipe, decorators: [{
|
|
2328
|
+
type: Pipe,
|
|
2329
|
+
args: [{
|
|
2330
|
+
name: 'dateOffset'
|
|
2331
|
+
}]
|
|
2332
|
+
}] });
|
|
2333
|
+
|
|
2334
|
+
class BsSchedulerModule {
|
|
2335
|
+
}
|
|
2336
|
+
BsSchedulerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2337
|
+
BsSchedulerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, declarations: [BsSchedulerComponent,
|
|
2338
|
+
BsSecondsTimespanPipe,
|
|
2339
|
+
BsSecondsTodayOffsetPipe,
|
|
2340
|
+
DateOffsetPipe,
|
|
2341
|
+
DayOfWeekPipe], imports: [CommonModule], exports: [BsSchedulerComponent] });
|
|
2342
|
+
BsSchedulerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, imports: [[
|
|
2343
|
+
CommonModule
|
|
2344
|
+
]] });
|
|
2345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSchedulerModule, decorators: [{
|
|
2346
|
+
type: NgModule,
|
|
2347
|
+
args: [{
|
|
2348
|
+
declarations: [
|
|
2349
|
+
BsSchedulerComponent,
|
|
2350
|
+
BsSecondsTimespanPipe,
|
|
2351
|
+
BsSecondsTodayOffsetPipe,
|
|
2352
|
+
DateOffsetPipe,
|
|
2353
|
+
DayOfWeekPipe
|
|
2354
|
+
],
|
|
2355
|
+
imports: [
|
|
2356
|
+
CommonModule
|
|
2357
|
+
],
|
|
2358
|
+
exports: [
|
|
2359
|
+
BsSchedulerComponent
|
|
2360
|
+
]
|
|
2361
|
+
}]
|
|
2362
|
+
}] });
|
|
2363
|
+
|
|
2005
2364
|
class BsListGroupItemComponent {
|
|
2006
2365
|
constructor() {
|
|
2007
2366
|
}
|
|
@@ -3603,5 +3962,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3603
3962
|
* Generated bundle index. Do not edit.
|
|
3604
3963
|
*/
|
|
3605
3964
|
|
|
3606
|
-
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 };
|
|
3965
|
+
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 };
|
|
3607
3966
|
//# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map
|