@bimetal/calendar-angular-components 0.29.0 → 0.32.0
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/dist/components/Calendar.d.ts +31 -6
- package/dist/components/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar.js +104 -42
- package/dist/components/Calendar.js.map +1 -1
- package/dist/components/CalendarHeader.js +11 -11
- package/dist/components/CalendarHeader.js.map +1 -1
- package/dist/components/CategoryFilter.js +4 -4
- package/dist/components/CategoryFilter.js.map +1 -1
- package/dist/components/EventBar.d.ts +23 -10
- package/dist/components/EventBar.d.ts.map +1 -1
- package/dist/components/EventBar.js +73 -44
- package/dist/components/EventBar.js.map +1 -1
- package/dist/components/EventDialog.js +86 -68
- package/dist/components/EventDialog.js.map +1 -1
- package/dist/components/EventHistory.d.ts.map +1 -1
- package/dist/components/EventHistory.js +19 -21
- package/dist/components/EventHistory.js.map +1 -1
- package/dist/components/ResourceFilter.js +4 -4
- package/dist/components/ResourceFilter.js.map +1 -1
- package/dist/components/UndoToast.js +7 -8
- package/dist/components/UndoToast.js.map +1 -1
- package/dist/views/agenda/AgendaView.d.ts +29 -30
- package/dist/views/agenda/AgendaView.d.ts.map +1 -1
- package/dist/views/agenda/AgendaView.js +189 -196
- package/dist/views/agenda/AgendaView.js.map +1 -1
- package/dist/views/day/DayView.d.ts.map +1 -1
- package/dist/views/day/DayView.js +30 -27
- package/dist/views/day/DayView.js.map +1 -1
- package/dist/views/month/MonthView.js +5 -5
- package/dist/views/month/MonthView.js.map +1 -1
- package/dist/views/month/WeekRow.d.ts.map +1 -1
- package/dist/views/month/WeekRow.js +36 -32
- package/dist/views/month/WeekRow.js.map +1 -1
- package/dist/views/resource/ResourceView.d.ts +1 -0
- package/dist/views/resource/ResourceView.d.ts.map +1 -1
- package/dist/views/resource/ResourceView.js +35 -27
- package/dist/views/resource/ResourceView.js.map +1 -1
- package/dist/views/timeline/TimelineView.d.ts +1 -0
- package/dist/views/timeline/TimelineView.d.ts.map +1 -1
- package/dist/views/timeline/TimelineView.js +31 -22
- package/dist/views/timeline/TimelineView.js.map +1 -1
- package/dist/views/week/AllDayRow.d.ts +1 -0
- package/dist/views/week/AllDayRow.d.ts.map +1 -1
- package/dist/views/week/AllDayRow.js +21 -11
- package/dist/views/week/AllDayRow.js.map +1 -1
- package/dist/views/week/TimeEvent.d.ts +13 -6
- package/dist/views/week/TimeEvent.d.ts.map +1 -1
- package/dist/views/week/TimeEvent.js +57 -33
- package/dist/views/week/TimeEvent.js.map +1 -1
- package/dist/views/week/WeekView.d.ts +1 -0
- package/dist/views/week/WeekView.d.ts.map +1 -1
- package/dist/views/week/WeekView.js +33 -26
- package/dist/views/week/WeekView.js.map +1 -1
- package/dist/views/year/YearView.js +12 -12
- package/dist/views/year/YearView.js.map +1 -1
- package/package.json +9 -8
- package/dist/binding/utils/date-strings.d.ts +0 -16
- package/dist/binding/utils/date-strings.d.ts.map +0 -1
- package/dist/binding/utils/date-strings.js +0 -30
- package/dist/binding/utils/date-strings.js.map +0 -1
- package/dist/binding/utils/gridUtils.d.ts +0 -6
- package/dist/binding/utils/gridUtils.d.ts.map +0 -1
- package/dist/binding/utils/gridUtils.js +0 -13
- package/dist/binding/utils/gridUtils.js.map +0 -1
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
2
|
-
import type { CalendarEvent
|
|
3
|
-
import {
|
|
1
|
+
import { EventEmitter, AfterViewInit, OnDestroy, ElementRef, NgZone } from '@angular/core';
|
|
2
|
+
import type { CalendarEvent } from '@bimetal/calendar-core';
|
|
3
|
+
import type { AgendaWindow, AgendaHeaderRow, AgendaEventRow, AgendaRow } from '@bimetal/calendar-headless';
|
|
4
4
|
import type { CalendarConfig } from '../../binding/index.js';
|
|
5
5
|
import { EventRenderService } from '../../binding/index.js';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The agenda view — a WINDOWED flat list (v0.30 Slice 5b). The controller owns the
|
|
9
|
+
* whole derivation: it flattens the day-grouped agenda to uniform-height rows
|
|
10
|
+
* (header | event), formats every time label, computes selection, and windows the
|
|
11
|
+
* heavy build to the visible slice. This binding only renders `agenda.rows` + the
|
|
12
|
+
* px spacers and reports the scroll container's metrics via `setViewport` — no
|
|
13
|
+
* grouping, no formatting, no window math here. `trackBy: trackRow` (by `row.key`)
|
|
14
|
+
* keeps in-flight interactions attached across snapshot churn.
|
|
15
|
+
*/
|
|
16
|
+
export declare class AgendaViewComponent implements AfterViewInit, OnDestroy {
|
|
13
17
|
private renderService?;
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
private zone?;
|
|
19
|
+
agenda: AgendaWindow;
|
|
16
20
|
config: CalendarConfig;
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
/** Reports the scroll container's metrics so the controller windows the rows. */
|
|
22
|
+
setViewport: (scrollTop: number, viewportHeight: number) => void;
|
|
19
23
|
eventClick: EventEmitter<{
|
|
20
24
|
eventId: string;
|
|
21
25
|
rect: DOMRect;
|
|
@@ -25,30 +29,25 @@ export declare class AgendaViewComponent implements OnChanges {
|
|
|
25
29
|
eventId: string;
|
|
26
30
|
instanceDate?: number;
|
|
27
31
|
}>;
|
|
28
|
-
|
|
32
|
+
scrollEl?: ElementRef<HTMLElement>;
|
|
33
|
+
private viewportCleanup;
|
|
29
34
|
click: import("@bimetal/calendar-headless").ClickIntent;
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
constructor(renderService?: EventRenderService | undefined, zone?: NgZone | undefined);
|
|
36
|
+
asHeader(row: AgendaRow): AgendaHeaderRow;
|
|
37
|
+
asEvent(row: AgendaRow): AgendaEventRow;
|
|
38
|
+
trackRow(_i: number, row: AgendaRow): string;
|
|
32
39
|
get badgesTpl(): import("@angular/core").TemplateRef<import("../../index.js").EventRenderTemplateContext> | undefined;
|
|
33
40
|
get contentTpl(): import("@angular/core").TemplateRef<import("../../index.js").EventRenderTemplateContext> | undefined;
|
|
34
41
|
tplCtx(ev: CalendarEvent): import("../../index.js").EventRenderTemplateContext | undefined;
|
|
35
42
|
renderedTitle(ev: CalendarEvent): string;
|
|
36
43
|
slotsClassName(ev: CalendarEvent): string;
|
|
37
44
|
slotsStyle(ev: CalendarEvent): Record<string, string | number> | undefined;
|
|
38
|
-
getDayOfMonth: typeof getDayOfMonth;
|
|
39
|
-
ngOnChanges(): void;
|
|
40
|
-
isToday(date: CalendarDateTime): boolean;
|
|
41
|
-
getWeekday(date: CalendarDateTime): string;
|
|
42
|
-
getMonthYear(date: CalendarDateTime): string;
|
|
43
45
|
getColor(ev: CalendarEvent): string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
handleEventClick(
|
|
47
|
-
handleEventDoubleClick(e: MouseEvent,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AgendaViewComponent, [{ optional: true; }]>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AgendaViewComponent, "cal-agenda-view", never, { "currentDate": { "alias": "currentDate"; "required": false; }; "events": { "alias": "events"; "required": false; }; "config": { "alias": "config"; "required": false; }; "selectedEventId": { "alias": "selectedEventId"; "required": false; }; "selectedInstanceDate": { "alias": "selectedInstanceDate"; "required": false; }; }, { "eventClick": "eventClick"; "selectEvent": "selectEvent"; }, never, never, true, never>;
|
|
46
|
+
ngAfterViewInit(): void;
|
|
47
|
+
ngOnDestroy(): void;
|
|
48
|
+
handleEventClick(_e: MouseEvent, row: AgendaEventRow): void;
|
|
49
|
+
handleEventDoubleClick(e: MouseEvent, row: AgendaEventRow): void;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgendaViewComponent, [{ optional: true; }, { optional: true; }]>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgendaViewComponent, "cal-agenda-view", never, { "agenda": { "alias": "agenda"; "required": false; }; "config": { "alias": "config"; "required": false; }; "setViewport": { "alias": "setViewport"; "required": false; }; }, { "eventClick": "eventClick"; "selectEvent": "selectEvent"; }, never, never, true, never>;
|
|
52
52
|
}
|
|
53
|
-
export {};
|
|
54
53
|
//# sourceMappingURL=AgendaView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgendaView.d.ts","sourceRoot":"","sources":["../../../src/views/agenda/AgendaView.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AgendaView.d.ts","sourceRoot":"","sources":["../../../src/views/agenda/AgendaView.ts"],"names":[],"mappings":"AAAA,OAAO,EACqB,YAAY,EAAE,aAAa,EAAE,SAAS,EAC5B,UAAU,EAAE,MAAM,EACvD,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;;AAE5D;;;;;;;;GAQG;AACH,qBAkDa,mBAAoB,YAAW,aAAa,EAAE,SAAS;IAa1C,OAAO,CAAC,aAAa,CAAC;IAAkC,OAAO,CAAC,IAAI,CAAC;IAZpF,MAAM,EAAG,YAAY,CAAC;IACtB,MAAM,EAAG,cAAc,CAAC;IACjC,iFAAiF;IACxE,WAAW,EAAG,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,UAAU;iBAA+B,MAAM;cAAQ,OAAO;uBAAiB,MAAM;OAAM;IAC3F,WAAW;iBAA+B,MAAM;uBAAiB,MAAM;OAAM;IAEhE,QAAQ,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAC1D,OAAO,CAAC,eAAe,CAA6B;IAEpD,KAAK,mDAAuB;gBAEI,aAAa,CAAC,EAAE,kBAAkB,YAAA,EAAsB,IAAI,CAAC,EAAE,MAAM,YAAA;IAGrG,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe;IACzC,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG,cAAc;IAEvC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM;IAG5C,IAAI,SAAS,yGAAiD;IAC9D,IAAI,UAAU,yGAAkD;IAChE,MAAM,CAAC,EAAE,EAAE,aAAa;IACxB,aAAa,CAAC,EAAE,EAAE,aAAa;IAC/B,cAAc,CAAC,EAAE,EAAE,aAAa;IAIhC,UAAU,CAAC,EAAE,EAAE,aAAa;IAE5B,QAAQ,CAAC,EAAE,EAAE,aAAa,GAAG,MAAM;IAInC,eAAe;IAiBf,WAAW;IAIX,gBAAgB,CAAC,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,cAAc;IAKpD,sBAAsB,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,cAAc;yCA9D9C,mBAAmB;2CAAnB,mBAAmB;CAmE/B"}
|
|
@@ -1,130 +1,171 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter, Optional } from '@angular/core';
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewChild, ElementRef, NgZone, Optional, } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { DEFAULT_AGENDA_RANGE_DAYS, createClickIntent } from '@bimetal/calendar-headless';
|
|
3
|
+
import { createClickIntent } from '@bimetal/calendar-headless';
|
|
4
|
+
import { EventRenderService } from '../../binding/index.js';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
import * as i1 from "../../binding/index.js";
|
|
8
7
|
import * as i2 from "@angular/common";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
i0.ɵɵ
|
|
8
|
+
const _c0 = ["scrollEl"];
|
|
9
|
+
function AgendaViewComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵelementContainerStart(0);
|
|
11
|
+
i0.ɵɵelementStart(1, "div", 5);
|
|
12
|
+
i0.ɵɵtext(2);
|
|
12
13
|
i0.ɵɵelementEnd();
|
|
14
|
+
i0.ɵɵelementContainerEnd();
|
|
13
15
|
} if (rf & 2) {
|
|
14
16
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
15
|
-
i0.ɵɵadvance();
|
|
17
|
+
i0.ɵɵadvance(2);
|
|
16
18
|
i0.ɵɵtextInterpolate(ctx_r0.config.locale.noEvents);
|
|
17
19
|
} }
|
|
18
|
-
function
|
|
20
|
+
function AgendaViewComponent_ng_template_3_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
i0.ɵɵelement(0, "div", 8);
|
|
22
|
+
} if (rf & 2) {
|
|
23
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
24
|
+
i0.ɵɵstyleProp("height", ctx_r0.agenda.offsetTop, "px");
|
|
25
|
+
} }
|
|
26
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "span", 12);
|
|
28
|
+
i0.ɵɵtext(2);
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
30
|
+
i0.ɵɵelementStart(3, "div", 13)(4, "span", 14);
|
|
31
|
+
i0.ɵɵtext(5);
|
|
32
|
+
i0.ɵɵelementEnd();
|
|
33
|
+
i0.ɵɵelementStart(6, "span", 15);
|
|
34
|
+
i0.ɵɵtext(7);
|
|
35
|
+
i0.ɵɵelementEnd()()();
|
|
36
|
+
} if (rf & 2) {
|
|
37
|
+
const row_r2 = i0.ɵɵnextContext().$implicit;
|
|
38
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
39
|
+
i0.ɵɵclassProp("bm-cal-agenda__row--today", ctx_r0.asHeader(row_r2).isToday);
|
|
40
|
+
i0.ɵɵadvance(2);
|
|
41
|
+
i0.ɵɵtextInterpolate(ctx_r0.asHeader(row_r2).dayOfMonth);
|
|
42
|
+
i0.ɵɵadvance(3);
|
|
43
|
+
i0.ɵɵtextInterpolate(ctx_r0.asHeader(row_r2).weekday);
|
|
44
|
+
i0.ɵɵadvance(2);
|
|
45
|
+
i0.ɵɵtextInterpolate(ctx_r0.asHeader(row_r2).dateFull);
|
|
46
|
+
} }
|
|
47
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
19
48
|
i0.ɵɵelementContainer(0);
|
|
20
49
|
} }
|
|
21
|
-
function
|
|
50
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
22
51
|
i0.ɵɵelementContainerStart(0);
|
|
23
|
-
i0.ɵɵtemplate(1,
|
|
52
|
+
i0.ɵɵtemplate(1, AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 18);
|
|
24
53
|
i0.ɵɵelementContainerEnd();
|
|
25
54
|
} if (rf & 2) {
|
|
26
|
-
const
|
|
55
|
+
const row_r2 = i0.ɵɵnextContext(2).$implicit;
|
|
27
56
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
28
57
|
i0.ɵɵadvance();
|
|
29
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.contentTpl)("ngTemplateOutletContext", ctx_r0.tplCtx(
|
|
58
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.contentTpl)("ngTemplateOutletContext", ctx_r0.tplCtx(ctx_r0.asEvent(row_r2).event));
|
|
30
59
|
} }
|
|
31
|
-
function
|
|
32
|
-
i0.ɵɵelement(0, "div",
|
|
33
|
-
i0.ɵɵelementStart(1, "div",
|
|
60
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵelement(0, "div", 19);
|
|
62
|
+
i0.ɵɵelementStart(1, "div", 20)(2, "div", 21);
|
|
34
63
|
i0.ɵɵtext(3);
|
|
35
64
|
i0.ɵɵelementEnd();
|
|
36
|
-
i0.ɵɵelementStart(4, "div",
|
|
65
|
+
i0.ɵɵelementStart(4, "div", 22);
|
|
37
66
|
i0.ɵɵtext(5);
|
|
38
67
|
i0.ɵɵelementEnd()();
|
|
39
|
-
i0.ɵɵelementStart(6, "div",
|
|
68
|
+
i0.ɵɵelementStart(6, "div", 23);
|
|
40
69
|
i0.ɵɵtext(7);
|
|
41
70
|
i0.ɵɵelementEnd();
|
|
42
71
|
} if (rf & 2) {
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
i0.ɵɵstyleProp("background-color", ctx_r0.getColor(ev_r3));
|
|
72
|
+
const row_r2 = i0.ɵɵnextContext(2).$implicit;
|
|
73
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
74
|
+
i0.ɵɵstyleProp("background-color", ctx_r0.getColor(ctx_r0.asEvent(row_r2).event));
|
|
47
75
|
i0.ɵɵadvance(3);
|
|
48
|
-
i0.ɵɵtextInterpolate(ctx_r0.renderedTitle(
|
|
76
|
+
i0.ɵɵtextInterpolate(ctx_r0.renderedTitle(ctx_r0.asEvent(row_r2).event));
|
|
49
77
|
i0.ɵɵadvance(2);
|
|
50
|
-
i0.ɵɵtextInterpolate(ctx_r0.
|
|
78
|
+
i0.ɵɵtextInterpolate(ctx_r0.asEvent(row_r2).timeLabel);
|
|
51
79
|
i0.ɵɵadvance(2);
|
|
52
|
-
i0.ɵɵtextInterpolate(ctx_r0.
|
|
80
|
+
i0.ɵɵtextInterpolate(ctx_r0.asEvent(row_r2).category);
|
|
53
81
|
} }
|
|
54
|
-
function
|
|
82
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
55
83
|
i0.ɵɵelementContainer(0);
|
|
56
84
|
} }
|
|
57
|
-
function
|
|
85
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
|
58
86
|
i0.ɵɵelementContainerStart(0);
|
|
59
|
-
i0.ɵɵtemplate(1,
|
|
87
|
+
i0.ɵɵtemplate(1, AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_4_ng_container_1_Template, 1, 0, "ng-container", 18);
|
|
60
88
|
i0.ɵɵelementContainerEnd();
|
|
61
89
|
} if (rf & 2) {
|
|
62
|
-
const
|
|
90
|
+
const row_r2 = i0.ɵɵnextContext(2).$implicit;
|
|
63
91
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
64
92
|
i0.ɵɵadvance();
|
|
65
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.badgesTpl)("ngTemplateOutletContext", ctx_r0.tplCtx(
|
|
93
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.badgesTpl)("ngTemplateOutletContext", ctx_r0.tplCtx(ctx_r0.asEvent(row_r2).event));
|
|
66
94
|
} }
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
i0.ɵɵelementStart(0, "div",
|
|
70
|
-
i0.ɵɵlistener("mousedown", function
|
|
71
|
-
i0.ɵɵtemplate(1,
|
|
95
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
97
|
+
i0.ɵɵelementStart(0, "div", 16);
|
|
98
|
+
i0.ɵɵlistener("mousedown", function AgendaViewComponent_ng_template_3_ng_container_1_div_2_Template_div_mousedown_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.click.markMouseDown()); })("click", function AgendaViewComponent_ng_template_3_ng_container_1_div_2_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const row_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.handleEventClick($event, ctx_r0.asEvent(row_r2))); })("dblclick", function AgendaViewComponent_ng_template_3_ng_container_1_div_2_Template_div_dblclick_0_listener($event) { i0.ɵɵrestoreView(_r3); const row_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.handleEventDoubleClick($event, ctx_r0.asEvent(row_r2))); });
|
|
99
|
+
i0.ɵɵtemplate(1, AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_1_Template, 2, 2, "ng-container", 4)(2, AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_template_2_Template, 8, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(4, AgendaViewComponent_ng_template_3_ng_container_1_div_2_ng_container_4_Template, 2, 2, "ng-container", 17);
|
|
72
100
|
i0.ɵɵelementEnd();
|
|
73
101
|
} if (rf & 2) {
|
|
74
|
-
const
|
|
75
|
-
const
|
|
102
|
+
const defaultAgenda_r4 = i0.ɵɵreference(3);
|
|
103
|
+
const row_r2 = i0.ɵɵnextContext().$implicit;
|
|
76
104
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
77
|
-
i0.ɵɵclassMap("
|
|
78
|
-
i0.ɵɵproperty("ngStyle", ctx_r0.slotsStyle(
|
|
105
|
+
i0.ɵɵclassMap("bm-cal-agenda__row bm-cal-agenda__event" + (ctx_r0.asEvent(row_r2).isSelected ? " bm-cal-agenda__event--selected" : "") + ctx_r0.slotsClassName(ctx_r0.asEvent(row_r2).event));
|
|
106
|
+
i0.ɵɵproperty("ngStyle", ctx_r0.slotsStyle(ctx_r0.asEvent(row_r2).event));
|
|
79
107
|
i0.ɵɵadvance();
|
|
80
|
-
i0.ɵɵproperty("ngIf", ctx_r0.contentTpl)("ngIfElse",
|
|
108
|
+
i0.ɵɵproperty("ngIf", ctx_r0.contentTpl)("ngIfElse", defaultAgenda_r4);
|
|
81
109
|
i0.ɵɵadvance(3);
|
|
82
110
|
i0.ɵɵproperty("ngIf", ctx_r0.badgesTpl);
|
|
83
111
|
} }
|
|
84
|
-
function
|
|
85
|
-
i0.ɵɵ
|
|
86
|
-
i0.ɵɵ
|
|
87
|
-
i0.ɵɵ
|
|
88
|
-
i0.ɵɵelementStart(4, "div", 6)(5, "span", 7);
|
|
89
|
-
i0.ɵɵtext(6);
|
|
90
|
-
i0.ɵɵelementEnd();
|
|
91
|
-
i0.ɵɵelementStart(7, "span", 8);
|
|
92
|
-
i0.ɵɵtext(8);
|
|
93
|
-
i0.ɵɵelementEnd()()();
|
|
94
|
-
i0.ɵɵelementStart(9, "div", 9);
|
|
95
|
-
i0.ɵɵtemplate(10, AgendaViewComponent_div_2_div_10_Template, 5, 6, "div", 10);
|
|
96
|
-
i0.ɵɵelementEnd()();
|
|
112
|
+
function AgendaViewComponent_ng_template_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
113
|
+
i0.ɵɵelementContainerStart(0);
|
|
114
|
+
i0.ɵɵtemplate(1, AgendaViewComponent_ng_template_3_ng_container_1_div_1_Template, 8, 5, "div", 9)(2, AgendaViewComponent_ng_template_3_ng_container_1_div_2_Template, 5, 6, "div", 10);
|
|
115
|
+
i0.ɵɵelementContainerEnd();
|
|
97
116
|
} if (rf & 2) {
|
|
98
|
-
const
|
|
99
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
117
|
+
const row_r2 = ctx.$implicit;
|
|
100
118
|
i0.ɵɵadvance();
|
|
101
|
-
i0.ɵɵ
|
|
119
|
+
i0.ɵɵproperty("ngIf", row_r2.kind === "header");
|
|
102
120
|
i0.ɵɵadvance();
|
|
103
|
-
i0.ɵɵ
|
|
121
|
+
i0.ɵɵproperty("ngIf", row_r2.kind === "event");
|
|
122
|
+
} }
|
|
123
|
+
function AgendaViewComponent_ng_template_3_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
124
|
+
i0.ɵɵelement(0, "div", 8);
|
|
125
|
+
} if (rf & 2) {
|
|
126
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
127
|
+
i0.ɵɵstyleProp("height", ctx_r0.agenda.offsetBottom, "px");
|
|
128
|
+
} }
|
|
129
|
+
function AgendaViewComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
i0.ɵɵtemplate(0, AgendaViewComponent_ng_template_3_div_0_Template, 1, 2, "div", 6)(1, AgendaViewComponent_ng_template_3_ng_container_1_Template, 3, 2, "ng-container", 7)(2, AgendaViewComponent_ng_template_3_div_2_Template, 1, 2, "div", 6);
|
|
131
|
+
} if (rf & 2) {
|
|
132
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
133
|
+
i0.ɵɵproperty("ngIf", ctx_r0.agenda.offsetTop > 0);
|
|
104
134
|
i0.ɵɵadvance();
|
|
105
|
-
i0.ɵɵ
|
|
106
|
-
i0.ɵɵadvance(
|
|
107
|
-
i0.ɵɵ
|
|
108
|
-
i0.ɵɵadvance(2);
|
|
109
|
-
i0.ɵɵtextInterpolate(ctx_r0.getMonthYear(group_r4.date));
|
|
110
|
-
i0.ɵɵadvance(2);
|
|
111
|
-
i0.ɵɵproperty("ngForOf", group_r4.events);
|
|
135
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.agenda.rows)("ngForTrackBy", ctx_r0.trackRow);
|
|
136
|
+
i0.ɵɵadvance();
|
|
137
|
+
i0.ɵɵproperty("ngIf", ctx_r0.agenda.offsetBottom > 0);
|
|
112
138
|
} }
|
|
139
|
+
/**
|
|
140
|
+
* The agenda view — a WINDOWED flat list (v0.30 Slice 5b). The controller owns the
|
|
141
|
+
* whole derivation: it flattens the day-grouped agenda to uniform-height rows
|
|
142
|
+
* (header | event), formats every time label, computes selection, and windows the
|
|
143
|
+
* heavy build to the visible slice. This binding only renders `agenda.rows` + the
|
|
144
|
+
* px spacers and reports the scroll container's metrics via `setViewport` — no
|
|
145
|
+
* grouping, no formatting, no window math here. `trackBy: trackRow` (by `row.key`)
|
|
146
|
+
* keeps in-flight interactions attached across snapshot churn.
|
|
147
|
+
*/
|
|
113
148
|
export class AgendaViewComponent {
|
|
114
149
|
renderService;
|
|
115
|
-
|
|
116
|
-
|
|
150
|
+
zone;
|
|
151
|
+
agenda;
|
|
117
152
|
config;
|
|
118
|
-
|
|
119
|
-
|
|
153
|
+
/** Reports the scroll container's metrics so the controller windows the rows. */
|
|
154
|
+
setViewport;
|
|
120
155
|
eventClick = new EventEmitter();
|
|
121
156
|
selectEvent = new EventEmitter();
|
|
122
|
-
|
|
157
|
+
scrollEl;
|
|
158
|
+
viewportCleanup = null;
|
|
123
159
|
click = createClickIntent();
|
|
124
|
-
|
|
125
|
-
constructor(renderService) {
|
|
160
|
+
constructor(renderService, zone) {
|
|
126
161
|
this.renderService = renderService;
|
|
162
|
+
this.zone = zone;
|
|
127
163
|
}
|
|
164
|
+
// Narrowing helpers — Angular's template type-checker keeps `row` as the union.
|
|
165
|
+
asHeader(row) { return row; }
|
|
166
|
+
asEvent(row) { return row; }
|
|
167
|
+
trackRow(_i, row) { return row.key; }
|
|
168
|
+
// ── Event render-slot hook (EventRenderService, mirrors sibling views) ──
|
|
128
169
|
get badgesTpl() { return this.renderService?.eventBadgesTpl; }
|
|
129
170
|
get contentTpl() { return this.renderService?.eventContentTpl; }
|
|
130
171
|
tplCtx(ev) { return this.renderService?.buildTemplateContext(ev); }
|
|
@@ -134,111 +175,58 @@ export class AgendaViewComponent {
|
|
|
134
175
|
return cls ? ' ' + cls : '';
|
|
135
176
|
}
|
|
136
177
|
slotsStyle(ev) { return this.renderService?.resolveStyle(ev); }
|
|
137
|
-
// Expose core functions to template
|
|
138
|
-
getDayOfMonth = getDayOfMonth;
|
|
139
|
-
ngOnChanges() {
|
|
140
|
-
this.currentNow = now(this.config.core.timezone, this.config.core.clock);
|
|
141
|
-
this.computeGroups();
|
|
142
|
-
}
|
|
143
|
-
isToday(date) {
|
|
144
|
-
return isSameDay(date, this.currentNow);
|
|
145
|
-
}
|
|
146
|
-
getWeekday(date) {
|
|
147
|
-
return formatDateTime(date, { locale: this.config.locale.code, dateStyle: 'full' }).split(',')[0];
|
|
148
|
-
}
|
|
149
|
-
getMonthYear(date) {
|
|
150
|
-
return formatDateTime(date, { locale: this.config.locale.code, dateStyle: 'long' }).replace(/\d+\.?\s*/, '');
|
|
151
|
-
}
|
|
152
178
|
getColor(ev) {
|
|
153
179
|
return ev.metadata.color ?? '#007AFF';
|
|
154
180
|
}
|
|
155
|
-
|
|
156
|
-
|
|
181
|
+
ngAfterViewInit() {
|
|
182
|
+
// Report the container's scroll metrics so the controller windows the rows. Wire
|
|
183
|
+
// the raw scroll/resize outside Angular's zone (high-frequency) — the binding
|
|
184
|
+
// re-enters change detection when the snapshot actually changes.
|
|
185
|
+
const el = this.scrollEl?.nativeElement;
|
|
186
|
+
if (!el)
|
|
187
|
+
return;
|
|
188
|
+
const report = () => this.setViewport(el.scrollTop, el.clientHeight);
|
|
189
|
+
const wire = () => {
|
|
190
|
+
report();
|
|
191
|
+
el.addEventListener('scroll', report, { passive: true });
|
|
192
|
+
const ro = new ResizeObserver(report);
|
|
193
|
+
ro.observe(el);
|
|
194
|
+
this.viewportCleanup = () => { el.removeEventListener('scroll', report); ro.disconnect(); };
|
|
195
|
+
};
|
|
196
|
+
if (this.zone)
|
|
197
|
+
this.zone.runOutsideAngular(wire);
|
|
198
|
+
else
|
|
199
|
+
wire();
|
|
157
200
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (isSingleDayAllDay(ev.timeRange)) {
|
|
161
|
-
return this.config.locale.allDayEvent;
|
|
162
|
-
}
|
|
163
|
-
const startStr = formatDateTime(ev.timeRange.start, { locale: this.config.locale.code, dateStyle: 'short' });
|
|
164
|
-
const endStr = formatDateTime(addDays(ev.timeRange.end, -1), { locale: this.config.locale.code, dateStyle: 'short' });
|
|
165
|
-
return `${this.config.locale.allDayEvent} (${startStr} – ${endStr})`;
|
|
166
|
-
}
|
|
167
|
-
const isFirst = isSameDay(ev.timeRange.start, date);
|
|
168
|
-
const isLast = isSameDay(ev.timeRange.end, date);
|
|
169
|
-
const st = toTimeStr(ev.timeRange.start);
|
|
170
|
-
const et = toTimeStr(ev.timeRange.end);
|
|
171
|
-
if (isFirst && isLast)
|
|
172
|
-
return `${st} – ${et}`;
|
|
173
|
-
if (isFirst)
|
|
174
|
-
return `${this.config.locale.timeFrom} ${st}`;
|
|
175
|
-
if (isLast)
|
|
176
|
-
return `${this.config.locale.timeUntil} ${et}`;
|
|
177
|
-
return this.config.locale.allDayEvent;
|
|
201
|
+
ngOnDestroy() {
|
|
202
|
+
this.viewportCleanup?.();
|
|
178
203
|
}
|
|
179
|
-
handleEventClick(
|
|
204
|
+
handleEventClick(_e, row) {
|
|
180
205
|
if (!this.click.accept(this.config.clickThresholdMs))
|
|
181
206
|
return;
|
|
182
|
-
|
|
183
|
-
this.selectEvent.emit({ eventId: ev.id, instanceDate });
|
|
207
|
+
this.selectEvent.emit({ eventId: row.event.id, instanceDate: row.instanceDate ?? undefined });
|
|
184
208
|
}
|
|
185
|
-
handleEventDoubleClick(e,
|
|
209
|
+
handleEventDoubleClick(e, row) {
|
|
186
210
|
if (!this.click.accept(this.config.clickThresholdMs))
|
|
187
211
|
return;
|
|
188
212
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
189
|
-
|
|
190
|
-
this.eventClick.emit({ eventId: ev.id, rect, instanceDate });
|
|
213
|
+
this.eventClick.emit({ eventId: row.event.id, rect, instanceDate: row.instanceDate ?? undefined });
|
|
191
214
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
for (const ev of this.events) {
|
|
202
|
-
if (!overlaps(ev.timeRange, range))
|
|
203
|
-
continue;
|
|
204
|
-
const evStart = isBefore(ev.timeRange.start, rangeStart) ? rangeStart : ev.timeRange.start;
|
|
205
|
-
const evEnd = isAfter(ev.timeRange.end, rangeEnd) ? rangeEnd : ev.timeRange.end;
|
|
206
|
-
let d = startOfDay(evStart);
|
|
207
|
-
const limit = addDays(startOfDay(evEnd), 1);
|
|
208
|
-
while (isBefore(d, limit) && isBefore(d, rangeEnd)) {
|
|
209
|
-
const ds = toDateStr(d);
|
|
210
|
-
const list = groups.get(ds) || [];
|
|
211
|
-
list.push(ev);
|
|
212
|
-
groups.set(ds, list);
|
|
213
|
-
d = addDays(d, 1);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
this.dayGroups = [];
|
|
217
|
-
for (let i = 0; i < DEFAULT_AGENDA_RANGE_DAYS; i++) {
|
|
218
|
-
const date = addDays(rangeStart, i);
|
|
219
|
-
const dateStr = toDateStr(date);
|
|
220
|
-
const dayEvents = groups.get(dateStr);
|
|
221
|
-
if (dayEvents && dayEvents.length > 0) {
|
|
222
|
-
dayEvents.sort((a, b) => {
|
|
223
|
-
if (a.allDay !== b.allDay)
|
|
224
|
-
return a.allDay ? -1 : 1;
|
|
225
|
-
return a.timeRange.start.epochMs - b.timeRange.start.epochMs;
|
|
226
|
-
});
|
|
227
|
-
this.dayGroups.push({ date, dateStr, events: dayEvents });
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
static ɵfac = function AgendaViewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AgendaViewComponent)(i0.ɵɵdirectiveInject(i1.EventRenderService, 8)); };
|
|
232
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AgendaViewComponent, selectors: [["cal-agenda-view"]], hostAttrs: [2, "display", "contents"], inputs: { currentDate: "currentDate", events: "events", config: "config", selectedEventId: "selectedEventId", selectedInstanceDate: "selectedInstanceDate" }, outputs: { eventClick: "eventClick", selectEvent: "selectEvent" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 2, consts: [["defaultAgenda", ""], [1, "agenda-view"], ["class", "agenda-view__empty", 4, "ngIf"], ["class", "agenda-view__day", 4, "ngFor", "ngForOf"], [1, "agenda-view__empty"], [1, "agenda-view__day"], [1, "agenda-view__date-text"], [1, "agenda-view__date-weekday"], [1, "agenda-view__date-full"], [1, "agenda-view__events"], [3, "class", "ngStyle", "mousedown", "click", "dblclick", 4, "ngFor", "ngForOf"], [3, "mousedown", "click", "dblclick", "ngStyle"], [4, "ngIf", "ngIfElse"], [4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "agenda-view__event-color"], [1, "agenda-view__event-content"], [1, "agenda-view__event-title"], [1, "agenda-view__event-time"], [1, "agenda-view__event-calendar"]], template: function AgendaViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
233
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
234
|
-
i0.ɵɵtemplate(1, AgendaViewComponent_div_1_Template, 2, 1, "div", 2)(2, AgendaViewComponent_div_2_Template, 11, 8, "div", 3);
|
|
215
|
+
static ɵfac = function AgendaViewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AgendaViewComponent)(i0.ɵɵdirectiveInject(i1.EventRenderService, 8), i0.ɵɵdirectiveInject(i0.NgZone, 8)); };
|
|
216
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AgendaViewComponent, selectors: [["cal-agenda-view"]], viewQuery: function AgendaViewComponent_Query(rf, ctx) { if (rf & 1) {
|
|
217
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
218
|
+
} if (rf & 2) {
|
|
219
|
+
let _t;
|
|
220
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.scrollEl = _t.first);
|
|
221
|
+
} }, hostAttrs: [2, "display", "contents"], inputs: { agenda: "agenda", config: "config", setViewport: "setViewport" }, outputs: { eventClick: "eventClick", selectEvent: "selectEvent" }, decls: 5, vars: 2, consts: [["scrollEl", ""], ["rowsTpl", ""], ["defaultAgenda", ""], [1, "bm-cal-agenda"], [4, "ngIf", "ngIfElse"], [1, "bm-cal-agenda__empty"], ["class", "bm-cal-agenda__spacer", "aria-hidden", "true", 3, "height", 4, "ngIf"], [4, "ngFor", "ngForOf", "ngForTrackBy"], ["aria-hidden", "true", 1, "bm-cal-agenda__spacer"], ["class", "bm-cal-agenda__row bm-cal-agenda__row--header", 3, "bm-cal-agenda__row--today", 4, "ngIf"], [3, "class", "ngStyle", "mousedown", "click", "dblclick", 4, "ngIf"], [1, "bm-cal-agenda__row", "bm-cal-agenda__row--header"], [1, "bm-cal-agenda__date-number"], [1, "bm-cal-agenda__date-text"], [1, "bm-cal-agenda__date-weekday"], [1, "bm-cal-agenda__date-full"], [3, "mousedown", "click", "dblclick", "ngStyle"], [4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "bm-cal-agenda__event-color"], [1, "bm-cal-agenda__event-content"], [1, "bm-cal-agenda__event-title"], [1, "bm-cal-agenda__event-time"], [1, "bm-cal-agenda__event-calendar"]], template: function AgendaViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
222
|
+
i0.ɵɵelementStart(0, "div", 3, 0);
|
|
223
|
+
i0.ɵɵtemplate(2, AgendaViewComponent_ng_container_2_Template, 3, 1, "ng-container", 4)(3, AgendaViewComponent_ng_template_3_Template, 3, 4, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
235
224
|
i0.ɵɵelementEnd();
|
|
236
225
|
} if (rf & 2) {
|
|
237
|
-
i0.ɵɵ
|
|
238
|
-
i0.ɵɵ
|
|
239
|
-
i0.ɵɵ
|
|
240
|
-
|
|
241
|
-
} }, dependencies: [CommonModule, i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, i2.NgStyle], encapsulation: 2 });
|
|
226
|
+
const rowsTpl_r5 = i0.ɵɵreference(4);
|
|
227
|
+
i0.ɵɵadvance(2);
|
|
228
|
+
i0.ɵɵproperty("ngIf", ctx.agenda.empty)("ngIfElse", rowsTpl_r5);
|
|
229
|
+
} }, dependencies: [CommonModule, i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, i2.NgStyle], encapsulation: 2, changeDetection: 0 });
|
|
242
230
|
}
|
|
243
231
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AgendaViewComponent, [{
|
|
244
232
|
type: Component,
|
|
@@ -247,63 +235,68 @@ export class AgendaViewComponent {
|
|
|
247
235
|
standalone: true,
|
|
248
236
|
host: { style: 'display: contents' },
|
|
249
237
|
imports: [CommonModule],
|
|
238
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
250
239
|
template: `
|
|
251
|
-
<div class="agenda
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<span class="
|
|
240
|
+
<div class="bm-cal-agenda" #scrollEl>
|
|
241
|
+
<ng-container *ngIf="agenda.empty; else rowsTpl">
|
|
242
|
+
<div class="bm-cal-agenda__empty">{{ config.locale.noEvents }}</div>
|
|
243
|
+
</ng-container>
|
|
244
|
+
<ng-template #rowsTpl>
|
|
245
|
+
<div class="bm-cal-agenda__spacer" *ngIf="agenda.offsetTop > 0" [style.height.px]="agenda.offsetTop" aria-hidden="true"></div>
|
|
246
|
+
<ng-container *ngFor="let row of agenda.rows; trackBy: trackRow">
|
|
247
|
+
<div *ngIf="row.kind === 'header'"
|
|
248
|
+
class="bm-cal-agenda__row bm-cal-agenda__row--header"
|
|
249
|
+
[class.bm-cal-agenda__row--today]="asHeader(row).isToday">
|
|
250
|
+
<span class="bm-cal-agenda__date-number">{{ asHeader(row).dayOfMonth }}</span>
|
|
251
|
+
<div class="bm-cal-agenda__date-text">
|
|
252
|
+
<span class="bm-cal-agenda__date-weekday">{{ asHeader(row).weekday }}</span>
|
|
253
|
+
<span class="bm-cal-agenda__date-full">{{ asHeader(row).dateFull }}</span>
|
|
254
|
+
</div>
|
|
262
255
|
</div>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
[class]="'agenda-view__event' + (isEventSelected(ev) ? ' agenda-view__event--selected' : '') + slotsClassName(ev)"
|
|
267
|
-
[ngStyle]="slotsStyle(ev)"
|
|
256
|
+
<div *ngIf="row.kind === 'event'"
|
|
257
|
+
[class]="'bm-cal-agenda__row bm-cal-agenda__event' + (asEvent(row).isSelected ? ' bm-cal-agenda__event--selected' : '') + slotsClassName(asEvent(row).event)"
|
|
258
|
+
[ngStyle]="slotsStyle(asEvent(row).event)"
|
|
268
259
|
(mousedown)="click.markMouseDown()"
|
|
269
|
-
(click)="handleEventClick($event,
|
|
270
|
-
(dblclick)="handleEventDoubleClick($event,
|
|
260
|
+
(click)="handleEventClick($event, asEvent(row))"
|
|
261
|
+
(dblclick)="handleEventDoubleClick($event, asEvent(row))">
|
|
271
262
|
<ng-container *ngIf="contentTpl; else defaultAgenda">
|
|
272
|
-
<ng-container *ngTemplateOutlet="contentTpl; context: tplCtx(
|
|
263
|
+
<ng-container *ngTemplateOutlet="contentTpl; context: tplCtx(asEvent(row).event)"></ng-container>
|
|
273
264
|
</ng-container>
|
|
274
265
|
<ng-template #defaultAgenda>
|
|
275
|
-
<div class="
|
|
276
|
-
<div class="
|
|
277
|
-
<div class="
|
|
278
|
-
<div class="
|
|
266
|
+
<div class="bm-cal-agenda__event-color" [style.backgroundColor]="getColor(asEvent(row).event)"></div>
|
|
267
|
+
<div class="bm-cal-agenda__event-content">
|
|
268
|
+
<div class="bm-cal-agenda__event-title">{{ renderedTitle(asEvent(row).event) }}</div>
|
|
269
|
+
<div class="bm-cal-agenda__event-time">{{ asEvent(row).timeLabel }}</div>
|
|
279
270
|
</div>
|
|
280
|
-
<div class="
|
|
271
|
+
<div class="bm-cal-agenda__event-calendar">{{ asEvent(row).category }}</div>
|
|
281
272
|
</ng-template>
|
|
282
273
|
<ng-container *ngIf="badgesTpl">
|
|
283
|
-
<ng-container *ngTemplateOutlet="badgesTpl; context: tplCtx(
|
|
274
|
+
<ng-container *ngTemplateOutlet="badgesTpl; context: tplCtx(asEvent(row).event)"></ng-container>
|
|
284
275
|
</ng-container>
|
|
285
276
|
</div>
|
|
286
|
-
</
|
|
287
|
-
|
|
277
|
+
</ng-container>
|
|
278
|
+
<div class="bm-cal-agenda__spacer" *ngIf="agenda.offsetBottom > 0" [style.height.px]="agenda.offsetBottom" aria-hidden="true"></div>
|
|
279
|
+
</ng-template>
|
|
288
280
|
</div>
|
|
289
281
|
`,
|
|
290
282
|
}]
|
|
291
283
|
}], () => [{ type: i1.EventRenderService, decorators: [{
|
|
292
284
|
type: Optional
|
|
293
|
-
}] }
|
|
294
|
-
|
|
295
|
-
|
|
285
|
+
}] }, { type: i0.NgZone, decorators: [{
|
|
286
|
+
type: Optional
|
|
287
|
+
}] }], { agenda: [{
|
|
296
288
|
type: Input
|
|
297
289
|
}], config: [{
|
|
298
290
|
type: Input
|
|
299
|
-
}],
|
|
300
|
-
type: Input
|
|
301
|
-
}], selectedInstanceDate: [{
|
|
291
|
+
}], setViewport: [{
|
|
302
292
|
type: Input
|
|
303
293
|
}], eventClick: [{
|
|
304
294
|
type: Output
|
|
305
295
|
}], selectEvent: [{
|
|
306
296
|
type: Output
|
|
297
|
+
}], scrollEl: [{
|
|
298
|
+
type: ViewChild,
|
|
299
|
+
args: ['scrollEl']
|
|
307
300
|
}] }); })();
|
|
308
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AgendaViewComponent, { className: "AgendaViewComponent", filePath: "views/agenda/agendaview.ts", lineNumber:
|
|
301
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AgendaViewComponent, { className: "AgendaViewComponent", filePath: "views/agenda/agendaview.ts", lineNumber: 71 }); })();
|
|
309
302
|
//# sourceMappingURL=AgendaView.js.map
|