@acorex/components 19.12.0-next.1 → 19.12.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/calendar/lib/calendar-range.component.d.ts +4 -1
  2. package/calendar/lib/calendar.class.d.ts +8 -0
  3. package/calendar/lib/calendar.component.d.ts +2 -0
  4. package/datetime-box/lib/datetime-box.component.d.ts +11 -13
  5. package/datetime-input/lib/datetime-input.component.d.ts +21 -84
  6. package/datetime-picker/lib/datetime-picker.component.d.ts +13 -31
  7. package/fesm2022/acorex-components-alert.mjs +2 -2
  8. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  9. package/fesm2022/acorex-components-calendar.mjs +65 -37
  10. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  11. package/fesm2022/acorex-components-conversation.mjs +2 -2
  12. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  13. package/fesm2022/acorex-components-datetime-box.mjs +28 -26
  14. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  15. package/fesm2022/acorex-components-datetime-input.mjs +113 -181
  16. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  17. package/fesm2022/acorex-components-datetime-picker.mjs +79 -81
  18. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  19. package/fesm2022/acorex-components-file-explorer.mjs +1 -1
  20. package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
  21. package/fesm2022/acorex-components-map.mjs +13 -3
  22. package/fesm2022/acorex-components-map.mjs.map +1 -1
  23. package/fesm2022/{acorex-components-modal-acorex-components-modal-Bs1CnBt8.mjs → acorex-components-modal-acorex-components-modal-BzlZIwq8.mjs} +116 -26
  24. package/fesm2022/acorex-components-modal-acorex-components-modal-BzlZIwq8.mjs.map +1 -0
  25. package/fesm2022/acorex-components-modal-modal-content.component-zmFWBaiD.mjs +187 -0
  26. package/fesm2022/acorex-components-modal-modal-content.component-zmFWBaiD.mjs.map +1 -0
  27. package/fesm2022/acorex-components-modal.mjs +1 -1
  28. package/fesm2022/acorex-components-query-builder.mjs +1 -1
  29. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  30. package/fesm2022/acorex-components-scheduler.mjs +1299 -103
  31. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  32. package/fesm2022/acorex-components-tree-view.mjs +16 -7
  33. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  34. package/map/lib/map.service.d.ts +1 -1
  35. package/modal/lib/modal-content/modal-content.component.d.ts +11 -8
  36. package/modal/lib/modal-state.service.d.ts +5 -4
  37. package/modal/lib/modal.component.d.ts +2 -0
  38. package/modal/lib/modal.service.d.ts +4 -2
  39. package/modal/lib/modal.types.d.ts +15 -1
  40. package/package.json +1 -1
  41. package/scheduler/index.d.ts +5 -2
  42. package/scheduler/lib/scheduler.class.d.ts +53 -0
  43. package/scheduler/lib/scheduler.component.d.ts +75 -22
  44. package/scheduler/lib/scheduler.module.d.ts +5 -9
  45. package/scheduler/lib/scheduler.service.d.ts +61 -0
  46. package/scheduler/lib/views/day/scheduler-day-view.component.d.ts +35 -0
  47. package/scheduler/lib/views/month/scheduler-month-view.component.d.ts +45 -0
  48. package/scheduler/lib/views/week/scheduler-week-view.component.d.ts +42 -0
  49. package/tree-view/lib/tree-view.component.d.ts +4 -2
  50. package/fesm2022/acorex-components-modal-acorex-components-modal-Bs1CnBt8.mjs.map +0 -1
  51. package/fesm2022/acorex-components-modal-modal-content.component-DhpujG4d.mjs +0 -181
  52. package/fesm2022/acorex-components-modal-modal-content.component-DhpujG4d.mjs.map +0 -1
  53. package/scheduler/lib/scheduler-month-view.component.d.ts +0 -41
  54. package/scheduler/lib/scheduler-week-view.component.d.ts +0 -10
