@progress/kendo-angular-scheduler 21.1.1-develop.2 → 21.2.0-develop.1

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 (37) hide show
  1. package/esm2022/editing/date-time-picker.component.mjs +59 -56
  2. package/esm2022/editing/edit-dialog.component.mjs +373 -359
  3. package/esm2022/editing/recurrence/recurrence-editor.component.mjs +262 -253
  4. package/esm2022/editing/recurrence/recurrence-frequency-editor.component.mjs +44 -41
  5. package/esm2022/editing/recurrence/recurrence-monthly-yearly-editor.component.mjs +190 -193
  6. package/esm2022/editing/recurrence/recurrence-weekday-rule-editor.component.mjs +44 -43
  7. package/esm2022/editing/resource-multiple-editor.component.mjs +49 -41
  8. package/esm2022/editing/resource-single-editor.component.mjs +35 -31
  9. package/esm2022/editing/timezone-editor.component.mjs +20 -17
  10. package/esm2022/package-metadata.mjs +2 -2
  11. package/esm2022/pdf/pdf-command.directive.mjs +27 -17
  12. package/esm2022/scheduler.component.mjs +631 -625
  13. package/esm2022/toolbar/toolbar.component.mjs +37 -37
  14. package/esm2022/toolbar/view-selector.component.mjs +42 -33
  15. package/esm2022/views/agenda/agenda-header-item.component.mjs +23 -19
  16. package/esm2022/views/agenda/agenda-header.component.mjs +28 -26
  17. package/esm2022/views/agenda/agenda-task-item.component.mjs +49 -29
  18. package/esm2022/views/agenda/agenda-view-list.component.mjs +117 -95
  19. package/esm2022/views/common/resize-hint.component.mjs +16 -9
  20. package/esm2022/views/common/view-footer.component.mjs +27 -25
  21. package/esm2022/views/day-time/day-time-view-item.component.mjs +125 -85
  22. package/esm2022/views/month/month-slot.component.mjs +39 -29
  23. package/esm2022/views/month/month-view-item.component.mjs +81 -61
  24. package/esm2022/views/month/month-view-renderer.component.mjs +349 -281
  25. package/esm2022/views/multi-day/day-view.component.mjs +72 -69
  26. package/esm2022/views/multi-day/multi-day-view-renderer.component.mjs +665 -515
  27. package/esm2022/views/multi-day/multi-day-view.component.mjs +76 -73
  28. package/esm2022/views/multi-day/week-view.component.mjs +78 -75
  29. package/esm2022/views/multi-day/work-week-view.component.mjs +80 -77
  30. package/esm2022/views/timeline/timeline-month-view.component.mjs +74 -71
  31. package/esm2022/views/timeline/timeline-multi-day-view.component.mjs +449 -359
  32. package/esm2022/views/timeline/timeline-view.component.mjs +68 -65
  33. package/esm2022/views/timeline/timeline-week-view.component.mjs +74 -71
  34. package/esm2022/views/year/year-view-internal.component.mjs +151 -131
  35. package/fesm2022/progress-kendo-angular-scheduler.mjs +4448 -3889
  36. package/package.json +15 -15
  37. package/schematics/ngAdd/index.js +3 -3
@@ -20,7 +20,7 @@ import { ResizeHintComponent } from '../common/resize-hint.component';
20
20
  import { FocusableDirective } from '../../navigation/focusable.directive';
21
21
  import { DayTimeViewItemComponent } from '../day-time/day-time-view-item.component';
22
22
  import { DaySlotDirective, TimeSlotDirective } from '../day-time/event-slot.directive';
23
- import { NgClass, NgFor, NgIf, NgTemplateOutlet, NgStyle, AsyncPipe } from '@angular/common';
23
+ import { NgClass, NgTemplateOutlet, NgStyle, AsyncPipe } from '@angular/common';
24
24
  import * as i0 from "@angular/core";
25
25
  import * as i1 from "@progress/kendo-angular-l10n";
26
26
  import * as i2 from "../view-context.service";
@@ -249,288 +249,363 @@ export class MultiDayViewRendererComponent extends DayTimeViewComponent {
249
249
  return index + 1 < this.timeSlots.length && !this.timeSlots[index + 1].isMajor;
250
250
  }
