@mintplayer/ng-bootstrap 13.3.6 → 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 (78) 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/offcanvas/components/index.mjs +4 -0
  5. package/esm2020/lib/components/offcanvas/components/offcanvas/offcanvas.component.mjs +62 -0
  6. package/esm2020/lib/components/offcanvas/components/offcanvas-body/offcanvas-body.component.mjs +14 -0
  7. package/esm2020/lib/components/offcanvas/components/offcanvas-header/offcanvas-header.component.mjs +14 -0
  8. package/esm2020/lib/components/offcanvas/directives/index.mjs +2 -0
  9. package/esm2020/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.mjs +27 -0
  10. package/esm2020/lib/components/offcanvas/index.mjs +7 -0
  11. package/esm2020/lib/components/offcanvas/interfaces/index.mjs +2 -0
  12. package/esm2020/lib/components/offcanvas/interfaces/offcanvas-animation-meta.mjs +2 -0
  13. package/esm2020/lib/components/offcanvas/offcanvas.module.mjs +45 -0
  14. package/esm2020/lib/components/offcanvas/providers/offcanvas-content.provider.mjs +3 -0
  15. package/esm2020/lib/components/offcanvas/services/index.mjs +2 -0
  16. package/esm2020/lib/components/offcanvas/services/offcanvas/offcanvas.service.mjs +72 -0
  17. package/esm2020/lib/components/offcanvas/types/index.mjs +2 -0
  18. package/esm2020/lib/components/offcanvas/types/position.mjs +2 -0
  19. package/esm2020/lib/components/scheduler/components/index.mjs +2 -1
  20. package/esm2020/lib/components/scheduler/components/resource-group-presenter/resource-group-presenter.component.mjs +84 -0
  21. package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +197 -72
  22. package/esm2020/lib/components/scheduler/constants/available-scales.mjs +12 -0
  23. package/esm2020/lib/components/scheduler/constants/index.mjs +2 -0
  24. package/esm2020/lib/components/scheduler/enums/index.mjs +2 -0
  25. package/esm2020/lib/components/scheduler/enums/scheduler-mode.mjs +6 -0
  26. package/esm2020/lib/components/scheduler/index.mjs +4 -1
  27. package/esm2020/lib/components/scheduler/interfaces/index.mjs +6 -0
  28. package/esm2020/lib/components/scheduler/interfaces/resource-group.mjs +2 -0
  29. package/esm2020/lib/components/scheduler/interfaces/resource-or-group.mjs +2 -0
  30. package/esm2020/lib/components/scheduler/interfaces/resource.mjs +2 -0
  31. package/esm2020/lib/components/scheduler/interfaces/scheduler-schale.mjs +2 -0
  32. package/esm2020/lib/components/scheduler/interfaces/scheduler-stamp-with-slots.mjs +2 -0
  33. package/esm2020/lib/components/scheduler/interfaces/timeline-options.mjs +2 -0
  34. package/esm2020/lib/components/scheduler/interfaces/week-options.mjs +2 -0
  35. package/esm2020/lib/components/scheduler/scheduler.module.mjs +9 -4
  36. package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +6 -7
  37. package/esm2020/lib/components/snackbar/snackbar.module.mjs +2 -9
  38. package/fesm2015/mintplayer-ng-bootstrap.mjs +512 -87
  39. package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
  40. package/fesm2020/mintplayer-ng-bootstrap.mjs +510 -87
  41. package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
  42. package/lib/components/calendar/calendar.component.d.ts +1 -1
  43. package/lib/components/index.d.ts +1 -0
  44. package/lib/components/offcanvas/components/index.d.ts +3 -0
  45. package/lib/components/offcanvas/components/offcanvas/offcanvas.component.d.ts +20 -0
  46. package/lib/components/offcanvas/components/offcanvas-body/offcanvas-body.component.d.ts +8 -0
  47. package/lib/components/offcanvas/components/offcanvas-header/offcanvas-header.component.d.ts +8 -0
  48. package/lib/components/offcanvas/directives/index.d.ts +1 -0
  49. package/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.d.ts +11 -0
  50. package/lib/components/offcanvas/index.d.ts +6 -0
  51. package/lib/components/offcanvas/interfaces/index.d.ts +1 -0
  52. package/lib/components/offcanvas/interfaces/offcanvas-animation-meta.d.ts +7 -0
  53. package/lib/components/offcanvas/offcanvas.module.d.ts +12 -0
  54. package/lib/components/offcanvas/providers/offcanvas-content.provider.d.ts +2 -0
  55. package/lib/components/offcanvas/services/index.d.ts +1 -0
  56. package/lib/components/offcanvas/services/offcanvas/offcanvas.service.d.ts +13 -0
  57. package/lib/components/offcanvas/types/index.d.ts +1 -0
  58. package/lib/components/offcanvas/types/position.d.ts +1 -0
  59. package/lib/components/scheduler/components/index.d.ts +1 -0
  60. package/lib/components/scheduler/components/resource-group-presenter/resource-group-presenter.component.d.ts +26 -0
  61. package/lib/components/scheduler/components/scheduler/scheduler.component.d.ts +32 -11
  62. package/lib/components/scheduler/constants/available-scales.d.ts +2 -0
  63. package/lib/components/scheduler/constants/index.d.ts +1 -0
  64. package/lib/components/scheduler/enums/index.d.ts +1 -0
  65. package/lib/components/scheduler/enums/scheduler-mode.d.ts +4 -0
  66. package/lib/components/scheduler/index.d.ts +3 -0
  67. package/lib/components/scheduler/interfaces/index.d.ts +5 -0
  68. package/lib/components/scheduler/interfaces/resource-group.d.ts +5 -0
  69. package/lib/components/scheduler/interfaces/resource-or-group.d.ts +6 -0
  70. package/lib/components/scheduler/interfaces/resource.d.ts +5 -0
  71. package/lib/components/scheduler/interfaces/scheduler-schale.d.ts +5 -0
  72. package/lib/components/scheduler/interfaces/scheduler-stamp-with-slots.d.ts +6 -0
  73. package/lib/components/scheduler/interfaces/timeline-options.d.ts +3 -0
  74. package/lib/components/scheduler/interfaces/week-options.d.ts +3 -0
  75. package/lib/components/scheduler/scheduler.module.d.ts +3 -2
  76. package/lib/components/snackbar/service/snackbar.service.d.ts +2 -3
  77. package/package.json +1 -1
  78. 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: [{
@@ -730,10 +730,7 @@ BsSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
730
730
  BsSnackbarCloseDirective], imports: [CommonModule,
731
731
  OverlayModule], exports: [BsSnackbarComponent,
732
732
  BsSnackbarCloseDirective] });