@@ -1,161 +1,1357 @@
1
- import { AXButtonComponent, AXButtonItemComponent, AXButtonModule } from '@acorex/components/button';
2
- import { MXBaseComponent } from '@acorex/components/common';
3
- import { AXDecoratorIconComponent, AXDecoratorGenericComponent, AXDecoratorModule } from '@acorex/components/decorators';
4
- import { AXDateTimeRange, AXCalendarService, AXDateTimeModule } from '@acorex/core/date-time';
1
+ import { AXButtonComponent } from '@acorex/components/button';
2
+ import { AXCalendarComponent } from '@acorex/components/calendar';
3
+ import { MXBaseComponent, convertArrayToDataSource } from '@acorex/components/common';
4
+ import { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';
5
+ import { AXPopoverComponent } from '@acorex/components/popover';
6
+ import { AXSelectBoxComponent } from '@acorex/components/select-box';
7
+ import { AXCalendarService } from '@acorex/core/date-time';
8
+ import { AXFormatService, AXFormatPipe } from '@acorex/core/format';
9
+ import { AXLocaleService } from '@acorex/core/locale';
5
10
  import { AXPlatform } from '@acorex/core/platform';
6
- import { NgFor, NgClass, NgIf, CommonModule } from '@angular/common';
11
+ import { AXTranslatorPipe, AXTranslationService } from '@acorex/core/translation';
12
+ import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
13
+ import { AsyncPipe, NgClass } from '@angular/common';
7
14
  import * as i0 from '@angular/core';
8
- import { inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
9
- import { AXDropdownPanelComponent, AXDropdownModule } from '@acorex/components/dropdown';
15
+ import { inject, Injectable, input, computed, output, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule, viewChild, linkedSignal, signal, model, effect, untracked } from '@angular/core';
16
+ import { toSignal } from '@angular/core/rxjs-interop';
17
+ import * as i1 from '@angular/forms';
18
+ import { FormsModule } from '@angular/forms';
19
+ import { Observable, distinctUntilChanged, switchMap, of, map, startWith } from 'rxjs';
20
+ import { orderBy } from 'lodash-es';
10
21
 
11
- /**
12
- * @category
13
- * Represents a view in the scheduler component that displays the calendar month.
14
- */
15
- class AXSchedulerMonthViewComponent extends MXBaseComponent {
22
+ class AXSchedulerService {
16
23
  constructor() {
17
- super(...arguments);
18
- /** @ignore */
19
- this._platform = inject(AXPlatform);
20
- /** @ignore */
21
- this._slots = [];
24
+ this.formatService = inject(AXFormatService);
25
+ this.HOURS_PER_DAY = 24;
26
+ this.MINUTES_PER_HOUR = 60;
27
+ this.BLOCK_DURATION_MINUTES = 30;
28
+ this.MILLISECONDS_PER_MINUTE = 60 * 1000;
29
+ this.MILLISECONDS_PER_DAY = this.HOURS_PER_DAY * this.MINUTES_PER_HOUR * this.MILLISECONDS_PER_MINUTE;
22
30
  }
23
- /** @ignore */
24
- get dayNames() {
25
- return this._platform.is('SM') ? [] : [];
31
+ /**
32
+ * Checks if two appointments overlap in time.
33
+ */
34
+ doAppointmentsOverlap(appointmentA, appointmentB) {
35
+ if (!appointmentA?.startDate || !appointmentA.endDate || !appointmentB?.startDate || !appointmentB.endDate) {
36
+ return false;
37
+ }
38
+ const startA = appointmentA.startDate.date.getTime();
39
+ const endA = appointmentA.endDate.date.getTime();
40
+ const startB = appointmentB.startDate.date.getTime();
41
+ const endB = appointmentB.endDate.date.getTime();
42
+ // Uses strict overlap check (change < / > to <= / >= if touching boundaries count)
43
+ return startA < endB && endA > startB;
26
44
  }
27
45
  /**
28
- * Gets or sets the date for the scheduler view.
46
+ * Calculates appointment duration in minutes.
29
47
  */
30
- get date() {
31
- return this._date;
48
+ calculateDurationInMinutes(Appointment) {
49
+ if (!Appointment?.startDate || !Appointment.endDate)
50
+ return 0;
51
+ const durationMillis = Appointment.endDate.date.getTime() - Appointment.startDate.date.getTime();
52
+ return Math.max(0, durationMillis / this.MILLISECONDS_PER_MINUTE);
32
53
  }
33
54
  /**
34
- * Sets the date for the scheduler view and triggers the generation of time slots.
35
- * @param {AXDateTime} v
55
+ * Calculates appointment duration in blocks (default 30 min).
36
56
  */
37
- set date(v) {
38
- this._date = v;
39
- this.generateSlots();
57
+ calculateDurationInBlocks(appointment) {
58
+ const durationMinutes = this.calculateDurationInMinutes(appointment);
59
+ return Math.ceil(durationMinutes / this.BLOCK_DURATION_MINUTES);
40
60
  }
41
- /** @ignore */
42
- ngOnInit() {
43
- super.ngOnInit();
44
- this.generateSlots();
45
- this._platform.resize.subscribe((c) => {
46
- this.cdr.markForCheck();
61
+ /**
62
+ * Gets the day index (relative to view start) and block index (relative to start hour)
63
+ * for a given date time within the view context. Returns null if outside view.
64
+ */
65
+ getBlockIdentifier(dateTime, viewStartDate, startHour, endHour, // Exclusive end hour
66
+ viewTotalDays = 1) {
67
+ if (!viewStartDate || !dateTime || typeof startHour !== 'number' || typeof endHour !== 'number') {
68
+ return null;
69
+ }
70
+ const viewEndDate = viewStartDate.add('day', viewTotalDays); // Calculate exclusive end date
71
+ // Check if dateTime is within the view's date and time range
72
+ if (dateTime.compare(viewStartDate, 'day') < 0 ||
73
+ dateTime.compare(viewEndDate, 'day') >= 0 || // Check against exclusive end date
74
+ dateTime.hour < startHour ||
75
+ dateTime.hour >= endHour // Check against exclusive end hour
76
+ ) {
77
+ return null;
78
+ }
79
+ // Calculate day index relative to view start
80
+ const dayIndex = Math.floor((dateTime.date.getTime() - viewStartDate.date.getTime()) / this.MILLISECONDS_PER_DAY);
81
+ // Ensure dayIndex is valid for the view duration
82
+ if (dayIndex < 0 || dayIndex >= viewTotalDays) {
83
+ return null;
84
+ }
85
+ const minutesIntoDay = dateTime.hour * this.MINUTES_PER_HOUR + dateTime.minute;
86
+ const minutesIntoViewHours = minutesIntoDay - startHour * this.MINUTES_PER_HOUR;
87
+ // This check should be redundant due to initial hour check, but safe to keep
88
+ if (minutesIntoViewHours < 0)
89
+ return null;
90
+ const blockIndex = Math.floor(minutesIntoViewHours / this.BLOCK_DURATION_MINUTES);
91
+ return { dayIndex, blockIndex };
92
+ }
93
+ /**
94
+ * Groups appointments by the blocks they are ACTIVE in for a given view.
95
+ * @param viewTotalDays - Number of days in the current view (1 for Day, 7 for Week, etc.)
96
+ */
97
+ calculateActiveAppointmentsInBlock(singleDayAppointments, viewStartDate, startHour, endHour, viewTotalDays) {
98
+ const blocks = {};
99
+ if (!viewStartDate || typeof startHour !== 'number' || typeof endHour !== 'number' || viewTotalDays <= 0) {
100
+ return blocks;
101
+ }
102
+ const viewEndDate = viewStartDate.add('day', viewTotalDays); // Exclusive end date
103
+ // Calculate total blocks based on consistent block duration
104
+ const totalBlocksPerDay = Math.max(0, (endHour - startHour) * (this.MINUTES_PER_HOUR / this.BLOCK_DURATION_MINUTES));
105
+ singleDayAppointments.forEach((appointment) => {
106
+ if (!appointment.startDate || !appointment.endDate || !appointment.key)
107
+ return;
108
+ // Clamp appointment start/end times to the view boundaries (days and hours)
109
+ let effectiveStart = appointment.startDate.compare(viewStartDate) < 0 ? viewStartDate : appointment.startDate;
110
+ if (effectiveStart.hour < startHour)
111
+ effectiveStart = effectiveStart.set('hour', startHour).set('minute', 0);
112
+ let effectiveEnd = appointment.endDate.compare(viewEndDate) >= 0 ? viewEndDate : appointment.endDate;
113
+ if (effectiveEnd.hour >= endHour) {
114
+ const endDayBase = effectiveEnd.compare(viewEndDate) >= 0 ? viewEndDate.add('day', -1) : effectiveEnd;
115
+ effectiveEnd = endDayBase.set('hour', endHour).set('minute', 0);
116
+ }
117
+ // Get start block info using the specified viewTotalDays
118
+ const startInfo = this.getBlockIdentifier(effectiveStart, viewStartDate, startHour, endHour, viewTotalDays);
119
+ if (!startInfo)
120
+ return; // Appointment starts completely outside view
121
+ // Get end block info (last block occupied) using the specified viewTotalDays
122
+ const timeBeforeEnd = effectiveEnd.add('minute', -1);
123
+ const endInfo = this.getBlockIdentifier(timeBeforeEnd, viewStartDate, startHour, endHour, viewTotalDays);
124
+ // If endInfo is null, it means the appointment ends before the viewable part starts,
125
+ // or exactly at the start, so it occupies no blocks. Handle this case.
126
+ if (!endInfo ||
127
+ endInfo.dayIndex < startInfo.dayIndex ||
128
+ (endInfo.dayIndex === startInfo.dayIndex && endInfo.blockIndex < startInfo.blockIndex)) {
129
+ return; // Appointment effectively has no duration within the viewable blocks
130
+ }
131
+ // Iterate through the days and blocks the appointment spans within the view
132
+ for (let dIdx = startInfo.dayIndex; dIdx <= endInfo.dayIndex; dIdx++) {
133
+ // Clamp day index just in case (should be handled by getBlockIdentifier checks)
134
+ if (dIdx < 0 || dIdx >= viewTotalDays)
135
+ continue;
136
+ const startBlock = dIdx === startInfo.dayIndex ? startInfo.blockIndex : 0;
137
+ // Make sure endBlock doesn't exceed the calculated totalBlocksPerDay
138
+ const endBlock = dIdx === endInfo.dayIndex ? endInfo.blockIndex : totalBlocksPerDay - 1;
139
+ if (!blocks[dIdx])
140
+ blocks[dIdx] = {};
141
+ for (let bIdx = startBlock; bIdx <= endBlock; bIdx++) {
142
+ // Final check for block index validity
143
+ if (bIdx >= 0 && bIdx < totalBlocksPerDay) {
144
+ if (!blocks[dIdx][bIdx])
145
+ blocks[dIdx][bIdx] = [];
146
+ // Avoid duplicates if the same appointment is processed multiple times (shouldn't happen with outer loop)
147
+ if (!blocks[dIdx][bIdx].some((e) => e.key === appointment.key)) {
148
+ blocks[dIdx][bIdx].push(appointment);
149
+ }
150
+ }
151
+ }
152
+ }
153
+ });
154
+ return blocks;
155
+ }
156
+ /**
157
+ * Calculates max concurrency and effective total columns for Day View appointments.
158
+ */
159
+ calculateDayViewConcurrencyInfo(singleDayAppointments, viewStartDate, // Need start date for context
160
+ startHour, endHour) {
161
+ const concurrencyInfo = new Map();
162
+ if (singleDayAppointments.length === 0)
163
+ return concurrencyInfo;
164
+ // Use the consolidated function for day view (viewTotalDays = 1)
165
+ // It returns ActiveAppointmentsInBlock, which has dayIndex 0 for Day view
166
+ const activeAppointmentsMap = this.calculateActiveAppointmentsInBlock(singleDayAppointments, viewStartDate, startHour, endHour, 1);
167
+ const blocks = activeAppointmentsMap[0] ?? {}; // Extract blocks for the single day (dayIndex 0)
168
+ // --- The rest of the logic remains the same, using the 'blocks' derived above ---
169
+ // 1. Calculate maxConcurrency for each appointment based on blocks it occupies
170
+ const maxConcurrencyMap = {};
171
+ singleDayAppointments.forEach((appointment) => {
172
+ let maxOverlap = 0;
173
+ // Recalculate block range for *this specific appointment* relative to view hours
174
+ const startMinutes = appointment.startDate.hour * this.MINUTES_PER_HOUR + appointment.startDate.minute;
175
+ const endMinutes = appointment.endDate.hour * this.MINUTES_PER_HOUR + appointment.endDate.minute;
176
+ const startBlockOffset = Math.max(0, startMinutes - startHour * this.MINUTES_PER_HOUR);
177
+ const endBlockOffset = Math.min((endHour - startHour) * this.MINUTES_PER_HOUR, endMinutes - startHour * this.MINUTES_PER_HOUR);
178
+ const startBlockIndex = Math.floor(startBlockOffset / this.BLOCK_DURATION_MINUTES);
179
+ const endBlockIndex = Math.ceil(endBlockOffset / this.BLOCK_DURATION_MINUTES);
180
+ for (let blockIdx = startBlockIndex; blockIdx < endBlockIndex; blockIdx++) {
181
+ const blockData = blocks[blockIdx]; // Access block data using block index
182
+ if (blockData) {
183
+ // blockData now contains appointment objects, use length directly
184
+ maxOverlap = Math.max(maxOverlap, blockData.length);
185
+ }
186
+ }
187
+ // Edge case handling (use blockData.length)
188
+ const startBlockData = blocks[startBlockIndex];
189
+ if (startBlockData) {
190
+ if (startBlockIndex === endBlockIndex - 1 || startBlockIndex >= endBlockIndex) {
191
+ maxOverlap = Math.max(maxOverlap, startBlockData.length);
192
+ }
193
+ }
194
+ maxConcurrencyMap[appointment.key] = maxOverlap || 1;
195
+ });
196
+ // 2. Calculate effectiveTotalColumns by checking overlaps
197
+ singleDayAppointments.forEach((appointment) => {
198
+ const appointmentKey = appointment.key;
199
+ let effectiveTotalColumns = maxConcurrencyMap[appointmentKey] || 1;
200
+ for (const otherAppointment of singleDayAppointments) {
201
+ if (appointmentKey === otherAppointment.key)
202
+ continue;
203
+ if (this.doAppointmentsOverlap(appointment, otherAppointment)) {
204
+ const otherMaxConcurrency = maxConcurrencyMap[otherAppointment.key] || 1;
205
+ effectiveTotalColumns = Math.max(effectiveTotalColumns, otherMaxConcurrency);
206
+ }
207
+ }
208
+ concurrencyInfo.set(appointmentKey, {
209
+ maxConcurrency: maxConcurrencyMap[appointmentKey] || 1, // Keep original max concurrency
210
+ effectiveTotalColumns: effectiveTotalColumns,
211
+ });
212
+ });
213
+ return concurrencyInfo;
214
+ }
215
+ /**
216
+ * Groups appointments by the block they START in for Week View.
217
+ */
218
+ calculateWeekViewAppointmentsByStartBlock(singleDayAppointments, viewStartDate, startHour, endHour) {
219
+ const blocks = {};
220
+ singleDayAppointments.forEach((appointment) => {
221
+ if (!appointment.startDate)
222
+ return;
223
+ const startInfo = this.getBlockIdentifier(appointment.startDate, viewStartDate, startHour, endHour, 7);
224
+ if (startInfo) {
225
+ const { dayIndex, blockIndex } = startInfo;
226
+ if (!blocks[dayIndex])
227
+ blocks[dayIndex] = {};
228
+ if (!blocks[dayIndex][blockIndex])
229
+ blocks[dayIndex][blockIndex] = [];
230
+ blocks[dayIndex][blockIndex].push(appointment);
231
+ }
47
232
  });
233
+ return blocks;
48
234
  }
49
235
  /**
50
- * Generates slots for the scheduler, including CSS classes for days outside the current month
51
- * and a flag for the current day.
236
+ * Groups appointments by the day(s) they occur on within a given date range.
237
+ * Returns a Map where the key is the date string ('YYYY-MM-DD') and the value is an array of appointments.
52
238
  */
53
- generateSlots() {
54
- const startDate = this.date.startOf('month').startOf('week');
55
- const endDate = this.date.endOf('month').endOf('week');
56
- const range = new AXDateTimeRange(startDate, endDate).enumurate('day');
57
- this._slots = range.map((c) => ({
58
- date: c,
59
- cssClass: {
60
- '!ax-bg-secondary-100': c.monthOfYear != this.date.monthOfYear,
239
+ groupAppointmentsByDay(appointments, viewStartDate, // First day visible in the grid
240
+ viewEndDate) {
241
+ const groupedAppointments = new Map();
242
+ if (!appointments || appointments.length === 0 || !viewStartDate || !viewEndDate) {
243
+ return groupedAppointments;
244
+ }
245
+ // Pre-calculate the end date for comparison (exclusive)
246
+ const exclusiveViewEndDate = viewEndDate.add('day', 1);
247
+ appointments.forEach((appointment) => {
248
+ if (!appointment.startDate || !appointment.endDate || !appointment.key)
249
+ return;
250
+ // Determine the effective start and end dates of the appointment clamped by the view range
251
+ const appointmentStart = appointment.startDate;
252
+ const appointmentEnd = appointment.endDate;
253
+ // Skip if appointment ends before the view starts or starts after the view ends
254
+ if (appointmentEnd.compare(viewStartDate, 'day') < 0 ||
255
+ appointmentStart.compare(exclusiveViewEndDate, 'day') >= 0) {
256
+ return;
257
+ }
258
+ // Clamp start date to the view start date
259
+ let currentDay = appointmentStart.compare(viewStartDate, 'day') < 0 ? viewStartDate : appointmentStart.startOf('day');
260
+ // Loop through each day the appointment spans within the view range
261
+ let safeCount = 0; // Prevent infinite loops
262
+ while (currentDay.compare(appointmentEnd, 'day') <= 0 &&
263
+ currentDay.compare(exclusiveViewEndDate, 'day') < 0 &&
264
+ safeCount < 100) {
265
+ const dateString = this.formatService.format(currentDay, 'datetime', { format: 'YYYY-MM-DD' }); // Use a consistent key format
266
+ if (!groupedAppointments.has(dateString)) {
267
+ groupedAppointments.set(dateString, []);
268
+ }
269
+ // Add the appointment if it's not already in the list for that day
270
+ if (!groupedAppointments.get(dateString).some((e) => e.key === appointment.key)) {
271
+ groupedAppointments.get(dateString).push(appointment);
272
+ }
273
+ currentDay = currentDay.add('day', 1);
274
+ safeCount++;
275
+ }
276
+ if (safeCount >= 100) {
277
+ console.warn('Safety break hit in groupAppointmentsByDay loop for appointment:', appointment.key);
278
+ }
279
+ });
280
+ return groupedAppointments;
281
+ }
282
+ getDayOfWeekNumber(dayName) {
283
+ switch (dayName) {
284
+ case 'Sunday':
285
+ return 1;
286
+ case 'Monday':
287
+ return 2;
288
+ case 'Tuesday':
289
+ return 3;
290
+ case 'Wednesday':
291
+ return 4;
292
+ case 'Thursday':
293
+ return 5;
294
+ case 'Friday':
295
+ return 6;
296
+ case 'Saturday':
297
+ return 7;
298
+ default:
299
+ console.warn(`Invalid day name: ${dayName}. Defaulting to Sunday (1).`);
300
+ return 1;
301
+ }
302
+ }
303
+ getSlotData(startDate, view) {
304
+ let endDate;
305
+ switch (view) {
306
+ case 'day':
307
+ endDate = startDate.add('minute', 30);
308
+ break;
309
+ case 'week':
310
+ endDate = startDate.add('minute', 30);
311
+ break;
312
+ case 'month':
313
+ startDate = startDate.startOf('day');
314
+ endDate = startDate.endOf('day');
315
+ break;
316
+ }
317
+ return { startDate, endDate, view };
318
+ }
319
+ handleEvent(event, eventOutputMap, eventType) {
320
+ const mouseEvent = event.event;
321
+ mouseEvent.preventDefault();
322
+ mouseEvent.stopPropagation();
323
+ if (eventType === 'appointment') {
324
+ const appointmentOutputMap = eventOutputMap[eventType];
325
+ const emitter = appointmentOutputMap[mouseEvent.type];
326
+ if (emitter)
327
+ emitter.emit(event);
328
+ }
329
+ if (eventType === 'slot') {
330
+ const slotOutputMap = eventOutputMap[eventType];
331
+ const emitter = slotOutputMap[mouseEvent.type];
332
+ if (emitter)
333
+ emitter.emit(event);
334
+ }
335
+ }
336
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
337
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerService, providedIn: 'root' }); }
338
+ }
339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerService, decorators: [{
340
+ type: Injectable,
341
+ args: [{
342
+ providedIn: 'root', // Provide service application-wide
343
+ }]
344
+ }] });
345
+
346
+ class AXSchedulerDayViewComponent extends MXBaseComponent {
347
+ constructor() {
348
+ super(...arguments);
349
+ this.schedulerCalcService = inject(AXSchedulerService);
350
+ this.GAP_WIDTH_PX = 1;
351
+ this.draggable = input(true);
352
+ this.calendar = input();
353
+ this.endHour = input.required();
354
+ this.date = input.required();
355
+ this.startHour = input.required();
356
+ this.appointments = input([]);
357
+ this.allDayAppointments = computed(() => this.appointments()?.filter((e) => e && e.allDay) ?? []);
358
+ this.singleDayAppointments = computed(() => this.appointments()?.filter((e) => e && e.singleDay && !e.allDay) ?? []);
359
+ // Internal outputs to be caught by parent AXSchedulerComponent
360
+ this.slotClickedInternal = output();
361
+ this.slotDblClickedInternal = output();
362
+ this.slotRightClickedInternal = output();
363
+ this.appointmentClickedInternal = output();
364
+ this.appointmentDblClickedInternal = output();
365
+ this.appointmentRightClickedInternal = output();
366
+ // --- Event Handlers ---
367
+ this.eventOutputMap = {
368
+ slot: {
369
+ click: this.slotClickedInternal,
370
+ dblclick: this.slotDblClickedInternal,
371
+ contextmenu: this.slotRightClickedInternal,
372
+ },
373
+ appointment: {
374
+ click: this.appointmentClickedInternal,
375
+ dblclick: this.appointmentDblClickedInternal,
376
+ contextmenu: this.appointmentRightClickedInternal,
377
+ },
378
+ };
379
+ this.hoursArray = computed(() => {
380
+ let time = this.date();
381
+ if (!time)
382
+ return [];
383
+ time = time.set('hour', this.startHour()).set('minute', 0).set('second', 0);
384
+ const hours = [time];
385
+ while (time.hour < this.endHour()) {
386
+ time = time.add('hour', 1);
387
+ hours.push(time);
388
+ }
389
+ return hours;
390
+ });
391
+ this.appointmentLayouts = computed(() => {
392
+ const layouts = new Map();
393
+ const sAppointments = this.singleDayAppointments();
394
+ const viewDate = this.date(); // Get the start date for the view
395
+ const startH = this.startHour();
396
+ const endH = this.endHour();
397
+ // Add check for viewDate
398
+ if (sAppointments.length === 0 || !viewDate || typeof startH !== 'number' || typeof endH !== 'number') {
399
+ return layouts;
400
+ }
401
+ // Pass viewDate to the service method
402
+ const concurrencyInfo = this.schedulerCalcService.calculateDayViewConcurrencyInfo(sAppointments, viewDate, startH, endH);
403
+ // Sort for greedy placement
404
+ const sortedAppointments = orderBy(sAppointments, [(e) => e.startDate.date.getTime(), (e) => e.endDate.date.getTime()], ['asc', 'desc']);
405
+ // --- First Pass: Assign Columns Greedily (remains in component) ---
406
+ const columnEndTimes = new Map();
407
+ const assignedColumns = new Map(); // Store assigned col index per appointment key
408
+ for (const appointment of sortedAppointments) {
409
+ let assignedColumn = -1;
410
+ let colIdx = 0;
411
+ while (assignedColumn < 0) {
412
+ const lastAppointmentEndTimeInColumn = columnEndTimes.get(colIdx);
413
+ // Use service overlap check? (Optional, simple comparison is fine here)
414
+ if (!lastAppointmentEndTimeInColumn ||
415
+ lastAppointmentEndTimeInColumn.compare(appointment.startDate, 'minute') <= 0) {
416
+ assignedColumn = colIdx;
417
+ }
418
+ else {
419
+ colIdx++;
420
+ }
421
+ // Safety break
422
+ if (colIdx > sAppointments.length * 2 && assignedColumn < 0) {
423
+ console.warn(`DayView: Safety break assigning column 0 for appointment ${appointment.key}`);
424
+ assignedColumn = 0;
425
+ break;
426
+ }
427
+ }
428
+ assignedColumns.set(appointment.key, assignedColumn); // Store assignment
429
+ // Update end time for the assigned column
430
+ const currentEndTimeInColumn = columnEndTimes.get(assignedColumn);
431
+ if (!currentEndTimeInColumn || appointment.endDate.compare(currentEndTimeInColumn, 'minute') > 0) {
432
+ columnEndTimes.set(assignedColumn, appointment.endDate);
433
+ }
434
+ }
435
+ // --- Combine results ---
436
+ sAppointments.forEach((appointment) => {
437
+ const appointmentKey = appointment.key;
438
+ const assignedCol = assignedColumns.get(appointmentKey);
439
+ const effectiveCols = concurrencyInfo.get(appointmentKey)?.effectiveTotalColumns;
440
+ // Ensure we have both pieces of info
441
+ if (typeof assignedCol === 'number' && typeof effectiveCols === 'number') {
442
+ layouts.set(appointmentKey, {
443
+ columnIndex: assignedCol,
444
+ effectiveTotalColumns: effectiveCols,
445
+ });
446
+ }
447
+ else {
448
+ console.warn(`DayView: Missing layout info for appointment ${appointmentKey}. Assigning default.`);
449
+ // Provide a fallback default layout?
450
+ layouts.set(appointmentKey, { columnIndex: 0, effectiveTotalColumns: 1 });
451
+ }
452
+ });
453
+ return layouts;
454
+ });
455
+ }
456
+ handleAppointmentEvent(mouseEvent, appointment) {
457
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, appointment }, this.eventOutputMap, 'appointment');
458
+ }
459
+ handleSingleSlotEvent(mouseEvent, startDate, minuteIndex) {
460
+ startDate = startDate.add('minute', minuteIndex * 30);
461
+ const slotData = this.schedulerCalcService.getSlotData(startDate, 'day');
462
+ if (slotData)
463
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, slot: slotData }, this.eventOutputMap, 'slot');
464
+ }
465
+ handleAllDaySlotEvent(mouseEvent) {
466
+ const endDate = this.date().endOf('day');
467
+ const startDate = this.date().startOf('day');
468
+ const slotData = { startDate, endDate, view: 'week' };
469
+ if (slotData)
470
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, slot: slotData }, this.eventOutputMap, 'slot');
471
+ }
472
+ // --- Style Calculation Functions (depend on appointmentLayouts - no change needed) ---
473
+ getAppointmentLayout(key) {
474
+ return this.appointmentLayouts().get(key);
475
+ }
476
+ getAppointmentLeft(key) {
477
+ const layout = this.getAppointmentLayout(key);
478
+ if (layout && layout.effectiveTotalColumns > 0) {
479
+ const N = layout.effectiveTotalColumns;
480
+ const C = layout.columnIndex;
481
+ if (C === 0 || N <= 1)
482
+ return '0px';
483
+ const leftPercent = C * (100 / N);
484
+ const gapOffsetPx = C * this.GAP_WIDTH_PX;
485
+ return `calc(${leftPercent}% + ${gapOffsetPx}px)`;
486
+ }
487
+ return '0px';
488
+ }
489
+ getAppointmentWidth(key) {
490
+ const layout = this.getAppointmentLayout(key);
491
+ if (layout && layout.effectiveTotalColumns > 0) {
492
+ const N = layout.effectiveTotalColumns;
493
+ const C = layout.columnIndex;
494
+ if (N <= 0)
495
+ return '0%';
496
+ if (N === 1)
497
+ return '100%';
498
+ const widthPercent = (1 / N) * 100;
499
+ const isLastColumn = C + 1 === N;
500
+ if (!isLastColumn) {
501
+ return `calc(${widthPercent}% - ${this.GAP_WIDTH_PX}px)`;
502
+ }
503
+ else {
504
+ const cumulativeGapPx = (N - 1) * this.GAP_WIDTH_PX;
505
+ return `calc(${widthPercent}% - ${cumulativeGapPx}px)`;
506
+ }
507
+ }
508
+ return '0%';
509
+ }
510
+ getAppointmentTransform(key) {
511
+ const appointment = this.appointments().find((e) => e.key === key);
512
+ const layout = this.getAppointmentLayout(key);
513
+ if (appointment?.singleDay && layout) {
514
+ const startMinutes = appointment.startDate.hour * 60 + appointment.startDate.minute;
515
+ const startBlockOffset = startMinutes - this.startHour() * 60;
516
+ const yBlock = startBlockOffset / 30;
517
+ const translateY = `calc(var(--ax-comp-scheduler-view-blocks-height) * ${yBlock} + 1px)`;
518
+ return `translateY(${translateY})`;
519
+ }
520
+ return '';
521
+ }
522
+ getAppointmentHeight(key) {
523
+ const appointment = this.appointments().find((e) => e.key === key);
524
+ if (appointment?.singleDay) {
525
+ const durationMillis = appointment.endDate.date.getTime() - appointment.startDate.date.getTime();
526
+ const durationMinutes = Math.max(0, durationMillis / (1000 * 60));
527
+ const heightBlock = durationMinutes / 30;
528
+ const blockHeightExpr = `var(--ax-comp-scheduler-view-blocks-height)`;
529
+ return `calc(${blockHeightExpr} * ${heightBlock} - ${this.GAP_WIDTH_PX}px)`;
530
+ }
531
+ return '0px';
532
+ }
533
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerDayViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
534
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: AXSchedulerDayViewComponent, isStandalone: true, selector: "ax-scheduler-day-view", inputs: { draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, endHour: { classPropertyName: "endHour", publicName: "endHour", isSignal: true, isRequired: true, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: true, transformFunction: null }, startHour: { classPropertyName: "startHour", publicName: "startHour", isSignal: true, isRequired: true, transformFunction: null }, appointments: { classPropertyName: "appointments", publicName: "appointments", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { slotClickedInternal: "slotClickedInternal", slotDblClickedInternal: "slotDblClickedInternal", slotRightClickedInternal: "slotRightClickedInternal", appointmentClickedInternal: "appointmentClickedInternal", appointmentDblClickedInternal: "appointmentDblClickedInternal", appointmentRightClickedInternal: "appointmentRightClickedInternal" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-scheduler-day-header\">\n <table class=\"ax-scheduler-day-header-table\" aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n <tr>\n {{\n 'dateTime.duration.all-day' | translate | async\n }}\n </tr>\n </tbody>\n </table>\n <div\n class=\"ax-scheduler-day-header-table-container\"\n (click)=\"handleAllDaySlotEvent($event)\"\n (dblclick)=\"handleAllDaySlotEvent($event)\"\n (contextmenu)=\"handleAllDaySlotEvent($event)\"\n >\n <div class=\"ax-scheduler-day-header-appointment-container\">\n @if (allDayAppointments().length) {\n <div\n (click)=\"handleAppointmentEvent($event, allDayAppointments()[0])\"\n (dblclick)=\"handleAppointmentEvent($event, allDayAppointments()[0])\"\n (contextmenu)=\"handleAppointmentEvent($event, allDayAppointments()[0])\"\n [class.ax-draggable]=\"draggable()\"\n [title]=\"allDayAppointments()[0].title\"\n class=\"ax-scheduler-header-day-appointment\"\n [style.color]=\"allDayAppointments()[0].textColor\"\n [style.background-color]=\"allDayAppointments()[0].backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ allDayAppointments()[0].title }}</ax-title>\n </div>\n }\n @if (allDayAppointments().length > 1) {\n <div\n #moreAppointments\n class=\"ax-scheduler-day-header-more-tag\"\n [style.color]=\"allDayAppointments()[1].textColor\"\n [style.background-color]=\"allDayAppointments()[1].backgroundColor\"\n >\n {{ 'more-items' | translate: { params: { number: allDayAppointments().length - 1 } } | async }}\n </div>\n <ax-popover [target]=\"moreAppointments\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n @for (appointment of allDayAppointments(); track appointment.key; let first = $first) {\n @if (!first) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n </div>\n }\n }\n </div>\n </ax-popover>\n }\n </div>\n </div>\n</div>\n\n<div class=\"ax-scheduler-day-time-container\">\n <table class=\"ax-scheduler-day-time\" aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n @for (time of hoursArray(); track time.date.getTime()) {\n <tr>\n {{\n time | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async\n }}\n </tr>\n }\n </tbody>\n </table>\n <div class=\"ax-scheduler-day-table-container\">\n <div class=\"ax-scheduler-day-appointment-container\">\n @for (appointment of singleDayAppointments(); track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-day-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.width]=\"getAppointmentWidth(appointment.key)\"\n [style.height]=\"getAppointmentHeight(appointment.key)\"\n [style.background-color]=\"appointment.backgroundColor\"\n [style.transform]=\"getAppointmentTransform(appointment.key)\"\n [style.inset-inline-start]=\"getAppointmentLeft(appointment.key)\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n <ax-subtitle>\n {{ appointment.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }} -\n {{ appointment.endDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </ax-subtitle>\n </div>\n }\n </div>\n <table aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n @for (time of hoursArray(); track time.date.getTime()) {\n <tr\n (click)=\"handleSingleSlotEvent($event, time, 0)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, 0)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, 0)\"\n ></tr>\n <tr\n (click)=\"handleSingleSlotEvent($event, time, 1)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, 1)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, 1)\"\n ></tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
535
+ }
536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerDayViewComponent, decorators: [{
537
+ type: Component,
538
+ args: [{ selector: 'ax-scheduler-day-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDecoratorGenericComponent, AsyncPipe, AXTranslatorPipe, AXPopoverComponent, AXFormatPipe], template: "<div class=\"ax-scheduler-day-header\">\n <table class=\"ax-scheduler-day-header-table\" aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n <tr>\n {{\n 'dateTime.duration.all-day' | translate | async\n }}\n </tr>\n </tbody>\n </table>\n <div\n class=\"ax-scheduler-day-header-table-container\"\n (click)=\"handleAllDaySlotEvent($event)\"\n (dblclick)=\"handleAllDaySlotEvent($event)\"\n (contextmenu)=\"handleAllDaySlotEvent($event)\"\n >\n <div class=\"ax-scheduler-day-header-appointment-container\">\n @if (allDayAppointments().length) {\n <div\n (click)=\"handleAppointmentEvent($event, allDayAppointments()[0])\"\n (dblclick)=\"handleAppointmentEvent($event, allDayAppointments()[0])\"\n (contextmenu)=\"handleAppointmentEvent($event, allDayAppointments()[0])\"\n [class.ax-draggable]=\"draggable()\"\n [title]=\"allDayAppointments()[0].title\"\n class=\"ax-scheduler-header-day-appointment\"\n [style.color]=\"allDayAppointments()[0].textColor\"\n [style.background-color]=\"allDayAppointments()[0].backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ allDayAppointments()[0].title }}</ax-title>\n </div>\n }\n @if (allDayAppointments().length > 1) {\n <div\n #moreAppointments\n class=\"ax-scheduler-day-header-more-tag\"\n [style.color]=\"allDayAppointments()[1].textColor\"\n [style.background-color]=\"allDayAppointments()[1].backgroundColor\"\n >\n {{ 'more-items' | translate: { params: { number: allDayAppointments().length - 1 } } | async }}\n </div>\n <ax-popover [target]=\"moreAppointments\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n @for (appointment of allDayAppointments(); track appointment.key; let first = $first) {\n @if (!first) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n </div>\n }\n }\n </div>\n </ax-popover>\n }\n </div>\n </div>\n</div>\n\n<div class=\"ax-scheduler-day-time-container\">\n <table class=\"ax-scheduler-day-time\" aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n @for (time of hoursArray(); track time.date.getTime()) {\n <tr>\n {{\n time | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async\n }}\n </tr>\n }\n </tbody>\n </table>\n <div class=\"ax-scheduler-day-table-container\">\n <div class=\"ax-scheduler-day-appointment-container\">\n @for (appointment of singleDayAppointments(); track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-day-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.width]=\"getAppointmentWidth(appointment.key)\"\n [style.height]=\"getAppointmentHeight(appointment.key)\"\n [style.background-color]=\"appointment.backgroundColor\"\n [style.transform]=\"getAppointmentTransform(appointment.key)\"\n [style.inset-inline-start]=\"getAppointmentLeft(appointment.key)\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n <ax-subtitle>\n {{ appointment.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }} -\n {{ appointment.endDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </ax-subtitle>\n </div>\n }\n </div>\n <table aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n @for (time of hoursArray(); track time.date.getTime()) {\n <tr\n (click)=\"handleSingleSlotEvent($event, time, 0)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, 0)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, 0)\"\n ></tr>\n <tr\n (click)=\"handleSingleSlotEvent($event, time, 1)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, 1)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, 1)\"\n ></tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n" }]
539
+ }] });
540
+
541
+ class AXSchedulerMonthViewComponent extends MXBaseComponent {
542
+ constructor() {
543
+ super(...arguments);
544
+ this.formatService = inject(AXFormatService);
545
+ this.calendarService = inject(AXCalendarService);
546
+ this.schedulerCalcService = inject(AXSchedulerService);
547
+ // --- Inputs ---
548
+ this.draggable = input(true);
549
+ this.calendar = input();
550
+ this.date = input.required(); // A date within the target month
551
+ this.appointments = input([]);
552
+ this.firstDayOfWeek = input('Saturday'); // Match scheduler component default
553
+ // --- Constants ---
554
+ this.MAX_VISIBLE_APPOINTMENTS_PER_DAY = 2;
555
+ this.DAYS_IN_WEEK = 7;
556
+ // Internal outputs to be caught by parent AXSchedulerComponent
557
+ this.slotClickedInternal = output();
558
+ this.slotDblClickedInternal = output();
559
+ this.slotRightClickedInternal = output();
560
+ this.appointmentClickedInternal = output();
561
+ this.appointmentDblClickedInternal = output();
562
+ this.appointmentRightClickedInternal = output();
563
+ // --- Event Handlers ---
564
+ this.eventOutputMap = {
565
+ slot: {
566
+ click: this.slotClickedInternal,
567
+ dblclick: this.slotDblClickedInternal,
568
+ contextmenu: this.slotRightClickedInternal,
61
569
  },
62
- isToday: c.dayOfYear == this.date.dayOfYear,
63
- }));
570
+ appointment: {
571
+ click: this.appointmentClickedInternal,
572
+ dblclick: this.appointmentDblClickedInternal,
573
+ contextmenu: this.appointmentRightClickedInternal,
574
+ },
575
+ };
576
+ // --- Base Computeds ---
577
+ // Calculate the start of the month based on the input date
578
+ this.monthStartDate = computed(() => {
579
+ const d = this.date();
580
+ return d ? d.startOf('month') : null;
581
+ });
582
+ // Generate the list of weekday names based on the firstDayOfWeek
583
+ this.daysArray = computed(() => {
584
+ const firstDayNum = this.schedulerCalcService.getDayOfWeekNumber(this.firstDayOfWeek());
585
+ const dayNames = [];
586
+ const currentDate = this.date();
587
+ const currentDayOfWeek = currentDate.dayOfWeek;
588
+ const desiredFirstDayName = this.firstDayOfWeek();
589
+ const desiredFirstDayNumber = this.schedulerCalcService.getDayOfWeekNumber(desiredFirstDayName);
590
+ const daysToSubtract = (currentDayOfWeek - desiredFirstDayNumber + 7) % 7;
591
+ let date = currentDate.add('day', -daysToSubtract);
592
+ date = date.add('day', firstDayNum - 1);
593
+ for (let i = 0; i < 7; i++) {
594
+ dayNames.push(date);
595
+ date = date.add('day', 1);
596
+ }
597
+ return dayNames;
598
+ });
599
+ // --- Calendar Grid Calculation ---
600
+ this.calendarDaysInfo = computed(() => {
601
+ const monthStart = this.monthStartDate();
602
+ if (!monthStart)
603
+ return { days: [], weeksNeeded: 0 }; // Return object
604
+ const firstDayOfMonth = monthStart;
605
+ const lastDayOfMonth = monthStart.endOf('month');
606
+ const daysInMonth = lastDayOfMonth.dayOfMonth; // Get number of days in the month
607
+ const firstDayGridNum = this.schedulerCalcService.getDayOfWeekNumber(this.firstDayOfWeek());
608
+ const firstDisplayedDayOfWeek = firstDayOfMonth.dayOfWeek;
609
+ const leadingDays = (firstDisplayedDayOfWeek - firstDayGridNum + this.DAYS_IN_WEEK) % this.DAYS_IN_WEEK;
610
+ const firstDayOfGrid = firstDayOfMonth.add('day', -leadingDays);
611
+ // Calculate total cells needed (leading days + days in month)
612
+ const totalCells = leadingDays + daysInMonth;
613
+ // Calculate weeks needed (round up)
614
+ const weeksNeeded = Math.ceil(totalCells / this.DAYS_IN_WEEK);
615
+ // Ensure a minimum of 4 and maximum of 6 weeks for reasonable display, adjust if needed
616
+ const actualWeeksToShow = Math.max(4, Math.min(weeksNeeded, 6));
617
+ const totalDaysToGenerate = actualWeeksToShow * this.DAYS_IN_WEEK;
618
+ const days = [];
619
+ const today = this.calendarService.create(new Date());
620
+ let currentDay = firstDayOfGrid;
621
+ for (let i = 0; i < totalDaysToGenerate; i++) {
622
+ days.push({
623
+ date: currentDay,
624
+ isCurrentMonth: currentDay.monthOfYear === monthStart.monthOfYear,
625
+ isToday: currentDay.equal(today, 'day'),
626
+ appointments: [],
627
+ visibleAppointments: [],
628
+ hiddenAppointments: [],
629
+ overflowCount: 0,
630
+ });
631
+ currentDay = currentDay.add('day', 1);
632
+ }
633
+ // Return both days array and weeks needed
634
+ return { days: days, weeksNeeded: actualWeeksToShow };
635
+ });
636
+ // --- Appointment Grouping ---
637
+ this.appointmentsGroupedByDay = computed(() => {
638
+ const { days } = this.calendarDaysInfo(); // Destructure to get days array
639
+ if (days.length === 0)
640
+ return new Map();
641
+ const viewStartDate = days[0].date;
642
+ const viewEndDate = days[days.length - 1].date;
643
+ const relevantAppointments = this.appointments();
644
+ return this.schedulerCalcService.groupAppointmentsByDay(relevantAppointments, viewStartDate, viewEndDate);
645
+ });
646
+ // --- Day Cell Layout Calculation ---
647
+ this.dayCellLayouts = computed(() => {
648
+ // Get initial day info (date, isCurrentMonth, isToday)
649
+ const { days: initialDaysInfo } = this.calendarDaysInfo();
650
+ // Get appointments grouped by YYYY-MM-DD string
651
+ const groupedAppointments = this.appointmentsGroupedByDay();
652
+ return initialDaysInfo.map((dayInfo) => {
653
+ const dateString = this.formatService.format(dayInfo.date, 'datetime', {
654
+ format: 'YYYY-MM-DD',
655
+ calendar: this.calendar(),
656
+ });
657
+ const appointmentsForDay = groupedAppointments.get(dateString) ?? [];
658
+ // Sort appointments (all-day first, then by time)
659
+ const sortedAppointments = orderBy(appointmentsForDay, [(e) => (e.allDay ? 0 : 1), (e) => e.startDate.date.getTime()], ['asc', 'asc']);
660
+ // Determine visible and hidden appointments
661
+ const visibleAppointments = sortedAppointments.slice(0, this.MAX_VISIBLE_APPOINTMENTS_PER_DAY);
662
+ const hiddenAppointments = sortedAppointments.slice(this.MAX_VISIBLE_APPOINTMENTS_PER_DAY); // Get the actual hidden ones
663
+ const overflowCount = hiddenAppointments.length; // Count is simply the length
664
+ return {
665
+ ...dayInfo, // Keep date, isCurrentMonth, isToday
666
+ appointments: sortedAppointments, // Store all sorted appointments
667
+ visibleAppointments: visibleAppointments,
668
+ hiddenAppointments: hiddenAppointments, // **** STORE HIDDEN APPOINTMENTS ****
669
+ overflowCount: overflowCount,
670
+ };
671
+ });
672
+ });
673
+ // --- Dynamic Grid Rows ---
674
+ this.gridTemplateRowsStyle = computed(() => {
675
+ const { weeksNeeded } = this.calendarDaysInfo();
676
+ if (!weeksNeeded || weeksNeeded <= 0) {
677
+ return `repeat(6, minmax(5rem, 1fr))`; // Default fallback
678
+ }
679
+ // Use the calculated number of weeks
680
+ return `repeat(${weeksNeeded}, minmax(5rem, 1fr))`;
681
+ });
682
+ }
683
+ handleAppointmentEvent(mouseEvent, appointment) {
684
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, appointment }, this.eventOutputMap, 'appointment');
685
+ }
686
+ handleSlotEvent(mouseEvent, date) {
687
+ const slotData = this.schedulerCalcService.getSlotData(date, 'month');
688
+ if (slotData) {
689
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, slot: slotData }, this.eventOutputMap, 'slot');
690
+ }
64
691
  }
