@mintplayer/ng-bootstrap 13.3.3 → 13.3.7

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 (81) hide show
  1. package/_bootstrap.scss +1 -0
  2. package/esm2020/lib/components/calendar/calendar.component.mjs +4 -4
  3. package/esm2020/lib/components/index.mjs +2 -1
  4. package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +2 -2
  5. package/esm2020/lib/components/navbar/navbar-content/navbar-content.directive.mjs +40 -18
  6. package/esm2020/lib/components/offcanvas/components/index.mjs +4 -0
  7. package/esm2020/lib/components/offcanvas/components/offcanvas/offcanvas.component.mjs +62 -0
  8. package/esm2020/lib/components/offcanvas/components/offcanvas-body/offcanvas-body.component.mjs +14 -0
  9. package/esm2020/lib/components/offcanvas/components/offcanvas-header/offcanvas-header.component.mjs +14 -0
  10. package/esm2020/lib/components/offcanvas/directives/index.mjs +2 -0
  11. package/esm2020/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.mjs +27 -0
  12. package/esm2020/lib/components/offcanvas/index.mjs +7 -0
  13. package/esm2020/lib/components/offcanvas/interfaces/index.mjs +2 -0
  14. package/esm2020/lib/components/offcanvas/interfaces/offcanvas-animation-meta.mjs +2 -0
  15. package/esm2020/lib/components/offcanvas/offcanvas.module.mjs +45 -0
  16. package/esm2020/lib/components/offcanvas/providers/offcanvas-content.provider.mjs +3 -0
  17. package/esm2020/lib/components/offcanvas/services/index.mjs +2 -0
  18. package/esm2020/lib/components/offcanvas/services/offcanvas/offcanvas.service.mjs +72 -0
  19. package/esm2020/lib/components/offcanvas/types/index.mjs +2 -0
  20. package/esm2020/lib/components/offcanvas/types/position.mjs +2 -0
  21. package/esm2020/lib/components/scheduler/components/index.mjs +2 -1
  22. package/esm2020/lib/components/scheduler/components/resource-group-presenter/resource-group-presenter.component.mjs +84 -0
  23. package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +197 -72
  24. package/esm2020/lib/components/scheduler/constants/available-scales.mjs +12 -0
  25. package/esm2020/lib/components/scheduler/constants/index.mjs +2 -0
  26. package/esm2020/lib/components/scheduler/enums/index.mjs +2 -0
  27. package/esm2020/lib/components/scheduler/enums/scheduler-mode.mjs +6 -0
  28. package/esm2020/lib/components/scheduler/index.mjs +4 -1
  29. package/esm2020/lib/components/scheduler/interfaces/index.mjs +6 -0
  30. package/esm2020/lib/components/scheduler/interfaces/resource-group.mjs +2 -0
  31. package/esm2020/lib/components/scheduler/interfaces/resource-or-group.mjs +2 -0
  32. package/esm2020/lib/components/scheduler/interfaces/resource.mjs +2 -0
  33. package/esm2020/lib/components/scheduler/interfaces/scheduler-schale.mjs +2 -0
  34. package/esm2020/lib/components/scheduler/interfaces/scheduler-stamp-with-slots.mjs +2 -0
  35. package/esm2020/lib/components/scheduler/interfaces/timeline-options.mjs +2 -0
  36. package/esm2020/lib/components/scheduler/interfaces/week-options.mjs +2 -0
  37. package/esm2020/lib/components/scheduler/scheduler.module.mjs +9 -4
  38. package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +6 -7
  39. package/esm2020/lib/components/snackbar/snackbar.module.mjs +2 -9
  40. package/fesm2015/mintplayer-ng-bootstrap.mjs +553 -106
  41. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  42. package/fesm2020/mintplayer-ng-bootstrap.mjs +550 -106
  43. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  44. package/lib/components/calendar/calendar.component.d.ts +1 -1
  45. package/lib/components/index.d.ts +1 -0
  46. package/lib/components/navbar/navbar-content/navbar-content.directive.d.ts +4 -1
  47. package/lib/components/offcanvas/components/index.d.ts +3 -0
  48. package/lib/components/offcanvas/components/offcanvas/offcanvas.component.d.ts +20 -0
  49. package/lib/components/offcanvas/components/offcanvas-body/offcanvas-body.component.d.ts +8 -0
  50. package/lib/components/offcanvas/components/offcanvas-header/offcanvas-header.component.d.ts +8 -0
  51. package/lib/components/offcanvas/directives/index.d.ts +1 -0
  52. package/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.d.ts +11 -0
  53. package/lib/components/offcanvas/index.d.ts +6 -0
  54. package/lib/components/offcanvas/interfaces/index.d.ts +1 -0
  55. package/lib/components/offcanvas/interfaces/offcanvas-animation-meta.d.ts +7 -0
  56. package/lib/components/offcanvas/offcanvas.module.d.ts +12 -0
  57. package/lib/components/offcanvas/providers/offcanvas-content.provider.d.ts +2 -0
  58. package/lib/components/offcanvas/services/index.d.ts +1 -0
  59. package/lib/components/offcanvas/services/offcanvas/offcanvas.service.d.ts +13 -0
  60. package/lib/components/offcanvas/types/index.d.ts +1 -0
  61. package/lib/components/offcanvas/types/position.d.ts +1 -0
  62. package/lib/components/scheduler/components/index.d.ts +1 -0
  63. package/lib/components/scheduler/components/resource-group-presenter/resource-group-presenter.component.d.ts +26 -0
  64. package/lib/components/scheduler/components/scheduler/scheduler.component.d.ts +32 -11
  65. package/lib/components/scheduler/constants/available-scales.d.ts +2 -0
  66. package/lib/components/scheduler/constants/index.d.ts +1 -0
  67. package/lib/components/scheduler/enums/index.d.ts +1 -0
  68. package/lib/components/scheduler/enums/scheduler-mode.d.ts +4 -0
  69. package/lib/components/scheduler/index.d.ts +3 -0
  70. package/lib/components/scheduler/interfaces/index.d.ts +5 -0
  71. package/lib/components/scheduler/interfaces/resource-group.d.ts +5 -0
  72. package/lib/components/scheduler/interfaces/resource-or-group.d.ts +6 -0
  73. package/lib/components/scheduler/interfaces/resource.d.ts +5 -0
  74. package/lib/components/scheduler/interfaces/scheduler-schale.d.ts +5 -0
  75. package/lib/components/scheduler/interfaces/scheduler-stamp-with-slots.d.ts +6 -0
  76. package/lib/components/scheduler/interfaces/timeline-options.d.ts +3 -0
  77. package/lib/components/scheduler/interfaces/week-options.d.ts +3 -0
  78. package/lib/components/scheduler/scheduler.module.d.ts +3 -2
  79. package/lib/components/snackbar/service/snackbar.service.d.ts +2 -3
  80. package/package.json +1 -1
  81. package/src/styles/utilities/overflow.scss +10 -0
