@syncfusion/ej2-schedule 19.4.38 → 19.4.43
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 +30 -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 +74 -52
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +74 -52
- 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 +13 -13
- package/src/schedule/actions/drag.js +2 -2
- package/src/schedule/actions/resize.js +44 -37
- package/src/schedule/base/css-constant.d.ts +6 -0
- package/src/schedule/base/css-constant.js +6 -0
- package/src/schedule/base/schedule.js +1 -1
- package/src/schedule/event-renderer/event-base.d.ts +1 -1
- package/src/schedule/event-renderer/event-base.js +2 -3
- package/src/schedule/event-renderer/month.js +2 -1
- package/src/schedule/renderer/header-renderer.js +3 -2
- package/src/schedule/renderer/month.js +2 -1
- package/src/schedule/renderer/renderer.js +6 -1
- package/src/schedule/renderer/timeline-year.js +1 -1
- package/src/schedule/renderer/view-base.js +5 -3
- package/styles/bootstrap-dark.css +4 -0
- package/styles/bootstrap.css +4 -0
- package/styles/bootstrap4.css +4 -0
- package/styles/bootstrap5-dark.css +4 -0
- package/styles/bootstrap5.css +4 -0
- package/styles/fabric-dark.css +4 -0
- package/styles/fabric.css +4 -0
- package/styles/highcontrast-light.css +4 -0
- package/styles/highcontrast.css +4 -0
- package/styles/material-dark.css +4 -0
- package/styles/material.css +4 -0
- package/styles/schedule/_layout.scss +4 -0
- package/styles/schedule/bootstrap-dark.css +4 -0
- package/styles/schedule/bootstrap.css +4 -0
- package/styles/schedule/bootstrap4.css +4 -0
- package/styles/schedule/bootstrap5-dark.css +4 -0
- package/styles/schedule/bootstrap5.css +4 -0
- package/styles/schedule/fabric-dark.css +4 -0
- package/styles/schedule/fabric.css +4 -0
- package/styles/schedule/highcontrast-light.css +4 -0
- package/styles/schedule/highcontrast.css +4 -0
- package/styles/schedule/material-dark.css +4 -0
- package/styles/schedule/material.css +4 -0
- package/styles/schedule/tailwind-dark.css +4 -0
- package/styles/schedule/tailwind.css +4 -0
- package/styles/tailwind-dark.css +4 -0
- package/styles/tailwind.css +4 -0
|
@@ -515,6 +515,12 @@ var DATE_HEADER_CONTAINER_CLASS = 'e-date-header-container';
|
|
|
515
515
|
/** @private */
|
|
516
516
|
var HEADER_CELLS_CLASS = 'e-header-cells';
|
|
517
517
|
/** @private */
|
|
518
|
+
var HEADER_WEEK_CELLS_CLASS = 'e-header-week-cell';
|
|
519
|
+
/** @private */
|
|
520
|
+
var HEADER_MONTH_CELLS_CLASS = 'e-header-month-cell';
|
|
521
|
+
/** @private */
|
|
522
|
+
var HEADER_YEAR_CELLS_CLASS = 'e-header-year-cell';
|
|
523
|
+
/** @private */
|
|
518
524
|
var WORKDAY_CLASS = 'e-work-days';
|
|
519
525
|
/** @private */
|
|
520
526
|
var OTHERMONTH_CLASS = 'e-other-month';
|
|
@@ -1290,6 +1296,7 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
|
|
|
1290
1296
|
var strClass = args.item.cssClass.replace('e-views ', '');
|
|
1291
1297
|
var data;
|
|
1292
1298
|
var isSameTime;
|
|
1299
|
+
var currentTime;
|
|
1293
1300
|
switch (strClass) {
|
|
1294
1301
|
case 'e-date-range':
|
|
1295
1302
|
if (!this.headerPopup) {
|
|
@@ -1339,8 +1346,8 @@ var HeaderRenderer = /** @__PURE__ @class */ (function () {
|
|
|
1339
1346
|
this.parent.changeView('TimelineYear', args.originalEvent, undefined, this.calculateViewIndex(args));
|
|
1340
1347
|
break;
|
|
1341
1348
|
case 'e-today':
|
|
1342
|
-
|
|
1343
|
-
if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(currentTime) ||
|
|
1349
|
+
currentTime = resetTime(this.parent.getCurrentTime());
|
|
1350
|
+
if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda' || !this.parent.isSelectedDate(currentTime) ||
|
|
1344
1351
|
this.parent.currentView === 'Month' && this.parent.activeViewOptions.displayDate && !this.hasSelectedDate() &&
|
|
1345
1352
|
resetTime(this.parent.activeViewOptions.displayDate) !== currentTime || this.parent.currentView === 'Month' &&
|
|
1346
1353
|
this.parent.activeViewOptions.numberOfWeeks > 0 && !this.hasSelectedDate()
|
|
@@ -6305,7 +6312,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6305
6312
|
eventObj[this.parent.eventFields.endTime].getTime() < schedule.endHour.getTime() && start.getTime() === end.getTime();
|
|
6306
6313
|
return isHourRange || isSameRange;
|
|
6307
6314
|
};
|
|
6308
|
-
EventBase.prototype.allDayExpandScroll = function (dateHeader
|
|
6315
|
+
EventBase.prototype.allDayExpandScroll = function (dateHeader) {
|
|
6309
6316
|
var indentHeight = 0;
|
|
6310
6317
|
var headerRows = [].slice.call(this.parent.element.querySelectorAll('.' + HEADER_ROW_CLASS));
|
|
6311
6318
|
headerRows.forEach(function (element) {
|
|
@@ -6315,8 +6322,7 @@ var EventBase = /** @__PURE__ @class */ (function () {
|
|
|
6315
6322
|
});
|
|
6316
6323
|
indentHeight = dateHeader.offsetHeight - indentHeight;
|
|
6317
6324
|
this.parent.element.querySelector('.' + ALLDAY_CELLS_CLASS).style.height = (indentHeight / 12) + 'em';
|
|
6318
|
-
|
|
6319
|
-
if (this.parent.uiStateValues.expand && (content.offsetWidth - content.clientWidth > 0 || heightPropChanged || this.parent.element.classList.contains(DEVICE_CLASS))) {
|
|
6325
|
+
if (this.parent.uiStateValues.expand) {
|
|
6320
6326
|
addClass([dateHeader], ALLDAY_APPOINTMENT_SCROLL);
|
|
6321
6327
|
}
|
|
6322
6328
|
else {
|
|
@@ -7346,7 +7352,8 @@ var MonthEvent = /** @__PURE__ @class */ (function (_super) {
|
|
|
7346
7352
|
setStyleAttribute(cell, { 'height': height_1 + 'px' });
|
|
7347
7353
|
});
|
|
7348
7354
|
}
|
|
7349
|
-
var cellDetail = this.workCells
|
|
7355
|
+
var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ?
|
|
7356
|
+
0 : this.workCells.length - 1].getBoundingClientRect();
|
|
7350
7357
|
this.cellWidth = cellDetail.width;
|
|
7351
7358
|
this.cellHeight = cellDetail.height;
|
|
7352
7359
|
this.dateRender = dateRender;
|
|
@@ -13372,7 +13379,12 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
13372
13379
|
};
|
|
13373
13380
|
Render.prototype.initializeLayout = function (viewName) {
|
|
13374
13381
|
if (this.parent.activeView) {
|
|
13375
|
-
|
|
13382
|
+
var templates = [
|
|
13383
|
+
'cellTemplate', 'eventTemplate', 'tooltipTemplate', 'majorSlotTemplate', 'minorSlotTemplate',
|
|
13384
|
+
'headerTooltipTemplate', 'dateHeaderTemplate', 'dayHeaderTemplate', 'mothHeaderTemplate',
|
|
13385
|
+
'headerIndentTemplate', 'resourceHeaderTemplate', 'cellHeaderTemplate'
|
|
13386
|
+
];
|
|
13387
|
+
this.parent.resetTemplates(templates);
|
|
13376
13388
|
this.parent.activeView.removeEventListener();
|
|
13377
13389
|
this.parent.activeView.destroy();
|
|
13378
13390
|
}
|
|
@@ -17194,7 +17206,7 @@ var Schedule = /** @__PURE__ @class */ (function (_super) {
|
|
|
17194
17206
|
if (dateHeader.classList.contains(ALLDAY_APPOINTMENT_AUTO)) {
|
|
17195
17207
|
removeClass([dateHeader], ALLDAY_APPOINTMENT_AUTO);
|
|
17196
17208
|
}
|
|
17197
|
-
this.eventBase.allDayExpandScroll(dateHeader
|
|
17209
|
+
this.eventBase.allDayExpandScroll(dateHeader);
|
|
17198
17210
|
}
|
|
17199
17211
|
if (!this.uiStateValues.expand) {
|
|
17200
17212
|
allDayRow.style.height = '';
|
|
@@ -19048,9 +19060,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19048
19060
|
bottom: resizeTarget.classList.contains(BOTTOM_RESIZE_HANDLER)
|
|
19049
19061
|
};
|
|
19050
19062
|
_this.actionObj.groupIndex = _this.parent.uiStateValues.isGroupAdaptive ? _this.parent.uiStateValues.groupIndex : 0;
|
|
19051
|
-
var workCell = _this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
19052
|
-
_this.actionObj.cellWidth = workCell.
|
|
19053
|
-
_this.actionObj.cellHeight = workCell.
|
|
19063
|
+
var workCell = _this.parent.element.querySelector('.' + WORK_CELLS_CLASS).getBoundingClientRect();
|
|
19064
|
+
_this.actionObj.cellWidth = workCell.width;
|
|
19065
|
+
_this.actionObj.cellHeight = workCell.height;
|
|
19054
19066
|
var hRows = _this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
|
|
19055
19067
|
if (_this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
|
|
19056
19068
|
var tr = _this.parent.getContentTable().querySelector('tr');
|
|
@@ -19060,8 +19072,9 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19060
19072
|
var td = tdCollections_1[_i];
|
|
19061
19073
|
noOfDays += parseInt(td.getAttribute('colspan'), 10);
|
|
19062
19074
|
}
|
|
19063
|
-
|
|
19064
|
-
_this.actionObj.
|
|
19075
|
+
var trRect = tr.getBoundingClientRect();
|
|
19076
|
+
_this.actionObj.cellWidth = trRect.width / noOfDays;
|
|
19077
|
+
_this.actionObj.cellHeight = trRect.height;
|
|
19065
19078
|
}
|
|
19066
19079
|
var pages = _this.getPageCoordinates(e);
|
|
19067
19080
|
_this.actionObj.X = pages.pageX;
|
|
@@ -19312,12 +19325,12 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19312
19325
|
var eventEnd = new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());
|
|
19313
19326
|
var resizeTime;
|
|
19314
19327
|
var isDateHeader = false;
|
|
19328
|
+
var headerName = this.parent.currentView;
|
|
19315
19329
|
var isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1;
|
|
19316
19330
|
var isTimelineMonth = this.parent.currentView === 'TimelineMonth';
|
|
19317
19331
|
var isWithoutScale = isTimelineMonth || isTimeViews && !this.parent.activeViewOptions.timeScale.enable;
|
|
19318
19332
|
if (this.parent.activeView.isTimelineView()) {
|
|
19319
19333
|
var tr = this.parent.getContentTable().querySelector('tr');
|
|
19320
|
-
var headerName = this.parent.currentView;
|
|
19321
19334
|
if (this.parent.activeViewOptions.headerRows.length > 0) {
|
|
19322
19335
|
var rows = this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
|
|
19323
19336
|
headerName = rows.slice(-1)[0];
|
|
@@ -19329,6 +19342,11 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19329
19342
|
var cellIndex = 0;
|
|
19330
19343
|
var tdCollections = [].slice.call(tr.children);
|
|
19331
19344
|
var isLastCell = false;
|
|
19345
|
+
var pixelsPerMinute = this.actionObj.cellWidth / (this.parent.activeViewOptions.timeScale.interval /
|
|
19346
|
+
this.parent.activeViewOptions.timeScale.slotCount);
|
|
19347
|
+
var offset = parseFloat(this.parent.enableRtl ? this.actionObj.clone.style.right :
|
|
19348
|
+
this.actionObj.clone.style.left);
|
|
19349
|
+
offset = Math.round(offset / pixelsPerMinute) * pixelsPerMinute;
|
|
19332
19350
|
if (['Year', 'Month', 'Week', 'Date'].indexOf(headerName) !== -1) {
|
|
19333
19351
|
var noOfDays = 0;
|
|
19334
19352
|
for (var _i = 0, tdCollections_2 = tdCollections; _i < tdCollections_2.length; _i++) {
|
|
@@ -19337,28 +19355,28 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19337
19355
|
}
|
|
19338
19356
|
var offsetValue = this.parent.enableRtl ? parseInt(this.actionObj.clone.style.right, 10) :
|
|
19339
19357
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
19358
|
+
offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
19340
19359
|
if (!isLeft) {
|
|
19341
|
-
offsetValue += (this.actionObj.clone.
|
|
19360
|
+
offsetValue += (this.actionObj.clone.getBoundingClientRect().width - this.actionObj.cellWidth);
|
|
19342
19361
|
}
|
|
19343
|
-
cellIndex = Math.floor(offsetValue / Math.floor(tr.
|
|
19362
|
+
cellIndex = Math.floor(offsetValue / Math.floor(tr.getBoundingClientRect().width / noOfDays));
|
|
19344
19363
|
isDateHeader = isTimeViews && headerName === 'Date';
|
|
19345
|
-
cellIndex = isLeft ? cellIndex :
|
|
19364
|
+
cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
|
|
19346
19365
|
isLastCell = cellIndex === tdCollections.length;
|
|
19347
19366
|
cellIndex = (cellIndex < 0) ? 0 : (cellIndex >= noOfDays) ? noOfDays - 1 : cellIndex;
|
|
19348
19367
|
}
|
|
19349
19368
|
else {
|
|
19350
19369
|
var cellWidth = this.actionObj.cellWidth;
|
|
19351
|
-
cellIndex = isLeft ? Math.floor(
|
|
19352
|
-
Math.ceil((
|
|
19353
|
-
this.actionObj.cellWidth);
|
|
19370
|
+
cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
|
|
19371
|
+
Math.ceil((offset + (this.actionObj.clone.getBoundingClientRect().width - cellWidth)) / this.actionObj.cellWidth);
|
|
19354
19372
|
if (this.parent.enableRtl) {
|
|
19355
19373
|
var cellOffsetWidth = 0;
|
|
19356
19374
|
if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
|
|
19357
19375
|
!isTimelineMonth)) {
|
|
19358
19376
|
cellOffsetWidth = this.actionObj.cellWidth;
|
|
19359
19377
|
}
|
|
19360
|
-
var offsetWidth = (Math.floor(
|
|
19361
|
-
this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.
|
|
19378
|
+
var offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
|
|
19379
|
+
this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.getBoundingClientRect().width - cellOffsetWidth);
|
|
19362
19380
|
cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
|
|
19363
19381
|
}
|
|
19364
19382
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -19376,13 +19394,11 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19376
19394
|
resizeTime = new Date(resizeDate.setHours(resizeTime.getHours(), resizeTime.getMinutes(), resizeTime.getSeconds()));
|
|
19377
19395
|
}
|
|
19378
19396
|
else {
|
|
19379
|
-
var offsetValue = this.parent.enableRtl ? parseFloat(this.actionObj.clone.style.right) :
|
|
19380
|
-
parseFloat(this.actionObj.clone.style.left);
|
|
19381
19397
|
if (!isLeft) {
|
|
19382
|
-
|
|
19398
|
+
offset += this.actionObj.clone.getBoundingClientRect().width;
|
|
19383
19399
|
}
|
|
19384
19400
|
var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
|
|
19385
|
-
(
|
|
19401
|
+
(offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
|
|
19386
19402
|
spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0)) ? this.actionObj.slotInterval : spanMinutes;
|
|
19387
19403
|
resizeTime = new Date(resizeDate.getTime());
|
|
19388
19404
|
resizeTime.setMinutes(resizeTime.getMinutes() + spanMinutes);
|
|
@@ -19391,9 +19407,10 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19391
19407
|
}
|
|
19392
19408
|
else {
|
|
19393
19409
|
var cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
|
|
19394
|
-
var originalWidth = Math.ceil((isLeft ? this.actionObj.element.
|
|
19395
|
-
this.actionObj.cellWidth;
|
|
19396
|
-
var noOfDays = Math.ceil((this.actionObj.clone.
|
|
19410
|
+
var originalWidth = Math.ceil((isLeft ? this.actionObj.element.getBoundingClientRect().width : 0) /
|
|
19411
|
+
this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
19412
|
+
var noOfDays = Math.ceil((this.actionObj.clone.getBoundingClientRect().width - originalWidth) /
|
|
19413
|
+
this.actionObj.cellWidth);
|
|
19397
19414
|
var tr = closest(this.actionObj.clone, 'tr');
|
|
19398
19415
|
var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
|
|
19399
19416
|
dayIndex = this.getIndex(dayIndex);
|
|
@@ -19413,8 +19430,8 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19413
19430
|
}
|
|
19414
19431
|
else {
|
|
19415
19432
|
var isTimeScaleViews = isTimeViews && this.parent.activeViewOptions.timeScale.enable;
|
|
19416
|
-
var resizeEnd = ((!isTimeScaleViews || isDateHeader
|
|
19417
|
-
addDays(resizeTime, 1) : resizeTime;
|
|
19433
|
+
var resizeEnd = ((!isTimeScaleViews || isDateHeader || isTimeViews && ['Week', 'Month', 'Year'].indexOf(headerName) > -1)
|
|
19434
|
+
&& resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ? addDays(resizeTime, 1) : resizeTime;
|
|
19418
19435
|
if (isWithoutScale && (resizeEnd.getTime() - eventStart.getTime()) <= 0) {
|
|
19419
19436
|
resizeEnd = addDays(resetTime(eventStart), 1);
|
|
19420
19437
|
}
|
|
@@ -19451,29 +19468,30 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19451
19468
|
var slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
|
|
19452
19469
|
var pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
|
|
19453
19470
|
var targetWidth = isTimelineView ?
|
|
19454
|
-
(this.actionObj.element.
|
|
19455
|
-
this.parent.currentView === 'Month' ? this.actionObj.element.
|
|
19456
|
-
Math.ceil(this.actionObj.element.
|
|
19471
|
+
(this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
19472
|
+
this.parent.currentView === 'Month' ? this.actionObj.element.getBoundingClientRect().width :
|
|
19473
|
+
Math.ceil(this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
19457
19474
|
var offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
|
|
19475
|
+
var left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
|
|
19458
19476
|
if (isTimeViews) {
|
|
19459
|
-
offsetWidth = targetWidth + (
|
|
19460
|
-
|
|
19477
|
+
offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
|
|
19478
|
+
offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left;
|
|
19461
19479
|
this.actionObj.event[this.parent.eventFields.isAllDay] = false;
|
|
19462
19480
|
}
|
|
19463
19481
|
var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
|
|
19464
|
-
this.actionObj.clone.
|
|
19482
|
+
this.actionObj.clone.getBoundingClientRect().width : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
19465
19483
|
if (this.parent.enableRtl) {
|
|
19466
19484
|
var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
|
|
19467
19485
|
-(offsetWidth - this.actionObj.cellWidth);
|
|
19468
19486
|
rightValue = isTimelineView ? rightValue : isLeft ? 0 : rightValue > 0 ? 0 : rightValue;
|
|
19469
19487
|
if (isTimelineView && !isLeft) {
|
|
19470
|
-
rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.
|
|
19488
|
+
rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.getBoundingClientRect().width +
|
|
19471
19489
|
(this.actionObj.pageX - this.actionObj.X))) / slotInterval) * slotInterval;
|
|
19472
19490
|
rightValue = rightValue < 0 ? Math.abs(rightValue) : -rightValue;
|
|
19473
19491
|
}
|
|
19474
19492
|
rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
|
|
19475
19493
|
styles.right = formatUnit(rightValue);
|
|
19476
|
-
width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.
|
|
19494
|
+
width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.getBoundingClientRect().width : width;
|
|
19477
19495
|
}
|
|
19478
19496
|
else {
|
|
19479
19497
|
var offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
|
|
@@ -19481,12 +19499,12 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19481
19499
|
if (isTimelineView) {
|
|
19482
19500
|
offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
|
|
19483
19501
|
if (this.parent.enableRtl) {
|
|
19484
|
-
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.
|
|
19485
|
-
parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
|
|
19502
|
+
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.getBoundingClientRect().width)
|
|
19503
|
+
? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
|
|
19486
19504
|
}
|
|
19487
19505
|
else {
|
|
19488
|
-
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.
|
|
19489
|
-
this.actionObj.clone.
|
|
19506
|
+
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.getBoundingClientRect().width &&
|
|
19507
|
+
this.actionObj.clone.getBoundingClientRect().width === this.actionObj.cellWidth) ?
|
|
19490
19508
|
parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
|
|
19491
19509
|
}
|
|
19492
19510
|
}
|
|
@@ -19496,9 +19514,10 @@ var Resize = /** @__PURE__ @class */ (function (_super) {
|
|
|
19496
19514
|
Math.ceil(Math.abs(offsetLeft) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
19497
19515
|
if (offsetLeft < 0) {
|
|
19498
19516
|
offsetLeft = 0;
|
|
19499
|
-
width = this.actionObj.clone.
|
|
19517
|
+
width = this.actionObj.clone.getBoundingClientRect().width;
|
|
19500
19518
|
}
|
|
19501
|
-
var cloneWidth = Math.ceil(this.actionObj.clone.
|
|
19519
|
+
var cloneWidth = Math.ceil(this.actionObj.clone.getBoundingClientRect().width / this.actionObj.cellWidth) *
|
|
19520
|
+
this.actionObj.cellWidth;
|
|
19502
19521
|
if (isLeft) {
|
|
19503
19522
|
styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
|
|
19504
19523
|
(Math.ceil((targetWidth - cloneWidth) / this.actionObj.cellWidth) * this.actionObj.cellWidth) : offsetLeft);
|
|
@@ -21122,9 +21141,9 @@ var DragAndDrop = /** @__PURE__ @class */ (function (_super) {
|
|
|
21122
21141
|
if (this.parent.eventDragArea) {
|
|
21123
21142
|
var targetDate = this.parent.getDateFromElement(e.target);
|
|
21124
21143
|
if (!isNullOrUndefined(targetDate)) {
|
|
21125
|
-
if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView
|
|
21144
|
+
if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView === 'TimelineMonth')) {
|
|
21126
21145
|
var eventSrt = eventObj[this.parent.eventFields.startTime];
|
|
21127
|
-
eventStart = new Date(
|
|
21146
|
+
eventStart = new Date(targetDate.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
|
|
21128
21147
|
}
|
|
21129
21148
|
else {
|
|
21130
21149
|
eventStart = targetDate;
|
|
@@ -21791,7 +21810,7 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
21791
21810
|
if (this.isTimelineView()) {
|
|
21792
21811
|
var colElements = this.getColElements();
|
|
21793
21812
|
var contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
21794
|
-
var colWidth_1 =
|
|
21813
|
+
var colWidth_1 = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
|
|
21795
21814
|
colElements.forEach(function (col) { return setStyleAttribute(col, { 'width': formatUnit(colWidth_1) }); });
|
|
21796
21815
|
if (content.offsetHeight !== content.clientHeight) {
|
|
21797
21816
|
var resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
@@ -21799,9 +21818,11 @@ var ViewBase = /** @__PURE__ @class */ (function () {
|
|
|
21799
21818
|
setStyleAttribute(resourceColumn, { 'height': formatUnit(content.clientHeight) });
|
|
21800
21819
|
}
|
|
21801
21820
|
}
|
|
21802
|
-
var
|
|
21821
|
+
var cssClass = "." + HEADER_CELLS_CLASS + ",." + TIME_SLOT_CLASS + ",." + HEADER_WEEK_CELLS_CLASS + ",." + HEADER_MONTH_CELLS_CLASS + ",." + HEADER_YEAR_CELLS_CLASS;
|
|
21822
|
+
var headerCellElements = [].slice.call(this.element.querySelectorAll(cssClass));
|
|
21803
21823
|
headerCellElements.forEach(function (ele) {
|
|
21804
|
-
var
|
|
21824
|
+
var colSpan = isNullOrUndefined(ele.getAttribute('colspan')) ? '1' : ele.getAttribute('colspan');
|
|
21825
|
+
var headerCellColSpan = parseInt(colSpan, 10);
|
|
21805
21826
|
setStyleAttribute(ele, { 'width': formatUnit(colWidth_1 * headerCellColSpan) });
|
|
21806
21827
|
});
|
|
21807
21828
|
}
|
|
@@ -23298,8 +23319,9 @@ var Month = /** @__PURE__ @class */ (function (_super) {
|
|
|
23298
23319
|
var dates = this.parent.getCurrentViewDates();
|
|
23299
23320
|
if (dates && dates.length > 0) {
|
|
23300
23321
|
var selectedTime = resetTime(this.parent.selectedDate).getTime();
|
|
23322
|
+
var weekFirstDate = getWeekFirstDate(dates[dates.length - 1], this.parent.activeViewOptions.firstDayOfWeek);
|
|
23301
23323
|
return !(selectedTime >= getWeekFirstDate(dates[0], this.parent.activeViewOptions.firstDayOfWeek).getTime() &&
|
|
23302
|
-
selectedTime <= addDays(
|
|
23324
|
+
selectedTime <= addDays(weekFirstDate, 6).getTime());
|
|
23303
23325
|
}
|
|
23304
23326
|
return false;
|
|
23305
23327
|
};
|
|
@@ -25429,7 +25451,7 @@ var TimelineYear = /** @__PURE__ @class */ (function (_super) {
|
|
|
25429
25451
|
}
|
|
25430
25452
|
else {
|
|
25431
25453
|
if (this.parent.monthHeaderTemplate) {
|
|
25432
|
-
append(this.renderDayMonthHeaderTemplate(date, months[column], '
|
|
25454
|
+
append(this.renderDayMonthHeaderTemplate(date, months[column], 'monthHeaderTemplate'), innerTd);
|
|
25433
25455
|
}
|
|
25434
25456
|
else {
|
|
25435
25457
|
innerTd.innerHTML = "<span>" + this.getMonthName(date) + "</span>";
|