65
692
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerMonthViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
66
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AXSchedulerMonthViewComponent, isStandalone: true, selector: "ax-scheduler-month-view", inputs: { date: "date" }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"ax-flex ax-flex-col ax-flex-auto ax-shadow-md\"> -->\n<div class=\"ax-grid ax-w-full ax-grid-cols-7 ax-gap-[1px] ax-border-b ax-bg-secondary-200\">\n <ng-container *ngFor=\"let item of dayNames\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-bg-white ax-py-2 ax-font-medium\">\n {{ item }}\n </div>\n </ng-container>\n</div>\n<div class=\"ax-flex ax-flex-auto ax-bg-secondary-200\">\n <div class=\"ax-grid ax-w-full ax-grid-cols-7 ax-gap-[1px]\">\n <ng-container *ngFor=\"let item of _slots\">\n <div\n class=\"ax-flex ax-cursor-pointer ax-flex-col ax-justify-between ax-bg-white ax-px-3 ax-py-2 hover:ax-bg-secondary-100\"\n [ngClass]=\"item.cssClass\"\n >\n <time\n class=\"ax-flex ax-h-6 ax-w-6 ax-items-center ax-justify-center ax-rounded-full ax-text-sm\"\n [class.ax-bg-primary-500]=\"item.isToday\"\n [class.ax-text-white]=\"item.isToday\"\n datetime=\"item.date.format('dd')\"\n >{{ item.date.format('d') }}</time\n >\n <ol class=\"ax-mt-2 ax-hidden ax-flex-col ax-gap-1 lg:ax-flex\">\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <a\n href=\"#\"\n class=\"ax-text-primary-fore ax-flex ax-justify-between ax-rounded ax-bg-primary-500 ax-px-2 ax-py-1 ax-text-sm\"\n >\n <p class=\"ax-text-sm\">Launch Time</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{ item.date.format('hh A') }}\n </time>\n </a>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <a\n href=\"#\"\n class=\"ax-text-success-fore ax-flex ax-justify-between ax-rounded ax-bg-success-500 ax-px-2 ax-py-1 ax-text-sm\"\n >\n <p class=\"ax-text-sm\">Daily meeting</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{ item.date.format('hh A') }}\n </time>\n </a>\n </li>\n </ol>\n <ol class=\"ax-flex ax-gap-1 ax-self-center md:ax-hidden\">\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-primary-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-danger-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 8 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-warning-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 3 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-success-500 lg:ax-hidden\"></span>\n </li>\n </ol>\n </div>\n </ng-container>\n </div>\n</div>\n<!-- </div> -->\n<div class=\"ax-p-4 lg:ax-hidden\">\n <ol class=\"ax-flex ax-cursor-pointer ax-flex-col ax-divide-y ax-overflow-hidden ax-rounded-lg ax-border\">\n <li class=\"mobile-task ax-flex ax-items-start ax-justify-between ax-p-4 hover:ax-bg-secondary-100\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <p class=\"ax-font-medium\">Daily Meeting at the Office</p>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-clock ax-text-secondary-400\"></ax-icon>\n <p class=\"ax-text-sm\">3 PM</p>\n </div>\n </div>\n <ax-button text=\"Edit\" class=\"! ax-border ax-opacity-0 ax-sm\"></ax-button>\n </li>\n </ol>\n</div>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
693
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: AXSchedulerMonthViewComponent, isStandalone: true, selector: "ax-scheduler-month-view", inputs: { draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: true, transformFunction: null }, appointments: { classPropertyName: "appointments", publicName: "appointments", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { slotClickedInternal: "slotClickedInternal", slotDblClickedInternal: "slotDblClickedInternal", slotRightClickedInternal: "slotRightClickedInternal", appointmentClickedInternal: "appointmentClickedInternal", appointmentDblClickedInternal: "appointmentDblClickedInternal", appointmentRightClickedInternal: "appointmentRightClickedInternal" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-scheduler-month-container\">\n <!-- Weekday Header -->\n <div class=\"ax-scheduler-month-weekdays\">\n <!-- Use daysArray for header, assuming it provides correct names/order -->\n @for (day of daysArray(); track day.date.getTime()) {\n <div class=\"ax-scheduler-month-weekday\">\n {{ day | format: 'date' : { format: 'dddd', calendar: calendar() } | async }}\n </div>\n }\n </div>\n\n <!-- Calendar Grid - Add dynamic style -->\n <div class=\"ax-scheduler-month-grid\" [style.gridTemplateRows]=\"gridTemplateRowsStyle()\">\n <!-- Iterate over the final layout data -->\n @for (dayCell of dayCellLayouts(); track dayCell.date.date.getTime()) {\n <div\n (click)=\"handleSlotEvent($event, dayCell.date)\"\n (dblclick)=\"handleSlotEvent($event, dayCell.date)\"\n (contextmenu)=\"handleSlotEvent($event, dayCell.date)\"\n [class.ax-today]=\"dayCell.isToday\"\n class=\"ax-scheduler-month-day-cell\"\n [class.ax-other-month]=\"!dayCell.isCurrentMonth\"\n >\n <div class=\"ax-scheduler-month-day-header\">\n <span class=\"ax-scheduler-month-day-number\">{{ dayCell.date.dayOfMonth }}</span>\n </div>\n <div class=\"ax-scheduler-month-day-appointments\">\n <!-- Visible Appointment Chips -->\n @for (appointment of dayCell.visibleAppointments; track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n [style.color]=\"appointment.textColor\"\n class=\"ax-scheduler-month-appointment-chip\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <!-- Optionally show time for non-all-day appointments -->\n <!-- @if (!appointment.allDay) {\n <span class=\"ax-appointment-chip-time\">\n {{ appointment.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </span>\n } -->\n <span class=\"ax-appointment-chip-title ax-scheduler-truncate\">{{ appointment.title }}</span>\n </div>\n }\n @if (dayCell.overflowCount > 0) {\n <div #moreAppointments class=\"ax-scheduler-month-overflow-badge\">\n +{{ 'more-items' | translate: { params: { number: dayCell.overflowCount } } | async }}\n </div>\n <ax-popover [target]=\"moreAppointments\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane ax-scheduler-month-popover-appointment\">\n @for (appointment of dayCell.hiddenAppointments; track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <span class=\"ax-appointment-chip-title ax-scheduler-truncate\">{{ appointment.title }}</span>\n </div>\n }\n </div>\n </ax-popover>\n }\n </div>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
67
694
  }
68
695
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerMonthViewComponent, decorators: [{
69
696
  type: Component,
70
- args: [{ selector: 'ax-scheduler-month-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgFor, NgClass, NgIf, AXDecoratorIconComponent, AXButtonComponent], template: "<!-- <div class=\"ax-flex ax-flex-col ax-flex-auto ax-shadow-md\"> -->\n<div class=\"ax-grid ax-w-full ax-grid-cols-7 ax-gap-[1px] ax-border-b ax-bg-secondary-200\">\n <ng-container *ngFor=\"let item of dayNames\">\n <div class=\"ax-flex ax-items-center ax-justify-center ax-bg-white ax-py-2 ax-font-medium\">\n {{ item }}\n </div>\n </ng-container>\n</div>\n<div class=\"ax-flex ax-flex-auto ax-bg-secondary-200\">\n <div class=\"ax-grid ax-w-full ax-grid-cols-7 ax-gap-[1px]\">\n <ng-container *ngFor=\"let item of _slots\">\n <div\n class=\"ax-flex ax-cursor-pointer ax-flex-col ax-justify-between ax-bg-white ax-px-3 ax-py-2 hover:ax-bg-secondary-100\"\n [ngClass]=\"item.cssClass\"\n >\n <time\n class=\"ax-flex ax-h-6 ax-w-6 ax-items-center ax-justify-center ax-rounded-full ax-text-sm\"\n [class.ax-bg-primary-500]=\"item.isToday\"\n [class.ax-text-white]=\"item.isToday\"\n datetime=\"item.date.format('dd')\"\n >{{ item.date.format('d') }}</time\n >\n <ol class=\"ax-mt-2 ax-hidden ax-flex-col ax-gap-1 lg:ax-flex\">\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <a\n href=\"#\"\n class=\"ax-text-primary-fore ax-flex ax-justify-between ax-rounded ax-bg-primary-500 ax-px-2 ax-py-1 ax-text-sm\"\n >\n <p class=\"ax-text-sm\">Launch Time</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{ item.date.format('hh A') }}\n </time>\n </a>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <a\n href=\"#\"\n class=\"ax-text-success-fore ax-flex ax-justify-between ax-rounded ax-bg-success-500 ax-px-2 ax-py-1 ax-text-sm\"\n >\n <p class=\"ax-text-sm\">Daily meeting</p>\n <time class=\"ax-ms-3\" datetime=\"item.date.format('HH A')\">\n {{ item.date.format('hh A') }}\n </time>\n </a>\n </li>\n </ol>\n <ol class=\"ax-flex ax-gap-1 ax-self-center md:ax-hidden\">\n <li *ngIf=\"item.date.dayOfMonth % 5 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-primary-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 6 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-danger-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 8 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-warning-500 lg:ax-hidden\"></span>\n </li>\n <li *ngIf=\"item.date.dayOfMonth % 3 === 0\">\n <span class=\"ax-flex ax-h-1.5 ax-w-1.5 ax-rounded-full ax-bg-success-500 lg:ax-hidden\"></span>\n </li>\n </ol>\n </div>\n </ng-container>\n </div>\n</div>\n<!-- </div> -->\n<div class=\"ax-p-4 lg:ax-hidden\">\n <ol class=\"ax-flex ax-cursor-pointer ax-flex-col ax-divide-y ax-overflow-hidden ax-rounded-lg ax-border\">\n <li class=\"mobile-task ax-flex ax-items-start ax-justify-between ax-p-4 hover:ax-bg-secondary-100\">\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <p class=\"ax-font-medium\">Daily Meeting at the Office</p>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-clock ax-text-secondary-400\"></ax-icon>\n <p class=\"ax-text-sm\">3 PM</p>\n </div>\n </div>\n <ax-button text=\"Edit\" class=\"! ax-border ax-opacity-0 ax-sm\"></ax-button>\n </li>\n </ol>\n</div>\n" }]
71
- }], propDecorators: { date: [{
72
- type: Input
73
- }] } });
697
+ args: [{ selector: 'ax-scheduler-month-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AsyncPipe, AXTranslatorPipe, AXPopoverComponent, AXFormatPipe, AsyncPipe], template: "<div class=\"ax-scheduler-month-container\">\n <!-- Weekday Header -->\n <div class=\"ax-scheduler-month-weekdays\">\n <!-- Use daysArray for header, assuming it provides correct names/order -->\n @for (day of daysArray(); track day.date.getTime()) {\n <div class=\"ax-scheduler-month-weekday\">\n {{ day | format: 'date' : { format: 'dddd', calendar: calendar() } | async }}\n </div>\n }\n </div>\n\n <!-- Calendar Grid - Add dynamic style -->\n <div class=\"ax-scheduler-month-grid\" [style.gridTemplateRows]=\"gridTemplateRowsStyle()\">\n <!-- Iterate over the final layout data -->\n @for (dayCell of dayCellLayouts(); track dayCell.date.date.getTime()) {\n <div\n (click)=\"handleSlotEvent($event, dayCell.date)\"\n (dblclick)=\"handleSlotEvent($event, dayCell.date)\"\n (contextmenu)=\"handleSlotEvent($event, dayCell.date)\"\n [class.ax-today]=\"dayCell.isToday\"\n class=\"ax-scheduler-month-day-cell\"\n [class.ax-other-month]=\"!dayCell.isCurrentMonth\"\n >\n <div class=\"ax-scheduler-month-day-header\">\n <span class=\"ax-scheduler-month-day-number\">{{ dayCell.date.dayOfMonth }}</span>\n </div>\n <div class=\"ax-scheduler-month-day-appointments\">\n <!-- Visible Appointment Chips -->\n @for (appointment of dayCell.visibleAppointments; track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n [style.color]=\"appointment.textColor\"\n class=\"ax-scheduler-month-appointment-chip\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <!-- Optionally show time for non-all-day appointments -->\n <!-- @if (!appointment.allDay) {\n <span class=\"ax-appointment-chip-time\">\n {{ appointment.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </span>\n } -->\n <span class=\"ax-appointment-chip-title ax-scheduler-truncate\">{{ appointment.title }}</span>\n </div>\n }\n @if (dayCell.overflowCount > 0) {\n <div #moreAppointments class=\"ax-scheduler-month-overflow-badge\">\n +{{ 'more-items' | translate: { params: { number: dayCell.overflowCount } } | async }}\n </div>\n <ax-popover [target]=\"moreAppointments\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane ax-scheduler-month-popover-appointment\">\n @for (appointment of dayCell.hiddenAppointments; track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <span class=\"ax-appointment-chip-title ax-scheduler-truncate\">{{ appointment.title }}</span>\n </div>\n }\n </div>\n </ax-popover>\n }\n </div>\n </div>\n }\n </div>\n</div>\n" }]
698
+ }] });
74
699
 
