@syncfusion/ej2-schedule 27.2.5 → 28.1.35

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 (144) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-schedule.min.js +3 -3
  3. package/dist/ej2-schedule.umd.min.js +3 -3
  4. package/dist/ej2-schedule.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-schedule.es2015.js +435 -52
  6. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  7. package/dist/es6/ej2-schedule.es5.js +464 -54
  8. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  9. package/dist/global/ej2-schedule.min.js +3 -3
  10. package/dist/global/ej2-schedule.min.js.map +1 -1
  11. package/dist/global/index.d.ts +2 -2
  12. package/package.json +16 -16
  13. package/src/schedule/actions/action-base.js +4 -3
  14. package/src/schedule/actions/drag.d.ts +1 -0
  15. package/src/schedule/actions/drag.js +12 -8
  16. package/src/schedule/actions/keyboard.d.ts +16 -0
  17. package/src/schedule/actions/keyboard.js +254 -8
  18. package/src/schedule/actions/touch.js +7 -2
  19. package/src/schedule/base/constant.d.ts +4 -0
  20. package/src/schedule/base/constant.js +4 -0
  21. package/src/schedule/base/css-constant.d.ts +2 -0
  22. package/src/schedule/base/css-constant.js +2 -0
  23. package/src/schedule/base/interface.d.ts +14 -4
  24. package/src/schedule/base/schedule-model.d.ts +17 -1
  25. package/src/schedule/base/schedule.d.ts +67 -1
  26. package/src/schedule/base/schedule.js +131 -1
  27. package/src/schedule/base/type.d.ts +8 -0
  28. package/src/schedule/popups/event-tooltip.js +4 -0
  29. package/src/schedule/renderer/agenda.d.ts +2 -1
  30. package/src/schedule/renderer/agenda.js +1 -1
  31. package/src/schedule/renderer/header-renderer.js +4 -2
  32. package/src/schedule/renderer/month-agenda.d.ts +2 -1
  33. package/src/schedule/renderer/month-agenda.js +2 -2
  34. package/src/schedule/renderer/month.d.ts +4 -3
  35. package/src/schedule/renderer/month.js +16 -9
  36. package/src/schedule/renderer/view-base.d.ts +5 -4
  37. package/src/schedule/renderer/view-base.js +13 -10
  38. package/src/schedule/renderer/year.d.ts +3 -2
  39. package/src/schedule/renderer/year.js +10 -7
  40. package/styles/bds-lite.css +4400 -0
  41. package/styles/bds-lite.scss +18 -0
  42. package/styles/bds.css +5161 -0
  43. package/styles/bds.scss +20 -0
  44. package/styles/bootstrap-dark-lite.css +19 -6
  45. package/styles/bootstrap-dark.css +23 -10
  46. package/styles/bootstrap-lite.css +18 -5
  47. package/styles/bootstrap.css +22 -9
  48. package/styles/bootstrap4-lite.css +18 -5
  49. package/styles/bootstrap4.css +22 -9
  50. package/styles/bootstrap5-dark-lite.css +18 -5
  51. package/styles/bootstrap5-dark.css +23 -10
  52. package/styles/bootstrap5-lite.css +18 -5
  53. package/styles/bootstrap5.3-lite.css +18 -5
  54. package/styles/bootstrap5.3.css +23 -10
  55. package/styles/bootstrap5.css +23 -10
  56. package/styles/fabric-dark-lite.css +18 -5
  57. package/styles/fabric-dark.css +22 -9
  58. package/styles/fabric-lite.css +18 -5
  59. package/styles/fabric.css +22 -9
  60. package/styles/fluent-dark-lite.css +18 -5
  61. package/styles/fluent-dark.css +22 -9
  62. package/styles/fluent-lite.css +18 -5
  63. package/styles/fluent.css +22 -9
  64. package/styles/fluent2-lite.css +43 -6
  65. package/styles/fluent2.css +50 -13
  66. package/styles/highcontrast-light-lite.css +18 -5
  67. package/styles/highcontrast-light.css +22 -9
  68. package/styles/highcontrast-lite.css +19 -6
  69. package/styles/highcontrast.css +23 -10
  70. package/styles/material-dark-lite.css +18 -5
  71. package/styles/material-dark.css +22 -9
  72. package/styles/material-lite.css +18 -5
  73. package/styles/material.css +22 -9
  74. package/styles/material3-dark-lite.css +18 -5
  75. package/styles/material3-dark.css +23 -10
  76. package/styles/material3-lite.css +18 -5
  77. package/styles/material3.css +23 -10
  78. package/styles/recurrence-editor/_bigger.scss +2 -3
  79. package/styles/recurrence-editor/_fluent2-definition.scss +1 -1
  80. package/styles/recurrence-editor/_tailwind3-definition.scss +14 -0
  81. package/styles/recurrence-editor/bds.css +533 -0
  82. package/styles/recurrence-editor/bds.scss +9 -0
  83. package/styles/recurrence-editor/bootstrap-dark.css +2 -3
  84. package/styles/recurrence-editor/bootstrap.css +2 -3
  85. package/styles/recurrence-editor/bootstrap4.css +2 -3
  86. package/styles/recurrence-editor/bootstrap5-dark.css +2 -3
  87. package/styles/recurrence-editor/bootstrap5.3.css +2 -3
  88. package/styles/recurrence-editor/bootstrap5.css +2 -3
  89. package/styles/recurrence-editor/fabric-dark.css +2 -3
  90. package/styles/recurrence-editor/fabric.css +2 -3
  91. package/styles/recurrence-editor/fluent-dark.css +2 -3
  92. package/styles/recurrence-editor/fluent.css +2 -3
  93. package/styles/recurrence-editor/fluent2.css +3 -4
  94. package/styles/recurrence-editor/highcontrast-light.css +2 -3
  95. package/styles/recurrence-editor/highcontrast.css +3 -4
  96. package/styles/recurrence-editor/material-dark.css +2 -3
  97. package/styles/recurrence-editor/material.css +2 -3
  98. package/styles/recurrence-editor/material3-dark.css +2 -3
  99. package/styles/recurrence-editor/material3.css +2 -3
  100. package/styles/recurrence-editor/tailwind-dark.css +2 -3
  101. package/styles/recurrence-editor/tailwind.css +2 -3
  102. package/styles/recurrence-editor/tailwind3.css +500 -0
  103. package/styles/recurrence-editor/tailwind3.scss +9 -0
  104. package/styles/schedule/_bigger.scss +2 -1
  105. package/styles/schedule/_bootstrap5-definition.scss +1 -1
  106. package/styles/schedule/_bootstrap5.3-definition.scss +1 -1
  107. package/styles/schedule/_fluent2-definition.scss +3 -3
  108. package/styles/schedule/_layout.scss +43 -2
  109. package/styles/schedule/_material3-definition.scss +1 -1
  110. package/styles/schedule/_tailwind-definition.scss +1 -1
  111. package/styles/schedule/_tailwind3-definition.scss +276 -0
  112. package/styles/schedule/_theme.scss +0 -4
  113. package/styles/schedule/bds.css +4760 -0
  114. package/styles/schedule/bds.scss +17 -0
  115. package/styles/schedule/bootstrap-dark.css +21 -7
  116. package/styles/schedule/bootstrap.css +20 -6
  117. package/styles/schedule/bootstrap4.css +20 -6
  118. package/styles/schedule/bootstrap5-dark.css +21 -7
  119. package/styles/schedule/bootstrap5.3.css +21 -7
  120. package/styles/schedule/bootstrap5.css +21 -7
  121. package/styles/schedule/fabric-dark.css +20 -6
  122. package/styles/schedule/fabric.css +20 -6
  123. package/styles/schedule/fluent-dark.css +20 -6
  124. package/styles/schedule/fluent.css +20 -6
  125. package/styles/schedule/fluent2.css +47 -9
  126. package/styles/schedule/highcontrast-light.css +20 -6
  127. package/styles/schedule/highcontrast.css +21 -7
  128. package/styles/schedule/icons/_tailwind3.scss +220 -0
  129. package/styles/schedule/material-dark.css +20 -6
  130. package/styles/schedule/material.css +20 -6
  131. package/styles/schedule/material3-dark.css +21 -7
  132. package/styles/schedule/material3.css +21 -7
  133. package/styles/schedule/tailwind-dark.css +21 -7
  134. package/styles/schedule/tailwind.css +21 -7
  135. package/styles/schedule/tailwind3.css +4599 -0
  136. package/styles/schedule/tailwind3.scss +17 -0
  137. package/styles/tailwind-dark-lite.css +18 -5
  138. package/styles/tailwind-dark.css +23 -10
  139. package/styles/tailwind-lite.css +18 -5
  140. package/styles/tailwind.css +23 -10
  141. package/styles/tailwind3-lite.css +4239 -0
  142. package/styles/tailwind3-lite.scss +18 -0
  143. package/styles/tailwind3.css +5000 -0
  144. package/styles/tailwind3.scss +20 -0
