@acorex/components 19.11.13-next.2 → 19.12.0-next.2

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