@syncfusion/ej2-schedule 27.2.3 → 28.1.33
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.
- package/README.md +2 -2
- package/dist/ej2-schedule.min.js +3 -3
- package/dist/ej2-schedule.umd.min.js +3 -3
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +437 -49
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +469 -54
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +3 -3
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +16 -16
- package/src/schedule/actions/action-base.js +4 -3
- package/src/schedule/actions/drag.js +2 -2
- package/src/schedule/actions/keyboard.d.ts +16 -0
- package/src/schedule/actions/keyboard.js +254 -8
- package/src/schedule/actions/touch.js +7 -2
- package/src/schedule/base/constant.d.ts +4 -0
- package/src/schedule/base/constant.js +4 -0
- package/src/schedule/base/css-constant.d.ts +2 -0
- package/src/schedule/base/css-constant.js +2 -0
- package/src/schedule/base/interface.d.ts +14 -4
- package/src/schedule/base/schedule-model.d.ts +17 -1
- package/src/schedule/base/schedule.d.ts +67 -1
- package/src/schedule/base/schedule.js +131 -1
- package/src/schedule/base/type.d.ts +8 -0
- package/src/schedule/models/event-settings-model.d.ts +2 -1
- package/src/schedule/models/event-settings.d.ts +2 -1
- package/src/schedule/popups/event-tooltip.js +4 -0
- package/src/schedule/renderer/agenda.d.ts +2 -1
- package/src/schedule/renderer/agenda.js +1 -1
- package/src/schedule/renderer/header-renderer.js +4 -2
- package/src/schedule/renderer/month-agenda.d.ts +2 -1
- package/src/schedule/renderer/month-agenda.js +2 -2
- package/src/schedule/renderer/month.d.ts +4 -3
- package/src/schedule/renderer/month.js +16 -9
- package/src/schedule/renderer/timeline-view.js +9 -4
- package/src/schedule/renderer/vertical-view.js +6 -2
- package/src/schedule/renderer/view-base.d.ts +5 -4
- package/src/schedule/renderer/view-base.js +13 -10
- package/src/schedule/renderer/year.d.ts +3 -2
- package/src/schedule/renderer/year.js +10 -7
- package/styles/bds-lite.css +4400 -0
- package/styles/bds-lite.scss +18 -0
- package/styles/bds.css +5161 -0
- package/styles/bds.scss +20 -0
- package/styles/bootstrap-dark-lite.css +19 -6
- package/styles/bootstrap-dark.css +23 -10
- package/styles/bootstrap-lite.css +18 -5
- package/styles/bootstrap.css +22 -9
- package/styles/bootstrap4-lite.css +18 -5
- package/styles/bootstrap4.css +22 -9
- package/styles/bootstrap5-dark-lite.css +18 -5
- package/styles/bootstrap5-dark.css +23 -10
- package/styles/bootstrap5-lite.css +18 -5
- package/styles/bootstrap5.3-lite.css +18 -5
- package/styles/bootstrap5.3.css +23 -10
- package/styles/bootstrap5.css +23 -10
- package/styles/fabric-dark-lite.css +18 -5
- package/styles/fabric-dark.css +22 -9
- package/styles/fabric-lite.css +18 -5
- package/styles/fabric.css +22 -9
- package/styles/fluent-dark-lite.css +18 -5
- package/styles/fluent-dark.css +22 -9
- package/styles/fluent-lite.css +18 -5
- package/styles/fluent.css +22 -9
- package/styles/fluent2-lite.css +43 -6
- package/styles/fluent2.css +50 -13
- package/styles/highcontrast-light-lite.css +18 -5
- package/styles/highcontrast-light.css +22 -9
- package/styles/highcontrast-lite.css +19 -6
- package/styles/highcontrast.css +23 -10
- package/styles/material-dark-lite.css +18 -5
- package/styles/material-dark.css +22 -9
- package/styles/material-lite.css +18 -5
- package/styles/material.css +22 -9
- package/styles/material3-dark-lite.css +18 -5
- package/styles/material3-dark.css +23 -10
- package/styles/material3-lite.css +18 -5
- package/styles/material3.css +23 -10
- package/styles/recurrence-editor/_bigger.scss +2 -3
- package/styles/recurrence-editor/_fluent2-definition.scss +1 -1
- package/styles/recurrence-editor/_tailwind3-definition.scss +14 -0
- package/styles/recurrence-editor/bds.css +533 -0
- package/styles/recurrence-editor/bds.scss +9 -0
- package/styles/recurrence-editor/bootstrap-dark.css +2 -3
- package/styles/recurrence-editor/bootstrap.css +2 -3
- package/styles/recurrence-editor/bootstrap4.css +2 -3
- package/styles/recurrence-editor/bootstrap5-dark.css +2 -3
- package/styles/recurrence-editor/bootstrap5.3.css +2 -3
- package/styles/recurrence-editor/bootstrap5.css +2 -3
- package/styles/recurrence-editor/fabric-dark.css +2 -3
- package/styles/recurrence-editor/fabric.css +2 -3
- package/styles/recurrence-editor/fluent-dark.css +2 -3
- package/styles/recurrence-editor/fluent.css +2 -3
- package/styles/recurrence-editor/fluent2.css +3 -4
- package/styles/recurrence-editor/highcontrast-light.css +2 -3
- package/styles/recurrence-editor/highcontrast.css +3 -4
- package/styles/recurrence-editor/material-dark.css +2 -3
- package/styles/recurrence-editor/material.css +2 -3
- package/styles/recurrence-editor/material3-dark.css +2 -3
- package/styles/recurrence-editor/material3.css +2 -3
- package/styles/recurrence-editor/tailwind-dark.css +2 -3
- package/styles/recurrence-editor/tailwind.css +2 -3
- package/styles/recurrence-editor/tailwind3.css +500 -0
- package/styles/recurrence-editor/tailwind3.scss +9 -0
- package/styles/schedule/_bigger.scss +2 -1
- package/styles/schedule/_bootstrap5-definition.scss +1 -1
- package/styles/schedule/_bootstrap5.3-definition.scss +1 -1
- package/styles/schedule/_fluent2-definition.scss +3 -3
- package/styles/schedule/_layout.scss +43 -2
- package/styles/schedule/_material3-definition.scss +1 -1
- package/styles/schedule/_tailwind-definition.scss +1 -1
- package/styles/schedule/_tailwind3-definition.scss +276 -0
- package/styles/schedule/_theme.scss +0 -4
- package/styles/schedule/bds.css +4760 -0
- package/styles/schedule/bds.scss +17 -0
- package/styles/schedule/bootstrap-dark.css +21 -7
- package/styles/schedule/bootstrap.css +20 -6
- package/styles/schedule/bootstrap4.css +20 -6
- package/styles/schedule/bootstrap5-dark.css +21 -7
- package/styles/schedule/bootstrap5.3.css +21 -7
- package/styles/schedule/bootstrap5.css +21 -7
- package/styles/schedule/fabric-dark.css +20 -6
- package/styles/schedule/fabric.css +20 -6
- package/styles/schedule/fluent-dark.css +20 -6
- package/styles/schedule/fluent.css +20 -6
- package/styles/schedule/fluent2.css +47 -9
- package/styles/schedule/highcontrast-light.css +20 -6
- package/styles/schedule/highcontrast.css +21 -7
- package/styles/schedule/icons/_tailwind3.scss +220 -0
- package/styles/schedule/material-dark.css +20 -6
- package/styles/schedule/material.css +20 -6
- package/styles/schedule/material3-dark.css +21 -7
- package/styles/schedule/material3.css +21 -7
- package/styles/schedule/tailwind-dark.css +21 -7
- package/styles/schedule/tailwind.css +21 -7
- package/styles/schedule/tailwind3.css +4599 -0
- package/styles/schedule/tailwind3.scss +17 -0
- package/styles/tailwind-dark-lite.css +18 -5
- package/styles/tailwind-dark.css +23 -10
- package/styles/tailwind-lite.css +18 -5
- package/styles/tailwind.css +23 -10
- package/styles/tailwind3-lite.css +4239 -0
- package/styles/tailwind3-lite.scss +18 -0
- package/styles/tailwind3.css +5000 -0
- 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 = '
|
|
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(
|
|
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(
|
|
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(
|
|
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 === '
|
|
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 === '
|
|
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 === '
|
|
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(
|
|
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:
|
|
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 ? '
|
|
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 === '
|
|
395
|
+
return util.addYears(this.parent.selectedDate, ((type === 'Next') ? 1 : -1));
|
|
396
396
|
};
|
|
397
|
-
Year.prototype.getDateRangeText = function () {
|
|
398
|
-
|
|
399
|
-
|
|
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(
|
|
407
|
+
return this.parent.globalize.formatDate(isDateColAvail ? dateCollection[0] : date, { skeleton: 'y' });
|
|
405
408
|
}
|
|
406
409
|
};
|
|
407
410
|
Year.prototype.addEventListener = function () {
|