@progress/kendo-angular-scheduler 3.0.2 → 3.1.0-dev.202204121440

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 (70) hide show
  1. package/dist/cdn/js/kendo-angular-scheduler.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/package-metadata.js +1 -1
  4. package/dist/es/scheduler.component.js +9 -0
  5. package/dist/es/types/ongoing-events-settings.interface.js +4 -0
  6. package/dist/es/views/common/base-view.js +3 -0
  7. package/dist/es/views/common/configuration-view-base.js +14 -0
  8. package/dist/es/views/constants.js +6 -0
  9. package/dist/es/views/day-time/day-time-view-base.js +15 -0
  10. package/dist/es/views/day-time/day-time-view.component.js +36 -2
  11. package/dist/es/views/month/month-view-renderer.component.js +47 -5
  12. package/dist/es/views/month/month-view.component.js +1 -1
  13. package/dist/es/views/multi-day/day-view.component.js +1 -1
  14. package/dist/es/views/multi-day/multi-day-view.component.js +1 -1
  15. package/dist/es/views/multi-day/week-view.component.js +1 -1
  16. package/dist/es/views/multi-day/work-week-view.component.js +1 -1
  17. package/dist/es/views/timeline/timeline-month-view.component.js +1 -1
  18. package/dist/es/views/timeline/timeline-view.component.js +1 -1
  19. package/dist/es/views/timeline/timeline-week-view.component.js +1 -1
  20. package/dist/es/views/utils.js +5 -1
  21. package/dist/es2015/index.metadata.json +1 -1
  22. package/dist/es2015/package-metadata.js +1 -1
  23. package/dist/es2015/scheduler.component.d.ts +5 -1
  24. package/dist/es2015/scheduler.component.js +9 -0
  25. package/dist/es2015/types/ongoing-events-settings.interface.d.ts +23 -0
  26. package/dist/es2015/types/ongoing-events-settings.interface.js +4 -0
  27. package/dist/es2015/types.d.ts +1 -0
  28. package/dist/es2015/views/common/base-view.d.ts +6 -0
  29. package/dist/es2015/views/common/base-view.js +3 -0
  30. package/dist/es2015/views/common/configuration-view-base.d.ts +9 -1
  31. package/dist/es2015/views/common/configuration-view-base.js +10 -0
  32. package/dist/es2015/views/constants.d.ts +6 -0
  33. package/dist/es2015/views/constants.js +6 -0
  34. package/dist/es2015/views/day-time/day-time-view-base.d.ts +9 -1
  35. package/dist/es2015/views/day-time/day-time-view-base.js +11 -0
  36. package/dist/es2015/views/day-time/day-time-view.component.d.ts +6 -0
  37. package/dist/es2015/views/day-time/day-time-view.component.js +34 -2
  38. package/dist/es2015/views/month/month-view-renderer.component.d.ts +10 -1
  39. package/dist/es2015/views/month/month-view-renderer.component.js +45 -5
  40. package/dist/es2015/views/month/month-view.component.js +1 -0
  41. package/dist/es2015/views/multi-day/day-view.component.js +1 -0
  42. package/dist/es2015/views/multi-day/multi-day-view.component.js +1 -0
  43. package/dist/es2015/views/multi-day/week-view.component.js +1 -0
  44. package/dist/es2015/views/multi-day/work-week-view.component.js +1 -0
  45. package/dist/es2015/views/timeline/timeline-month-view.component.js +1 -0
  46. package/dist/es2015/views/timeline/timeline-view.component.js +1 -0
  47. package/dist/es2015/views/timeline/timeline-week-view.component.js +1 -0
  48. package/dist/es2015/views/utils.js +5 -1
  49. package/dist/fesm2015/index.js +198 -79
  50. package/dist/fesm5/index.js +179 -56
  51. package/dist/npm/package-metadata.js +1 -1
  52. package/dist/npm/scheduler.component.js +9 -0
  53. package/dist/npm/types/ongoing-events-settings.interface.js +6 -0
  54. package/dist/npm/views/common/base-view.js +3 -0
  55. package/dist/npm/views/common/configuration-view-base.js +14 -0
  56. package/dist/npm/views/constants.js +6 -0
  57. package/dist/npm/views/day-time/day-time-view-base.js +15 -0
  58. package/dist/npm/views/day-time/day-time-view.component.js +34 -0
  59. package/dist/npm/views/month/month-view-renderer.component.js +49 -7
  60. package/dist/npm/views/month/month-view.component.js +1 -1
  61. package/dist/npm/views/multi-day/day-view.component.js +1 -1
  62. package/dist/npm/views/multi-day/multi-day-view.component.js +1 -1
  63. package/dist/npm/views/multi-day/week-view.component.js +1 -1
  64. package/dist/npm/views/multi-day/work-week-view.component.js +1 -1
  65. package/dist/npm/views/timeline/timeline-month-view.component.js +1 -1
  66. package/dist/npm/views/timeline/timeline-view.component.js +1 -1
  67. package/dist/npm/views/timeline/timeline-week-view.component.js +1 -1
  68. package/dist/npm/views/utils.js +5 -1
  69. package/dist/systemjs/kendo-angular-scheduler.js +1 -1
  70. package/package.json +2 -2
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { __extends, __decorate, __param, __metadata, __assign, __generator } from 'tslib';
6
- import { Directive, Optional, TemplateRef, Injectable, NgZone, EventEmitter, Input, Renderer2, ElementRef, ChangeDetectorRef, Inject, isDevMode, HostBinding, Component, Output, ContentChild, ContentChildren, QueryList, ViewChild, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, forwardRef, NgModule, LOCALE_ID, Pipe, ViewChildren, HostListener } from '@angular/core';
6
+ import { Directive, Optional, TemplateRef, Injectable, NgZone, EventEmitter, Input, Renderer2, ElementRef, ChangeDetectorRef, Inject, isDevMode, HostBinding, Component, Output, ContentChild, ContentChildren, QueryList, ViewChild, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, forwardRef, NgModule, LOCALE_ID, ViewChildren, Pipe, HostListener } from '@angular/core';
7
7
  import { LocalizationService, L10N_PREFIX, RTL, MessageService, ComponentMessages } from '@progress/kendo-angular-l10n';