733
- BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarModule, providers: [
734
- // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
735
- // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
736
- ], imports: [[
733
+ BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarModule, imports: [[
737
734
  CommonModule,
738
735
  OverlayModule
739
736
  ]] });
@@ -751,26 +748,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
751
748
  exports: [
752
749
  BsSnackbarComponent,
753
750
  BsSnackbarCloseDirective
754
- ],
755
- providers: [
756
- // { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
757
- // { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
758
751
  ]
759
752
  }]
760
753
  }] });
761
754
 
762
755
  class BsSnackbarService {
763
- constructor(overlay, parentInjector, componentFactoryResolver) {
756
+ constructor(overlay, parentInjector) {
764
757
  this.overlay = overlay;
765
758
  this.parentInjector = parentInjector;
766
- this.componentFactoryResolver = componentFactoryResolver;
767
759
  }
768
760
  show(template) {
769
761
  const injector = Injector.create({
770
762
  providers: [{ provide: SNACKBAR_CONTENT, useValue: template }],
771
763
  parent: this.parentInjector
772
764
  });
773
- const portal = new ComponentPortal(BsSnackbarComponent, null, injector, this.componentFactoryResolver);
765
+ const portal = new ComponentPortal(BsSnackbarComponent, null, injector);
774
766
  const overlayRef = this.overlay.create({
775
767
  scrollStrategy: this.overlay.scrollStrategies.reposition(),
776
768
  positionStrategy: this.overlay.position()
@@ -791,14 +783,14 @@ class BsSnackbarService {
791
783
  snackbar.animationState = 'void';
792
784
  }
793
785
  }
794
- 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 });
786
+ 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 });
795
787
  BsSnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarService, providedIn: BsSnackbarModule });
796
788
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSnackbarService, decorators: [{
797
789
  type: Injectable,
798
790
  args: [{
799
791
  providedIn: BsSnackbarModule
800
792
  }]
801
- }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; } });
793
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }]; } });
802
794
 
803
795
  class BsCopyDirective {
804
796
  constructor(doc) {
@@ -1996,6 +1988,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1996
1988
  }]
1997
1989
  }] });
1998
1990
 
1991
+ var ESchedulerMode;
1992
+ (function (ESchedulerMode) {
1993
+ ESchedulerMode[ESchedulerMode["week"] = 0] = "week";
1994
+ ESchedulerMode[ESchedulerMode["timeline"] = 1] = "timeline";
1995
+ })(ESchedulerMode || (ESchedulerMode = {}));
1996
+
1999
1997
  var EDragOperation;
2000
1998
  (function (EDragOperation) {
2001
1999
  EDragOperation[EDragOperation["none"] = 0] = "none";
@@ -2067,6 +2065,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2067
2065
  }]
2068
2066
  }] });
2069
2067
 
