@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
|
@@ -671,6 +671,8 @@ const TIMELINE_WRAPPER_CLASS = 'e-timeline-wrapper';
|
|
|
671
671
|
/** @private */
|
|
672
672
|
const APPOINTMENT_WRAPPER_CLASS = 'e-appointment-wrapper';
|
|
673
673
|
/** @private */
|
|
674
|
+
const APPOINTMENT_WRAPPER_HIDDEN_CLASS = 'e-appointment-wrapper-hidden';
|
|
675
|
+
/** @private */
|
|
674
676
|
const DAY_WRAPPER_CLASS = 'e-day-wrapper';
|
|
675
677
|
/** @private */
|
|
676
678
|
const TOOLBAR_CONTAINER = 'e-schedule-toolbar-container';
|
|
@@ -6629,11 +6631,13 @@ class EventBase {
|
|
|
6629
6631
|
createEventWrapper(type = '', index = 0) {
|
|
6630
6632
|
const tr = createElement('tr');
|
|
6631
6633
|
const levels = this.parent.activeView.colLevels.slice(-1)[0];
|
|
6634
|
+
const className = this.parent.isReact && this.parent.activeViewOptions.eventTemplate ?
|
|
6635
|
+
' ' + APPOINTMENT_WRAPPER_HIDDEN_CLASS : '';
|
|
6632
6636
|
for (let i = 0, len = levels.length; i < len; i++) {
|
|
6633
6637
|
const col = levels[parseInt(i.toString(), 10)];
|
|
6634
6638
|
const appointmentWrap = createElement('td', {
|
|
6635
|
-
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS : (type === 'timeIndicator') ?
|
|
6636
|
-
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS, attrs: { 'data-date': col.date.getTime().toString() }
|
|
6639
|
+
className: (type === 'allDay') ? ALLDAY_APPOINTMENT_WRAPPER_CLASS + className : (type === 'timeIndicator') ?
|
|
6640
|
+
TIMELINE_WRAPPER_CLASS : DAY_WRAPPER_CLASS + className, attrs: { 'data-date': col.date.getTime().toString() }
|
|
6637
6641
|
});
|
|
6638
6642
|
if (!isNullOrUndefined(col.groupIndex)) {
|
|
6639
6643
|
appointmentWrap.setAttribute('data-group-index', col.groupIndex.toString());
|
|
@@ -6793,7 +6797,12 @@ class VerticalEvent extends EventBase {
|
|
|
6793
6797
|
if (isDragging) {
|
|
6794
6798
|
this.parent.crudModule.crudObj.isCrudAction = false;
|
|
6795
6799
|
}
|
|
6796
|
-
this.parent.renderTemplates()
|
|
6800
|
+
this.parent.renderTemplates(() => {
|
|
6801
|
+
if (this.parent.isReact && this.parent.activeViewOptions.eventTemplate) {
|
|
6802
|
+
const wraps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_WRAPPER_HIDDEN_CLASS));
|
|
6803
|
+
removeClass(wraps, APPOINTMENT_WRAPPER_HIDDEN_CLASS);
|
|
6804
|
+
}
|
|
6805
|
+
});
|
|
6797
6806
|
}
|
|
6798
6807
|
initializeValues() {
|
|
6799
6808
|
this.resources = (this.parent.activeViewOptions.group.resources.length > 0) ? this.parent.uiStateValues.isGroupAdaptive ?
|
|
@@ -11324,7 +11333,6 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
|
|
|
11324
11333
|
setTemplate() {
|
|
11325
11334
|
const dayData = this.getDayData('narrow');
|
|
11326
11335
|
const fullDay = this.getDayData('wide');
|
|
11327
|
-
const labelId = this.element.id + '_' + 'end_label';
|
|
11328
11336
|
this.element.innerHTML = '<div class="' + HEADER + '">' +
|
|
11329
11337
|
'<div class="' + INPUTWARAPPER + ' ' + FORMLEFT + '">' +
|
|
11330
11338
|
'<input type="text" tabindex="0" class="' + REPEATELEMENT +
|
|
@@ -11371,7 +11379,7 @@ let RecurrenceEditor = class RecurrenceEditor extends Component {
|
|
|
11371
11379
|
'</div></div>' +
|
|
11372
11380
|
'<div class="' + INPUTWARAPPERSIDE + ' ' + ENDON + ' ' + FORMRIGHT + '">' +
|
|
11373
11381
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONLEFT + '">' +
|
|
11374
|
-
'<input type="text" tabindex="0" class="' + ENDONELEMENT + '"
|
|
11382
|
+
'<input type="text" tabindex="0" class="' + ENDONELEMENT + '"title="' + this.localeObj.getConstant(END) + '" />' +
|
|
11375
11383
|
'</div>' +
|
|
11376
11384
|
'<div class="' + INPUTWARAPPER + ' ' + ENDONDATE + '" >' +
|
|
11377
11385
|
'<input type="text" tabindex="0" class="' + UNTILDATE + '"title="' + this.localeObj.getConstant(UNTIL$1) + '" />' +
|
|
@@ -14407,6 +14415,9 @@ class Crud {
|
|
|
14407
14415
|
return;
|
|
14408
14416
|
}
|
|
14409
14417
|
this.parent.trigger(dataBinding, e, (args) => {
|
|
14418
|
+
if (args.cancel) {
|
|
14419
|
+
return;
|
|
14420
|
+
}
|
|
14410
14421
|
const resultData = extend([], args.result, null, true);
|
|
14411
14422
|
this.parent.eventsData = resultData.filter((data) => !data[this.parent.eventFields.isBlock]);
|
|
14412
14423
|
this.parent.blockData = resultData.filter((data) => data[this.parent.eventFields.isBlock]);
|
|
@@ -25134,23 +25145,40 @@ class AgendaBase extends ViewBase {
|
|
|
25134
25145
|
EventHandler.add(element, 'click', this.parent.agendaModule.dayNavigationClick, this);
|
|
25135
25146
|
}
|
|
25136
25147
|
}
|
|
25137
|
-
calculateResourceTableElement(tBody, noOfDays, agendaDate) {
|
|
25148
|
+
calculateResourceTableElement(tBody, noOfDays, agendaDate, agendaEnd = null) {
|
|
25138
25149
|
if (isNullOrUndefined(this.parent.resourceBase.lastResourceLevel)) {
|
|
25139
25150
|
const level = this.getDateSlots(this.renderDates, this.parent.activeViewOptions.workDays);
|
|
25140
25151
|
this.parent.resourceBase.generateResourceLevels(level);
|
|
25141
25152
|
}
|
|
25142
|
-
|
|
25153
|
+
let agendaLastDate = addDays(new Date(agendaDate.getTime()), noOfDays);
|
|
25143
25154
|
const days = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda') ? noOfDays : 1;
|
|
25144
25155
|
const resColl = this.parent.resourceBase.resourceCollection;
|
|
25145
25156
|
const resData = this.parent.resourceBase.lastResourceLevel;
|
|
25146
|
-
const
|
|
25157
|
+
const agendaStart = agendaDate;
|
|
25158
|
+
let initialDate = agendaDate;
|
|
25159
|
+
const showWeekend = this.parent.activeViewOptions.showWeekend;
|
|
25147
25160
|
for (let i = 0; i < days; i++) {
|
|
25148
25161
|
const lastLevelInfo = [];
|
|
25149
25162
|
const tempLastLevelInfo = [];
|
|
25150
25163
|
let tempIndex = 0;
|
|
25151
25164
|
let eventObj;
|
|
25152
25165
|
let dateObj;
|
|
25153
|
-
|
|
25166
|
+
let firstDate = addDays(initialDate, i);
|
|
25167
|
+
if (this.parent.currentView === 'Agenda' && this.parent.activeViewOptions.group.byDate &&
|
|
25168
|
+
this.parent.activeViewOptions.allowVirtualScrolling && !showWeekend && !this.isWorkDay(firstDate)) {
|
|
25169
|
+
do {
|
|
25170
|
+
firstDate = addDays(firstDate, 1);
|
|
25171
|
+
if (firstDate >= agendaEnd) {
|
|
25172
|
+
break;
|
|
25173
|
+
}
|
|
25174
|
+
} while (!this.isWorkDay(firstDate) ||
|
|
25175
|
+
this.parent.eventBase.filterEvents(firstDate, addDays(firstDate, 1)).length < 1);
|
|
25176
|
+
if (firstDate >= agendaEnd) {
|
|
25177
|
+
break;
|
|
25178
|
+
}
|
|
25179
|
+
initialDate = addDays(firstDate, -i);
|
|
25180
|
+
agendaLastDate = addDays(firstDate, 1);
|
|
25181
|
+
}
|
|
25154
25182
|
const finalDate = (this.parent.activeViewOptions.group.byDate || this.parent.currentView === 'MonthAgenda')
|
|
25155
25183
|
? addDays(firstDate, 1) : agendaLastDate;
|
|
25156
25184
|
const agendaCollection = this.parent.eventBase.filterEvents(firstDate, finalDate);
|
|
@@ -25165,7 +25193,9 @@ class AgendaBase extends ViewBase {
|
|
|
25165
25193
|
for (let r = 0; r < noOfDays; r++) {
|
|
25166
25194
|
// eslint-disable-next-line max-len
|
|
25167
25195
|
const resDayCollection = this.parent.eventBase.filterEvents(agendaDate, addDays(agendaDate, 1), resDataCollection, undefined);
|
|
25168
|
-
if (
|
|
25196
|
+
if (((showWeekend || !showWeekend && (this.parent.group.byDate ? this.isWorkDay(agendaDate) :
|
|
25197
|
+
this.isWorkDay(agendaDate, resData[parseInt(res.toString(), 10)].workDays)))
|
|
25198
|
+
&& (resDayCollection.length > 0 || !this.parent.hideEmptyAgendaDays)) ||
|
|
25169
25199
|
this.parent.currentView === 'MonthAgenda') {
|
|
25170
25200
|
data.push(resDayCollection[0]);
|
|
25171
25201
|
eventObj = {
|
|
@@ -25191,16 +25221,18 @@ class AgendaBase extends ViewBase {
|
|
|
25191
25221
|
agendaDate = addDays(agendaDate, 1);
|
|
25192
25222
|
if (agendaDate.getTime() >= agendaLastDate.getTime() || this.parent.activeViewOptions.group.byDate
|
|
25193
25223
|
|| this.parent.currentView === 'MonthAgenda') {
|
|
25194
|
-
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25224
|
+
if (data.length > 0) {
|
|
25225
|
+
lastLevelInfo[lastLevelInfo.length - 1][1].cssClass = AGENDA_DAY_BORDER_CLASS;
|
|
25226
|
+
const tempObj = {
|
|
25227
|
+
rowSpan: data.length, type: 'resourceColumn', resource: resColl[parseInt((resColl.length - 1).toString(), 10)],
|
|
25228
|
+
groupOrder: resData[parseInt(res.toString(), 10)].groupOrder.slice(0, -1),
|
|
25229
|
+
resourceData: resData[parseInt(res.toString(), 10)].resourceData,
|
|
25230
|
+
groupIndex: (lastLevelInfo.length - data.length), className: [RESOURCE_NAME],
|
|
25231
|
+
date: agendaDate
|
|
25232
|
+
};
|
|
25233
|
+
lastLevelInfo[parseInt((lastLevelInfo.length - data.length).toString(), 10)].push(tempObj);
|
|
25234
|
+
tempLastLevelInfo.push(extend({}, tempObj, null, true));
|
|
25235
|
+
}
|
|
25204
25236
|
break;
|
|
25205
25237
|
}
|
|
25206
25238
|
}
|
|
@@ -25235,9 +25267,9 @@ class AgendaBase extends ViewBase {
|
|
|
25235
25267
|
this.createResourceTableRow(lastLevelInfo, tBody);
|
|
25236
25268
|
}
|
|
25237
25269
|
}
|
|
25238
|
-
const totalCollection = this.parent.eventBase.filterEvents(
|
|
25270
|
+
const totalCollection = this.parent.eventBase.filterEvents(agendaStart, agendaLastDate);
|
|
25239
25271
|
if (totalCollection.length === 0 && !this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
|
|
25240
|
-
this.renderEmptyContent(tBody,
|
|
25272
|
+
this.renderEmptyContent(tBody, agendaStart);
|
|
25241
25273
|
}
|
|
25242
25274
|
}
|
|
25243
25275
|
createResourceTableRow(tContent, tBody) {
|
|
@@ -25492,9 +25524,19 @@ class Agenda extends AgendaBase {
|
|
|
25492
25524
|
const firstDate = new Date(agendaDate.getTime());
|
|
25493
25525
|
const isObject = this.appointmentFiltering(firstDate, lastDate);
|
|
25494
25526
|
if (isObject.length > 0 && this.parent.activeViewOptions.allowVirtualScrolling && this.parent.hideEmptyAgendaDays) {
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25527
|
+
if (!this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(isObject[0][fieldMapping.startTime])) {
|
|
25528
|
+
for (const event of isObject) {
|
|
25529
|
+
if (this.isAgendaWorkDay(event[fieldMapping.startTime])) {
|
|
25530
|
+
agendaDate = new Date(new Date(event[fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
|
|
25531
|
+
this.updateHeaderText(event[fieldMapping.startTime]);
|
|
25532
|
+
break;
|
|
25533
|
+
}
|
|
25534
|
+
}
|
|
25535
|
+
}
|
|
25536
|
+
else {
|
|
25537
|
+
agendaDate = new Date(new Date(isObject[0][fieldMapping.startTime].getTime()).setHours(0, 0, 0, 0));
|
|
25538
|
+
this.updateHeaderText(isObject[0][fieldMapping.startTime]);
|
|
25539
|
+
}
|
|
25498
25540
|
}
|
|
25499
25541
|
let endDate;
|
|
25500
25542
|
if (!this.parent.hideEmptyAgendaDays || (this.parent.agendaDaysCount > 0 && isObject.length > 0)) {
|
|
@@ -25508,18 +25550,25 @@ class Agenda extends AgendaBase {
|
|
|
25508
25550
|
this.parent.headerModule.updateHeaderItems('remove');
|
|
25509
25551
|
}
|
|
25510
25552
|
}
|
|
25511
|
-
this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date);
|
|
25553
|
+
this.calculateResourceTableElement(tBody, this.parent.agendaDaysCount, date, lastDate);
|
|
25512
25554
|
}
|
|
25513
25555
|
else {
|
|
25514
25556
|
for (let day = 0; day < this.parent.agendaDaysCount; day++) {
|
|
25515
|
-
const filterData = this.appointmentFiltering(agendaDate);
|
|
25516
25557
|
const nTr = this.createTableRowElement(agendaDate, 'data');
|
|
25517
|
-
|
|
25558
|
+
const virtualContent = this.element.querySelector('tr[data-row-index="' + (+(nTr.dataset.rowIndex)) + '"]');
|
|
25559
|
+
if (virtualContent || !this.parent.activeViewOptions.showWeekend && !this.isAgendaWorkDay(agendaDate)) {
|
|
25518
25560
|
agendaDate = addDays(agendaDate, 1);
|
|
25561
|
+
if (!virtualContent && this.parent.activeViewOptions.allowVirtualScrolling) {
|
|
25562
|
+
day--;
|
|
25563
|
+
}
|
|
25564
|
+
if (agendaDate.getTime() > lastDate.getTime()) {
|
|
25565
|
+
break;
|
|
25566
|
+
}
|
|
25519
25567
|
continue;
|
|
25520
25568
|
}
|
|
25521
25569
|
const dTd = nTr.children[0];
|
|
25522
25570
|
const aTd = nTr.children[1];
|
|
25571
|
+
const filterData = this.appointmentFiltering(agendaDate);
|
|
25523
25572
|
if (filterData.length > 0 || (!this.parent.hideEmptyAgendaDays && filterData.length === 0)) {
|
|
25524
25573
|
const elementType = (!this.parent.hideEmptyAgendaDays && filterData.length === 0) ? 'noEvents' : 'data';
|
|
25525
25574
|
dTd.appendChild(this.createDateHeaderElement(agendaDate));
|
|
@@ -25546,6 +25595,14 @@ class Agenda extends AgendaBase {
|
|
|
25546
25595
|
}
|
|
25547
25596
|
this.agendaDates = { start: firstDate, end: endDate };
|
|
25548
25597
|
}
|
|
25598
|
+
isAgendaWorkDay(date) {
|
|
25599
|
+
if (this.parent.uiStateValues.isGroupAdaptive && !this.parent.group.byDate) {
|
|
25600
|
+
return this.isWorkDay(date, this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays);
|
|
25601
|
+
}
|
|
25602
|
+
else {
|
|
25603
|
+
return this.isWorkDay(date);
|
|
25604
|
+
}
|
|
25605
|
+
}
|
|
25549
25606
|
agendaScrolling(event) {
|
|
25550
25607
|
if (this.parent.quickPopup) {
|
|
25551
25608
|
this.parent.quickPopup.quickPopupHide();
|
|
@@ -25650,9 +25707,12 @@ class Agenda extends AgendaBase {
|
|
|
25650
25707
|
const lastDate = this.getEndDateFromStartDate(date);
|
|
25651
25708
|
let daysCount = 0;
|
|
25652
25709
|
do {
|
|
25653
|
-
|
|
25654
|
-
|
|
25655
|
-
|
|
25710
|
+
if (this.parent.activeViewOptions.showWeekend || !this.parent.activeViewOptions.showWeekend &&
|
|
25711
|
+
this.isAgendaWorkDay(currentDate)) {
|
|
25712
|
+
const filterData = this.appointmentFiltering(currentDate);
|
|
25713
|
+
if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays) {
|
|
25714
|
+
daysCount++;
|
|
25715
|
+
}
|
|
25656
25716
|
}
|
|
25657
25717
|
currentDate = addDays(currentDate, (type === 'next') ? 1 : -1);
|
|
25658
25718
|
if (currentDate < firstDate || currentDate > lastDate) {
|