75
- /**
76
- * @category
77
- * This component renders the weekly view for the scheduler.
78
- */
79
700
  class AXSchedulerWeekViewComponent extends MXBaseComponent {
701
+ constructor() {
702
+ super(...arguments);
703
+ this.schedulerCalcService = inject(AXSchedulerService);
704
+ this.GAP_WIDTH_PX = 1;
705
+ this.draggable = input(true);
706
+ this.calendar = input();
707
+ this.endHour = input.required();
708
+ this.date = input.required();
709
+ this.startHour = input.required();
710
+ this.appointments = input([]);
711
+ // Internal outputs to be caught by parent AXSchedulerComponent
712
+ this.slotClickedInternal = output();
713
+ this.slotDblClickedInternal = output();
714
+ this.slotRightClickedInternal = output();
715
+ this.appointmentClickedInternal = output();
716
+ this.appointmentDblClickedInternal = output();
717
+ this.appointmentRightClickedInternal = output();
718
+ // --- Event Handlers ---
719
+ this.eventOutputMap = {
720
+ slot: {
721
+ click: this.slotClickedInternal,
722
+ dblclick: this.slotDblClickedInternal,
723
+ contextmenu: this.slotRightClickedInternal,
724
+ },
725
+ appointment: {
726
+ click: this.appointmentClickedInternal,
727
+ dblclick: this.appointmentDblClickedInternal,
728
+ contextmenu: this.appointmentRightClickedInternal,
729
+ },
730
+ };
731
+ this.allDayAppointments = computed(() => this.appointments()?.filter((e) => e && e.allDay) ?? []);
732
+ this.singleDayAppointments = computed(() => this.appointments()?.filter((e) => e && e.singleDay && !e.allDay) ?? []);
733
+ this.hoursArray = computed(() => {
734
+ let time = this.date();
735
+ if (!time)
736
+ return [];
737
+ time = time.set('hour', this.startHour()).set('minute', 0).set('second', 0);
738
+ const hours = [time];
739
+ while (time.hour < this.endHour()) {
740
+ time = time.add('hour', 1);
741
+ hours.push(time);
742
+ }
743
+ return hours;
744
+ });
745
+ this.daysArray = computed(() => {
746
+ const time = this.date();
747
+ if (!time)
748
+ return [];
749
+ const days = [time];
750
+ for (let index = 1; index <= 6; index++) {
751
+ days.push(time.add('day', index));
752
+ }
753
+ return days;
754
+ });
755
+ this.totalBlocksPerViewDay = computed(() => {
756
+ const startH = this.startHour();
757
+ const endH = this.endHour();
758
+ if (typeof startH !== 'number' || typeof endH !== 'number')
759
+ return 0;
760
+ return Math.max(0, (endH - startH) * (60 / 30));
761
+ });
762
+ this.appointmentsByStartBlock = computed(() => {
763
+ const viewDate = this.date();
764
+ const startH = this.startHour();
765
+ const endH = this.endHour();
766
+ if (!viewDate || typeof startH !== 'number' || typeof endH !== 'number')
767
+ return {};
768
+ return this.schedulerCalcService.calculateWeekViewAppointmentsByStartBlock(this.singleDayAppointments(), viewDate, startH, endH);
769
+ });
770
+ this.activeAppointmentsInBlock = computed(() => {
771
+ const viewDate = this.date();
772
+ const startH = this.startHour();
773
+ const endH = this.endHour();
774
+ if (!viewDate || typeof startH !== 'number' || typeof endH !== 'number')
775
+ return {};
776
+ return this.schedulerCalcService.calculateActiveAppointmentsInBlock(this.singleDayAppointments(), viewDate, startH, endH, 7);
777
+ });
778
+ this.visibleAppointmentsLayout = computed(() => {
779
+ const layouts = [];
780
+ const startingBlocks = this.appointmentsByStartBlock();
781
+ const daysCount = 7;
782
+ const totalBlocksPerDay = this.totalBlocksPerViewDay();
783
+ const blockHeightExpr = `var(--ax-comp-scheduler-view-blocks-height, 30px)`;
784
+ const N = daysCount;
785
+ const occupiedBlocks = {};
786
+ for (let dayIndex = 0; dayIndex < daysCount; dayIndex++) {
787
+ const dayBlocks = startingBlocks[dayIndex] ?? {};
788
+ for (let blockIndex = 0; blockIndex < totalBlocksPerDay; blockIndex++) {
789
+ if (occupiedBlocks[dayIndex]?.[blockIndex])
790
+ continue;
791
+ const startingAppointments = dayBlocks[blockIndex] ?? [];
792
+ if (startingAppointments.length > 0) {
793
+ const appointmentToShow = orderBy(startingAppointments, [(e) => e.endDate.date.getTime()], ['desc'])[0];
794
+ const C = dayIndex;
795
+ let layoutLeft = '0px';
796
+ if (C > 0 && N > 1)
797
+ layoutLeft = `calc(${C * (100 / N)}%)`;
798
+ const layoutTop = `calc(${blockHeightExpr} * ${blockIndex})`;
799
+ let layoutHeight = '0px';
800
+ let appointmentDurationMinutes = 0;
801
+ if (appointmentToShow.endDate && appointmentToShow.startDate) {
802
+ appointmentDurationMinutes = this.schedulerCalcService.calculateDurationInMinutes(appointmentToShow);
803
+ if (appointmentDurationMinutes > 0) {
804
+ const heightBlock = appointmentDurationMinutes / 30;
805
+ layoutHeight = `max(0px, calc(${blockHeightExpr} * ${heightBlock} - ${this.GAP_WIDTH_PX}px))`;
806
+ }
807
+ }
808
+ layouts.push({ ...appointmentToShow, layoutTop, layoutLeft, layoutHeight });
809
+ const blocksToOccupy = Math.ceil(appointmentDurationMinutes / 30);
810
+ for (let i = 0; i < blocksToOccupy; i++) {
811
+ const occupiedBlockIndex = blockIndex + i;
812
+ if (occupiedBlockIndex < totalBlocksPerDay) {
813
+ if (!occupiedBlocks[dayIndex])
814
+ occupiedBlocks[dayIndex] = {};
815
+ if (!occupiedBlocks[dayIndex][occupiedBlockIndex]) {
816
+ occupiedBlocks[dayIndex][occupiedBlockIndex] = appointmentToShow.key;
817
+ }
818
+ }
819
+ else {
820
+ break;
821
+ }
822
+ }
823
+ }
824
+ }
825
+ }
826
+ return layouts;
827
+ });
828
+ this.visualOccupancyMap = computed(() => {
829
+ const map = new Map();
830
+ const visibleLayouts = this.visibleAppointmentsLayout();
831
+ const viewStartDate = this.date();
832
+ const startH = this.startHour();
833
+ const endH = this.endHour();
834
+ const totalBlocksPerDay = this.totalBlocksPerViewDay();
835
+ if (!viewStartDate || typeof startH !== 'number' || typeof endH !== 'number')
836
+ return map;
837
+ for (const appointmentLayout of visibleLayouts) {
838
+ const startInfo = this.schedulerCalcService.getBlockIdentifier(appointmentLayout.startDate, viewStartDate, startH, endH, 7);
839
+ if (!startInfo)
840
+ continue;
841
+ const durationMinutes = this.schedulerCalcService.calculateDurationInMinutes(appointmentLayout);
842
+ const blocksToOccupy = Math.ceil(durationMinutes / 30);
843
+ for (let i = 0; i < blocksToOccupy; i++) {
844
+ const occupiedBlockIndex = startInfo.blockIndex + i;
845
+ if (occupiedBlockIndex >= 0 && occupiedBlockIndex < totalBlocksPerDay) {
846
+ const mapKey = `${startInfo.dayIndex}-${occupiedBlockIndex}`;
847
+ if (!map.has(mapKey)) {
848
+ map.set(mapKey, appointmentLayout.key);
849
+ }
850
+ }
851
+ else {
852
+ break;
853
+ }
854
+ }
855
+ }
856
+ return map;
857
+ });
858
+ this.overflowBadges = computed(() => {
859
+ const badges = [];
860
+ const activeBlocks = this.activeAppointmentsInBlock();
861
+ const occupancyMap = this.visualOccupancyMap();
862
+ const daysCount = 7;
863
+ const totalBlocksPerDay = this.totalBlocksPerViewDay();
864
+ const blockHeightExpr = `var(--ax-comp-scheduler-view-blocks-height, 30px)`;
865
+ const N = daysCount;
866
+ if (!activeBlocks || !occupancyMap || totalBlocksPerDay === 0)
867
+ return badges;
868
+ const countedHiddenAppointmentKeysToday = new Map();
869
+ for (let dayIndex = 0; dayIndex < daysCount; dayIndex++) {
870
+ countedHiddenAppointmentKeysToday.set(dayIndex, new Set());
871
+ for (let blockIndex = 0; blockIndex < totalBlocksPerDay; blockIndex++) {
872
+ const blockMapKey = `${dayIndex}-${blockIndex}`;
873
+ const activeAppointments = activeBlocks[dayIndex]?.[blockIndex] ?? [];
874
+ if (activeAppointments.length === 0)
875
+ continue;
876
+ const visibleAppointmentKey = occupancyMap.get(blockMapKey);
877
+ const hiddenAppointments = activeAppointments.filter((appointment) => appointment.key !== visibleAppointmentKey);
878
+ const newlyHidden = hiddenAppointments.filter((e) => !countedHiddenAppointmentKeysToday.get(dayIndex).has(e.key));
879
+ if (newlyHidden.length > 0) {
880
+ const C = dayIndex;
881
+ let baseColLeft = '0px';
882
+ if (C > 0 && N > 1)
883
+ baseColLeft = `calc(${C * (100 / N)}%)`;
884
+ const baseTop = `calc(${blockHeightExpr} * ${blockIndex})`;
885
+ const badgeLeft = `calc(${baseColLeft} + calc(100% / ${N} - 1.75rem))`;
886
+ const badgeTop = `calc(${baseTop} + 0.75rem)`;
887
+ badges.push({ key: blockMapKey, count: newlyHidden.length, badgeTop, badgeLeft });
888
+ newlyHidden.forEach((e) => countedHiddenAppointmentKeysToday.get(dayIndex).add(e.key));
889
+ }
890
+ }
891
+ }
892
+ return badges;
893
+ });
894
+ this.allDayAppointmentsPerDay = computed(() => {
895
+ const days = this.daysArray();
896
+ const allDayAppointments = this.allDayAppointments(); // Use renamed type if needed
897
+ const result = [];
898
+ if (days.length !== 7)
899
+ return result; // Should always be 7 for week view
900
+ days.forEach((day) => {
901
+ const dayStart = day.startOf('day');
902
+ const dayEnd = day.endOf('day');
903
+ const appointmentsForThisDay = []; // Use renamed type
904
+ allDayAppointments.forEach((appointment) => {
905
+ // Check if the appointment overlaps with the current day
906
+ if (appointment.startDate.compare(dayEnd) <= 0 && appointment.endDate.compare(dayStart) >= 0) {
907
+ appointmentsForThisDay.push(appointment);
908
+ }
909
+ });
910
+ // Sort appointments for this day
911
+ appointmentsForThisDay.sort((a, b) => a.startDate.date.getTime() - b.startDate.date.getTime());
912
+ result.push({
913
+ day: day, // Include the AXDateTime object for the day
914
+ appointments: appointmentsForThisDay,
915
+ });
916
+ });
917
+ return result;
918
+ });
919
+ this.overflowBadgesWithData = computed(() => {
920
+ const badgesInfo = [];
921
+ const activeBlocks = this.activeAppointmentsInBlock();
922
+ const occupancyMap = this.visualOccupancyMap();
923
+ const daysCount = 7;
924
+ const totalBlocksPerDay = this.totalBlocksPerViewDay();
925
+ const blockHeightExpr = `var(--ax-comp-scheduler-view-blocks-height, 30px)`;
926
+ const N = daysCount;
927
+ if (!activeBlocks || !occupancyMap || totalBlocksPerDay === 0)
928
+ return badgesInfo;
929
+ const countedHiddenAppointmentKeysToday = new Map();
930
+ for (let dayIndex = 0; dayIndex < daysCount; dayIndex++) {
931
+ countedHiddenAppointmentKeysToday.set(dayIndex, new Set());
932
+ for (let blockIndex = 0; blockIndex < totalBlocksPerDay; blockIndex++) {
933
+ const blockMapKey = `${dayIndex}-${blockIndex}`;
934
+ const activeAppointments = activeBlocks[dayIndex]?.[blockIndex] ?? [];
935
+ if (activeAppointments.length === 0)
936
+ continue;
937
+ const visibleAppointmentKey = occupancyMap.get(blockMapKey);
938
+ // Find all hidden appointments for this specific block
939
+ const hiddenAppointments = activeAppointments.filter((appointment) => appointment.key !== visibleAppointmentKey);
940
+ // Find which of those hidden ones haven't been counted today yet
941
+ const newlyHidden = hiddenAppointments.filter((e) => !countedHiddenAppointmentKeysToday.get(dayIndex).has(e.key));
942
+ if (newlyHidden.length > 0) {
943
+ const C = dayIndex;
944
+ let baseColLeft = '0px';
945
+ if (C > 0 && N > 1)
946
+ baseColLeft = `calc(${C * (100 / N)}%)`;
947
+ const baseTop = `calc(${blockHeightExpr} * ${blockIndex})`;
948
+ // Keep your positioning logic for the badge itself
949
+ const badgeLeft = `calc(${baseColLeft} + calc(100% / ${N} - 1.75rem))`;
950
+ const badgeTop = `calc(${baseTop} + 0.75rem)`;
951
+ // Store the badge info *and* the list of appointments it represents
952
+ badgesInfo.push({
953
+ key: blockMapKey,
954
+ count: newlyHidden.length,
955
+ badgeTop,
956
+ badgeLeft,
957
+ hiddenAppointments: newlyHidden, // Store the actual hidden appointments
958
+ });
959
+ // Mark these as counted for today
960
+ newlyHidden.forEach((e) => countedHiddenAppointmentKeysToday.get(dayIndex).add(e.key));
961
+ }
962
+ }
963
+ }
964
+ // Sort the badges by top then left for consistent rendering order? (Optional)
965
+ // badgesInfo.sort((a, b) => {
966
+ // const topCompare = a.badgeTop.localeCompare(b.badgeTop);
967
+ // if (topCompare !== 0) return topCompare;
968
+ // return a.badgeLeft.localeCompare(b.badgeLeft);
969
+ // });
970
+ return badgesInfo;
971
+ });
972
+ }
973
+ handleAppointmentEvent(mouseEvent, appointment) {
974
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, appointment }, this.eventOutputMap, 'appointment');
975
+ }
976
+ handleSingleSlotEvent(mouseEvent, hour, day, minuteIndex) {
977
+ const startDate = day.set('hour', hour.hour).set('minute', minuteIndex * 30);
978
+ const slotData = this.schedulerCalcService.getSlotData(startDate, 'week');
979
+ if (slotData)
980
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, slot: slotData }, this.eventOutputMap, 'slot');
981
+ }
982
+ handleAllDaySlotEvent(mouseEvent, day) {
983
+ const startDate = day.startOf('day');
984
+ const endDate = day.endOf('day');
985
+ const slotData = { startDate, endDate, view: 'week' };
986
+ if (slotData)
987
+ this.schedulerCalcService.handleEvent({ event: mouseEvent, slot: slotData }, this.eventOutputMap, 'slot');
988
+ }
80
989
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerWeekViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
81
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AXSchedulerWeekViewComponent, isStandalone: true, selector: "ax-scheduler-week-view", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-flex-col ax-flex-auto ax-isolate ax-overflow-auto ax-bg-white\">\n <div class=\"ax-flex ax-flex-col ax-max-w-full\">\n <div class=\"ax-shadow-md ax-pr-8 ax-z-30 ax-sticky ax-top-0\">\n <div class=\"ax-grid ax-leading-6 ax-border-r ax-grid-cols-7\">\n <div class=\"ax-w-14 ax-col-end-1\"></div>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-l ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium\">\n Mon 10\n </div>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-auto\">\n <div class=\"ax-w-14 ax-z-10 ax-sticky ax-left-0 ax-bg-white ax-shadow\"></div>\n <div class=\"ax-grid ax-flex-auto ax-grid-cols-1 ax-grid-rows-1\">\n <div class=\"ax-grid ax-col-start-1 ax-col-end-2 ax-row-start-1\"\n style=\"grid-template-rows: repeat(45, minmax(3.5rem, 1fr))\">\n <div class=\"ax-row-end-1 ax-h-7\"></div>\n <div class=\"ax-border-t ax-border-b\">\n <div class=\"ax-leading-5 ax-text-right ax-w-14 -ax-mt-[0.625rem] -ax-ml-14 ax-sticky ax-left-0\">\n </div>\n </div>\n </div>\n <div class=\"ax-grid ax-grid-rows-1 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-1\">\n <div class=\"ax-col-start-1 ax-row-start-1 ax-row-end-[-1]\"></div>\n <div class=\"ax-col-start-2 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-3 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-4 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-5 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-6 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-7 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-8 ax-row-start-1 ax-row-end-[-1] ax-border-l ax-w-8\"></div>\n </div>\n <ol class=\"ax-grid ax-pr-8 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-2\"\n style=\"grid-template-rows: 1.75rem repeat(288, minmax(0px, 1fr)) auto\"></ol>\n </div>\n </div>\n </div>\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
990
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: AXSchedulerWeekViewComponent, isStandalone: true, selector: "ax-scheduler-week-view", inputs: { draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, endHour: { classPropertyName: "endHour", publicName: "endHour", isSignal: true, isRequired: true, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: true, transformFunction: null }, startHour: { classPropertyName: "startHour", publicName: "startHour", isSignal: true, isRequired: true, transformFunction: null }, appointments: { classPropertyName: "appointments", publicName: "appointments", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { slotClickedInternal: "slotClickedInternal", slotDblClickedInternal: "slotDblClickedInternal", slotRightClickedInternal: "slotRightClickedInternal", appointmentClickedInternal: "appointmentClickedInternal", appointmentDblClickedInternal: "appointmentDblClickedInternal", appointmentRightClickedInternal: "appointmentRightClickedInternal" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-scheduler-week-header\">\n <div class=\"ax-scheduler-week-header-days\">\n <div class=\"ax-scheduler-week-header-table\"></div>\n <div class=\"ax-scheduler-week-header-date\" aria-hidden=\"true\">\n @for (day of daysArray(); track day.date.getTime()) {\n <div>{{ day | format: 'date' : { format: 'ddd DD', calendar: calendar() } | async }}</div>\n }\n </div>\n </div>\n <div class=\"ax-scheduler-week-header-days\">\n <div class=\"ax-scheduler-week-header-table\">{{ 'dateTime.duration.all-day' | translate | async }}</div>\n <div aria-hidden=\"true\" class=\"ax-scheduler-week-header-date\">\n @for (slotData of allDayAppointmentsPerDay(); track slotData.day.date.getTime()) {\n <div\n class=\"ax-scheduler-all-day-slot\"\n (click)=\"handleAllDaySlotEvent($event, slotData.day)\"\n (dblclick)=\"handleAllDaySlotEvent($event, slotData.day)\"\n (contextmenu)=\"handleAllDaySlotEvent($event, slotData.day)\"\n >\n @if (slotData.appointments.length > 0) {\n <div\n (click)=\"handleAppointmentEvent($event, slotData.appointments[0])\"\n (dblclick)=\"handleAppointmentEvent($event, slotData.appointments[0])\"\n (contextmenu)=\"handleAppointmentEvent($event, slotData.appointments[0])\"\n [title]=\"slotData.appointments[0].title\"\n class=\"ax-scheduler-header-week-appointment\"\n [style.color]=\"slotData.appointments[0].textColor\"\n [style.background-color]=\"slotData.appointments[0].backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ slotData.appointments[0].title }}</ax-title>\n </div>\n }\n @if (slotData.appointments.length > 1) {\n <div #moreAppointments class=\"ax-scheduler-appointment-badge\">+{{ slotData.appointments.length - 1 }}</div>\n <ax-popover [target]=\"moreAppointments\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n @for (appointment of slotData.appointments; track appointment.key; let first = $first) {\n @if (!first) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n </div>\n }\n }\n </div>\n </ax-popover>\n }\n </div>\n }\n </div>\n </div>\n</div>\n\n<div class=\"ax-scheduler-week-time-container\">\n <div class=\"ax-scheduler-week-time\" aria-hidden=\"true\">\n @for (time of hoursArray(); track time.date.getTime()) {\n <div>\n {{ time | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </div>\n }\n </div>\n\n <div class=\"ax-scheduler-week-table-container\">\n <div class=\"ax-scheduler-week-appointment-container\">\n @for (appointmentLayout of visibleAppointmentsLayout(); track appointmentLayout.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointmentLayout)\"\n (dblclick)=\"handleAppointmentEvent($event, appointmentLayout)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointmentLayout)\"\n [title]=\"appointmentLayout.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-week-appointment\"\n [style.top]=\"appointmentLayout.layoutTop\"\n [style.left]=\"appointmentLayout.layoutLeft\"\n [style.color]=\"appointmentLayout.textColor\"\n [style.height]=\"appointmentLayout.layoutHeight\"\n [style.background-color]=\"appointmentLayout.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointmentLayout.title }}</ax-title>\n <ax-subtitle>\n {{ appointmentLayout.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }} -\n {{ appointmentLayout.endDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </ax-subtitle>\n </div>\n }\n\n <!-- Overflow Badges with Popovers -->\n @for (badge of overflowBadgesWithData(); track badge.key) {\n <!-- Wrap badge and popover for targeting -->\n <div\n class=\"ax-scheduler-badge-wrapper\"\n style=\"position: absolute\"\n [style.top]=\"badge.badgeTop\"\n [style.left]=\"badge.badgeLeft\"\n >\n <!-- The Badge itself -->\n <div #actionButton class=\"ax-scheduler-appointment-badge\">+{{ badge.count }}</div>\n <!-- The Popover -->\n <ax-popover [target]=\"actionButton\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n @for (appointment of badge.hiddenAppointments; track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n <ax-subtitle>\n {{ appointment.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }} -\n {{ appointment.endDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </ax-subtitle>\n </div>\n }\n </div>\n </ax-popover>\n </div>\n }\n </div>\n\n <table aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n @for (time of hoursArray(); track time.date.getTime()) {\n <tr>\n @for (day of daysArray(); track day.date.getTime()) {\n <td\n (click)=\"handleSingleSlotEvent($event, time, day, 0)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, day, 0)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, day, 0)\"\n ></td>\n }\n </tr>\n <tr>\n @for (day of daysArray(); track day.date.getTime()) {\n <td\n (click)=\"handleSingleSlotEvent($event, time, day, 1)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, day, 1)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, day, 1)\"\n ></td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
82
991
  }
83
992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerWeekViewComponent, decorators: [{
84
993
  type: Component,
85
- args: [{ selector: 'ax-scheduler-week-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-flex ax-flex-col ax-flex-auto ax-isolate ax-overflow-auto ax-bg-white\">\n <div class=\"ax-flex ax-flex-col ax-max-w-full\">\n <div class=\"ax-shadow-md ax-pr-8 ax-z-30 ax-sticky ax-top-0\">\n <div class=\"ax-grid ax-leading-6 ax-border-r ax-grid-cols-7\">\n <div class=\"ax-w-14 ax-col-end-1\"></div>\n <div\n class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-l ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium ax-border-r\">\n Mon 10\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-3 ax-bg-white ax-font-medium\">\n Mon 10\n </div>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-auto\">\n <div class=\"ax-w-14 ax-z-10 ax-sticky ax-left-0 ax-bg-white ax-shadow\"></div>\n <div class=\"ax-grid ax-flex-auto ax-grid-cols-1 ax-grid-rows-1\">\n <div class=\"ax-grid ax-col-start-1 ax-col-end-2 ax-row-start-1\"\n style=\"grid-template-rows: repeat(45, minmax(3.5rem, 1fr))\">\n <div class=\"ax-row-end-1 ax-h-7\"></div>\n <div class=\"ax-border-t ax-border-b\">\n <div class=\"ax-leading-5 ax-text-right ax-w-14 -ax-mt-[0.625rem] -ax-ml-14 ax-sticky ax-left-0\">\n </div>\n </div>\n </div>\n <div class=\"ax-grid ax-grid-rows-1 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-1\">\n <div class=\"ax-col-start-1 ax-row-start-1 ax-row-end-[-1]\"></div>\n <div class=\"ax-col-start-2 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-3 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-4 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-5 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-6 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-7 ax-row-start-1 ax-row-end-[-1] ax-border-l\"></div>\n <div class=\"ax-col-start-8 ax-row-start-1 ax-row-end-[-1] ax-border-l ax-w-8\"></div>\n </div>\n <ol class=\"ax-grid ax-pr-8 ax-grid-cols-7 ax-row-start-1 ax-col-end-2 ax-col-start-2\"\n style=\"grid-template-rows: 1.75rem repeat(288, minmax(0px, 1fr)) auto\"></ol>\n </div>\n </div>\n </div>\n</div>" }]
994
+ args: [{ selector: 'ax-scheduler-week-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDecoratorGenericComponent, AsyncPipe, AXTranslatorPipe, AXPopoverComponent, AXFormatPipe], template: "<div class=\"ax-scheduler-week-header\">\n <div class=\"ax-scheduler-week-header-days\">\n <div class=\"ax-scheduler-week-header-table\"></div>\n <div class=\"ax-scheduler-week-header-date\" aria-hidden=\"true\">\n @for (day of daysArray(); track day.date.getTime()) {\n <div>{{ day | format: 'date' : { format: 'ddd DD', calendar: calendar() } | async }}</div>\n }\n </div>\n </div>\n <div class=\"ax-scheduler-week-header-days\">\n <div class=\"ax-scheduler-week-header-table\">{{ 'dateTime.duration.all-day' | translate | async }}</div>\n <div aria-hidden=\"true\" class=\"ax-scheduler-week-header-date\">\n @for (slotData of allDayAppointmentsPerDay(); track slotData.day.date.getTime()) {\n <div\n class=\"ax-scheduler-all-day-slot\"\n (click)=\"handleAllDaySlotEvent($event, slotData.day)\"\n (dblclick)=\"handleAllDaySlotEvent($event, slotData.day)\"\n (contextmenu)=\"handleAllDaySlotEvent($event, slotData.day)\"\n >\n @if (slotData.appointments.length > 0) {\n <div\n (click)=\"handleAppointmentEvent($event, slotData.appointments[0])\"\n (dblclick)=\"handleAppointmentEvent($event, slotData.appointments[0])\"\n (contextmenu)=\"handleAppointmentEvent($event, slotData.appointments[0])\"\n [title]=\"slotData.appointments[0].title\"\n class=\"ax-scheduler-header-week-appointment\"\n [style.color]=\"slotData.appointments[0].textColor\"\n [style.background-color]=\"slotData.appointments[0].backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ slotData.appointments[0].title }}</ax-title>\n </div>\n }\n @if (slotData.appointments.length > 1) {\n <div #moreAppointments class=\"ax-scheduler-appointment-badge\">+{{ slotData.appointments.length - 1 }}</div>\n <ax-popover [target]=\"moreAppointments\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n @for (appointment of slotData.appointments; track appointment.key; let first = $first) {\n @if (!first) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n </div>\n }\n }\n </div>\n </ax-popover>\n }\n </div>\n }\n </div>\n </div>\n</div>\n\n<div class=\"ax-scheduler-week-time-container\">\n <div class=\"ax-scheduler-week-time\" aria-hidden=\"true\">\n @for (time of hoursArray(); track time.date.getTime()) {\n <div>\n {{ time | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </div>\n }\n </div>\n\n <div class=\"ax-scheduler-week-table-container\">\n <div class=\"ax-scheduler-week-appointment-container\">\n @for (appointmentLayout of visibleAppointmentsLayout(); track appointmentLayout.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointmentLayout)\"\n (dblclick)=\"handleAppointmentEvent($event, appointmentLayout)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointmentLayout)\"\n [title]=\"appointmentLayout.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-week-appointment\"\n [style.top]=\"appointmentLayout.layoutTop\"\n [style.left]=\"appointmentLayout.layoutLeft\"\n [style.color]=\"appointmentLayout.textColor\"\n [style.height]=\"appointmentLayout.layoutHeight\"\n [style.background-color]=\"appointmentLayout.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointmentLayout.title }}</ax-title>\n <ax-subtitle>\n {{ appointmentLayout.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }} -\n {{ appointmentLayout.endDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </ax-subtitle>\n </div>\n }\n\n <!-- Overflow Badges with Popovers -->\n @for (badge of overflowBadgesWithData(); track badge.key) {\n <!-- Wrap badge and popover for targeting -->\n <div\n class=\"ax-scheduler-badge-wrapper\"\n style=\"position: absolute\"\n [style.top]=\"badge.badgeTop\"\n [style.left]=\"badge.badgeLeft\"\n >\n <!-- The Badge itself -->\n <div #actionButton class=\"ax-scheduler-appointment-badge\">+{{ badge.count }}</div>\n <!-- The Popover -->\n <ax-popover [target]=\"actionButton\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane\">\n @for (appointment of badge.hiddenAppointments; track appointment.key) {\n <div\n (click)=\"handleAppointmentEvent($event, appointment)\"\n (dblclick)=\"handleAppointmentEvent($event, appointment)\"\n (contextmenu)=\"handleAppointmentEvent($event, appointment)\"\n [title]=\"appointment.title\"\n [class.ax-draggable]=\"draggable()\"\n class=\"ax-scheduler-popover-appointment\"\n [style.color]=\"appointment.textColor\"\n [style.background-color]=\"appointment.backgroundColor\"\n >\n <ax-title class=\"ax-scheduler-truncate\">{{ appointment.title }}</ax-title>\n <ax-subtitle>\n {{ appointment.startDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }} -\n {{ appointment.endDate | format: 'time' : { format: 'HH:mm', calendar: calendar() } | async }}\n </ax-subtitle>\n </div>\n }\n </div>\n </ax-popover>\n </div>\n }\n </div>\n\n <table aria-hidden=\"true\" [border]=\"1\">\n <tbody>\n @for (time of hoursArray(); track time.date.getTime()) {\n <tr>\n @for (day of daysArray(); track day.date.getTime()) {\n <td\n (click)=\"handleSingleSlotEvent($event, time, day, 0)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, day, 0)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, day, 0)\"\n ></td>\n }\n </tr>\n <tr>\n @for (day of daysArray(); track day.date.getTime()) {\n <td\n (click)=\"handleSingleSlotEvent($event, time, day, 1)\"\n (dblclick)=\"handleSingleSlotEvent($event, time, day, 1)\"\n (contextmenu)=\"handleSingleSlotEvent($event, time, day, 1)\"\n ></td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n</div>\n" }]
995
+ }] });
996
+
997
+ const COMPONENT = [
998
+ AXSchedulerComponent,
999
+ AXSchedulerDayViewComponent,
1000
+ AXSchedulerWeekViewComponent,
1001
+ AXSchedulerMonthViewComponent,
1002
+ ];
1003
+ class AXSchedulerModule {
1004
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1005
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, imports: [AXSchedulerComponent,
1006
+ AXSchedulerDayViewComponent,
1007
+ AXSchedulerWeekViewComponent,
1008
+ AXSchedulerMonthViewComponent], exports: [AXSchedulerComponent,
1009
+ AXSchedulerDayViewComponent,
1010
+ AXSchedulerWeekViewComponent,
1011
+ AXSchedulerMonthViewComponent] }); }
1012
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, imports: [COMPONENT] }); }
1013
+ }
1014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, decorators: [{
1015
+ type: NgModule,
1016
+ args: [{
1017
+ imports: [...COMPONENT],
1018
+ exports: [...COMPONENT],
1019
+ providers: [],
1020
+ }]
86
1021
  }] });