2068
+ class ResourceGroupPresenterComponent {
2069
+ constructor() {
2070
+ this.level = 0;
2071
+ this.resourceOrGroup$ = new BehaviorSubject(null);
2072
+ this.timeSlots$ = new BehaviorSubject([]);
2073
+ this.isExpanded$ = new BehaviorSubject(false);
2074
+ this.destroyed$ = new Subject();
2075
+ this.data$ = this.resourceOrGroup$
2076
+ .pipe(map((resourceOrGroup) => {
2077
+ if (!resourceOrGroup) {
2078
+ return null;
2079
+ }
2080
+ else if ('children' in resourceOrGroup) {
2081
+ return {
2082
+ resource: null,
2083
+ resourceGroup: resourceOrGroup
2084
+ };
2085
+ }
2086
+ else {
2087
+ return {
2088
+ resource: resourceOrGroup,
2089
+ resourceGroup: null
2090
+ };
2091
+ }
2092
+ }))
2093
+ .pipe(filter((resourceOrGroup) => !!resourceOrGroup))
2094
+ .pipe(map((resourceOrGroup) => resourceOrGroup));
2095
+ this.colSpan$ = this.timeSlots$
2096
+ .pipe(map(timeSlots => timeSlots
2097
+ .map(timeslot => timeslot.slots.length)
2098
+ .reduce((sum, current) => sum + current, 0)));
2099
+ }
2100
+ //#region resourceOrGroup
2101
+ get resourceOrGroup() {
2102
+ return this.resourceOrGroup$.value;
2103
+ }
2104
+ set resourceGroup(value) {
2105
+ this.resourceOrGroup$.next(value);
2106
+ }
2107
+ //#endregion
2108
+ //#region timeSlots
2109
+ get timeSlots() {
2110
+ return this.timeSlots$.value;
2111
+ }
2112
+ set timeSlots(value) {
2113
+ this.timeSlots$.next(value);
2114
+ }
2115
+ //#endregion
2116
+ //#region isExpanded
2117
+ get isExpanded() {
2118
+ return this.isExpanded$.value;
2119
+ }
2120
+ set isExpanded(value) {
2121
+ this.isExpanded$.next(value);
2122
+ }
2123
+ //#endregion
2124
+ toggleExpanded() {
2125
+ this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
2126
+ this.isExpanded$.next(!isExpanded);
2127
+ });
2128
+ }
2129
+ ngOnDestroy() {
2130
+ this.destroyed$.next(true);
2131
+ }
2132
+ }
2133
+ ResourceGroupPresenterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ResourceGroupPresenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2134
+ 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 } });
2135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ResourceGroupPresenterComponent, decorators: [{
2136
+ type: Component,
2137
+ 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"] }]
2138
+ }], ctorParameters: function () { return []; }, propDecorators: { level: [{
2139
+ type: Input
2140
+ }], resourceGroup: [{
2141
+ type: Input
2142
+ }], timeSlots: [{
2143
+ type: Input
2144
+ }], isExpanded: [{
2145
+ type: Input
2146
+ }] } });
2147
+
2070
2148
  class BsSecondsTodayOffsetPipe {
2071
2149
  transform(value) {
2072
2150
  const today = new Date(value.start);
@@ -2123,7 +2201,9 @@ class BsSchedulerComponent {
2123
2201
  constructor(calendarMonthService, timelineService) {
2124
2202
  this.calendarMonthService = calendarMonthService;
2125
2203
  this.timelineService = timelineService;
2126
- this.events$ = new BehaviorSubject([]);
2204
+ this.resources$ = new BehaviorSubject([]);
2205
+ this.weekOptions$ = new BehaviorSubject({ unitHeight: 30 });
2206
+ this.timelineOptions$ = new BehaviorSubject({ unitWidth: 50 });
2127
2207
  this.previewEvent$ = new BehaviorSubject(null);
2128
2208
  this.timeSlotDuration$ = new BehaviorSubject(1800);
2129
2209
  this.timeSlots$ = new BehaviorSubject([]);
@@ -2131,35 +2211,66 @@ class BsSchedulerComponent {
2131
2211
  this.hoveredTimeSlot$ = new BehaviorSubject(null);
2132
2212
  this.hoveredEvent$ = new BehaviorSubject(null);
2133
2213
  this.destroyed$ = new Subject();
2134
- //#region UnitHeight
2135
- this.unitHeight$ = new BehaviorSubject(40);
2136
- this.unitHeightChange = new EventEmitter();
2214
+ //#region Mode
2215
+ this.modes = ESchedulerMode;
2216
+ this.mode$ = new BehaviorSubject(ESchedulerMode.week);
2217
+ this.modeChange = new EventEmitter();
2218
+ //#endregion
2219
+ // //#region Scale
2220
+ // scale$ = new BehaviorSubject<SchedulerScale>(availableScales[4]);
2221
+ // @Output() public scaleChange = new EventEmitter<SchedulerScale>();
2222
+ // public get scale() {
2223
+ // return this.scale$.value;
2224
+ // }
2225
+ // @Input() public set scale(value: SchedulerScale) {
2226
+ // this.scale$.next(value);
2227
+ // }
2228
+ // //#endregion
2229
+ //#region WeekOptions
2230
+ this.weekOptionsChange = new EventEmitter();
2231
+ //#endregion
2232
+ //#region TimelineOptions
2233
+ this.timelineOptionsChange = new EventEmitter();
2137
2234
  //#endregion
2138
2235
  //#region maxInnerHeight
2139
2236
  this.maxInnerHeight = null;
2140
2237
  this.operation = null;
2141
2238
  this.dragStartTimeslot = null;
2142
2239
  const monday = this.calendarMonthService.getMondayBefore(new Date());
2143
- this.currentWeek$ = new BehaviorSubject(monday);
2144
- this.daysOfWeek$ = this.currentWeek$.pipe(map((weekMonday) => {
2145
- weekMonday.setHours(0);
2146
- weekMonday.setMinutes(0);
2147
- weekMonday.setSeconds(0);
2148
- weekMonday.setMilliseconds(0);
2149
- return Array.from(Array(7).keys()).map((x) => this.addDays(weekMonday, x));
2240
+ this.currentWeekOrMonth$ = new BehaviorSubject(monday);
2241
+ this.shownDays$ = combineLatest([this.currentWeekOrMonth$, this.mode$])
2242
+ .pipe(map(([currentDay, mode]) => {
2243
+ currentDay.setHours(0);
2244
+ currentDay.setMinutes(0);
2245
+ currentDay.setSeconds(0);
2246
+ currentDay.setMilliseconds(0);
2247
+ switch (mode) {
2248
+ case ESchedulerMode.week: {
2249
+ return Array.from(Array(7).keys()).map((x) => this.addDays(currentDay, x));
2250
+ }
2251
+ case ESchedulerMode.timeline: {
2252
+ const firstDay = new Date(currentDay.getFullYear(), currentDay.getMonth(), 1);
2253
+ const daysOfMonth = new Date(currentDay.getFullYear(), currentDay.getMonth() + 1, 0).getDate();
2254
+ return Array.from(Array(daysOfMonth).keys()).map((x) => this.addDays(firstDay, x));
2255
+ }
2256
+ }
2150
2257
  }));
2151
- this.daysOfWeekWithTimestamps$ = this.daysOfWeek$
2152
- .pipe(map((daysOfWeek) => {
2153
- return { start: daysOfWeek[0].getTime(), end: daysOfWeek[daysOfWeek.length - 1].getTime() + 24 * 60 * 60 * 1000 };
2258
+ this.daysOfWeekWithTimestamps$ = this.shownDays$
2259
+ .pipe(map((shownDays) => {
2260
+ return { start: shownDays[0].getTime(), end: shownDays[shownDays.length - 1].getTime() + 24 * 60 * 60 * 1000 };
2154
2261
  }));
2262
+ this.events$ = this.resources$
2263
+ .pipe(map((resourcesOrGroups) => resourcesOrGroups.map(resOrGroup => this.getResourcesForGroup(resOrGroup))))
2264
+ .pipe(map(jaggedResources => jaggedResources.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
2265
+ .pipe(map(resources => resources.map(res => res.events)))
2266
+ .pipe(map(jaggedEvents => jaggedEvents.reduce((flat, toFlatten) => flat.concat(toFlatten), [])));
2267
+ // groups.reduce((flat, toFlatten) => flat.concat(toFlatten.children), [])
2155
2268
  this.eventParts$ = this.events$.pipe(map((events) => events.map((ev) => this.timelineService.splitInParts(ev))));
2156
2269
  this.eventPartsForThisWeek$ = combineLatest([
2157
2270
  this.daysOfWeekWithTimestamps$,
2158
2271
  this.eventParts$
2159
2272
  .pipe(map(eventParts => eventParts.map(evp => evp.parts)))
2160
- .pipe(map(jaggedParts => {
2161
- return jaggedParts.reduce((flat, toFlatten) => flat.concat(toFlatten), []);
2162
- }))
2273
+ .pipe(map(jaggedParts => jaggedParts.reduce((flat, toFlatten) => flat.concat(toFlatten), [])))
2163
2274
  ])
2164
2275
  .pipe(map(([startAndEnd, eventParts]) => {
2165
2276
  return eventParts.filter(eventPart => {
@@ -2208,45 +2319,109 @@ class BsSchedulerComponent {
2208
2319
  parts: result
2209
2320
  };
2210
2321
  }));
2211
- combineLatest([this.daysOfWeek$, this.timeSlotDuration$])
2212
- .pipe(map(([daysOfWeek, duration]) => {
2213
- const timeSlotsPerDay = Math.floor((60 * 60 * 24) / duration);
2214
- return Array.from(Array(timeSlotsPerDay).keys()).map((index) => {
2215
- const timeSlotStart = new Date(daysOfWeek[0]);
2216
- timeSlotStart.setTime(+timeSlotStart.getTime() + index * duration * 1000);
2217
- const timeSlotEnd = new Date(timeSlotStart);
2218
- timeSlotEnd.setTime(+timeSlotEnd.getTime() + duration * 1000);
2219
- return daysOfWeek.map((day) => {
2220
- const start = new Date(day);
2221
- start.setHours(timeSlotStart.getHours());
2222
- start.setMinutes(timeSlotStart.getMinutes());
2223
- start.setSeconds(timeSlotStart.getSeconds());
2224
- start.setMilliseconds(timeSlotStart.getMilliseconds());
2225
- const end = new Date(day);
2226
- end.setHours(timeSlotEnd.getHours());
2227
- end.setMinutes(timeSlotEnd.getMinutes());
2228
- end.setSeconds(timeSlotEnd.getSeconds());
2229
- end.setMilliseconds(timeSlotEnd.getMilliseconds());
2230
- end.setDate(end.getDate() + timeSlotEnd.getDate() - timeSlotStart.getDate());
2231
- return { start, end };
2232
- });
2233
- });
2322
+ combineLatest([this.mode$, this.shownDays$, this.timeSlotDuration$])
2323
+ .pipe(filter(([mode, shownDays, duration]) => mode !== null))
2324
+ .pipe(map(([mode, shownDays, duration]) => {
2325
+ switch (mode) {
2326
+ case ESchedulerMode.week: {
2327
+ const timeSlotsPerDay = Math.floor((60 * 60 * 24) / duration);
2328
+ return Array.from(Array(timeSlotsPerDay).keys()).map((index) => {
2329
+ const timeslotForMonday = this.createTimeslot(shownDays[0], index, duration);
2330
+ return {
2331
+ slots: shownDays.map((day) => {
2332
+ const start = new Date(day);
2333
+ start.setHours(timeslotForMonday.start.getHours());
2334
+ start.setMinutes(timeslotForMonday.start.getMinutes());
2335
+ start.setSeconds(timeslotForMonday.start.getSeconds());
2336
+ start.setMilliseconds(timeslotForMonday.start.getMilliseconds());
2337
+ const end = new Date(day);
2338
+ end.setHours(timeslotForMonday.end.getHours());
2339
+ end.setMinutes(timeslotForMonday.end.getMinutes());
2340
+ end.setSeconds(timeslotForMonday.end.getSeconds());
2341
+ end.setMilliseconds(timeslotForMonday.end.getMilliseconds());
2342
+ end.setDate(end.getDate() + timeslotForMonday.end.getDate() - timeslotForMonday.start.getDate());
2343
+ return { start, end };
2344
+ }),
2345
+ stamp: timeslotForMonday.start
2346
+ };
2347
+ });
2348
+ }
2349
+ case ESchedulerMode.timeline: {
2350
+ const totalTimeslots = (24 * 60 * 60) / duration;
2351
+ return shownDays.map((day) => {
2352
+ return {
2353
+ slots: Array.from(Array(totalTimeslots).keys())
2354
+ .map((index) => {
2355
+ return this.createTimeslot(day, index, duration);
2356
+ }),
2357
+ stamp: day
2358
+ };
2359
+ });
2360
+ }
2361
+ default: {
2362
+ throw 'Unknown value for Mode: ' + mode;
2363
+ }
2364
+ }
2234
2365
  }))
2235
2366
  .subscribe((timeslots) => {
2236
2367
  // For performance reasons, we're not using an observable here, but persist the timeslots in a BehaviorSubject.
2237
2368
  this.timeSlots$.next(timeslots);
2238
2369
  });
2239
- this.unitHeight$
2370
+ this.weekOptions$
2240
2371
  .pipe(takeUntil(this.destroyed$))
2241
- .subscribe((unitHeight) => {
2242
- this.unitHeightChange.emit(unitHeight);
2372
+ .subscribe((weekOptions) => {
2373
+ this.weekOptionsChange.emit(weekOptions);
2243
2374
  });
2375
+ this.timelineOptions$
2376
+ .pipe(takeUntil(this.destroyed$))
2377
+ .subscribe((timelineOptions) => {
2378
+ this.timelineOptionsChange.emit(timelineOptions);
2379
+ });
2380
+ // combineLatest([this.mode$, this.scale$])
2381
+ // .pipe(filter(([mode, scale]) => mode === ESchedulerMode.timeline))
2382
+ }
2383
+ createTimeslot(date, index, duration) {
2384
+ const timeSlotStart = new Date(date);
2385
+ timeSlotStart.setTime(+timeSlotStart.getTime() + index * duration * 1000);
2386
+ const timeSlotEnd = new Date(timeSlotStart);
2387
+ timeSlotEnd.setTime(+timeSlotEnd.getTime() + duration * 1000);
2388
+ return { start: timeSlotStart, end: timeSlotEnd };
2389
+ }
2390
+ getResourcesForGroup(resourceOrGroup) {
2391
+ if ('children' in resourceOrGroup) {
2392
+ return resourceOrGroup.children
2393
+ .map((child) => this.getResourcesForGroup(child))
2394
+ .reduce((flat, toFlatten) => flat.concat(toFlatten), []);
2395
+ }
2396
+ else {
2397
+ return [resourceOrGroup];
2398
+ }
2399
+ }
2400
+ get mode() {
2401
+ return this.mode$.value;
2402
+ }
2403
+ set mode(value) {
2404
+ this.mode$.next(value);
2405
+ }
2406
+ get weekOptions() {
2407
+ return this.weekOptions$.value;
2408
+ }
2409
+ set weekOptions(value) {
2410
+ this.weekOptions$.next(value);
2411
+ }
2412
+ get timelineOptions() {
2413
+ return this.timelineOptions$.value;
2244
2414
  }
2245
- get unitHeight() {
2246
- return this.unitHeight$.value;
2415
+ set timelineOptions(value) {
2416
+ this.timelineOptions$.next(value);
2247
2417
  }
2248
- set unitHeight(value) {
2249
- this.unitHeight$.next(value);
2418
+ //#endregion
2419
+ //#region Resources
2420
+ get resources() {
2421
+ return this.resources$.value;
2422
+ }
2423
+ set resources(value) {
2424
+ this.resources$.next(value);
2250
2425
  }
2251
2426
  //#endregion
2252
2427
  addDays(date, days) {
@@ -2254,15 +2429,25 @@ class BsSchedulerComponent {
2254
2429
  result.setDate(result.getDate() + days);
2255
2430
  return result;
2256
2431
  }
2257
- onPreviousWeek() {
2258
- this.currentWeek$
2259
- .pipe(map((w) => this.addDays(w, -7)), take(1))
2260
- .subscribe((w) => this.currentWeek$.next(w));
2432
+ onPreviousWeekOrMonth() {
2433
+ this.onChangeWeekOrMonth(false);
2434
+ }
2435
+ onNextWeekOrMonth() {
2436
+ this.onChangeWeekOrMonth(true);
2261
2437
  }
2262
- onNextWeek() {
2263
- this.currentWeek$
2264
- .pipe(map((w) => this.addDays(w, 7)), take(1))
2265
- .subscribe((w) => this.currentWeek$.next(w));
2438
+ onChangeWeekOrMonth(next) {
2439
+ combineLatest([this.currentWeekOrMonth$, this.mode$])
2440
+ .pipe(map(([currentWeekOrMonth, mode]) => {
2441
+ switch (mode) {
2442
+ case ESchedulerMode.week: {
2443
+ return this.addDays(currentWeekOrMonth, (next ? 7 : -7));
2444
+ }
2445
+ case ESchedulerMode.timeline: {
2446
+ return new Date(currentWeekOrMonth.getFullYear(), currentWeekOrMonth.getMonth() + (next ? 1 : -1), 1);
2447
+ }
2448
+ }
2449
+ }), take(1))
2450
+ .subscribe((w) => this.currentWeekOrMonth$.next(w));
2266
2451
  }
2267
2452
  onHoverEvent(ev) {
2268
2453
  console.log('hovered', ev);
@@ -2362,7 +2547,7 @@ class BsSchedulerComponent {
2362
2547
  return null;
2363
2548
  }
2364
2549
  const column = parseInt(strColumn);
2365
- const slot = timeSlots[row][column];
2550
+ const slot = timeSlots[row].slots[column];
2366
2551
  return slot;
2367
2552
  }
2368
2553
  onMousemove(ev) {
@@ -2470,12 +2655,18 @@ class BsSchedulerComponent {
2470
2655
  if (previewEvent) {
2471
2656
  this.operation = null;
2472
2657
  this.dragStartTimeslot = null;
2473
- this.events$.next([...this.events$.value, {
2474
- start: previewEvent.start,
2475
- end: previewEvent.end,
2476
- color: this.randomColor(),
2477
- description: 'New event'
2478
- }]);
2658
+ this.resources$.next([
2659
+ ...this.resources$.value,
2660
+ {
2661
+ description: 'New resource group',
2662
+ events: [{
2663
+ start: previewEvent.start,
2664
+ end: previewEvent.end,
2665
+ color: this.randomColor(),
2666
+ description: 'New event'
2667
+ }]
2668
+ }
2669
+ ]);
2479
2670
  this.previewEvent$.next(null);
2480
2671
  }
2481
2672
  });
@@ -2493,7 +2684,7 @@ class BsSchedulerComponent {
2493
2684
  this.operation.event.end = previewEvent.end;
2494
2685
  this.operation = null;
2495
2686
  this.dragStartTimeslot = null;
2496
- this.events$.next(this.events$.value);
2687
+ this.resources$.next(this.resources$.value);
2497
2688
  this.previewEvent$.next(null);
2498
2689
  }
2499
2690
  });
@@ -2507,19 +2698,29 @@ class BsSchedulerComponent {
2507
2698
  }
2508
2699
  }
2509
2700
  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 });
2510
- 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 } });
2701
+ 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 } });
2511
2702
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSchedulerComponent, decorators: [{
2512
2703
  type: Component,
2513
- 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"] }]
2704
+ 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"] }]
2514
2705
  }], ctorParameters: function () { return [{ type: BsCalendarMonthService }, { type: BsTimelineService }]; }, propDecorators: { timeSlotElements: [{
2515
2706
  type: ViewChildren,
2516
2707
  args: ['slot']
2517
- }], unitHeightChange: [{
2708
+ }], modeChange: [{
2709
+ type: Output
2710
+ }], mode: [{
2711
+ type: Input
2712
+ }], weekOptionsChange: [{
2518
2713
  type: Output
2519
- }], unitHeight: [{
2714
+ }], weekOptions: [{
2715
+ type: Input
2716
+ }], timelineOptionsChange: [{
2717
+ type: Output
2718
+ }], timelineOptions: [{
2520
2719
  type: Input
2521
2720
  }], maxInnerHeight: [{
2522
2721
  type: Input
2722
+ }], resources: [{
2723
+ type: Input
2523
2724
  }], onMousemove: [{
2524
2725
  type: HostListener,
2525
2726
  args: ['document:mousemove', ['$event']]
@@ -2528,6 +2729,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2528
2729
  args: ['document:mouseup', ['$event']]
2529
2730
  }] } });
2530
2731
 
2732
+ const availableScales = [
2733
+ { time: 60, pixels: 60, markerSize: 900 },
2734
+ { time: 120, pixels: 60, markerSize: 900 },
2735
+ { time: 300, pixels: 60, markerSize: 900 },
2736
+ { time: 900, pixels: 60, markerSize: 900 },
2737
+ { time: 3600, pixels: 60, markerSize: 21600 },
2738
+ { time: 7200, pixels: 60, markerSize: 21600 },
2739
+ { time: 10800, pixels: 60, markerSize: 21600 },
2740
+ { time: 21600, pixels: 60, markerSize: 21600 },
2741
+ { time: 86400, pixels: 60, markerSize: 604800 }, // 6000s / 60px = 100 s/px
2742
+ ];
2743
+
2531
2744
  class DateOffsetPipe {
2532
2745
  transform(value) {
2533
2746
  const today = new Date(value.start);
@@ -2553,7 +2766,9 @@ BsSchedulerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
2553
2766
  BsSecondsTimespanPipe,
2554
2767
  BsSecondsTodayOffsetPipe,
2555
2768
  DateOffsetPipe,
2556
- DayOfWeekPipe], imports: [CommonModule], exports: [BsSchedulerComponent] });
2769
+ DayOfWeekPipe,
2770
+ ResourceGroupPresenterComponent], imports: [CommonModule], exports: [BsSchedulerComponent,
2771
+ ResourceGroupPresenterComponent] });
2557
2772
  BsSchedulerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsSchedulerModule, imports: [[
2558
2773
  CommonModule
2559
2774
  ]] });
@@ -2565,13 +2780,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2565
2780
  BsSecondsTimespanPipe,
2566
2781
  BsSecondsTodayOffsetPipe,
2567
2782
  DateOffsetPipe,
2568
- DayOfWeekPipe
2783
+ DayOfWeekPipe,
2784
+ ResourceGroupPresenterComponent
2569
2785
  ],
2570
2786
  imports: [
2571
2787
  CommonModule
2572
2788
  ],
2573
2789
  exports: [
2574
- BsSchedulerComponent
2790
+ BsSchedulerComponent,
2791
+ ResourceGroupPresenterComponent
2575
2792
  ]
2576
2793
  }]
2577
2794
  }] });