8
8
  import { hasObservers, isDocumentAvailable, isChanged, anyChanged, ResizeSensorComponent, EventsModule, guid, Keys, ResizeSensorModule } from '@progress/kendo-angular-common';
9
9
  import { isEqualDate, getDate, Day, ZonedDate, toLocalDate, MS_PER_DAY, addDays, firstDayOfMonth, addMonths, firstDayInWeek, timezoneNames } from '@progress/kendo-date-math';
@@ -32,7 +32,7 @@ var packageMetadata = {
32
32
  name: '@progress/kendo-angular-scheduler',
33
33
  productName: 'Kendo UI for Angular',
34
34
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
35
- publishDate: 1646219330,
35
+ publishDate: 1649774242,
36
36
  version: '',
37
37
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
38
38
  };
@@ -2077,7 +2077,11 @@ function eventResources(event, _a) {
2077
2077
  for (var valueIdx = 0; valueIdx < values.length; valueIdx++) {
2078
2078
  var dataIdx = getDataIdx(values[valueIdx], resource);
2079
2079
  if (dataIdx < 0) {
2080
- return [{ leafIdx: hasGroups ? -1 : 0, resources: [] }];
2080
+ if (hasGroups) {
2081
+ // No match for this resource, but the event might still match other resources.
2082
+ continue;
2083
+ }
2084
+ return [{ leafIdx: 0, resources: [] }];
2081
2085
  }
2082
2086
  var item = resource.data[dataIdx];
2083
2087
  // has groups - need all copies of the multiple resource
@@ -2357,6 +2361,10 @@ var SchedulerComponent = /** @class */ (function () {
2357
2361
  * Specifies the Scheduler current time marker settings.
2358
2362
  */
2359
2363
  this.currentTimeMarker = true;
2364
+ /**
2365
+ * Specifies the settings for the ongoing events highlight of the Scheduler.
2366
+ */
2367
+ this.highlightOngoingEvents = true;
2360
2368
  /**
2361
2369
  * A callback that executes for each slot of the Scheduler view.
2362
2370
  * If it returns `true`, the `k-state-selected` CSS class will be added to the cell, making it visibly selected.
@@ -2969,6 +2977,7 @@ var SchedulerComponent = /** @class */ (function () {
2969
2977
  selectable: this.selectable,
2970
2978
  timezone: this.timezone,
2971
2979
  currentTimeMarker: this.currentTimeMarker,
2980
+ highlightOngoingEvents: this.highlightOngoingEvents,
2972
2981
  slotClass: this.slotClass,
2973
2982
  slotFill: this.slotFill,
2974
2983
  columnWidth: this.columnWidth,
@@ -3233,6 +3242,10 @@ var SchedulerComponent = /** @class */ (function () {
3233
3242
  Input(),
3234
3243
  __metadata("design:type", Object)
3235
3244
  ], SchedulerComponent.prototype, "currentTimeMarker", void 0);
3245
+ __decorate([
3246
+ Input(),
3247
+ __metadata("design:type", Object)
3248
+ ], SchedulerComponent.prototype, "highlightOngoingEvents", void 0);
3236
3249
  __decorate([
3237
3250
  Input(),
3238
3251
  __metadata("design:type", Function)
@@ -4444,6 +4457,16 @@ var ConfigurationViewBase = /** @class */ (function (_super) {
4444
4457
  enumerable: true,
4445
4458
  configurable: true
4446
4459
  });
4460
+ Object.defineProperty(ConfigurationViewBase.prototype, "viewHighlightOngoingEvents", {
4461
+ /**
4462
+ * @hidden
4463
+ */
4464
+ get: function () {
4465
+ return isPresent(this.highlightOngoingEvents) ? this.highlightOngoingEvents : this.schedulerOptions.highlightOngoingEvents;
4466
+ },
4467
+ enumerable: true,
4468
+ configurable: true
4469
+ });
4447
4470
  Object.defineProperty(ConfigurationViewBase.prototype, "viewWeekStart", {
4448
4471
  /**
4449
4472
  * @hidden
@@ -4475,6 +4498,10 @@ var ConfigurationViewBase = /** @class */ (function (_super) {
4475
4498
  Input(),
4476
4499
  __metadata("design:type", Function)
4477
4500
  ], ConfigurationViewBase.prototype, "eventStyles", void 0);
4501
+ __decorate([
4502
+ Input(),
4503
+ __metadata("design:type", Object)
4504
+ ], ConfigurationViewBase.prototype, "highlightOngoingEvents", void 0);
4478
4505
  __decorate([
4479
4506
  ViewChild('content', { static: true }),
4480
4507
  __metadata("design:type", TemplateRef)
@@ -5688,6 +5715,12 @@ var MS_PER_MINUTE = 60 * MS_PER_SECOND;
5688
5715
  var BORDER_WIDTH = 1;
5689
5716
  /** @hidden */
5690
5717
  var DEFAULT_EVENT_HEIGHT = 25;
5718
+ /** @hidden */
5719
+ var ONGOING_EVENT_CSS_CLASS = 'k-event-ongoing';
5720
+ /** @hidden */
5721
+ var DAYS_IN_WEEK_COUNT = 7;
5722
+ /** @hidden */
5723
+ var WEEKS_COUNT = 6;
5691
5724
 
5692
5725
  //better try to measure this one
5693
5726
  var MORE_BUTTON_HEIGHT = 13;
@@ -6315,7 +6348,7 @@ var MonthViewComponent = /** @class */ (function (_super) {
6315
6348
  // tslint:disable-next-line:no-forward-ref
6316
6349
  useExisting: forwardRef(function () { return MonthViewComponent_1; })
6317
6350
  }],
6318
- template: "\n <ng-template #content>\n <month-view\n [eventHeight]=\"viewEventHeight\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [monthDaySlotTemplate]=\"monthDaySlotTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\"\n [weekStart]=\"viewWeekStart\">\n </month-view>\n </ng-template>\n "
6351
+ template: "\n <ng-template #content>\n <month-view\n [eventHeight]=\"viewEventHeight\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [monthDaySlotTemplate]=\"monthDaySlotTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [weekStart]=\"viewWeekStart\">\n </month-view>\n </ng-template>\n "
6319
6352
  }),
6320
6353
  __metadata("design:paramtypes", [LocalizationService, ChangeDetectorRef, ViewContextService, ViewStateService])
6321
6354
  ], MonthViewComponent);
@@ -6426,6 +6459,9 @@ var BaseView = /** @class */ (function () {
6426
6459
  this.pdfService = pdfService;
6427
6460
  this.localization = localization;
6428
6461
  this.cdr = cdr;
6462
+ /**
6463
+ * The non-all-day events.
6464
+ */
6429
6465
  this.items = new BehaviorSubject(null);
6430
6466
  this.horizontalResources = [];
6431
6467
  this.verticalResources = [];
@@ -7437,8 +7473,6 @@ var BaseView = /** @class */ (function () {
7437
7473
  return BaseView;
7438
7474
  }());
7439
7475
 
7440
- var DAYS_IN_WEEK_COUNT = 7;
7441
- var WEEKS_COUNT = 6;
7442
7476
  /**
7443
7477
  * @hidden
7444
7478
  */
@@ -7448,6 +7482,7 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7448
7482
  var _this = _super.call(this, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, changeDetector) || this;
7449
7483
  _this.resizeHintFormat = { skeleton: 'Md' };
7450
7484
  _this.weeks = [];
7485
+ _this.updateOngoingEvents = _this.updateOngoingEvents.bind(_this);
7451
7486
  return _this;
7452
7487
  }
7453
7488
  Object.defineProperty(MonthViewRendererComponent.prototype, "monthDaySlotTemplateRef", {
@@ -7463,6 +7498,14 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7463
7498
  }
7464
7499
  _super.prototype.ngOnChanges.call(this, changes);
7465
7500
  };
7501
+ MonthViewRendererComponent.prototype.ngAfterViewInit = function () {
7502
+ this.updateOngoingEvents();
7503
+ _super.prototype.ngAfterViewInit.call(this);
7504
+ };
7505
+ MonthViewRendererComponent.prototype.ngOnDestroy = function () {
7506
+ clearTimeout(this.ongoingEventsTimeout);
7507
+ _super.prototype.ngOnDestroy.call(this);
7508
+ };
7466
7509
  MonthViewRendererComponent.prototype.horizontalColspan = function (resourceIndex) {
7467
7510
  var resources = this.horizontalResources;
7468
7511
  var result = DAYS_IN_WEEK_COUNT;
@@ -7593,6 +7636,30 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7593
7636
  MonthViewRendererComponent.prototype.slotByPosition = function (x, y) {
7594
7637
  return this.slotService.slotByPosition(x, y);
7595
7638
  };
7639
+ MonthViewRendererComponent.prototype.updateOngoingEvents = function () {
7640
+ var _this = this;
7641
+ var disabled = !this.highlightOngoingEvents || this.highlightOngoingEvents.enabled === false;
7642
+ if (!isDocumentAvailable() || disabled) {
7643
+ return;
7644
+ }
7645
+ clearTimeout(this.ongoingEventsTimeout);
7646
+ this.zone.runOutsideAngular(function () {
7647
+ _this.ongoingEventsTimeout = setTimeout(_this.updateOngoingEvents, _this.highlightOngoingEvents.updateInterval || MS_PER_MINUTE);
7648
+ });
7649
+ this.toggleOngoingClass();
7650
+ };
7651
+ MonthViewRendererComponent.prototype.currentTime = function () {
7652
+ return new Date();
7653
+ };
7654
+ MonthViewRendererComponent.prototype.toggleOngoingClass = function () {
7655
+ var _this = this;
7656
+ var now = this.currentTime();
7657
+ var cssClass = isPresent(this.highlightOngoingEvents.cssClass) ? this.highlightOngoingEvents.cssClass : ONGOING_EVENT_CSS_CLASS;
7658
+ this.eventElements.forEach(function (event) {
7659
+ var isOngoing = dateInRange(now, event.item.start, event.item.end);
7660
+ _this.renderer[isOngoing ? 'addClass' : 'removeClass'](event.nativeElement, cssClass);
7661
+ });
7662
+ };
7596
7663
  MonthViewRendererComponent.prototype.createDaySlots = function (_a) {
7597
7664
  var start = _a.start;
7598
7665
  var weeks = [];
@@ -7611,6 +7678,14 @@ var MonthViewRendererComponent = /** @class */ (function (_super) {
7611
7678
  Input(),
7612
7679
  __metadata("design:type", TemplateRef)
7613
7680
  ], MonthViewRendererComponent.prototype, "monthDaySlotTemplate", void 0);
7681
+ __decorate([
7682
+ Input(),
7683
+ __metadata("design:type", Object)
7684
+ ], MonthViewRendererComponent.prototype, "highlightOngoingEvents", void 0);
7685
+ __decorate([
7686
+ ViewChildren(MonthViewItemComponent),
7687
+ __metadata("design:type", QueryList)
7688
+ ], MonthViewRendererComponent.prototype, "eventElements", void 0);
7614
7689
  MonthViewRendererComponent = __decorate([
7615
7690
  Component({
7616
7691
  // tslint:disable-next-line:component-selector
@@ -8168,6 +8243,7 @@ var WORK_WEEK_END = 'workWeekEnd';
8168
8243
  var SLOT_DURATION = 'slotDuration';
8169
8244
  var SLOT_DIVISIONS = 'slotDivisions';
8170
8245
  var CURRENT_TIME_MARKER = 'currentTimeMarker';
8246
+ var HIGHLIGHT_ONGOING_EVENTS = 'highlightOngoingEvents';
8171
8247
  /**
8172
8248
  * @hidden
8173
8249
  */
@@ -8286,6 +8362,16 @@ var DayTimeViewBase = /** @class */ (function (_super) {
8286
8362
  enumerable: true,
8287
8363
  configurable: true
8288
8364
  });
8365
+ Object.defineProperty(DayTimeViewBase.prototype, "viewHighlightOngoingEvents", {
8366
+ /**
8367
+ * @hidden
8368
+ */
8369
+ get: function () {
8370
+ return this.optionValue(HIGHLIGHT_ONGOING_EVENTS);
8371
+ },
8372
+ enumerable: true,
8373
+ configurable: true
8374
+ });
8289
8375
  Object.defineProperty(DayTimeViewBase.prototype, "viewScrollTime", {
8290
8376
  /**
8291
8377
  * @hidden
@@ -8355,6 +8441,10 @@ var DayTimeViewBase = /** @class */ (function (_super) {
8355
8441
  Input(),
8356
8442
  __metadata("design:type", Object)
8357
8443
  ], DayTimeViewBase.prototype, "currentTimeMarker", void 0);
8444
+ __decorate([
8445
+ Input(),
8446
+ __metadata("design:type", Object)
8447
+ ], DayTimeViewBase.prototype, "highlightOngoingEvents", void 0);
8358
8448
  return DayTimeViewBase;
8359
8449
  }(ConfigurationViewBase));
8360
8450
 
@@ -8456,7 +8546,7 @@ var DayViewComponent = /** @class */ (function (_super) {
8456
8546
  // tslint:disable-next-line:no-forward-ref
8457
8547
  useExisting: forwardRef(function () { return DayViewComponent_1; })
8458
8548
  }],
8459
- template: "\n <ng-template #content>\n <multi-day-view\n [name]=\"name\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8549
+ template: "\n <ng-template #content>\n <multi-day-view\n [name]=\"name\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8460
8550
  }),
8461
8551
  __metadata("design:paramtypes", [LocalizationService, ChangeDetectorRef, ViewContextService, ViewStateService])
8462
8552
  ], DayViewComponent);
@@ -8562,7 +8652,7 @@ var MultiDayViewComponent = /** @class */ (function (_super) {
8562
8652
  // tslint:disable-next-line:no-forward-ref
8563
8653
  useExisting: forwardRef(function () { return MultiDayViewComponent_1; })
8564
8654
  }],
8565
- template: "\n <ng-template #content>\n <multi-day-view\n viewName=\"day\"\n [name]=\"name\"\n [numberOfDays]=\"numberOfDays\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8655
+ template: "\n <ng-template #content>\n <multi-day-view\n viewName=\"day\"\n [name]=\"name\"\n [numberOfDays]=\"numberOfDays\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8566
8656
  }),
8567
8657
  __metadata("design:paramtypes", [LocalizationService, ChangeDetectorRef, ViewContextService, ViewStateService])
8568
8658
  ], MultiDayViewComponent);
@@ -8651,7 +8741,7 @@ var WeekViewComponent = /** @class */ (function (_super) {
8651
8741
  // tslint:disable-next-line:no-forward-ref
8652
8742
  useExisting: forwardRef(function () { return WeekViewComponent_1; })
8653
8743
  }],
8654
- template: "\n <ng-template #content>\n <multi-day-view\n [name]=\"name\"\n [numberOfDays]=\"7\"\n [getStartDate]=\"getStartDate\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [weekStart]=\"viewWeekStart\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8744
+ template: "\n <ng-template #content>\n <multi-day-view\n [name]=\"name\"\n [numberOfDays]=\"7\"\n [getStartDate]=\"getStartDate\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [weekStart]=\"viewWeekStart\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8655
8745
  }),
8656
8746
  __metadata("design:paramtypes", [IntlService,
8657
8747
  LocalizationService,
@@ -8723,7 +8813,7 @@ var WorkWeekViewComponent = /** @class */ (function (_super) {
8723
8813
  // tslint:disable-next-line:no-forward-ref
8724
8814
  useExisting: forwardRef(function () { return WorkWeekViewComponent_1; })
8725
8815
  }],
8726
- template: "\n <ng-template #content>\n <multi-day-view\n viewName=\"workWeekview\"\n [name]=\"name\"\n [numberOfDays]=\"numberOfDays\"\n [getStartDate]=\"getStartDate\"\n [getNextDate]=\"getNextDate\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8816
+ template: "\n <ng-template #content>\n <multi-day-view\n viewName=\"workWeekview\"\n [name]=\"name\"\n [numberOfDays]=\"numberOfDays\"\n [getStartDate]=\"getStartDate\"\n [getNextDate]=\"getNextDate\"\n [eventHeight]=\"viewEventHeight\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotFill]=\"viewSlotFill\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [allDaySlotTemplate]=\"allDaySlotTemplate?.templateRef\"\n [allDayEventTemplate]=\"allDayEventTemplate?.templateRef\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [minorTimeHeaderTemplate]=\"minorTimeHeaderTemplate?.templateRef\"\n [majorTimeHeaderTemplate]=\"majorTimeHeaderTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
8727
8817
  }),
8728
8818
  __metadata("design:paramtypes", [IntlService,
8729
8819
  LocalizationService,
@@ -9491,6 +9581,49 @@ function createTimeSlots(intlService, _a) {
9491
9581
  return slots;
9492
9582
  }
9493
9583
 
9584
+ /**
9585
+ * @hidden
9586
+ */
9587
+ var DayTimeViewItemComponent = /** @class */ (function (_super) {
9588
+ __extends(DayTimeViewItemComponent, _super);
9589
+ function DayTimeViewItemComponent(intlService, slotService, localization, focusService, element, renderer, localeId) {
9590
+ var _this = _super.call(this, slotService, localization, focusService, element, renderer, localeId) || this;
9591
+ _this.intlService = intlService;
9592
+ _this.localeId = localeId;
9593
+ return _this;
9594
+ }
9595
+ Object.defineProperty(DayTimeViewItemComponent.prototype, "eventTime", {
9596
+ get: function () {
9597
+ return this.intlService.format('{0:t}–{1:t}', toLocalDate(this.item.startTime), toLocalDate(this.item.endTime));
9598
+ },
9599
+ enumerable: true,
9600
+ configurable: true
9601
+ });
9602
+ __decorate([
9603
+ Input(),
9604
+ __metadata("design:type", Boolean)
9605
+ ], DayTimeViewItemComponent.prototype, "vertical", void 0);
9606
+ __decorate([
9607
+ Input(),
9608
+ __metadata("design:type", Boolean)
9609
+ ], DayTimeViewItemComponent.prototype, "isAllDay", void 0);
9610
+ DayTimeViewItemComponent = __decorate([
9611
+ Component({
9612
+ // tslint:disable-next-line:component-selector
9613
+ selector: '[dayTimeViewItem]',
9614
+ template: "\n <span class=\"k-event-actions\">\n <span class=\"k-icon k-i-arrow-60-left\" *ngIf=\"item.tail && !vertical\"></span>\n <span class=\"k-icon k-i-reload\" *ngIf=\"isRecurrence\"></span>\n <span class=\"k-icon k-i-non-recurrence\" *ngIf=\"isRecurrenceException\"></span>\n </span>\n <ng-container *ngIf=\"eventTemplate\" [ngTemplateOutlet]=\"eventTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.event, event: item.event, resources: resources }\">\n </ng-container>\n <div *ngIf=\"!eventTemplate\" [attr.title]=\"eventTitle\">\n <div class=\"k-event-template k-event-time\" *ngIf=\"!isAllDay\">{{ eventTime }}</div>\n <div class=\"k-event-template\" aria-hidden=\"true\">{{ item.event.title }}</div>\n </div>\n\n <span class=\"k-event-actions\">\n <span *ngIf=\"removable\" class=\"k-link k-event-delete\" aria-hidden=\"true\" [attr.title]=\"deleteMessage\">\n <span class=\"k-icon k-i-close\"></span>\n </span>\n <span class=\"k-icon k-i-arrow-60-right\" *ngIf=\"item.head && !vertical\"></span>\n </span>\n\n <span class=\"k-event-top-actions\" *ngIf=\"item.tail && vertical\">\n <span class=\"k-icon k-i-arrow-60-up\"></span>\n </span>\n\n <span class=\"k-event-bottom-actions\" *ngIf=\"item.head && vertical\">\n <span class=\"k-icon k-i-arrow-60-down\"></span>\n </span>\n\n <ng-container *ngIf=\"resizable && vertical\">\n <span class=\"k-resize-handle k-resize-n\" *ngIf=\"!item.tail\"></span>\n <span class=\"k-resize-handle k-resize-s\" *ngIf=\"!item.head\"></span>\n </ng-container>\n\n <ng-container *ngIf=\"resizable && !vertical\">\n <span class=\"k-resize-handle k-resize-w\"></span>\n <span class=\"k-resize-handle k-resize-e\"></span>\n </ng-container>\n "
9615
+ }),
9616
+ __param(6, Inject(LOCALE_ID)),
9617
+ __metadata("design:paramtypes", [IntlService,
9618
+ DayTimeSlotService,
9619
+ LocalizationService,
9620
+ FocusService,
9621
+ ElementRef,
9622
+ Renderer2, String])
9623
+ ], DayTimeViewItemComponent);
9624
+ return DayTimeViewItemComponent;
9625
+ }(BaseViewItem));
9626
+
9494
9627
  var getStartDate = function (date) { return getDate(date); };
9495
9628
  var getEndDate = function (start, numberOfDays) { return getDate(addDays(start, numberOfDays || 1)); };
9496
9629
  var getNextDate = function (date, count, numberOfDays) { return getDate(addDays(date, numberOfDays * count)); };
@@ -9522,6 +9655,8 @@ var DayTimeViewComponent = /** @class */ (function (_super) {
9522
9655
  _this.verticalTime = true;
9523
9656
  _this.initialUpdate = true;
9524
9657
  _this.updateCurrentTime = _this.updateCurrentTime.bind(_this);
9658
+ _this.toggleOngoingClass = _this.toggleOngoingClass.bind(_this);
9659
+ _this.updateOngoingEvents = _this.updateOngoingEvents.bind(_this);
9525
9660
  return _this;
9526
9661
  }
9527
9662
  Object.defineProperty(DayTimeViewComponent.prototype, "classNames", {
@@ -9563,6 +9698,7 @@ var DayTimeViewComponent = /** @class */ (function (_super) {
9563
9698
  DayTimeViewComponent.prototype.ngOnDestroy = function () {
9564
9699
  _super.prototype.ngOnDestroy.call(this);
9565
9700
  clearTimeout(this.currentTimeTimeout);
9701
+ clearTimeout(this.ongoingEventsTimeout);
9566
9702
  };
9567
9703
  DayTimeViewComponent.prototype.verticalItem = function (leafIndex, resourceIndex) {
9568
9704
  var data = this.verticalResources[resourceIndex].data || [];
@@ -9583,6 +9719,15 @@ var DayTimeViewComponent = /** @class */ (function (_super) {
9583
9719
  });
9584
9720
  }
9585
9721
  };
9722
+ DayTimeViewComponent.prototype.toggleOngoingClass = function () {
9723
+ var _this = this;
9724
+ var now = this.currentTime();
9725
+ var cssClass = isPresent(this.highlightOngoingEvents.cssClass) ? this.highlightOngoingEvents.cssClass : ONGOING_EVENT_CSS_CLASS;
9726
+ this.eventElements.forEach(function (event) {
9727
+ var isOngoing = dateInRange(now, event.item.start, event.item.end);
9728
+ _this.renderer[isOngoing ? 'addClass' : 'removeClass'](event.nativeElement, cssClass);
9729
+ });
9730
+ };
9586
9731
  DayTimeViewComponent.prototype.scrollToTime = function (time) {
9587
9732
  if (time === void 0) { time = this.scrollTime; }
9588
9733
  var date;
@@ -9611,6 +9756,7 @@ var DayTimeViewComponent = /** @class */ (function (_super) {
9611
9756
  DayTimeViewComponent.prototype.updateView = function () {
9612
9757
  _super.prototype.updateView.call(this);
9613
9758
  this.updateCurrentTime();
9759
+ this.updateOngoingEvents();
9614
9760
  if (this.initialUpdate) {
9615
9761
  this.scrollToTime();
9616
9762
  this.initialUpdate = false;
@@ -9650,6 +9796,18 @@ var DayTimeViewComponent = /** @class */ (function (_super) {
9650
9796
  this.positionCurrentTime();
9651
9797
  }
9652
9798
  };
9799
+ DayTimeViewComponent.prototype.updateOngoingEvents = function () {
9800
+ var _this = this;
9801
+ var disabled = !this.highlightOngoingEvents || this.highlightOngoingEvents.enabled === false;
9802
+ if (!isDocumentAvailable() || disabled) {
9803
+ return;
9804
+ }
9805
+ clearTimeout(this.ongoingEventsTimeout);
9806
+ this.zone.runOutsideAngular(function () {
9807
+ _this.ongoingEventsTimeout = setTimeout(_this.updateOngoingEvents, _this.highlightOngoingEvents.updateInterval || MS_PER_MINUTE);
9808
+ });
9809
+ this.toggleOngoingClass();
9810
+ };
9653
9811
  DayTimeViewComponent.prototype.positionCurrentTime = function () {
9654
9812
  var _this = this;
9655
9813
  if (this.currentTimeElements && this.currentTimeElements.length) {
@@ -9866,10 +10024,18 @@ var DayTimeViewComponent = /** @class */ (function (_super) {
9866
10024
  Input(),
9867
10025
  __metadata("design:type", Object)
9868
10026
  ], DayTimeViewComponent.prototype, "currentTimeMarker", void 0);
10027
+ __decorate([
10028
+ Input(),
10029
+ __metadata("design:type", Object)
10030
+ ], DayTimeViewComponent.prototype, "highlightOngoingEvents", void 0);
9869
10031
  __decorate([
9870
10032
  ViewChildren('currentTimeMarker'),
9871
10033
  __metadata("design:type", QueryList)
9872
10034
  ], DayTimeViewComponent.prototype, "currentTimeElements", void 0);
10035
+ __decorate([
10036
+ ViewChildren(DayTimeViewItemComponent),
10037
+ __metadata("design:type", QueryList)
10038
+ ], DayTimeViewComponent.prototype, "eventElements", void 0);
9873
10039
  __decorate([
9874
10040
  ViewChildren('currentTimeArrow'),
9875
10041
  __metadata("design:type", QueryList)
@@ -10359,49 +10525,6 @@ var DaySlotDirective = /** @class */ (function (_super) {
10359
10525
  return DaySlotDirective;
10360
10526
  }(BaseSlotDirective));
10361
10527
 
10362
- /**
10363
- * @hidden
10364
- */
10365
- var DayTimeViewItemComponent = /** @class */ (function (_super) {
10366
- __extends(DayTimeViewItemComponent, _super);
10367
- function DayTimeViewItemComponent(intlService, slotService, localization, focusService, element, renderer, localeId) {
10368
- var _this = _super.call(this, slotService, localization, focusService, element, renderer, localeId) || this;
10369
- _this.intlService = intlService;
10370
- _this.localeId = localeId;
10371
- return _this;
10372
- }
10373
- Object.defineProperty(DayTimeViewItemComponent.prototype, "eventTime", {
10374
- get: function () {
10375
- return this.intlService.format('{0:t}–{1:t}', toLocalDate(this.item.startTime), toLocalDate(this.item.endTime));
10376
- },
10377
- enumerable: true,
10378
- configurable: true
10379
- });
10380
- __decorate([
10381
- Input(),
10382
- __metadata("design:type", Boolean)
10383
- ], DayTimeViewItemComponent.prototype, "vertical", void 0);
10384
- __decorate([
10385
- Input(),
10386
- __metadata("design:type", Boolean)
10387
- ], DayTimeViewItemComponent.prototype, "isAllDay", void 0);
10388
- DayTimeViewItemComponent = __decorate([
10389
- Component({
10390
- // tslint:disable-next-line:component-selector
10391
- selector: '[dayTimeViewItem]',
10392
- template: "\n <span class=\"k-event-actions\">\n <span class=\"k-icon k-i-arrow-60-left\" *ngIf=\"item.tail && !vertical\"></span>\n <span class=\"k-icon k-i-reload\" *ngIf=\"isRecurrence\"></span>\n <span class=\"k-icon k-i-non-recurrence\" *ngIf=\"isRecurrenceException\"></span>\n </span>\n <ng-container *ngIf=\"eventTemplate\" [ngTemplateOutlet]=\"eventTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.event, event: item.event, resources: resources }\">\n </ng-container>\n <div *ngIf=\"!eventTemplate\" [attr.title]=\"eventTitle\">\n <div class=\"k-event-template k-event-time\" *ngIf=\"!isAllDay\">{{ eventTime }}</div>\n <div class=\"k-event-template\" aria-hidden=\"true\">{{ item.event.title }}</div>\n </div>\n\n <span class=\"k-event-actions\">\n <span *ngIf=\"removable\" class=\"k-link k-event-delete\" aria-hidden=\"true\" [attr.title]=\"deleteMessage\">\n <span class=\"k-icon k-i-close\"></span>\n </span>\n <span class=\"k-icon k-i-arrow-60-right\" *ngIf=\"item.head && !vertical\"></span>\n </span>\n\n <span class=\"k-event-top-actions\" *ngIf=\"item.tail && vertical\">\n <span class=\"k-icon k-i-arrow-60-up\"></span>\n </span>\n\n <span class=\"k-event-bottom-actions\" *ngIf=\"item.head && vertical\">\n <span class=\"k-icon k-i-arrow-60-down\"></span>\n </span>\n\n <ng-container *ngIf=\"resizable && vertical\">\n <span class=\"k-resize-handle k-resize-n\" *ngIf=\"!item.tail\"></span>\n <span class=\"k-resize-handle k-resize-s\" *ngIf=\"!item.head\"></span>\n </ng-container>\n\n <ng-container *ngIf=\"resizable && !vertical\">\n <span class=\"k-resize-handle k-resize-w\"></span>\n <span class=\"k-resize-handle k-resize-e\"></span>\n </ng-container>\n "
10393
- }),
10394
- __param(6, Inject(LOCALE_ID)),
10395
- __metadata("design:paramtypes", [IntlService,
10396
- DayTimeSlotService,
10397
- LocalizationService,
10398
- FocusService,
10399
- ElementRef,
10400
- Renderer2, String])
10401
- ], DayTimeViewItemComponent);
10402
- return DayTimeViewItemComponent;
10403
- }(BaseViewItem));
10404
-
10405
10528
  var DIRECTIVES = [TimeSlotDirective, DaySlotDirective, DayTimeViewItemComponent];
10406
10529
  /**
10407
10530
  * @hidden
@@ -10759,7 +10882,7 @@ var TimelineViewComponent = /** @class */ (function (_super) {
10759
10882
  // tslint:disable-next-line:no-forward-ref
10760
10883
  useExisting: forwardRef(function () { return TimelineViewComponent_1; })
10761
10884
  }],
10762
- template: "\n <ng-template #content>\n <timeline-multi-day-view\n [name]=\"name\"\n [eventHeight]=\"viewEventHeight\"\n [columnWidth]=\"viewColumnWidth\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </timeline-multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
10885
+ template: "\n <ng-template #content>\n <timeline-multi-day-view\n [name]=\"name\"\n [eventHeight]=\"viewEventHeight\"\n [columnWidth]=\"viewColumnWidth\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </timeline-multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
10763
10886
  }),
10764
10887
  __metadata("design:paramtypes", [LocalizationService, ChangeDetectorRef, ViewContextService, ViewStateService])
10765
10888
  ], TimelineViewComponent);
@@ -10831,7 +10954,7 @@ var TimelineWeekViewComponent = /** @class */ (function (_super) {
10831
10954
  // tslint:disable-next-line:no-forward-ref
10832
10955
  useExisting: forwardRef(function () { return TimelineWeekViewComponent_1; })
10833
10956
  }],
10834
- template: "\n <ng-template #content>\n <timeline-multi-day-view\n viewName=\"timeline-week\"\n [name]=\"name\"\n [numberOfDays]=\"7\"\n [getStartDate]=\"getStartDate\"\n [eventHeight]=\"viewEventHeight\"\n [columnWidth]=\"viewColumnWidth\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [weekStart]=\"viewWeekStart\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </timeline-multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
10957
+ template: "\n <ng-template #content>\n <timeline-multi-day-view\n viewName=\"timeline-week\"\n [name]=\"name\"\n [numberOfDays]=\"7\"\n [getStartDate]=\"getStartDate\"\n [eventHeight]=\"viewEventHeight\"\n [columnWidth]=\"viewColumnWidth\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [weekStart]=\"viewWeekStart\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </timeline-multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
10835
10958
  }),
10836
10959
  __metadata("design:paramtypes", [IntlService,
10837
10960
  LocalizationService,
@@ -10916,7 +11039,7 @@ var TimelineMonthViewComponent = /** @class */ (function (_super) {
10916
11039
  // tslint:disable-next-line:no-forward-ref
10917
11040
  useExisting: forwardRef(function () { return TimelineMonthViewComponent_1; })
10918
11041
  }],
10919
- template: "\n <ng-template #content>\n <timeline-multi-day-view\n viewName=\"timeline-month\"\n [name]=\"name\"\n [getNextDate]=\"getNextDate\"\n [getStartDate]=\"getStartDate\"\n [getEndDate]=\"getEndDate\"\n [eventHeight]=\"viewEventHeight\"\n [columnWidth]=\"viewColumnWidth\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </timeline-multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
11042
+ template: "\n <ng-template #content>\n <timeline-multi-day-view\n viewName=\"timeline-month\"\n [name]=\"name\"\n [getNextDate]=\"getNextDate\"\n [getStartDate]=\"getStartDate\"\n [getEndDate]=\"getEndDate\"\n [eventHeight]=\"viewEventHeight\"\n [columnWidth]=\"viewColumnWidth\"\n [currentTimeMarker]=\"viewCurrentTimeMarker\"\n [highlightOngoingEvents]=\"viewHighlightOngoingEvents\"\n [showWorkHours]=\"shouldShowWorkHours\"\n [scrollTime]=\"viewScrollTime\"\n [startTime]=\"viewStartTime\"\n [endTime]=\"viewEndTime\"\n [workDayStart]=\"viewWorkDayStart\"\n [workDayEnd]=\"viewWorkDayEnd\"\n [workWeekStart]=\"viewWorkWeekStart\"\n [workWeekEnd]=\"viewWorkWeekEnd\"\n [slotDuration]=\"viewSlotDuration\"\n [slotDivisions]=\"viewSlotDivisions\"\n [slotClass]=\"viewSlotClass\"\n [eventClass]=\"viewEventClass\"\n [eventStyles]=\"viewEventStyles\"\n [\u0435ventTemplate]=\"eventTemplate?.templateRef\"\n [groupHeaderTemplate]=\"groupHeaderTemplate?.templateRef\"\n [timeSlotTemplate]=\"timeSlotTemplate?.templateRef\"\n [dateHeaderTemplate]=\"dateHeaderTemplate?.templateRef\"\n [selectedDateFormat]=\"selectedDateFormat\"\n [selectedShortDateFormat]=\"selectedShortDateFormat\">\n </timeline-multi-day-view>\n <div viewFooter kendoWorkHoursFooter [showWorkHours]=\"shouldShowWorkHours\" (itemClick)=\"showWorkHours = !shouldShowWorkHours\"></div>\n </ng-template>\n "
10920
11043
  }),
10921
11044
  __metadata("design:paramtypes", [LocalizationService, ChangeDetectorRef, ViewContextService, ViewStateService])
10922
11045
  ], TimelineMonthViewComponent);
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-scheduler',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1646219330,
14
+ publishDate: 1649774242,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };
@@ -148,6 +148,10 @@ var SchedulerComponent = /** @class */ (function () {
148
148
  * Specifies the Scheduler current time marker settings.
149
149
  */
150
150
  this.currentTimeMarker = true;
151
+ /**
152
+ * Specifies the settings for the ongoing events highlight of the Scheduler.
153
+ */
154
+ this.highlightOngoingEvents = true;
151
155
  /**
152
156
  * A callback that executes for each slot of the Scheduler view.
153
157
  * If it returns `true`, the `k-state-selected` CSS class will be added to the cell, making it visibly selected.
@@ -760,6 +764,7 @@ var SchedulerComponent = /** @class */ (function () {
760
764
  selectable: this.selectable,
761
765
  timezone: this.timezone,
762
766
  currentTimeMarker: this.currentTimeMarker,
767
+ highlightOngoingEvents: this.highlightOngoingEvents,
763
768
  slotClass: this.slotClass,
764
769
  slotFill: this.slotFill,
765
770
  columnWidth: this.columnWidth,
@@ -1024,6 +1029,10 @@ var SchedulerComponent = /** @class */ (function () {
1024
1029
  core_1.Input(),
1025
1030
  tslib_1.__metadata("design:type", Object)
1026
1031
  ], SchedulerComponent.prototype, "currentTimeMarker", void 0);
1032
+ tslib_1.__decorate([
1033
+ core_1.Input(),
1034
+ tslib_1.__metadata("design:type", Object)
1035
+ ], SchedulerComponent.prototype, "highlightOngoingEvents", void 0);
1027
1036
  tslib_1.__decorate([
1028
1037
  core_1.Input(),
1029
1038
  tslib_1.__metadata("design:type", Function)
@@ -0,0 +1,6 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -35,6 +35,9 @@ var BaseView = /** @class */ (function () {
35
35
  this.pdfService = pdfService;
36
36
  this.localization = localization;
37
37
  this.cdr = cdr;
38
+ /**
39
+ * The non-all-day events.
40
+ */
38
41
  this.items = new rxjs_1.BehaviorSubject(null);
39
42
  this.horizontalResources = [];
40
43
  this.verticalResources = [];
@@ -61,6 +61,16 @@ var ConfigurationViewBase = /** @class */ (function (_super) {
61
61
  enumerable: true,
62
62
  configurable: true
63
63
  });
64
+ Object.defineProperty(ConfigurationViewBase.prototype, "viewHighlightOngoingEvents", {
65
+ /**
66
+ * @hidden
67
+ */
68
+ get: function () {
69
+ return util_1.isPresent(this.highlightOngoingEvents) ? this.highlightOngoingEvents : this.schedulerOptions.highlightOngoingEvents;
70
+ },
71
+ enumerable: true,
72
+ configurable: true
73
+ });
64
74
  Object.defineProperty(ConfigurationViewBase.prototype, "viewWeekStart", {
65
75
  /**
66
76
  * @hidden
@@ -92,6 +102,10 @@ var ConfigurationViewBase = /** @class */ (function (_super) {
92
102
  core_1.Input(),
93
103
  tslib_1.__metadata("design:type", Function)
94
104
  ], ConfigurationViewBase.prototype, "eventStyles", void 0);
105
+ tslib_1.__decorate([
106
+ core_1.Input(),
107
+ tslib_1.__metadata("design:type", Object)
108
+ ], ConfigurationViewBase.prototype, "highlightOngoingEvents", void 0);
95
109
  tslib_1.__decorate([
96
110
  core_1.ViewChild('content', { static: true }),
97
111
  tslib_1.__metadata("design:type", core_1.TemplateRef)
@@ -24,3 +24,9 @@ exports.MS_PER_DAY = kendo_date_math_1.MS_PER_DAY;
24
24
  exports.BORDER_WIDTH = 1;
25
25
  /** @hidden */
26
26
  exports.DEFAULT_EVENT_HEIGHT = 25;
27
+ /** @hidden */
28
+ exports.ONGOING_EVENT_CSS_CLASS = 'k-event-ongoing';
29
+ /** @hidden */
30
+ exports.DAYS_IN_WEEK_COUNT = 7;
31
+ /** @hidden */
32
+ exports.WEEKS_COUNT = 6;