87
1022
 
88
- /**
89
- * @category
90
- * This component provides the main scheduler functionality, integrating various views and handling scheduling operations.
91
- */
92
1023
  class AXSchedulerComponent extends MXBaseComponent {
93
1024
  constructor() {
94
1025
  super(...arguments);
95
- /** @ignore */
96
- this._calendarService = inject(AXCalendarService);
97
- /** @ignore */
98
- this._platform = inject(AXPlatform);
99
- /** @ignore */
100
- this.current = this._calendarService.now();
101
- }
102
- handleOnItemClick() { }
103
- /** @ignore */
1026
+ this.platform = inject(AXPlatform);
1027
+ this.unsubscriber = inject(AXUnsubscriber);
1028
+ this.formatService = inject(AXFormatService);
1029
+ this.localeService = inject(AXLocaleService);
1030
+ this.calendarService = inject(AXCalendarService);
1031
+ this.schedulerService = inject(AXSchedulerService);
1032
+ this.translationService = inject(AXTranslationService);
1033
+ this.viewModeSelectbox = viewChild(AXSelectBoxComponent);
1034
+ this.displayViews = {
1035
+ day: 'daily',
1036
+ week: 'weekly',
1037
+ month: 'monthly',
1038
+ year: 'yearly',
1039
+ };
1040
+ this.calendar = input();
1041
+ this.calendarType = linkedSignal(() => this.calendar() ?? this.localeService.activeProfile().calendar.system);
1042
+ this.startingDate = input();
1043
+ this.currentDate = linkedSignal(() => this.calendarService
1044
+ .create(this.startingDate(), this.calendarType())
1045
+ .set('hour', 0)
1046
+ .set('minute', 0)
1047
+ .set('second', 0));
1048
+ this.draggable = signal(false); // TODO
1049
+ this.rtl = signal(false);
1050
+ this.isLoading = signal(false);
1051
+ this.isFullScreen = signal(false);
1052
+ this.size = signal(null);
1053
+ this.viewsDataSource = signal([]);
1054
+ this.oldDate = signal(this.calendarService.create(new Date(), this.calendarType()));
1055
+ this.endHour = input(23);
1056
+ this.startHour = input(8);
1057
+ this.keyField = input('id');
1058
+ this.titleField = input('title');
1059
+ this.allDayField = input('allDay');
1060
+ this.allowFullScreen = input(true);
1061
+ this.endDateField = input('endDate');
1062
+ this.readonlyField = input('readonly');
1063
+ this.startDateField = input('startDate');
1064
+ this.textColorField = input('textColor');
1065
+ this.descriptionField = input('description');
1066
+ this.backgroundColorField = input('backgroundColor');
1067
+ this.dataSource = input();
1068
+ this.firstDayOfWeek = input('Sunday');
1069
+ this.views = input(['day', 'week', 'month']);
1070
+ this.selectedView = model(this.views()[0]);
1071
+ // --- Public Outputs ---
1072
+ this.onSlotClicked = output();
1073
+ this.onSlotDblClicked = output();
1074
+ this.onSlotRightClick = output();
1075
+ this.onAppointmentClicked = output();
1076
+ this.onAppointmentDblClicked = output();
1077
+ this.onAppointmentRightClick = output();
1078
+ this.appointmentsList = computed(() => {
1079
+ const v = this.dataSource();
1080
+ let ds;
1081
+ if (Array.isArray(v)) {
1082
+ ds = convertArrayToDataSource(v, { key: this.keyField(), pageSize: 9999 });
1083
+ }
1084
+ else {
1085
+ ds = v;
1086
+ }
1087
+ ds.refresh();
1088
+ return ds;
1089
+ });
1090
+ this.dataSourceItemsSignal = toSignal(new Observable((subscriber) => {
1091
+ const watcher = effect(() => {
1092
+ const dsInstance = this.appointmentsList();
1093
+ subscriber.next(dsInstance);
1094
+ });
1095
+ return () => {
1096
+ watcher.destroy();
1097
+ };
1098
+ }).pipe(distinctUntilChanged(), switchMap((dsInstance) => {
1099
+ if (!dsInstance)
1100
+ return of([]);
1101
+ return dsInstance.onChanged.pipe(map((event) => event.items ?? []), startWith(dsInstance.items ?? []));
1102
+ })), { initialValue: [] });
1103
+ this.#updatedDataSource = effect(() => {
1104
+ const ds = this.appointmentsList();
1105
+ untracked(() => {
1106
+ if (ds)
1107
+ ds.refresh();
1108
+ });
1109
+ });
1110
+ this.currentDateText = computed(() => {
1111
+ switch (this.selectedView()) {
1112
+ case 'day':
1113
+ return this.formatService.format(this.currentDate(), 'datetime', {
1114
+ format: 'DD MMMM yyyy',
1115
+ calendar: this.calendarType(),
1116
+ });
1117
+ case 'week': {
1118
+ const startOfWeek = this.formatService.format(this.currentDate(), 'datetime', {
1119
+ format: 'DD MMMM yyyy',
1120
+ calendar: this.calendarType(),
1121
+ });
1122
+ const endOfWeek = this.formatService.format(this.currentDate().add('week', 1).add('day', -1), 'datetime', {
1123
+ format: 'DD MMMM yyyy',
1124
+ calendar: this.calendarType(),
1125
+ });
1126
+ return `${startOfWeek} - ${endOfWeek}`;
1127
+ }
1128
+ case 'month':
1129
+ return this.formatService.format(this.currentDate(), 'datetime', {
1130
+ format: 'MMMM yyyy',
1131
+ calendar: this.calendarType(),
1132
+ });
1133
+ }
1134
+ return '';
1135
+ });
1136
+ this.calendarDepth = computed(() => {
1137
+ if (this.selectedView() === 'week')
1138
+ return 'day';
1139
+ return this.selectedView();
1140
+ });
1141
+ this.mappedAppointments = computed(() => {
1142
+ const items = this.dataSourceItemsSignal();
1143
+ const keyField = this.keyField();
1144
+ const titleField = this.titleField();
1145
+ const allDayField = this.allDayField();
1146
+ const readonlyField = this.readonlyField();
1147
+ const textColorField = this.textColorField();
1148
+ const descriptionField = this.descriptionField();
1149
+ const backgroundColorField = this.backgroundColorField();
1150
+ const startDateField = this.startDateField();
1151
+ const endDateField = this.endDateField();
1152
+ return items
1153
+ .map((item) => {
1154
+ const startDate = this.calendarService.create(item[startDateField], this.calendarType());
1155
+ const endDate = this.calendarService.create(item[endDateField], this.calendarType());
1156
+ // Basic validation
1157
+ if (!startDate?.date || !endDate?.date) {
1158
+ console.warn('Scheduler: Skipping item due to invalid date fields:', item);
1159
+ return null;
1160
+ }
1161
+ // Check if dates are valid after creation
1162
+ if (isNaN(startDate.date.getTime()) || isNaN(endDate.date.getTime())) {
1163
+ console.warn('Scheduler: Skipping item due to invalid parsed date (NaN):', item);
1164
+ return null;
1165
+ }
1166
+ // Calculate singleDay based on *calendar day*, not just time
1167
+ const isSingleDay = startDate.equal(endDate, 'day');
1168
+ const appointment = {
1169
+ key: item[keyField],
1170
+ title: item[titleField],
1171
+ startDate,
1172
+ endDate,
1173
+ allDay: !!item[allDayField], // Ensure boolean
1174
+ singleDay: isSingleDay, // Use calculated singleDay
1175
+ readonly: !!item[readonlyField],
1176
+ textColor: item[textColorField],
1177
+ description: item[descriptionField],
1178
+ backgroundColor: item[backgroundColorField],
1179
+ };
1180
+ return appointment;
1181
+ })
1182
+ .filter((appt) => appt !== null); // Filter out nulls from invalid dates
1183
+ });
1184
+ this.viewAppointments = computed(() => {
1185
+ const mapped = this.mappedAppointments();
1186
+ const view = this.selectedView();
1187
+ const current = this.currentDate();
1188
+ if (!current || mapped.length === 0)
1189
+ return [];
1190
+ switch (view) {
1191
+ case 'day': {
1192
+ const dayStart = current.startOf('day');
1193
+ const dayEnd = current.endOf('day');
1194
+ return mapped.filter((appt) => appt.endDate.compare(dayStart, 'day') >= 0 && appt.startDate.compare(dayEnd, 'day') <= 0);
1195
+ }
1196
+ case 'week': {
1197
+ const weekStart = current;
1198
+ const weekEnd = weekStart.add('day', 7);
1199
+ return mapped.filter((appt) => appt.startDate.compare(weekEnd, 'day') < 0 && appt.endDate.compare(weekStart, 'day') >= 0);
1200
+ }
1201
+ case 'month': {
1202
+ const { gridStartDate, gridEndDate } = this.getGridDateRange(current);
1203
+ const exclusiveGridEndDate = gridEndDate.add('day', 1);
1204
+ return mapped.filter((appt) => appt.startDate.compare(exclusiveGridEndDate, 'day') < 0 && appt.endDate.compare(gridStartDate, 'day') >= 0);
1205
+ }
1206
+ default:
1207
+ return [];
1208
+ }
1209
+ });
1210
+ }
1211
+ // --- Internal Handlers for View Outputs ---
1212
+ handleSlotClickInternal(eventData) {
1213
+ this.onSlotClicked.emit(eventData);
1214
+ }
1215
+ handleSlotDblClickInternal(eventData) {
1216
+ this.onSlotDblClicked.emit(eventData);
1217
+ }
1218
+ handleSlotRightClickInternal(eventData) {
1219
+ this.onSlotRightClick.emit(eventData);
1220
+ }
1221
+ handleAppointmentClickInternal(eventData) {
1222
+ this.onAppointmentClicked.emit(eventData);
1223
+ }
1224
+ handleAppointmentDblClickInternal(eventData) {
1225
+ this.onAppointmentDblClicked.emit(eventData);
1226
+ }
1227
+ handleAppointmentRightClickInternal(eventData) {
1228
+ this.onAppointmentRightClick.emit(eventData);
1229
+ }
104
1230
  ngOnInit() {
105
1231
  super.ngOnInit();
106
1232
  this.detectSize();
107
- this._platform.resize.subscribe(() => {
1233
+ this.platform.resize.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {
108
1234
  this.detectSize();
109
1235
  super.cdr.markForCheck();
110
1236
  });
1237
+ this.calendarService.calendarChanges$.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {
1238
+ this.currentDate.set(this.calendarService.create(this.currentDate().date, this.calendarType()));
1239
+ this.appointmentsList().refresh();
1240
+ });
1241
+ this.translationService.langChanges$.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async () => {
1242
+ await this.fillDataSource();
1243
+ this.viewModeSelectbox().selectItems(this.viewsDataSource().find((c) => c.id == this.selectedView()));
1244
+ this.currentDate.set(this.calendarService.create(this.currentDate().date, this.calendarType()));
1245
+ });
1246
+ this.rtl.set(AXHtmlUtil.isRtl(this.getHostElement()));
1247
+ this.fillDataSource();
1248
+ }
1249
+ async fillDataSource() {
1250
+ const result = [];
1251
+ for await (const c of this.views()) {
1252
+ const text = await this.translationService.translateAsync(`dateTime.duration.${this.displayViews[c]}`);
1253
+ result.push({ text, id: c });
1254
+ }
1255
+ this.viewsDataSource.set(result);
111
1256
  }
