@mintplayer/ng-bootstrap 13.1.19 → 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 (47) hide show
  1. package/_bootstrap.scss +0 -1
  2. package/esm2020/lib/components/index.mjs +2 -1
  3. package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +7 -4
  4. package/esm2020/lib/components/navbar/navbar-item/navbar-item.component.mjs +12 -6
  5. package/esm2020/lib/components/navbar/navbar-nav/navbar-nav.component.mjs +4 -2
  6. package/esm2020/lib/components/navbar/navbar-toggler/navbar-toggler.component.mjs +8 -5
  7. package/esm2020/lib/components/scheduler/components/index.mjs +2 -0
  8. package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +261 -0
  9. package/esm2020/lib/components/scheduler/enums/drag-operation.mjs +8 -0
  10. package/esm2020/lib/components/scheduler/index.mjs +3 -0
  11. package/esm2020/lib/components/scheduler/interfaces/drag-operation.mjs +2 -0
  12. package/esm2020/lib/components/scheduler/interfaces/scheduler-event-part.mjs +2 -0
  13. package/esm2020/lib/components/scheduler/interfaces/scheduler-event-with-parts.mjs +2 -0
  14. package/esm2020/lib/components/scheduler/interfaces/scheduler-event.mjs +2 -0
  15. package/esm2020/lib/components/scheduler/interfaces/time-slot.mjs +2 -0
  16. package/esm2020/lib/components/scheduler/pipes/bs-seconds-timespan.pipe/bs-seconds-timespan.pipe.mjs +16 -0
  17. package/esm2020/lib/components/scheduler/pipes/bs-seconds-today-offset/bs-seconds-today-offset.pipe.mjs +20 -0
  18. package/esm2020/lib/components/scheduler/pipes/date-offset/date-offset.pipe.mjs +20 -0
  19. package/esm2020/lib/components/scheduler/pipes/day-of-week/day-of-week.pipe.mjs +22 -0
  20. package/esm2020/lib/components/scheduler/scheduler.module.mjs +38 -0
  21. package/esm2020/lib/components/scrollspy/component/scrollspy.component.mjs +8 -6
  22. package/esm2020/lib/components/select2/component/select2.component.mjs +4 -2
  23. package/esm2020/lib/components/typeahead/typeahead.component.mjs +4 -2
  24. package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +1 -1
  25. package/fesm2015/mintplayer-ng-bootstrap.mjs +396 -19
  26. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  27. package/fesm2020/mintplayer-ng-bootstrap.mjs +396 -19
  28. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  29. package/lib/components/index.d.ts +1 -0
  30. package/lib/components/navbar/navbar/navbar.component.d.ts +2 -1
  31. package/lib/components/navbar/navbar-item/navbar-item.component.d.ts +4 -2
  32. package/lib/components/navbar/navbar-toggler/navbar-toggler.component.d.ts +1 -1
  33. package/lib/components/scheduler/components/index.d.ts +1 -0
  34. package/lib/components/scheduler/components/scheduler/scheduler.component.d.ts +42 -0
  35. package/lib/components/scheduler/enums/drag-operation.d.ts +6 -0
  36. package/lib/components/scheduler/index.d.ts +2 -0
  37. package/lib/components/scheduler/interfaces/drag-operation.d.ts +6 -0
  38. package/lib/components/scheduler/interfaces/scheduler-event-part.d.ts +6 -0
  39. package/lib/components/scheduler/interfaces/scheduler-event-with-parts.d.ts +6 -0
  40. package/lib/components/scheduler/interfaces/scheduler-event.d.ts +6 -0
  41. package/lib/components/scheduler/interfaces/time-slot.d.ts +4 -0
  42. package/lib/components/scheduler/pipes/bs-seconds-timespan.pipe/bs-seconds-timespan.pipe.d.ts +9 -0
  43. package/lib/components/scheduler/pipes/bs-seconds-today-offset/bs-seconds-today-offset.pipe.d.ts +9 -0
  44. package/lib/components/scheduler/pipes/date-offset/date-offset.pipe.d.ts +8 -0
  45. package/lib/components/scheduler/pipes/day-of-week/day-of-week.pipe.d.ts +9 -0
  46. package/lib/components/scheduler/scheduler.module.d.ts +12 -0
  47. 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
  }
@@ -2312,6 +2671,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
2312
2671
 
2313
2672
  class BsNavbarComponent {
2314
2673
  constructor() {
2674
+ this.autoclose = true;
2315
2675
  this.expandButtonTemplate = null;
2316
2676
  this.isExpanded$ = new BehaviorSubject(false);
2317
2677
  }
@@ -2322,13 +2682,15 @@ class BsNavbarComponent {
2322
2682
  }
2323
2683
  }
