@syncfusion/ej2-schedule 29.2.8 → 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 -12
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +56 -11
- 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 -2
- 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
|
@@ -1074,10 +1074,11 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
|
|
|
1074
1074
|
var closestEle = closest(e.event.target, '.e-date-range,.e-header-popup,.e-day,.e-selected');
|
|
1075
1075
|
var closestPop = closest(e.event.target, '.e-hor-nav,.e-toolbar-pop');
|
|
1076
1076
|
var contentWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
1077
|
+
var toolbarPop = this.parent.element.querySelector('.e-toolbar-pop');
|
|
1077
1078
|
if (this.parent.isAdaptive) {
|
|
1078
1079
|
if (!isNullOrUndefined(closestPop) && (closestPop.classList.contains('e-toolbar-pop') ||
|
|
1079
1080
|
closestPop.classList.contains('e-hor-nav')) && !(closestPop.classList.contains('e-hor-nav') &&
|
|
1080
|
-
|
|
1081
|
+
toolbarPop && toolbarPop.classList.contains(POPUP_OPEN))) {
|
|
1081
1082
|
addClass([contentWrap], SCROLL_HIDDEN);
|
|
1082
1083
|
}
|
|
1083
1084
|
else {
|
|
@@ -2052,14 +2053,41 @@ var ScheduleTouch = /** @__PURE__ @class */ (function () {
|
|
|
2052
2053
|
});
|
|
2053
2054
|
};
|
|
2054
2055
|
ScheduleTouch.prototype.cancelSwipe = function () {
|
|
2056
|
+
var _this = this;
|
|
2055
2057
|
this.parent.activeView.setPanel(this.currentPanel.element);
|
|
2056
2058
|
this.parent.setProperties({ selectedDate: this.currentPanel.selectedDate }, true);
|
|
2057
2059
|
this.parent.activeView.renderDates = this.currentPanel.renderDates;
|
|
2060
|
+
if (this.parent.activeViewOptions.group.resources.length > 0 && this.parent.resourceBase.lastResourceLevel.length > 0) {
|
|
2061
|
+
var workDaysField_1 = this.parent.resourceBase.resourceCollection[0].workDaysField;
|
|
2062
|
+
this.parent.resourceBase.lastResourceLevel.forEach(function (resource) {
|
|
2063
|
+
if (workDaysField_1) {
|
|
2064
|
+
var resourceWorkDays = resource[workDaysField_1];
|
|
2065
|
+
var hasCustomWorkDays = Array.isArray(resourceWorkDays) &&
|
|
2066
|
+
(!_this.parent.showWeekend || _this.parent.currentView === 'WorkWeek');
|
|
2067
|
+
resource.renderDates = hasCustomWorkDays
|
|
2068
|
+
? _this.calculateResourceSpecificDates(resource, workDaysField_1)
|
|
2069
|
+
: _this.currentPanel.renderDates;
|
|
2070
|
+
}
|
|
2071
|
+
else {
|
|
2072
|
+
resource.renderDates = _this.currentPanel.renderDates;
|
|
2073
|
+
}
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2058
2076
|
this.parent.activeView.colLevels = this.currentPanel.colLevels;
|
|
2059
2077
|
addClass([this.element], TRANSLATE_CLASS);
|
|
2060
2078
|
var prevWidth = this.previousPanel ? this.previousPanel.element.offsetWidth : 0;
|
|
2061
2079
|
this.element.style.transform = 'translatex(' + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + 'px)';
|
|
2062
2080
|
};
|
|
2081
|
+
ScheduleTouch.prototype.calculateResourceSpecificDates = function (resource, workDaysField) {
|
|
2082
|
+
var resourceDates = [];
|
|
2083
|
+
var resourceWorkDays = resource[workDaysField];
|
|
2084
|
+
this.currentPanel.renderDates.forEach(function (date) {
|
|
2085
|
+
if (Array.isArray(resourceWorkDays) && resourceWorkDays.indexOf(date.getDay()) !== -1) {
|
|
2086
|
+
resourceDates.push(date);
|
|
2087
|
+
}
|
|
2088
|
+
});
|
|
2089
|
+
return resourceDates;
|
|
2090
|
+
};
|
|
2063
2091
|
ScheduleTouch.prototype.onTransitionEnd = function () {
|
|
2064
2092
|
if (!isNullOrUndefined(this.element) && !this.element.classList.contains(TRANSLATE_CLASS)) {
|
|
2065
2093
|
return;
|
|
@@ -2392,6 +2420,9 @@ var KeyboardInteraction = /** @__PURE__ @class */ (function () {
|
|
|
2392
2420
|
}
|
|
2393
2421
|
var queryStr = '.' + WORK_CELLS_CLASS + ',.' + ALLDAY_CELLS_CLASS + ',.' + HEADER_CELLS_CLASS;
|
|
2394
2422
|
var target = closest(e.target, queryStr);
|
|
2423
|
+
if (!target) {
|
|
2424
|
+
return;
|
|
2425
|
+
}
|
|
2395
2426
|
var selectedCells = this.parent.getSelectedCells();
|
|
2396
2427
|
if (selectedCells.length > 0 && selectedCells.indexOf(target) === -1) {
|
|
2397
2428
|
target = selectedCells[selectedCells.length - 1];
|
|
@@ -7552,10 +7583,15 @@ var VerticalEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7552
7583
|
blockHeight = formatUnit(this.getHeight(eStart, eEnd));
|
|
7553
7584
|
blockTop = formatUnit(this.getTopValue(eStart));
|
|
7554
7585
|
}
|
|
7586
|
+
if (eventObj.IsBlock) {
|
|
7587
|
+
blockHeight = formatUnit(parseInt(blockHeight, 10) - 1);
|
|
7588
|
+
}
|
|
7555
7589
|
var appointmentElement = this.createBlockAppointmentElement(eventObj, resource, this.isResourceEventTemplate);
|
|
7556
|
-
|
|
7590
|
+
var appWidth = eventObj.IsBlock ? '99%' : '100%';
|
|
7591
|
+
setStyleAttribute(appointmentElement, { 'width': appWidth, 'height': blockHeight, 'top': blockTop });
|
|
7557
7592
|
var index = this.getDayIndex(dayIndex, resource, dayCount);
|
|
7558
|
-
|
|
7593
|
+
var appLeft = eventObj.IsBlock ? '0.5px' : '0px';
|
|
7594
|
+
this.appendEvent(eventObj, appointmentElement, index, appLeft);
|
|
7559
7595
|
}
|
|
7560
7596
|
};
|
|
7561
7597
|
VerticalEvent.prototype.renderEvents = function (eventType) {
|
|
@@ -8523,9 +8559,11 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
8523
8559
|
var diffInDays = eventData.count;
|
|
8524
8560
|
var appWidth = this.getEventWidth(startTime, endTime, event[this.fields.isAllDay], diffInDays);
|
|
8525
8561
|
appWidth = (appWidth <= 0) ? this.cellWidth : appWidth;
|
|
8526
|
-
|
|
8527
|
-
var
|
|
8562
|
+
appWidth = event.IsBlock ? appWidth - 1 : appWidth;
|
|
8563
|
+
var appLeft = (this.parent.enableRtl) ? 0 : event.IsBlock ? position + 1 : position;
|
|
8564
|
+
var appRight = (this.parent.enableRtl) ? event.IsBlock ? position + 1 : position : 0;
|
|
8528
8565
|
var appHeight = this.cellHeight - this.monthHeaderHeight;
|
|
8566
|
+
appHeight = event.IsBlock ? appHeight - 1 : appHeight;
|
|
8529
8567
|
var appTop = this.getRowTop(resIndex);
|
|
8530
8568
|
var blockElement = this.createBlockAppointmentElement(event, resIndex, this.isResourceEventTemplate);
|
|
8531
8569
|
setStyleAttribute(blockElement, {
|
|
@@ -9361,7 +9399,7 @@ var TimelineEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
9361
9399
|
var element = blockElement_1[_i];
|
|
9362
9400
|
var resIndex = parseInt(element.getAttribute('data-group-index'), 10);
|
|
9363
9401
|
var firstChild = this.getFirstChild(resIndex);
|
|
9364
|
-
element.style.height = firstChild.offsetHeight + 'px';
|
|
9402
|
+
element.style.height = (firstChild.offsetHeight - 1) + 'px';
|
|
9365
9403
|
var width = element.offsetWidth / firstChild.offsetWidth;
|
|
9366
9404
|
element.style.width = (firstChild.offsetWidth * width) + 'px';
|
|
9367
9405
|
}
|
|
@@ -13693,6 +13731,9 @@ var EventWindow = /** @__PURE__ @class */ (function () {
|
|
|
13693
13731
|
this.dialogObject.show();
|
|
13694
13732
|
};
|
|
13695
13733
|
EventWindow.prototype.convertToEventData = function (cellsData, eventObj) {
|
|
13734
|
+
if (!cellsData) {
|
|
13735
|
+
return;
|
|
13736
|
+
}
|
|
13696
13737
|
if (cellsData.subject) {
|
|
13697
13738
|
eventObj[this.fields.subject] = cellsData.subject;
|
|
13698
13739
|
}
|
|
@@ -16315,6 +16356,7 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
16315
16356
|
if (!deleteArgs.cancel) {
|
|
16316
16357
|
var fields_3 = _this.parent.eventFields;
|
|
16317
16358
|
var editParams = { addedRecords: [], changedRecords: [], deletedRecords: [] };
|
|
16359
|
+
var cloneEvents = extend([], deleteArgs.deletedRecords, null, true);
|
|
16318
16360
|
var _loop_5 = function (a, count) {
|
|
16319
16361
|
var isDelete = isNullOrUndefined(deleteArgs.deletedRecords[parseInt(a.toString(), 10)][_this.parent.eventFields.recurrenceRule]);
|
|
16320
16362
|
if (!isDelete) {
|
|
@@ -16351,8 +16393,7 @@ var Crud = /** @__PURE__ @class */ (function () {
|
|
|
16351
16393
|
_loop_5(a, count);
|
|
16352
16394
|
}
|
|
16353
16395
|
var promise = _this.parent.dataModule.dataManager.saveChanges(editParams, fields_3.id, _this.getTable(), _this.getQuery());
|
|
16354
|
-
|
|
16355
|
-
_this.parent.eventBase.selectWorkCellByTime([_this.parent.eventBase.processTimezone(cloneEvent)]);
|
|
16396
|
+
_this.parent.eventBase.selectWorkCellByTime(cloneEvents);
|
|
16356
16397
|
var crudArgs = {
|
|
16357
16398
|
requestType: 'eventRemoved', cancel: false, data: deleteArgs.deletedRecords, promise: promise, editParams: editParams
|
|
16358
16399
|
};
|
|
@@ -16588,6 +16629,9 @@ var WorkCellInteraction = /** @__PURE__ @class */ (function () {
|
|
|
16588
16629
|
}
|
|
16589
16630
|
var args = extend(this.parent.activeCellsData, { cancel: false, event: e, name: 'cellDoubleClick' });
|
|
16590
16631
|
this.parent.trigger(cellDoubleClick, args, function (clickArgs) {
|
|
16632
|
+
if (!clickArgs.startTime) {
|
|
16633
|
+
return;
|
|
16634
|
+
}
|
|
16591
16635
|
var date = new Date(clickArgs.startTime.getTime());
|
|
16592
16636
|
if (!_this.parent.isMinMaxDate(new Date(date.setHours(0, 0, 0, 0)))) {
|
|
16593
16637
|
return;
|
|
@@ -22441,7 +22485,7 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
22441
22485
|
}
|
|
22442
22486
|
this.actionObj.event[this.parent.eventFields.isAllDay] = false;
|
|
22443
22487
|
}
|
|
22444
|
-
var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)
|
|
22488
|
+
var width = !isLeft && (Math.floor(offsetWidth + this.actionObj.clone.offsetLeft) > this.scrollArgs.width) ?
|
|
22445
22489
|
this.parent.getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
22446
22490
|
if (this.parent.enableRtl) {
|
|
22447
22491
|
var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
|
|
@@ -25532,6 +25576,7 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
|
|
|
25532
25576
|
};
|
|
25533
25577
|
VerticalView.prototype.changeCurrentTimePosition = function () {
|
|
25534
25578
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
25579
|
+
this.parent = null;
|
|
25535
25580
|
return;
|
|
25536
25581
|
}
|
|
25537
25582
|
this.removeCurrentTimeIndicatorElements();
|
|
@@ -27431,7 +27476,7 @@ var AgendaBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
27431
27476
|
moduleName: 'agenda',
|
|
27432
27477
|
listClass: this.parent.activeView.viewClass,
|
|
27433
27478
|
itemClass: this.parent.activeView.viewClass,
|
|
27434
|
-
template: "<div class=\"" + AGENDA_NO_EVENT_CLASS + "\">" +
|
|
27479
|
+
template: initializeCSPTemplate(function () { return "<div class=\"" + AGENDA_NO_EVENT_CLASS + "\">" + _this.parent.localeObj.getConstant('noEvents') + "</div>"; })
|
|
27435
27480
|
});
|
|
27436
27481
|
if (listElement.querySelector('.e-agenda-item').children.length === 0) {
|
|
27437
27482
|
listElement.firstElementChild.appendChild(createElement('div', { className: AGENDA_NO_EVENT_CLASS, innerHTML: this.parent.localeObj.getConstant('noEvents') }));
|
|
@@ -28747,7 +28792,6 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
28747
28792
|
};
|
|
28748
28793
|
TimelineViews.prototype.changeCurrentTimePosition = function () {
|
|
28749
28794
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
28750
|
-
this.parent = null;
|
|
28751
28795
|
return;
|
|
28752
28796
|
}
|
|
28753
28797
|
this.removeCurrentTimeIndicatorElements();
|
|
@@ -28918,6 +28962,7 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
|
|
|
28918
28962
|
};
|
|
28919
28963
|
TimelineViews.prototype.destroy = function () {
|
|
28920
28964
|
if (!this.parent || this.parent && this.parent.isDestroyed) {
|
|
28965
|
+
this.parent = null;
|
|
28921
28966
|
return;
|
|
28922
28967
|
}
|
|
28923
28968
|
if (this.timelineAppointment) {
|