@@ -315,7 +315,7 @@ class BsCalendarComponent {
315
315
  this.weeks$ = this.currentMonth$
316
316
  .pipe(map((month) => this.calendarMonthService.getWeeks(month)))
317
317
  .pipe(takeUntil(this.destroyed$));
318
- this.daysOfWeek$ = this.weeks$
318
+ this.shownDays$ = this.weeks$
319
319
  .pipe(filter((weeks) => weeks.length > 1))
320
320
  .pipe(map((weeks) => weeks[1].days))
321
321
  .pipe(map((days) => {
@@ -384,10 +384,10 @@ class BsCalendarComponent {
384
384
  }
385
385
  }
386
386
  BsCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsCalendarComponent, deps: [{ token: BsCalendarMonthService }], target: i0.ɵɵFactoryTarget.Component });
387
- BsCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsCalendarComponent, selector: "bs-calendar", inputs: { currentMonth: "currentMonth", selectedDate: "selectedDate" }, outputs: { currentMonthChange: "currentMonthChange", selectedDateChange: "selectedDateChange" }, ngImport: i0, template: "<table class=\"table w-auto mb-0\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{ currentMonth$ | async | monthName | ucFirst }}\n {{ (currentMonth$ | async)?.getFullYear() }}\n </td>\n <td>\n <button class=\"btn btn-default border-bottom-0\" (click)=\"nextMonth()\">\n <i class=\"bi bi-chevron-right fw-bolder\"></i>\n </button>\n </td>\n </tr>\n <tr>\n <th></th>\n <th *ngFor=\"let dayOfWeek of daysOfWeek$ | async\" [title]=\"dayOfWeek.long\">\n {{ dayOfWeek.short }}\n </th>\n </tr>\n <tr *ngFor=\"let week of (weeks$ | async)\">\n <th>\n {{ week.number }}\n </th>\n <td [class.selected]=\"day === null ? false : isSameDate(selectedDate$ | async, day.date)\" *ngFor=\"let day of week.days\" (click)=\"goto(day)\">\n <span *ngIf=\"day !== null\" [class.text-muted]=\"!day.isInMonth\">{{ day.dayOfMonth }}</span>\n </td>\n </tr>\n</table>", styles: [".text-muted{color:#9ea7af!important}table{border-collapse:collapse;border:1px solid rgba(0,0,0,.125);background:#fff}table td,table th{width:40px;height:40px;text-align:center}table td span,table th span{cursor:pointer;white-space:nowrap}table td.selected{background-color:#0d6efd;color:#fff}table th{background-color:#f8f9fa}table tr{border-top:none}table tr:first-child>td{border-bottom:1px solid rgba(0,0,0,.125)}table tr:nth-of-type(2)>th:not(:nth-of-type(1)){border-bottom:1px solid rgba(0,0,0,.125)}table tr:not(:nth-of-type(2))>th:nth-of-type(1){border-right:1px solid rgba(0,0,0,.125)}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "ucFirst": UcFirstPipe, "monthName": MonthNamePipe, "async": i1.AsyncPipe } });
387
+ BsCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsCalendarComponent, selector: "bs-calendar", inputs: { currentMonth: "currentMonth", selectedDate: "selectedDate" }, outputs: { currentMonthChange: "currentMonthChange", selectedDateChange: "selectedDateChange" }, ngImport: i0, template: "<table class=\"table w-auto mb-0\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{ currentMonth$ | async | monthName | ucFirst }}\n {{ (currentMonth$ | async)?.getFullYear() }}\n </td>\n <td>\n <button class=\"btn btn-default border-bottom-0\" (click)=\"nextMonth()\">\n <i class=\"bi bi-chevron-right fw-bolder\"></i>\n </button>\n </td>\n </tr>\n <tr>\n <th></th>\n <th *ngFor=\"let dayOfWeek of shownDays$ | async\" [title]=\"dayOfWeek.long\">\n {{ dayOfWeek.short }}\n </th>\n </tr>\n <tr *ngFor=\"let week of (weeks$ | async)\">\n <th>\n {{ week.number }}\n </th>\n <td [class.selected]=\"day === null ? false : isSameDate(selectedDate$ | async, day.date)\" *ngFor=\"let day of week.days\" (click)=\"goto(day)\">\n <span *ngIf=\"day !== null\" [class.text-muted]=\"!day.isInMonth\">{{ day.dayOfMonth }}</span>\n </td>\n </tr>\n</table>", styles: [".text-muted{color:#9ea7af!important}table{border-collapse:collapse;border:1px solid rgba(0,0,0,.125);background:#fff}table td,table th{width:40px;height:40px;text-align:center}table td span,table th span{cursor:pointer;white-space:nowrap}table td.selected{background-color:#0d6efd;color:#fff}table th{background-color:#f8f9fa}table tr{border-top:none}table tr:first-child>td{border-bottom:1px solid rgba(0,0,0,.125)}table tr:nth-of-type(2)>th:not(:nth-of-type(1)){border-bottom:1px solid rgba(0,0,0,.125)}table tr:not(:nth-of-type(2))>th:nth-of-type(1){border-right:1px solid rgba(0,0,0,.125)}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "ucFirst": UcFirstPipe, "monthName": MonthNamePipe, "async": i1.AsyncPipe } });
388
388
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsCalendarComponent, decorators: [{
389
389
  type: Component,
390
- args: [{ selector: 'bs-calendar', template: "<table class=\"table w-auto mb-0\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{ currentMonth$ | async | monthName | ucFirst }}\n {{ (currentMonth$ | async)?.getFullYear() }}\n </td>\n <td>\n <button class=\"btn btn-default border-bottom-0\" (click)=\"nextMonth()\">\n <i class=\"bi bi-chevron-right fw-bolder\"></i>\n </button>\n </td>\n </tr>\n <tr>\n <th></th>\n <th *ngFor=\"let dayOfWeek of daysOfWeek$ | async\" [title]=\"dayOfWeek.long\">\n {{ dayOfWeek.short }}\n </th>\n </tr>\n <tr *ngFor=\"let week of (weeks$ | async)\">\n <th>\n {{ week.number }}\n </th>\n <td [class.selected]=\"day === null ? false : isSameDate(selectedDate$ | async, day.date)\" *ngFor=\"let day of week.days\" (click)=\"goto(day)\">\n <span *ngIf=\"day !== null\" [class.text-muted]=\"!day.isInMonth\">{{ day.dayOfMonth }}</span>\n </td>\n </tr>\n</table>", styles: [".text-muted{color:#9ea7af!important}table{border-collapse:collapse;border:1px solid rgba(0,0,0,.125);background:#fff}table td,table th{width:40px;height:40px;text-align:center}table td span,table th span{cursor:pointer;white-space:nowrap}table td.selected{background-color:#0d6efd;color:#fff}table th{background-color:#f8f9fa}table tr{border-top:none}table tr:first-child>td{border-bottom:1px solid rgba(0,0,0,.125)}table tr:nth-of-type(2)>th:not(:nth-of-type(1)){border-bottom:1px solid rgba(0,0,0,.125)}table tr:not(:nth-of-type(2))>th:nth-of-type(1){border-right:1px solid rgba(0,0,0,.125)}\n"] }]
390
+ args: [{ selector: 'bs-calendar', template: "<table class=\"table w-auto mb-0\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{ currentMonth$ | async | monthName | ucFirst }}\n {{ (currentMonth$ | async)?.getFullYear() }}\n </td>\n <td>\n <button class=\"btn btn-default border-bottom-0\" (click)=\"nextMonth()\">\n <i class=\"bi bi-chevron-right fw-bolder\"></i>\n </button>\n </td>\n </tr>\n <tr>\n <th></th>\n <th *ngFor=\"let dayOfWeek of shownDays$ | async\" [title]=\"dayOfWeek.long\">\n {{ dayOfWeek.short }}\n </th>\n </tr>\n <tr *ngFor=\"let week of (weeks$ | async)\">\n <th>\n {{ week.number }}\n </th>\n <td [class.selected]=\"day === null ? false : isSameDate(selectedDate$ | async, day.date)\" *ngFor=\"let day of week.days\" (click)=\"goto(day)\">\n <span *ngIf=\"day !== null\" [class.text-muted]=\"!day.isInMonth\">{{ day.dayOfMonth }}</span>\n </td>\n </tr>\n</table>", styles: [".text-muted{color:#9ea7af!important}table{border-collapse:collapse;border:1px solid rgba(0,0,0,.125);background:#fff}table td,table th{width:40px;height:40px;text-align:center}table td span,table th span{cursor:pointer;white-space:nowrap}table td.selected{background-color:#0d6efd;color:#fff}table th{background-color:#f8f9fa}table tr{border-top:none}table tr:first-child>td{border-bottom:1px solid rgba(0,0,0,.125)}table tr:nth-of-type(2)>th:not(:nth-of-type(1)){border-bottom:1px solid rgba(0,0,0,.125)}table tr:not(:nth-of-type(2))>th:nth-of-type(1){border-right:1px solid rgba(0,0,0,.125)}\n"] }]
391
391
  }], ctorParameters: function () { return [{ type: BsCalendarMonthService }]; }, propDecorators: { currentMonthChange: [{
392
392
  type: Output
393
393
  }], currentMonth: [{
@@ -732,10 +732,7 @@ BsSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
732
732
  BsSnackbarCloseDirective], imports: [CommonModule,
733
733
  OverlayModule], exports: [BsSnackbarComponent,
734
734
  BsSnackbarCloseDirective] });
735
- BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarModule, providers: [
736
- // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
737
- // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
738
- ], imports: [[
735
+ BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarModule, imports: [[
739
736
  CommonModule,
740
737
  OverlayModule
741
738
  ]] });
@@ -753,26 +750,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
753
750
  exports: [
754
751
  BsSnackbarComponent,
755
752
  BsSnackbarCloseDirective
756
- ],
757
- providers: [
758
- // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
759
- // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
760
753
  ]
761
754
  }]
762
755
  }] });
763
756
 
764
757
  class BsSnackbarService {
765
- constructor(overlay, parentInjector, componentFactoryResolver) {
758
+ constructor(overlay, parentInjector) {
766
759
  this.overlay = overlay;
767
760
  this.parentInjector = parentInjector;
768
- this.componentFactoryResolver = componentFactoryResolver;
769
761
  }
770
762
  show(template) {
771
763
  const injector = Injector.create({
772
764
  providers: [{ provide: SNACKBAR_CONTENT, useValue: template }],
773
765
  parent: this.parentInjector
774
766
  });
775
- const portal = new ComponentPortal(BsSnackbarComponent, null, injector, this.componentFactoryResolver);
767
+ const portal = new ComponentPortal(BsSnackbarComponent, null, injector);
776
768
  const overlayRef = this.overlay.create({
777
769
  scrollStrategy: this.overlay.scrollStrategies.reposition(),
778
770
  positionStrategy: this.overlay.position()
@@ -794,14 +786,14 @@ class BsSnackbarService {
794
786
  snackbar.animationState = 'void';
795
787
  }
796
788
  }
797
- BsSnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
789
+ BsSnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
798
790
  BsSnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarService, providedIn: BsSnackbarModule });
799
791
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarService, decorators: [{
800
792
  type: Injectable,
801
793
  args: [{
802
794
  providedIn: BsSnackbarModule
803
795
  }]
804
- }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; } });
796
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }]; } });
805
797
 
806
798
  class BsCopyDirective {
807
799
  constructor(doc) {
@@ -2007,6 +1999,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2007
1999
  }]
2008
2000
  }] });
2009
2001
 
2002
+ var ESchedulerMode;
2003
+ (function (ESchedulerMode) {
2004
+ ESchedulerMode[ESchedulerMode["week"] = 0] = "week";
2005
+ ESchedulerMode[ESchedulerMode["timeline"] = 1] = "timeline";
2006
+ })(ESchedulerMode || (ESchedulerMode = {}));
2007
+
2010
2008
  var EDragOperation;
2011
2009
  (function (EDragOperation) {
2012
2010
  EDragOperation[EDragOperation["none"] = 0] = "none";
@@ -2078,6 +2076,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2078
2076
  }]
2079
2077
  }] });
2080
2078
 