2324
2684
  BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2325
- BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarComponent, selector: "bs-navbar", viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <ng-content select=\"bs-navbar-brand\"></ng-content>\n <button (click)=\"toggleExpanded()\" title=\"Expand/collapse menu\" class=\"align-self-end\" [class.navbar-toggler]=\"!expandButtonTemplate\" [class.bg-transparent]=\"expandButtonTemplate\" [class.shadow-none]=\"expandButtonTemplate\" [class.border-0]=\"expandButtonTemplate\" type=\"button\">\n <ng-container *ngTemplateOutlet=\"expandButtonTemplate ?? defaultExpandButton; context: { state: (isExpanded$ | async) ? 'open' : 'closed' }\"></ng-container>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>\n\n<ng-template #defaultExpandButton>\n <span class=\"navbar-toggler-icon\"></span>\n</ng-template>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe } });
2685
+ BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarComponent, selector: "bs-navbar", inputs: { autoclose: "autoclose" }, viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <ng-content select=\"bs-navbar-brand\"></ng-content>\n <div class=\"flex-end d-md-none d-flex tw\">\n <button (click)=\"toggleExpanded()\" title=\"Expand/collapse menu\" class=\"align-self-center\" [class.navbar-toggler]=\"!expandButtonTemplate\" [class.bg-transparent]=\"expandButtonTemplate\" [class.shadow-none]=\"expandButtonTemplate\" [class.border-0]=\"expandButtonTemplate\" type=\"button\">\n <ng-container *ngTemplateOutlet=\"expandButtonTemplate ?? defaultExpandButton; context: { state: (isExpanded$ | async) ? 'open' : 'closed' }\"></ng-container>\n </button>\n </div>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>\n\n<ng-template #defaultExpandButton>\n <span class=\"navbar-toggler-icon\"></span>\n</ng-template>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}.tw{margin:-.5rem -.6666666667rem}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe } });
2326
2686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
2327
2687
  type: Component,
2328
- args: [{ selector: 'bs-navbar', template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <ng-content select=\"bs-navbar-brand\"></ng-content>\n <button (click)=\"toggleExpanded()\" title=\"Expand/collapse menu\" class=\"align-self-end\" [class.navbar-toggler]=\"!expandButtonTemplate\" [class.bg-transparent]=\"expandButtonTemplate\" [class.shadow-none]=\"expandButtonTemplate\" [class.border-0]=\"expandButtonTemplate\" type=\"button\">\n <ng-container *ngTemplateOutlet=\"expandButtonTemplate ?? defaultExpandButton; context: { state: (isExpanded$ | async) ? 'open' : 'closed' }\"></ng-container>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>\n\n<ng-template #defaultExpandButton>\n <span class=\"navbar-toggler-icon\"></span>\n</ng-template>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] }]
2688
+ args: [{ selector: 'bs-navbar', template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <ng-content select=\"bs-navbar-brand\"></ng-content>\n <div class=\"flex-end d-md-none d-flex tw\">\n <button (click)=\"toggleExpanded()\" title=\"Expand/collapse menu\" class=\"align-self-center\" [class.navbar-toggler]=\"!expandButtonTemplate\" [class.bg-transparent]=\"expandButtonTemplate\" [class.shadow-none]=\"expandButtonTemplate\" [class.border-0]=\"expandButtonTemplate\" type=\"button\">\n <ng-container *ngTemplateOutlet=\"expandButtonTemplate ?? defaultExpandButton; context: { state: (isExpanded$ | async) ? 'open' : 'closed' }\"></ng-container>\n </button>\n </div>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>\n\n<ng-template #defaultExpandButton>\n <span class=\"navbar-toggler-icon\"></span>\n</ng-template>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}.tw{margin:-.5rem -.6666666667rem}\n"] }]
2329
2689
  }], propDecorators: { nav: [{
2330
2690
  type: ViewChild,
2331
2691
  args: ['nav']
2692
+ }], autoclose: [{
2693
+ type: Input
2332
2694
  }] } });
2333
2695
 
2334
2696
  class BsNavbarNavComponent {
@@ -2376,7 +2738,9 @@ class BsNavbarNavComponent {
2376
2738
  //#endregion
2377
2739
  onWindowResize() {
2378
2740
  this.isResizing$.next(true);
2379
- this.windowWidth$.next(window.innerWidth);
2741
+ if (typeof window !== 'undefined') {
2742
+ this.windowWidth$.next(window.innerWidth);
2743
+ }
2380
2744
  }
2381
2745
  }
2382
2746
  BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
@@ -2392,7 +2756,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
2392
2756
  }] } });
2393
2757
 