251
251
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiDayViewRendererComponent, deps: [{ token: i1.LocalizationService }, { token: i2.ViewContextService }, { token: i3.ViewStateService }, { token: i4.IntlService }, { token: i5.DayTimeSlotService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i6.PDFService }, { token: i7.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
252
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MultiDayViewRendererComponent, isStandalone: true, selector: "multi-day-view", inputs: { allDaySlot: "allDaySlot", name: "name", slotFill: "slotFill", allDaySlotTemplate: "allDaySlotTemplate", allDayEventTemplate: "allDayEventTemplate" }, providers: [
252
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MultiDayViewRendererComponent, isStandalone: true, selector: "multi-day-view", inputs: { allDaySlot: "allDaySlot", name: "name", slotFill: "slotFill", allDaySlotTemplate: "allDaySlotTemplate", allDayEventTemplate: "allDayEventTemplate" }, providers: [
253
253
  DayTimeSlotService
254
254
  ], viewQueries: [{ propertyName: "headerHintContainer", first: true, predicate: ["headerHintContainer"], descendants: true }, { propertyName: "dayCells", predicate: ["allDayCell"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
255
255
  <table class="k-scheduler-layout" role="presentation" [ngClass]="classNames">
256
- <tbody>
257
- <tr class="k-scheduler-head">
258
- <td>
259
- <div class="k-scheduler-times" #timesHeader>
260
- <table class="k-scheduler-table" aria-hidden="true">
261
- <tbody>
262
- <tr *ngFor="let resource of horizontalResources; trackBy: itemIndex;">
263
- <th class="k-scheduler-cell k-heading-cell"></th>
264
- </tr>
265
- <tr [style.height]="'auto'">
266
- <th class="k-scheduler-cell k-heading-cell"></th>
267
- </tr>
268
- <tr *ngIf="allDaySlot && !verticalResources.length">
269
- <th class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
270
- </tr>
271
- </tbody>
272
- </table>
273
- </div>
274
- </td>
275
- <td>
276
- <div class="k-scheduler-header" #header>
277
- <div class="k-scheduler-header-wrap" #headerWrap>
278
- <table class="k-scheduler-table" aria-hidden="true">
279
- <tbody>
280
- <tr *ngFor="let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex;">
281
- <th *ngFor="let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex;"
282
- class="k-scheduler-cell k-heading-cell" [attr.colspan]="horizontalColspan(resourceIndex)">
283
- <ng-container *ngIf="!groupHeaderTemplateRef">{{ getField(item, resource.textField) }}</ng-container>
284
- <ng-container *ngIf="groupHeaderTemplateRef" [ngTemplateOutlet]="groupHeaderTemplateRef" [ngTemplateOutletContext]="{ resource: item }"></ng-container>
285
- </th>
286
- </tr>
287
- <tr class="k-scheduler-date-group">
288
- <ng-container *ngFor="let resource of horizontalResources | resourceIterator; trackBy: itemIndex;">
289
- <th *ngFor="let slot of daySlots; let index = index; trackBy: itemIndex" class="k-scheduler-cell k-heading-cell">
290
- <span *ngIf="!dateHeaderTemplateRef" class="k-link k-nav-day" [attr.data-dayslot-index]="index">{{ slot.start | kendoDate: dateFormat }}</span>
291
- <ng-container *ngIf="dateHeaderTemplateRef" [ngTemplateOutlet]="dateHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
292
- </th>
293
- </ng-container>
294
- </tr>
295
- </tbody>
296
- </table>
297
- <div [style.position]="'relative'" *ngIf="allDaySlot && !verticalResources.length">
298
- <table class="k-scheduler-table k-scheduler-header-all-day" aria-hidden="true">
299
- <tbody>
300
- <tr>
301
- <ng-container *ngFor="let resource of horizontalResources | resourceIterator; let resourceIndex = index; trackBy: itemIndex;">
302
- <td *ngFor="let slot of daySlots; let index = index; trackBy: itemIndex"
303
- daySlot
304
- [start]="slot.start"
305
- [end]="slot.end"
306
- [id]="{ resourceIndex: resourceIndex, rangeIndex: 0, index: index }"
256
+ <tbody>
257
+ <tr class="k-scheduler-head">
258
+ <td>
259
+ <div class="k-scheduler-times" #timesHeader>
260
+ <table class="k-scheduler-table" aria-hidden="true">
261
+ <tbody>
262
+ @for (resource of horizontalResources; track itemIndex($index, resource)) {
263
+ <tr>
264
+ <th class="k-scheduler-cell k-heading-cell"></th>
265
+ </tr>
266
+ }
267
+ <tr [style.height]="'auto'">
268
+ <th class="k-scheduler-cell k-heading-cell"></th>
269
+ </tr>
270
+ @if (allDaySlot && !verticalResources.length) {
271
+ <tr>
272
+ <th class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
273
+ </tr>
274
+ }
275
+ </tbody>
276
+ </table>
277
+ </div>
278
+ </td>
279
+ <td>
280
+ <div class="k-scheduler-header" #header>
281
+ <div class="k-scheduler-header-wrap" #headerWrap>
282
+ <table class="k-scheduler-table" aria-hidden="true">
283
+ <tbody>
284
+ @for (resource of horizontalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
285
+ <tr>
286
+ @for (item of horizontalResources | resourceIterator : resourceIndex; track itemIndex($index, item)) {
287
+ <th
288
+ class="k-scheduler-cell k-heading-cell" [attr.colspan]="horizontalColspan(resourceIndex)">
289
+ @if (!groupHeaderTemplateRef) {
290
+ {{ getField(item, resource.textField) }}
291
+ }
292
+ @if (groupHeaderTemplateRef) {
293
+ <ng-container [ngTemplateOutlet]="groupHeaderTemplateRef" [ngTemplateOutletContext]="{ resource: item }"></ng-container>
294
+ }
295
+ </th>
296
+ }
297
+ </tr>
298
+ }
299
+ <tr class="k-scheduler-date-group">
300
+ @for (resource of horizontalResources | resourceIterator; track itemIndex($index, resource)) {
301
+ @for (slot of daySlots; track itemIndex(index, slot); let index = $index) {
302
+ <th class="k-scheduler-cell k-heading-cell">
303
+ @if (!dateHeaderTemplateRef) {
304
+ <span class="k-link k-nav-day" [attr.data-dayslot-index]="index">{{ slot.start | kendoDate: dateFormat }}</span>
305
+ }
306
+ @if (dateHeaderTemplateRef) {
307
+ <ng-container [ngTemplateOutlet]="dateHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
308
+ }
309
+ </th>
310
+ }
311
+ }
312
+ </tr>
313
+ </tbody>
314
+ </table>
315
+ @if (allDaySlot && !verticalResources.length) {
316
+ <div [style.position]="'relative'">
317
+ <table class="k-scheduler-table k-scheduler-header-all-day" aria-hidden="true">
318
+ <tbody>
319
+ <tr>
320
+ @for (resource of horizontalResources | resourceIterator; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
321
+ @for (slot of daySlots; track itemIndex(index, slot); let index = $index) {
322
+ <td
323
+ daySlot
324
+ [start]="slot.start"
325
+ [end]="slot.end"
326
+ [id]="{ resourceIndex: resourceIndex, rangeIndex: 0, index: index }"
307
327
  [class.k-selected]="isSlotSelected({
308
328
  start: toPlainDate(slot.start),
309
329
  end: toPlainDate(slot.end),
310
330
  isAllDay: true,
311
331
  resources: resourcesByIndex(resourceIndex)
312
332
  })"
313
- [ngClass]="allDaySlotClass(slot, resourceIndex)"
314
- class="k-scheduler-cell">
315
- <ng-container *ngIf="allDaySlotTemplateRef" [ngTemplateOutlet]="allDaySlotTemplateRef"
316
- [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(resourceIndex) }"></ng-container>
317
- </td>
318
- </ng-container>
319
- </tr>
320
- </tbody>
321
- </table>
322
- <ng-container *ngFor="let item of allDayItems | async; trackBy: itemIndex;">
323
- <div *ngFor="let itemResource of item.resources; trackBy: itemIndex;"
324
- [ngClass]="getEventClasses(item, itemResource.resources, true)"
325
- [ngStyle]="getEventStyles(item, itemResource, true)"
326
- role="button"
327
- [kendoSchedulerFocusIndex]="itemResource.leafIdx"
328
- [id]="item.elementId + '_' + itemResource.leafIdx"
329
- dayTimeViewItem
330
- [name]="name"
331
- [isAllDay]="true"
332
- [editable]="editable"
333
- [eventTemplate]="allDayEventTemplateRef"
334
- [item]="item"
335
- [index]="item.index"
336
- [rangeIndex]="item.rangeIndex"
337
- [resources]="itemResource.resources"
338
- [resourceIndex]="itemResource.leafIdx">
339
- </div>
340
- </ng-container>
341
- <kendo-hint-container #headerHintContainer>
342
- <ng-template>
343
- <div *ngIf="dragHints.length && allDayDragHint"
344
- class="k-event-drag-hint"
345
- dayTimeViewItem
346
- [isAllDay]="true"
347
- [ngStyle]="dragHints[0].style"
348
- [ngClass]="dragHints[0].class"
349
- [dragHint]="true"
350
- [eventTemplate]="eventTemplateRef"
351
- [item]="dragHints[0].item"
352
- [resources]="dragHints[0].resources">
353
- </div>
354
-
355
- <div *ngIf="resizeHints.length && allDayResizeHint"
356
- kendoResizeHint
357
- [hint]="resizeHints[0]"
358
- [ngClass]="resizeHints[0].class"
359
- [format]="allDayResizeHintFormat">
360
- </div>
361
- </ng-template>
362
- </kendo-hint-container>
363
- </div>
333
+ [ngClass]="allDaySlotClass(slot, resourceIndex)"
334
+ class="k-scheduler-cell">
335
+ @if (allDaySlotTemplateRef) {
336
+ <ng-container [ngTemplateOutlet]="allDaySlotTemplateRef"
337
+ [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(resourceIndex) }"></ng-container>
338
+ }
339
+ </td>
340
+ }
341
+ }
342
+ </tr>
343
+ </tbody>
344
+ </table>
345
+ @for (item of allDayItems | async; track itemIndex($index, item)) {
346
+ @for (itemResource of item.resources; track itemIndex($index, itemResource)) {
347
+ <div
348
+ [ngClass]="getEventClasses(item, itemResource.resources, true)"
349
+ [ngStyle]="getEventStyles(item, itemResource, true)"
350
+ role="button"
351
+ [kendoSchedulerFocusIndex]="itemResource.leafIdx"
352
+ [id]="item.elementId + '_' + itemResource.leafIdx"
353
+ dayTimeViewItem
354
+ [name]="name"
355
+ [isAllDay]="true"
356
+ [editable]="editable"
357
+ [eventTemplate]="allDayEventTemplateRef"
358
+ [item]="item"
359
+ [index]="item.index"
360
+ [rangeIndex]="item.rangeIndex"
361
+ [resources]="itemResource.resources"
362
+ [resourceIndex]="itemResource.leafIdx">
364
363
  </div>
365
- </div>
366
- </td>
367
- </tr>
368
- <tr class="k-scheduler-body">
369
- <td>
370
- <div class="k-scheduler-times" #times>
371
- <ng-container *ngIf="showCurrentTime">
372
- <div *ngFor="let resource of verticalResources | resourceIterator; trackBy: itemIndex;"
373
- #currentTimeArrow class="k-current-time k-current-time-arrow-right">
374
- </div>
375
- </ng-container>
376
- <table class="k-scheduler-table" #timesTable aria-hidden="true">
377
- <tbody>
378
- <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex;">
379
- <tr *ngIf="verticalResources.length">
380
- <ng-container *ngFor="let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex;">
381
- <th *ngIf="verticalItem(leafIndex, resourceIndex)" [attr.rowspan]="verticalRowspan(resourceIndex)" class="k-scheduler-cell k-slot-cell k-heading-cell">
382
- <ng-container *ngIf="!groupHeaderTemplateRef">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>
383
- <ng-container *ngIf="groupHeaderTemplateRef" [ngTemplateOutlet]="groupHeaderTemplateRef"
384
- [ngTemplateOutletContext]="{ resource: verticalItem(leafIndex, resourceIndex) }"></ng-container>
385
- </th>
386
- </ng-container>
387
- <th *ngIf="allDaySlot" class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
388
- </tr>
389
- <tr *ngFor="let slot of timeSlots; let timeSlotIndex = index;trackBy: itemIndex">
390
- <th *ngIf="slot.isMajor" [ngClass]="{ 'k-slot-cell': slotDivisions === 1 }" class="k-scheduler-cell k-heading-cell">
391
- <ng-container *ngIf="!majorTimeHeaderTemplateRef">{{ slot.start | kendoDate: 't' }}</ng-container>
392
- <ng-container *ngIf="majorTimeHeaderTemplateRef" [ngTemplateOutlet]="majorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
393
- </th>
394
- <th *ngIf="!slot.isMajor" [ngClass]="{ 'k-slot-cell': timeSlotIndex % slotDivisions === slotDivisions - 1 }" class="k-scheduler-cell k-heading-cell">
395
- <ng-container *ngIf="minorTimeHeaderTemplateRef" [ngTemplateOutlet]="minorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }">
396
- </ng-container>
397
- </th>
398
- </tr>
399
- </ng-container>
400
- </tbody>
401
- </table>
402
- </div>
403
- </td>
404
- <td>
405
- <div
406
- class="k-scheduler-content"
407
- #content
408
- role="group"
409
- tabindex="0"
410
- [attr.aria-owns]="matchOwned(items | async)">
411
- <ng-container *ngIf="showCurrentTime">
412
- <div *ngFor="let resource of verticalResources | resourceIterator; trackBy: itemIndex;"
413
- #currentTimeMarker class="k-current-time">
414
- </div>
415
- </ng-container>
416
- <table class="k-scheduler-table" #contentTable role="presentation">
417
- <tbody>
418
- <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex;">
419
- <tr class="k-scheduler-header-all-day" *ngIf="allDaySlot && verticalResources.length">
420
- <td *ngFor="let slot of daySlots; let index = index; trackBy: itemIndex"
421
- daySlot
422
- [start]="slot.start"
423
- [end]="slot.end"
364
+ }
365
+ }
366
+ <kendo-hint-container #headerHintContainer>
367
+ <ng-template>
368
+ @if (dragHints.length && allDayDragHint) {
369
+ <div
370
+ class="k-event-drag-hint"
371
+ dayTimeViewItem
372
+ [isAllDay]="true"
373
+ [ngStyle]="dragHints[0].style"
374
+ [ngClass]="dragHints[0].class"
375
+ [dragHint]="true"
376
+ [eventTemplate]="eventTemplateRef"
377
+ [item]="dragHints[0].item"
378
+ [resources]="dragHints[0].resources">
379
+ </div>
380
+ }
381
+ @if (resizeHints.length && allDayResizeHint) {
382
+ <div
383
+ kendoResizeHint
384
+ [hint]="resizeHints[0]"
385
+ [ngClass]="resizeHints[0].class"
386
+ [format]="allDayResizeHintFormat">
387
+ </div>
388
+ }
389
+ </ng-template>
390
+ </kendo-hint-container>
391
+ </div>
392
+ }
393
+ </div>
394
+ </div>
395
+ </td>
396
+ </tr>
397
+ <tr class="k-scheduler-body">
398
+ <td>
399
+ <div class="k-scheduler-times" #times>
400
+ @if (showCurrentTime) {
401
+ @for (resource of verticalResources | resourceIterator; track itemIndex($index, resource)) {
402
+ <div
403
+ #currentTimeArrow class="k-current-time k-current-time-arrow-right">
404
+ </div>
405
+ }
406
+ }
407
+ <table class="k-scheduler-table" #timesTable aria-hidden="true">
408
+ <tbody>
409
+ @for (resourceItem of verticalResources | resourceIterator; track itemIndex(leafIndex, resourceItem); let leafIndex = $index) {
410
+ @if (verticalResources.length) {
411
+ <tr>
412
+ @for (resource of verticalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
413
+ @if (verticalItem(leafIndex, resourceIndex)) {
414
+ <th [attr.rowspan]="verticalRowspan(resourceIndex)" class="k-scheduler-cell k-slot-cell k-heading-cell">
415
+ @if (!groupHeaderTemplateRef) {
416
+ {{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}
417
+ }
418
+ @if (groupHeaderTemplateRef) {
419
+ <ng-container [ngTemplateOutlet]="groupHeaderTemplateRef"
420
+ [ngTemplateOutletContext]="{ resource: verticalItem(leafIndex, resourceIndex) }"></ng-container>
421
+ }
422
+ </th>
423
+ }
424
+ }
425
+ @if (allDaySlot) {
426
+ <th class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
427
+ }
428
+ </tr>
429
+ }
430
+ @for (slot of timeSlots; track itemIndex(timeSlotIndex, slot); let timeSlotIndex = $index) {
431
+ <tr>
432
+ @if (slot.isMajor) {
433
+ <th [ngClass]="{ 'k-slot-cell': slotDivisions === 1 }" class="k-scheduler-cell k-heading-cell">
434
+ @if (!majorTimeHeaderTemplateRef) {
435
+ {{ slot.start | kendoDate: 't' }}
436
+ }
437
+ @if (majorTimeHeaderTemplateRef) {
438
+ <ng-container [ngTemplateOutlet]="majorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
439
+ }
440
+ </th>
441
+ }
442
+ @if (!slot.isMajor) {
443
+ <th [ngClass]="{ 'k-slot-cell': timeSlotIndex % slotDivisions === slotDivisions - 1 }" class="k-scheduler-cell k-heading-cell">
444
+ @if (minorTimeHeaderTemplateRef) {
445
+ <ng-container [ngTemplateOutlet]="minorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }">
446
+ </ng-container>
447
+ }
448
+ </th>
449
+ }
450
+ </tr>
451
+ }
452
+ }
453
+ </tbody>
454
+ </table>
455
+ </div>
456
+ </td>
457
+ <td>
458
+ <div
459
+ class="k-scheduler-content"
460
+ #content
461
+ role="group"
462
+ tabindex="0"
463
+ [attr.aria-owns]="matchOwned(items | async)">
464
+ @if (showCurrentTime) {
465
+ @for (resource of verticalResources | resourceIterator; track itemIndex($index, resource)) {
466
+ <div
467
+ #currentTimeMarker class="k-current-time">
468
+ </div>
469
+ }
470
+ }
471
+ <table class="k-scheduler-table" #contentTable role="presentation">
472
+ <tbody>
473
+ @for (resourceItem of verticalResources | resourceIterator; track itemIndex(verticalIndex, resourceItem); let verticalIndex = $index) {
474
+ @if (allDaySlot && verticalResources.length) {
475
+ <tr class="k-scheduler-header-all-day">
476
+ @for (slot of daySlots; track itemIndex(index, slot); let index = $index) {
477
+ <td
478
+ daySlot
479
+ [start]="slot.start"
480
+ [end]="slot.end"
424
481
  [class.k-selected]="isSlotSelected({
425
482
  start: toPlainDate(slot.start),
426
483
  end: toPlainDate(slot.end),
427
484
  isAllDay: true,
428
485
  resources: resourcesByIndex(verticalIndex)
429
486
  })"
430
- [id]="{ resourceIndex: verticalIndex, rangeIndex: 0, index: index }">
431
- <ng-container *ngIf="allDaySlotTemplateRef" [ngTemplateOutlet]="allDaySlotTemplateRef"
432
- [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(verticalIndex) }"></ng-container>
433
- </td>
434
- </tr>
435
- <tr *ngFor="let slot of timeSlots; index as index; trackBy: itemIndex" [class.k-middle-row]="isMiddleSlot(index)">
436
- <ng-container *ngFor="let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex;">
437
- <td *ngFor="let daySlot of daySlots; index as rangeIndex; trackBy: itemIndex"
438
- [ngClass]="timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)"
439
- timeSlot #timeSlot="timeSlot"
440
- [date]="daySlot.start"
441
- [invariantStart]="slot.start"
442
- [invariantEnd]="slot.end"
443
- [workDayStart]="workDayStartTime"
444
- [workDayEnd]="workDayEndTime"
445
- [workWeekStart]="workWeekStart"
446
- [workWeekEnd]="workWeekEnd"
447
- [id]="{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }"
487
+ [id]="{ resourceIndex: verticalIndex, rangeIndex: 0, index: index }">
488
+ @if (allDaySlotTemplateRef) {
489
+ <ng-container [ngTemplateOutlet]="allDaySlotTemplateRef"
490
+ [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(verticalIndex) }"></ng-container>
491
+ }
492
+ </td>
493
+ }
494
+ </tr>
495
+ }
496
+ @for (slot of timeSlots; track itemIndex(index, slot); let index = $index) {
497
+ <tr [class.k-middle-row]="isMiddleSlot(index)">
498
+ @for (resource of horizontalResources | resourceIterator; track itemIndex(horizontalIndex, resource); let horizontalIndex = $index) {
499
+ @for (daySlot of daySlots; track itemIndex(rangeIndex, daySlot); let rangeIndex = $index) {
500
+ <td
501
+ [ngClass]="timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)"
502
+ timeSlot #timeSlot="timeSlot"
503
+ [date]="daySlot.start"
504
+ [invariantStart]="slot.start"
505
+ [invariantEnd]="slot.end"
506
+ [workDayStart]="workDayStartTime"
507
+ [workDayEnd]="workDayEndTime"
508
+ [workWeekStart]="workWeekStart"
509
+ [workWeekEnd]="workWeekEnd"
510
+ [id]="{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }"
448
511
  [class.k-selected]="isSlotSelected({
449
512
  start: toPlainDateTime(daySlot.start, slot.start),
450
513
  end: toPlainDateTime(daySlot.start, slot.end),
451
514
  isAllDay: false,
452
515
  resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)
453
516
  })"
454
- class="k-scheduler-cell"
455
- >
456
- <ng-container *ngIf="timeSlotTemplateRef" [ngTemplateOutlet]="timeSlotTemplateRef"
457
- [ngTemplateOutletContext]="{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex) }">
458
- </ng-container>
459
- </td>
460
- </ng-container>
461
- </tr>
462
- </ng-container>
463
- </tbody>
464
- </table>
465
- <ng-container *ngFor="let item of items | async; trackBy: itemIndex;">
466
- <div *ngFor="let itemResource of item.resources; trackBy: itemIndex;"
467
- [ngClass]="getEventClasses(item, itemResource.resources)"
468
- [ngStyle]="getEventStyles(item, itemResource)"
469
- role="button"
470
- [kendoSchedulerFocusIndex]="itemResource.leafIdx"
471
- [id]="item.elementId + '_' + itemResource.leafIdx"
472
- dayTimeViewItem
473
- [editable]="editable"
474
- [vertical]="true"
475
- [eventTemplate]="eventTemplateRef"
476
- [item]="item"
477
- [index]="item.index"
478
- [rangeIndex]="item.rangeIndex"
479
- [resources]="itemResource.resources"
480
- [resourceIndex]="itemResource.leafIdx">
481
- </div>
482
- </ng-container>
483
- <ng-container *ngIf="verticalResources.length">
484
- <ng-container *ngFor="let item of allDayItems | async; trackBy: itemIndex;">
485
- <div *ngFor="let itemResource of item.resources; trackBy: itemIndex;"
486
- [ngClass]="getEventClasses(item, itemResource.resources, true)"
487
- [ngStyle]="getEventStyles(item, itemResource, true)"
488
- role="button"
489
- [kendoSchedulerFocusIndex]="itemResource.leafIdx"
490
- [id]="item.elementId + '_' + itemResource.leafIdx"
491
- dayTimeViewItem
492
- [isAllDay]="true"
493
- [editable]="editable"
494
- [eventTemplate]="allDayEventTemplateRef"
495
- [item]="item"
496
- [index]="item.index"
497
- [rangeIndex]="item.rangeIndex"
498
- [resources]="itemResource.resources"
499
- [resourceIndex]="itemResource.leafIdx">
500
- </div>
501
- </ng-container>
502
- </ng-container>
503
- <kendo-hint-container #hintContainer>
504
- <ng-template>
505
- <div *ngIf="dragHints.length && (!allDayDragHint || verticalResources.length)"
506
- class="k-event-drag-hint"
507
- role="button"
508
- dayTimeViewItem
509
- [isAllDay]="allDayDragHint"
510
- [ngStyle]="dragHints[0].style"
511
- [ngClass]="dragHints[0].class"
512
- [dragHint]="true"
513
- [eventTemplate]="eventTemplateRef"
514
- [resources]="dragHints[0].resources"
515
- [item]="dragHints[0].item">
516
- </div>
517
-
518
- <ng-container *ngIf="resizeHints.length && (!allDayResizeHint || verticalResources.length)">
519
- <div *ngFor="let hint of resizeHints; trackBy: itemIndex;"
520
- kendoResizeHint
521
- [hint]="hint"
522
- [ngClass]="hint.class"
523
- [format]="allDayResizeHint ? allDayResizeHintFormat : resizeHintFormat">
524
- </div>
517
+ class="k-scheduler-cell"
518
+ >
519
+ @if (timeSlotTemplateRef) {
520
+ <ng-container [ngTemplateOutlet]="timeSlotTemplateRef"
521
+ [ngTemplateOutletContext]="{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex) }">
525
522
  </ng-container>
526
- </ng-template>
527
- </kendo-hint-container>
523
+ }
524
+ </td>
525
+ }
526
+ }
527
+ </tr>
528
+ }
529
+ }
530
+ </tbody>
531
+ </table>
532
+ @for (item of items | async; track itemIndex($index, item)) {
533
+ @for (itemResource of item.resources; track itemIndex($index, itemResource)) {
534
+ <div
535
+ [ngClass]="getEventClasses(item, itemResource.resources)"
536
+ [ngStyle]="getEventStyles(item, itemResource)"
537
+ role="button"
538
+ [kendoSchedulerFocusIndex]="itemResource.leafIdx"
539
+ [id]="item.elementId + '_' + itemResource.leafIdx"
540
+ dayTimeViewItem
541
+ [editable]="editable"
542
+ [vertical]="true"
543
+ [eventTemplate]="eventTemplateRef"
544
+ [item]="item"
545
+ [index]="item.index"
546
+ [rangeIndex]="item.rangeIndex"
547
+ [resources]="itemResource.resources"
548
+ [resourceIndex]="itemResource.leafIdx">
549
+ </div>
550
+ }
551
+ }
552
+ @if (verticalResources.length) {
553
+ @for (item of allDayItems | async; track itemIndex($index, item)) {
554
+ @for (itemResource of item.resources; track itemIndex($index, itemResource)) {
555
+ <div
556
+ [ngClass]="getEventClasses(item, itemResource.resources, true)"
557
+ [ngStyle]="getEventStyles(item, itemResource, true)"
558
+ role="button"
559
+ [kendoSchedulerFocusIndex]="itemResource.leafIdx"
560
+ [id]="item.elementId + '_' + itemResource.leafIdx"
561
+ dayTimeViewItem
562
+ [isAllDay]="true"
563
+ [editable]="editable"
564
+ [eventTemplate]="allDayEventTemplateRef"
565
+ [item]="item"
566
+ [index]="item.index"
567
+ [rangeIndex]="item.rangeIndex"
568
+ [resources]="itemResource.resources"
569
+ [resourceIndex]="itemResource.leafIdx">
570
+ </div>
571
+ }
572
+ }
573
+ }
574
+ <kendo-hint-container #hintContainer>
575
+ <ng-template>
576
+ @if (dragHints.length && (!allDayDragHint || verticalResources.length)) {
577
+ <div
578
+ class="k-event-drag-hint"
579
+ role="button"
580
+ dayTimeViewItem
581
+ [isAllDay]="allDayDragHint"
582
+ [ngStyle]="dragHints[0].style"
583
+ [ngClass]="dragHints[0].class"
584
+ [dragHint]="true"
585
+ [eventTemplate]="eventTemplateRef"
586
+ [resources]="dragHints[0].resources"
587
+ [item]="dragHints[0].item">
528
588
  </div>
529
- </td>
530
- </tr>
531
- </tbody>
589
+ }
590
+
591
+ @if (resizeHints.length && (!allDayResizeHint || verticalResources.length)) {
592
+ @for (hint of resizeHints; track itemIndex($index, hint)) {
593
+ <div
594
+ kendoResizeHint
595
+ [hint]="hint"
596
+ [ngClass]="hint.class"
597
+ [format]="allDayResizeHint ? allDayResizeHintFormat : resizeHintFormat">
598
+ </div>
599
+ }
600
+ }
601
+ </ng-template>
602
+ </kendo-hint-container>
603
+ </div>
604
+ </td>
605
+ </tr>
606
+ </tbody>
532
607
  </table>
