@open-rlb/ng-bootstrap 2.4.8 → 2.4.10
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/fesm2022/open-rlb-ng-bootstrap.mjs +424 -53
- package/fesm2022/open-rlb-ng-bootstrap.mjs.map +1 -1
- package/index.d.ts +161 -83
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, booleanAttribute, Input, Host, Self, Optional, Directive, Injectable, EventEmitter, ContentChild, Output, ContentChildren, ViewChild, numberAttribute, Pipe, ChangeDetectionStrategy, DOCUMENT, Inject, HostBinding,
|
|
2
|
+
import { Component, booleanAttribute, Input, Host, Self, Optional, Directive, Injectable, EventEmitter, ContentChild, Output, ContentChildren, ViewChild, numberAttribute, Pipe, ChangeDetectionStrategy, DOCUMENT, Inject, HostBinding, ViewContainerRef, InjectionToken, ElementRef, HostListener, ViewChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { Collapse, Carousel, Dropdown, Modal, Toast, Offcanvas, ScrollSpy, Tooltip, Popover } from 'bootstrap';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { formatDate, CommonModule } from '@angular/common';
|
|
6
6
|
import * as i2 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
|
-
import { Subject, of, take, filter, switchMap,
|
|
8
|
+
import { Subject, of, map, shareReplay, take, filter, switchMap, startWith, takeUntil, Subscription, Observable, lastValueFrom } from 'rxjs';
|
|
9
9
|
import * as i2$1 from '@angular/cdk/layout';
|
|
10
10
|
import * as i2$2 from '@angular/forms';
|
|
11
11
|
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
@@ -2064,11 +2064,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2064
2064
|
args: [ComponentHostDirective, { static: true }]
|
|
2065
2065
|
}] } });
|
|
2066
2066
|
|
|
2067
|
+
class BreakpointService {
|
|
2068
|
+
constructor(breakpointObserver) {
|
|
2069
|
+
this.breakpointObserver = breakpointObserver;
|
|
2070
|
+
/**
|
|
2071
|
+
* Observable that emits true when the screen width is <= 992px.
|
|
2072
|
+
* This corresponds to the BS992 breakpoint used in the sidebar.
|
|
2073
|
+
*/
|
|
2074
|
+
this.isMobile$ = this.breakpointObserver
|
|
2075
|
+
.observe(['(max-width: 992px)'])
|
|
2076
|
+
.pipe(map((state) => state.matches), shareReplay(1));
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Returns the current mobile state.
|
|
2080
|
+
*/
|
|
2081
|
+
get isMobile() {
|
|
2082
|
+
return this.breakpointObserver.isMatched('(max-width: 992px)');
|
|
2083
|
+
}
|
|
2084
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BreakpointService, deps: [{ token: i2$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2085
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BreakpointService, providedIn: 'root' }); }
|
|
2086
|
+
}
|
|
2087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BreakpointService, decorators: [{
|
|
2088
|
+
type: Injectable,
|
|
2089
|
+
args: [{
|
|
2090
|
+
providedIn: 'root'
|
|
2091
|
+
}]
|
|
2092
|
+
}], ctorParameters: () => [{ type: i2$1.BreakpointObserver }] });
|
|
2093
|
+
|
|
2067
2094
|
class ModalDirective {
|
|
2068
|
-
constructor(el, renderer, innerModalService) {
|
|
2095
|
+
constructor(el, renderer, innerModalService, breakpointService) {
|
|
2069
2096
|
this.el = el;
|
|
2070
2097
|
this.renderer = renderer;
|
|
2071
2098
|
this.innerModalService = innerModalService;
|
|
2099
|
+
this.breakpointService = breakpointService;
|
|
2072
2100
|
this.triggerElement = null;
|
|
2073
2101
|
this._openChange_f = (e) => {
|
|
2074
2102
|
this.innerModalService.eventModal(e.type.replace('.bs.modal', ''), this._modalReason, this.id, this.instance?.result);
|
|
@@ -2128,6 +2156,10 @@ class ModalDirective {
|
|
|
2128
2156
|
if (this.options?.size) {
|
|
2129
2157
|
this.renderer.addClass(this.dialogElement, `modal-${this.options.size}`);
|
|
2130
2158
|
}
|
|
2159
|
+
const isFullscreenUndefined = this.options?.fullscreen === undefined;
|
|
2160
|
+
if (isFullscreenUndefined && this.breakpointService.isMobile) {
|
|
2161
|
+
this.renderer.addClass(this.dialogElement, `modal-fullscreen`);
|
|
2162
|
+
}
|
|
2131
2163
|
if (this.options?.fullscreen === true) {
|
|
2132
2164
|
this.renderer.addClass(this.dialogElement, `modal-fullscreen`);
|
|
2133
2165
|
}
|
|
@@ -2190,7 +2222,7 @@ class ModalDirective {
|
|
|
2190
2222
|
});
|
|
2191
2223
|
}
|
|
2192
2224
|
}
|
|
2193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModalDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: InnerModalService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2225
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModalDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: InnerModalService }, { token: BreakpointService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2194
2226
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: ModalDirective, isStandalone: true, selector: "[rlb-modal]", inputs: { id: "id", instance: ["data-instance", "instance"], options: ["data-options", "options"] }, ngImport: i0 }); }
|
|
2195
2227
|
}
|
|
2196
2228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModalDirective, decorators: [{
|
|
@@ -2199,7 +2231,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2199
2231
|
selector: '[rlb-modal]',
|
|
2200
2232
|
standalone: true,
|
|
2201
2233
|
}]
|
|
2202
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: InnerModalService }], propDecorators: { id: [{
|
|
2234
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: InnerModalService }, { type: BreakpointService }], propDecorators: { id: [{
|
|
2203
2235
|
type: Input,
|
|
2204
2236
|
args: [{ alias: 'id' }]
|
|
2205
2237
|
}], instance: [{
|
|
@@ -2578,6 +2610,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2578
2610
|
type: Input
|
|
2579
2611
|
}] } });
|
|
2580
2612
|
|
|
2613
|
+
const DEFAULT_CALENDAR_LAYOUT = {
|
|
2614
|
+
rowHeight: 110,
|
|
2615
|
+
maxBodyHeight: 30,
|
|
2616
|
+
minHeaderHeight: 3.5
|
|
2617
|
+
};
|
|
2618
|
+
|
|
2581
2619
|
function isSameDay(a, b) {
|
|
2582
2620
|
return a.yearUTC === b.yearUTC &&
|
|
2583
2621
|
a.monthUTC === b.monthUTC &&
|
|
@@ -2895,6 +2933,10 @@ class CalendarHeaderComponent {
|
|
|
2895
2933
|
.add(1, 'month');
|
|
2896
2934
|
this.dateChange.emit(new DateTz(nextMonth));
|
|
2897
2935
|
break;
|
|
2936
|
+
case 'day':
|
|
2937
|
+
const nextDay = addDays(this.currentDate, 1);
|
|
2938
|
+
this.dateChange.emit(new DateTz(nextDay));
|
|
2939
|
+
break;
|
|
2898
2940
|
default:
|
|
2899
2941
|
break;
|
|
2900
2942
|
}
|
|
@@ -2911,6 +2953,10 @@ class CalendarHeaderComponent {
|
|
|
2911
2953
|
.add(-1, 'month');
|
|
2912
2954
|
this.dateChange.emit(new DateTz(pastMonth));
|
|
2913
2955
|
break;
|
|
2956
|
+
case 'day':
|
|
2957
|
+
const nextDay = addDays(this.currentDate, -1);
|
|
2958
|
+
this.dateChange.emit(new DateTz(nextDay));
|
|
2959
|
+
break;
|
|
2914
2960
|
default:
|
|
2915
2961
|
break;
|
|
2916
2962
|
}
|
|
@@ -3050,10 +3096,7 @@ class CalendarWeekGridComponent {
|
|
|
3050
3096
|
this.timeSlots = [];
|
|
3051
3097
|
this.processedEvents = new Map();
|
|
3052
3098
|
this.scrollbarWidth = 0;
|
|
3053
|
-
// CONFIG CONSTANTS
|
|
3054
|
-
this.ROW_HEIGHT = 110; // px for a full hour slot
|
|
3055
|
-
this.MAX_BODY_HEIGHT = 30; // rem
|
|
3056
|
-
this.MIN_HEADER_HEIGHT = 3.5; // rem
|
|
3099
|
+
// CONFIG CONSTANTS (Replaced by Layout Input)
|
|
3057
3100
|
this.MAX_VISIBLE_COLUMNS = 4;
|
|
3058
3101
|
this.SNAP_MINUTES = 15;
|
|
3059
3102
|
// arrow function to keep "this" context
|
|
@@ -3103,7 +3146,7 @@ class CalendarWeekGridComponent {
|
|
|
3103
3146
|
const originalTopPx = this.calculateEventTop(movedEvent);
|
|
3104
3147
|
const dragDistancePx = event.distance.y;
|
|
3105
3148
|
const newTopPx = originalTopPx + dragDistancePx;
|
|
3106
|
-
const rawMinutesFromStart = (newTopPx / this.
|
|
3149
|
+
const rawMinutesFromStart = (newTopPx / this.layout.rowHeight) * 60;
|
|
3107
3150
|
const snappedMinutes = Math.round(rawMinutesFromStart / this.SNAP_MINUTES) * this.SNAP_MINUTES;
|
|
3108
3151
|
const validMinutes = Math.max(0, snappedMinutes);
|
|
3109
3152
|
const newStart = new DateTz$1(newDay)
|
|
@@ -3130,17 +3173,17 @@ class CalendarWeekGridComponent {
|
|
|
3130
3173
|
const startOfDay = new DateTz$1(event.start).set(0, 'hour').set(0, 'minute').stripSecMillis();
|
|
3131
3174
|
const diffMs = event.start.timestamp - startOfDay.timestamp;
|
|
3132
3175
|
const diffMinutes = diffMs / (1000 * 60);
|
|
3133
|
-
return (diffMinutes / 60) * this.
|
|
3176
|
+
return (diffMinutes / 60) * this.layout.rowHeight;
|
|
3134
3177
|
}
|
|
3135
3178
|
calculateEventHeight(event) {
|
|
3136
3179
|
const durationMs = event.end.timestamp - event.start.timestamp;
|
|
3137
3180
|
const durationMinutes = durationMs / (1000 * 60);
|
|
3138
|
-
return (durationMinutes / 60) * this.
|
|
3181
|
+
return (durationMinutes / 60) * this.layout.rowHeight;
|
|
3139
3182
|
}
|
|
3140
3183
|
getNowTop() {
|
|
3141
3184
|
const hours = this.now.hour;
|
|
3142
3185
|
const minutes = this.now.minute;
|
|
3143
|
-
return ((hours * 60) + minutes) / 60 * this.
|
|
3186
|
+
return ((hours * 60) + minutes) / 60 * this.layout.rowHeight;
|
|
3144
3187
|
}
|
|
3145
3188
|
isToday(date) {
|
|
3146
3189
|
return isToday(date);
|
|
@@ -3348,17 +3391,19 @@ class CalendarWeekGridComponent {
|
|
|
3348
3391
|
});
|
|
3349
3392
|
}
|
|
3350
3393
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarWeekGridComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3351
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarWeekGridComponent, isStandalone: false, selector: "rlb-calendar-week-grid", inputs: { view: "view", currentDate: "currentDate", events: "events" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, viewQueries: [{ propertyName: "scrollBodyRef", first: true, predicate: ["scrollBody"], descendants: true }, { propertyName: "headerRowRef", first: true, predicate: ["headerRow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"calendar-wrapper d-flex flex-column\">\n\n <!-- HEADER WRAPPER -->\n <div #headerRow
|
|
3394
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarWeekGridComponent, isStandalone: false, selector: "rlb-calendar-week-grid", inputs: { view: "view", currentDate: "currentDate", events: "events", layout: "layout" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, viewQueries: [{ propertyName: "scrollBodyRef", first: true, predicate: ["scrollBody"], descendants: true }, { propertyName: "headerRowRef", first: true, predicate: ["headerRow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"calendar-wrapper d-flex flex-column\">\n\n <!-- HEADER WRAPPER -->\n <div #headerRow class=\"header-container overflow-hidden flex-shrink-0 border-bottom bg-body-tertiary\"\n [style.padding-right.px]=\"scrollbarWidth\">\n\n <div class=\"header-row d-flex\" [style.min-height.rem]=\"layout.minHeaderHeight\">\n\n <div class=\"time-gutter border-end flex-shrink-0\"></div>\n\n <div class=\"days-header d-flex flex-grow-1\">\n <div *ngFor=\"let day of days\" class=\"day-cell text-center p-2 border-end\" [class.text-primary]=\"isToday(day)\"\n [class.fw-bold]=\"isToday(day)\" [class.bg-primary]=\"isToday(day)\">\n <div class=\"small text-uppercase text-body-secondary\">{{ day | dayOfWeek: 'short' }}</div>\n <div class=\"h5 m-0\">{{ day | dtz:'DD' }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- BODY WRAPPER -->\n <div #scrollBody class=\"calendar-body flex-grow-1 overflow-auto bg-body position-relative\"\n (scroll)=\"onBodyScroll($event)\" [style.max-height.rem]=\"layout.maxBodyHeight\">\n\n <div class=\"body-row d-flex position-relative\">\n\n <!-- SIDEBAR (Sticky Left) -->\n <div class=\"time-sidebar sticky-start flex-shrink-0 border-end\">\n <div *ngFor=\"let time of timeSlots; let i = index\"\n class=\"time-slot-label small text-body-secondary d-flex align-items-start justify-content-center\"\n [style.height.px]=\"layout.rowHeight\">\n <span *ngIf=\"i !== 0\" style=\"transform: translateY(-50%)\">\n {{ time }}\n </span>\n </div>\n </div>\n\n <!-- GRID AND EVENTS -->\n <div class=\"grid-layer flex-grow-1 position-relative\">\n\n <!-- LAYER 1: Grid -->\n <div class=\"background-grid position-absolute w-100 h-100 top-0 start-0 z-0\">\n <div *ngFor=\"let time of timeSlots\" class=\"grid-row border-bottom\" [style.height.px]=\"layout.rowHeight\">\n </div>\n </div>\n\n <!-- Layer 2: Events -->\n <div class=\"events-container d-flex h-100 w-100 position-relative z-1\" cdkDropListGroup>\n <div *ngFor=\"let day of days\" class=\"day-column position-relative border-end h-100\" cdkDropList\n [cdkDropListSortingDisabled]=\"true\" [cdkDropListData]=\"day\" (cdkDropListDropped)=\"onEventDrop($event)\"\n (click)=\"eventClick.emit()\">\n\n <rlb-calendar-event *ngFor=\"let event of getEventsForDay(day); trackBy: trackByEventId\" [view]=\"view\"\n [event]=\"event\" [style.top.px]=\"calculateEventTop(event)\" [style.height.px]=\"calculateEventHeight(event)\"\n [style.left.%]=\"event.left\" [style.width.%]=\"event.width\" (eventClick)=\"eventClick.emit($event)\"\n (eventContainerClick)=\"eventContainerClick.emit($event)\" cdkDrag [cdkDragData]=\"event\"\n [cdkDragDisabled]=\"event.isOverflowIndicator\" class=\"position-absolute\">\n <div *cdkDragPlaceholder style=\"opacity: 0\"></div>\n </rlb-calendar-event>\n\n <div *ngIf=\"isToday(day)\" class=\"now-line\" [style.top.px]=\"getNowTop()\">\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [":host{display:block;height:100%}.calendar-wrapper{background-color:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius);overflow:hidden;height:100%}.header-container{background-color:var(--bs-body-bg);z-index:102;box-shadow:0 4px 6px -4px #0000001a}.header-row{width:fit-content;min-width:100%}.time-gutter{width:60px;border-color:var(--bs-border-color)!important}.day-cell{border-color:var(--bs-border-color)!important;flex:1 1 0px;width:0;min-width:120px;overflow:hidden}.day-cell:last-child{border-right:none!important}.calendar-body{scroll-behavior:auto}.body-row{width:fit-content;min-width:100%}.sticky-start{position:sticky;left:0;z-index:50;background-color:var(--bs-body-bg)}.time-sidebar{width:60px;border-color:var(--bs-border-color)!important}.grid-row{border-color:var(--bs-border-color)!important;box-sizing:border-box}.grid-row:after{content:\"\";position:absolute;width:100%;border-bottom:1px dotted currentColor;opacity:.15;top:50%;left:0;pointer-events:none}.day-column{border-color:var(--bs-border-color)!important;flex:1 1 0px;width:0;min-width:120px}.day-column:last-child{border-right:none!important}.now-line{position:absolute;left:0;right:0;height:2px;background-color:var(--bs-danger);z-index:10;pointer-events:none}.now-line:before{content:\"\";position:absolute;left:-5px;top:-4px;width:10px;height:10px;background-color:var(--bs-danger);border-radius:50%}.z-0{z-index:0}.z-1{z-index:1}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$3.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$3.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: CalendarEventComponent, selector: "rlb-calendar-event", inputs: ["event", "view"], outputs: ["eventClick", "eventContainerClick"] }, { kind: "pipe", type: DateTzPipe, name: "dtz" }, { kind: "pipe", type: DayOfWeekPipe, name: "dayOfWeek" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3352
3395
|
}
|
|
3353
3396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarWeekGridComponent, decorators: [{
|
|
3354
3397
|
type: Component,
|
|
3355
|
-
args: [{ selector: 'rlb-calendar-week-grid', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"calendar-wrapper d-flex flex-column\">\n\n <!-- HEADER WRAPPER -->\n <div #headerRow
|
|
3398
|
+
args: [{ selector: 'rlb-calendar-week-grid', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"calendar-wrapper d-flex flex-column\">\n\n <!-- HEADER WRAPPER -->\n <div #headerRow class=\"header-container overflow-hidden flex-shrink-0 border-bottom bg-body-tertiary\"\n [style.padding-right.px]=\"scrollbarWidth\">\n\n <div class=\"header-row d-flex\" [style.min-height.rem]=\"layout.minHeaderHeight\">\n\n <div class=\"time-gutter border-end flex-shrink-0\"></div>\n\n <div class=\"days-header d-flex flex-grow-1\">\n <div *ngFor=\"let day of days\" class=\"day-cell text-center p-2 border-end\" [class.text-primary]=\"isToday(day)\"\n [class.fw-bold]=\"isToday(day)\" [class.bg-primary]=\"isToday(day)\">\n <div class=\"small text-uppercase text-body-secondary\">{{ day | dayOfWeek: 'short' }}</div>\n <div class=\"h5 m-0\">{{ day | dtz:'DD' }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- BODY WRAPPER -->\n <div #scrollBody class=\"calendar-body flex-grow-1 overflow-auto bg-body position-relative\"\n (scroll)=\"onBodyScroll($event)\" [style.max-height.rem]=\"layout.maxBodyHeight\">\n\n <div class=\"body-row d-flex position-relative\">\n\n <!-- SIDEBAR (Sticky Left) -->\n <div class=\"time-sidebar sticky-start flex-shrink-0 border-end\">\n <div *ngFor=\"let time of timeSlots; let i = index\"\n class=\"time-slot-label small text-body-secondary d-flex align-items-start justify-content-center\"\n [style.height.px]=\"layout.rowHeight\">\n <span *ngIf=\"i !== 0\" style=\"transform: translateY(-50%)\">\n {{ time }}\n </span>\n </div>\n </div>\n\n <!-- GRID AND EVENTS -->\n <div class=\"grid-layer flex-grow-1 position-relative\">\n\n <!-- LAYER 1: Grid -->\n <div class=\"background-grid position-absolute w-100 h-100 top-0 start-0 z-0\">\n <div *ngFor=\"let time of timeSlots\" class=\"grid-row border-bottom\" [style.height.px]=\"layout.rowHeight\">\n </div>\n </div>\n\n <!-- Layer 2: Events -->\n <div class=\"events-container d-flex h-100 w-100 position-relative z-1\" cdkDropListGroup>\n <div *ngFor=\"let day of days\" class=\"day-column position-relative border-end h-100\" cdkDropList\n [cdkDropListSortingDisabled]=\"true\" [cdkDropListData]=\"day\" (cdkDropListDropped)=\"onEventDrop($event)\"\n (click)=\"eventClick.emit()\">\n\n <rlb-calendar-event *ngFor=\"let event of getEventsForDay(day); trackBy: trackByEventId\" [view]=\"view\"\n [event]=\"event\" [style.top.px]=\"calculateEventTop(event)\" [style.height.px]=\"calculateEventHeight(event)\"\n [style.left.%]=\"event.left\" [style.width.%]=\"event.width\" (eventClick)=\"eventClick.emit($event)\"\n (eventContainerClick)=\"eventContainerClick.emit($event)\" cdkDrag [cdkDragData]=\"event\"\n [cdkDragDisabled]=\"event.isOverflowIndicator\" class=\"position-absolute\">\n <div *cdkDragPlaceholder style=\"opacity: 0\"></div>\n </rlb-calendar-event>\n\n <div *ngIf=\"isToday(day)\" class=\"now-line\" [style.top.px]=\"getNowTop()\">\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [":host{display:block;height:100%}.calendar-wrapper{background-color:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius);overflow:hidden;height:100%}.header-container{background-color:var(--bs-body-bg);z-index:102;box-shadow:0 4px 6px -4px #0000001a}.header-row{width:fit-content;min-width:100%}.time-gutter{width:60px;border-color:var(--bs-border-color)!important}.day-cell{border-color:var(--bs-border-color)!important;flex:1 1 0px;width:0;min-width:120px;overflow:hidden}.day-cell:last-child{border-right:none!important}.calendar-body{scroll-behavior:auto}.body-row{width:fit-content;min-width:100%}.sticky-start{position:sticky;left:0;z-index:50;background-color:var(--bs-body-bg)}.time-sidebar{width:60px;border-color:var(--bs-border-color)!important}.grid-row{border-color:var(--bs-border-color)!important;box-sizing:border-box}.grid-row:after{content:\"\";position:absolute;width:100%;border-bottom:1px dotted currentColor;opacity:.15;top:50%;left:0;pointer-events:none}.day-column{border-color:var(--bs-border-color)!important;flex:1 1 0px;width:0;min-width:120px}.day-column:last-child{border-right:none!important}.now-line{position:absolute;left:0;right:0;height:2px;background-color:var(--bs-danger);z-index:10;pointer-events:none}.now-line:before{content:\"\";position:absolute;left:-5px;top:-4px;width:10px;height:10px;background-color:var(--bs-danger);border-radius:50%}.z-0{z-index:0}.z-1{z-index:1}\n"] }]
|
|
3356
3399
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { view: [{
|
|
3357
3400
|
type: Input
|
|
3358
3401
|
}], currentDate: [{
|
|
3359
3402
|
type: Input
|
|
3360
3403
|
}], events: [{
|
|
3361
3404
|
type: Input
|
|
3405
|
+
}], layout: [{
|
|
3406
|
+
type: Input
|
|
3362
3407
|
}], eventClick: [{
|
|
3363
3408
|
type: Output
|
|
3364
3409
|
}], eventContainerClick: [{
|
|
@@ -3373,6 +3418,271 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3373
3418
|
args: ['headerRow', { static: false }]
|
|
3374
3419
|
}] } });
|
|
3375
3420
|
|
|
3421
|
+
class CalendarDayGridComponent {
|
|
3422
|
+
constructor(cd) {
|
|
3423
|
+
this.cd = cd;
|
|
3424
|
+
this.events = [];
|
|
3425
|
+
this.eventClick = new EventEmitter();
|
|
3426
|
+
this.eventContainerClick = new EventEmitter();
|
|
3427
|
+
this.eventChange = new EventEmitter();
|
|
3428
|
+
this.timeSlots = [];
|
|
3429
|
+
this.processedEvents = [];
|
|
3430
|
+
// CONFIG CONSTANTS (Replaced by Layout Input)
|
|
3431
|
+
this.MAX_VISIBLE_COLUMNS = 10; // More columns allow in day view
|
|
3432
|
+
this.SNAP_MINUTES = 15;
|
|
3433
|
+
this.now = getToday();
|
|
3434
|
+
}
|
|
3435
|
+
ngOnChanges(changes) {
|
|
3436
|
+
if (changes['view'] || changes['currentDate']) {
|
|
3437
|
+
if (this.view === 'day') {
|
|
3438
|
+
this.buildDayGrid(this.currentDate);
|
|
3439
|
+
this.buildTimeSlots();
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
if (changes['events']) {
|
|
3443
|
+
this.events = changes['events'].currentValue;
|
|
3444
|
+
}
|
|
3445
|
+
if (changes['events'] || changes['currentDate']) {
|
|
3446
|
+
this.processAllEvents();
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3449
|
+
ngAfterViewInit() {
|
|
3450
|
+
this.cd.detectChanges();
|
|
3451
|
+
}
|
|
3452
|
+
ngOnDestroy() {
|
|
3453
|
+
this.stopNowTimer();
|
|
3454
|
+
}
|
|
3455
|
+
trackByEventId(index, item) {
|
|
3456
|
+
return item.id;
|
|
3457
|
+
}
|
|
3458
|
+
onEventDrop(event) {
|
|
3459
|
+
const movedEvent = event.item.data;
|
|
3460
|
+
// For day view, the container data is the single day we are viewing
|
|
3461
|
+
const newDay = this.day;
|
|
3462
|
+
const originalTopPx = this.calculateEventTop(movedEvent);
|
|
3463
|
+
const dragDistancePx = event.distance.y;
|
|
3464
|
+
const newTopPx = originalTopPx + dragDistancePx;
|
|
3465
|
+
const rawMinutesFromStart = (newTopPx / this.layout.rowHeight) * 60;
|
|
3466
|
+
const snappedMinutes = Math.round(rawMinutesFromStart / this.SNAP_MINUTES) * this.SNAP_MINUTES;
|
|
3467
|
+
const validMinutes = Math.max(0, snappedMinutes);
|
|
3468
|
+
const newStart = new DateTz$1(newDay)
|
|
3469
|
+
.set(0, 'hour')
|
|
3470
|
+
.set(0, 'minute')
|
|
3471
|
+
.add(validMinutes, 'minute')
|
|
3472
|
+
.stripSecMillis();
|
|
3473
|
+
const durationMs = movedEvent.end.timestamp - movedEvent.start.timestamp;
|
|
3474
|
+
const newEnd = new DateTz$1(newStart.timestamp + durationMs).stripSecMillis();
|
|
3475
|
+
if (newStart.timestamp !== movedEvent.start.timestamp) {
|
|
3476
|
+
const updatedEvent = {
|
|
3477
|
+
...movedEvent,
|
|
3478
|
+
start: newStart,
|
|
3479
|
+
end: newEnd,
|
|
3480
|
+
};
|
|
3481
|
+
this.eventChange.emit(updatedEvent);
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
calculateEventTop(event) {
|
|
3485
|
+
const startOfDay = new DateTz$1(this.day).set(0, 'hour').set(0, 'minute').stripSecMillis();
|
|
3486
|
+
// Use event.start directly, but ensure we are calculating relative to THIS day
|
|
3487
|
+
// If event starts on previous day, we should clamp?
|
|
3488
|
+
// Logic from week grid handles "chunks", here we assume processAllEvents has given us the chunk for this day.
|
|
3489
|
+
let eventStart = event.start;
|
|
3490
|
+
if (eventStart.timestamp < startOfDay.timestamp) {
|
|
3491
|
+
eventStart = startOfDay;
|
|
3492
|
+
}
|
|
3493
|
+
const diffMs = eventStart.timestamp - startOfDay.timestamp;
|
|
3494
|
+
const diffMinutes = diffMs / (1000 * 60);
|
|
3495
|
+
return (diffMinutes / 60) * this.layout.rowHeight;
|
|
3496
|
+
}
|
|
3497
|
+
calculateEventHeight(event) {
|
|
3498
|
+
// If event continues to next day, visual end is midnight.
|
|
3499
|
+
// Logic from week grid's 'processAllEvents' handled chunking, so here specific event chunk should be correct.
|
|
3500
|
+
const durationMs = event.end.timestamp - event.start.timestamp;
|
|
3501
|
+
const durationMinutes = durationMs / (1000 * 60);
|
|
3502
|
+
return (durationMinutes / 60) * this.layout.rowHeight;
|
|
3503
|
+
}
|
|
3504
|
+
getNowTop() {
|
|
3505
|
+
const hours = this.now.hour;
|
|
3506
|
+
const minutes = this.now.minute;
|
|
3507
|
+
return ((hours * 60) + minutes) / 60 * this.layout.rowHeight;
|
|
3508
|
+
}
|
|
3509
|
+
isToday(date) {
|
|
3510
|
+
return isToday(date);
|
|
3511
|
+
}
|
|
3512
|
+
startNowTimer() {
|
|
3513
|
+
this.stopNowTimer(); // clear existing if any
|
|
3514
|
+
this.nowInterval = setInterval(() => {
|
|
3515
|
+
this.now = getToday();
|
|
3516
|
+
this.cd.detectChanges();
|
|
3517
|
+
}, 60 * 1000); // every minute
|
|
3518
|
+
}
|
|
3519
|
+
stopNowTimer() {
|
|
3520
|
+
if (this.nowInterval) {
|
|
3521
|
+
clearInterval(this.nowInterval);
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
buildDayGrid(currentDate) {
|
|
3525
|
+
this.day = new DateTz$1(currentDate.timestamp, 'UTC');
|
|
3526
|
+
this.startNowTimer();
|
|
3527
|
+
}
|
|
3528
|
+
buildTimeSlots() {
|
|
3529
|
+
const slots = [];
|
|
3530
|
+
for (let h = 0; h < 24; h++) {
|
|
3531
|
+
slots.push(`${h.toString().padStart(2, '0')}:00`);
|
|
3532
|
+
}
|
|
3533
|
+
this.timeSlots = slots;
|
|
3534
|
+
}
|
|
3535
|
+
isOverlapping(eventA, eventB) {
|
|
3536
|
+
const startA = eventA.start.timestamp;
|
|
3537
|
+
const endA = eventA.end.timestamp;
|
|
3538
|
+
const startB = eventB.start.timestamp;
|
|
3539
|
+
const endB = eventB.end.timestamp;
|
|
3540
|
+
return startA < endB && startB < endA;
|
|
3541
|
+
}
|
|
3542
|
+
processAllEvents() {
|
|
3543
|
+
if (!this.day)
|
|
3544
|
+
return;
|
|
3545
|
+
// Filter events for this day
|
|
3546
|
+
const dayStart = new DateTz$1(this.day).set(0, 'hour').set(0, 'minute').stripSecMillis();
|
|
3547
|
+
const dayEnd = new DateTz$1(this.day).set(0, 'hour').set(0, 'minute').add(1, 'day').stripSecMillis();
|
|
3548
|
+
const dayEvents = [];
|
|
3549
|
+
for (const event of this.events) {
|
|
3550
|
+
// Check overlap with the day
|
|
3551
|
+
if (event.end.timestamp > dayStart.timestamp && event.start.timestamp < dayEnd.timestamp) {
|
|
3552
|
+
let visualStart = event.start;
|
|
3553
|
+
let visualEnd = event.end;
|
|
3554
|
+
let isContinuedBefore = false;
|
|
3555
|
+
let isContinuedAfter = false;
|
|
3556
|
+
if (visualStart.timestamp < dayStart.timestamp) {
|
|
3557
|
+
visualStart = dayStart;
|
|
3558
|
+
isContinuedBefore = true;
|
|
3559
|
+
}
|
|
3560
|
+
if (visualEnd.timestamp > dayEnd.timestamp) {
|
|
3561
|
+
visualEnd = dayEnd;
|
|
3562
|
+
isContinuedAfter = true;
|
|
3563
|
+
}
|
|
3564
|
+
dayEvents.push({
|
|
3565
|
+
...event,
|
|
3566
|
+
start: visualStart,
|
|
3567
|
+
end: visualEnd,
|
|
3568
|
+
isContinuedBefore,
|
|
3569
|
+
isContinuedAfter,
|
|
3570
|
+
left: 0,
|
|
3571
|
+
width: 0
|
|
3572
|
+
});
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
const sortedDayEvents = this.sortEventsStable(dayEvents);
|
|
3576
|
+
const groups = this.groupEventsByConflicts(sortedDayEvents);
|
|
3577
|
+
const eventsWithLayout = [];
|
|
3578
|
+
for (const group of groups) {
|
|
3579
|
+
const groupLayouts = this.resolveConflictGroupLayout(group);
|
|
3580
|
+
eventsWithLayout.push(...groupLayouts);
|
|
3581
|
+
}
|
|
3582
|
+
this.processedEvents = eventsWithLayout;
|
|
3583
|
+
this.cd.markForCheck();
|
|
3584
|
+
}
|
|
3585
|
+
groupEventsByConflicts(dayEvents) {
|
|
3586
|
+
if (dayEvents.length === 0)
|
|
3587
|
+
return [];
|
|
3588
|
+
const groups = [];
|
|
3589
|
+
const visited = new Map();
|
|
3590
|
+
for (const event of dayEvents) {
|
|
3591
|
+
if (visited.get(event))
|
|
3592
|
+
continue;
|
|
3593
|
+
const currentGroup = [];
|
|
3594
|
+
const queue = [event];
|
|
3595
|
+
visited.set(event, true);
|
|
3596
|
+
while (queue.length > 0) {
|
|
3597
|
+
const current = queue.shift();
|
|
3598
|
+
currentGroup.push(current);
|
|
3599
|
+
for (const other of dayEvents) {
|
|
3600
|
+
if (!visited.get(other) && this.isOverlapping(current, other)) {
|
|
3601
|
+
visited.set(other, true);
|
|
3602
|
+
queue.push(other);
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
groups.push(currentGroup);
|
|
3607
|
+
}
|
|
3608
|
+
return groups;
|
|
3609
|
+
}
|
|
3610
|
+
resolveConflictGroupLayout(groupEvents) {
|
|
3611
|
+
if (!groupEvents || groupEvents.length === 0)
|
|
3612
|
+
return [];
|
|
3613
|
+
const columns = [];
|
|
3614
|
+
const columnLastEndTimes = [];
|
|
3615
|
+
for (const event of groupEvents) {
|
|
3616
|
+
let assignedCol = -1;
|
|
3617
|
+
for (let i = 0; i < columnLastEndTimes.length; i++) {
|
|
3618
|
+
if (columnLastEndTimes[i] <= event.start.timestamp) {
|
|
3619
|
+
assignedCol = i;
|
|
3620
|
+
break;
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
if (assignedCol === -1) {
|
|
3624
|
+
assignedCol = columns.length;
|
|
3625
|
+
columns.push([]);
|
|
3626
|
+
columnLastEndTimes.push(0);
|
|
3627
|
+
}
|
|
3628
|
+
columns[assignedCol].push(event);
|
|
3629
|
+
columnLastEndTimes[assignedCol] = event.end.timestamp;
|
|
3630
|
+
}
|
|
3631
|
+
const totalColumns = columns.length;
|
|
3632
|
+
const resultEvents = [];
|
|
3633
|
+
// All events share the width equally
|
|
3634
|
+
// If needed we can expand visible max columns, but day view usually has space
|
|
3635
|
+
const colWidth = 100 / Math.max(1, totalColumns);
|
|
3636
|
+
columns.forEach((colEvents, colIndex) => {
|
|
3637
|
+
colEvents.forEach(event => {
|
|
3638
|
+
resultEvents.push({
|
|
3639
|
+
...event,
|
|
3640
|
+
left: colIndex * colWidth,
|
|
3641
|
+
width: colWidth
|
|
3642
|
+
});
|
|
3643
|
+
});
|
|
3644
|
+
});
|
|
3645
|
+
return resultEvents;
|
|
3646
|
+
}
|
|
3647
|
+
sortEventsStable(events) {
|
|
3648
|
+
return [...events].sort((a, b) => {
|
|
3649
|
+
const diff = a.start.timestamp - b.start.timestamp;
|
|
3650
|
+
if (diff !== 0)
|
|
3651
|
+
return diff;
|
|
3652
|
+
const durA = a.end.timestamp - a.start.timestamp;
|
|
3653
|
+
const durB = b.end.timestamp - b.start.timestamp;
|
|
3654
|
+
if (durB !== durA)
|
|
3655
|
+
return durB - durA;
|
|
3656
|
+
const idA = a.id ? a.id.toString() : a.title;
|
|
3657
|
+
const idB = b.id ? b.id.toString() : b.title;
|
|
3658
|
+
return idA.localeCompare(idB);
|
|
3659
|
+
});
|
|
3660
|
+
}
|
|
3661
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarDayGridComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3662
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarDayGridComponent, isStandalone: false, selector: "rlb-calendar-day-grid", inputs: { view: "view", currentDate: "currentDate", events: "events", layout: "layout" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, viewQueries: [{ propertyName: "scrollBodyRef", first: true, predicate: ["scrollBody"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"calendar-wrapper d-flex flex-column\" *ngIf=\"day\">\n\n <!-- HEADER WRAPPER -->\n <!-- For day view, we just show the date at top? Or maybe just keep it simple with body since main header has date -->\n <!-- Mimicking structure of Week View but single column -->\n <div class=\"header-container overflow-hidden flex-shrink-0 border-bottom bg-body-tertiary\">\n <div class=\"header-row d-flex\" [style.min-height.rem]=\"layout.minHeaderHeight\">\n <div class=\"time-gutter border-end flex-shrink-0\"></div>\n <div class=\"day-cell p-2 flex-grow-1\" [class.text-primary]=\"isToday(day)\"\n [class.fw-bold]=\"isToday(day)\" [class.bg-primary]=\"isToday(day)\">\n <div class=\"small text-uppercase text-body-secondary h-100 d-flex align-items-center justify-content-center\">{{ day | dayOfWeek: 'long' }}</div>\n </div>\n </div>\n </div>\n\n <!-- BODY WRAPPER -->\n <div #scrollBody class=\"calendar-body flex-grow-1 overflow-auto bg-body position-relative\"\n [style.max-height.rem]=\"layout.maxBodyHeight\">\n\n <div class=\"body-row d-flex position-relative\">\n\n <!-- SIDEBAR (Sticky Left) -->\n <div class=\"time-sidebar sticky-start flex-shrink-0 border-end\">\n <div *ngFor=\"let time of timeSlots; let i = index\"\n class=\"time-slot-label small text-body-secondary d-flex align-items-start justify-content-center\"\n [style.height.px]=\"layout.rowHeight\">\n <span *ngIf=\"i !== 0\" style=\"transform: translateY(-50%)\">\n {{ time }}\n </span>\n </div>\n </div>\n\n <!-- GRID AND EVENTS -->\n <div class=\"grid-layer flex-grow-1 position-relative\">\n\n <!-- LAYER 1: Grid -->\n <div class=\"background-grid position-absolute w-100 h-100 top-0 start-0 z-0\">\n <div *ngFor=\"let time of timeSlots\" class=\"grid-row border-bottom\" [style.height.px]=\"layout.rowHeight\">\n </div>\n </div>\n\n <!-- Layer 2: Events -->\n <div class=\"events-container d-flex h-100 w-100 position-relative z-1\" cdkDropListGroup>\n <div class=\"day-column position-relative h-100 w-100\" cdkDropList [cdkDropListSortingDisabled]=\"true\"\n [cdkDropListData]=\"day\" (cdkDropListDropped)=\"onEventDrop($event)\" (click)=\"eventClick.emit()\">\n\n <rlb-calendar-event *ngFor=\"let event of processedEvents; trackBy: trackByEventId\" [view]=\"view\"\n [event]=\"event\" [style.top.px]=\"calculateEventTop(event)\" [style.height.px]=\"calculateEventHeight(event)\"\n [style.left.%]=\"event.left\" [style.width.%]=\"event.width\" (eventClick)=\"eventClick.emit($event)\"\n (eventContainerClick)=\"eventContainerClick.emit($event)\" cdkDrag [cdkDragData]=\"event\"\n class=\"position-absolute\">\n <div *cdkDragPlaceholder style=\"opacity: 0\"></div>\n </rlb-calendar-event>\n\n <div *ngIf=\"isToday(day)\" class=\"now-line\" [style.top.px]=\"getNowTop()\">\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;height:100%}.calendar-wrapper{background-color:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius);overflow:hidden;height:100%}.header-container{background-color:var(--bs-body-bg);z-index:102}.header-row{width:100%}.time-gutter{width:60px;border-color:var(--bs-border-color)!important}.day-cell{border-color:var(--bs-border-color)!important}.calendar-body{scroll-behavior:auto}.body-row{width:100%}.sticky-start{position:sticky;left:0;z-index:50;background-color:var(--bs-body-bg)}.time-sidebar{width:60px;border-color:var(--bs-border-color)!important}.grid-row{border-color:var(--bs-border-color)!important;box-sizing:border-box}.grid-row:after{content:\"\";position:absolute;width:100%;border-bottom:1px dotted currentColor;opacity:.15;top:50%;left:0;pointer-events:none}.now-line{position:absolute;left:0;right:0;height:2px;background-color:var(--bs-danger);z-index:10;pointer-events:none}.now-line:before{content:\"\";position:absolute;left:-5px;top:-4px;width:10px;height:10px;background-color:var(--bs-danger);border-radius:50%}.z-0{z-index:0}.z-1{z-index:1}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$3.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$3.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: CalendarEventComponent, selector: "rlb-calendar-event", inputs: ["event", "view"], outputs: ["eventClick", "eventContainerClick"] }, { kind: "pipe", type: DayOfWeekPipe, name: "dayOfWeek" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3663
|
+
}
|
|
3664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarDayGridComponent, decorators: [{
|
|
3665
|
+
type: Component,
|
|
3666
|
+
args: [{ selector: 'rlb-calendar-day-grid', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"calendar-wrapper d-flex flex-column\" *ngIf=\"day\">\n\n <!-- HEADER WRAPPER -->\n <!-- For day view, we just show the date at top? Or maybe just keep it simple with body since main header has date -->\n <!-- Mimicking structure of Week View but single column -->\n <div class=\"header-container overflow-hidden flex-shrink-0 border-bottom bg-body-tertiary\">\n <div class=\"header-row d-flex\" [style.min-height.rem]=\"layout.minHeaderHeight\">\n <div class=\"time-gutter border-end flex-shrink-0\"></div>\n <div class=\"day-cell p-2 flex-grow-1\" [class.text-primary]=\"isToday(day)\"\n [class.fw-bold]=\"isToday(day)\" [class.bg-primary]=\"isToday(day)\">\n <div class=\"small text-uppercase text-body-secondary h-100 d-flex align-items-center justify-content-center\">{{ day | dayOfWeek: 'long' }}</div>\n </div>\n </div>\n </div>\n\n <!-- BODY WRAPPER -->\n <div #scrollBody class=\"calendar-body flex-grow-1 overflow-auto bg-body position-relative\"\n [style.max-height.rem]=\"layout.maxBodyHeight\">\n\n <div class=\"body-row d-flex position-relative\">\n\n <!-- SIDEBAR (Sticky Left) -->\n <div class=\"time-sidebar sticky-start flex-shrink-0 border-end\">\n <div *ngFor=\"let time of timeSlots; let i = index\"\n class=\"time-slot-label small text-body-secondary d-flex align-items-start justify-content-center\"\n [style.height.px]=\"layout.rowHeight\">\n <span *ngIf=\"i !== 0\" style=\"transform: translateY(-50%)\">\n {{ time }}\n </span>\n </div>\n </div>\n\n <!-- GRID AND EVENTS -->\n <div class=\"grid-layer flex-grow-1 position-relative\">\n\n <!-- LAYER 1: Grid -->\n <div class=\"background-grid position-absolute w-100 h-100 top-0 start-0 z-0\">\n <div *ngFor=\"let time of timeSlots\" class=\"grid-row border-bottom\" [style.height.px]=\"layout.rowHeight\">\n </div>\n </div>\n\n <!-- Layer 2: Events -->\n <div class=\"events-container d-flex h-100 w-100 position-relative z-1\" cdkDropListGroup>\n <div class=\"day-column position-relative h-100 w-100\" cdkDropList [cdkDropListSortingDisabled]=\"true\"\n [cdkDropListData]=\"day\" (cdkDropListDropped)=\"onEventDrop($event)\" (click)=\"eventClick.emit()\">\n\n <rlb-calendar-event *ngFor=\"let event of processedEvents; trackBy: trackByEventId\" [view]=\"view\"\n [event]=\"event\" [style.top.px]=\"calculateEventTop(event)\" [style.height.px]=\"calculateEventHeight(event)\"\n [style.left.%]=\"event.left\" [style.width.%]=\"event.width\" (eventClick)=\"eventClick.emit($event)\"\n (eventContainerClick)=\"eventContainerClick.emit($event)\" cdkDrag [cdkDragData]=\"event\"\n class=\"position-absolute\">\n <div *cdkDragPlaceholder style=\"opacity: 0\"></div>\n </rlb-calendar-event>\n\n <div *ngIf=\"isToday(day)\" class=\"now-line\" [style.top.px]=\"getNowTop()\">\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;height:100%}.calendar-wrapper{background-color:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius);overflow:hidden;height:100%}.header-container{background-color:var(--bs-body-bg);z-index:102}.header-row{width:100%}.time-gutter{width:60px;border-color:var(--bs-border-color)!important}.day-cell{border-color:var(--bs-border-color)!important}.calendar-body{scroll-behavior:auto}.body-row{width:100%}.sticky-start{position:sticky;left:0;z-index:50;background-color:var(--bs-body-bg)}.time-sidebar{width:60px;border-color:var(--bs-border-color)!important}.grid-row{border-color:var(--bs-border-color)!important;box-sizing:border-box}.grid-row:after{content:\"\";position:absolute;width:100%;border-bottom:1px dotted currentColor;opacity:.15;top:50%;left:0;pointer-events:none}.now-line{position:absolute;left:0;right:0;height:2px;background-color:var(--bs-danger);z-index:10;pointer-events:none}.now-line:before{content:\"\";position:absolute;left:-5px;top:-4px;width:10px;height:10px;background-color:var(--bs-danger);border-radius:50%}.z-0{z-index:0}.z-1{z-index:1}\n"] }]
|
|
3667
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { view: [{
|
|
3668
|
+
type: Input
|
|
3669
|
+
}], currentDate: [{
|
|
3670
|
+
type: Input
|
|
3671
|
+
}], events: [{
|
|
3672
|
+
type: Input
|
|
3673
|
+
}], layout: [{
|
|
3674
|
+
type: Input
|
|
3675
|
+
}], eventClick: [{
|
|
3676
|
+
type: Output
|
|
3677
|
+
}], eventContainerClick: [{
|
|
3678
|
+
type: Output
|
|
3679
|
+
}], eventChange: [{
|
|
3680
|
+
type: Output
|
|
3681
|
+
}], scrollBodyRef: [{
|
|
3682
|
+
type: ViewChild,
|
|
3683
|
+
args: ['scrollBody', { static: false }]
|
|
3684
|
+
}] } });
|
|
3685
|
+
|
|
3376
3686
|
const MAX_EVENTS_PER_CELL = 3;
|
|
3377
3687
|
const DAYS_IN_GRID = 42; // 6 weeks * 7 days
|
|
3378
3688
|
class CalendarMonthGridComponent {
|
|
@@ -3384,9 +3694,6 @@ class CalendarMonthGridComponent {
|
|
|
3384
3694
|
this.scrollbarWidth = 0;
|
|
3385
3695
|
this.weeks = [];
|
|
3386
3696
|
this.weekDaysHeader = [];
|
|
3387
|
-
this.MAX_BODY_HEIGHT = 30; // rem
|
|
3388
|
-
this.MIN_ROW_HEIGHT = 110; // px for a full hour slot
|
|
3389
|
-
this.MIN_HEADER_HEIGHT = 3.5; // rem
|
|
3390
3697
|
this.onResize = () => {
|
|
3391
3698
|
this.updateScrollbarWidth();
|
|
3392
3699
|
};
|
|
@@ -3488,6 +3795,10 @@ class CalendarMonthGridComponent {
|
|
|
3488
3795
|
});
|
|
3489
3796
|
this.weeks.push(row);
|
|
3490
3797
|
}
|
|
3798
|
+
// Defer scrollbar calculation to after the view updates
|
|
3799
|
+
setTimeout(() => {
|
|
3800
|
+
this.updateScrollbarWidth();
|
|
3801
|
+
});
|
|
3491
3802
|
}
|
|
3492
3803
|
/**
|
|
3493
3804
|
* "Tetris" Algorithm:
|
|
@@ -3614,17 +3925,19 @@ class CalendarMonthGridComponent {
|
|
|
3614
3925
|
this.eventChange.emit(updatedEvent);
|
|
3615
3926
|
}
|
|
3616
3927
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarMonthGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3617
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarMonthGridComponent, isStandalone: false, selector: "rlb-calendar-month-grid", inputs: { view: "view", currentDate: "currentDate", events: "events" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, viewQueries: [{ propertyName: "scrollBodyRef", first: true, predicate: ["scrollBody"], descendants: true }, { propertyName: "headerRowRef", first: true, predicate: ["headerRow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex flex-column w-100 bg-body user-select-none month-view-root\"
|
|
3928
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarMonthGridComponent, isStandalone: false, selector: "rlb-calendar-month-grid", inputs: { view: "view", currentDate: "currentDate", events: "events", layout: "layout" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, viewQueries: [{ propertyName: "scrollBodyRef", first: true, predicate: ["scrollBody"], descendants: true }, { propertyName: "headerRowRef", first: true, predicate: ["headerRow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex flex-column w-100 bg-body user-select-none month-view-root\">\n <!-- 1. Header Row (Fixed) -->\n <div #headerRow class=\"d-flex flex-shrink-0 border-bottom bg-body-tertiary overflow-hidden\"\n [style.min-height.rem]=\"layout.minHeaderHeight\" [style.padding-right.px]=\"scrollbarWidth\">\n <div *ngFor=\"let day of weekDaysHeader\"\n class=\"flex-fill text-center py-2 border-end fw-bold text-secondary text-uppercase w-0 my-auto h6\">\n {{ day | dayOfWeek:'short' }}\n </div>\n </div>\n\n <!-- SCROLL CONTAINER -->\n <div #scrollBody class=\"calendar-scroller flex-grow-1 overflow-auto bg-body position-relative\"\n [style.max-height.rem]=\"layout.maxBodyHeight\"\n (scroll)=\"onBodyScroll($event)\">\n\n <!-- 2. Grid Body (Scrollable) -->\n <div class=\"d-flex flex-column flex-grow-1 border-start min-height-0\">\n\n <div class=\"d-flex flex-column\" cdkDropListGroup>\n <div *ngFor=\"let week of weeks;\" class=\"d-flex border-bottom min-h-row\" style=\"flex: 1 0 auto;\"\n [style.min-height.px]=\"layout.rowHeight\">\n\n\n <div *ngFor=\"let slot of week;\" class=\"flex-fill border-end p-1 d-flex flex-column position-relative\"\n style=\"width: 0\" [class.bg-light]=\"!isCurrentMonth(slot.date)\" cdkDropList [cdkDropListData]=\"slot.date\"\n (cdkDropListDropped)=\"onEventDrop($event)\" (click)=\"eventClick.emit()\">\n <!-- Date Number -->\n <div class=\"d-flex justify-content-center mb-1\">\n <span class=\"day-number d-flex align-items-center justify-content-center\"\n [class.today]=\"isToday(slot.date)\">\n {{ slot.date | dtz:'DD' }}\n </span>\n </div>\n\n <!-- Events Stack -->\n <div class=\"d-flex flex-column gap-1 w-100\">\n <ng-container *ngFor=\"let event of slot.events; trackBy: trackByEvent\">\n\n <!-- Spacer -->\n <div *ngIf=\"event.isSpacer\" class=\"event-spacer\"></div>\n\n <!-- Event -->\n <rlb-calendar-event *ngIf=\"!event.isSpacer\" [event]=\"event\" class=\"w-100\" cdkDrag [cdkDragData]=\"event\"\n (eventClick)=\"eventClick.emit($event)\" [view]=\"view\">\n <!-- Drag Preview (Optional but nice) -->\n <div *cdkDragPlaceholder style=\"opacity: 0\"></div>\n <ng-template cdkDragPreview matchSize class=\"rlb-calendar-drag-preview\">\n <rlb-calendar-event [event]=\"event\" [view]=\"view\" style=\"box-sizing: border-box;\">\n </rlb-calendar-event>\n </ng-template>\n </rlb-calendar-event>\n\n </ng-container>\n </div>\n\n <!-- Overflow (+N more) -->\n <div *ngIf=\"slot.hasOverflow\"\n class=\"mt-1 small text-secondary text-center cursor-pointer p-1 rounded hover-bg\"\n (click)=\"$event.stopPropagation(); eventContainerClick.emit(slot.overflowEvents)\">\n +{{ slot.overflowCount }} more\n </div>\n </div>\n\n </div>\n </div>\n </div>\n\n </div>\n</div>\n", styles: [":host{display:block;height:100%}.min-height-0{min-height:0!important}.border-end:last-child{border-right:0!important}.day-number{width:24px;height:24px;border-radius:50%;font-size:.85rem;font-weight:500;transition:background-color .2s}.day-number.today{background-color:var(--bs-primary);color:#fff}.event-spacer{height:20px;width:100%;pointer-events:none}.hover-bg:hover{background-color:var(--bs-secondary-bg-subtle)}.cursor-pointer{cursor:pointer}.cdk-drag-preview{box-shadow:0 .5rem 1rem #0000004d;border-radius:var(--bs-border-radius-sm)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$3.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$3.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i2$3.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "component", type: CalendarEventComponent, selector: "rlb-calendar-event", inputs: ["event", "view"], outputs: ["eventClick", "eventContainerClick"] }, { kind: "pipe", type: DateTzPipe, name: "dtz" }, { kind: "pipe", type: DayOfWeekPipe, name: "dayOfWeek" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3618
3929
|
}
|
|
3619
3930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarMonthGridComponent, decorators: [{
|
|
3620
3931
|
type: Component,
|
|
3621
|
-
args: [{ selector: 'rlb-calendar-month-grid', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex flex-column w-100 bg-body user-select-none month-view-root\"
|
|
3932
|
+
args: [{ selector: 'rlb-calendar-month-grid', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex flex-column w-100 bg-body user-select-none month-view-root\">\n <!-- 1. Header Row (Fixed) -->\n <div #headerRow class=\"d-flex flex-shrink-0 border-bottom bg-body-tertiary overflow-hidden\"\n [style.min-height.rem]=\"layout.minHeaderHeight\" [style.padding-right.px]=\"scrollbarWidth\">\n <div *ngFor=\"let day of weekDaysHeader\"\n class=\"flex-fill text-center py-2 border-end fw-bold text-secondary text-uppercase w-0 my-auto h6\">\n {{ day | dayOfWeek:'short' }}\n </div>\n </div>\n\n <!-- SCROLL CONTAINER -->\n <div #scrollBody class=\"calendar-scroller flex-grow-1 overflow-auto bg-body position-relative\"\n [style.max-height.rem]=\"layout.maxBodyHeight\"\n (scroll)=\"onBodyScroll($event)\">\n\n <!-- 2. Grid Body (Scrollable) -->\n <div class=\"d-flex flex-column flex-grow-1 border-start min-height-0\">\n\n <div class=\"d-flex flex-column\" cdkDropListGroup>\n <div *ngFor=\"let week of weeks;\" class=\"d-flex border-bottom min-h-row\" style=\"flex: 1 0 auto;\"\n [style.min-height.px]=\"layout.rowHeight\">\n\n\n <div *ngFor=\"let slot of week;\" class=\"flex-fill border-end p-1 d-flex flex-column position-relative\"\n style=\"width: 0\" [class.bg-light]=\"!isCurrentMonth(slot.date)\" cdkDropList [cdkDropListData]=\"slot.date\"\n (cdkDropListDropped)=\"onEventDrop($event)\" (click)=\"eventClick.emit()\">\n <!-- Date Number -->\n <div class=\"d-flex justify-content-center mb-1\">\n <span class=\"day-number d-flex align-items-center justify-content-center\"\n [class.today]=\"isToday(slot.date)\">\n {{ slot.date | dtz:'DD' }}\n </span>\n </div>\n\n <!-- Events Stack -->\n <div class=\"d-flex flex-column gap-1 w-100\">\n <ng-container *ngFor=\"let event of slot.events; trackBy: trackByEvent\">\n\n <!-- Spacer -->\n <div *ngIf=\"event.isSpacer\" class=\"event-spacer\"></div>\n\n <!-- Event -->\n <rlb-calendar-event *ngIf=\"!event.isSpacer\" [event]=\"event\" class=\"w-100\" cdkDrag [cdkDragData]=\"event\"\n (eventClick)=\"eventClick.emit($event)\" [view]=\"view\">\n <!-- Drag Preview (Optional but nice) -->\n <div *cdkDragPlaceholder style=\"opacity: 0\"></div>\n <ng-template cdkDragPreview matchSize class=\"rlb-calendar-drag-preview\">\n <rlb-calendar-event [event]=\"event\" [view]=\"view\" style=\"box-sizing: border-box;\">\n </rlb-calendar-event>\n </ng-template>\n </rlb-calendar-event>\n\n </ng-container>\n </div>\n\n <!-- Overflow (+N more) -->\n <div *ngIf=\"slot.hasOverflow\"\n class=\"mt-1 small text-secondary text-center cursor-pointer p-1 rounded hover-bg\"\n (click)=\"$event.stopPropagation(); eventContainerClick.emit(slot.overflowEvents)\">\n +{{ slot.overflowCount }} more\n </div>\n </div>\n\n </div>\n </div>\n </div>\n\n </div>\n</div>\n", styles: [":host{display:block;height:100%}.min-height-0{min-height:0!important}.border-end:last-child{border-right:0!important}.day-number{width:24px;height:24px;border-radius:50%;font-size:.85rem;font-weight:500;transition:background-color .2s}.day-number.today{background-color:var(--bs-primary);color:#fff}.event-spacer{height:20px;width:100%;pointer-events:none}.hover-bg:hover{background-color:var(--bs-secondary-bg-subtle)}.cursor-pointer{cursor:pointer}.cdk-drag-preview{box-shadow:0 .5rem 1rem #0000004d;border-radius:var(--bs-border-radius-sm)}\n"] }]
|
|
3622
3933
|
}], ctorParameters: () => [], propDecorators: { view: [{
|
|
3623
3934
|
type: Input
|
|
3624
3935
|
}], currentDate: [{
|
|
3625
3936
|
type: Input
|
|
3626
3937
|
}], events: [{
|
|
3627
3938
|
type: Input
|
|
3939
|
+
}], layout: [{
|
|
3940
|
+
type: Input
|
|
3628
3941
|
}], eventClick: [{
|
|
3629
3942
|
type: Output
|
|
3630
3943
|
}], eventContainerClick: [{
|
|
@@ -3651,17 +3964,19 @@ class CalendarGrid {
|
|
|
3651
3964
|
ngOnDestroy() {
|
|
3652
3965
|
}
|
|
3653
3966
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3654
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarGrid, isStandalone: false, selector: "rlb-calendar-grid", inputs: { view: "view", currentDate: "currentDate", events: "events" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"view\">\n
|
|
3967
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CalendarGrid, isStandalone: false, selector: "rlb-calendar-grid", inputs: { view: "view", currentDate: "currentDate", events: "events", layout: "layout" }, outputs: { eventClick: "eventClick", eventContainerClick: "eventContainerClick", eventChange: "eventChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"view\">\n <ng-container *ngSwitchCase=\"'week'\">\n <rlb-calendar-week-grid [view]=\"view\" [currentDate]=\"currentDate\" [events]=\"events\" [layout]=\"layout\"\n (eventClick)=\"eventClick.emit($event)\" (eventContainerClick)=\"eventContainerClick.emit($event)\"\n (eventChange)=\"eventChange.emit($event)\" />\n </ng-container>\n <ng-container *ngSwitchCase=\"'month'\">\n <rlb-calendar-month-grid [view]=\"view\" [currentDate]=\"currentDate\" [events]=\"events\" [layout]=\"layout\"\n (eventClick)=\"eventClick.emit($event)\" (eventContainerClick)=\"eventContainerClick.emit($event)\"\n (eventChange)=\"eventChange.emit($event)\" />\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'day'\">\n <rlb-calendar-day-grid [view]=\"view\" [currentDate]=\"currentDate\" [events]=\"events\" [layout]=\"layout\"\n (eventClick)=\"eventClick.emit($event)\" (eventContainerClick)=\"eventContainerClick.emit($event)\"\n (eventChange)=\"eventChange.emit($event)\" />\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n not implemented yet\n </ng-container>\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: CalendarWeekGridComponent, selector: "rlb-calendar-week-grid", inputs: ["view", "currentDate", "events", "layout"], outputs: ["eventClick", "eventContainerClick", "eventChange"] }, { kind: "component", type: CalendarDayGridComponent, selector: "rlb-calendar-day-grid", inputs: ["view", "currentDate", "events", "layout"], outputs: ["eventClick", "eventContainerClick", "eventChange"] }, { kind: "component", type: CalendarMonthGridComponent, selector: "rlb-calendar-month-grid", inputs: ["view", "currentDate", "events", "layout"], outputs: ["eventClick", "eventContainerClick", "eventChange"] }] }); }
|
|
3655
3968
|
}
|
|
3656
3969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarGrid, decorators: [{
|
|
3657
3970
|
type: Component,
|
|
3658
|
-
args: [{ selector: 'rlb-calendar-grid', standalone: false, template: "<ng-container [ngSwitch]=\"view\">\n
|
|
3971
|
+
args: [{ selector: 'rlb-calendar-grid', standalone: false, template: "<ng-container [ngSwitch]=\"view\">\n <ng-container *ngSwitchCase=\"'week'\">\n <rlb-calendar-week-grid [view]=\"view\" [currentDate]=\"currentDate\" [events]=\"events\" [layout]=\"layout\"\n (eventClick)=\"eventClick.emit($event)\" (eventContainerClick)=\"eventContainerClick.emit($event)\"\n (eventChange)=\"eventChange.emit($event)\" />\n </ng-container>\n <ng-container *ngSwitchCase=\"'month'\">\n <rlb-calendar-month-grid [view]=\"view\" [currentDate]=\"currentDate\" [events]=\"events\" [layout]=\"layout\"\n (eventClick)=\"eventClick.emit($event)\" (eventContainerClick)=\"eventContainerClick.emit($event)\"\n (eventChange)=\"eventChange.emit($event)\" />\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'day'\">\n <rlb-calendar-day-grid [view]=\"view\" [currentDate]=\"currentDate\" [events]=\"events\" [layout]=\"layout\"\n (eventClick)=\"eventClick.emit($event)\" (eventContainerClick)=\"eventContainerClick.emit($event)\"\n (eventChange)=\"eventChange.emit($event)\" />\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n not implemented yet\n </ng-container>\n</ng-container>" }]
|
|
3659
3972
|
}], ctorParameters: () => [], propDecorators: { view: [{
|
|
3660
3973
|
type: Input
|
|
3661
3974
|
}], currentDate: [{
|
|
3662
3975
|
type: Input
|
|
3663
3976
|
}], events: [{
|
|
3664
3977
|
type: Input
|
|
3978
|
+
}], layout: [{
|
|
3979
|
+
type: Input
|
|
3665
3980
|
}], eventClick: [{
|
|
3666
3981
|
type: Output
|
|
3667
3982
|
}], eventContainerClick: [{
|
|
@@ -3679,6 +3994,8 @@ class CalendarComponent {
|
|
|
3679
3994
|
this.events = [];
|
|
3680
3995
|
this.loading = false;
|
|
3681
3996
|
this.showToolbar = true;
|
|
3997
|
+
this.layout = {};
|
|
3998
|
+
this.mergedLayout = DEFAULT_CALENDAR_LAYOUT;
|
|
3682
3999
|
this.dateChange = new EventEmitter();
|
|
3683
4000
|
this.viewChange = new EventEmitter();
|
|
3684
4001
|
this.eventClick = new EventEmitter();
|
|
@@ -3694,6 +4011,9 @@ class CalendarComponent {
|
|
|
3694
4011
|
if (changes['events']) {
|
|
3695
4012
|
this.events = changes['events'].currentValue;
|
|
3696
4013
|
}
|
|
4014
|
+
if (changes['layout']) {
|
|
4015
|
+
this.mergedLayout = { ...DEFAULT_CALENDAR_LAYOUT, ...this.layout };
|
|
4016
|
+
}
|
|
3697
4017
|
}
|
|
3698
4018
|
// DnD event
|
|
3699
4019
|
onEventChange(eventToEdit) {
|
|
@@ -3944,11 +4264,11 @@ class CalendarComponent {
|
|
|
3944
4264
|
}).pipe(take(1));
|
|
3945
4265
|
}
|
|
3946
4266
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarComponent, deps: [{ token: ModalService }, { token: UniqueIdService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3947
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.16", type: CalendarComponent, isStandalone: false, selector: "rlb-calendar", inputs: { view: "view", events: "events", currentDate: ["current-date", "currentDate"], loading: ["loading", "loading", booleanAttribute], showToolbar: ["show-toolbar", "showToolbar", booleanAttribute] }, outputs: { dateChange: "date-change", viewChange: "view-change", eventClick: "event-click" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"rlb-calendar\">\n\t<div class=\"my-3 d-flex align-items-center justify-content-between\">\n <button class=\"ms-auto\" rlb-button outline (click)=\"generateTestEvents()\">Generate events</button>\n\t</div>\n\t<rlb-calendar-header\n\t\t*ngIf=\"showToolbar\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n\t\t(viewChange)=\"setView($event)\"\n\t\t(dateChange)=\"setDate($event)\">\n\t</rlb-calendar-header>\n\n\t<rlb-calendar-grid\n\t\t[events]=\"events\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n (eventClick)=\"onEventClick($event)\"\n (eventContainerClick)=\"onEventContainerClick($event)\"\n (eventChange)=\"onEventChange($event)\"\n >\n\t</rlb-calendar-grid>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[rlb-button], a[rlb-button]", inputs: ["color", "size", "disabled", "outline", "isLink"] }, { kind: "component", type: CalendarHeaderComponent, selector: "rlb-calendar-header", inputs: ["view", "currentDate"], outputs: ["dateChange", "viewChange"] }, { kind: "component", type: CalendarGrid, selector: "rlb-calendar-grid", inputs: ["view", "currentDate", "events"], outputs: ["eventClick", "eventContainerClick", "eventChange"] }] }); }
|
|
4267
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.16", type: CalendarComponent, isStandalone: false, selector: "rlb-calendar", inputs: { view: "view", events: "events", currentDate: ["current-date", "currentDate", (d) => new DateTz(d)], loading: ["loading", "loading", booleanAttribute], showToolbar: ["show-toolbar", "showToolbar", booleanAttribute], layout: "layout" }, outputs: { dateChange: "date-change", viewChange: "view-change", eventClick: "event-click" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"rlb-calendar\">\n\t<div class=\"my-3 d-flex align-items-center justify-content-between\">\n <button class=\"ms-auto\" rlb-button outline (click)=\"generateTestEvents()\">Generate events</button>\n\t</div>\n\t<rlb-calendar-header\n\t\t*ngIf=\"showToolbar\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n\t\t(viewChange)=\"setView($event)\"\n\t\t(dateChange)=\"setDate($event)\">\n\t</rlb-calendar-header>\n\n\t<rlb-calendar-grid\n\t\t[events]=\"events\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n [layout]=\"mergedLayout\"\n (eventClick)=\"onEventClick($event)\"\n (eventContainerClick)=\"onEventContainerClick($event)\"\n (eventChange)=\"onEventChange($event)\"\n >\n\t</rlb-calendar-grid>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[rlb-button], a[rlb-button]", inputs: ["color", "size", "disabled", "outline", "isLink"] }, { kind: "component", type: CalendarHeaderComponent, selector: "rlb-calendar-header", inputs: ["view", "currentDate"], outputs: ["dateChange", "viewChange"] }, { kind: "component", type: CalendarGrid, selector: "rlb-calendar-grid", inputs: ["view", "currentDate", "events", "layout"], outputs: ["eventClick", "eventContainerClick", "eventChange"] }] }); }
|
|
3948
4268
|
}
|
|
3949
4269
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
3950
4270
|
type: Component,
|
|
3951
|
-
args: [{ selector: "rlb-calendar", standalone: false, template: "<div class=\"rlb-calendar\">\n\t<div class=\"my-3 d-flex align-items-center justify-content-between\">\n <button class=\"ms-auto\" rlb-button outline (click)=\"generateTestEvents()\">Generate events</button>\n\t</div>\n\t<rlb-calendar-header\n\t\t*ngIf=\"showToolbar\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n\t\t(viewChange)=\"setView($event)\"\n\t\t(dateChange)=\"setDate($event)\">\n\t</rlb-calendar-header>\n\n\t<rlb-calendar-grid\n\t\t[events]=\"events\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n (eventClick)=\"onEventClick($event)\"\n (eventContainerClick)=\"onEventContainerClick($event)\"\n (eventChange)=\"onEventChange($event)\"\n >\n\t</rlb-calendar-grid>\n</div>\n" }]
|
|
4271
|
+
args: [{ selector: "rlb-calendar", standalone: false, template: "<div class=\"rlb-calendar\">\n\t<div class=\"my-3 d-flex align-items-center justify-content-between\">\n <button class=\"ms-auto\" rlb-button outline (click)=\"generateTestEvents()\">Generate events</button>\n\t</div>\n\t<rlb-calendar-header\n\t\t*ngIf=\"showToolbar\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n\t\t(viewChange)=\"setView($event)\"\n\t\t(dateChange)=\"setDate($event)\">\n\t</rlb-calendar-header>\n\n\t<rlb-calendar-grid\n\t\t[events]=\"events\"\n\t\t[view]=\"view\"\n\t\t[currentDate]=\"currentDate\"\n [layout]=\"mergedLayout\"\n (eventClick)=\"onEventClick($event)\"\n (eventContainerClick)=\"onEventContainerClick($event)\"\n (eventChange)=\"onEventChange($event)\"\n >\n\t</rlb-calendar-grid>\n\n</div>\n" }]
|
|
3952
4272
|
}], ctorParameters: () => [{ type: ModalService }, { type: UniqueIdService }, { type: ToastService }], propDecorators: { view: [{
|
|
3953
4273
|
type: Input,
|
|
3954
4274
|
args: [{ alias: 'view' }]
|
|
@@ -3957,13 +4277,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3957
4277
|
args: [{ alias: 'events' }]
|
|
3958
4278
|
}], currentDate: [{
|
|
3959
4279
|
type: Input,
|
|
3960
|
-
args: [{ alias: 'current-date' }]
|
|
4280
|
+
args: [{ alias: 'current-date', transform: (d) => new DateTz(d) }]
|
|
3961
4281
|
}], loading: [{
|
|
3962
4282
|
type: Input,
|
|
3963
4283
|
args: [{ alias: 'loading', transform: booleanAttribute }]
|
|
3964
4284
|
}], showToolbar: [{
|
|
3965
4285
|
type: Input,
|
|
3966
4286
|
args: [{ alias: 'show-toolbar', transform: booleanAttribute }]
|
|
4287
|
+
}], layout: [{
|
|
4288
|
+
type: Input,
|
|
4289
|
+
args: [{ alias: 'layout' }]
|
|
3967
4290
|
}], dateChange: [{
|
|
3968
4291
|
type: Output,
|
|
3969
4292
|
args: ['date-change']
|
|
@@ -3980,6 +4303,7 @@ const CALENDAR_COMPONENTS = [
|
|
|
3980
4303
|
CalendarHeaderComponent,
|
|
3981
4304
|
CalendarGrid,
|
|
3982
4305
|
CalendarWeekGridComponent,
|
|
4306
|
+
CalendarDayGridComponent,
|
|
3983
4307
|
CalendarMonthGridComponent,
|
|
3984
4308
|
CalendarEventComponent
|
|
3985
4309
|
];
|
|
@@ -5271,11 +5595,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5271
5595
|
args: ['scroll-change']
|
|
5272
5596
|
}] } });
|
|
5273
5597
|
|
|
5598
|
+
class SidebarService {
|
|
5599
|
+
constructor() {
|
|
5600
|
+
this.itemClickedSource = new Subject();
|
|
5601
|
+
this.itemClicked$ = this.itemClickedSource.asObservable();
|
|
5602
|
+
}
|
|
5603
|
+
notifyItemClicked() {
|
|
5604
|
+
this.itemClickedSource.next();
|
|
5605
|
+
}
|
|
5606
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5607
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarService, providedIn: 'root' }); }
|
|
5608
|
+
}
|
|
5609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarService, decorators: [{
|
|
5610
|
+
type: Injectable,
|
|
5611
|
+
args: [{
|
|
5612
|
+
providedIn: 'root'
|
|
5613
|
+
}]
|
|
5614
|
+
}] });
|
|
5615
|
+
|
|
5274
5616
|
class SidebarItemComponent {
|
|
5275
|
-
constructor(viewContainerRef, uniqueIdService, router) {
|
|
5617
|
+
constructor(viewContainerRef, uniqueIdService, router, sidebarService) {
|
|
5276
5618
|
this.viewContainerRef = viewContainerRef;
|
|
5277
5619
|
this.uniqueIdService = uniqueIdService;
|
|
5278
5620
|
this.router = router;
|
|
5621
|
+
this.sidebarService = sidebarService;
|
|
5279
5622
|
this.click = new EventEmitter();
|
|
5280
5623
|
this._id = '';
|
|
5281
5624
|
}
|
|
@@ -5288,8 +5631,11 @@ class SidebarItemComponent {
|
|
|
5288
5631
|
onItemClick(event) {
|
|
5289
5632
|
event.stopPropagation();
|
|
5290
5633
|
this.click.emit(event);
|
|
5634
|
+
if (!this.title && (!this.children || this.children.length === 0)) {
|
|
5635
|
+
this.sidebarService.notifyItemClicked();
|
|
5636
|
+
}
|
|
5291
5637
|
}
|
|
5292
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarItemComponent, deps: [{ token: i0.ViewContainerRef }, { token: UniqueIdService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5638
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarItemComponent, deps: [{ token: i0.ViewContainerRef }, { token: UniqueIdService }, { token: i2.Router }, { token: SidebarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5293
5639
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: SidebarItemComponent, isStandalone: false, selector: "rlb-sidebar-item", inputs: { title: "title", icon: "icon", label: "label", link: "link", badgeCounter: "badgeCounter" }, outputs: { click: "click" }, queries: [{ propertyName: "children", predicate: SidebarItemComponent }], viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }, { propertyName: "collapseComponent", first: true, predicate: CollapseComponent, descendants: true }], ngImport: i0, template: `
|
|
5294
5640
|
<ng-template #template>
|
|
5295
5641
|
<li *ngIf="title" (click)="onItemClick($event)" class="menu-title">{{ title }}</li>
|
|
@@ -5361,7 +5707,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5361
5707
|
`,
|
|
5362
5708
|
standalone: false
|
|
5363
5709
|
}]
|
|
5364
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: UniqueIdService }, { type: i2.Router }], propDecorators: { title: [{
|
|
5710
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: UniqueIdService }, { type: i2.Router }, { type: SidebarService }], propDecorators: { title: [{
|
|
5365
5711
|
type: Input
|
|
5366
5712
|
}], icon: [{
|
|
5367
5713
|
type: Input
|
|
@@ -5467,15 +5813,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5467
5813
|
* Sidebar component
|
|
5468
5814
|
*/
|
|
5469
5815
|
class SidebarComponent {
|
|
5470
|
-
|
|
5471
|
-
this.
|
|
5472
|
-
|
|
5473
|
-
constructor() {
|
|
5816
|
+
constructor(sidebarService, breakpointService) {
|
|
5817
|
+
this.sidebarService = sidebarService;
|
|
5818
|
+
this.breakpointService = breakpointService;
|
|
5474
5819
|
this.isCollapsed = false;
|
|
5820
|
+
this.subscription = new Subscription();
|
|
5475
5821
|
this.rounded = false;
|
|
5476
5822
|
}
|
|
5477
5823
|
ngOnInit() {
|
|
5478
|
-
this.
|
|
5824
|
+
this.subscription.add(this.breakpointService.isMobile$.subscribe((isMobile) => {
|
|
5825
|
+
this.setCollapsed(isMobile);
|
|
5826
|
+
}));
|
|
5827
|
+
this.subscription.add(this.sidebarService.itemClicked$.subscribe(() => {
|
|
5828
|
+
if (this.breakpointService.isMobile) {
|
|
5829
|
+
this.setCollapsed(true);
|
|
5830
|
+
}
|
|
5831
|
+
}));
|
|
5832
|
+
}
|
|
5833
|
+
ngOnDestroy() {
|
|
5834
|
+
this.subscription.unsubscribe();
|
|
5479
5835
|
}
|
|
5480
5836
|
toggleSidebar() {
|
|
5481
5837
|
this.setCollapsed(!this.isCollapsed);
|
|
@@ -5487,12 +5843,8 @@ class SidebarComponent {
|
|
|
5487
5843
|
content?.classList.toggle('expanded', collapsed);
|
|
5488
5844
|
sidebar?.classList.toggle('collapsed', collapsed);
|
|
5489
5845
|
}
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
this.setCollapsed(shouldCollapse);
|
|
5493
|
-
}
|
|
5494
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5495
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: SidebarComponent, isStandalone: false, selector: "rlb-sidebar", inputs: { rounded: "rounded" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true }], ngImport: i0, template: `
|
|
5846
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidebarComponent, deps: [{ token: SidebarService }, { token: BreakpointService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5847
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: SidebarComponent, isStandalone: false, selector: "rlb-sidebar", inputs: { rounded: "rounded" }, viewQueries: [{ propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true }], ngImport: i0, template: `
|
|
5496
5848
|
<div class="vertical-menu" [class.rounded-2]="rounded">
|
|
5497
5849
|
<div id="sidebar-menu" class="w-100 h-100 overflow-y-auto">
|
|
5498
5850
|
<ul class="metismenu list-unstyled" id="side-menu" #sideMenu>
|
|
@@ -5535,15 +5887,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5535
5887
|
`,
|
|
5536
5888
|
standalone: false
|
|
5537
5889
|
}]
|
|
5538
|
-
}], ctorParameters: () => [], propDecorators: { sideMenu: [{
|
|
5890
|
+
}], ctorParameters: () => [{ type: SidebarService }, { type: BreakpointService }], propDecorators: { sideMenu: [{
|
|
5539
5891
|
type: ViewChild,
|
|
5540
5892
|
args: ['sideMenu']
|
|
5541
5893
|
}], rounded: [{
|
|
5542
5894
|
type: Input,
|
|
5543
5895
|
args: [{ alias: 'rounded', required: false }]
|
|
5544
|
-
}], onResize: [{
|
|
5545
|
-
type: HostListener,
|
|
5546
|
-
args: ['window:resize', ['$event']]
|
|
5547
5896
|
}] } });
|
|
5548
5897
|
|
|
5549
5898
|
class TabContentComponent {
|
|
@@ -6534,6 +6883,7 @@ class DataTableComponent {
|
|
|
6534
6883
|
this.currentPageChange = new EventEmitter();
|
|
6535
6884
|
this.pageSizeChange = new EventEmitter();
|
|
6536
6885
|
this.pagination = new EventEmitter();
|
|
6886
|
+
this.MAX_VISIBLE_PAGES = 7;
|
|
6537
6887
|
}
|
|
6538
6888
|
ngOnInit() {
|
|
6539
6889
|
if (this.currentPage == null) {
|
|
@@ -6550,6 +6900,27 @@ class DataTableComponent {
|
|
|
6550
6900
|
return (this.rows?.toArray()?.some((o) => o.hasActions) ||
|
|
6551
6901
|
this.showActions !== 'row');
|
|
6552
6902
|
}
|
|
6903
|
+
get visiblePages() {
|
|
6904
|
+
const total = this.pages;
|
|
6905
|
+
const current = this.currentPage || 1;
|
|
6906
|
+
const pages = [];
|
|
6907
|
+
if (total <= this.MAX_VISIBLE_PAGES) {
|
|
6908
|
+
for (let i = 1; i <= total; i++)
|
|
6909
|
+
pages.push(i);
|
|
6910
|
+
}
|
|
6911
|
+
else {
|
|
6912
|
+
if (current <= 4) {
|
|
6913
|
+
pages.push(1, 2, 3, 4, 5, '...', total);
|
|
6914
|
+
}
|
|
6915
|
+
else if (current >= total - 3) {
|
|
6916
|
+
pages.push(1, '...', total - 4, total - 3, total - 2, total - 1, total);
|
|
6917
|
+
}
|
|
6918
|
+
else {
|
|
6919
|
+
pages.push(1, '...', current - 1, current, current + 1, '...', total);
|
|
6920
|
+
}
|
|
6921
|
+
}
|
|
6922
|
+
return pages;
|
|
6923
|
+
}
|
|
6553
6924
|
ngAfterViewInit() {
|
|
6554
6925
|
this._renderHeaders();
|
|
6555
6926
|
}
|
|
@@ -6604,7 +6975,7 @@ class DataTableComponent {
|
|
|
6604
6975
|
selectPage(ev, page) {
|
|
6605
6976
|
ev?.preventDefault();
|
|
6606
6977
|
ev?.stopPropagation();
|
|
6607
|
-
if (page === this.currentPage || this.loading)
|
|
6978
|
+
if (typeof page !== 'number' || page === this.currentPage || this.loading)
|
|
6608
6979
|
return;
|
|
6609
6980
|
this.currentPageChange.emit(page);
|
|
6610
6981
|
this.pagination.emit({ page, size: this.pageSize ? parseInt(this.pageSize) : 20 });
|
|
@@ -6632,17 +7003,17 @@ class DataTableComponent {
|
|
|
6632
7003
|
});
|
|
6633
7004
|
}
|
|
6634
7005
|
onPgWeel(ev) {
|
|
6635
|
-
ev.preventDefault();
|
|
6636
|
-
const t = ev.target;
|
|
6637
|
-
const c = t.parentElement?.parentElement
|
|
6638
|
-
c?.scrollBy({ left: ev.deltaY < 0 ? -15 : 15 });
|
|
7006
|
+
// ev.preventDefault();
|
|
7007
|
+
// const t = ev.target as HTMLElement;
|
|
7008
|
+
// const c = t.parentElement?.parentElement
|
|
7009
|
+
// c?.scrollBy({ left: ev.deltaY < 0 ? -15 : 15 });
|
|
6639
7010
|
}
|
|
6640
7011
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6641
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.16", type: DataTableComponent, isStandalone: false, selector: "rlb-dt-table", inputs: { title: "title", creationStrategy: ["creation-strategy", "creationStrategy"], creationUrl: ["creation-url", "creationUrl"], items: "items", paginationMode: ["pagination-mode", "paginationMode"], loading: ["loading", "loading", booleanAttribute], tableHover: ["table-hover", "tableHover", booleanAttribute], tableStriped: ["table-striped", "tableStriped", booleanAttribute], tableStripedColumns: ["table-striped-columns", "tableStripedColumns", booleanAttribute], tableBordered: ["table-bordered", "tableBordered", booleanAttribute], tableBorderless: ["table-borderless", "tableBorderless", booleanAttribute], tableSmall: ["table-small", "tableSmall", booleanAttribute], showRefresh: ["show-refresh", "showRefresh", booleanAttribute], totalItems: ["total-items", "totalItems", numberAttribute], currentPage: ["current-page", "currentPage", numberAttribute], pageSize: ["page-size", "pageSize", numberAttribute], showActions: "showActions", loadMoreLabel: "loadMoreLabel" }, outputs: { createItem: "create-item", refreshItem: "refresh-item", loadMore: "load-more", currentPageChange: "current-pageChange", pageSizeChange: "page-sizeChange", pagination: "pagination" }, queries: [{ propertyName: "rows", predicate: DataTableRowComponent }, { propertyName: "columns", predicate: DataTableHeaderComponent }], viewQueries: [{ propertyName: "_projectedDisplayColumns", first: true, predicate: ["projectedDisplayColumns"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"row\" *ngIf=\"creationStrategy !== 'none' || title || showRefresh\">\n <div class=\"col\">\n <h3 *ngIf=\"title\" class=\"float-start\">{{ title }}</h3>\n <ng-container *ngIf=\"showRefresh\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"refreshItem.emit()\"\n [disabled]=\"loading\">\n <i class=\"fa-solid fa-arrows-rotate\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'page'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" [routerLink]=\"creationUrl\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'modal'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"createItem.emit()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n </div>\n</div>\n<div class=\"table-responsive\">\n <table [ngClass]=\"getTableClasses()\">\n\t\t<thead>\n\t\t<tr>\n\t\t\t<ng-container #projectedDisplayColumns></ng-container>\n\t\t\t<th *ngIf=\"hasActions\">\n <span class=\"float-end pe-2\">\n Actions\n </span>\n\t\t\t</th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t<ng-content *ngIf=\"!loading\" select=\"rlb-dt-row\"/>\n\t\t<rlb-dt-row *ngIf=\"!loading && items?.length === 0\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-noitems\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t<rlb-dt-row *ngIf=\"loading\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-loading\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t</tbody>\n\t\t<tfoot *ngIf=\"pagination && paginationMode !== 'none'\">\n\t\t<rlb-dt-row>\n\t\t\t<rlb-dt-cell [col-span]=\"hasActions ? cols+1: cols\" style=\"border: 0\">\n\t\t\t\t<button *ngIf=\"paginationMode === 'load-more'\" type=\"button\" class=\"btn btn-primary float-end btn-sm mt-2\"\n\t\t\t\t\t\t\t\t[disabled]=\"loading\" (click)=\"loadMore.emit()\">\n\t\t\t\t\t{{ loadMoreLabel }}\n\t\t\t\t</button>\n\t\t\t\t<ng-container *ngIf=\"paginationMode === 'pages'\">\n\t\t\t\t\t<nav aria-label=\"Page navigation example\">\n
|
|
7012
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.16", type: DataTableComponent, isStandalone: false, selector: "rlb-dt-table", inputs: { title: "title", creationStrategy: ["creation-strategy", "creationStrategy"], creationUrl: ["creation-url", "creationUrl"], items: "items", paginationMode: ["pagination-mode", "paginationMode"], loading: ["loading", "loading", booleanAttribute], tableHover: ["table-hover", "tableHover", booleanAttribute], tableStriped: ["table-striped", "tableStriped", booleanAttribute], tableStripedColumns: ["table-striped-columns", "tableStripedColumns", booleanAttribute], tableBordered: ["table-bordered", "tableBordered", booleanAttribute], tableBorderless: ["table-borderless", "tableBorderless", booleanAttribute], tableSmall: ["table-small", "tableSmall", booleanAttribute], showRefresh: ["show-refresh", "showRefresh", booleanAttribute], totalItems: ["total-items", "totalItems", numberAttribute], currentPage: ["current-page", "currentPage", numberAttribute], pageSize: ["page-size", "pageSize", numberAttribute], showActions: "showActions", loadMoreLabel: "loadMoreLabel" }, outputs: { createItem: "create-item", refreshItem: "refresh-item", loadMore: "load-more", currentPageChange: "current-pageChange", pageSizeChange: "page-sizeChange", pagination: "pagination" }, queries: [{ propertyName: "rows", predicate: DataTableRowComponent }, { propertyName: "columns", predicate: DataTableHeaderComponent }], viewQueries: [{ propertyName: "_projectedDisplayColumns", first: true, predicate: ["projectedDisplayColumns"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"row\" *ngIf=\"creationStrategy !== 'none' || title || showRefresh\">\n <div class=\"col\">\n <h3 *ngIf=\"title\" class=\"float-start\">{{ title }}</h3>\n <ng-container *ngIf=\"showRefresh\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"refreshItem.emit()\"\n [disabled]=\"loading\">\n <i class=\"fa-solid fa-arrows-rotate\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'page'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" [routerLink]=\"creationUrl\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'modal'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"createItem.emit()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n </div>\n</div>\n<div class=\"table-responsive\">\n <table [ngClass]=\"getTableClasses()\">\n\t\t<thead>\n\t\t<tr>\n\t\t\t<ng-container #projectedDisplayColumns></ng-container>\n\t\t\t<th *ngIf=\"hasActions\">\n <span class=\"float-end pe-2\">\n Actions\n </span>\n\t\t\t</th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t<ng-content *ngIf=\"!loading\" select=\"rlb-dt-row\"/>\n\t\t<rlb-dt-row *ngIf=\"!loading && items?.length === 0\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-noitems\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t<rlb-dt-row *ngIf=\"loading\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-loading\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t</tbody>\n\t\t<tfoot *ngIf=\"pagination && paginationMode !== 'none'\">\n\t\t<rlb-dt-row>\n\t\t\t<rlb-dt-cell [col-span]=\"hasActions ? cols+1: cols\" style=\"border: 0\">\n\t\t\t\t<button *ngIf=\"paginationMode === 'load-more'\" type=\"button\" class=\"btn btn-primary float-end btn-sm mt-2\"\n\t\t\t\t\t\t\t\t[disabled]=\"loading\" (click)=\"loadMore.emit()\">\n\t\t\t\t\t{{ loadMoreLabel }}\n\t\t\t\t</button>\n\t\t\t\t<ng-container *ngIf=\"paginationMode === 'pages'\">\n\t\t\t\t\t<nav aria-label=\"Page navigation example\">\n <ul class=\"pagination float-end pagination-sm\">\n <li class=\"page-item\">\n <a class=\"page-link d-block\" [class.disabled]=\"currentPage === 1\" href=\"#\" aria-label=\"Previous\"\n (click)=\"prev($event)\">\n <span aria-hidden=\"true\">«</span>\n </a>\n </li>\n\n <ng-container *ngFor=\"let page of visiblePages\">\n <li class=\"page-item\"\n [class.active]=\"currentPage === page\"\n [class.disabled]=\"page === '...'\">\n <a class=\"page-link d-block\"\n href=\"#\"\n (click)=\"selectPage($event, page)\">\n {{ page }}\n </a>\n </li>\n </ng-container>\n\n <li class=\"page-item\">\n <a class=\"page-link d-block\" [class.disabled]=\"currentPage === pages\" href=\"#\" aria-label=\"Next\"\n (click)=\"next($event)\">\n <span aria-hidden=\"true\">»</span>\n </a>\n </li>\n </ul>\n\t\t\t\t\t\t<ul class=\"ps-0 float-end me-3\">\n\t\t\t\t\t\t\t<rlb-select size=\"small\" [(ngModel)]=\"pageSize\" (ngModelChange)=\"selectSize()\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"items.length === 0\">\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"10\">10</rlb-option>\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"20\">20</rlb-option>\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"50\">50</rlb-option>\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"100\">100</rlb-option>\n\t\t\t\t\t\t\t</rlb-select>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t</ng-container>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t</tfoot>\n\t</table>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: DataTableCellComponent, selector: "rlb-dt-cell", inputs: ["col-span", "class", "style"] }, { kind: "component", type: DataTableRowComponent, selector: "rlb-dt-row", inputs: ["class", "style"], outputs: ["rowClick"] }, { kind: "component", type: SelectComponent, selector: "rlb-select", inputs: ["placeholder", "size", "disabled", "readonly", "multiple", "display", "id", "enable-validation"] }, { kind: "component", type: OptionComponent, selector: "rlb-option", inputs: ["disabled", "value", "class"] }] }); }
|
|
6642
7013
|
}
|
|
6643
7014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
6644
7015
|
type: Component,
|
|
6645
|
-
args: [{ selector: 'rlb-dt-table', standalone: false, template: "<div class=\"row\" *ngIf=\"creationStrategy !== 'none' || title || showRefresh\">\n <div class=\"col\">\n <h3 *ngIf=\"title\" class=\"float-start\">{{ title }}</h3>\n <ng-container *ngIf=\"showRefresh\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"refreshItem.emit()\"\n [disabled]=\"loading\">\n <i class=\"fa-solid fa-arrows-rotate\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'page'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" [routerLink]=\"creationUrl\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'modal'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"createItem.emit()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n </div>\n</div>\n<div class=\"table-responsive\">\n <table [ngClass]=\"getTableClasses()\">\n\t\t<thead>\n\t\t<tr>\n\t\t\t<ng-container #projectedDisplayColumns></ng-container>\n\t\t\t<th *ngIf=\"hasActions\">\n <span class=\"float-end pe-2\">\n Actions\n </span>\n\t\t\t</th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t<ng-content *ngIf=\"!loading\" select=\"rlb-dt-row\"/>\n\t\t<rlb-dt-row *ngIf=\"!loading && items?.length === 0\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-noitems\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t<rlb-dt-row *ngIf=\"loading\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-loading\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t</tbody>\n\t\t<tfoot *ngIf=\"pagination && paginationMode !== 'none'\">\n\t\t<rlb-dt-row>\n\t\t\t<rlb-dt-cell [col-span]=\"hasActions ? cols+1: cols\" style=\"border: 0\">\n\t\t\t\t<button *ngIf=\"paginationMode === 'load-more'\" type=\"button\" class=\"btn btn-primary float-end btn-sm mt-2\"\n\t\t\t\t\t\t\t\t[disabled]=\"loading\" (click)=\"loadMore.emit()\">\n\t\t\t\t\t{{ loadMoreLabel }}\n\t\t\t\t</button>\n\t\t\t\t<ng-container *ngIf=\"paginationMode === 'pages'\">\n\t\t\t\t\t<nav aria-label=\"Page navigation example\">\n
|
|
7016
|
+
args: [{ selector: 'rlb-dt-table', standalone: false, template: "<div class=\"row\" *ngIf=\"creationStrategy !== 'none' || title || showRefresh\">\n <div class=\"col\">\n <h3 *ngIf=\"title\" class=\"float-start\">{{ title }}</h3>\n <ng-container *ngIf=\"showRefresh\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"refreshItem.emit()\"\n [disabled]=\"loading\">\n <i class=\"fa-solid fa-arrows-rotate\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'page'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" [routerLink]=\"creationUrl\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n <ng-container *ngIf=\"creationStrategy === 'modal'\">\n <button type=\"button\" class=\"btn btn-outline-primary float-end mb-2 me-3\" (click)=\"createItem.emit()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n </ng-container>\n </div>\n</div>\n<div class=\"table-responsive\">\n <table [ngClass]=\"getTableClasses()\">\n\t\t<thead>\n\t\t<tr>\n\t\t\t<ng-container #projectedDisplayColumns></ng-container>\n\t\t\t<th *ngIf=\"hasActions\">\n <span class=\"float-end pe-2\">\n Actions\n </span>\n\t\t\t</th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t<ng-content *ngIf=\"!loading\" select=\"rlb-dt-row\"/>\n\t\t<rlb-dt-row *ngIf=\"!loading && items?.length === 0\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-noitems\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t<rlb-dt-row *ngIf=\"loading\" class=\"text-center\">\n\t\t\t<rlb-dt-cell [col-span]=\"cols\" style=\"border: 0\">\n\t\t\t\t<ng-content select=\"rlb-dt-loading\"/>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t</tbody>\n\t\t<tfoot *ngIf=\"pagination && paginationMode !== 'none'\">\n\t\t<rlb-dt-row>\n\t\t\t<rlb-dt-cell [col-span]=\"hasActions ? cols+1: cols\" style=\"border: 0\">\n\t\t\t\t<button *ngIf=\"paginationMode === 'load-more'\" type=\"button\" class=\"btn btn-primary float-end btn-sm mt-2\"\n\t\t\t\t\t\t\t\t[disabled]=\"loading\" (click)=\"loadMore.emit()\">\n\t\t\t\t\t{{ loadMoreLabel }}\n\t\t\t\t</button>\n\t\t\t\t<ng-container *ngIf=\"paginationMode === 'pages'\">\n\t\t\t\t\t<nav aria-label=\"Page navigation example\">\n <ul class=\"pagination float-end pagination-sm\">\n <li class=\"page-item\">\n <a class=\"page-link d-block\" [class.disabled]=\"currentPage === 1\" href=\"#\" aria-label=\"Previous\"\n (click)=\"prev($event)\">\n <span aria-hidden=\"true\">«</span>\n </a>\n </li>\n\n <ng-container *ngFor=\"let page of visiblePages\">\n <li class=\"page-item\"\n [class.active]=\"currentPage === page\"\n [class.disabled]=\"page === '...'\">\n <a class=\"page-link d-block\"\n href=\"#\"\n (click)=\"selectPage($event, page)\">\n {{ page }}\n </a>\n </li>\n </ng-container>\n\n <li class=\"page-item\">\n <a class=\"page-link d-block\" [class.disabled]=\"currentPage === pages\" href=\"#\" aria-label=\"Next\"\n (click)=\"next($event)\">\n <span aria-hidden=\"true\">»</span>\n </a>\n </li>\n </ul>\n\t\t\t\t\t\t<ul class=\"ps-0 float-end me-3\">\n\t\t\t\t\t\t\t<rlb-select size=\"small\" [(ngModel)]=\"pageSize\" (ngModelChange)=\"selectSize()\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"items.length === 0\">\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"10\">10</rlb-option>\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"20\">20</rlb-option>\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"50\">50</rlb-option>\n\t\t\t\t\t\t\t\t<rlb-option [value]=\"100\">100</rlb-option>\n\t\t\t\t\t\t\t</rlb-select>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t</ng-container>\n\t\t\t</rlb-dt-cell>\n\t\t</rlb-dt-row>\n\t\t</tfoot>\n\t</table>\n</div>\n" }]
|
|
6646
7017
|
}], propDecorators: { title: [{
|
|
6647
7018
|
type: Input,
|
|
6648
7019
|
args: [{ alias: 'title' }]
|
|
@@ -10673,7 +11044,7 @@ const COMPONENT_BUILDER = [ComponentHostDirective];
|
|
|
10673
11044
|
|
|
10674
11045
|
class RlbBootstrapModule {
|
|
10675
11046
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RlbBootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10676
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: RlbBootstrapModule, declarations: [DataTableActionComponent, DataTableActionsComponent, DataTableCellComponent, DataTableHeaderComponent, DataTableRowComponent, DataTableComponent, DataTableLoadingComponent, DataTableNoItemsComponent, AutocompleteComponent, CheckboxComponent, InputComponent, SwitchComponent, TextAreaComponent, ColorComponent, DatalistComponent, RangeComponent, SelectComponent, RadioComponent, OptionComponent, FileComponent, InputGroupComponent, HelpText, DndDirective, FileDndComponent, InputValidationComponent, AutocompleteCountryComponent, AutocompleteTimezonesComponent, AutocompleteCountryDialCodeComponent, AlertComponent, BreadcrumbComponent, AccordionComponent, AccordionItemComponent, AccordionHeaderComponent, AccordionBodyComponent, ButtonComponent, ButtonCloseComponent, ButtonGroupComponent, ButtonToolbarComponent, RlbFabComponent, BadgeDirective, BadgeComponent, CardBodyComponent, CardFooterComponent, CardGroupComponent, CardHeaderComponent, CardImageComponent, CardLinkComponent, CardSubtitleComponent, CardTextComponent, CardTitleComponent, CardComponent, SpinnerComponent, ProgressComponent, TooltipDirective, PopoverDirective, PlaceholderDirective, CollapseComponent, DropdownComponent, DropdownContainerComponent, DropdownMenuItemComponent, DropdownDirective, NavbarBrandDirective, NavbarComponent, NavbarFormComponent, NavbarTextComponent, NavbarItemsComponent, NavbarDropdownItemComponent, NavbarItemComponent, NavbarSeparatorComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasTitleComponent, OffcanvasBodyComponent, ToggleDirective, SidebarComponent, SidebarItemComponent, NavComponent, NavItemComponent, TabsComponent, TabComponent, TabContentComponent, TabPaneComponent, PaginationItemComponent, PaginationComponent, ScrollspyDirective, CarouselComponent, CarouselCaptionComponent, CarouselSlideComponent, ListComponent, ListItemComponent, ListItemImageComponent, AvatarComponent, ChatContainerComponent, ChatItemComponent, RlbPlaceholderComponent, RlbPlaceholderLineComponent, RlbPlaceholderTextComponent, ModalContainerComponent, ToastContainerComponent, CalendarComponent, CalendarHeaderComponent, CalendarGrid, CalendarWeekGridComponent, CalendarMonthGridComponent, CalendarEventComponent, ComponentHostDirective, DateTzPipe, MonthFormatterPipe, DayOfWeekPipe, FormFieldsComponent], imports: [CommonModule,
|
|
11047
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: RlbBootstrapModule, declarations: [DataTableActionComponent, DataTableActionsComponent, DataTableCellComponent, DataTableHeaderComponent, DataTableRowComponent, DataTableComponent, DataTableLoadingComponent, DataTableNoItemsComponent, AutocompleteComponent, CheckboxComponent, InputComponent, SwitchComponent, TextAreaComponent, ColorComponent, DatalistComponent, RangeComponent, SelectComponent, RadioComponent, OptionComponent, FileComponent, InputGroupComponent, HelpText, DndDirective, FileDndComponent, InputValidationComponent, AutocompleteCountryComponent, AutocompleteTimezonesComponent, AutocompleteCountryDialCodeComponent, AlertComponent, BreadcrumbComponent, AccordionComponent, AccordionItemComponent, AccordionHeaderComponent, AccordionBodyComponent, ButtonComponent, ButtonCloseComponent, ButtonGroupComponent, ButtonToolbarComponent, RlbFabComponent, BadgeDirective, BadgeComponent, CardBodyComponent, CardFooterComponent, CardGroupComponent, CardHeaderComponent, CardImageComponent, CardLinkComponent, CardSubtitleComponent, CardTextComponent, CardTitleComponent, CardComponent, SpinnerComponent, ProgressComponent, TooltipDirective, PopoverDirective, PlaceholderDirective, CollapseComponent, DropdownComponent, DropdownContainerComponent, DropdownMenuItemComponent, DropdownDirective, NavbarBrandDirective, NavbarComponent, NavbarFormComponent, NavbarTextComponent, NavbarItemsComponent, NavbarDropdownItemComponent, NavbarItemComponent, NavbarSeparatorComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasTitleComponent, OffcanvasBodyComponent, ToggleDirective, SidebarComponent, SidebarItemComponent, NavComponent, NavItemComponent, TabsComponent, TabComponent, TabContentComponent, TabPaneComponent, PaginationItemComponent, PaginationComponent, ScrollspyDirective, CarouselComponent, CarouselCaptionComponent, CarouselSlideComponent, ListComponent, ListItemComponent, ListItemImageComponent, AvatarComponent, ChatContainerComponent, ChatItemComponent, RlbPlaceholderComponent, RlbPlaceholderLineComponent, RlbPlaceholderTextComponent, ModalContainerComponent, ToastContainerComponent, CalendarComponent, CalendarHeaderComponent, CalendarGrid, CalendarWeekGridComponent, CalendarDayGridComponent, CalendarMonthGridComponent, CalendarEventComponent, ComponentHostDirective, DateTzPipe, MonthFormatterPipe, DayOfWeekPipe, FormFieldsComponent], imports: [CommonModule,
|
|
10677
11048
|
FormsModule,
|
|
10678
11049
|
ReactiveFormsModule,
|
|
10679
11050
|
TranslateModule,
|
|
@@ -10682,7 +11053,7 @@ class RlbBootstrapModule {
|
|
|
10682
11053
|
CdkDropListGroup,
|
|
10683
11054
|
CdkDropList,
|
|
10684
11055
|
CdkDragPlaceholder,
|
|
10685
|
-
CdkDragPreview], exports: [DataTableActionComponent, DataTableActionsComponent, DataTableCellComponent, DataTableHeaderComponent, DataTableRowComponent, DataTableComponent, DataTableLoadingComponent, DataTableNoItemsComponent, AutocompleteComponent, CheckboxComponent, InputComponent, SwitchComponent, TextAreaComponent, ColorComponent, DatalistComponent, RangeComponent, SelectComponent, RadioComponent, OptionComponent, FileComponent, InputGroupComponent, HelpText, DndDirective, FileDndComponent, InputValidationComponent, AutocompleteCountryComponent, AutocompleteTimezonesComponent, AutocompleteCountryDialCodeComponent, AlertComponent, BreadcrumbComponent, AccordionComponent, AccordionItemComponent, AccordionHeaderComponent, AccordionBodyComponent, ButtonComponent, ButtonCloseComponent, ButtonGroupComponent, ButtonToolbarComponent, RlbFabComponent, BadgeDirective, BadgeComponent, CardBodyComponent, CardFooterComponent, CardGroupComponent, CardHeaderComponent, CardImageComponent, CardLinkComponent, CardSubtitleComponent, CardTextComponent, CardTitleComponent, CardComponent, SpinnerComponent, ProgressComponent, TooltipDirective, PopoverDirective, PlaceholderDirective, CollapseComponent, DropdownComponent, DropdownContainerComponent, DropdownMenuItemComponent, DropdownDirective, NavbarBrandDirective, NavbarComponent, NavbarFormComponent, NavbarTextComponent, NavbarItemsComponent, NavbarDropdownItemComponent, NavbarItemComponent, NavbarSeparatorComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasTitleComponent, OffcanvasBodyComponent, ToggleDirective, SidebarComponent, SidebarItemComponent, NavComponent, NavItemComponent, TabsComponent, TabComponent, TabContentComponent, TabPaneComponent, PaginationItemComponent, PaginationComponent, ScrollspyDirective, CarouselComponent, CarouselCaptionComponent, CarouselSlideComponent, ListComponent, ListItemComponent, ListItemImageComponent, AvatarComponent, ChatContainerComponent, ChatItemComponent, RlbPlaceholderComponent, RlbPlaceholderLineComponent, RlbPlaceholderTextComponent, ModalContainerComponent, ToastContainerComponent, CalendarComponent, CalendarHeaderComponent, CalendarGrid, CalendarWeekGridComponent, CalendarMonthGridComponent, CalendarEventComponent, DateTzPipe, MonthFormatterPipe, DayOfWeekPipe, FormFieldsComponent] }); }
|
|
11056
|
+
CdkDragPreview], exports: [DataTableActionComponent, DataTableActionsComponent, DataTableCellComponent, DataTableHeaderComponent, DataTableRowComponent, DataTableComponent, DataTableLoadingComponent, DataTableNoItemsComponent, AutocompleteComponent, CheckboxComponent, InputComponent, SwitchComponent, TextAreaComponent, ColorComponent, DatalistComponent, RangeComponent, SelectComponent, RadioComponent, OptionComponent, FileComponent, InputGroupComponent, HelpText, DndDirective, FileDndComponent, InputValidationComponent, AutocompleteCountryComponent, AutocompleteTimezonesComponent, AutocompleteCountryDialCodeComponent, AlertComponent, BreadcrumbComponent, AccordionComponent, AccordionItemComponent, AccordionHeaderComponent, AccordionBodyComponent, ButtonComponent, ButtonCloseComponent, ButtonGroupComponent, ButtonToolbarComponent, RlbFabComponent, BadgeDirective, BadgeComponent, CardBodyComponent, CardFooterComponent, CardGroupComponent, CardHeaderComponent, CardImageComponent, CardLinkComponent, CardSubtitleComponent, CardTextComponent, CardTitleComponent, CardComponent, SpinnerComponent, ProgressComponent, TooltipDirective, PopoverDirective, PlaceholderDirective, CollapseComponent, DropdownComponent, DropdownContainerComponent, DropdownMenuItemComponent, DropdownDirective, NavbarBrandDirective, NavbarComponent, NavbarFormComponent, NavbarTextComponent, NavbarItemsComponent, NavbarDropdownItemComponent, NavbarItemComponent, NavbarSeparatorComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasTitleComponent, OffcanvasBodyComponent, ToggleDirective, SidebarComponent, SidebarItemComponent, NavComponent, NavItemComponent, TabsComponent, TabComponent, TabContentComponent, TabPaneComponent, PaginationItemComponent, PaginationComponent, ScrollspyDirective, CarouselComponent, CarouselCaptionComponent, CarouselSlideComponent, ListComponent, ListItemComponent, ListItemImageComponent, AvatarComponent, ChatContainerComponent, ChatItemComponent, RlbPlaceholderComponent, RlbPlaceholderLineComponent, RlbPlaceholderTextComponent, ModalContainerComponent, ToastContainerComponent, CalendarComponent, CalendarHeaderComponent, CalendarGrid, CalendarWeekGridComponent, CalendarDayGridComponent, CalendarMonthGridComponent, CalendarEventComponent, DateTzPipe, MonthFormatterPipe, DayOfWeekPipe, FormFieldsComponent] }); }
|
|
10686
11057
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RlbBootstrapModule, imports: [CommonModule,
|
|
10687
11058
|
FormsModule,
|
|
10688
11059
|
ReactiveFormsModule,
|
|
@@ -11268,5 +11639,5 @@ function provideRlbBootstrap() {
|
|
|
11268
11639
|
* Generated bundle index. Do not edit.
|
|
11269
11640
|
*/
|
|
11270
11641
|
|
|
11271
|
-
export { AbstractAutocompleteComponent, AbstractComponent, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AccordionItemComponent, AlertComponent, AutocompleteComponent, AutocompleteCountryComponent, AutocompleteCountryDialCodeComponent, AutocompleteTimezonesComponent, AvatarComponent, BadgeComponent, BadgeDirective, BreadcrumbComponent, ButtonCloseComponent, ButtonComponent, ButtonGroupComponent, ButtonToolbarComponent, CALENDAR_COMPONENTS, COMPONENTS, CalendarComponent, CalendarEventComponent, CalendarGrid, CalendarHeaderComponent, CalendarMonthGridComponent, CalendarOverflowEventsContainerComponent, CalendarToastComponent, CalendarWeekGridComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderComponent, CardImageComponent, CardLinkComponent, CardSubtitleComponent, CardTextComponent, CardTitleComponent, CarouselCaptionComponent, CarouselComponent, CarouselSlideComponent, ChatContainerComponent, ChatItemComponent, CheckboxComponent, CollapseComponent, ColorComponent, CommonModalComponent, DataTableActionComponent, DataTableActionsComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderComponent, DataTableLoadingComponent, DataTableNoItemsComponent, DataTableRowComponent, DatalistComponent, DateTzPipe, DayOfWeekPipe, DndDirective, DropdownComponent, DropdownContainerComponent, DropdownDirective, DropdownMenuItemComponent, EventCreateEditComponent, FileComponent, FileDndComponent, FormFieldsComponent, HelpText, INPUTS, InputComponent, InputGroupComponent, InputValidationComponent, ListComponent, ListItemComponent, ListItemImageComponent, MODALS, ModalContainerComponent, ModalDirective, ModalRegistryOptions, ModalService, MonthFormatterPipe, NavComponent, NavItemComponent, NavbarBrandDirective, NavbarComponent, NavbarDropdownItemComponent, NavbarFormComponent, NavbarItemComponent, NavbarItemsComponent, NavbarSeparatorComponent, NavbarTextComponent, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasTitleComponent, OptionComponent, PIPES, PaginationComponent, PaginationItemComponent, PlaceholderDirective, PopoverDirective, ProgressComponent, RLB_TRANSLATION_SERVICE, RadioComponent, RangeComponent, RlbBootstrapModule, RlbFabComponent, RlbPlaceholderComponent, RlbPlaceholderLineComponent, RlbPlaceholderTextComponent, ScrollspyDirective, SearchModalComponent, SelectComponent, SidebarComponent, SidebarItemComponent, SpinnerComponent, SwitchComponent, TABLE, TOASTS, TabComponent, TabContentComponent, TabPaneComponent, TabsComponent, TextAreaComponent, ToastContainerComponent, ToastDirective, ToastRegistryOptions, ToastService, ToggleDirective, TooltipDirective, UniqueIdService, createArrayProxy, provideRlbBootstrap, requiredAutocompleteValue };
|
|
11642
|
+
export { AbstractAutocompleteComponent, AbstractComponent, AccordionBodyComponent, AccordionComponent, AccordionHeaderComponent, AccordionItemComponent, AlertComponent, AutocompleteComponent, AutocompleteCountryComponent, AutocompleteCountryDialCodeComponent, AutocompleteTimezonesComponent, AvatarComponent, BadgeComponent, BadgeDirective, BreadcrumbComponent, ButtonCloseComponent, ButtonComponent, ButtonGroupComponent, ButtonToolbarComponent, CALENDAR_COMPONENTS, COMPONENTS, CalendarComponent, CalendarDayGridComponent, CalendarEventComponent, CalendarGrid, CalendarHeaderComponent, CalendarMonthGridComponent, CalendarOverflowEventsContainerComponent, CalendarToastComponent, CalendarWeekGridComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderComponent, CardImageComponent, CardLinkComponent, CardSubtitleComponent, CardTextComponent, CardTitleComponent, CarouselCaptionComponent, CarouselComponent, CarouselSlideComponent, ChatContainerComponent, ChatItemComponent, CheckboxComponent, CollapseComponent, ColorComponent, CommonModalComponent, DataTableActionComponent, DataTableActionsComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderComponent, DataTableLoadingComponent, DataTableNoItemsComponent, DataTableRowComponent, DatalistComponent, DateTzPipe, DayOfWeekPipe, DndDirective, DropdownComponent, DropdownContainerComponent, DropdownDirective, DropdownMenuItemComponent, EventCreateEditComponent, FileComponent, FileDndComponent, FormFieldsComponent, HelpText, INPUTS, InputComponent, InputGroupComponent, InputValidationComponent, ListComponent, ListItemComponent, ListItemImageComponent, MODALS, ModalContainerComponent, ModalDirective, ModalRegistryOptions, ModalService, MonthFormatterPipe, NavComponent, NavItemComponent, NavbarBrandDirective, NavbarComponent, NavbarDropdownItemComponent, NavbarFormComponent, NavbarItemComponent, NavbarItemsComponent, NavbarSeparatorComponent, NavbarTextComponent, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasTitleComponent, OptionComponent, PIPES, PaginationComponent, PaginationItemComponent, PlaceholderDirective, PopoverDirective, ProgressComponent, RLB_TRANSLATION_SERVICE, RadioComponent, RangeComponent, RlbBootstrapModule, RlbFabComponent, RlbPlaceholderComponent, RlbPlaceholderLineComponent, RlbPlaceholderTextComponent, ScrollspyDirective, SearchModalComponent, SelectComponent, SidebarComponent, SidebarItemComponent, SpinnerComponent, SwitchComponent, TABLE, TOASTS, TabComponent, TabContentComponent, TabPaneComponent, TabsComponent, TextAreaComponent, ToastContainerComponent, ToastDirective, ToastRegistryOptions, ToastService, ToggleDirective, TooltipDirective, UniqueIdService, createArrayProxy, provideRlbBootstrap, requiredAutocompleteValue };
|
|
11272
11643
|
//# sourceMappingURL=open-rlb-ng-bootstrap.mjs.map
|