2079
+ class ResourceGroupPresenterComponent {
2080
+ constructor() {
2081
+ this.level = 0;
2082
+ this.resourceOrGroup$ = new BehaviorSubject(null);
2083
+ this.timeSlots$ = new BehaviorSubject([]);
2084
+ this.isExpanded$ = new BehaviorSubject(false);
2085
+ this.destroyed$ = new Subject();
2086
+ this.data$ = this.resourceOrGroup$
2087
+ .pipe(map((resourceOrGroup) => {
2088
+ if (!resourceOrGroup) {
2089
+ return null;
2090
+ }
2091
+ else if ('children' in resourceOrGroup) {
2092
+ return {
2093
+ resource: null,
2094
+ resourceGroup: resourceOrGroup
2095
+ };
2096
+ }
2097
+ else {
2098
+ return {
2099
+ resource: resourceOrGroup,
2100
+ resourceGroup: null
2101
+ };
2102
+ }
2103
+ }))
2104
+ .pipe(filter((resourceOrGroup) => !!resourceOrGroup))
2105
+ .pipe(map((resourceOrGroup) => resourceOrGroup));
2106
+ this.colSpan$ = this.timeSlots$
2107
+ .pipe(map(timeSlots => timeSlots
2108
+ .map(timeslot => timeslot.slots.length)
2109
+ .reduce((sum, current) => sum + current, 0)));
2110
+ }
2111
+ //#region resourceOrGroup
2112
+ get resourceOrGroup() {
2113
+ return this.resourceOrGroup$.value;
2114
+ }
2115
+ set resourceGroup(value) {
2116
+ this.resourceOrGroup$.next(value);
2117
+ }
2118
+ //#endregion
2119
+ //#region timeSlots
2120
+ get timeSlots() {
2121
+ return this.timeSlots$.value;
2122
+ }
2123
+ set timeSlots(value) {
2124
+ this.timeSlots$.next(value);
2125
+ }
2126
+ //#endregion
2127
+ //#region isExpanded
2128
+ get isExpanded() {
2129
+ return this.isExpanded$.value;
2130
+ }
2131
+ set isExpanded(value) {
2132
+ this.isExpanded$.next(value);
2133
+ }
2134
+ //#endregion
2135
+ toggleExpanded() {
2136
+ this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
2137
+ this.isExpanded$.next(!isExpanded);
2138
+ });
2139
+ }
2140
+ ngOnDestroy() {
2141
+ this.destroyed$.next(true);
2142
+ }
2143
+ }
2144
+ ResourceGroupPresenterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ResourceGroupPresenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2145
+ ResourceGroupPresenterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: ResourceGroupPresenterComponent, selector: "bs-resource-group-presenter", inputs: { level: "level", resourceGroup: "resourceGroup", timeSlots: "timeSlots", isExpanded: "isExpanded" }, ngImport: i0, template: "<ng-container *ngIf=\"(data$ | async) as data\">\n\n <!-- Data is a resource group -->\n <ng-container *ngIf=\"data.resourceGroup\">\n <!-- Header -->\n <tr class=\"p-0 cursor-pointer\" *ngIf=\"(timeSlots$ | async) as timeSlots\" [title]=\"data.resourceGroup.description\">\n <ng-container *ngIf=\"(colSpan$ | async) as colspan\">\n <td class=\"p-2 cursor-pointer\" [colSpan]=\"colspan + 1\" (click)=\"toggleExpanded()\">\n <span class=\"p-2 align-middle position-sticky\">\n <i class=\"bi bi-chevron-down\" [style.padding-left.px]=\"level * 20\" *ngIf=\"isExpanded$ | async\"></i>\n <i class=\"bi bi-chevron-right\" [style.padding-left.px]=\"level * 20\" *ngIf=\"(isExpanded$ | async) === false\"></i>\n {{ data.resourceGroup.description }}\n </span>\n </td>\n </ng-container>\n </tr>\n\n <!-- Subgroups or resources -->\n <ng-container *ngIf=\"isExpanded$ | async\">\n <ng-container *ngIf=\"(timeSlots$ | async) as timeSlots\">\n <ng-container *ngFor=\"let child of data.resourceGroup.children\">\n <bs-resource-group-presenter [resourceGroup]=\"child\" [timeSlots]=\"timeSlots\" [level]=\"level + 1\"></bs-resource-group-presenter>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <!-- Data is a resource -->\n <tr *ngIf=\"data.resource\" class=\"p-0 bordered\" [title]=\"data.resource.description\">\n <td class=\"p-0 bg-white\">\n <div class=\"p-2\">{{ data.resource.description }}</div>\n </td>\n <ng-container *ngFor=\"let slots of (timeSlots$ | async)\">\n <td class=\"bg-white border-1\" *ngFor=\"let slot of slots.slots\">\n <!-- {{ slot.start | date: 'dd/MM/yyyy HH:mm:ss' }} -->\n </td>\n </ng-container>\n </tr>\n</ng-container>", styles: [":host{display:contents}tr{border-bottom-width:1px}tr:not(.bordered) td span.position-sticky{left:0;right:0}\n"], components: [{ type: ResourceGroupPresenterComponent, selector: "bs-resource-group-presenter", inputs: ["level", "resourceGroup", "timeSlots", "isExpanded"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe } });
2146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ResourceGroupPresenterComponent, decorators: [{
2147
+ type: Component,
2148
+ args: [{ selector: 'bs-resource-group-presenter', template: "<ng-container *ngIf=\"(data$ | async) as data\">\n\n <!-- Data is a resource group -->\n <ng-container *ngIf=\"data.resourceGroup\">\n <!-- Header -->\n <tr class=\"p-0 cursor-pointer\" *ngIf=\"(timeSlots$ | async) as timeSlots\" [title]=\"data.resourceGroup.description\">\n <ng-container *ngIf=\"(colSpan$ | async) as colspan\">\n <td class=\"p-2 cursor-pointer\" [colSpan]=\"colspan + 1\" (click)=\"toggleExpanded()\">\n <span class=\"p-2 align-middle position-sticky\">\n <i class=\"bi bi-chevron-down\" [style.padding-left.px]=\"level * 20\" *ngIf=\"isExpanded$ | async\"></i>\n <i class=\"bi bi-chevron-right\" [style.padding-left.px]=\"level * 20\" *ngIf=\"(isExpanded$ | async) === false\"></i>\n {{ data.resourceGroup.description }}\n </span>\n </td>\n </ng-container>\n </tr>\n\n <!-- Subgroups or resources -->\n <ng-container *ngIf=\"isExpanded$ | async\">\n <ng-container *ngIf=\"(timeSlots$ | async) as timeSlots\">\n <ng-container *ngFor=\"let child of data.resourceGroup.children\">\n <bs-resource-group-presenter [resourceGroup]=\"child\" [timeSlots]=\"timeSlots\" [level]=\"level + 1\"></bs-resource-group-presenter>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <!-- Data is a resource -->\n <tr *ngIf=\"data.resource\" class=\"p-0 bordered\" [title]=\"data.resource.description\">\n <td class=\"p-0 bg-white\">\n <div class=\"p-2\">{{ data.resource.description }}</div>\n </td>\n <ng-container *ngFor=\"let slots of (timeSlots$ | async)\">\n <td class=\"bg-white border-1\" *ngFor=\"let slot of slots.slots\">\n <!-- {{ slot.start | date: 'dd/MM/yyyy HH:mm:ss' }} -->\n </td>\n </ng-container>\n </tr>\n</ng-container>", styles: [":host{display:contents}tr{border-bottom-width:1px}tr:not(.bordered) td span.position-sticky{left:0;right:0}\n"] }]
2149
+ }], ctorParameters: function () { return []; }, propDecorators: { level: [{
2150
+ type: Input
2151
+ }], resourceGroup: [{
2152
+ type: Input
2153
+ }], timeSlots: [{
2154
+ type: Input
2155
+ }], isExpanded: [{
2156
+ type: Input
2157
+ }] } });
2158
+
2081
2159
  class BsSecondsTodayOffsetPipe {
2082
2160
  transform(value) {
2083
2161
  const today = new Date(value.start);
@@ -2134,7 +2212,9 @@ class BsSchedulerComponent {
2134
2212
  constructor(calendarMonthService, timelineService) {
2135
2213
  this.calendarMonthService = calendarMonthService;
2136
2214
  this.timelineService = timelineService;
2137
- this.events$ = new BehaviorSubject([]);
2215
+ this.resources$ = new BehaviorSubject([]);
2216
+ this.weekOptions$ = new BehaviorSubject({ unitHeight: 30 });
2217
+ this.timelineOptions$ = new BehaviorSubject({ unitWidth: 50 });
2138
2218
  this.previewEvent$ = new BehaviorSubject(null);
2139
2219
  this.timeSlotDuration$ = new BehaviorSubject(1800);
2140
2220
  this.timeSlots$ = new BehaviorSubject([]);
@@ -2142,35 +2222,66 @@ class BsSchedulerComponent {
2142
2222
  this.hoveredTimeSlot$ = new BehaviorSubject(null);
2143
2223
  this.hoveredEvent$ = new BehaviorSubject(null);
2144
2224
  this.destroyed$ = new Subject();
2145
- //#region UnitHeight
2146
- this.unitHeight$ = new BehaviorSubject(40);
2147
- this.unitHeightChange = new EventEmitter();
2225
+ //#region Mode
2226
+ this.modes = ESchedulerMode;
2227
+ this.mode$ = new BehaviorSubject(ESchedulerMode.week);
2228
+ this.modeChange = new EventEmitter();
2229
+ //#endregion
2230
+ // //#region Scale
2231
+ // scale$ = new BehaviorSubject<SchedulerScale>(availableScales[4]);
2232
+ // @Output() public scaleChange = new EventEmitter<SchedulerScale>();
2233
+ // public get scale() {
2234
+ // return this.scale$.value;
2235
+ // }
2236
+ // @Input() public set scale(value: SchedulerScale) {
2237
+ // this.scale$.next(value);
2238
+ // }
2239
+ // //#endregion
2240
+ //#region WeekOptions
2241
+ this.weekOptionsChange = new EventEmitter();
2242
+ //#endregion
2243
+ //#region TimelineOptions
2244
+ this.timelineOptionsChange = new EventEmitter();
2148
2245
  //#endregion
2149
2246
  //#region maxInnerHeight
2150
2247
  this.maxInnerHeight = null;
2151
2248
  this.operation = null;
2152
2249
  this.dragStartTimeslot = null;
2153
2250
  const monday = this.calendarMonthService.getMondayBefore(new Date());
2154
- this.currentWeek$ = new BehaviorSubject(monday);
2155
- this.daysOfWeek$ = this.currentWeek$.pipe(map((weekMonday) => {
2156
- weekMonday.setHours(0);
2157
- weekMonday.setMinutes(0);
2158
- weekMonday.setSeconds(0);
2159
- weekMonday.setMilliseconds(0);
2160
- return Array.from(Array(7).keys()).map((x) => this.addDays(weekMonday, x));
2251
+ this.currentWeekOrMonth$ = new BehaviorSubject(monday);
2252
+ this.shownDays$ = combineLatest([this.currentWeekOrMonth$, this.mode$])
2253
+ .pipe(map(([currentDay, mode]) => {
2254
+ currentDay.setHours(0);
2255
+ currentDay.setMinutes(0);
2256
+ currentDay.setSeconds(0);
2257
+ currentDay.setMilliseconds(0);
2258
+ switch (mode) {
2259
+ case ESchedulerMode.week: {
2260
+ return Array.from(Array(7).keys()).map((x) => this.addDays(currentDay, x));
2261
+ }
2262
+ case ESchedulerMode.timeline: {
2263
+ const firstDay = new Date(currentDay.getFullYear(), currentDay.getMonth(), 1);
2264
+ const daysOfMonth = new Date(currentDay.getFullYear(), currentDay.getMonth() + 1, 0).getDate();
2265
+ return Array.from(Array(daysOfMonth).keys()).map((x) => this.addDays(firstDay, x));
2266
+ }
2267
+ }
2161
2268
  }));
2162
- this.daysOfWeekWithTimestamps$ = this.daysOfWeek$
2163
- .pipe(map((daysOfWeek) => {
2164
- return { start: daysOfWeek[0].getTime(), end: daysOfWeek[daysOfWeek.length - 1].getTime() + 24 * 60 * 60 * 1000 };
2269
+ this.daysOfWeekWithTimestamps$ = this.shownDays$
2270
+ .pipe(map((shownDays) => {
2271
+ return { start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 };
2165
2272
  }));
2273
+ this.events$ = this.resources$
2274
+ .pipe(map((resourcesOrGroups) => resourcesOrGroups.map(resOrGroup => this.getResourcesForGroup(resOrGroup))))
2275
+ .pipe(map(jaggedResources => jaggedResources.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
2276
+ .pipe(map(resources => resources.map(res => res.events)))
2277
+ .pipe(map(jaggedEvents => jaggedEvents.reduce((flat, toFlatten) => flat.concat(toFlatten), [])));
2278
+ // groups.reduce((flat, toFlatten) => flat.concat(toFlatten.children), [])
2166
2279
  this.eventParts$ = this.events$.pipe(map((events) => events.map((ev) => this.timelineService.splitInParts(ev))));
2167
2280
  this.eventPartsForThisWeek$ = combineLatest([
2168
2281
  this.daysOfWeekWithTimestamps$,
2169
2282
  this.eventParts$
2170
2283
  .pipe(map(eventParts => eventParts.map(evp => evp.parts)))
2171
- .pipe(map(jaggedParts => {
2172
- return jaggedParts.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
2173
- }))
2284
+ .pipe(map(jaggedParts => jaggedParts.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
2174
2285
  ])
2175
2286
  .pipe(map(([startAndEnd, eventParts]) => {
2176
2287
  return eventParts.filter(eventPart => {
@@ -2219,45 +2330,109 @@ class BsSchedulerComponent {
2219
2330
  parts: result
2220
2331
  };
2221
2332
  }));
2222
- combineLatest([this.daysOfWeek$, this.timeSlotDuration$])
2223
- .pipe(map(([daysOfWeek, duration]) => {
2224
- const timeSlotsPerDay = Math.floor((60 * 60 * 24) / duration);
2225
- return Array.from(Array(timeSlotsPerDay).keys()).map((index) => {
2226
- const timeSlotStart = new Date(daysOfWeek[0]);
2227
- timeSlotStart.setTime(+timeSlotStart.getTime() + index * duration * 1000);
2228
- const timeSlotEnd = new Date(timeSlotStart);
2229
- timeSlotEnd.setTime(+timeSlotEnd.getTime() + duration * 1000);
2230
- return daysOfWeek.map((day) => {
2231
- const start = new Date(day);
2232
- start.setHours(timeSlotStart.getHours());
2233
- start.setMinutes(timeSlotStart.getMinutes());
2234
- start.setSeconds(timeSlotStart.getSeconds());
2235
- start.setMilliseconds(timeSlotStart.getMilliseconds());
2236
- const end = new Date(day);
2237
- end.setHours(timeSlotEnd.getHours());
2238
- end.setMinutes(timeSlotEnd.getMinutes());
2239
- end.setSeconds(timeSlotEnd.getSeconds());
2240
- end.setMilliseconds(timeSlotEnd.getMilliseconds());
2241
- end.setDate(end.getDate() + timeSlotEnd.getDate() - timeSlotStart.getDate());
2242
- return { start, end };
2243
- });
2244
- });
2333
+ combineLatest([this.mode$, this.shownDays$, this.timeSlotDuration$])
2334
+ .pipe(filter(([mode, shownDays, duration]) => mode !== null))
2335
+ .pipe(map(([mode, shownDays, duration]) => {
2336
+ switch (mode) {
2337
+ case ESchedulerMode.week: {
2338
+ const timeSlotsPerDay = Math.floor((60 * 60 * 24) / duration);
2339
+ return Array.from(Array(timeSlotsPerDay).keys()).map((index) => {
2340
+ const timeslotForMonday = this.createTimeslot(shownDays[0], index, duration);
2341
+ return {
2342
+ slots: shownDays.map((day) => {
2343
+ const start = new Date(day);
2344
+ start.setHours(timeslotForMonday.start.getHours());
2345
+ start.setMinutes(timeslotForMonday.start.getMinutes());
2346
+ start.setSeconds(timeslotForMonday.start.getSeconds());
2347
+ start.setMilliseconds(timeslotForMonday.start.getMilliseconds());
2348
+ const end = new Date(day);
2349
+ end.setHours(timeslotForMonday.end.getHours());
2350
+ end.setMinutes(timeslotForMonday.end.getMinutes());
2351
+ end.setSeconds(timeslotForMonday.end.getSeconds());
2352
+ end.setMilliseconds(timeslotForMonday.end.getMilliseconds());
2353
+ end.setDate(end.getDate() + timeslotForMonday.end.getDate() - timeslotForMonday.start.getDate());
2354
+ return { start, end };
2355
+ }),
2356
+ stamp: timeslotForMonday.start
2357
+ };
2358
+ });
2359
+ }
2360
+ case ESchedulerMode.timeline: {
2361
+ const totalTimeslots = (24 * 60 * 60) / duration;
2362
+ return shownDays.map((day) => {
2363
+ return {
2364
+ slots: Array.from(Array(totalTimeslots).keys())
2365
+ .map((index) => {
2366
+ return this.createTimeslot(day, index, duration);
2367
+ }),
2368
+ stamp: day
2369
+ };
2370
+ });
2371
+ }
2372
+ default: {
2373
+ throw 'Unknown value for Mode: ' + mode;
2374
+ }
2375
+ }
2245
2376
  }))
2246
2377
  .subscribe((timeslots) => {
2247
2378
  // For performance reasons, we're not using an observable here, but persist the timeslots in a BehaviorSubject.
2248
2379
  this.timeSlots$.next(timeslots);
2249
2380
  });
2250
- this.unitHeight$
2381
+ this.weekOptions$
2251
2382
  .pipe(takeUntil(this.destroyed$))
2252
- .subscribe((unitHeight) => {
2253
- this.unitHeightChange.emit(unitHeight);
2383
+ .subscribe((weekOptions) => {
2384
+ this.weekOptionsChange.emit(weekOptions);
2254
2385
  });
2386
+ this.timelineOptions$
2387
+ .pipe(takeUntil(this.destroyed$))
2388
+ .subscribe((timelineOptions) => {
2389
+ this.timelineOptionsChange.emit(timelineOptions);
2390
+ });
2391
+ // combineLatest([this.mode$, this.scale$])
2392
+ // .pipe(filter(([mode, scale]) => mode === ESchedulerMode.timeline))
2393
+ }
2394
+ createTimeslot(date, index, duration) {
2395
+ const timeSlotStart = new Date(date);
2396
+ timeSlotStart.setTime(+timeSlotStart.getTime() + index * duration * 1000);
2397
+ const timeSlotEnd = new Date(timeSlotStart);
2398
+ timeSlotEnd.setTime(+timeSlotEnd.getTime() + duration * 1000);
2399
+ return { start: timeSlotStart, end: timeSlotEnd };
2400
+ }
2401
+ getResourcesForGroup(resourceOrGroup) {
2402
+ if ('children' in resourceOrGroup) {
2403
+ return resourceOrGroup.children
2404
+ .map((child) => this.getResourcesForGroup(child))
2405
+ .reduce((flat, toFlatten) => flat.concat(toFlatten), []);
2406
+ }
2407
+ else {
2408
+ return [resourceOrGroup];
2409
+ }
2255
2410
  }
2256
- get unitHeight() {
2257
- return this.unitHeight$.value;
2411
+ get mode() {
2412
+ return this.mode$.value;
2258
2413
  }
2259
- set unitHeight(value) {
2260
- this.unitHeight$.next(value);
2414
+ set mode(value) {
2415
+ this.mode$.next(value);
2416
+ }
2417
+ get weekOptions() {
2418
+ return this.weekOptions$.value;
2419
+ }
2420
+ set weekOptions(value) {
2421
+ this.weekOptions$.next(value);
2422
+ }
2423
+ get timelineOptions() {
2424
+ return this.timelineOptions$.value;
2425
+ }
2426
+ set timelineOptions(value) {
2427
+ this.timelineOptions$.next(value);
2428
+ }
2429
+ //#endregion
2430
+ //#region Resources
2431
+ get resources() {
2432
+ return this.resources$.value;
2433
+ }
2434
+ set resources(value) {
2435
+ this.resources$.next(value);
2261
2436
  }
2262
2437
  //#endregion
2263
2438
  addDays(date, days) {
@@ -2265,15 +2440,25 @@ class BsSchedulerComponent {
2265
2440
  result.setDate(result.getDate() + days);
2266
2441
  return result;
2267
2442
  }
2268
- onPreviousWeek() {
2269
- this.currentWeek$
2270
- .pipe(map((w) => this.addDays(w, -7)), take(1))
2271
- .subscribe((w) => this.currentWeek$.next(w));
2443
+ onPreviousWeekOrMonth() {
2444
+ this.onChangeWeekOrMonth(false);
2272
2445
  }
2273
- onNextWeek() {
2274
- this.currentWeek$
2275
- .pipe(map((w) => this.addDays(w, 7)), take(1))
2276
- .subscribe((w) => this.currentWeek$.next(w));
2446
+ onNextWeekOrMonth() {
2447
+ this.onChangeWeekOrMonth(true);
2448
+ }
2449
+ onChangeWeekOrMonth(next) {
2450
+ combineLatest([this.currentWeekOrMonth$, this.mode$])
2451
+ .pipe(map(([currentWeekOrMonth, mode]) => {
2452
+ switch (mode) {
2453
+ case ESchedulerMode.week: {
2454
+ return this.addDays(currentWeekOrMonth, (next ? 7 : -7));
2455
+ }
2456
+ case ESchedulerMode.timeline: {
2457
+ return new Date(currentWeekOrMonth.getFullYear(), currentWeekOrMonth.getMonth() + (next ? 1 : -1), 1);
2458
+ }
2459
+ }
2460
+ }), take(1))
2461
+ .subscribe((w) => this.currentWeekOrMonth$.next(w));
2277
2462
  }
2278
2463
  onHoverEvent(ev) {
2279
2464
  console.log('hovered', ev);
@@ -2373,7 +2558,7 @@ class BsSchedulerComponent {
2373
2558
  return null;
2374
2559
  }
2375
2560
  const column = parseInt(strColumn);
2376
- const slot = timeSlots[row][column];
2561
+ const slot = timeSlots[row].slots[column];
2377
2562
  return slot;
2378
2563
  }
2379
2564
  onMousemove(ev) {
@@ -2481,12 +2666,18 @@ class BsSchedulerComponent {
2481
2666
  if (previewEvent) {
2482
2667
  this.operation = null;
2483
2668
  this.dragStartTimeslot = null;
2484
- this.events$.next([...this.events$.value, {
2485
- start: previewEvent.start,
2486
- end: previewEvent.end,
2487
- color: this.randomColor(),
2488
- description: 'New event'
2489
- }]);
2669
+ this.resources$.next([
2670
+ ...this.resources$.value,
2671
+ {
2672
+ description: 'New resource group',
2673
+ events: [{
2674
+ start: previewEvent.start,
2675
+ end: previewEvent.end,
2676
+ color: this.randomColor(),
2677
+ description: 'New event'
2678
+ }]
2679
+ }
2680
+ ]);
2490
2681
  this.previewEvent$.next(null);
2491
2682
  }
2492
2683
  });
@@ -2504,7 +2695,7 @@ class BsSchedulerComponent {
2504
2695
  this.operation.event.end = previewEvent.end;
2505
2696
  this.operation = null;
2506
2697
  this.dragStartTimeslot = null;
2507
- this.events$.next(this.events$.value);
2698
+ this.resources$.next(this.resources$.value);
2508
2699
  this.previewEvent$.next(null);
2509
2700
  }
2510
2701
  });
@@ -2518,19 +2709,29 @@ class BsSchedulerComponent {
2518
2709
  }
2519
2710
  }
2520
2711
  BsSchedulerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSchedulerComponent, deps: [{ token: BsCalendarMonthService }, { token: BsTimelineService }], target: i0.ɵɵFactoryTarget.Component });
2521
- BsSchedulerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsSchedulerComponent, selector: "bs-scheduler", inputs: { unitHeight: "unitHeight", maxInnerHeight: "maxInnerHeight" }, outputs: { unitHeightChange: "unitHeightChange" }, host: { listeners: { "document:mousemove": "onMousemove($event)", "document:mouseup": "onMouseUp($event)" } }, viewQueries: [{ propertyName: "timeSlotElements", predicate: ["slot"], descendants: true }], ngImport: i0, template: "<div class=\"table d-flex w-100 overflow-y-auto\" [style.max-height.px]=\"null\">\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 calendar-head-cell\" *ngFor=\"let day of (daysOfWeek$ | async)\">\n <span class=\"d-block col-form-label text-center\">\n <span>{{ day | date: 'dd-MM' }}</span><span class=\"d-none d-lg-inline-block\">-{{ day | date: 'yyyy' }}</span>\n </span>\n </div>\n </div>\n </div>\n <div class=\"calendar-body\" [style.height.px]=\"maxInnerHeight\">\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 px-2 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 <ng-container *ngIf=\"(unitHeight$ | async) as unitHeight\">\n <ng-container *ngIf=\"(timelinedEventPartsForThisWeek$ | async) as partData\">\n <div *ngFor=\"let eventPart of partData.parts\" class=\"event p-0\"\n [style.top.px]=\"(eventPart.part | bsSecondsTodayOffset) / timeSlotDuration * unitHeight\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart.part | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\"\n [class.hover]=\"(hoveredEvent$ | async) === eventPart.part.event\"\n [style.width]=\"'calc(100% / ' + partData.total + ')'\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * unitHeight\"\n [style.margin-left]=\"'calc(100% / ' + partData.total + ' * ' + eventPart.index + ')'\">\n\n <div class=\"event-resize top\" *ngIf=\"eventPart.part.start === eventPart.part.event?.start\" (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'top')\"></div>\n <div class=\"event-border\"></div>\n <div class=\"event-wrapper\" *ngIf=\"eventPart.part.event\"\n (mousedown)=\"onStartDragEvent(eventPart.part, $event)\"\n (mouseenter)=\"onHoverEvent(eventPart.part.event)\"\n (mouseleave)=\"onLeaveEvent(eventPart.part.event)\">\n <div class=\"event-bg\" [style.background-color]=\"eventPart.part.event.color\"></div>\n <div class=\"event-label\">{{ eventPart.part.event.description }}</div>\n </div>\n <div class=\"event-resize bottom\" *ngIf=\"eventPart.part.end === eventPart.part.event?.end\" (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'bottom')\"></div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(previewEventPartsForThisWeek$ | async) as previewPartData\">\n <div *ngFor=\"let eventPart of previewPartData\" class=\"event preview p-0\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * unitHeight\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner w-100\" [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * unitHeight\"></div>\n </div>\n </ng-container>\n </ng-container>\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:scroll;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:absolute;-webkit-user-select:none;user-select:none;pointer-events:none}.event.preview{background:#666;opacity:.6}.event .event-border{background:black;top:0;left:0;bottom:3px;width:3px;position:absolute;z-index:10;opacity:.3}.event .event-inner{position:relative;left:0px;right:5px;top:0px;bottom:5px;cursor:move;pointer-events:all;overflow:hidden}.event .event-inner .event-wrapper{width:calc(100% - 2px);margin:1px auto 1px 0;height:calc(100% - 3px)}.event .event-inner .event-wrapper .event-bg{opacity:.5;height:100%;transition:opacity .15s ease-in-out}.event .event-inner .event-wrapper .event-label{position:absolute;top:0;font-size:12px;font-weight:600;padding:4px}.event .event-inner .event-resize{position:absolute;cursor:ns-resize;height:4px;left:0;right:0;z-index:400}.event .event-inner .event-resize.top{top:0}.event .event-inner .event-resize.bottom{bottom:0}.event .event-inner .event-resize:hover{background:#DDD}.event .event-inner.hover .event-bg{opacity:.7!important}@media (max-width: 767px){.table .calendar-head .calendar-head-cell{text-orientation:sideways;writing-mode:vertical-rl}}\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 } });
2712
+ BsSchedulerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsSchedulerComponent, selector: "bs-scheduler", inputs: { mode: "mode", weekOptions: "weekOptions", timelineOptions: "timelineOptions", maxInnerHeight: "maxInnerHeight", resources: "resources" }, outputs: { modeChange: "modeChange", weekOptionsChange: "weekOptionsChange", timelineOptionsChange: "timelineOptionsChange" }, host: { listeners: { "document:mousemove": "onMousemove($event)", "document:mouseup": "onMouseUp($event)" } }, viewQueries: [{ propertyName: "timeSlotElements", predicate: ["slot"], descendants: true }], ngImport: i0, template: "<div class=\"table d-flex w-100 overflow-y-auto mb-0 week-schedule\" [style.max-height.px]=\"null\"\n *ngIf=\"(mode$ | async) === modes.week\">\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)=\"onPreviousWeekOrMonth()\">\n <i class=\"bi-chevron-left px-0\"></i>\n </button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeekOrMonth()\">\n <i class=\"bi-chevron-right px-0\"></i>\n </button>\n </div>\n <div class=\"flex-grow-1 calendar-head-cell\" *ngFor=\"let day of (shownDays$ | async)\">\n <span class=\"d-block col-form-label text-center\">\n <span>{{ day | date: 'dd-MM' }}</span><span class=\"d-none d-lg-inline-block\">-{{ day | date: 'yyyy' }}</span>\n </span>\n </div>\n </div>\n </div>\n <div class=\"calendar-body\" [style.height.px]=\"maxInnerHeight\">\n <div class=\"position-relative\" *ngIf=\"(timeSlots$ | async) as row\">\n <ng-container *ngIf=\"(weekOptions$ | async) as weekOptions\">\n <!-- Timeslots -->\n <div *ngFor=\"let timeslots of row; let i = index\" class=\"d-flex flex-row p-0 timeslot\" [style.height.px]=\"weekOptions.unitHeight\">\n <div class=\"calendar-cell calendar-left align-top px-2 py-0\">{{ timeslots.slots[0].start | date: 'HH:mm:ss' }}</div>\n <div class=\"calendar-cell flex-grow-1\" *ngFor=\"let slot of timeslots.slots; 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 <ng-container *ngIf=\"(timelinedEventPartsForThisWeek$ | async) as partData\">\n <div *ngFor=\"let eventPart of partData.parts\" class=\"event p-0\"\n [style.top.px]=\"(eventPart.part | bsSecondsTodayOffset) / timeSlotDuration * weekOptions.unitHeight\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart.part | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\" [class.hover]=\"(hoveredEvent$ | async) === eventPart.part.event\"\n [style.width]=\"'calc(100% / ' + partData.total + ')'\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\"\n [style.margin-left]=\"'calc(100% / ' + partData.total + ' * ' + eventPart.index + ')'\">\n\n <div class=\"event-resize top\"\n *ngIf=\"eventPart.part.start === eventPart.part.event?.start\"\n (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'top')\"></div>\n <div class=\"event-border\"></div>\n <div class=\"event-wrapper\" *ngIf=\"eventPart.part.event\"\n (mousedown)=\"onStartDragEvent(eventPart.part, $event)\"\n (mouseenter)=\"onHoverEvent(eventPart.part.event)\"\n (mouseleave)=\"onLeaveEvent(eventPart.part.event)\">\n <div class=\"event-bg\" [style.background-color]=\"eventPart.part.event.color\"></div>\n <div class=\"event-label\">{{ eventPart.part.event.description }}</div>\n </div>\n <div class=\"event-resize bottom\"\n *ngIf=\"eventPart.part.end === eventPart.part.event?.end\"\n (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'bottom')\"></div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(previewEventPartsForThisWeek$ | async) as previewPartData\">\n <div *ngFor=\"let eventPart of previewPartData\" class=\"event preview p-0\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * weekOptions.unitHeight\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner w-100\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\">\n </div>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n<div class=\"table d-flex w-100 overflow-y-auto mb-0 bg-white timeline\" *ngIf=\"(mode$ | async) === modes.timeline\">\n <div class=\"calendar-head d-flex\">\n <button class=\"btn flex-start\" (click)=\"onPreviousWeekOrMonth()\">\n <i class=\"bi-chevron-left px-0\"></i>\n </button>\n <div class=\"flex-grow-1 h3 py-2 mb-0 text-center\">{{ currentWeekOrMonth$ | async | date: 'MMMM yyyy' }}</div>\n <button class=\"btn flex-start\" (click)=\"onNextWeekOrMonth()\">\n <i class=\"bi-chevron-right px-0\"></i>\n </button>\n </div>\n <div class=\"calendar-body table-responsive overflow-x-auto\">\n <table class=\"table mb-0\">\n <ng-container *ngIf=\"(timeSlots$ | async) as timeSlots\">\n <tr>\n <td></td>\n <td *ngFor=\"let day of timeSlots\" [attr.colspan]=\"day.slots.length\" class=\"text-center px-2\">\n <span class=\"position-sticky day-label\">{{ day.stamp | date: 'd EE' }}</span>\n </td>\n </tr>\n <tr>\n <td></td>\n <ng-container *ngIf=\"(timelineOptions$ | async) as timelineOptions\">\n <ng-container *ngFor=\"let day of timeSlots\">\n <td *ngFor=\"let slot of day.slots\">\n <span class=\"d-block p-0 text-center\" [style.width.px]=\"timelineOptions.unitWidth\">\n {{ slot.start | date: 'HH:mm' }}\n </span>\n </td>\n </ng-container>\n </ng-container>\n </tr>\n <bs-resource-group-presenter *ngFor=\"let group of (resources$ | async)\" [resourceGroup]=\"group\" [timeSlots]=\"timeSlots\"></bs-resource-group-presenter>\n </ng-container>\n </table>\n </div>\n</div>", styles: [":host{display:block;border:1px solid #333;border-top-right-radius:10px;border-top-left-radius:10px;overflow:hidden}.calendar-head{background:#F7F7F7;color:#007aff}.table .calendar-head{flex:0 0 auto}.table .calendar-body{display:block;flex:1 1 auto}.week-schedule.table{flex-flow:column}.week-schedule.table .calendar-head>div{padding-right:18px}.week-schedule.table .calendar-body{overflow-y:scroll;overflow-x:hidden}.week-schedule.table .calendar-body .calendar-cell{border-right:1px solid #DEE2E6;border-bottom:1px solid #DEE2E6;cursor:default}.week-schedule.table .calendar-body .calendar-cell.hover{border-top-width:3px}.week-schedule.table .calendar-left{width:90px}.week-schedule .event{z-index:5;width:calc((100% - 90px) / 7);height:100px;overflow:hidden;position:absolute;-webkit-user-select:none;user-select:none;pointer-events:none}.week-schedule .event.preview{background:#666;opacity:.6}.week-schedule .event .event-border{background:black;top:0;left:0;bottom:3px;width:3px;position:absolute;z-index:10;opacity:.3}.week-schedule .event .event-inner{position:relative;left:0px;right:5px;top:0px;bottom:5px;cursor:move;pointer-events:all;overflow:hidden}.week-schedule .event .event-inner .event-wrapper{width:calc(100% - 2px);margin:1px auto 1px 0;height:calc(100% - 3px)}.week-schedule .event .event-inner .event-wrapper .event-bg{opacity:.5;height:100%;transition:opacity .15s ease-in-out}.week-schedule .event .event-inner .event-wrapper .event-label{position:absolute;top:0;font-size:12px;font-weight:600;padding:4px}.week-schedule .event .event-inner .event-resize{position:absolute;cursor:ns-resize;height:4px;left:0;right:0;z-index:400}.week-schedule .event .event-inner .event-resize.top{top:0}.week-schedule .event .event-inner .event-resize.bottom{bottom:0}.week-schedule .event .event-inner .event-resize:hover{background:#DDD}.week-schedule .event .event-inner.hover .event-bg{opacity:.7!important}@media (max-width: 767px){.week-schedule.table .calendar-head .calendar-head-cell{text-orientation:sideways;writing-mode:vertical-rl}}.timeline.table{flex-flow:column}.timeline .calendar-body .table{background-color:#f7f7f7}.timeline .calendar-body .table tr:first-child td{background-color:#fff;border:1px solid #000}.timeline .calendar-body .table tr:first-child td:first-child{min-width:10rem}.timeline .calendar-body .table tr:first-child span.day-label{left:0;right:0}.timeline .calendar-body .table tr:nth-child(2) td{border-width:1px;border-color:inherit}.timeline .calendar-body .table>:not(:first-child){border-top:none!important}\n"], components: [{ type: ResourceGroupPresenterComponent, selector: "bs-resource-group-presenter", inputs: ["level", "resourceGroup", "timeSlots", "isExpanded"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe, "date": i1.DatePipe, "bsSecondsTodayOffset": BsSecondsTodayOffsetPipe, "bsSecondsTimespan": BsSecondsTimespanPipe, "dayOfWeek": DayOfWeekPipe } });
2522
2713
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSchedulerComponent, decorators: [{
2523
2714
  type: Component,
2524
- args: [{ selector: 'bs-scheduler', template: "<div class=\"table d-flex w-100 overflow-y-auto\" [style.max-height.px]=\"null\">\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 calendar-head-cell\" *ngFor=\"let day of (daysOfWeek$ | async)\">\n <span class=\"d-block col-form-label text-center\">\n <span>{{ day | date: 'dd-MM' }}</span><span class=\"d-none d-lg-inline-block\">-{{ day | date: 'yyyy' }}</span>\n </span>\n </div>\n </div>\n </div>\n <div class=\"calendar-body\" [style.height.px]=\"maxInnerHeight\">\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 px-2 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 <ng-container *ngIf=\"(unitHeight$ | async) as unitHeight\">\n <ng-container *ngIf=\"(timelinedEventPartsForThisWeek$ | async) as partData\">\n <div *ngFor=\"let eventPart of partData.parts\" class=\"event p-0\"\n [style.top.px]=\"(eventPart.part | bsSecondsTodayOffset) / timeSlotDuration * unitHeight\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart.part | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\"\n [class.hover]=\"(hoveredEvent$ | async) === eventPart.part.event\"\n [style.width]=\"'calc(100% / ' + partData.total + ')'\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * unitHeight\"\n [style.margin-left]=\"'calc(100% / ' + partData.total + ' * ' + eventPart.index + ')'\">\n\n <div class=\"event-resize top\" *ngIf=\"eventPart.part.start === eventPart.part.event?.start\" (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'top')\"></div>\n <div class=\"event-border\"></div>\n <div class=\"event-wrapper\" *ngIf=\"eventPart.part.event\"\n (mousedown)=\"onStartDragEvent(eventPart.part, $event)\"\n (mouseenter)=\"onHoverEvent(eventPart.part.event)\"\n (mouseleave)=\"onLeaveEvent(eventPart.part.event)\">\n <div class=\"event-bg\" [style.background-color]=\"eventPart.part.event.color\"></div>\n <div class=\"event-label\">{{ eventPart.part.event.description }}</div>\n </div>\n <div class=\"event-resize bottom\" *ngIf=\"eventPart.part.end === eventPart.part.event?.end\" (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'bottom')\"></div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(previewEventPartsForThisWeek$ | async) as previewPartData\">\n <div *ngFor=\"let eventPart of previewPartData\" class=\"event preview p-0\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * unitHeight\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner w-100\" [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * unitHeight\"></div>\n </div>\n </ng-container>\n </ng-container>\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:scroll;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:absolute;-webkit-user-select:none;user-select:none;pointer-events:none}.event.preview{background:#666;opacity:.6}.event .event-border{background:black;top:0;left:0;bottom:3px;width:3px;position:absolute;z-index:10;opacity:.3}.event .event-inner{position:relative;left:0px;right:5px;top:0px;bottom:5px;cursor:move;pointer-events:all;overflow:hidden}.event .event-inner .event-wrapper{width:calc(100% - 2px);margin:1px auto 1px 0;height:calc(100% - 3px)}.event .event-inner .event-wrapper .event-bg{opacity:.5;height:100%;transition:opacity .15s ease-in-out}.event .event-inner .event-wrapper .event-label{position:absolute;top:0;font-size:12px;font-weight:600;padding:4px}.event .event-inner .event-resize{position:absolute;cursor:ns-resize;height:4px;left:0;right:0;z-index:400}.event .event-inner .event-resize.top{top:0}.event .event-inner .event-resize.bottom{bottom:0}.event .event-inner .event-resize:hover{background:#DDD}.event .event-inner.hover .event-bg{opacity:.7!important}@media (max-width: 767px){.table .calendar-head .calendar-head-cell{text-orientation:sideways;writing-mode:vertical-rl}}\n"] }]
2715
+ args: [{ selector: 'bs-scheduler', template: "<div class=\"table d-flex w-100 overflow-y-auto mb-0 week-schedule\" [style.max-height.px]=\"null\"\n *ngIf=\"(mode$ | async) === modes.week\">\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)=\"onPreviousWeekOrMonth()\">\n <i class=\"bi-chevron-left px-0\"></i>\n </button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeekOrMonth()\">\n <i class=\"bi-chevron-right px-0\"></i>\n </button>\n </div>\n <div class=\"flex-grow-1 calendar-head-cell\" *ngFor=\"let day of (shownDays$ | async)\">\n <span class=\"d-block col-form-label text-center\">\n <span>{{ day | date: 'dd-MM' }}</span><span class=\"d-none d-lg-inline-block\">-{{ day | date: 'yyyy' }}</span>\n </span>\n </div>\n </div>\n </div>\n <div class=\"calendar-body\" [style.height.px]=\"maxInnerHeight\">\n <div class=\"position-relative\" *ngIf=\"(timeSlots$ | async) as row\">\n <ng-container *ngIf=\"(weekOptions$ | async) as weekOptions\">\n <!-- Timeslots -->\n <div *ngFor=\"let timeslots of row; let i = index\" class=\"d-flex flex-row p-0 timeslot\" [style.height.px]=\"weekOptions.unitHeight\">\n <div class=\"calendar-cell calendar-left align-top px-2 py-0\">{{ timeslots.slots[0].start | date: 'HH:mm:ss' }}</div>\n <div class=\"calendar-cell flex-grow-1\" *ngFor=\"let slot of timeslots.slots; 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 <ng-container *ngIf=\"(timelinedEventPartsForThisWeek$ | async) as partData\">\n <div *ngFor=\"let eventPart of partData.parts\" class=\"event p-0\"\n [style.top.px]=\"(eventPart.part | bsSecondsTodayOffset) / timeSlotDuration * weekOptions.unitHeight\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart.part | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner\" [class.hover]=\"(hoveredEvent$ | async) === eventPart.part.event\"\n [style.width]=\"'calc(100% / ' + partData.total + ')'\"\n [style.height.px]=\"(eventPart.part | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\"\n [style.margin-left]=\"'calc(100% / ' + partData.total + ' * ' + eventPart.index + ')'\">\n\n <div class=\"event-resize top\"\n *ngIf=\"eventPart.part.start === eventPart.part.event?.start\"\n (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'top')\"></div>\n <div class=\"event-border\"></div>\n <div class=\"event-wrapper\" *ngIf=\"eventPart.part.event\"\n (mousedown)=\"onStartDragEvent(eventPart.part, $event)\"\n (mouseenter)=\"onHoverEvent(eventPart.part.event)\"\n (mouseleave)=\"onLeaveEvent(eventPart.part.event)\">\n <div class=\"event-bg\" [style.background-color]=\"eventPart.part.event.color\"></div>\n <div class=\"event-label\">{{ eventPart.part.event.description }}</div>\n </div>\n <div class=\"event-resize bottom\"\n *ngIf=\"eventPart.part.end === eventPart.part.event?.end\"\n (mousedown)=\"onStartResizeEvent(eventPart.part.event, 'bottom')\"></div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(previewEventPartsForThisWeek$ | async) as previewPartData\">\n <div *ngFor=\"let eventPart of previewPartData\" class=\"event preview p-0\"\n [style.top.px]=\"(eventPart | bsSecondsTodayOffset) / timeSlotDuration * weekOptions.unitHeight\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\"\n [style.left]=\"'calc(90px + ((100% - 90px) / 7 * ' + ((eventPart | dayOfWeek) - 1) + '))'\">\n <div class=\"event-inner w-100\"\n [style.height.px]=\"(eventPart | bsSecondsTimespan) / timeSlotDuration * weekOptions.unitHeight\">\n </div>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n<div class=\"table d-flex w-100 overflow-y-auto mb-0 bg-white timeline\" *ngIf=\"(mode$ | async) === modes.timeline\">\n <div class=\"calendar-head d-flex\">\n <button class=\"btn flex-start\" (click)=\"onPreviousWeekOrMonth()\">\n <i class=\"bi-chevron-left px-0\"></i>\n </button>\n <div class=\"flex-grow-1 h3 py-2 mb-0 text-center\">{{ currentWeekOrMonth$ | async | date: 'MMMM yyyy' }}</div>\n <button class=\"btn flex-start\" (click)=\"onNextWeekOrMonth()\">\n <i class=\"bi-chevron-right px-0\"></i>\n </button>\n </div>\n <div class=\"calendar-body table-responsive overflow-x-auto\">\n <table class=\"table mb-0\">\n <ng-container *ngIf=\"(timeSlots$ | async) as timeSlots\">\n <tr>\n <td></td>\n <td *ngFor=\"let day of timeSlots\" [attr.colspan]=\"day.slots.length\" class=\"text-center px-2\">\n <span class=\"position-sticky day-label\">{{ day.stamp | date: 'd EE' }}</span>\n </td>\n </tr>\n <tr>\n <td></td>\n <ng-container *ngIf=\"(timelineOptions$ | async) as timelineOptions\">\n <ng-container *ngFor=\"let day of timeSlots\">\n <td *ngFor=\"let slot of day.slots\">\n <span class=\"d-block p-0 text-center\" [style.width.px]=\"timelineOptions.unitWidth\">\n {{ slot.start | date: 'HH:mm' }}\n </span>\n </td>\n </ng-container>\n </ng-container>\n </tr>\n <bs-resource-group-presenter *ngFor=\"let group of (resources$ | async)\" [resourceGroup]=\"group\" [timeSlots]=\"timeSlots\"></bs-resource-group-presenter>\n </ng-container>\n </table>\n </div>\n</div>", styles: [":host{display:block;border:1px solid #333;border-top-right-radius:10px;border-top-left-radius:10px;overflow:hidden}.calendar-head{background:#F7F7F7;color:#007aff}.table .calendar-head{flex:0 0 auto}.table .calendar-body{display:block;flex:1 1 auto}.week-schedule.table{flex-flow:column}.week-schedule.table .calendar-head>div{padding-right:18px}.week-schedule.table .calendar-body{overflow-y:scroll;overflow-x:hidden}.week-schedule.table .calendar-body .calendar-cell{border-right:1px solid #DEE2E6;border-bottom:1px solid #DEE2E6;cursor:default}.week-schedule.table .calendar-body .calendar-cell.hover{border-top-width:3px}.week-schedule.table .calendar-left{width:90px}.week-schedule .event{z-index:5;width:calc((100% - 90px) / 7);height:100px;overflow:hidden;position:absolute;-webkit-user-select:none;user-select:none;pointer-events:none}.week-schedule .event.preview{background:#666;opacity:.6}.week-schedule .event .event-border{background:black;top:0;left:0;bottom:3px;width:3px;position:absolute;z-index:10;opacity:.3}.week-schedule .event .event-inner{position:relative;left:0px;right:5px;top:0px;bottom:5px;cursor:move;pointer-events:all;overflow:hidden}.week-schedule .event .event-inner .event-wrapper{width:calc(100% - 2px);margin:1px auto 1px 0;height:calc(100% - 3px)}.week-schedule .event .event-inner .event-wrapper .event-bg{opacity:.5;height:100%;transition:opacity .15s ease-in-out}.week-schedule .event .event-inner .event-wrapper .event-label{position:absolute;top:0;font-size:12px;font-weight:600;padding:4px}.week-schedule .event .event-inner .event-resize{position:absolute;cursor:ns-resize;height:4px;left:0;right:0;z-index:400}.week-schedule .event .event-inner .event-resize.top{top:0}.week-schedule .event .event-inner .event-resize.bottom{bottom:0}.week-schedule .event .event-inner .event-resize:hover{background:#DDD}.week-schedule .event .event-inner.hover .event-bg{opacity:.7!important}@media (max-width: 767px){.week-schedule.table .calendar-head .calendar-head-cell{text-orientation:sideways;writing-mode:vertical-rl}}.timeline.table{flex-flow:column}.timeline .calendar-body .table{background-color:#f7f7f7}.timeline .calendar-body .table tr:first-child td{background-color:#fff;border:1px solid #000}.timeline .calendar-body .table tr:first-child td:first-child{min-width:10rem}.timeline .calendar-body .table tr:first-child span.day-label{left:0;right:0}.timeline .calendar-body .table tr:nth-child(2) td{border-width:1px;border-color:inherit}.timeline .calendar-body .table>:not(:first-child){border-top:none!important}\n"] }]
2525
2716
  }], ctorParameters: function () { return [{ type: BsCalendarMonthService }, { type: BsTimelineService }]; }, propDecorators: { timeSlotElements: [{
2526
2717
  type: ViewChildren,
2527
2718
  args: ['slot']
2528
- }], unitHeightChange: [{
2719
+ }], modeChange: [{
2529
2720
  type: Output
2530
- }], unitHeight: [{
2721
+ }], mode: [{
2722
+ type: Input
2723
+ }], weekOptionsChange: [{
2724
+ type: Output
2725
+ }], weekOptions: [{
2726
+ type: Input
2727
+ }], timelineOptionsChange: [{
2728
+ type: Output
2729
+ }], timelineOptions: [{
2531
2730
  type: Input
2532
2731
  }], maxInnerHeight: [{
2533
2732
  type: Input
2733
+ }], resources: [{
2734
+ type: Input
2534
2735
  }], onMousemove: [{
2535
2736
  type: HostListener,
2536
2737
  args: ['document:mousemove', ['$event']]
@@ -2539,6 +2740,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2539
2740
  args: ['document:mouseup', ['$event']]
2540
2741
  }] } });
2541
2742
 
2743
+ const availableScales = [
2744
+ { time: 60, pixels: 60, markerSize: 900 },
2745
+ { time: 120, pixels: 60, markerSize: 900 },
2746
+ { time: 300, pixels: 60, markerSize: 900 },
2747
+ { time: 900, pixels: 60, markerSize: 900 },
2748
+ { time: 3600, pixels: 60, markerSize: 21600 },
2749
+ { time: 7200, pixels: 60, markerSize: 21600 },
2750
+ { time: 10800, pixels: 60, markerSize: 21600 },
2751
+ { time: 21600, pixels: 60, markerSize: 21600 },
2752
+ { time: 86400, pixels: 60, markerSize: 604800 }, // 6000s / 60px = 100 s/px
2753
+ ];
2754
+
2542
2755
  class DateOffsetPipe {
2543
2756
  transform(value) {
2544
2757
  const today = new Date(value.start);
@@ -2564,7 +2777,9 @@ BsSchedulerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
2564
2777
  BsSecondsTimespanPipe,
2565
2778
  BsSecondsTodayOffsetPipe,
2566
2779
  DateOffsetPipe,
2567
- DayOfWeekPipe], imports: [CommonModule], exports: [BsSchedulerComponent] });
2780
+ DayOfWeekPipe,
2781
+ ResourceGroupPresenterComponent], imports: [CommonModule], exports: [BsSchedulerComponent,
2782
+ ResourceGroupPresenterComponent] });
2568
2783
  BsSchedulerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSchedulerModule, imports: [[
2569
2784
  CommonModule
2570
2785
  ]] });
@@ -2576,13 +2791,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2576
2791
  BsSecondsTimespanPipe,
2577
2792
  BsSecondsTodayOffsetPipe,
2578
2793
  DateOffsetPipe,
2579
- DayOfWeekPipe
2794
+ DayOfWeekPipe,
2795
+ ResourceGroupPresenterComponent
2580
2796
  ],
2581
2797
  imports: [
2582
2798
  CommonModule
2583
2799
  ],
2584
2800
  exports: [
2585
- BsSchedulerComponent
2801
+ BsSchedulerComponent,
2802
+ ResourceGroupPresenterComponent
2586
2803
  ]
2587
2804
  }]
2588
2805
  }] });
@@ -2921,10 +3138,10 @@ class BsNavbarComponent {
2921
3138
  }
2922
3139
  }
2923
3140
  BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2924
- BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", 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: { $implicit: (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 } });
3141
+ BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", 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: { $implicit: (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: ["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 } });
2925
3142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsNavbarComponent, decorators: [{
2926
3143
  type: Component,
2927
- 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: { $implicit: (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"] }]
3144
+ 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: { $implicit: (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: ["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"] }]
2928
3145
  }], propDecorators: { nav: [{
2929
3146
  type: ViewChild,
2930
3147
  args: ['nav']
@@ -3155,28 +3372,50 @@ class NavbarContentDirective {
3155
3372
  constructor(element, platformId) {
3156
3373
  this.element = element;
3157
3374
  this.platformId = platformId;
3375
+ this.destroyed$ = new Subject();
3376
+ this.viewInit$ = new BehaviorSubject(false);
3377
+ this.navbar$ = new BehaviorSubject(null);
3378
+ this.resizeObserver = null;
3158
3379
  this.initialPadding = 0;
3159
- if (!isPlatformServer(platformId)) {
3160
- this.resizeObserver = new ResizeObserver((entries) => {
3161
- const height = entries[0].contentRect.height;
3162
- this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
3163
- });
3164
- }
3165
- else {
3166
- this.resizeObserver = null;
3167
- }
3380
+ combineLatest([this.viewInit$, this.navbar$])
3381
+ .pipe(filter(([viewInit, navbar]) => {
3382
+ return viewInit && !!navbar;
3383
+ }))
3384
+ .pipe(take(1))
3385
+ .pipe(takeUntil(this.destroyed$))
3386
+ .subscribe(([viewInit, navbar]) => {
3387
+ if (!isPlatformServer(platformId)) {
3388
+ // Initialize the ResizeObserver
3389
+ this.resizeObserver = new ResizeObserver((entries) => {
3390
+ const height = navbar
3391
+ ? navbar.nav.nativeElement.offsetHeight
3392
+ : entries[0].contentRect.height;
3393
+ this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
3394
+ });
3395
+ // Monitor the size
3396
+ const px = getComputedStyle(this.element.nativeElement).getPropertyValue('padding-top');
3397
+ const pt = parseInt(px.replace(/px$/, ''));
3398
+ this.initialPadding = isNaN(pt) ? 0 : pt;
3399
+ if (this.resizeObserver && navbar) {
3400
+ this.resizeObserver.observe(navbar.nav.nativeElement);
3401
+ }
3402
+ }
3403
+ });
3404
+ this.destroyed$
3405
+ .pipe(filter(d => !!d))
3406
+ .subscribe(() => {
3407
+ var _a, _b;
3408
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.unobserve((_b = this.navbar$.value) === null || _b === void 0 ? void 0 : _b.nav.nativeElement);
3409
+ });
3410
+ }
3411
+ set navbar(value) {
3412
+ this.navbar$.next(value);
3168
3413
  }
3169
3414
  ngAfterViewInit() {
3170
- const pt = parseInt(this.element.nativeElement.style.paddingTop.replace(/px$/, ''));
3171
- this.initialPadding = isNaN(pt) ? 0 : pt;
3172
- if (this.resizeObserver) {
3173
- this.resizeObserver.observe(this.navbar.nav.nativeElement);
3174
- }
3415
+ this.viewInit$.next(true);
3175
3416
  }
3176
3417
  ngOnDestroy() {
3177
- if (this.resizeObserver) {
3178
- this.resizeObserver.unobserve(this.navbar.nav.nativeElement);
3179
- }
3418
+ this.destroyed$.next(true);
3180
3419
  }
3181
3420
  }
3182
3421
  NavbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: NavbarContentDirective, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
@@ -3336,6 +3575,214 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
3336
3575
  }]
3337
3576
  }] });