533
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DaySlotDirective, selector: "[daySlot]", inputs: ["start", "end"] }, { kind: "component", type: DayTimeViewItemComponent, selector: "[dayTimeViewItem]", inputs: ["vertical", "isAllDay", "name"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoSchedulerFocusIndex]", inputs: ["kendoSchedulerFocusIndex", "containerType"] }, { kind: "component", type: HintContainerComponent, selector: "kendo-hint-container" }, { kind: "component", type: ResizeHintComponent, selector: "[kendoResizeHint]", inputs: ["hint", "format"] }, { kind: "directive", type: TimeSlotDirective, selector: "[timeSlot]", inputs: ["invariantStart", "invariantEnd", "workDayStart", "workDayEnd", "workWeekStart", "workWeekEnd", "date"], exportAs: ["timeSlot"] }, { kind: "pipe", type: ResourceIteratorPipe, name: "resourceIterator" }, { kind: "pipe", type: DatePipe, name: "kendoDate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
608
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DaySlotDirective, selector: "[daySlot]", inputs: ["start", "end"] }, { kind: "component", type: DayTimeViewItemComponent, selector: "[dayTimeViewItem]", inputs: ["vertical", "isAllDay", "name"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoSchedulerFocusIndex]", inputs: ["kendoSchedulerFocusIndex", "containerType"] }, { kind: "component", type: HintContainerComponent, selector: "kendo-hint-container" }, { kind: "component", type: ResizeHintComponent, selector: "[kendoResizeHint]", inputs: ["hint", "format"] }, { kind: "directive", type: TimeSlotDirective, selector: "[timeSlot]", inputs: ["invariantStart", "invariantEnd", "workDayStart", "workDayEnd", "workWeekStart", "workWeekEnd", "date"], exportAs: ["timeSlot"] }, { kind: "pipe", type: ResourceIteratorPipe, name: "resourceIterator" }, { kind: "pipe", type: DatePipe, name: "kendoDate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
534
609
  }