112
- /** @ignore */
113
1257
  detectSize() {
114
- this._size = this._platform.screenSize;
1258
+ this.size.set(this.platform.screenSize);
1259
+ }
1260
+ getGridDateRange(dateInMonth) {
1261
+ const firstDayOfMonth = dateInMonth.startOf('month');
1262
+ const firstDayGridNum = this.schedulerService.getDayOfWeekNumber(this.firstDayOfWeek());
1263
+ const firstDisplayedDayOfWeek = firstDayOfMonth.dayOfWeek;
1264
+ const daysFromPrevMonth = (firstDisplayedDayOfWeek - firstDayGridNum + 7) % 7;
1265
+ const gridStartDate = firstDayOfMonth.add('day', -daysFromPrevMonth);
1266
+ // Calculate end date based on standard 6 weeks for safety, or calculate dynamically if preferred
1267
+ const gridEndDate = gridStartDate.add('day', 6 * 7 - 1);
1268
+ return { gridStartDate, gridEndDate };
1269
+ }
1270
+ #updatedDataSource;
1271
+ viewChanged(e) {
1272
+ const newView = e.value;
1273
+ const oldView = e.oldValue;
1274
+ this.selectedView.set(newView);
1275
+ if (oldView === 'week') {
1276
+ const oldDayOfWeek = this.oldDate().dayOfWeek % 7;
1277
+ const date = this.currentDate().add('day', oldDayOfWeek - 1);
1278
+ this.currentDate.set(date);
1279
+ }
1280
+ this.oldDate.set(this.currentDate());
1281
+ if (newView === 'week') {
1282
+ const currentDate = this.currentDate();
1283
+ const currentDayOfWeek = currentDate.dayOfWeek;
1284
+ const desiredFirstDayName = this.firstDayOfWeek();
1285
+ const desiredFirstDayNumber = this.schedulerService.getDayOfWeekNumber(desiredFirstDayName);
1286
+ const daysToSubtract = (currentDayOfWeek - desiredFirstDayNumber + 7) % 7;
1287
+ const startOfWeekDate = currentDate.add('day', -daysToSubtract);
1288
+ this.currentDate.set(startOfWeekDate);
1289
+ }
1290
+ }
1291
+ nextClick() {
1292
+ switch (this.selectedView()) {
1293
+ case 'day':
1294
+ this.currentDate.set(this.currentDate().add('day', 1));
1295
+ break;
1296
+ case 'week':
1297
+ this.currentDate.set(this.currentDate().add('week', 1));
1298
+ break;
1299
+ case 'month':
1300
+ this.currentDate.set(this.currentDate().add('month', 1));
1301
+ break;
1302
+ }
115
1303
  }