3338
3577
 
3578
+ class BsOffcanvasHeaderComponent {
3579
+ constructor() { }
3580
+ ngOnInit() {
3581
+ }
3582
+ }
3583
+ BsOffcanvasHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3584
+ BsOffcanvasHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsOffcanvasHeaderComponent, selector: "bs-offcanvas-header", ngImport: i0, template: "<div class=\"offcanvas-header\">\n <ng-content></ng-content>\n</div>\n", styles: [""] });
3585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasHeaderComponent, decorators: [{
3586
+ type: Component,
3587
+ args: [{ selector: 'bs-offcanvas-header', template: "<div class=\"offcanvas-header\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }]
3588
+ }], ctorParameters: function () { return []; } });
3589
+
3590
+ class BsOffcanvasBodyComponent {
3591
+ constructor() { }
3592
+ ngOnInit() {
3593
+ }
3594
+ }
3595
+ BsOffcanvasBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3596
+ BsOffcanvasBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsOffcanvasBodyComponent, selector: "bs-offcanvas-body", ngImport: i0, template: "<div class=\"offcanvas-body small\">\n <ng-content></ng-content>\n</div>", styles: [""] });
3597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasBodyComponent, decorators: [{
3598
+ type: Component,
3599
+ args: [{ selector: 'bs-offcanvas-body', template: "<div class=\"offcanvas-body small\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
3600
+ }], ctorParameters: function () { return []; } });
3601
+
3602
+ const OFFCANVAS_CONTENT = new InjectionToken('OffcanvasContent');
3603
+
3604
+ class BsOffcanvasComponent {
3605
+ constructor(content) {
3606
+ this.size = null;
3607
+ this.displayBlock = true;
3608
+ this.instance = null;
3609
+ this.show$ = new BehaviorSubject(false);
3610
+ this.position$ = new BehaviorSubject('bottom');
3611
+ this.content = content;
3612
+ this.offcanvasClass$ = this.position$
3613
+ .pipe(map((pos) => `offcanvas-${pos}`));
3614
+ this.offcanvasHeight100$ = this.position$
3615
+ .pipe(map((pos) => {
3616
+ switch (this.position) {
3617
+ case 'top':
3618
+ case 'bottom':
3619
+ return false;
3620
+ default:
3621
+ return true;
3622
+ }
3623
+ }));
3624
+ }
3625
+ get width100() {
3626
+ switch (this.position) {
3627
+ case 'top':
3628
+ case 'bottom':
3629
+ return true;
3630
+ default:
3631
+ return false;
3632
+ }
3633
+ }
3634
+ ;
3635
+ //#region Position
3636
+ set position(value) {
3637
+ this.position$.next(value);
3638
+ }
3639
+ get position() {
3640
+ return this.position$.value;
3641
+ }
3642
+ }
3643
+ BsOffcanvasComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasComponent, deps: [{ token: OFFCANVAS_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
3644
+ BsOffcanvasComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: BsOffcanvasComponent, selector: "bs-offcanvas", inputs: { size: "size" }, host: { properties: { "class.d-block": "this.displayBlock", "class.w-100": "this.width100" } }, ngImport: i0, template: "<div class=\"offcanvas\" [class]=\"offcanvasClass$ | async\"\n [class.show]=\"show$ | async\"\n [class.h-100]=\"offcanvasHeight100$ | async\"\n [style.height.px]=\"size\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [".offcanvas{position:relative;visibility:unset}.offcanvas.offcanvas-bottom,.offcanvas.offcanvas-top{height:auto}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe } });
3645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasComponent, decorators: [{
3646
+ type: Component,
3647
+ args: [{ selector: 'bs-offcanvas', template: "<div class=\"offcanvas\" [class]=\"offcanvasClass$ | async\"\n [class.show]=\"show$ | async\"\n [class.h-100]=\"offcanvasHeight100$ | async\"\n [style.height.px]=\"size\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [".offcanvas{position:relative;visibility:unset}.offcanvas.offcanvas-bottom,.offcanvas.offcanvas-top{height:auto}\n"] }]
3648
+ }], ctorParameters: function () {
3649
+ return [{ type: i0.TemplateRef, decorators: [{
3650
+ type: Inject,
3651
+ args: [OFFCANVAS_CONTENT]
3652
+ }] }];
3653
+ }, propDecorators: { size: [{
3654
+ type: Input
3655
+ }], displayBlock: [{
3656
+ type: HostBinding,
3657
+ args: ['class.d-block']
3658
+ }], width100: [{
3659
+ type: HostBinding,
3660
+ args: ['class.w-100']
3661
+ }] } });
3662
+
3663
+ class BsOffcanvasCloseDirective {
3664
+ constructor(offcanvasService) {
3665
+ this.offcanvasService = offcanvasService;
3666
+ }
3667
+ onClick() {
3668
+ this.offcanvasService.hide(this.bsOffcanvasClose);
3669
+ }
3670
+ }
3671
+ BsOffcanvasCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasCloseDirective, deps: [{ token: BsOffcanvasService }], target: i0.ɵɵFactoryTarget.Directive });
3672
+ BsOffcanvasCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: BsOffcanvasCloseDirective, selector: "[bsOffcanvasClose]", inputs: { bsOffcanvasClose: "bsOffcanvasClose" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
3673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasCloseDirective, decorators: [{
3674
+ type: Directive,
3675
+ args: [{
3676
+ selector: '[bsOffcanvasClose]'
3677
+ }]
3678
+ }], ctorParameters: function () { return [{ type: BsOffcanvasService }]; }, propDecorators: { bsOffcanvasClose: [{
3679
+ type: Input
3680
+ }], onClick: [{
3681
+ type: HostListener,
3682
+ args: ['click']
3683
+ }] } });
3684
+
3685
+ class BsOffcanvasModule {
3686
+ }
3687
+ BsOffcanvasModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3688
+ BsOffcanvasModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, declarations: [BsOffcanvasComponent,
3689
+ BsOffcanvasHeaderComponent,
3690
+ BsOffcanvasBodyComponent,
3691
+ BsOffcanvasCloseDirective], imports: [CommonModule,
3692
+ OverlayModule], exports: [BsOffcanvasComponent,
3693
+ BsOffcanvasHeaderComponent,
3694
+ BsOffcanvasBodyComponent,
3695
+ BsOffcanvasCloseDirective] });
3696
+ BsOffcanvasModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, imports: [[
3697
+ CommonModule,
3698
+ OverlayModule
3699
+ ]] });
3700
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, decorators: [{
3701
+ type: NgModule,
3702
+ args: [{
3703
+ declarations: [
3704
+ BsOffcanvasComponent,
3705
+ BsOffcanvasHeaderComponent,
3706
+ BsOffcanvasBodyComponent,
3707
+ BsOffcanvasCloseDirective
3708
+ ],
3709
+ imports: [
3710
+ CommonModule,
3711
+ OverlayModule
3712
+ ],
3713
+ exports: [
3714
+ BsOffcanvasComponent,
3715
+ BsOffcanvasHeaderComponent,
3716
+ BsOffcanvasBodyComponent,
3717
+ BsOffcanvasCloseDirective
3718
+ ]
3719
+ }]
3720
+ }] });
3721
+
3722
+ class BsOffcanvasService {
3723
+ constructor(overlay, parentInjector) {
3724
+ this.overlay = overlay;
3725
+ this.parentInjector = parentInjector;
3726
+ }
3727
+ show(template, position, hasBackdrop = false, backdropClick = null) {
3728
+ const injector = Injector.create({
3729
+ providers: [{ provide: OFFCANVAS_CONTENT, useValue: template }],
3730
+ parent: this.parentInjector
3731
+ });
3732
+ const portal = new ComponentPortal(BsOffcanvasComponent, null, injector);
3733
+ const positioning = this.overlay.position().global();
3734
+ const config = {
3735
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
3736
+ positionStrategy: positioning,
3737
+ hasBackdrop,
3738
+ };
3739
+ switch (position) {
3740
+ case 'bottom':
3741
+ positioning.centerHorizontally().bottom('0');
3742
+ config.width = '100%';
3743
+ break;
3744
+ case 'top':
3745
+ positioning.centerHorizontally().top('0');
3746
+ config.width = '100%';
3747
+ break;
3748
+ case 'start':
3749
+ positioning.centerVertically().left('0');
3750
+ config.height = '100%';
3751
+ break;
3752
+ case 'end':
3753
+ positioning.centerVertically().right('0');
3754
+ config.height = '100%';
3755
+ break;
3756
+ default:
3757
+ throw 'Invalid value for position';
3758
+ }
3759
+ const overlayRef = this.overlay.create(config);
3760
+ const componentInstance = overlayRef.attach(portal);
3761
+ componentInstance.instance.position = position;
3762
+ setTimeout(() => componentInstance.instance.show$.next(true));
3763
+ componentInstance.instance['instance'] = {
3764
+ component: componentInstance,
3765
+ overlay: overlayRef
3766
+ };
3767
+ if (hasBackdrop && backdropClick) {
3768
+ overlayRef.backdropClick().subscribe(() => backdropClick(componentInstance.instance));
3769
+ }
3770
+ return componentInstance.instance;
3771
+ }
3772
+ hide(offcanvas) {
3773
+ offcanvas.show$.next(false);
3774
+ setTimeout(() => { var _a; return (_a = offcanvas['instance']) === null || _a === void 0 ? void 0 : _a.overlay.dispose(); }, 300);
3775
+ }
3776
+ }
3777
+ BsOffcanvasService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
3778
+ BsOffcanvasService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, providedIn: BsOffcanvasModule });
3779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, decorators: [{
3780
+ type: Injectable,
3781
+ args: [{
3782
+ providedIn: BsOffcanvasModule
3783
+ }]
3784
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }]; } });
3785
+
3339
3786
  class BsRatingComponent {
3340
3787
  constructor() {
3341
3788
  this.destroyed$ = new Subject();
@@ -4417,5 +4864,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
4417
4864
  * Generated bundle index. Do not edit.
4418
4865
  */
4419
4866
 
4420
- 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, BsTimepickerComponent, BsTimepickerModule, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
4867
+ 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, BsOffcanvasBodyComponent, BsOffcanvasCloseDirective, BsOffcanvasComponent, BsOffcanvasHeaderComponent, BsOffcanvasModule, BsOffcanvasService, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRatingComponent, BsRatingModule, BsRowTemplateDirective, BsSchedulerComponent, BsSchedulerModule, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsTimepickerComponent, BsTimepickerModule, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, ESchedulerMode, NavLinkDirective, NavbarContentDirective, Position, ResourceGroupPresenterComponent, availableScales };
4421
4868
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map