535
610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiDayViewRendererComponent, decorators: [{
536
611
  type: Component,
@@ -542,286 +617,361 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
542
617
  ],
543
618
  template: `
544
619
  <table class="k-scheduler-layout" role="presentation" [ngClass]="classNames">
545
- <tbody>
546
- <tr class="k-scheduler-head">
547
- <td>
548
- <div class="k-scheduler-times" #timesHeader>
549
- <table class="k-scheduler-table" aria-hidden="true">
550
- <tbody>
551
- <tr *ngFor="let resource of horizontalResources; trackBy: itemIndex;">
552
- <th class="k-scheduler-cell k-heading-cell"></th>
553
- </tr>
554
- <tr [style.height]="'auto'">
555
- <th class="k-scheduler-cell k-heading-cell"></th>
556
- </tr>
557
- <tr *ngIf="allDaySlot && !verticalResources.length">
558
- <th class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
559
- </tr>
560
- </tbody>
561
- </table>
562
- </div>
563
- </td>
564
- <td>
565
- <div class="k-scheduler-header" #header>
566
- <div class="k-scheduler-header-wrap" #headerWrap>
567
- <table class="k-scheduler-table" aria-hidden="true">
568
- <tbody>
569
- <tr *ngFor="let resource of horizontalResources; let resourceIndex = index; trackBy: itemIndex;">
570
- <th *ngFor="let item of horizontalResources | resourceIterator : resourceIndex; trackBy: itemIndex;"
571
- class="k-scheduler-cell k-heading-cell" [attr.colspan]="horizontalColspan(resourceIndex)">
572
- <ng-container *ngIf="!groupHeaderTemplateRef">{{ getField(item, resource.textField) }}</ng-container>
573
- <ng-container *ngIf="groupHeaderTemplateRef" [ngTemplateOutlet]="groupHeaderTemplateRef" [ngTemplateOutletContext]="{ resource: item }"></ng-container>
574
- </th>
575
- </tr>
576
- <tr class="k-scheduler-date-group">
577
- <ng-container *ngFor="let resource of horizontalResources | resourceIterator; trackBy: itemIndex;">
578
- <th *ngFor="let slot of daySlots; let index = index; trackBy: itemIndex" class="k-scheduler-cell k-heading-cell">
579
- <span *ngIf="!dateHeaderTemplateRef" class="k-link k-nav-day" [attr.data-dayslot-index]="index">{{ slot.start | kendoDate: dateFormat }}</span>
580
- <ng-container *ngIf="dateHeaderTemplateRef" [ngTemplateOutlet]="dateHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
581
- </th>
582
- </ng-container>
583
- </tr>
584
- </tbody>
585
- </table>
586
- <div [style.position]="'relative'" *ngIf="allDaySlot && !verticalResources.length">
587
- <table class="k-scheduler-table k-scheduler-header-all-day" aria-hidden="true">
588
- <tbody>
589
- <tr>
590
- <ng-container *ngFor="let resource of horizontalResources | resourceIterator; let resourceIndex = index; trackBy: itemIndex;">
591
- <td *ngFor="let slot of daySlots; let index = index; trackBy: itemIndex"
592
- daySlot
593
- [start]="slot.start"
594
- [end]="slot.end"
595
- [id]="{ resourceIndex: resourceIndex, rangeIndex: 0, index: index }"
620
+ <tbody>
621
+ <tr class="k-scheduler-head">
622
+ <td>
623
+ <div class="k-scheduler-times" #timesHeader>
624
+ <table class="k-scheduler-table" aria-hidden="true">
625
+ <tbody>
626
+ @for (resource of horizontalResources; track itemIndex($index, resource)) {
627
+ <tr>
628
+ <th class="k-scheduler-cell k-heading-cell"></th>
629
+ </tr>
630
+ }
631
+ <tr [style.height]="'auto'">
632
+ <th class="k-scheduler-cell k-heading-cell"></th>
633
+ </tr>
634
+ @if (allDaySlot && !verticalResources.length) {
635
+ <tr>
636
+ <th class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
637
+ </tr>
638
+ }
639
+ </tbody>
640
+ </table>
641
+ </div>
642
+ </td>
643
+ <td>
644
+ <div class="k-scheduler-header" #header>
645
+ <div class="k-scheduler-header-wrap" #headerWrap>
646
+ <table class="k-scheduler-table" aria-hidden="true">
647
+ <tbody>
648
+ @for (resource of horizontalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
649
+ <tr>
650
+ @for (item of horizontalResources | resourceIterator : resourceIndex; track itemIndex($index, item)) {
651
+ <th
652
+ class="k-scheduler-cell k-heading-cell" [attr.colspan]="horizontalColspan(resourceIndex)">
653
+ @if (!groupHeaderTemplateRef) {
654
+ {{ getField(item, resource.textField) }}
655
+ }
656
+ @if (groupHeaderTemplateRef) {
657
+ <ng-container [ngTemplateOutlet]="groupHeaderTemplateRef" [ngTemplateOutletContext]="{ resource: item }"></ng-container>
658
+ }
659
+ </th>
660
+ }
661
+ </tr>
662
+ }
663
+ <tr class="k-scheduler-date-group">
664
+ @for (resource of horizontalResources | resourceIterator; track itemIndex($index, resource)) {
665
+ @for (slot of daySlots; track itemIndex(index, slot); let index = $index) {
666
+ <th class="k-scheduler-cell k-heading-cell">
667
+ @if (!dateHeaderTemplateRef) {
668
+ <span class="k-link k-nav-day" [attr.data-dayslot-index]="index">{{ slot.start | kendoDate: dateFormat }}</span>
669
+ }
670
+ @if (dateHeaderTemplateRef) {
671
+ <ng-container [ngTemplateOutlet]="dateHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
672
+ }
673
+ </th>
674
+ }
675
+ }
676
+ </tr>
677
+ </tbody>
678
+ </table>
679
+ @if (allDaySlot && !verticalResources.length) {
680
+ <div [style.position]="'relative'">
681
+ <table class="k-scheduler-table k-scheduler-header-all-day" aria-hidden="true">
682
+ <tbody>
683
+ <tr>
684
+ @for (resource of horizontalResources | resourceIterator; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
685
+ @for (slot of daySlots; track itemIndex(index, slot); let index = $index) {
686
+ <td
687
+ daySlot
688
+ [start]="slot.start"
689
+ [end]="slot.end"
690
+ [id]="{ resourceIndex: resourceIndex, rangeIndex: 0, index: index }"
596
691
  [class.k-selected]="isSlotSelected({
597
692
  start: toPlainDate(slot.start),
598
693
  end: toPlainDate(slot.end),
599
694
  isAllDay: true,
600
695
  resources: resourcesByIndex(resourceIndex)
601
696
  })"
602
- [ngClass]="allDaySlotClass(slot, resourceIndex)"
603
- class="k-scheduler-cell">
604
- <ng-container *ngIf="allDaySlotTemplateRef" [ngTemplateOutlet]="allDaySlotTemplateRef"
605
- [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(resourceIndex) }"></ng-container>
606
- </td>
607
- </ng-container>
608
- </tr>
609
- </tbody>
610
- </table>
611
- <ng-container *ngFor="let item of allDayItems | async; trackBy: itemIndex;">
612
- <div *ngFor="let itemResource of item.resources; trackBy: itemIndex;"
613
- [ngClass]="getEventClasses(item, itemResource.resources, true)"
614
- [ngStyle]="getEventStyles(item, itemResource, true)"
615
- role="button"
616
- [kendoSchedulerFocusIndex]="itemResource.leafIdx"
617
- [id]="item.elementId + '_' + itemResource.leafIdx"
618
- dayTimeViewItem
619
- [name]="name"
620
- [isAllDay]="true"
621
- [editable]="editable"
622
- [eventTemplate]="allDayEventTemplateRef"
623
- [item]="item"
624
- [index]="item.index"
625
- [rangeIndex]="item.rangeIndex"
626
- [resources]="itemResource.resources"
627
- [resourceIndex]="itemResource.leafIdx">
628
- </div>
629
- </ng-container>
630
- <kendo-hint-container #headerHintContainer>
631
- <ng-template>
632
- <div *ngIf="dragHints.length && allDayDragHint"
633
- class="k-event-drag-hint"
634
- dayTimeViewItem
635
- [isAllDay]="true"
636
- [ngStyle]="dragHints[0].style"
637
- [ngClass]="dragHints[0].class"
638
- [dragHint]="true"
639
- [eventTemplate]="eventTemplateRef"
640
- [item]="dragHints[0].item"
641
- [resources]="dragHints[0].resources">
642
- </div>
643
-
644
- <div *ngIf="resizeHints.length && allDayResizeHint"
645
- kendoResizeHint
646
- [hint]="resizeHints[0]"
647
- [ngClass]="resizeHints[0].class"
648
- [format]="allDayResizeHintFormat">
649
- </div>
650
- </ng-template>
651
- </kendo-hint-container>
652
- </div>
697
+ [ngClass]="allDaySlotClass(slot, resourceIndex)"
698
+ class="k-scheduler-cell">
699
+ @if (allDaySlotTemplateRef) {
700
+ <ng-container [ngTemplateOutlet]="allDaySlotTemplateRef"
701
+ [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(resourceIndex) }"></ng-container>
702
+ }
703
+ </td>
704
+ }
705
+ }
706
+ </tr>
707
+ </tbody>
708
+ </table>
709
+ @for (item of allDayItems | async; track itemIndex($index, item)) {
710
+ @for (itemResource of item.resources; track itemIndex($index, itemResource)) {
711
+ <div
712
+ [ngClass]="getEventClasses(item, itemResource.resources, true)"
713
+ [ngStyle]="getEventStyles(item, itemResource, true)"
714
+ role="button"
715
+ [kendoSchedulerFocusIndex]="itemResource.leafIdx"
716
+ [id]="item.elementId + '_' + itemResource.leafIdx"
717
+ dayTimeViewItem
718
+ [name]="name"
719
+ [isAllDay]="true"
720
+ [editable]="editable"
721
+ [eventTemplate]="allDayEventTemplateRef"
722
+ [item]="item"
723
+ [index]="item.index"
724
+ [rangeIndex]="item.rangeIndex"
725
+ [resources]="itemResource.resources"
726
+ [resourceIndex]="itemResource.leafIdx">
653
727
  </div>
654
- </div>
655
- </td>
656
- </tr>
657
- <tr class="k-scheduler-body">
658
- <td>
659
- <div class="k-scheduler-times" #times>
660
- <ng-container *ngIf="showCurrentTime">
661
- <div *ngFor="let resource of verticalResources | resourceIterator; trackBy: itemIndex;"
662
- #currentTimeArrow class="k-current-time k-current-time-arrow-right">
663
- </div>
664
- </ng-container>
665
- <table class="k-scheduler-table" #timesTable aria-hidden="true">
666
- <tbody>
667
- <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let leafIndex = index; trackBy: itemIndex;">
668
- <tr *ngIf="verticalResources.length">
669
- <ng-container *ngFor="let resource of verticalResources; let resourceIndex = index; trackBy: itemIndex;">
670
- <th *ngIf="verticalItem(leafIndex, resourceIndex)" [attr.rowspan]="verticalRowspan(resourceIndex)" class="k-scheduler-cell k-slot-cell k-heading-cell">
671
- <ng-container *ngIf="!groupHeaderTemplateRef">{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}</ng-container>
672
- <ng-container *ngIf="groupHeaderTemplateRef" [ngTemplateOutlet]="groupHeaderTemplateRef"
673
- [ngTemplateOutletContext]="{ resource: verticalItem(leafIndex, resourceIndex) }"></ng-container>
674
- </th>
675
- </ng-container>
676
- <th *ngIf="allDaySlot" class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
677
- </tr>
678
- <tr *ngFor="let slot of timeSlots; let timeSlotIndex = index;trackBy: itemIndex">
679
- <th *ngIf="slot.isMajor" [ngClass]="{ 'k-slot-cell': slotDivisions === 1 }" class="k-scheduler-cell k-heading-cell">
680
- <ng-container *ngIf="!majorTimeHeaderTemplateRef">{{ slot.start | kendoDate: 't' }}</ng-container>
681
- <ng-container *ngIf="majorTimeHeaderTemplateRef" [ngTemplateOutlet]="majorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
682
- </th>
683
- <th *ngIf="!slot.isMajor" [ngClass]="{ 'k-slot-cell': timeSlotIndex % slotDivisions === slotDivisions - 1 }" class="k-scheduler-cell k-heading-cell">
684
- <ng-container *ngIf="minorTimeHeaderTemplateRef" [ngTemplateOutlet]="minorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }">
685
- </ng-container>
686
- </th>
687
- </tr>
688
- </ng-container>
689
- </tbody>
690
- </table>
691
- </div>
692
- </td>
693
- <td>
694
- <div
695
- class="k-scheduler-content"
696
- #content
697
- role="group"
698
- tabindex="0"
699
- [attr.aria-owns]="matchOwned(items | async)">
700
- <ng-container *ngIf="showCurrentTime">
701
- <div *ngFor="let resource of verticalResources | resourceIterator; trackBy: itemIndex;"
702
- #currentTimeMarker class="k-current-time">
703
- </div>
704
- </ng-container>
705
- <table class="k-scheduler-table" #contentTable role="presentation">
706
- <tbody>
707
- <ng-container *ngFor="let resourceItem of verticalResources | resourceIterator; let verticalIndex = index; trackBy: itemIndex;">
708
- <tr class="k-scheduler-header-all-day" *ngIf="allDaySlot && verticalResources.length">
709
- <td *ngFor="let slot of daySlots; let index = index; trackBy: itemIndex"
710
- daySlot
711
- [start]="slot.start"
712
- [end]="slot.end"
728
+ }
729
+ }
730
+ <kendo-hint-container #headerHintContainer>
731
+ <ng-template>
732
+ @if (dragHints.length && allDayDragHint) {
733
+ <div
734
+ class="k-event-drag-hint"
735
+ dayTimeViewItem
736
+ [isAllDay]="true"
737
+ [ngStyle]="dragHints[0].style"
738
+ [ngClass]="dragHints[0].class"
739
+ [dragHint]="true"
740
+ [eventTemplate]="eventTemplateRef"
741
+ [item]="dragHints[0].item"
742
+ [resources]="dragHints[0].resources">
743
+ </div>
744
+ }
745
+ @if (resizeHints.length && allDayResizeHint) {
746
+ <div
747
+ kendoResizeHint
748
+ [hint]="resizeHints[0]"
749
+ [ngClass]="resizeHints[0].class"
750
+ [format]="allDayResizeHintFormat">
751
+ </div>
752
+ }
753
+ </ng-template>
754
+ </kendo-hint-container>
755
+ </div>
756
+ }
757
+ </div>
758
+ </div>
759
+ </td>
760
+ </tr>
761
+ <tr class="k-scheduler-body">
762
+ <td>
763
+ <div class="k-scheduler-times" #times>
764
+ @if (showCurrentTime) {
765
+ @for (resource of verticalResources | resourceIterator; track itemIndex($index, resource)) {
766
+ <div
767
+ #currentTimeArrow class="k-current-time k-current-time-arrow-right">
768
+ </div>
769
+ }
770
+ }
771
+ <table class="k-scheduler-table" #timesTable aria-hidden="true">
772
+ <tbody>
773
+ @for (resourceItem of verticalResources | resourceIterator; track itemIndex(leafIndex, resourceItem); let leafIndex = $index) {
774
+ @if (verticalResources.length) {
775
+ <tr>
776
+ @for (resource of verticalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
777
+ @if (verticalItem(leafIndex, resourceIndex)) {
778
+ <th [attr.rowspan]="verticalRowspan(resourceIndex)" class="k-scheduler-cell k-slot-cell k-heading-cell">
779
+ @if (!groupHeaderTemplateRef) {
780
+ {{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}
781
+ }
782
+ @if (groupHeaderTemplateRef) {
783
+ <ng-container [ngTemplateOutlet]="groupHeaderTemplateRef"
784
+ [ngTemplateOutletContext]="{ resource: verticalItem(leafIndex, resourceIndex) }"></ng-container>
785
+ }
786
+ </th>
787
+ }
788
+ }
789
+ @if (allDaySlot) {
790
+ <th class="k-scheduler-times-all-day k-scheduler-cell k-heading-cell" #allDayCell>{{ allDayMessage }}</th>
791
+ }
792
+ </tr>
793
+ }
794
+ @for (slot of timeSlots; track itemIndex(timeSlotIndex, slot); let timeSlotIndex = $index) {
795
+ <tr>
796
+ @if (slot.isMajor) {
797
+ <th [ngClass]="{ 'k-slot-cell': slotDivisions === 1 }" class="k-scheduler-cell k-heading-cell">
798
+ @if (!majorTimeHeaderTemplateRef) {
799
+ {{ slot.start | kendoDate: 't' }}
800
+ }
801
+ @if (majorTimeHeaderTemplateRef) {
802
+ <ng-container [ngTemplateOutlet]="majorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }"></ng-container>
803
+ }
804
+ </th>
805
+ }
806
+ @if (!slot.isMajor) {
807
+ <th [ngClass]="{ 'k-slot-cell': timeSlotIndex % slotDivisions === slotDivisions - 1 }" class="k-scheduler-cell k-heading-cell">
808
+ @if (minorTimeHeaderTemplateRef) {
809
+ <ng-container [ngTemplateOutlet]="minorTimeHeaderTemplateRef" [ngTemplateOutletContext]="{ date: slot.start }">
810
+ </ng-container>
811
+ }
812
+ </th>
813
+ }
814
+ </tr>
815
+ }
816
+ }
817
+ </tbody>
818
+ </table>
819
+ </div>
820
+ </td>
821
+ <td>
822
+ <div
823
+ class="k-scheduler-content"
824
+ #content
825
+ role="group"
826
+ tabindex="0"
827
+ [attr.aria-owns]="matchOwned(items | async)">
828
+ @if (showCurrentTime) {
829
+ @for (resource of verticalResources | resourceIterator; track itemIndex($index, resource)) {
830
+ <div
831
+ #currentTimeMarker class="k-current-time">
832
+ </div>
833
+ }
834
+ }
835
+ <table class="k-scheduler-table" #contentTable role="presentation">
836
+ <tbody>
837
+ @for (resourceItem of verticalResources | resourceIterator; track itemIndex(verticalIndex, resourceItem); let verticalIndex = $index) {
838
+ @if (allDaySlot && verticalResources.length) {
839
+ <tr class="k-scheduler-header-all-day">
840
+ @for (slot of daySlots; track itemIndex(index, slot); let index = $index) {
841
+ <td
842
+ daySlot
843
+ [start]="slot.start"
844
+ [end]="slot.end"
713
845
  [class.k-selected]="isSlotSelected({
714
846
  start: toPlainDate(slot.start),
715
847
  end: toPlainDate(slot.end),
716
848
  isAllDay: true,
717
849
  resources: resourcesByIndex(verticalIndex)
718
850
  })"
719
- [id]="{ resourceIndex: verticalIndex, rangeIndex: 0, index: index }">
720
- <ng-container *ngIf="allDaySlotTemplateRef" [ngTemplateOutlet]="allDaySlotTemplateRef"
721
- [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(verticalIndex) }"></ng-container>
722
- </td>
723
- </tr>
724
- <tr *ngFor="let slot of timeSlots; index as index; trackBy: itemIndex" [class.k-middle-row]="isMiddleSlot(index)">
725
- <ng-container *ngFor="let resource of horizontalResources | resourceIterator; let horizontalIndex = index; trackBy: itemIndex;">
726
- <td *ngFor="let daySlot of daySlots; index as rangeIndex; trackBy: itemIndex"
727
- [ngClass]="timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)"
728
- timeSlot #timeSlot="timeSlot"
729
- [date]="daySlot.start"
730
- [invariantStart]="slot.start"
731
- [invariantEnd]="slot.end"
732
- [workDayStart]="workDayStartTime"
733
- [workDayEnd]="workDayEndTime"
734
- [workWeekStart]="workWeekStart"
735
- [workWeekEnd]="workWeekEnd"
736
- [id]="{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }"
851
+ [id]="{ resourceIndex: verticalIndex, rangeIndex: 0, index: index }">
852
+ @if (allDaySlotTemplateRef) {
853
+ <ng-container [ngTemplateOutlet]="allDaySlotTemplateRef"
854
+ [ngTemplateOutletContext]="{ date: slot.start, resources: resourcesByIndex(verticalIndex) }"></ng-container>
855
+ }
856
+ </td>
857
+ }
858
+ </tr>
859
+ }
860
+ @for (slot of timeSlots; track itemIndex(index, slot); let index = $index) {
861
+ <tr [class.k-middle-row]="isMiddleSlot(index)">
862
+ @for (resource of horizontalResources | resourceIterator; track itemIndex(horizontalIndex, resource); let horizontalIndex = $index) {
863
+ @for (daySlot of daySlots; track itemIndex(rangeIndex, daySlot); let rangeIndex = $index) {
864
+ <td
865
+ [ngClass]="timeSlotClass(slot, daySlot.start, verticalResources.length ? verticalIndex : horizontalIndex)"
866
+ timeSlot #timeSlot="timeSlot"
867
+ [date]="daySlot.start"
868
+ [invariantStart]="slot.start"
869
+ [invariantEnd]="slot.end"
870
+ [workDayStart]="workDayStartTime"
871
+ [workDayEnd]="workDayEndTime"
872
+ [workWeekStart]="workWeekStart"
873
+ [workWeekEnd]="workWeekEnd"
874
+ [id]="{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }"
737
875
  [class.k-selected]="isSlotSelected({
738
876
  start: toPlainDateTime(daySlot.start, slot.start),
739
877
  end: toPlainDateTime(daySlot.start, slot.end),
740
878
  isAllDay: false,
741
879
  resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)
742
880
  })"
743
- class="k-scheduler-cell"
744
- >
745
- <ng-container *ngIf="timeSlotTemplateRef" [ngTemplateOutlet]="timeSlotTemplateRef"
746
- [ngTemplateOutletContext]="{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex) }">
747
- </ng-container>
748
- </td>
749
- </ng-container>
750
- </tr>
751
- </ng-container>
752
- </tbody>
753
- </table>
754
- <ng-container *ngFor="let item of items | async; trackBy: itemIndex;">
755
- <div *ngFor="let itemResource of item.resources; trackBy: itemIndex;"
756
- [ngClass]="getEventClasses(item, itemResource.resources)"
757
- [ngStyle]="getEventStyles(item, itemResource)"
758
- role="button"
759
- [kendoSchedulerFocusIndex]="itemResource.leafIdx"
760
- [id]="item.elementId + '_' + itemResource.leafIdx"
761
- dayTimeViewItem
762
- [editable]="editable"
763
- [vertical]="true"
764
- [eventTemplate]="eventTemplateRef"
765
- [item]="item"
766
- [index]="item.index"
767
- [rangeIndex]="item.rangeIndex"
768
- [resources]="itemResource.resources"
769
- [resourceIndex]="itemResource.leafIdx">
770
- </div>
771
- </ng-container>
772
- <ng-container *ngIf="verticalResources.length">
773
- <ng-container *ngFor="let item of allDayItems | async; trackBy: itemIndex;">
774
- <div *ngFor="let itemResource of item.resources; trackBy: itemIndex;"
775
- [ngClass]="getEventClasses(item, itemResource.resources, true)"
776
- [ngStyle]="getEventStyles(item, itemResource, true)"
777
- role="button"
778
- [kendoSchedulerFocusIndex]="itemResource.leafIdx"
779
- [id]="item.elementId + '_' + itemResource.leafIdx"
780
- dayTimeViewItem
781
- [isAllDay]="true"
782
- [editable]="editable"
783
- [eventTemplate]="allDayEventTemplateRef"
784
- [item]="item"
785
- [index]="item.index"
786
- [rangeIndex]="item.rangeIndex"
787
- [resources]="itemResource.resources"
788
- [resourceIndex]="itemResource.leafIdx">
789
- </div>
790
- </ng-container>
791
- </ng-container>
792
- <kendo-hint-container #hintContainer>
793
- <ng-template>
794
- <div *ngIf="dragHints.length && (!allDayDragHint || verticalResources.length)"
795
- class="k-event-drag-hint"
796
- role="button"
797
- dayTimeViewItem
798
- [isAllDay]="allDayDragHint"
799
- [ngStyle]="dragHints[0].style"
800
- [ngClass]="dragHints[0].class"
801
- [dragHint]="true"
802
- [eventTemplate]="eventTemplateRef"
803
- [resources]="dragHints[0].resources"
804
- [item]="dragHints[0].item">
805
- </div>
806
-
807
- <ng-container *ngIf="resizeHints.length && (!allDayResizeHint || verticalResources.length)">
808
- <div *ngFor="let hint of resizeHints; trackBy: itemIndex;"
809
- kendoResizeHint
810
- [hint]="hint"
811
- [ngClass]="hint.class"
812
- [format]="allDayResizeHint ? allDayResizeHintFormat : resizeHintFormat">
813
- </div>
881
+ class="k-scheduler-cell"
882
+ >
883
+ @if (timeSlotTemplateRef) {
884
+ <ng-container [ngTemplateOutlet]="timeSlotTemplateRef"
885
+ [ngTemplateOutletContext]="{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex) }">
814
886
  </ng-container>
815
- </ng-template>
816
- </kendo-hint-container>
887
+ }
888
+ </td>
889
+ }
890
+ }
891
+ </tr>
892
+ }
893
+ }
894
+ </tbody>
895
+ </table>
896
+ @for (item of items | async; track itemIndex($index, item)) {
897
+ @for (itemResource of item.resources; track itemIndex($index, itemResource)) {
898
+ <div
899
+ [ngClass]="getEventClasses(item, itemResource.resources)"
900
+ [ngStyle]="getEventStyles(item, itemResource)"
901
+ role="button"
902
+ [kendoSchedulerFocusIndex]="itemResource.leafIdx"
903
+ [id]="item.elementId + '_' + itemResource.leafIdx"
904
+ dayTimeViewItem
905
+ [editable]="editable"
906
+ [vertical]="true"
907
+ [eventTemplate]="eventTemplateRef"
908
+ [item]="item"
909
+ [index]="item.index"
910
+ [rangeIndex]="item.rangeIndex"
911
+ [resources]="itemResource.resources"
912
+ [resourceIndex]="itemResource.leafIdx">
913
+ </div>
914
+ }
915
+ }
916
+ @if (verticalResources.length) {
917
+ @for (item of allDayItems | async; track itemIndex($index, item)) {
918
+ @for (itemResource of item.resources; track itemIndex($index, itemResource)) {
919
+ <div
920
+ [ngClass]="getEventClasses(item, itemResource.resources, true)"
921
+ [ngStyle]="getEventStyles(item, itemResource, true)"
922
+ role="button"
923
+ [kendoSchedulerFocusIndex]="itemResource.leafIdx"
924
+ [id]="item.elementId + '_' + itemResource.leafIdx"
925
+ dayTimeViewItem
926
+ [isAllDay]="true"
927
+ [editable]="editable"
928
+ [eventTemplate]="allDayEventTemplateRef"
929
+ [item]="item"
930
+ [index]="item.index"
931
+ [rangeIndex]="item.rangeIndex"
932
+ [resources]="itemResource.resources"
933
+ [resourceIndex]="itemResource.leafIdx">
934
+ </div>
935
+ }
936
+ }
937
+ }
938
+ <kendo-hint-container #hintContainer>
939
+ <ng-template>
940
+ @if (dragHints.length && (!allDayDragHint || verticalResources.length)) {
941
+ <div
942
+ class="k-event-drag-hint"
943
+ role="button"
944
+ dayTimeViewItem
945
+ [isAllDay]="allDayDragHint"
946
+ [ngStyle]="dragHints[0].style"
947
+ [ngClass]="dragHints[0].class"
948
+ [dragHint]="true"
949
+ [eventTemplate]="eventTemplateRef"
950
+ [resources]="dragHints[0].resources"
951
+ [item]="dragHints[0].item">
817
952
  </div>
818
- </td>
819
- </tr>
820
- </tbody>
953
+ }
954
+
955
+ @if (resizeHints.length && (!allDayResizeHint || verticalResources.length)) {
956
+ @for (hint of resizeHints; track itemIndex($index, hint)) {
957
+ <div
958
+ kendoResizeHint
959
+ [hint]="hint"
960
+ [ngClass]="hint.class"
961
+ [format]="allDayResizeHint ? allDayResizeHintFormat : resizeHintFormat">
962
+ </div>
963
+ }
964
+ }
965
+ </ng-template>
966
+ </kendo-hint-container>
967
+ </div>
968
+ </td>
969
+ </tr>
970
+ </tbody>
821
971
  </table>
822
- `,
972
+ `,
823
973
  standalone: true,
824
- imports: [NgClass, NgFor, NgIf, NgTemplateOutlet, DaySlotDirective, DayTimeViewItemComponent, NgStyle, FocusableDirective, HintContainerComponent, ResizeHintComponent, TimeSlotDirective, ResourceIteratorPipe, DatePipe, AsyncPipe]
974
+ imports: [NgClass, NgTemplateOutlet, DaySlotDirective, DayTimeViewItemComponent, NgStyle, FocusableDirective, HintContainerComponent, ResizeHintComponent, TimeSlotDirective, ResourceIteratorPipe, DatePipe, AsyncPipe]
825
975
  }]
826
976
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.ViewContextService }, { type: i3.ViewStateService }, { type: i4.IntlService }, { type: i5.DayTimeSlotService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i6.PDFService }, { type: i7.ScrollbarWidthService }], propDecorators: { allDaySlot: [{
827
977
  type: Input