116
- /** @ignore */
117
- _handleNextClick() {
118
- this.current = this.current.add('month', 1);
1304
+ prevClick() {
1305
+ switch (this.selectedView()) {
1306
+ case 'day':
1307
+ this.currentDate.set(this.currentDate().add('day', -1));
1308
+ break;
1309
+ case 'week':
1310
+ this.currentDate.set(this.currentDate().add('week', -1));
1311
+ break;
1312
+ case 'month':
1313
+ this.currentDate.set(this.currentDate().add('month', -1));
1314
+ break;
1315
+ }
119
1316
  }
120
- /** @ignore */
121
- _handlePrevClick() {
122
- this.current = this.current.add('month', -1);
1317
+ calendarDateChanged(e) {
1318
+ let currentDate = this.calendarService.create(e, this.calendarType());
1319
+ if (this.selectedView() === 'week') {
1320
+ const currentDayOfWeek = currentDate.dayOfWeek;
1321
+ const desiredFirstDayName = this.firstDayOfWeek();
1322
+ const desiredFirstDayNumber = this.schedulerService.getDayOfWeekNumber(desiredFirstDayName);
1323
+ const daysToSubtract = (currentDayOfWeek - desiredFirstDayNumber + 7) % 7;
1324
+ currentDate = currentDate.add('day', -daysToSubtract);
1325
+ }
1326
+ this.currentDate.set(currentDate);
1327
+ }
1328
+ handleFullScreen() {
1329
+ if (!this.isFullScreen())
1330
+ this.getHostElement().classList.add('ax-full-screen-container');
1331
+ if (this.isFullScreen())
1332
+ this.getHostElement().classList.remove('ax-full-screen-container');
1333
+ this.isFullScreen.set(!this.isFullScreen());
123
1334
  }
124
1335
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
125
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AXSchedulerComponent, isStandalone: true, selector: "ax-scheduler", usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-h-full ax-flex-col\">\n <div class=\"scheduler-header\">\n <p>\n {{ current.format('MMMM yyyy') }}\n </p>\n <div class=\"scheduler-actions\">\n <div class=\"ax-flex ax-items-center ax-gap-0.5 ax-rounded-md ax-border ax-px-1\">\n <button class=\"ax-h-8 ax-w-8 ax-rounded-md hover:ax-bg-secondary-100\" (click)=\"_handlePrevClick()\">\n <ax-icon class=\"fa-solid fa-chevron-left\"> </ax-icon>\n </button>\n <ng-container *ngIf=\"_size === 'SM'; else elseTemplate\">\n <span class=\"ax-text-secondary-200\">|</span>\n </ng-container>\n <ng-template #elseTemplate>\n <ax-button look=\"blank\" class=\"ax-sm\" text=\"Today\"> </ax-button>\n </ng-template>\n <button class=\"ax-h-8 ax-w-8 ax-rounded-md hover:ax-bg-secondary-100\" (click)=\"_handleNextClick()\">\n <ax-icon class=\"fa-solid fa-chevron-right\"> </ax-icon>\n </button>\n </div>\n <ax-button [text]=\"_size === 'SM' ? '' : 'Week View'\" class=\"! ax-border\">\n <ax-suffix>\n <ax-icon\n [class]=\"\n _size === 'SM'\n ? 'fa-solid fa-ellipsis-vertical'\n : 'fa-solid fa-chevron-down ax-text-secondary-400'\n \"\n >\n </ax-icon>\n </ax-suffix>\n <ax-dropdown-panel (onItemClick)=\"handleOnItemClick()\" [adaptivityEnabled]=\"true\">\n <ax-button-item\n *ngIf=\"_size === 'SM' || _size === 'MD'\"\n text=\"Add Event\"\n name=\"text\"\n [divided]=\"true\"\n color=\"primary\"\n >\n </ax-button-item>\n <ax-button-item *ngIf=\"_size === 'SM'\" text=\"Go to Today\" name=\"text\" [divided]=\"true\">\n </ax-button-item>\n <ax-button-item text=\"Day View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Week View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Month View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Year View\" name=\"text\"> </ax-button-item>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"\"></ax-icon>\n </ax-suffix>\n </ax-button>\n <ax-button color=\"primary\" text=\"Add Event\" class=\"ax-hidden lg:ax-block\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n <ax-scheduler-month-view [date]=\"current\"></ax-scheduler-month-view>\n <!-- <ax-scheduler-week-view></ax-scheduler-week-view> -->\n</div>\n", styles: ["ax-scheduler{height:100%;display:block;border-width:1px;border-radius:.75rem;background-color:rgba(var(--ax-sys-color-secondary-100));overflow:hidden}ax-scheduler .scheduler-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom-width:1px}ax-scheduler .scheduler-header p{margin:0;font-size:1rem;font-weight:500}ax-scheduler .scheduler-actions{display:flex;gap:.75rem}ax-scheduler ax-scheduler-month-view{display:flex;flex-direction:column;flex:1 1 auto}ax-scheduler ax-scheduler-month-view .mobile-task:hover ax-button{opacity:1}\n"], dependencies: [{ kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXSchedulerMonthViewComponent, selector: "ax-scheduler-month-view", inputs: ["date"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1336
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: AXSchedulerComponent, isStandalone: true, selector: "ax-scheduler", inputs: { calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, startingDate: { classPropertyName: "startingDate", publicName: "startingDate", isSignal: true, isRequired: false, transformFunction: null }, endHour: { classPropertyName: "endHour", publicName: "endHour", isSignal: true, isRequired: false, transformFunction: null }, startHour: { classPropertyName: "startHour", publicName: "startHour", isSignal: true, isRequired: false, transformFunction: null }, keyField: { classPropertyName: "keyField", publicName: "keyField", isSignal: true, isRequired: false, transformFunction: null }, titleField: { classPropertyName: "titleField", publicName: "titleField", isSignal: true, isRequired: false, transformFunction: null }, allDayField: { classPropertyName: "allDayField", publicName: "allDayField", isSignal: true, isRequired: false, transformFunction: null }, allowFullScreen: { classPropertyName: "allowFullScreen", publicName: "allowFullScreen", isSignal: true, isRequired: false, transformFunction: null }, endDateField: { classPropertyName: "endDateField", publicName: "endDateField", isSignal: true, isRequired: false, transformFunction: null }, readonlyField: { classPropertyName: "readonlyField", publicName: "readonlyField", isSignal: true, isRequired: false, transformFunction: null }, startDateField: { classPropertyName: "startDateField", publicName: "startDateField", isSignal: true, isRequired: false, transformFunction: null }, textColorField: { classPropertyName: "textColorField", publicName: "textColorField", isSignal: true, isRequired: false, transformFunction: null }, descriptionField: { classPropertyName: "descriptionField", publicName: "descriptionField", isSignal: true, isRequired: false, transformFunction: null }, backgroundColorField: { classPropertyName: "backgroundColorField", publicName: "backgroundColorField", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, views: { classPropertyName: "views", publicName: "views", isSignal: true, isRequired: false, transformFunction: null }, selectedView: { classPropertyName: "selectedView", publicName: "selectedView", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedView: "selectedViewChange", onSlotClicked: "onSlotClicked", onSlotDblClicked: "onSlotDblClicked", onSlotRightClick: "onSlotRightClick", onAppointmentClicked: "onAppointmentClicked", onAppointmentDblClicked: "onAppointmentDblClicked", onAppointmentRightClick: "onAppointmentRightClick" }, viewQueries: [{ propertyName: "viewModeSelectbox", first: true, predicate: AXSelectBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-scheduler-container\">\n <div class=\"ax-scheduler-header\">\n <div class=\"ax-scheduler-date\">\n <ax-button look=\"link\" (onClick)=\"prevClick()\">\n <ax-icon\n class=\"ax-icon ax-text-xl\"\n [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl(),\n 'ax-icon-chevron-right': rtl(),\n }\"\n ></ax-icon>\n </ax-button>\n <ax-button look=\"blank\" [text]=\"currentDateText()\" #date></ax-button>\n <ax-button look=\"link\" (onClick)=\"nextClick()\">\n <ax-icon\n class=\"ax-icon ax-text-xl\"\n [ngClass]=\"{\n 'ax-icon-chevron-right': !rtl(),\n 'ax-icon-chevron-left': rtl(),\n }\"\n ></ax-icon>\n </ax-button>\n\n <ax-popover [target]=\"date\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane ax-scheduler-calendar-container\">\n <ax-calendar\n [depth]=\"calendarDepth()\"\n [ngModel]=\"currentDate()\"\n (ngModelChange)=\"calendarDateChanged($event)\"\n ></ax-calendar>\n </div>\n </ax-popover>\n </div>\n <div class=\"ax-scheduler-actions\">\n <ax-select-box\n [dropdownWidth]=\"100\"\n [ngModel]=\"selectedView()\"\n [dataSource]=\"viewsDataSource()\"\n (onValueChanged)=\"viewChanged($event)\"\n ></ax-select-box>\n\n @if (allowFullScreen()) {\n <ax-button look=\"blank\" (onClick)=\"handleFullScreen()\">\n <ax-icon>\n <i\n class=\"fa-solid fa-expand\"\n [ngClass]=\"{ 'fa-compress': isFullScreen(), 'fa-expand': !isFullScreen() }\"\n ></i>\n </ax-icon>\n </ax-button>\n }\n </div>\n </div>\n <div class=\"ax-scheduler-views-container\">\n @switch (selectedView()) {\n @case ('day') {\n <ax-scheduler-day-view\n [date]=\"currentDate()\"\n [endHour]=\"endHour()\"\n [startHour]=\"startHour()\"\n [draggable]=\"draggable()\"\n [calendar]=\"calendarType()\"\n [appointments]=\"viewAppointments()\"\n (slotClickedInternal)=\"handleSlotClickInternal($event)\"\n (slotDblClickedInternal)=\"handleSlotDblClickInternal($event)\"\n (slotRightClickedInternal)=\"handleSlotRightClickInternal($event)\"\n (appointmentClickedInternal)=\"handleAppointmentClickInternal($event)\"\n (appointmentDblClickedInternal)=\"handleAppointmentDblClickInternal($event)\"\n (appointmentRightClickedInternal)=\"handleAppointmentRightClickInternal($event)\"\n ></ax-scheduler-day-view>\n }\n @case ('week') {\n <ax-scheduler-week-view\n [date]=\"currentDate()\"\n [endHour]=\"endHour()\"\n [startHour]=\"startHour()\"\n [draggable]=\"draggable()\"\n [appointments]=\"viewAppointments()\"\n (slotClickedInternal)=\"handleSlotClickInternal($event)\"\n (slotDblClickedInternal)=\"handleSlotDblClickInternal($event)\"\n (slotRightClickedInternal)=\"handleSlotRightClickInternal($event)\"\n (appointmentClickedInternal)=\"handleAppointmentClickInternal($event)\"\n (appointmentDblClickedInternal)=\"handleAppointmentDblClickInternal($event)\"\n (appointmentRightClickedInternal)=\"handleAppointmentRightClickInternal($event)\"\n ></ax-scheduler-week-view>\n }\n @case ('month') {\n <ax-scheduler-month-view\n [date]=\"currentDate()\"\n [draggable]=\"draggable()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [appointments]=\"viewAppointments()\"\n (slotClickedInternal)=\"handleSlotClickInternal($event)\"\n (slotDblClickedInternal)=\"handleSlotDblClickInternal($event)\"\n (slotRightClickedInternal)=\"handleSlotRightClickInternal($event)\"\n (appointmentClickedInternal)=\"handleAppointmentClickInternal($event)\"\n (appointmentDblClickedInternal)=\"handleAppointmentDblClickInternal($event)\"\n (appointmentRightClickedInternal)=\"handleAppointmentRightClickInternal($event)\"\n ></ax-scheduler-month-view>\n }\n }\n </div>\n</div>\n", styles: ["ax-scheduler{--ax-comp-scheduler-width: 57.5rem;--ax-comp-scheduler-view-blocks-width: 3.5rem;--ax-comp-scheduler-view-blocks-height: 3rem;width:100%;height:100%;display:block;overflow:hidden;-webkit-user-select:none;user-select:none;border-width:1px;font-size:.875rem;border-radius:.75rem;background-color:inherit}ax-scheduler.ax-full-screen-container{top:0;left:0;z-index:50;width:100vw;height:100vh;position:fixed}ax-scheduler .ax-scheduler-container{height:100%;display:flex;flex-direction:column;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-header{display:flex;padding:1rem;align-items:center;border-bottom-width:1px;justify-content:space-between}ax-scheduler .ax-scheduler-container .ax-scheduler-header .ax-scheduler-date{display:flex;min-width:20.5rem;align-items:center;justify-content:space-between}ax-scheduler .ax-scheduler-container .ax-scheduler-header .ax-scheduler-date p{margin:0;font-size:1rem;min-width:10rem;font-weight:500;text-align:center}ax-scheduler .ax-scheduler-container .ax-scheduler-actions{gap:.75rem;display:flex;align-items:center;justify-content:center}ax-scheduler .ax-scheduler-container .ax-scheduler-truncate{display:block;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}ax-scheduler .ax-scheduler-container .ax-draggable{cursor:grab}ax-scheduler .ax-scheduler-container .ax-draggable:active{cursor:grabbing}ax-scheduler .ax-scheduler-container ax-subtitle{font-size:.75rem}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container{height:100%;overflow:auto;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view{display:block;position:relative;background-color:inherit;min-width:var(--ax-comp-scheduler-width)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header{top:0;z-index:2;width:100%;display:flex;position:sticky;background-color:var(--ax-comp-scheduler-all-day-bg, inherit);border-block-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table{position:sticky;inset-inline-start:0;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table tr{display:flex;align-items:center;justify-content:center;width:var(--ax-comp-scheduler-view-blocks-width);height:calc(var(--ax-comp-scheduler-view-blocks-height) / 2);border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container{width:100%;display:flex}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container .ax-scheduler-day-header-appointment-container{gap:1rem;display:flex;width:calc(100% - 2.5rem)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container .ax-scheduler-day-header-appointment-container .ax-scheduler-header-day-appointment{width:100%;cursor:pointer;overflow:hidden;padding-inline:.5rem;color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container .ax-scheduler-day-header-appointment-container .ax-scheduler-day-header-more-tag{cursor:pointer;text-wrap:nowrap;padding-inline:.5rem;border-radius:var(--ax-sys-border-radius);color:rgba(var(--ax-sys-color-on-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container{width:100%;display:flex;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-time{z-index:1;position:sticky;inset-inline-start:0;background-color:var(--ax-comp-scheduler-all-day-bg, inherit)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-time tr{display:block;text-align:center;padding-inline:.5rem;width:var(--ax-comp-scheduler-view-blocks-width);height:calc(var(--ax-comp-scheduler-view-blocks-height) * 2);border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container{width:100%;position:relative}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container .ax-scheduler-day-appointment-container{top:0;position:absolute;width:calc(100% - 2.5rem)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container .ax-scheduler-day-appointment-container .ax-scheduler-day-appointment{width:100%;display:flex;cursor:pointer;overflow:hidden;position:absolute;inset-inline-start:0;flex-direction:column;padding-block:.25rem;padding-inline:.5rem;color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container table{width:100%}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container table tr{height:var(--ax-comp-scheduler-view-blocks-height);display:block;padding-inline:.5rem;border-block-start:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container table tr:first-child{border-block-start-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view{display:block;position:relative;background-color:inherit;min-width:var(--ax-comp-scheduler-width)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-appointment-badge{display:flex;height:1.5rem;cursor:pointer;font-size:.75rem;align-items:center;border-radius:9999px;justify-content:center;width:1.5rem!important;color:rgba(var(--ax-sys-color-on-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header{top:0;z-index:2;width:100%;position:sticky;background-color:var(--ax-comp-scheduler-all-day-bg, inherit)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days{display:flex;background-color:inherit;border-block-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-table{flex-shrink:0;position:sticky;text-align:center;inset-inline-start:0;width:var(--ax-comp-scheduler-view-blocks-width);background-color:inherit;border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date{width:100%;display:flex}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date div{width:100%;text-align:center;border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date div:last-child{border-inline-end-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date .ax-scheduler-all-day-slot{gap:.25rem;display:flex;width:14.2857142857%}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date .ax-scheduler-all-day-slot .ax-scheduler-header-week-appointment{display:block;cursor:pointer;overflow:hidden;text-align:start;padding-inline:.5rem;width:calc(100% - 2rem);color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container{width:100%;display:flex;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-time{z-index:1;position:sticky;inset-inline-start:0;background-color:var(--ax-comp-scheduler-all-day-bg, inherit)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-time div{display:block;text-align:center;padding-inline:.5rem;width:var(--ax-comp-scheduler-view-blocks-width);height:calc(var(--ax-comp-scheduler-view-blocks-height) * 2);border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container{width:100%;position:relative}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container .ax-scheduler-week-appointment-container{top:0;width:100%;position:absolute}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container .ax-scheduler-week-appointment-container .ax-scheduler-week-appointment{display:flex;cursor:pointer;position:absolute;inset-inline-start:0;flex-direction:column;padding-block:.25rem;padding-inline:.5rem;width:calc(14.2857142857% - 2rem);color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table{width:100%}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr{display:flex;height:var(--ax-comp-scheduler-view-blocks-height);border-block-start:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr:first-child{border-block-start-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr td{width:100%;text-align:center;border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr td:last-child{border-inline-end-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view{height:100%;display:block;background-color:inherit;min-width:var(--ax-comp-scheduler-width)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-container{height:100%;display:flex;flex-direction:column;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-weekdays{top:0;z-index:1;width:100%;display:grid;flex-shrink:0;position:sticky;padding:.5rem 0;text-align:center;grid-template-columns:repeat(7,minmax(0,1fr));background-color:var(--ax-comp-scheduler-all-day-bg, inherit);border-bottom:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-weekdays .ax-scheduler-month-weekday{font-weight:500;font-size:.875rem}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid{width:100%;flex-grow:1;display:grid;grid-auto-rows:minmax(5rem,auto);grid-template-columns:repeat(7,minmax(0,1fr));border-left:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell{padding:.25rem;overflow:hidden;position:relative;border-right:1px solid rgba(var(--ax-sys-color-border-lightest-surface));border-bottom:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-other-month{background-color:rgba(var(--ax-sys-color-border-lightest-surface),.2)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-other-month .ax-scheduler-month-day-number{color:rgba(var(--ax-sys-color-on-surface),.5)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-today{background-color:rgba(var(--ax-sys-color-primary-surface),.1)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-today .ax-scheduler-month-day-number{font-weight:700;color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-header{text-align:center;margin-bottom:.25rem}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-header .ax-scheduler-month-day-number{font-size:.875rem;display:inline-block}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments{gap:.125rem;display:flex;overflow:hidden;flex-direction:column}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-appointment-chip{cursor:pointer;overflow:hidden;font-size:.75rem;white-space:nowrap;border-radius:.25rem;text-overflow:ellipsis;padding:.125rem .25rem;color:rgba(var(--ax-sys-color-on-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-appointment-chip.ax-draggable{cursor:grab}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-overflow-badge{cursor:pointer;text-align:left;font-size:.75rem;padding:.125rem 0;margin-top:.125rem;color:rgba(var(--ax-sys-color-primary-text))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-overflow-badge:hover{text-decoration:underline}.ax-overlay-pane{gap:.25rem;display:grid;overflow:auto;max-height:7.5rem;font-size:.875rem;flex-direction:column}.ax-overlay-pane.ax-scheduler-calendar-container{max-height:unset}.ax-overlay-pane.ax-scheduler-month-popover-appointment{font-size:.75rem}.ax-overlay-pane .ax-scheduler-popover-appointment{display:flex;cursor:pointer;overflow:hidden;-webkit-user-select:none;user-select:none;max-width:12.5rem;flex-direction:column;padding-block:.25rem;padding-inline:.5rem;color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}.ax-overlay-pane .ax-scheduler-popover-appointment ax-subtitle{font-size:.75rem}.ax-overlay-pane .ax-scheduler-popover-appointment .ax-scheduler-truncate{display:block;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSchedulerModule }, { kind: "component", type: AXSchedulerDayViewComponent, selector: "ax-scheduler-day-view", inputs: ["draggable", "calendar", "endHour", "date", "startHour", "appointments"], outputs: ["slotClickedInternal", "slotDblClickedInternal", "slotRightClickedInternal", "appointmentClickedInternal", "appointmentDblClickedInternal", "appointmentRightClickedInternal"] }, { kind: "component", type: AXSchedulerWeekViewComponent, selector: "ax-scheduler-week-view", inputs: ["draggable", "calendar", "endHour", "date", "startHour", "appointments"], outputs: ["slotClickedInternal", "slotDblClickedInternal", "slotRightClickedInternal", "appointmentClickedInternal", "appointmentDblClickedInternal", "appointmentRightClickedInternal"] }, { kind: "component", type: AXSchedulerMonthViewComponent, selector: "ax-scheduler-month-view", inputs: ["draggable", "calendar", "date", "appointments", "firstDayOfWeek"], outputs: ["slotClickedInternal", "slotDblClickedInternal", "slotRightClickedInternal", "appointmentClickedInternal", "appointmentDblClickedInternal", "appointmentRightClickedInternal"] }, { kind: "component", type: AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXCalendarComponent, selector: "ax-calendar", inputs: ["rtl", "readonly", "value", "name", "disabled", "depth", "activeView", "minValue", "maxValue", "disabledDates", "holidayDates", "type", "cellTemplate", "cellClass", "showNavigation", "count", "id"], outputs: ["onOptionChanged", "valueChange", "onValueChanged", "minValueChange", "maxValueChange", "onBlur", "onFocus", "depthChange", "typeChange", "activeViewChange", "disabledDatesChange", "holidayDatesChange", "onNavigate", "onSlotClick", "countChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
126
1337
  }
127
1338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerComponent, decorators: [{
128
1339
  type: Component,
129
1340
  args: [{ selector: 'ax-scheduler', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
1341
+ FormsModule,
1342
+ AXSchedulerModule,
1343
+ AXSelectBoxComponent,
130
1344
  AXDecoratorIconComponent,
131
- NgIf,
132
1345
  AXButtonComponent,
133
- AXDecoratorGenericComponent,
134
- AXDropdownPanelComponent,
135
- AXButtonItemComponent,
136
- AXSchedulerMonthViewComponent,
137
- ], template: "<div class=\"ax-flex ax-h-full ax-flex-col\">\n <div class=\"scheduler-header\">\n <p>\n {{ current.format('MMMM yyyy') }}\n </p>\n <div class=\"scheduler-actions\">\n <div class=\"ax-flex ax-items-center ax-gap-0.5 ax-rounded-md ax-border ax-px-1\">\n <button class=\"ax-h-8 ax-w-8 ax-rounded-md hover:ax-bg-secondary-100\" (click)=\"_handlePrevClick()\">\n <ax-icon class=\"fa-solid fa-chevron-left\"> </ax-icon>\n </button>\n <ng-container *ngIf=\"_size === 'SM'; else elseTemplate\">\n <span class=\"ax-text-secondary-200\">|</span>\n </ng-container>\n <ng-template #elseTemplate>\n <ax-button look=\"blank\" class=\"ax-sm\" text=\"Today\"> </ax-button>\n </ng-template>\n <button class=\"ax-h-8 ax-w-8 ax-rounded-md hover:ax-bg-secondary-100\" (click)=\"_handleNextClick()\">\n <ax-icon class=\"fa-solid fa-chevron-right\"> </ax-icon>\n </button>\n </div>\n <ax-button [text]=\"_size === 'SM' ? '' : 'Week View'\" class=\"! ax-border\">\n <ax-suffix>\n <ax-icon\n [class]=\"\n _size === 'SM'\n ? 'fa-solid fa-ellipsis-vertical'\n : 'fa-solid fa-chevron-down ax-text-secondary-400'\n \"\n >\n </ax-icon>\n </ax-suffix>\n <ax-dropdown-panel (onItemClick)=\"handleOnItemClick()\" [adaptivityEnabled]=\"true\">\n <ax-button-item\n *ngIf=\"_size === 'SM' || _size === 'MD'\"\n text=\"Add Event\"\n name=\"text\"\n [divided]=\"true\"\n color=\"primary\"\n >\n </ax-button-item>\n <ax-button-item *ngIf=\"_size === 'SM'\" text=\"Go to Today\" name=\"text\" [divided]=\"true\">\n </ax-button-item>\n <ax-button-item text=\"Day View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Week View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Month View\" name=\"text\"> </ax-button-item>\n <ax-button-item text=\"Year View\" name=\"text\"> </ax-button-item>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"\"></ax-icon>\n </ax-suffix>\n </ax-button>\n <ax-button color=\"primary\" text=\"Add Event\" class=\"ax-hidden lg:ax-block\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-plus\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n <ax-scheduler-month-view [date]=\"current\"></ax-scheduler-month-view>\n <!-- <ax-scheduler-week-view></ax-scheduler-week-view> -->\n</div>\n", styles: ["ax-scheduler{height:100%;display:block;border-width:1px;border-radius:.75rem;background-color:rgba(var(--ax-sys-color-secondary-100));overflow:hidden}ax-scheduler .scheduler-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom-width:1px}ax-scheduler .scheduler-header p{margin:0;font-size:1rem;font-weight:500}ax-scheduler .scheduler-actions{display:flex;gap:.75rem}ax-scheduler ax-scheduler-month-view{display:flex;flex-direction:column;flex:1 1 auto}ax-scheduler ax-scheduler-month-view .mobile-task:hover ax-button{opacity:1}\n"] }]
138
- }] });
139
-
140
- const COMPONENT = [AXSchedulerComponent, AXSchedulerMonthViewComponent, AXSchedulerWeekViewComponent];
141
- const MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXDateTimeModule];
142
- class AXSchedulerModule {
143
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
144
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXDateTimeModule, AXSchedulerComponent, AXSchedulerMonthViewComponent, AXSchedulerWeekViewComponent], exports: [AXSchedulerComponent, AXSchedulerMonthViewComponent, AXSchedulerWeekViewComponent] }); }
145
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, imports: [MODULES, AXSchedulerComponent, AXSchedulerMonthViewComponent] }); }
146
- }
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXSchedulerModule, decorators: [{
148
- type: NgModule,
149
- args: [{
150
- imports: [...MODULES, ...COMPONENT],
151
- exports: [...COMPONENT],
152
- providers: [],
153
- }]
1346
+ NgClass,
1347
+ AXPopoverComponent,
1348
+ AXCalendarComponent,
1349
+ ], template: "<div class=\"ax-scheduler-container\">\n <div class=\"ax-scheduler-header\">\n <div class=\"ax-scheduler-date\">\n <ax-button look=\"link\" (onClick)=\"prevClick()\">\n <ax-icon\n class=\"ax-icon ax-text-xl\"\n [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl(),\n 'ax-icon-chevron-right': rtl(),\n }\"\n ></ax-icon>\n </ax-button>\n <ax-button look=\"blank\" [text]=\"currentDateText()\" #date></ax-button>\n <ax-button look=\"link\" (onClick)=\"nextClick()\">\n <ax-icon\n class=\"ax-icon ax-text-xl\"\n [ngClass]=\"{\n 'ax-icon-chevron-right': !rtl(),\n 'ax-icon-chevron-left': rtl(),\n }\"\n ></ax-icon>\n </ax-button>\n\n <ax-popover [target]=\"date\" [placement]=\"'bottom'\">\n <div class=\"ax-overlay-pane ax-scheduler-calendar-container\">\n <ax-calendar\n [depth]=\"calendarDepth()\"\n [ngModel]=\"currentDate()\"\n (ngModelChange)=\"calendarDateChanged($event)\"\n ></ax-calendar>\n </div>\n </ax-popover>\n </div>\n <div class=\"ax-scheduler-actions\">\n <ax-select-box\n [dropdownWidth]=\"100\"\n [ngModel]=\"selectedView()\"\n [dataSource]=\"viewsDataSource()\"\n (onValueChanged)=\"viewChanged($event)\"\n ></ax-select-box>\n\n @if (allowFullScreen()) {\n <ax-button look=\"blank\" (onClick)=\"handleFullScreen()\">\n <ax-icon>\n <i\n class=\"fa-solid fa-expand\"\n [ngClass]=\"{ 'fa-compress': isFullScreen(), 'fa-expand': !isFullScreen() }\"\n ></i>\n </ax-icon>\n </ax-button>\n }\n </div>\n </div>\n <div class=\"ax-scheduler-views-container\">\n @switch (selectedView()) {\n @case ('day') {\n <ax-scheduler-day-view\n [date]=\"currentDate()\"\n [endHour]=\"endHour()\"\n [startHour]=\"startHour()\"\n [draggable]=\"draggable()\"\n [calendar]=\"calendarType()\"\n [appointments]=\"viewAppointments()\"\n (slotClickedInternal)=\"handleSlotClickInternal($event)\"\n (slotDblClickedInternal)=\"handleSlotDblClickInternal($event)\"\n (slotRightClickedInternal)=\"handleSlotRightClickInternal($event)\"\n (appointmentClickedInternal)=\"handleAppointmentClickInternal($event)\"\n (appointmentDblClickedInternal)=\"handleAppointmentDblClickInternal($event)\"\n (appointmentRightClickedInternal)=\"handleAppointmentRightClickInternal($event)\"\n ></ax-scheduler-day-view>\n }\n @case ('week') {\n <ax-scheduler-week-view\n [date]=\"currentDate()\"\n [endHour]=\"endHour()\"\n [startHour]=\"startHour()\"\n [draggable]=\"draggable()\"\n [appointments]=\"viewAppointments()\"\n (slotClickedInternal)=\"handleSlotClickInternal($event)\"\n (slotDblClickedInternal)=\"handleSlotDblClickInternal($event)\"\n (slotRightClickedInternal)=\"handleSlotRightClickInternal($event)\"\n (appointmentClickedInternal)=\"handleAppointmentClickInternal($event)\"\n (appointmentDblClickedInternal)=\"handleAppointmentDblClickInternal($event)\"\n (appointmentRightClickedInternal)=\"handleAppointmentRightClickInternal($event)\"\n ></ax-scheduler-week-view>\n }\n @case ('month') {\n <ax-scheduler-month-view\n [date]=\"currentDate()\"\n [draggable]=\"draggable()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [appointments]=\"viewAppointments()\"\n (slotClickedInternal)=\"handleSlotClickInternal($event)\"\n (slotDblClickedInternal)=\"handleSlotDblClickInternal($event)\"\n (slotRightClickedInternal)=\"handleSlotRightClickInternal($event)\"\n (appointmentClickedInternal)=\"handleAppointmentClickInternal($event)\"\n (appointmentDblClickedInternal)=\"handleAppointmentDblClickInternal($event)\"\n (appointmentRightClickedInternal)=\"handleAppointmentRightClickInternal($event)\"\n ></ax-scheduler-month-view>\n }\n }\n </div>\n</div>\n", styles: ["ax-scheduler{--ax-comp-scheduler-width: 57.5rem;--ax-comp-scheduler-view-blocks-width: 3.5rem;--ax-comp-scheduler-view-blocks-height: 3rem;width:100%;height:100%;display:block;overflow:hidden;-webkit-user-select:none;user-select:none;border-width:1px;font-size:.875rem;border-radius:.75rem;background-color:inherit}ax-scheduler.ax-full-screen-container{top:0;left:0;z-index:50;width:100vw;height:100vh;position:fixed}ax-scheduler .ax-scheduler-container{height:100%;display:flex;flex-direction:column;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-header{display:flex;padding:1rem;align-items:center;border-bottom-width:1px;justify-content:space-between}ax-scheduler .ax-scheduler-container .ax-scheduler-header .ax-scheduler-date{display:flex;min-width:20.5rem;align-items:center;justify-content:space-between}ax-scheduler .ax-scheduler-container .ax-scheduler-header .ax-scheduler-date p{margin:0;font-size:1rem;min-width:10rem;font-weight:500;text-align:center}ax-scheduler .ax-scheduler-container .ax-scheduler-actions{gap:.75rem;display:flex;align-items:center;justify-content:center}ax-scheduler .ax-scheduler-container .ax-scheduler-truncate{display:block;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}ax-scheduler .ax-scheduler-container .ax-draggable{cursor:grab}ax-scheduler .ax-scheduler-container .ax-draggable:active{cursor:grabbing}ax-scheduler .ax-scheduler-container ax-subtitle{font-size:.75rem}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container{height:100%;overflow:auto;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view{display:block;position:relative;background-color:inherit;min-width:var(--ax-comp-scheduler-width)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header{top:0;z-index:2;width:100%;display:flex;position:sticky;background-color:var(--ax-comp-scheduler-all-day-bg, inherit);border-block-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table{position:sticky;inset-inline-start:0;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table tr{display:flex;align-items:center;justify-content:center;width:var(--ax-comp-scheduler-view-blocks-width);height:calc(var(--ax-comp-scheduler-view-blocks-height) / 2);border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container{width:100%;display:flex}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container .ax-scheduler-day-header-appointment-container{gap:1rem;display:flex;width:calc(100% - 2.5rem)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container .ax-scheduler-day-header-appointment-container .ax-scheduler-header-day-appointment{width:100%;cursor:pointer;overflow:hidden;padding-inline:.5rem;color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-header .ax-scheduler-day-header-table-container .ax-scheduler-day-header-appointment-container .ax-scheduler-day-header-more-tag{cursor:pointer;text-wrap:nowrap;padding-inline:.5rem;border-radius:var(--ax-sys-border-radius);color:rgba(var(--ax-sys-color-on-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container{width:100%;display:flex;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-time{z-index:1;position:sticky;inset-inline-start:0;background-color:var(--ax-comp-scheduler-all-day-bg, inherit)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-time tr{display:block;text-align:center;padding-inline:.5rem;width:var(--ax-comp-scheduler-view-blocks-width);height:calc(var(--ax-comp-scheduler-view-blocks-height) * 2);border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container{width:100%;position:relative}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container .ax-scheduler-day-appointment-container{top:0;position:absolute;width:calc(100% - 2.5rem)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container .ax-scheduler-day-appointment-container .ax-scheduler-day-appointment{width:100%;display:flex;cursor:pointer;overflow:hidden;position:absolute;inset-inline-start:0;flex-direction:column;padding-block:.25rem;padding-inline:.5rem;color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container table{width:100%}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container table tr{height:var(--ax-comp-scheduler-view-blocks-height);display:block;padding-inline:.5rem;border-block-start:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-day-view .ax-scheduler-day-time-container .ax-scheduler-day-table-container table tr:first-child{border-block-start-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view{display:block;position:relative;background-color:inherit;min-width:var(--ax-comp-scheduler-width)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-appointment-badge{display:flex;height:1.5rem;cursor:pointer;font-size:.75rem;align-items:center;border-radius:9999px;justify-content:center;width:1.5rem!important;color:rgba(var(--ax-sys-color-on-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header{top:0;z-index:2;width:100%;position:sticky;background-color:var(--ax-comp-scheduler-all-day-bg, inherit)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days{display:flex;background-color:inherit;border-block-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-table{flex-shrink:0;position:sticky;text-align:center;inset-inline-start:0;width:var(--ax-comp-scheduler-view-blocks-width);background-color:inherit;border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date{width:100%;display:flex}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date div{width:100%;text-align:center;border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date div:last-child{border-inline-end-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date .ax-scheduler-all-day-slot{gap:.25rem;display:flex;width:14.2857142857%}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-header .ax-scheduler-week-header-days .ax-scheduler-week-header-date .ax-scheduler-all-day-slot .ax-scheduler-header-week-appointment{display:block;cursor:pointer;overflow:hidden;text-align:start;padding-inline:.5rem;width:calc(100% - 2rem);color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container{width:100%;display:flex;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-time{z-index:1;position:sticky;inset-inline-start:0;background-color:var(--ax-comp-scheduler-all-day-bg, inherit)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-time div{display:block;text-align:center;padding-inline:.5rem;width:var(--ax-comp-scheduler-view-blocks-width);height:calc(var(--ax-comp-scheduler-view-blocks-height) * 2);border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container{width:100%;position:relative}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container .ax-scheduler-week-appointment-container{top:0;width:100%;position:absolute}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container .ax-scheduler-week-appointment-container .ax-scheduler-week-appointment{display:flex;cursor:pointer;position:absolute;inset-inline-start:0;flex-direction:column;padding-block:.25rem;padding-inline:.5rem;width:calc(14.2857142857% - 2rem);color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table{width:100%}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr{display:flex;height:var(--ax-comp-scheduler-view-blocks-height);border-block-start:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr:first-child{border-block-start-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr td{width:100%;text-align:center;border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-week-view .ax-scheduler-week-time-container .ax-scheduler-week-table-container table tr td:last-child{border-inline-end-width:0}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view{height:100%;display:block;background-color:inherit;min-width:var(--ax-comp-scheduler-width)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-container{height:100%;display:flex;flex-direction:column;background-color:inherit}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-weekdays{top:0;z-index:1;width:100%;display:grid;flex-shrink:0;position:sticky;padding:.5rem 0;text-align:center;grid-template-columns:repeat(7,minmax(0,1fr));background-color:var(--ax-comp-scheduler-all-day-bg, inherit);border-bottom:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-weekdays .ax-scheduler-month-weekday{font-weight:500;font-size:.875rem}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid{width:100%;flex-grow:1;display:grid;grid-auto-rows:minmax(5rem,auto);grid-template-columns:repeat(7,minmax(0,1fr));border-left:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell{padding:.25rem;overflow:hidden;position:relative;border-right:1px solid rgba(var(--ax-sys-color-border-lightest-surface));border-bottom:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-other-month{background-color:rgba(var(--ax-sys-color-border-lightest-surface),.2)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-other-month .ax-scheduler-month-day-number{color:rgba(var(--ax-sys-color-on-surface),.5)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-today{background-color:rgba(var(--ax-sys-color-primary-surface),.1)}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell.ax-today .ax-scheduler-month-day-number{font-weight:700;color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-header{text-align:center;margin-bottom:.25rem}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-header .ax-scheduler-month-day-number{font-size:.875rem;display:inline-block}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments{gap:.125rem;display:flex;overflow:hidden;flex-direction:column}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-appointment-chip{cursor:pointer;overflow:hidden;font-size:.75rem;white-space:nowrap;border-radius:.25rem;text-overflow:ellipsis;padding:.125rem .25rem;color:rgba(var(--ax-sys-color-on-primary-surface));background-color:rgba(var(--ax-sys-color-primary-surface))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-appointment-chip.ax-draggable{cursor:grab}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-overflow-badge{cursor:pointer;text-align:left;font-size:.75rem;padding:.125rem 0;margin-top:.125rem;color:rgba(var(--ax-sys-color-primary-text))}ax-scheduler .ax-scheduler-container .ax-scheduler-views-container ax-scheduler-month-view .ax-scheduler-month-grid .ax-scheduler-month-day-cell .ax-scheduler-month-day-appointments .ax-scheduler-month-overflow-badge:hover{text-decoration:underline}.ax-overlay-pane{gap:.25rem;display:grid;overflow:auto;max-height:7.5rem;font-size:.875rem;flex-direction:column}.ax-overlay-pane.ax-scheduler-calendar-container{max-height:unset}.ax-overlay-pane.ax-scheduler-month-popover-appointment{font-size:.75rem}.ax-overlay-pane .ax-scheduler-popover-appointment{display:flex;cursor:pointer;overflow:hidden;-webkit-user-select:none;user-select:none;max-width:12.5rem;flex-direction:column;padding-block:.25rem;padding-inline:.5rem;color:rgba(var(--ax-sys-color-on-primary-surface));border-radius:calc(var(--ax-sys-border-radius) / 2);background-color:rgba(var(--ax-sys-color-primary-surface))}.ax-overlay-pane .ax-scheduler-popover-appointment ax-subtitle{font-size:.75rem}.ax-overlay-pane .ax-scheduler-popover-appointment .ax-scheduler-truncate{display:block;overflow:hidden;text-wrap:nowrap;text-overflow:ellipsis}\n"] }]
154
1350
  }] });
155
1351
 
156
1352
  /**
157
1353
  * Generated bundle index. Do not edit.
158
1354
  */
159
1355
 
160
- export { AXSchedulerComponent, AXSchedulerModule, AXSchedulerMonthViewComponent, AXSchedulerWeekViewComponent };
1356
+ export { AXSchedulerComponent, AXSchedulerDayViewComponent, AXSchedulerModule, AXSchedulerMonthViewComponent, AXSchedulerService, AXSchedulerWeekViewComponent };
161
1357
  //# sourceMappingURL=acorex-components-scheduler.mjs.map