@@ -3333,6 +3550,212 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
3333
3550
  }]
3334
3551
  }] });
3335
3552
 
3553
+ class BsOffcanvasHeaderComponent {
3554
+ constructor() { }
3555
+ ngOnInit() {
3556
+ }
3557
+ }
3558
+ BsOffcanvasHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3559
+ 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: [""] });
3560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasHeaderComponent, decorators: [{
3561
+ type: Component,
3562
+ args: [{ selector: 'bs-offcanvas-header', template: "<div class=\"offcanvas-header\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }]
3563
+ }], ctorParameters: function () { return []; } });
3564
+
3565
+ class BsOffcanvasBodyComponent {
3566
+ constructor() { }
3567
+ ngOnInit() {
3568
+ }
3569
+ }
3570
+ BsOffcanvasBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3571
+ 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: [""] });
3572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasBodyComponent, decorators: [{
3573
+ type: Component,
3574
+ args: [{ selector: 'bs-offcanvas-body', template: "<div class=\"offcanvas-body small\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
3575
+ }], ctorParameters: function () { return []; } });
3576
+
3577
+ const OFFCANVAS_CONTENT = new InjectionToken('OffcanvasContent');
3578
+
3579
+ class BsOffcanvasComponent {
3580
+ constructor(content) {
3581
+ this.size = null;
3582
+ this.displayBlock = true;
3583
+ this.instance = null;
3584
+ this.show$ = new BehaviorSubject(false);
3585
+ this.position$ = new BehaviorSubject('bottom');
3586
+ this.content = content;
3587
+ this.offcanvasClass$ = this.position$
3588
+ .pipe(map((pos) => `offcanvas-${pos}`));
3589
+ this.offcanvasHeight100$ = this.position$
3590
+ .pipe(map((pos) => {
3591
+ switch (this.position) {
3592
+ case 'top':
3593
+ case 'bottom':
3594
+ return false;
3595
+ default:
3596
+ return true;
3597
+ }
3598
+ }));
3599
+ }
3600
+ get width100() {
3601
+ switch (this.position) {
3602
+ case 'top':
3603
+ case 'bottom':
3604
+ return true;
3605
+ default:
3606
+ return false;
3607
+ }
3608
+ }
3609
+ ;
3610
+ //#region Position
3611
+ set position(value) {
3612
+ this.position$.next(value);
3613
+ }
3614
+ get position() {
3615
+ return this.position$.value;
3616
+ }
3617
+ }
3618
+ BsOffcanvasComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasComponent, deps: [{ token: OFFCANVAS_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
3619
+ 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 } });
3620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasComponent, decorators: [{
3621
+ type: Component,
3622
+ 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"] }]
3623
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
3624
+ type: Inject,
3625
+ args: [OFFCANVAS_CONTENT]
3626
+ }] }]; }, propDecorators: { size: [{
3627
+ type: Input
3628
+ }], displayBlock: [{
3629
+ type: HostBinding,
3630
+ args: ['class.d-block']
3631
+ }], width100: [{
3632
+ type: HostBinding,
3633
+ args: ['class.w-100']
3634
+ }] } });
3635
+
3636
+ class BsOffcanvasCloseDirective {
3637
+ constructor(offcanvasService) {
3638
+ this.offcanvasService = offcanvasService;
3639
+ }
3640
+ onClick() {
3641
+ this.offcanvasService.hide(this.bsOffcanvasClose);
3642
+ }
3643
+ }
3644
+ BsOffcanvasCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasCloseDirective, deps: [{ token: BsOffcanvasService }], target: i0.ɵɵFactoryTarget.Directive });
3645
+ 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 });
3646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasCloseDirective, decorators: [{
3647
+ type: Directive,
3648
+ args: [{
3649
+ selector: '[bsOffcanvasClose]'
3650
+ }]
3651
+ }], ctorParameters: function () { return [{ type: BsOffcanvasService }]; }, propDecorators: { bsOffcanvasClose: [{
3652
+ type: Input
3653
+ }], onClick: [{
3654
+ type: HostListener,
3655
+ args: ['click']
3656
+ }] } });
3657
+
3658
+ class BsOffcanvasModule {
3659
+ }
3660
+ BsOffcanvasModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3661
+ BsOffcanvasModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, declarations: [BsOffcanvasComponent,
3662
+ BsOffcanvasHeaderComponent,
3663
+ BsOffcanvasBodyComponent,
3664
+ BsOffcanvasCloseDirective], imports: [CommonModule,
3665
+ OverlayModule], exports: [BsOffcanvasComponent,
3666
+ BsOffcanvasHeaderComponent,
3667
+ BsOffcanvasBodyComponent,
3668
+ BsOffcanvasCloseDirective] });
3669
+ BsOffcanvasModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, imports: [[
3670
+ CommonModule,
3671
+ OverlayModule
3672
+ ]] });
3673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, decorators: [{
3674
+ type: NgModule,
3675
+ args: [{
3676
+ declarations: [
3677
+ BsOffcanvasComponent,
3678
+ BsOffcanvasHeaderComponent,
3679
+ BsOffcanvasBodyComponent,
3680
+ BsOffcanvasCloseDirective
3681
+ ],
3682
+ imports: [
3683
+ CommonModule,
3684
+ OverlayModule
3685
+ ],
3686
+ exports: [
3687
+ BsOffcanvasComponent,
3688
+ BsOffcanvasHeaderComponent,
3689
+ BsOffcanvasBodyComponent,
3690
+ BsOffcanvasCloseDirective
3691
+ ]
3692
+ }]
3693
+ }] });
3694
+
3695
+ class BsOffcanvasService {
3696
+ constructor(overlay, parentInjector) {
3697
+ this.overlay = overlay;
3698
+ this.parentInjector = parentInjector;
3699
+ }
3700
+ show(template, position, hasBackdrop = false, backdropClick = null) {
3701
+ const injector = Injector.create({
3702
+ providers: [{ provide: OFFCANVAS_CONTENT, useValue: template }],
3703
+ parent: this.parentInjector
3704
+ });
3705
+ const portal = new ComponentPortal(BsOffcanvasComponent, null, injector);
3706
+ const positioning = this.overlay.position().global();
3707
+ const config = {
3708
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
3709
+ positionStrategy: positioning,
3710
+ hasBackdrop,
3711
+ };
3712
+ switch (position) {
3713
+ case 'bottom':
3714
+ positioning.centerHorizontally().bottom('0');
3715
+ config.width = '100%';
3716
+ break;
3717
+ case 'top':
3718
+ positioning.centerHorizontally().top('0');
3719
+ config.width = '100%';
3720
+ break;
3721
+ case 'start':
3722
+ positioning.centerVertically().left('0');
3723
+ config.height = '100%';
3724
+ break;
3725
+ case 'end':
3726
+ positioning.centerVertically().right('0');
3727
+ config.height = '100%';
3728
+ break;
3729
+ default:
3730
+ throw 'Invalid value for position';
3731
+ }
3732
+ const overlayRef = this.overlay.create(config);
3733
+ const componentInstance = overlayRef.attach(portal);
3734
+ componentInstance.instance.position = position;
3735
+ setTimeout(() => componentInstance.instance.show$.next(true));
3736
+ componentInstance.instance['instance'] = {
3737
+ component: componentInstance,
3738
+ overlay: overlayRef
3739
+ };
3740
+ if (hasBackdrop && backdropClick) {
3741
+ overlayRef.backdropClick().subscribe(() => backdropClick(componentInstance.instance));
3742
+ }
3743
+ return componentInstance.instance;
3744
+ }
3745
+ hide(offcanvas) {
3746
+ offcanvas.show$.next(false);
3747
+ setTimeout(() => offcanvas['instance']?.overlay.dispose(), 300);
3748
+ }
3749
+ }
3750
+ 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 });
3751
+ BsOffcanvasService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, providedIn: BsOffcanvasModule });
3752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, decorators: [{
3753
+ type: Injectable,
3754
+ args: [{
3755
+ providedIn: BsOffcanvasModule
3756
+ }]
3757
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }]; } });
3758
+
3336
3759
  class BsRatingComponent {
3337
3760
  constructor() {
3338
3761
  this.destroyed$ = new Subject();
@@ -4405,5 +4828,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
4405
4828
  * Generated bundle index. Do not edit.
4406
4829
  */
4407
4830
 
4408
- 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 };
4831
+ 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 };
4409
4832
  //# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map