@syncfusion/ej2-schedule 25.1.35 → 25.1.37
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/CHANGELOG.md +9 -0
- package/dist/ej2-schedule.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +91 -31
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +91 -28
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/recurrence-editor/recurrence-editor.js +1 -2
- package/src/schedule/actions/crud.js +3 -0
- package/src/schedule/base/css-constant.d.ts +2 -0
- package/src/schedule/base/css-constant.js +2 -0
- package/src/schedule/base/type.d.ts +1 -0
- package/src/schedule/event-renderer/agenda-base.d.ts +1 -1
- package/src/schedule/event-renderer/agenda-base.js +36 -14
- package/src/schedule/event-renderer/event-base.js +4 -2
- package/src/schedule/event-renderer/vertical-view.js +7 -1
- package/src/schedule/renderer/agenda.d.ts +1 -0
- package/src/schedule/renderer/agenda.js +38 -9
- package/styles/bootstrap-dark.css +3 -0
- package/styles/bootstrap.css +3 -0
- package/styles/bootstrap4.css +3 -0
- package/styles/bootstrap5-dark.css +3 -0
- package/styles/bootstrap5.css +3 -0
- package/styles/fabric-dark.css +3 -0
- package/styles/fabric.css +3 -0
- package/styles/fluent-dark.css +4 -1
- package/styles/fluent.css +4 -1
- package/styles/highcontrast-light.css +3 -0
- package/styles/highcontrast.css +3 -0
- package/styles/material-dark.css +12 -0
- package/styles/material.css +12 -0
- package/styles/material3-dark.css +3 -0
- package/styles/material3.css +3 -0
- package/styles/schedule/_layout.scss +4 -0
- package/styles/schedule/bootstrap-dark.css +3 -0
- package/styles/schedule/bootstrap.css +3 -0
- package/styles/schedule/bootstrap4.css +3 -0
- package/styles/schedule/bootstrap5-dark.css +3 -0
- package/styles/schedule/bootstrap5.css +3 -0
- package/styles/schedule/fabric-dark.css +3 -0
- package/styles/schedule/fabric.css +3 -0
- package/styles/schedule/fluent-dark.css +4 -1
- package/styles/schedule/fluent.css +4 -1
- package/styles/schedule/highcontrast-light.css +3 -0
- package/styles/schedule/highcontrast.css +3 -0
- package/styles/schedule/material-dark.css +12 -0
- package/styles/schedule/material.css +12 -0
- package/styles/schedule/material3-dark.css +3 -0
- package/styles/schedule/material3.css +3 -0
- package/styles/schedule/tailwind-dark.css +3 -0
- package/styles/schedule/tailwind.css +3 -0
- package/styles/tailwind-dark.css +3 -0
- package/styles/tailwind.css +3 -0
|
@@ -672,6 +672,8 @@ var TIMELINE_WRAPPER_CLASS = 'e-timeline-wrapper';
|
|
|
672
672
|
/** @private */
|
|
673
673
|
var APPOINTMENT_WRAPPER_CLASS = 'e-appointment-wrapper';
|
|
674
674
|
/** @private */
|
|
675
|
+
var APPOINTMENT_WRAPPER_HIDDEN_CLASS = 'e-appointment-wrapper-hidden';
|
|
676
|
+
/** @private */
|
|
675
677
|
var DAY_WRAPPER_CLASS = 'e-day-wrapper';
|
|
676
678
|
/** @private */
|
|
677
679
|
var TOOLBAR_CONTAINER = 'e-schedule-toolbar-container';
|
|
@@ -6745,11 +6747,13 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6745
6747
|
if (index === void 0) { index = 0; }
|
|
6746
6748
|
var tr = createElement('tr');
|
|
6747
6749
|
var levels = this.parent.activeView.colLevels.slice(-1)[0];
|
|
6750
|
+
var className = this.parent.isReact && this.parent.activeViewOptions.eventTemplate ?
|
|
6751
|
+
' ' + APPOINTMENT_WRAPPER_HIDDEN_CLASS : '';
|
|
6748
6752
|
for (var i = 0, len = levels.length; i < len; i++) {
|
|
6749
6753
|
var col = levels[parseInt(i.toString(), 10)];
|
|
6750
6754
|
var appointmentWrap = createElement('td', {
|
|
6751
|
-
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS : (type === 'timeIndicator') ?
|
|
6752
|
-
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS, attrs: { 'data-date': col.date.getTime().toString() }
|
|
6755
|
+
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS + className : (type === 'timeIndicator') ?
|
|
6756
|
+
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS + className, attrs: { 'data-date': col.date.getTime().toString() }
|
|
6753
6757
|
});
|
|
6754
6758
|
if (!isNullOrUndefined(col.groupIndex)) {
|
|
6755
6759
|
appointmentWrap.setAttribute('data-group-index', col.groupIndex.toString());
|
|
@@ -6872,6 +6876,7 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6872
6876
|
return _this;
|
|
6873
6877
|
}
|
|
6874
6878
|
VerticalEvent.prototype.renderAppointments = function () {
|
|
6879
|
+
var _this = this;
|
|
6875
6880
|
if (isNullOrUndefined(this.parent)) {
|
|
6876
6881
|
return;
|
|
6877
6882
|
}
|
|
@@ -6931,7 +6936,12 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
6931
6936
|
if (isDragging) {
|
|
6932
6937
|
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
6933
6938
|
}
|
|
6934
|
-
this.parent.renderTemplates()
|
|
6939
|
+
this.parent.renderTemplates(function () {
|
|
6940
|
+
if (_this.parent.isReact && _this.parent.activeViewOptions.eventTemplate) {
|
|
6941
|
+
var wraps = [].slice.call(_this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_HIDDEN_CLASS));
|
|
6942
|
+
removeClass(wraps, APPOINTMENT_WRAPPER_HIDDEN_CLASS);
|
|
6943
|
+
}
|
|
6944
|
+
});
|
|
6935
6945
|
};
|
|
6936
6946
|
VerticalEvent.prototype.initializeValues = function () {
|
|
6937
6947
|
this.resources = (this.parent.activeViewOptions.group.resources.length > 0) ? this.parent.uiStateValues.isGroupAdaptive ?
|
|
@@ -11598,7 +11608,6 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11598
11608
|
RecurrenceEditor.prototype.setTemplate = function () {
|
|
11599
11609
|
var dayData = this.getDayData('narrow');
|
|
11600
11610
|
var fullDay = this.getDayData('wide');
|
|
11601
|
-
var labelId = this.element.id + '_' + 'end_label';
|
|
11602
11611
|
this.element.innerHTML = '<div class="' + HEADER + '">' +
|
|
11603
11612
|
'<div class="' + INPUTWARAPPER + ' ' + FORMLEFT + '">' +
|
|
11604
11613
|
'<input type="text" tabindex="0" class="' + REPEATELEMENT +
|
|
@@ -11645,7 +11654,7 @@ var RecurrenceEditor = /** @__PURE__ @class */ (function (_super) {
|
|
|
11645
11654
|
'</div></div>' +
|
|
11646
11655
|
'<div class="' + INPUTWARAPPERSIDE + ' ' + ENDON + ' ' + FORMRIGHT + '">' +
|
|
11647
11656
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONLEFT + '">' +
|
|
11648
|
-
'<input type="text" tabindex="0" class="' + ENDONELEMENT + '"
|
|
11657
|
+
'<input type="text" tabindex="0" class="' + ENDONELEMENT + '"title="' + this.localeObj.getConstant(END) + '" />' +
|
|
11649
11658
|
'</div>' +
|
|
11650
11659
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONDATE + '" >' +
|
|
11651
11660
|
'<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
|
|
@@ -14812,6 +14821,9 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
14812
14821
|
return;
|
|
14813
14822
|
}
|
|
14814
14823
|
this.parent.trigger(dataBinding, e, function (args) {
|
|
14824
|
+
if (args.cancel) {
|
|
14825
|
+
return;
|
|
14826
|
+
}
|
|
14815
14827
|
var resultData = extend([], args.result, null, true);
|
|
14816
14828
|
_this.parent.eventsData = resultData.filter(function (data) { return !data[_this.parent.eventFields.isBlock]; });
|
|
14817
14829
|
_this.parent.blockData = resultData.filter(function (data) { return data[_this.parent.eventFields.isBlock]; });
|
|
@@ -26083,7 +26095,8 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26083
26095
|
EventHandler.add(element, 'click', this.parent.agendaModule.dayNavigationClick, this);
|
|
26084
26096
|
}
|
|
26085
26097
|
};
|
|
26086
|
-
AgendaBase.prototype.calculateResourceTableElement = function (tBody, noOfDays, agendaDate) {
|
|
26098
|
+
AgendaBase.prototype.calculateResourceTableElement = function (tBody, noOfDays, agendaDate, agendaEnd) {
|
|
26099
|
+
if (agendaEnd === void 0) { agendaEnd = null; }
|
|
26087
26100
|
if (isNullOrUndefined(this.parent.resourceBase.lastResourceLevel)) {
|
|
26088
26101
|
var level = this.getDateSlots(this.renderDates, this.parent.activeViewOptions.workDays);
|
|
26089
26102
|
this.parent.resourceBase.generateResourceLevels(level);
|
|
@@ -26092,7 +26105,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26092
26105
|
var days = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda') ? noOfDays : 1;
|
|
26093
26106
|
var resColl = this.parent.resourceBase.resourceCollection;
|
|
26094
26107
|
var resData = this.parent.resourceBase.lastResourceLevel;
|
|
26108
|
+
var agendaStart = agendaDate;
|
|
26095
26109
|
var initialDate = agendaDate;
|
|
26110
|
+
var showWeekend = this.parent.activeViewOptions.showWeekend;
|
|
26096
26111
|
for (var i = 0; i < days; i++) {
|
|
26097
26112
|
var lastLevelInfo = [];
|
|
26098
26113
|
var tempLastLevelInfo = [];
|
|
@@ -26100,6 +26115,21 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26100
26115
|
var eventObj = void 0;
|
|
26101
26116
|
var dateObj = void 0;
|
|
26102
26117
|
var firstDate = addDays(initialDate, i);
|
|
26118
|
+
if (this.parent.currentView === 'Agenda' && this.parent.activeViewOptions.group.byDate &&
|
|
26119
|
+
this.parent.activeViewOptions.allowVirtualScrolling && !showWeekend && !this.isWorkDay(firstDate)) {
|
|
26120
|
+
do {
|
|
26121
|
+
firstDate = addDays(firstDate, 1);
|
|
26122
|
+
if (firstDate >= agendaEnd) {
|
|
26123
|
+
break;
|
|
26124
|
+
}
|
|
26125
|
+
} while (!this.isWorkDay(firstDate) ||
|
|
26126
|
+
this.parent.eventBase.filterEvents(firstDate, addDays(firstDate, 1)).length < 1);
|
|
26127
|
+
if (firstDate >= agendaEnd) {
|
|
26128
|
+
break;
|
|
26129
|
+
}
|
|
26130
|
+
initialDate = addDays(firstDate, -i);
|
|
26131
|
+
agendaLastDate = addDays(firstDate, 1);
|
|
26132
|
+
}
|
|
26103
26133
|
var finalDate = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda')
|
|
26104
26134
|
? addDays(firstDate, 1) : agendaLastDate;
|
|
26105
26135
|
var agendaCollection = this.parent.eventBase.filterEvents(firstDate, finalDate);
|
|
@@ -26114,7 +26144,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26114
26144
|
for (var r = 0; r < noOfDays; r++) {
|
|
26115
26145
|
// eslint-disable-next-line max-len
|
|
26116
26146
|
var resDayCollection = this.parent.eventBase.filterEvents(agendaDate, addDays(agendaDate, 1), resDataCollection, undefined);
|
|
26117
|
-
if (
|
|
26147
|
+
if (((showWeekend || !showWeekend && (this.parent.group.byDate ? this.isWorkDay(agendaDate) :
|
|
26148
|
+
this.isWorkDay(agendaDate, resData[parseInt(res.toString(), 10)].workDays)))
|
|
26149
|
+
&& (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays)) ||
|
|
26118
26150
|
this.parent.currentView === 'MonthAgenda') {
|
|
26119
26151
|
data.push(resDayCollection[0]);
|
|
26120
26152
|
eventObj = {
|
|
@@ -26140,16 +26172,18 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26140
26172
|
agendaDate = addDays(agendaDate, 1);
|
|
26141
26173
|
if (agendaDate.getTime() >= agendaLastDate.getTime() || this.parent.activeViewOptions.group.byDate
|
|
26142
26174
|
|| this.parent.currentView === 'MonthAgenda') {
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26147
|
-
|
|
26148
|
-
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26175
|
+
if (data.length > 0) {
|
|
26176
|
+
lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
|
|
26177
|
+
var tempObj = {
|
|
26178
|
+
rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
|
|
26179
|
+
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
|
|
26180
|
+
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
26181
|
+
groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
|
|
26182
|
+
date: agendaDate
|
|
26183
|
+
};
|
|
26184
|
+
lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
|
|
26185
|
+
tempLastLevelInfo.push(extend({}, tempObj, null, true));
|
|
26186
|
+
}
|
|
26153
26187
|
break;
|
|
26154
26188
|
}
|
|
26155
26189
|
}
|
|
@@ -26184,9 +26218,9 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
26184
26218
|
this.createResourceTableRow(lastLevelInfo, tBody);
|
|
26185
26219
|
}
|
|
26186
26220
|
}
|
|
26187
|
-
var totalCollection = this.parent.eventBase.filterEvents(
|
|
26221
|
+
var totalCollection = this.parent.eventBase.filterEvents(agendaStart, agendaLastDate);
|
|
26188
26222
|
if (totalCollection.length === 0 && !this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
|
|
26189
|
-
this.renderEmptyContent(tBody,
|
|
26223
|
+
this.renderEmptyContent(tBody, agendaStart);
|
|
26190
26224
|
}
|
|
26191
26225
|
};
|
|
26192
26226
|
AgendaBase.prototype.createResourceTableRow = function (tContent, tBody) {
|
|
@@ -26459,9 +26493,20 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26459
26493
|
var firstDate = new Date(agendaDate.getTime());
|
|
26460
26494
|
var isObject = this.appointmentFiltering(firstDate, lastDate);
|
|
26461
26495
|
if (isObject.length > 0 && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
|
|
26462
|
-
|
|
26463
|
-
|
|
26464
|
-
|
|
26496
|
+
if (!this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(isObject[0][fieldMapping.startTime])) {
|
|
26497
|
+
for (var _i = 0, isObject_1 = isObject; _i < isObject_1.length; _i++) {
|
|
26498
|
+
var event_2 = isObject_1[_i];
|
|
26499
|
+
if (this.isAgendaWorkDay(event_2[fieldMapping.startTime])) {
|
|
26500
|
+
agendaDate = new Date(new Date(event_2[fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
|
|
26501
|
+
this.updateHeaderText(event_2[fieldMapping.startTime]);
|
|
26502
|
+
break;
|
|
26503
|
+
}
|
|
26504
|
+
}
|
|
26505
|
+
}
|
|
26506
|
+
else {
|
|
26507
|
+
agendaDate = new Date(new Date(isObject[0][fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
|
|
26508
|
+
this.updateHeaderText(isObject[0][fieldMapping.startTime]);
|
|
26509
|
+
}
|
|
26465
26510
|
}
|
|
26466
26511
|
var endDate;
|
|
26467
26512
|
if (!this.parent.hideEmptyAgendaDays || (this.parent.agendaDaysCount > 0 && isObject.length > 0)) {
|
|
@@ -26475,18 +26520,25 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26475
26520
|
this.parent.headerModule.updateHeaderItems('remove');
|
|
26476
26521
|
}
|
|
26477
26522
|
}
|
|
26478
|
-
this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date);
|
|
26523
|
+
this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date, lastDate);
|
|
26479
26524
|
}
|
|
26480
26525
|
else {
|
|
26481
26526
|
for (var day = 0; day < this.parent.agendaDaysCount; day++) {
|
|
26482
|
-
var filterData = this.appointmentFiltering(agendaDate);
|
|
26483
26527
|
var nTr = this.createTableRowElement(agendaDate, 'data');
|
|
26484
|
-
|
|
26528
|
+
var virtualContent = this.element.querySelector('tr[data-row-index="' + (+(nTr.dataset.rowIndex)) + '"]');
|
|
26529
|
+
if (virtualContent || !this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(agendaDate)) {
|
|
26485
26530
|
agendaDate = addDays(agendaDate, 1);
|
|
26531
|
+
if (!virtualContent && this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
26532
|
+
day--;
|
|
26533
|
+
}
|
|
26534
|
+
if (agendaDate.getTime() > lastDate.getTime()) {
|
|
26535
|
+
break;
|
|
26536
|
+
}
|
|
26486
26537
|
continue;
|
|
26487
26538
|
}
|
|
26488
26539
|
var dTd = nTr.children[0];
|
|
26489
26540
|
var aTd = nTr.children[1];
|
|
26541
|
+
var filterData = this.appointmentFiltering(agendaDate);
|
|
26490
26542
|
if (filterData.length > 0 || (!this.parent.hideEmptyAgendaDays && filterData.length === 0)) {
|
|
26491
26543
|
var elementType = (!this.parent.hideEmptyAgendaDays && filterData.length === 0) ? 'noEvents' : 'data';
|
|
26492
26544
|
dTd.appendChild(this.createDateHeaderElement(agendaDate));
|
|
@@ -26513,6 +26565,14 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26513
26565
|
}
|
|
26514
26566
|
this.agendaDates = { start: firstDate, end: endDate };
|
|
26515
26567
|
};
|
|
26568
|
+
Agenda.prototype.isAgendaWorkDay = function (date) {
|
|
26569
|
+
if (this.parent.uiStateValues.isGroupAdaptive && !this.parent.group.byDate) {
|
|
26570
|
+
return this.isWorkDay(date, this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays);
|
|
26571
|
+
}
|
|
26572
|
+
else {
|
|
26573
|
+
return this.isWorkDay(date);
|
|
26574
|
+
}
|
|
26575
|
+
};
|
|
26516
26576
|
Agenda.prototype.agendaScrolling = function (event) {
|
|
26517
26577
|
if (this.parent.quickPopup) {
|
|
26518
26578
|
this.parent.quickPopup.quickPopupHide();
|
|
@@ -26617,9 +26677,12 @@ var Agenda = /** @__PURE__ @class */ (function (_super) {
|
|
|
26617
26677
|
var lastDate = this.getEndDateFromStartDate(date);
|
|
26618
26678
|
var daysCount = 0;
|
|
26619
26679
|
do {
|
|
26620
|
-
|
|
26621
|
-
|
|
26622
|
-
|
|
26680
|
+
if (this.parent.activeViewOptions.showWeekend || !this.parent.activeViewOptions.showWeekend &&
|
|
26681
|
+
this.isAgendaWorkDay(currentDate)) {
|
|
26682
|
+
var filterData = this.appointmentFiltering(currentDate);
|
|
26683
|
+
if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
|
|
26684
|
+
daysCount++;
|
|
26685
|
+
}
|
|
26623
26686
|
}
|
|
26624
26687
|
currentDate = addDays(currentDate, (type === 'next') ? 1 : -1);
|
|
26625
26688
|
if (currentDate < firstDate || currentDate > lastDate) {
|