2394
2758
  class BsNavbarItemComponent {
2395
- constructor(parentDropdown, element) {
2759
+ constructor(navbar, parentDropdown, element) {
2760
+ this.navbar = navbar;
2396
2761
  this.element = element;
2397
2762
  this.hasDropdown = false;
2398
2763
  this.anchorTag = null;
@@ -2419,7 +2784,7 @@ class BsNavbarItemComponent {
2419
2784
  }
2420
2785
  else {
2421
2786
  // Close if this is a link
2422
- if (this.parentDropdown && this.dropdowns.length === 0) {
2787
+ if (this.dropdowns.length === 0) {
2423
2788
  if (this.anchorTag && !this.anchorTag.onclick) {
2424
2789
  this.anchorTag.onclick = (ev) => {
2425
2790
  let d = this.parentDropdown;
@@ -2427,18 +2792,21 @@ class BsNavbarItemComponent {
2427
2792
  d.isVisible = false;
2428
2793
  d = d.parentDropdown;
2429
2794
  }
2795
+ if (this.navbar.autoclose) {
2796
+ this.navbar.isExpanded$.next(false);
2797
+ }
2430
2798
  };
2431
2799
  }
2432
2800
  }
2433
2801
  }
2434
2802
  }
2435
2803
  }
2436
- BsNavbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarItemComponent, deps: [{ token: BsNavbarDropdownComponent, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2804
+ BsNavbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarItemComponent, deps: [{ token: BsNavbarComponent }, { token: BsNavbarDropdownComponent, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2437
2805
  BsNavbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarItemComponent, selector: "bs-navbar-item", queries: [{ propertyName: "dropdowns", predicate: i0.forwardRef(function () { return BsNavbarDropdownComponent; }) }], ngImport: i0, template: "<li [class.nav-item]=\"parentDropdown === null\" [class.dropdown]=\"(dropdowns.length > 0) && (parentDropdown === null)\" [class.dropend]=\"(dropdowns.length > 0) && (parentDropdown !== null)\">\n <ng-content></ng-content>\n</li>", styles: ["li.dropend ::ng-deep a.dropdown-toggle{padding-right:1.5rem}li.dropend ::ng-deep a.dropdown-toggle:after{position:absolute;right:.5rem;top:.75rem}\n"] });
2438
2806
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarItemComponent, decorators: [{
2439
2807
  type: Component,
2440
2808
  args: [{ selector: 'bs-navbar-item', template: "<li [class.nav-item]=\"parentDropdown === null\" [class.dropdown]=\"(dropdowns.length > 0) && (parentDropdown === null)\" [class.dropend]=\"(dropdowns.length > 0) && (parentDropdown !== null)\">\n <ng-content></ng-content>\n</li>", styles: ["li.dropend ::ng-deep a.dropdown-toggle{padding-right:1.5rem}li.dropend ::ng-deep a.dropdown-toggle:after{position:absolute;right:.5rem;top:.75rem}\n"] }]
2441
- }], ctorParameters: function () { return [{ type: BsNavbarDropdownComponent, decorators: [{
2809
+ }], ctorParameters: function () { return [{ type: BsNavbarComponent }, { type: BsNavbarDropdownComponent, decorators: [{
2442
2810
  type: Optional
2443
2811
  }] }, { type: i0.ElementRef }]; }, propDecorators: { dropdowns: [{
2444
2812
  type: ContentChildren,
@@ -2612,7 +2980,7 @@ class BsNavbarTogglerComponent {
2612
2980
  this.stateChange.emit(this._state);
2613
2981
  }
2614
2982
  //#endregion
2615
- toggleState() {
2983
+ toggleState(ev) {
2616
2984
  switch (this._state) {
2617
2985
  case 'open':
2618
2986
  this.state = 'closed';
@@ -2624,14 +2992,17 @@ class BsNavbarTogglerComponent {
2624
2992
  }
2625
2993
  }
2626
2994
  BsNavbarTogglerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarTogglerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2627
- BsNavbarTogglerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarTogglerComponent, selector: "bs-navbar-toggler", inputs: { state: "state" }, outputs: { stateChange: "stateChange" }, ngImport: i0, template: "<div class=\"navbar-toggler float-left\" [ngClass]=\"state\" id=\"navbar-toggler\" (click)=\"toggleState()\">\n <div></div>\n <div></div>\n <div></div>\n</div>", styles: [":host{align-self:start;position:absolute;top:0;right:0;padding:.5rem .75rem}.navbar-toggler{padding:.25rem;border:none}.navbar-toggler>div{width:25px;height:2px;background:#BBB;margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}@media (min-width: 768px){.navbar-toggler.auto>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.auto>div:nth-of-type(2){opacity:0}.navbar-toggler.auto>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2995
+ BsNavbarTogglerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarTogglerComponent, selector: "bs-navbar-toggler", inputs: { state: "state" }, outputs: { stateChange: "stateChange" }, host: { listeners: { "click": "toggleState($event)" } }, ngImport: i0, template: "<div class=\"navbar-toggler float-left\" [ngClass]=\"state\">\n <div></div>\n <div></div>\n <div></div>\n</div>", styles: [":host{align-self:start;top:0;right:0}.navbar-toggler{padding:.75rem 1rem;border:none}.navbar-toggler>div{width:25px;height:2px;background:#BBB;margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}@media (min-width: 768px){.navbar-toggler.auto>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.auto>div:nth-of-type(2){opacity:0}.navbar-toggler.auto>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2628
2996
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarTogglerComponent, decorators: [{
2629
2997
  type: Component,
2630
- args: [{ selector: 'bs-navbar-toggler', template: "<div class=\"navbar-toggler float-left\" [ngClass]=\"state\" id=\"navbar-toggler\" (click)=\"toggleState()\">\n <div></div>\n <div></div>\n <div></div>\n</div>", styles: [":host{align-self:start;position:absolute;top:0;right:0;padding:.5rem .75rem}.navbar-toggler{padding:.25rem;border:none}.navbar-toggler>div{width:25px;height:2px;background:#BBB;margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}@media (min-width: 768px){.navbar-toggler.auto>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.auto>div:nth-of-type(2){opacity:0}.navbar-toggler.auto>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}}\n"] }]
2998
+ args: [{ selector: 'bs-navbar-toggler', template: "<div class=\"navbar-toggler float-left\" [ngClass]=\"state\">\n <div></div>\n <div></div>\n <div></div>\n</div>", styles: [":host{align-self:start;top:0;right:0}.navbar-toggler{padding:.75rem 1rem;border:none}.navbar-toggler>div{width:25px;height:2px;background:#BBB;margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}@media (min-width: 768px){.navbar-toggler.auto>div:nth-of-type(1){transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.auto>div:nth-of-type(2){opacity:0}.navbar-toggler.auto>div:nth-of-type(3){transform:rotate(45deg) translate(-6px,-4px)}}\n"] }]
2631
2999
  }], propDecorators: { stateChange: [{
2632
3000
  type: Output
2633
3001
  }], state: [{
2634
3002
  type: Input
3003
+ }], toggleState: [{
3004
+ type: HostListener,
3005
+ args: ['click', ['$event']]
2635
3006
  }] } });
2636
3007
 
2637
3008
  class BsNavbarModule {
@@ -2874,7 +3245,7 @@ class BsScrollspyComponent {
2874
3245
  }
2875
3246
  }
2876
3247
  scrollToCurrentInSpy() {
2877
- if (window && (window.innerWidth >= 768)) {
3248
+ if ((typeof window !== 'undefined') && (window.innerWidth >= 768)) {
2878
3249
  if (this.activeDirective) {
2879
3250
  const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
2880
3251
  const anchor = this.anchors.get(index);
@@ -2885,10 +3256,12 @@ class BsScrollspyComponent {
2885
3256
  }
2886
3257
  }
2887
3258
  scrollToHeader(directive) {
2888
- const header = directive.element.nativeElement;
2889
- const offsetY = this.scrollOffsetService.getScrollOffset()[1];
2890
- const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
2891
- window.scrollTo({ top: y, behavior: 'smooth' });
3259
+ if (typeof window !== 'undefined') {
3260
+ const header = directive.element.nativeElement;
3261
+ const offsetY = this.scrollOffsetService.getScrollOffset()[1];
3262
+ const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
3263
+ window.scrollTo({ top: y, behavior: 'smooth' });
3264
+ }
2892
3265
  }
2893
3266
  }
2894
3267
  BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
@@ -2997,7 +3370,9 @@ class BsSelect2Component {
2997
3370
  this.focus();
2998
3371
  }
2999
3372
  onResize() {
3000
- this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
3373
+ if (typeof window !== 'undefined') {
3374
+ this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
3375
+ }
3001
3376
  }
3002
3377
  focus() {
3003
3378
  this.searchBox.nativeElement.focus();
@@ -3441,7 +3816,9 @@ class BsTypeaheadComponent {
3441
3816
  this.textbox.nativeElement.focus();
3442
3817
  }
3443
3818
  onResize() {
3444
- this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
3819
+ if (typeof window !== 'undefined') {
3820
+ this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
3821
+ }
3445
3822
  }
3446
3823
  }
3447
3824
  BsTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -3554,5 +3931,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
3554
3931
  * Generated bundle index. Do not edit.
3555
3932
  */
3556
3933
 
3557
- 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 };
3558
3935
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map