@mintplayer/ng-bootstrap 13.3.4 → 13.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bootstrap.scss +1 -0
- package/esm2020/lib/components/calendar/calendar.component.mjs +4 -4
- package/esm2020/lib/components/index.mjs +2 -1
- package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +2 -2
- package/esm2020/lib/components/navbar/navbar-content/navbar-content.directive.mjs +6 -3
- package/esm2020/lib/components/offcanvas/components/index.mjs +4 -0
- package/esm2020/lib/components/offcanvas/components/offcanvas/offcanvas.component.mjs +57 -0
- package/esm2020/lib/components/offcanvas/components/offcanvas-body/offcanvas-body.component.mjs +14 -0
- package/esm2020/lib/components/offcanvas/components/offcanvas-header/offcanvas-header.component.mjs +14 -0
- package/esm2020/lib/components/offcanvas/directives/index.mjs +2 -0
- package/esm2020/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.mjs +27 -0
- package/esm2020/lib/components/offcanvas/index.mjs +7 -0
- package/esm2020/lib/components/offcanvas/interfaces/index.mjs +2 -0
- package/esm2020/lib/components/offcanvas/interfaces/offcanvas-animation-meta.mjs +2 -0
- package/esm2020/lib/components/offcanvas/offcanvas.module.mjs +45 -0
- package/esm2020/lib/components/offcanvas/providers/offcanvas-content.provider.mjs +3 -0
- package/esm2020/lib/components/offcanvas/services/index.mjs +2 -0
- package/esm2020/lib/components/offcanvas/services/offcanvas/offcanvas.service.mjs +72 -0
- package/esm2020/lib/components/offcanvas/types/index.mjs +2 -0
- package/esm2020/lib/components/offcanvas/types/position.mjs +2 -0
- package/esm2020/lib/components/scheduler/components/index.mjs +2 -1
- package/esm2020/lib/components/scheduler/components/resource-group-presenter/resource-group-presenter.component.mjs +84 -0
- package/esm2020/lib/components/scheduler/components/scheduler/scheduler.component.mjs +197 -72
- package/esm2020/lib/components/scheduler/constants/available-scales.mjs +12 -0
- package/esm2020/lib/components/scheduler/constants/index.mjs +2 -0
- package/esm2020/lib/components/scheduler/enums/index.mjs +2 -0
- package/esm2020/lib/components/scheduler/enums/scheduler-mode.mjs +6 -0
- package/esm2020/lib/components/scheduler/index.mjs +4 -1
- package/esm2020/lib/components/scheduler/interfaces/index.mjs +6 -0
- package/esm2020/lib/components/scheduler/interfaces/resource-group.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/resource-or-group.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/resource.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/scheduler-schale.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/scheduler-stamp-with-slots.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/timeline-options.mjs +2 -0
- package/esm2020/lib/components/scheduler/interfaces/week-options.mjs +2 -0
- package/esm2020/lib/components/scheduler/scheduler.module.mjs +9 -4
- package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +6 -7
- package/esm2020/lib/components/snackbar/snackbar.module.mjs +2 -9
- package/fesm2015/mintplayer-ng-bootstrap.mjs +514 -91
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +512 -91
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/lib/components/calendar/calendar.component.d.ts +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/offcanvas/components/index.d.ts +3 -0
- package/lib/components/offcanvas/components/offcanvas/offcanvas.component.d.ts +21 -0
- package/lib/components/offcanvas/components/offcanvas-body/offcanvas-body.component.d.ts +8 -0
- package/lib/components/offcanvas/components/offcanvas-header/offcanvas-header.component.d.ts +8 -0
- package/lib/components/offcanvas/directives/index.d.ts +1 -0
- package/lib/components/offcanvas/directives/offcanvas-close/offcanvas-close.directive.d.ts +11 -0
- package/lib/components/offcanvas/index.d.ts +6 -0
- package/lib/components/offcanvas/interfaces/index.d.ts +1 -0
- package/lib/components/offcanvas/interfaces/offcanvas-animation-meta.d.ts +7 -0
- package/lib/components/offcanvas/offcanvas.module.d.ts +12 -0
- package/lib/components/offcanvas/providers/offcanvas-content.provider.d.ts +2 -0
- package/lib/components/offcanvas/services/index.d.ts +1 -0
- package/lib/components/offcanvas/services/offcanvas/offcanvas.service.d.ts +13 -0
- package/lib/components/offcanvas/types/index.d.ts +1 -0
- package/lib/components/offcanvas/types/position.d.ts +1 -0
- package/lib/components/scheduler/components/index.d.ts +1 -0
- package/lib/components/scheduler/components/resource-group-presenter/resource-group-presenter.component.d.ts +26 -0
- package/lib/components/scheduler/components/scheduler/scheduler.component.d.ts +32 -11
- package/lib/components/scheduler/constants/available-scales.d.ts +2 -0
- package/lib/components/scheduler/constants/index.d.ts +1 -0
- package/lib/components/scheduler/enums/index.d.ts +1 -0
- package/lib/components/scheduler/enums/scheduler-mode.d.ts +4 -0
- package/lib/components/scheduler/index.d.ts +3 -0
- package/lib/components/scheduler/interfaces/index.d.ts +5 -0
- package/lib/components/scheduler/interfaces/resource-group.d.ts +5 -0
- package/lib/components/scheduler/interfaces/resource-or-group.d.ts +6 -0
- package/lib/components/scheduler/interfaces/resource.d.ts +5 -0
- package/lib/components/scheduler/interfaces/scheduler-schale.d.ts +5 -0
- package/lib/components/scheduler/interfaces/scheduler-stamp-with-slots.d.ts +6 -0
- package/lib/components/scheduler/interfaces/timeline-options.d.ts +3 -0
- package/lib/components/scheduler/interfaces/week-options.d.ts +3 -0
- package/lib/components/scheduler/scheduler.module.d.ts +3 -2
- package/lib/components/snackbar/service/snackbar.service.d.ts +2 -3
- package/package.json +1 -1
- 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.
|
|
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
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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 }
|
|
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 }
|
|
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.
|
|
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
|
|
2146
|
-
this.
|
|
2147
|
-
this.
|
|
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.
|
|
2155
|
-
this.
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
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.
|
|
2163
|
-
.pipe(map((
|
|
2164
|
-
return { start:
|
|
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.
|
|
2223
|
-
.pipe(
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
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.
|
|
2381
|
+
this.weekOptions$
|
|
2251
2382
|
.pipe(takeUntil(this.destroyed$))
|
|
2252
|
-
.subscribe((
|
|
2253
|
-
this.
|
|
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
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
get mode() {
|
|
2412
|
+
return this.mode$.value;
|
|
2413
|
+
}
|
|
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;
|
|
2255
2425
|
}
|
|
2256
|
-
|
|
2257
|
-
|
|
2426
|
+
set timelineOptions(value) {
|
|
2427
|
+
this.timelineOptions$.next(value);
|
|
2258
2428
|
}
|
|
2259
|
-
|
|
2260
|
-
|
|
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
|
-
|
|
2269
|
-
this.
|
|
2270
|
-
|
|
2271
|
-
|
|
2443
|
+
onPreviousWeekOrMonth() {
|
|
2444
|
+
this.onChangeWeekOrMonth(false);
|
|
2445
|
+
}
|
|
2446
|
+
onNextWeekOrMonth() {
|
|
2447
|
+
this.onChangeWeekOrMonth(true);
|
|
2272
2448
|
}
|
|
2273
|
-
|
|
2274
|
-
this.
|
|
2275
|
-
.pipe(map((
|
|
2276
|
-
|
|
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.
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
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.
|
|
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()\"><</button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeek()\">></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()\"><</button>\n <button class=\"btn btn-default flex-end\" (click)=\"onNextWeek()\">></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
|
-
}],
|
|
2719
|
+
}], modeChange: [{
|
|
2720
|
+
type: Output
|
|
2721
|
+
}], mode: [{
|
|
2722
|
+
type: Input
|
|
2723
|
+
}], weekOptionsChange: [{
|
|
2529
2724
|
type: Output
|
|
2530
|
-
}],
|
|
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
|
|
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: ["
|
|
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: ["
|
|
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']
|
|
@@ -3170,11 +3387,14 @@ class NavbarContentDirective {
|
|
|
3170
3387
|
if (!isPlatformServer(platformId)) {
|
|
3171
3388
|
// Initialize the ResizeObserver
|
|
3172
3389
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
3173
|
-
const height =
|
|
3390
|
+
const height = navbar
|
|
3391
|
+
? navbar.nav.nativeElement.offsetHeight
|
|
3392
|
+
: entries[0].contentRect.height;
|
|
3174
3393
|
this.element.nativeElement.style.paddingTop = (this.initialPadding + height) + 'px';
|
|
3175
3394
|
});
|
|
3176
3395
|
// Monitor the size
|
|
3177
|
-
const
|
|
3396
|
+
const px = getComputedStyle(this.element.nativeElement).getPropertyValue('padding-top');
|
|
3397
|
+
const pt = parseInt(px.replace(/px$/, ''));
|
|
3178
3398
|
this.initialPadding = isNaN(pt) ? 0 : pt;
|
|
3179
3399
|
if (this.resizeObserver && navbar) {
|
|
3180
3400
|
this.resizeObserver.observe(navbar.nav.nativeElement);
|
|
@@ -3355,6 +3575,209 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
3355
3575
|
}]
|
|
3356
3576
|
}] });
|
|
3357
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.positionAbsolute = true;
|
|
3609
|
+
this.width100 = true;
|
|
3610
|
+
this.instance = null;
|
|
3611
|
+
this.show$ = new BehaviorSubject(false);
|
|
3612
|
+
this.position$ = new BehaviorSubject('bottom');
|
|
3613
|
+
this.content = content;
|
|
3614
|
+
this.offcanvasClass$ = this.position$
|
|
3615
|
+
.pipe(map((pos) => `offcanvas-${pos}`));
|
|
3616
|
+
this.offcanvasHeight100$ = this.position$
|
|
3617
|
+
.pipe(map((pos) => {
|
|
3618
|
+
switch (this.position) {
|
|
3619
|
+
case 'top':
|
|
3620
|
+
case 'bottom':
|
|
3621
|
+
return false;
|
|
3622
|
+
default:
|
|
3623
|
+
return true;
|
|
3624
|
+
}
|
|
3625
|
+
}));
|
|
3626
|
+
}
|
|
3627
|
+
//#region Position
|
|
3628
|
+
set position(value) {
|
|
3629
|
+
this.position$.next(value);
|
|
3630
|
+
}
|
|
3631
|
+
get position() {
|
|
3632
|
+
return this.position$.value;
|
|
3633
|
+
}
|
|
3634
|
+
}
|
|
3635
|
+
BsOffcanvasComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasComponent, deps: [{ token: OFFCANVAS_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
3636
|
+
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.position-absolute": "this.positionAbsolute", "class.w-100": "this.width100" } }, ngImport: i0, template: "<div class=\"offcanvas overflow-hidden\" [class]=\"offcanvasClass$ | async\"\n [class.show]=\"show$ | async\"\n [class.h-100]=\"offcanvasHeight100$ | async\"\n [style.height.px]=\"size\"\n [class.oc-max-width]=\"['start', 'end'].includes(position)\"\n [class.oc-max-height]=\"['top', 'bottom'].includes(position)\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [".offcanvas.oc-max-width{max-width:calc(100% - 40px)}.offcanvas.oc-max-height{max-height:calc(100% - 40px)}.offcanvas{visibility:unset}.offcanvas.offcanvas-bottom,.offcanvas.offcanvas-top{height:auto}.offcanvas.offcanvas-top{position:initial}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe } });
|
|
3637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasComponent, decorators: [{
|
|
3638
|
+
type: Component,
|
|
3639
|
+
args: [{ selector: 'bs-offcanvas', template: "<div class=\"offcanvas overflow-hidden\" [class]=\"offcanvasClass$ | async\"\n [class.show]=\"show$ | async\"\n [class.h-100]=\"offcanvasHeight100$ | async\"\n [style.height.px]=\"size\"\n [class.oc-max-width]=\"['start', 'end'].includes(position)\"\n [class.oc-max-height]=\"['top', 'bottom'].includes(position)\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [".offcanvas.oc-max-width{max-width:calc(100% - 40px)}.offcanvas.oc-max-height{max-height:calc(100% - 40px)}.offcanvas{visibility:unset}.offcanvas.offcanvas-bottom,.offcanvas.offcanvas-top{height:auto}.offcanvas.offcanvas-top{position:initial}\n"] }]
|
|
3640
|
+
}], ctorParameters: function () {
|
|
3641
|
+
return [{ type: i0.TemplateRef, decorators: [{
|
|
3642
|
+
type: Inject,
|
|
3643
|
+
args: [OFFCANVAS_CONTENT]
|
|
3644
|
+
}] }];
|
|
3645
|
+
}, propDecorators: { size: [{
|
|
3646
|
+
type: Input
|
|
3647
|
+
}], displayBlock: [{
|
|
3648
|
+
type: HostBinding,
|
|
3649
|
+
args: ['class.d-block']
|
|
3650
|
+
}], positionAbsolute: [{
|
|
3651
|
+
type: HostBinding,
|
|
3652
|
+
args: ['class.position-absolute']
|
|
3653
|
+
}], width100: [{
|
|
3654
|
+
type: HostBinding,
|
|
3655
|
+
args: ['class.w-100']
|
|
3656
|
+
}] } });
|
|
3657
|
+
|
|
3658
|
+
class BsOffcanvasCloseDirective {
|
|
3659
|
+
constructor(offcanvasService) {
|
|
3660
|
+
this.offcanvasService = offcanvasService;
|
|
3661
|
+
}
|
|
3662
|
+
onClick() {
|
|
3663
|
+
this.offcanvasService.hide(this.bsOffcanvasClose);
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
BsOffcanvasCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasCloseDirective, deps: [{ token: BsOffcanvasService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3667
|
+
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 });
|
|
3668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasCloseDirective, decorators: [{
|
|
3669
|
+
type: Directive,
|
|
3670
|
+
args: [{
|
|
3671
|
+
selector: '[bsOffcanvasClose]'
|
|
3672
|
+
}]
|
|
3673
|
+
}], ctorParameters: function () { return [{ type: BsOffcanvasService }]; }, propDecorators: { bsOffcanvasClose: [{
|
|
3674
|
+
type: Input
|
|
3675
|
+
}], onClick: [{
|
|
3676
|
+
type: HostListener,
|
|
3677
|
+
args: ['click']
|
|
3678
|
+
}] } });
|
|
3679
|
+
|
|
3680
|
+
class BsOffcanvasModule {
|
|
3681
|
+
}
|
|
3682
|
+
BsOffcanvasModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3683
|
+
BsOffcanvasModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, declarations: [BsOffcanvasComponent,
|
|
3684
|
+
BsOffcanvasHeaderComponent,
|
|
3685
|
+
BsOffcanvasBodyComponent,
|
|
3686
|
+
BsOffcanvasCloseDirective], imports: [CommonModule,
|
|
3687
|
+
OverlayModule], exports: [BsOffcanvasComponent,
|
|
3688
|
+
BsOffcanvasHeaderComponent,
|
|
3689
|
+
BsOffcanvasBodyComponent,
|
|
3690
|
+
BsOffcanvasCloseDirective] });
|
|
3691
|
+
BsOffcanvasModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, imports: [[
|
|
3692
|
+
CommonModule,
|
|
3693
|
+
OverlayModule
|
|
3694
|
+
]] });
|
|
3695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasModule, decorators: [{
|
|
3696
|
+
type: NgModule,
|
|
3697
|
+
args: [{
|
|
3698
|
+
declarations: [
|
|
3699
|
+
BsOffcanvasComponent,
|
|
3700
|
+
BsOffcanvasHeaderComponent,
|
|
3701
|
+
BsOffcanvasBodyComponent,
|
|
3702
|
+
BsOffcanvasCloseDirective
|
|
3703
|
+
],
|
|
3704
|
+
imports: [
|
|
3705
|
+
CommonModule,
|
|
3706
|
+
OverlayModule
|
|
3707
|
+
],
|
|
3708
|
+
exports: [
|
|
3709
|
+
BsOffcanvasComponent,
|
|
3710
|
+
BsOffcanvasHeaderComponent,
|
|
3711
|
+
BsOffcanvasBodyComponent,
|
|
3712
|
+
BsOffcanvasCloseDirective
|
|
3713
|
+
]
|
|
3714
|
+
}]
|
|
3715
|
+
}] });
|
|
3716
|
+
|
|
3717
|
+
class BsOffcanvasService {
|
|
3718
|
+
constructor(overlay, parentInjector) {
|
|
3719
|
+
this.overlay = overlay;
|
|
3720
|
+
this.parentInjector = parentInjector;
|
|
3721
|
+
}
|
|
3722
|
+
show(template, position, hasBackdrop = false, backdropClick = null) {
|
|
3723
|
+
const injector = Injector.create({
|
|
3724
|
+
providers: [{ provide: OFFCANVAS_CONTENT, useValue: template }],
|
|
3725
|
+
parent: this.parentInjector
|
|
3726
|
+
});
|
|
3727
|
+
const portal = new ComponentPortal(BsOffcanvasComponent, null, injector);
|
|
3728
|
+
const positioning = this.overlay.position().global();
|
|
3729
|
+
const config = {
|
|
3730
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
3731
|
+
positionStrategy: positioning,
|
|
3732
|
+
hasBackdrop,
|
|
3733
|
+
};
|
|
3734
|
+
switch (position) {
|
|
3735
|
+
case 'bottom':
|
|
3736
|
+
positioning.centerHorizontally().bottom('0');
|
|
3737
|
+
config.width = '100%';
|
|
3738
|
+
break;
|
|
3739
|
+
case 'top':
|
|
3740
|
+
positioning.centerHorizontally().top('0');
|
|
3741
|
+
config.width = '100%';
|
|
3742
|
+
break;
|
|
3743
|
+
case 'start':
|
|
3744
|
+
positioning.centerVertically().left('0');
|
|
3745
|
+
config.height = '100%';
|
|
3746
|
+
break;
|
|
3747
|
+
case 'end':
|
|
3748
|
+
positioning.centerVertically().right('0');
|
|
3749
|
+
config.height = '100%';
|
|
3750
|
+
break;
|
|
3751
|
+
default:
|
|
3752
|
+
throw 'Invalid value for position';
|
|
3753
|
+
}
|
|
3754
|
+
const overlayRef = this.overlay.create(config);
|
|
3755
|
+
const componentInstance = overlayRef.attach(portal);
|
|
3756
|
+
componentInstance.instance.position = position;
|
|
3757
|
+
setTimeout(() => componentInstance.instance.show$.next(true));
|
|
3758
|
+
componentInstance.instance['instance'] = {
|
|
3759
|
+
component: componentInstance,
|
|
3760
|
+
overlay: overlayRef
|
|
3761
|
+
};
|
|
3762
|
+
if (hasBackdrop && backdropClick) {
|
|
3763
|
+
overlayRef.backdropClick().subscribe(() => backdropClick(componentInstance.instance));
|
|
3764
|
+
}
|
|
3765
|
+
return componentInstance.instance;
|
|
3766
|
+
}
|
|
3767
|
+
hide(offcanvas) {
|
|
3768
|
+
offcanvas.show$.next(false);
|
|
3769
|
+
setTimeout(() => { var _a; return (_a = offcanvas['instance']) === null || _a === void 0 ? void 0 : _a.overlay.dispose(); }, 300);
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
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 });
|
|
3773
|
+
BsOffcanvasService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, providedIn: BsOffcanvasModule });
|
|
3774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BsOffcanvasService, decorators: [{
|
|
3775
|
+
type: Injectable,
|
|
3776
|
+
args: [{
|
|
3777
|
+
providedIn: BsOffcanvasModule
|
|
3778
|
+
}]
|
|
3779
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }]; } });
|
|
3780
|
+
|
|
3358
3781
|
class BsRatingComponent {
|
|
3359
3782
|
constructor() {
|
|
3360
3783
|
this.destroyed$ = new Subject();
|
|
@@ -4436,5 +4859,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
4436
4859
|
* Generated bundle index. Do not edit.
|
|
4437
4860
|
*/
|
|
4438
4861
|
|
|
4439
|
-
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 };
|
|
4862
|
+
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 };
|
|
4440
4863
|
//# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map
|