@syncfusion/ej2-schedule 29.2.10 → 30.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/.eslintrc.json +2 -0
- package/README.md +1 -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 +56 -18
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +56 -17
- 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 +11 -11
- package/src/schedule/actions/crud.js +2 -2
- package/src/schedule/actions/keyboard.js +3 -0
- package/src/schedule/actions/resize.js +1 -1
- package/src/schedule/actions/touch.d.ts +1 -0
- package/src/schedule/actions/touch.js +27 -0
- package/src/schedule/actions/work-cells.js +3 -0
- package/src/schedule/event-renderer/agenda-base.js +2 -8
- package/src/schedule/event-renderer/month.js +4 -2
- package/src/schedule/event-renderer/timeline-view.js +1 -1
- package/src/schedule/event-renderer/vertical-view.js +7 -2
- package/src/schedule/popups/event-window.js +3 -0
- package/src/schedule/renderer/header-renderer.js +2 -1
- package/src/schedule/renderer/timeline-view.js +1 -1
- package/src/schedule/renderer/vertical-view.js +1 -0
- package/styles/bds-lite.css +5 -1
- package/styles/bds.css +10 -2
- package/styles/bootstrap-dark-lite.css +5 -1
- package/styles/bootstrap-dark.css +10 -2
- package/styles/bootstrap-lite.css +5 -1
- package/styles/bootstrap.css +10 -2
- package/styles/bootstrap4-lite.css +5 -1
- package/styles/bootstrap4.css +10 -2
- package/styles/bootstrap5-dark-lite.css +5 -1
- package/styles/bootstrap5-dark.css +10 -2
- package/styles/bootstrap5-lite.css +5 -1
- package/styles/bootstrap5.3-lite.css +5 -1
- package/styles/bootstrap5.3.css +10 -2
- package/styles/bootstrap5.css +10 -2
- package/styles/fabric-dark-lite.css +5 -1
- package/styles/fabric-dark.css +10 -2
- package/styles/fabric-lite.css +5 -1
- package/styles/fabric.css +10 -2
- package/styles/fluent-dark-lite.css +5 -1
- package/styles/fluent-dark.css +10 -2
- package/styles/fluent-lite.css +5 -1
- package/styles/fluent.css +10 -2
- package/styles/fluent2-lite.css +8 -4
- package/styles/fluent2.css +14 -6
- package/styles/highcontrast-light-lite.css +5 -1
- package/styles/highcontrast-light.css +10 -2
- package/styles/highcontrast-lite.css +5 -1
- package/styles/highcontrast.css +10 -2
- package/styles/material-dark-lite.css +5 -1
- package/styles/material-dark.css +10 -2
- package/styles/material-lite.css +5 -1
- package/styles/material.css +10 -2
- package/styles/material3-dark-lite.css +5 -1
- package/styles/material3-dark.css +10 -2
- package/styles/material3-lite.css +5 -1
- package/styles/material3.css +10 -2
- package/styles/schedule/_bigger.scss +8 -2
- package/styles/schedule/_fluent2-definition.scss +1 -1
- package/styles/schedule/_layout.scss +6 -2
- package/styles/schedule/bds.css +10 -2
- package/styles/schedule/bootstrap-dark.css +10 -2
- package/styles/schedule/bootstrap.css +10 -2
- package/styles/schedule/bootstrap4.css +10 -2
- package/styles/schedule/bootstrap5-dark.css +10 -2
- package/styles/schedule/bootstrap5.3.css +10 -2
- package/styles/schedule/bootstrap5.css +10 -2
- package/styles/schedule/fabric-dark.css +10 -2
- package/styles/schedule/fabric.css +10 -2
- package/styles/schedule/fluent-dark.css +10 -2
- package/styles/schedule/fluent.css +10 -2
- package/styles/schedule/fluent2.css +14 -6
- package/styles/schedule/highcontrast-light.css +10 -2
- package/styles/schedule/highcontrast.css +10 -2
- package/styles/schedule/material-dark.css +10 -2
- package/styles/schedule/material.css +10 -2
- package/styles/schedule/material3-dark.css +10 -2
- package/styles/schedule/material3.css +10 -2
- package/styles/schedule/tailwind-dark.css +10 -2
- package/styles/schedule/tailwind.css +10 -2
- package/styles/schedule/tailwind3.css +10 -2
- package/styles/tailwind-dark-lite.css +5 -1
- package/styles/tailwind-dark.css +10 -2
- package/styles/tailwind-lite.css +5 -1
- package/styles/tailwind.css +10 -2
- package/styles/tailwind3-lite.css +5 -1
- package/styles/tailwind3.css +10 -2
|
@@ -1063,10 +1063,11 @@ class HeaderRenderer {
|
|
|
1063
1063
|
const closestEle = closest(e.event.target, '.e-date-range,.e-header-popup,.e-day,.e-selected');
|
|
1064
1064
|
const closestPop = closest(e.event.target, '.e-hor-nav,.e-toolbar-pop');
|
|
1065
1065
|
const contentWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
1066
|
+
const toolbarPop = this.parent.element.querySelector('.e-toolbar-pop');
|
|
1066
1067
|
if (this.parent.isAdaptive) {
|
|
1067
1068
|
if (!isNullOrUndefined(closestPop) && (closestPop.classList.contains('e-toolbar-pop') ||
|
|
1068
1069
|
closestPop.classList.contains('e-hor-nav')) && !(closestPop.classList.contains('e-hor-nav') &&
|
|
1069
|
-
|
|
1070
|
+
toolbarPop && toolbarPop.classList.contains(POPUP_OPEN))) {
|
|
1070
1071
|
addClass([contentWrap], SCROLL_HIDDEN);
|
|
1071
1072
|
}
|
|
1072
1073
|
else {
|
|
@@ -2036,11 +2037,37 @@ class ScheduleTouch {
|
|
|
2036
2037
|
this.parent.activeView.setPanel(this.currentPanel.element);
|
|
2037
2038
|
this.parent.setProperties({ selectedDate: this.currentPanel.selectedDate }, true);
|
|
2038
2039
|
this.parent.activeView.renderDates = this.currentPanel.renderDates;
|
|
2040
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.resourceBase.lastResourceLevel.length > 0) {
|
|
2041
|
+
const workDaysField = this.parent.resourceBase.resourceCollection[0].workDaysField;
|
|
2042
|
+
this.parent.resourceBase.lastResourceLevel.forEach((resource) => {
|
|
2043
|
+
if (workDaysField) {
|
|
2044
|
+
const resourceWorkDays = resource[workDaysField];
|
|
2045
|
+
const hasCustomWorkDays = Array.isArray(resourceWorkDays) &&
|
|
2046
|
+
(!this.parent.showWeekend || this.parent.currentView === 'WorkWeek');
|
|
2047
|
+
resource.renderDates = hasCustomWorkDays
|
|
2048
|
+
? this.calculateResourceSpecificDates(resource, workDaysField)
|
|
2049
|
+
: this.currentPanel.renderDates;
|
|
2050
|
+
}
|
|
2051
|
+
else {
|
|
2052
|
+
resource.renderDates = this.currentPanel.renderDates;
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2039
2056
|
this.parent.activeView.colLevels = this.currentPanel.colLevels;
|
|
2040
2057
|
addClass([this.element], TRANSLATE_CLASS);
|
|
2041
2058
|
const prevWidth = this.previousPanel ? this.previousPanel.element.offsetWidth : 0;
|
|
2042
2059
|
this.element.style.transform = 'translatex(' + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + 'px)';
|
|
2043
2060
|
}
|
|
2061
|
+
calculateResourceSpecificDates(resource, workDaysField) {
|
|
2062
|
+
const resourceDates = [];
|
|
2063
|
+
const resourceWorkDays = resource[workDaysField];
|
|
2064
|
+
this.currentPanel.renderDates.forEach((date) => {
|
|
2065
|
+
if (Array.isArray(resourceWorkDays) && resourceWorkDays.indexOf(date.getDay()) !== -1) {
|
|
2066
|
+
resourceDates.push(date);
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
2069
|
+
return resourceDates;
|
|
2070
|
+
}
|
|
2044
2071
|
onTransitionEnd() {
|
|
2045
2072
|
if (!isNullOrUndefined(this.element) && !this.element.classList.contains(TRANSLATE_CLASS)) {
|
|
2046
2073
|
return;
|
|
@@ -2361,6 +2388,9 @@ class KeyboardInteraction {
|
|
|
2361
2388
|
}
|
|
2362
2389
|
const queryStr = '.' + WORK_CELLS_CLASS + ',.' + ALLDAY_CELLS_CLASS + ',.' + HEADER_CELLS_CLASS;
|
|
2363
2390
|
let target = closest(e.target, queryStr);
|
|
2391
|
+
if (!target) {
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2364
2394
|
const selectedCells = this.parent.getSelectedCells();
|
|
2365
2395
|
if (selectedCells.length > 0 && selectedCells.indexOf(target) === -1) {
|
|
2366
2396
|
target = selectedCells[selectedCells.length - 1];
|
|
@@ -7386,10 +7416,15 @@ class VerticalEvent extends EventBase {
|
|
|
7386
7416
|
blockHeight = formatUnit(this.getHeight(eStart, eEnd));
|
|
7387
7417
|
blockTop = formatUnit(this.getTopValue(eStart));
|
|
7388
7418
|
}
|
|
7419
|
+
if (eventObj.IsBlock) {
|
|
7420
|
+
blockHeight = formatUnit(parseInt(blockHeight, 10) - 1);
|
|
7421
|
+
}
|
|
7389
7422
|
const appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
|
|
7390
|
-
|
|
7423
|
+
const appWidth = eventObj.IsBlock ? '99%' : '100%';
|
|
7424
|
+
setStyleAttribute(appointmentElement, { 'width': appWidth, 'height': blockHeight, 'top': blockTop });
|
|
7391
7425
|
const index = this.getDayIndex(dayIndex, resource, dayCount);
|
|
7392
|
-
|
|
7426
|
+
const appLeft = eventObj.IsBlock ? '0.5px' : '0px';
|
|
7427
|
+
this.appendEvent(eventObj, appointmentElement, index, appLeft);
|
|
7393
7428
|
}
|
|
7394
7429
|
}
|
|
7395
7430
|
renderEvents(eventType) {
|
|
@@ -8307,9 +8342,11 @@ class MonthEvent extends EventBase {
|
|
|
8307
8342
|
const diffInDays = eventData.count;
|
|
8308
8343
|
let appWidth = this.getEventWidth(startTime, endTime, event[this.fields.isAllDay], diffInDays);
|
|
8309
8344
|
appWidth = (appWidth <= 0) ? this.cellWidth : appWidth;
|
|
8310
|
-
|
|
8311
|
-
const
|
|
8312
|
-
const
|
|
8345
|
+
appWidth = event.IsBlock ? appWidth - 1 : appWidth;
|
|
8346
|
+
const appLeft = (this.parent.enableRtl) ? 0 : event.IsBlock ? position + 1 : position;
|
|
8347
|
+
const appRight = (this.parent.enableRtl) ? event.IsBlock ? position + 1 : position : 0;
|
|
8348
|
+
let appHeight = this.cellHeight - this.monthHeaderHeight;
|
|
8349
|
+
appHeight = event.IsBlock ? appHeight - 1 : appHeight;
|
|
8313
8350
|
const appTop = this.getRowTop(resIndex);
|
|
8314
8351
|
const blockElement = this.createBlockAppointmentElement(event, resIndex, this.isResourceEventTemplate);
|
|
8315
8352
|
setStyleAttribute(blockElement, {
|
|
@@ -9113,7 +9150,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
9113
9150
|
for (const element of blockElement) {
|
|
9114
9151
|
const resIndex = parseInt(element.getAttribute('data-group-index'), 10);
|
|
9115
9152
|
const firstChild = this.getFirstChild(resIndex);
|
|
9116
|
-
element.style.height = firstChild.offsetHeight + 'px';
|
|
9153
|
+
element.style.height = (firstChild.offsetHeight - 1) + 'px';
|
|
9117
9154
|
const width = element.offsetWidth / firstChild.offsetWidth;
|
|
9118
9155
|
element.style.width = (firstChild.offsetWidth * width) + 'px';
|
|
9119
9156
|
}
|
|
@@ -13367,6 +13404,9 @@ class EventWindow {
|
|
|
13367
13404
|
this.dialogObject.show();
|
|
13368
13405
|
}
|
|
13369
13406
|
convertToEventData(cellsData, eventObj) {
|
|
13407
|
+
if (!cellsData) {
|
|
13408
|
+
return;
|
|
13409
|
+
}
|
|
13370
13410
|
if (cellsData.subject) {
|
|
13371
13411
|
eventObj[this.fields.subject] = cellsData.subject;
|
|
13372
13412
|
}
|
|
@@ -15843,6 +15883,7 @@ class Crud {
|
|
|
15843
15883
|
if (!deleteArgs.cancel) {
|
|
15844
15884
|
const fields = this.parent.eventFields;
|
|
15845
15885
|
const editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
15886
|
+
const cloneEvents = extend([], deleteArgs.deletedRecords, null, true);
|
|
15846
15887
|
for (let a = 0, count = deleteArgs.deletedRecords.length; a < count; a++) {
|
|
15847
15888
|
let isDelete = isNullOrUndefined(deleteArgs.deletedRecords[parseInt(a.toString(), 10)][this.parent.eventFields.recurrenceRule]);
|
|
15848
15889
|
if (!isDelete) {
|
|
@@ -15873,8 +15914,7 @@ class Crud {
|
|
|
15873
15914
|
}
|
|
15874
15915
|
}
|
|
15875
15916
|
const promise = this.parent.dataModule.dataManager.saveChanges(editParams, fields.id, this.getTable(), this.getQuery());
|
|
15876
|
-
|
|
15877
|
-
this.parent.eventBase.selectWorkCellByTime([this.parent.eventBase.processTimezone(cloneEvent)]);
|
|
15917
|
+
this.parent.eventBase.selectWorkCellByTime(cloneEvents);
|
|
15878
15918
|
const crudArgs = {
|
|
15879
15919
|
requestType: 'eventRemoved', cancel: false, data: deleteArgs.deletedRecords, promise: promise, editParams: editParams
|
|
15880
15920
|
};
|
|
@@ -16101,6 +16141,9 @@ class WorkCellInteraction {
|
|
|
16101
16141
|
}
|
|
16102
16142
|
const args = extend(this.parent.activeCellsData, { cancel: false, event: e, name: 'cellDoubleClick' });
|
|
16103
16143
|
this.parent.trigger(cellDoubleClick, args, (clickArgs) => {
|
|
16144
|
+
if (!clickArgs.startTime) {
|
|
16145
|
+
return;
|
|
16146
|
+
}
|
|
16104
16147
|
const date = new Date(clickArgs.startTime.getTime());
|
|
16105
16148
|
if (!this.parent.isMinMaxDate(new Date(date.setHours(0, 0, 0, 0)))) {
|
|
16106
16149
|
return;
|
|
@@ -21686,7 +21729,7 @@ class Resize extends ActionBase {
|
|
|
21686
21729
|
}
|
|
21687
21730
|
this.actionObj.event[this.parent.eventFields.isAllDay] = false;
|
|
21688
21731
|
}
|
|
21689
|
-
let width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)
|
|
21732
|
+
let width = !isLeft && (Math.floor(offsetWidth + this.actionObj.clone.offsetLeft) > this.scrollArgs.width) ?
|
|
21690
21733
|
this.parent.getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
21691
21734
|
if (this.parent.enableRtl) {
|
|
21692
21735
|
let rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
|
|
@@ -24668,6 +24711,7 @@ class VerticalView extends ViewBase {
|
|
|
24668
24711
|
}
|
|
24669
24712
|
changeCurrentTimePosition() {
|
|
24670
24713
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
24714
|
+
this.parent = null;
|
|
24671
24715
|
return;
|
|
24672
24716
|
}
|
|
24673
24717
|
this.removeCurrentTimeIndicatorElements();
|
|
@@ -26447,13 +26491,7 @@ class AgendaBase extends ViewBase {
|
|
|
26447
26491
|
moduleName: 'agenda',
|
|
26448
26492
|
listClass: this.parent.activeView.viewClass,
|
|
26449
26493
|
itemClass: this.parent.activeView.viewClass,
|
|
26450
|
-
template: (
|
|
26451
|
-
const div = createElement('div', {
|
|
26452
|
-
className: AGENDA_NO_EVENT_CLASS,
|
|
26453
|
-
innerHTML: data.subject
|
|
26454
|
-
});
|
|
26455
|
-
return div;
|
|
26456
|
-
}
|
|
26494
|
+
template: initializeCSPTemplate(() => `<div class="${AGENDA_NO_EVENT_CLASS}">${this.parent.localeObj.getConstant('noEvents')}</div>`)
|
|
26457
26495
|
});
|
|
26458
26496
|
if (listElement.querySelector('.e-agenda-item').children.length === 0) {
|
|
26459
26497
|
listElement.firstElementChild.appendChild(createElement('div', { className: AGENDA_NO_EVENT_CLASS, innerHTML: this.parent.localeObj.getConstant('noEvents') }));
|
|
@@ -27698,7 +27736,6 @@ class TimelineViews extends VerticalView {
|
|
|
27698
27736
|
}
|
|
27699
27737
|
changeCurrentTimePosition() {
|
|
27700
27738
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
27701
|
-
this.parent = null;
|
|
27702
27739
|
return;
|
|
27703
27740
|
}
|
|
27704
27741
|
this.removeCurrentTimeIndicatorElements();
|
|
@@ -27868,6 +27905,7 @@ class TimelineViews extends VerticalView {
|
|
|
27868
27905
|
}
|
|
27869
27906
|
destroy() {
|
|
27870
27907
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
27908
|
+
this.parent = null;
|
|
27871
27909
|
return;
|
|
27872
27910
|
}
|
|
27873
27911
|
if (this.timelineAppointment) {
|