@@ -12,7 +12,7 @@ var ViewBase = /** @class */ (function () {
12
12
  * @param {Schedule} parent Accepts the schedule instance
13
13
  */
14
14
  function ViewBase(parent) {
15
- this.previousNextAction = 'next';
15
+ this.previousNextAction = 'Next';
16
16
  this.parent = parent;
17
17
  }
18
18
  ViewBase.prototype.isTimelineView = function () {
@@ -271,11 +271,12 @@ var ViewBase = /** @class */ (function () {
271
271
  return !(util.getDateInMs(date) < util.getDateInMs(startHour) || util.getDateInMs(date) >= util.getDateInMs(endHour) ||
272
272
  !this.isWorkDay(date, workDays));
273
273
  };
274
- ViewBase.prototype.getRenderDates = function (workDays) {
274
+ ViewBase.prototype.getRenderDates = function (workDays, date) {
275
+ if (date === void 0) { date = this.parent.selectedDate; }
275
276
  var renderDates = [];
276
277
  // Due to same code for vertical and time line, week & work week views, if condition has used
277
278
  if (this.parent.currentView === 'Week' || this.parent.currentView === 'TimelineWeek') {
278
- var selectedDate = util.resetTime(this.parent.selectedDate);
279
+ var selectedDate = util.resetTime(date);
279
280
  var start = util.getWeekFirstDate(selectedDate, this.parent.activeViewOptions.firstDayOfWeek);
280
281
  for (var i = 0, length_1 = util.WEEK_LENGTH * this.parent.activeViewOptions.interval; i < length_1; i++) {
281
282
  if (this.parent.activeViewOptions.showWeekend) {
@@ -290,7 +291,7 @@ var ViewBase = /** @class */ (function () {
290
291
  }
291
292
  }
292
293
  else if (this.parent.currentView === 'WorkWeek' || this.parent.currentView === 'TimelineWorkWeek') {
293
- var start = util.getWeekFirstDate(util.resetTime(this.parent.selectedDate), this.parent.activeViewOptions.firstDayOfWeek);
294
+ var start = util.getWeekFirstDate(util.resetTime(date), this.parent.activeViewOptions.firstDayOfWeek);
294
295
  for (var i = 0, length_2 = util.WEEK_LENGTH * this.parent.activeViewOptions.interval; i < length_2; i++) {
295
296
  if (this.isWorkDay(start, workDays)) {
296
297
  renderDates.push(start);
@@ -301,7 +302,7 @@ var ViewBase = /** @class */ (function () {
301
302
  else {
302
303
  var dayCount = this.parent.currentView === 'Agenda' ? this.parent.agendaDaysCount :
303
304
  this.parent.activeViewOptions.interval;
304
- var start = util.resetTime(this.parent.selectedDate);
305
+ var start = util.resetTime(date);
305
306
  do {
306
307
  if (this.parent.activeViewOptions.showWeekend) {
307
308
  renderDates.push(start);
@@ -327,11 +328,11 @@ var ViewBase = /** @class */ (function () {
327
328
  if (this.parent.currentView === 'Day' || this.parent.currentView === 'TimelineDay') {
328
329
  if (this.parent.activeViewOptions.showWeekend) {
329
330
  var daysCount = this.parent.activeViewOptions.interval;
330
- return util.addDays(this.parent.selectedDate, type === 'next' ? daysCount : -daysCount);
331
+ return util.addDays(this.parent.selectedDate, type === 'Next' ? daysCount : -daysCount);
331
332
  }
332
333
  else {
333
334
  var date = void 0;
334
- if (type === 'next') {
335
+ if (type === 'Next') {
335
336
  date = util.addDays(this.renderDates.slice(-1)[0], 1);
336
337
  while (!this.isWorkDay(date)) {
337
338
  date = util.addDays(date, 1);
@@ -352,7 +353,7 @@ var ViewBase = /** @class */ (function () {
352
353
  return date;
353
354
  }
354
355
  }
355
- var weekLength = type === 'next' ? util.WEEK_LENGTH : -util.WEEK_LENGTH;
356
+ var weekLength = type === 'Next' ? util.WEEK_LENGTH : -util.WEEK_LENGTH;
356
357
  return util.addDays(this.parent.selectedDate, weekLength * this.parent.activeViewOptions.interval);
357
358
  };
358
359
  ViewBase.prototype.formatViewLabel = function (view, startDate, endDate) {
@@ -379,12 +380,14 @@ var ViewBase = /** @class */ (function () {
379
380
  }
380
381
  }
381
382
  };
382
- ViewBase.prototype.getDateRangeText = function () {
383
+ ViewBase.prototype.getDateRangeText = function (date, dateCollection) {
384
+ if (date === void 0) { date = this.renderDates[0]; }
385
+ if (dateCollection === void 0) { dateCollection = this.renderDates; }
383
386
  if (this.parent.isAdaptive) {
384
387
  var formatDate = (this.parent.activeViewOptions.dateFormat) ? this.parent.activeViewOptions.dateFormat : 'MMMM y';
385
388
  return util.capitalizeFirstWord(this.parent.globalize.formatDate(this.parent.selectedDate, { format: formatDate, calendar: this.parent.getCalendarMode() }), 'single');
386
389
  }
387
- return this.formatDateRange(this.renderDates[0], this.renderDates[this.renderDates.length - 1]);
390
+ return this.formatDateRange(date, dateCollection[dateCollection.length - 1]);
388
391
  };
389
392
  ViewBase.prototype.formatDateRange = function (startDate, endDate) {
390
393
  var globalize = this.parent.globalize;
@@ -1,6 +1,7 @@
1
1
  import { Schedule } from '../base/schedule';
2
2
  import { ViewBase } from './view-base';
3
3
  import { IRenderer, TdData, NotifyEventArgs } from '../base/interface';
4
+ import { NavigationDirection } from '../base/type';
4
5
  /**
5
6
  * year view
6
7
  */
@@ -35,8 +36,8 @@ export declare class Year extends ViewBase implements IRenderer {
35
36
  startDate(): Date;
36
37
  endDate(): Date;
37
38
  getEndDateFromStartDate(start: Date): Date;
38
- getNextPreviousDate(type: string): Date;
39
- getDateRangeText(): string;
39
+ getNextPreviousDate(type: NavigationDirection): Date;
40
+ getDateRangeText(date?: Date, dateCollection?: Date[]): string;
40
41
  addEventListener(): void;
41
42
  removeEventListener(): void;
42
43
  onDataReady(args: NotifyEventArgs): void;
@@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  /* eslint-disable @typescript-eslint/no-explicit-any */
15
- import { EventHandler, formatUnit, createElement, addClass, closest, prepend, append, extend } from '@syncfusion/ej2-base';
15
+ import { EventHandler, formatUnit, createElement, addClass, closest, prepend, append, extend, isNullOrUndefined } from '@syncfusion/ej2-base';
16
16
  import { ViewBase } from './view-base';
17
17
  import { YearEvent } from '../event-renderer/year';
18
18
  import * as util from '../base/util';
@@ -289,7 +289,7 @@ var Year = /** @class */ (function (_super) {
289
289
  this.parent.activeCellsData = this.parent.getCellDetails(target);
290
290
  var isPrevious = startDate.getTime() < this.getStartDate().getTime();
291
291
  if (isPrevious || startDate.getTime() > this.getEndDate().getTime()) {
292
- this.parent.changeDate(this.parent.activeView.getNextPreviousDate(isPrevious ? 'previous' : 'next'), e);
292
+ this.parent.changeDate(this.parent.activeView.getNextPreviousDate(isPrevious ? 'Previous' : 'Next'), e);
293
293
  var activeDate = this.parent.activeCellsData.startTime.getTime();
294
294
  var inRange = activeDate >= this.getStartDate().getTime() && activeDate <= this.getEndDate().getTime();
295
295
  var dateAttr = inRange ? activeDate : (isPrevious ? this.getEndDate() : this.getStartDate()).getTime();
@@ -392,16 +392,19 @@ var Year = /** @class */ (function (_super) {
392
392
  return util.addDays(new Date(date.getTime()), 1);
393
393
  };
394
394
  Year.prototype.getNextPreviousDate = function (type) {
395
- return util.addYears(this.parent.selectedDate, ((type === 'next') ? 1 : -1));
395
+ return util.addYears(this.parent.selectedDate, ((type === 'Next') ? 1 : -1));
396
396
  };
397
- Year.prototype.getDateRangeText = function () {
398
- var startDate = this.getStartDate();
399
- var endDate = this.getEndDate();
397
+ Year.prototype.getDateRangeText = function (date, dateCollection) {
398
+ if (date === void 0) { date = this.parent.selectedDate; }
399
+ if (dateCollection === void 0) { dateCollection = null; }
400
+ var isDateColAvail = !isNullOrUndefined(dateCollection) && dateCollection.length > 0;
401
+ var startDate = isDateColAvail ? dateCollection[0] : this.getStartDate();
402
+ var endDate = isDateColAvail ? dateCollection[dateCollection.length - 1] : this.getEndDate();
400
403
  if (startDate.getFullYear() !== endDate.getFullYear()) {
401
404
  return this.parent.globalize.formatDate(startDate, { skeleton: 'yMMM' }) + ' - ' + this.parent.globalize.formatDate(endDate, { skeleton: 'yMMM' });
402
405
  }
403
406
  else {
404
- return this.parent.globalize.formatDate(this.parent.selectedDate, { skeleton: 'y' });
407
+ return this.parent.globalize.formatDate(isDateColAvail ? dateCollection[0] : date, { skeleton: 'y' });
405
408
  }
406
409
  };
407
410
  Year.prototype.addEventListener = function () {