@syncfusion/ej2-schedule 24.2.4 → 24.2.8
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 +8 -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 +77 -51
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +76 -50
- 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 +3 -3
- package/src/schedule/actions/resize.js +22 -21
- package/src/schedule/actions/virtual-scroll.js +4 -0
- package/src/schedule/base/util.d.ts +21 -0
- package/src/schedule/base/util.js +29 -2
- package/src/schedule/event-renderer/event-base.d.ts +0 -1
- package/src/schedule/event-renderer/event-base.js +0 -3
- package/src/schedule/event-renderer/inline-edit.js +1 -1
- package/src/schedule/event-renderer/month.js +2 -2
- package/src/schedule/event-renderer/timeline-view.js +5 -5
- package/src/schedule/event-renderer/vertical-view.js +1 -1
- package/src/schedule/event-renderer/year.js +3 -3
- package/src/schedule/renderer/timeline-view.d.ts +0 -1
- package/src/schedule/renderer/timeline-view.js +3 -6
- package/src/schedule/renderer/vertical-view.js +1 -1
- package/src/schedule/renderer/view-base.js +1 -1
- package/styles/bootstrap-dark.css +42 -0
- package/styles/bootstrap.css +42 -0
- package/styles/bootstrap4.css +42 -0
- package/styles/bootstrap5-dark.css +42 -0
- package/styles/bootstrap5.css +42 -0
- package/styles/fabric-dark.css +42 -0
- package/styles/fabric.css +42 -0
- package/styles/fluent-dark.css +42 -0
- package/styles/fluent.css +42 -0
- package/styles/highcontrast-light.css +42 -0
- package/styles/highcontrast.css +42 -0
- package/styles/material-dark.css +42 -0
- package/styles/material.css +42 -0
- package/styles/material3-dark.css +42 -0
- package/styles/material3.css +42 -0
- package/styles/schedule/_bootstrap-dark-definition.scss +1 -0
- package/styles/schedule/_bootstrap-definition.scss +1 -0
- package/styles/schedule/_bootstrap4-definition.scss +1 -0
- package/styles/schedule/_bootstrap5-definition.scss +1 -0
- package/styles/schedule/_fabric-dark-definition.scss +1 -0
- package/styles/schedule/_fabric-definition.scss +1 -0
- package/styles/schedule/_fluent-definition.scss +1 -0
- package/styles/schedule/_fusionnew-definition.scss +1 -0
- package/styles/schedule/_highcontrast-definition.scss +1 -0
- package/styles/schedule/_highcontrast-light-definition.scss +1 -0
- package/styles/schedule/_layout.scss +58 -0
- package/styles/schedule/_material-dark-definition.scss +1 -0
- package/styles/schedule/_material-definition.scss +1 -0
- package/styles/schedule/_material3-definition.scss +1 -0
- package/styles/schedule/_tailwind-definition.scss +1 -0
- package/styles/schedule/bootstrap-dark.css +42 -0
- package/styles/schedule/bootstrap.css +42 -0
- package/styles/schedule/bootstrap4.css +42 -0
- package/styles/schedule/bootstrap5-dark.css +42 -0
- package/styles/schedule/bootstrap5.css +42 -0
- package/styles/schedule/fabric-dark.css +42 -0
- package/styles/schedule/fabric.css +42 -0
- package/styles/schedule/fluent-dark.css +42 -0
- package/styles/schedule/fluent.css +42 -0
- package/styles/schedule/highcontrast-light.css +42 -0
- package/styles/schedule/highcontrast.css +42 -0
- package/styles/schedule/material-dark.css +42 -0
- package/styles/schedule/material.css +42 -0
- package/styles/schedule/material3-dark.css +42 -0
- package/styles/schedule/material3.css +42 -0
- package/styles/schedule/tailwind-dark.css +42 -0
- package/styles/schedule/tailwind.css +42 -0
- package/styles/tailwind-dark.css +42 -0
- package/styles/tailwind.css +42 -0
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -63
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -39
|
@@ -115,7 +115,7 @@ function getElementHeightFromClass(container, elementClass) {
|
|
|
115
115
|
el.style.visibility = 'hidden';
|
|
116
116
|
el.style.position = 'absolute';
|
|
117
117
|
container.appendChild(el);
|
|
118
|
-
height = el
|
|
118
|
+
height = getElementHeight(el);
|
|
119
119
|
remove(el);
|
|
120
120
|
return height;
|
|
121
121
|
}
|
|
@@ -132,7 +132,7 @@ function getElementWidthFromClass(container, elementClass) {
|
|
|
132
132
|
el.style.visibility = 'hidden';
|
|
133
133
|
el.style.position = 'absolute';
|
|
134
134
|
container.appendChild(el);
|
|
135
|
-
width = el
|
|
135
|
+
width = getElementWidth(el);
|
|
136
136
|
remove(el);
|
|
137
137
|
return width;
|
|
138
138
|
}
|
|
@@ -519,6 +519,33 @@ function capitalizeFirstWord(inputString, type) {
|
|
|
519
519
|
}
|
|
520
520
|
return inputString;
|
|
521
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* Method to get element cell width
|
|
524
|
+
*
|
|
525
|
+
* @param {HTMLElement} element Accepts the DOM element
|
|
526
|
+
* @returns {number} Returns the width of the given element
|
|
527
|
+
*/
|
|
528
|
+
function getElementWidth(element) {
|
|
529
|
+
return document.body.style.transform.includes('scale') ? element.offsetWidth : element.getBoundingClientRect().width;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Method to get element cell Height
|
|
533
|
+
*
|
|
534
|
+
* @param {HTMLElement} element Accepts the DOM element
|
|
535
|
+
* @returns {number} Returns the Height of the given element
|
|
536
|
+
*/
|
|
537
|
+
function getElementHeight(element) {
|
|
538
|
+
return document.body.style.transform.includes('scale') ? element.offsetHeight : element.getBoundingClientRect().height;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Method to get element cell Top
|
|
542
|
+
*
|
|
543
|
+
* @param {HTMLElement} element Accepts the DOM element
|
|
544
|
+
* @returns {number} Returns the top value of the given element
|
|
545
|
+
*/
|
|
546
|
+
function getElementTop(element) {
|
|
547
|
+
return document.body.style.transform.includes('scale') ? element.offsetTop : element.getBoundingClientRect().top;
|
|
548
|
+
}
|
|
522
549
|
|
|
523
550
|
/**
|
|
524
551
|
* CSS Constants
|
|
@@ -6666,9 +6693,6 @@ class EventBase {
|
|
|
6666
6693
|
}
|
|
6667
6694
|
}
|
|
6668
6695
|
}
|
|
6669
|
-
getCellWidth(element) {
|
|
6670
|
-
return document.body.style.transform.includes('scale') ? parseFloat(window.getComputedStyle(element).width) : element.getBoundingClientRect().width;
|
|
6671
|
-
}
|
|
6672
6696
|
unWireEvents() {
|
|
6673
6697
|
const appElements = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
6674
6698
|
for (const element of appElements) {
|
|
@@ -6772,7 +6796,7 @@ class VerticalEvent extends EventBase {
|
|
|
6772
6796
|
this.resources = this.parent.resourceBase.renderedResources;
|
|
6773
6797
|
}
|
|
6774
6798
|
this.cellHeight =
|
|
6775
|
-
parseFloat(this.parent.element.querySelector('.e-content-wrap tbody tr')
|
|
6799
|
+
parseFloat(getElementHeight(this.parent.element.querySelector('.e-content-wrap tbody tr')).toFixed(2));
|
|
6776
6800
|
this.dateRender[0] = this.parent.activeView.renderDates;
|
|
6777
6801
|
if (this.parent.activeViewOptions.group.resources.length > 0) {
|
|
6778
6802
|
for (let i = 0, len = this.resources.length; i < len; i++) {
|
|
@@ -7645,8 +7669,8 @@ class MonthEvent extends EventBase {
|
|
|
7645
7669
|
});
|
|
7646
7670
|
}
|
|
7647
7671
|
const cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1];
|
|
7648
|
-
this.cellWidth =
|
|
7649
|
-
this.cellHeight = cellDetail
|
|
7672
|
+
this.cellWidth = getElementWidth(cellDetail);
|
|
7673
|
+
this.cellHeight = getElementHeight(cellDetail);
|
|
7650
7674
|
this.dateRender = dateRender;
|
|
7651
7675
|
const filteredDates = this.getRenderedDates(dateRender);
|
|
7652
7676
|
this.getSlotDates(workDays || this.parent.activeViewOptions.workDays);
|
|
@@ -8191,7 +8215,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
8191
8215
|
this.eventContainers = [].slice.call(this.element.querySelectorAll('.' + APPOINTMENT_CONTAINER_CLASS));
|
|
8192
8216
|
const tr = [].slice.call(this.element.querySelectorAll('.' + CONTENT_TABLE_CLASS + ' tbody tr'));
|
|
8193
8217
|
this.dayLength = tr.length === 0 ? 0 : tr[0].children.length;
|
|
8194
|
-
this.content = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS);
|
|
8218
|
+
this.content = this.parent.element.querySelector('.' + SCHEDULE_TABLE_CLASS + '.' + CONTENT_TABLE_CLASS);
|
|
8195
8219
|
}
|
|
8196
8220
|
getSlotDates() {
|
|
8197
8221
|
this.slots = [];
|
|
@@ -8200,7 +8224,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
8200
8224
|
this.parent.activeViewOptions.headerRows.slice(-1)[0].option !== 'Hour') {
|
|
8201
8225
|
this.renderType = 'day';
|
|
8202
8226
|
const workCell = this.content.querySelector('.' + WORK_CELLS_CLASS);
|
|
8203
|
-
this.cellWidth = workCell
|
|
8227
|
+
this.cellWidth = getElementWidth(workCell) / +(workCell.getAttribute('colspan') || 1);
|
|
8204
8228
|
this.slotsPerDay = 1;
|
|
8205
8229
|
}
|
|
8206
8230
|
else {
|
|
@@ -8353,14 +8377,14 @@ class TimelineEvent extends MonthEvent {
|
|
|
8353
8377
|
this.wireAppointmentEvents(appointmentElement, event);
|
|
8354
8378
|
if (this.parent.rowAutoHeight) {
|
|
8355
8379
|
const conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
8356
|
-
const conWidth = conWrap
|
|
8380
|
+
const conWidth = getElementWidth(conWrap);
|
|
8357
8381
|
const isWithoutScroll = conWrap.offsetHeight === conWrap.clientHeight &&
|
|
8358
8382
|
conWrap.offsetWidth === conWrap.clientWidth;
|
|
8359
8383
|
this.renderEventElement(event, appointmentElement, cellTd);
|
|
8360
8384
|
const firstChild = this.getFirstChild(resIndex);
|
|
8361
8385
|
this.updateCellHeight(firstChild, height);
|
|
8362
8386
|
if (isWithoutScroll &&
|
|
8363
|
-
(conWrap.offsetWidth > conWrap.clientWidth || conWidth !== conWrap
|
|
8387
|
+
(conWrap.offsetWidth > conWrap.clientWidth || conWidth !== getElementWidth(conWrap))) {
|
|
8364
8388
|
this.adjustAppointments(conWidth);
|
|
8365
8389
|
}
|
|
8366
8390
|
}
|
|
@@ -8478,7 +8502,7 @@ class TimelineEvent extends MonthEvent {
|
|
|
8478
8502
|
}
|
|
8479
8503
|
adjustAppointments(conWidth) {
|
|
8480
8504
|
const tr = this.parent.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody tr');
|
|
8481
|
-
const actualCellWidth = this.workCells[0]
|
|
8505
|
+
const actualCellWidth = getElementWidth(this.workCells[0]);
|
|
8482
8506
|
this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1);
|
|
8483
8507
|
const currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100);
|
|
8484
8508
|
const apps = [].slice.call(this.parent.element.querySelectorAll('.' + APPOINTMENT_CLASS));
|
|
@@ -8833,7 +8857,7 @@ class InlineEdit {
|
|
|
8833
8857
|
const allDayElements = [].slice.call(this.parent.element.querySelectorAll('.' + ALLDAY_APPOINTMENT_CLASS));
|
|
8834
8858
|
let allDayLevel = 0;
|
|
8835
8859
|
if (allDayElements.length > 0) {
|
|
8836
|
-
allDayLevel = Math.floor(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)
|
|
8860
|
+
allDayLevel = Math.floor(getElementHeight(this.parent.element.querySelector('.' + ALLDAY_ROW_CLASS)) /
|
|
8837
8861
|
allDayElements[0].offsetHeight) - 1;
|
|
8838
8862
|
}
|
|
8839
8863
|
verticalEvent.allDayLevel = allDayLevel;
|
|
@@ -13711,6 +13735,10 @@ class VirtualScroll {
|
|
|
13711
13735
|
this.renderedLength = conTable.querySelector('tbody').children.length;
|
|
13712
13736
|
virtual.style.height = (conTable.offsetHeight + (this.parent.resourceBase.expandedResources.length - (this.renderedLength)) *
|
|
13713
13737
|
conTable.offsetHeight / this.renderedLength) + 'px';
|
|
13738
|
+
const conWrap = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
13739
|
+
if ((conWrap.scrollHeight - conWrap.scrollTop) < conWrap.offsetHeight * this.bufferCount) {
|
|
13740
|
+
virtual.style.height = parseInt(virtual.style.height) + (conWrap.offsetHeight * this.bufferCount) + 'px';
|
|
13741
|
+
}
|
|
13714
13742
|
}
|
|
13715
13743
|
else {
|
|
13716
13744
|
virtual.style.height = '';
|
|
@@ -19947,9 +19975,9 @@ class Resize extends ActionBase {
|
|
|
19947
19975
|
bottom: resizeTarget.classList.contains(BOTTOM_RESIZE_HANDLER)
|
|
19948
19976
|
};
|
|
19949
19977
|
this.actionObj.groupIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex : 0;
|
|
19950
|
-
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS)
|
|
19951
|
-
this.actionObj.cellWidth = workCell
|
|
19952
|
-
this.actionObj.cellHeight = workCell
|
|
19978
|
+
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
19979
|
+
this.actionObj.cellWidth = getElementWidth(workCell);
|
|
19980
|
+
this.actionObj.cellHeight = getElementHeight(workCell);
|
|
19953
19981
|
const hRows = this.parent.activeViewOptions.headerRows.map((row) => row.option);
|
|
19954
19982
|
if (this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
|
|
19955
19983
|
const tr = this.parent.getContentTable().querySelector('tr');
|
|
@@ -20243,9 +20271,9 @@ class Resize extends ActionBase {
|
|
|
20243
20271
|
parseInt(this.actionObj.clone.style.left, 10);
|
|
20244
20272
|
offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20245
20273
|
if (!isLeft) {
|
|
20246
|
-
offsetValue += (this.actionObj.clone
|
|
20274
|
+
offsetValue += (getElementWidth(this.actionObj.clone) - this.actionObj.cellWidth);
|
|
20247
20275
|
}
|
|
20248
|
-
cellIndex = Math.floor(offsetValue / Math.floor(tr
|
|
20276
|
+
cellIndex = Math.floor(offsetValue / Math.floor(getElementWidth(tr) / noOfDays));
|
|
20249
20277
|
isDateHeader = isTimeViews && headerName === 'Date';
|
|
20250
20278
|
cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
|
|
20251
20279
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -20254,7 +20282,7 @@ class Resize extends ActionBase {
|
|
|
20254
20282
|
else {
|
|
20255
20283
|
const cellWidth = this.actionObj.cellWidth;
|
|
20256
20284
|
cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
|
|
20257
|
-
Math.ceil((offset + (this.actionObj.clone
|
|
20285
|
+
Math.ceil((offset + (getElementWidth(this.actionObj.clone) - cellWidth)) / this.actionObj.cellWidth);
|
|
20258
20286
|
if (this.parent.enableRtl) {
|
|
20259
20287
|
let cellOffsetWidth = 0;
|
|
20260
20288
|
if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
|
|
@@ -20262,7 +20290,7 @@ class Resize extends ActionBase {
|
|
|
20262
20290
|
cellOffsetWidth = this.actionObj.cellWidth;
|
|
20263
20291
|
}
|
|
20264
20292
|
const offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
|
|
20265
|
-
this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone
|
|
20293
|
+
this.actionObj.cellWidth) + (isLeft ? 0 : getElementWidth(this.actionObj.clone) - cellOffsetWidth);
|
|
20266
20294
|
cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
|
|
20267
20295
|
}
|
|
20268
20296
|
isLastCell = cellIndex === tdCollections.length;
|
|
@@ -20281,7 +20309,7 @@ class Resize extends ActionBase {
|
|
|
20281
20309
|
}
|
|
20282
20310
|
else {
|
|
20283
20311
|
if (!isLeft) {
|
|
20284
|
-
offset += this.actionObj.clone
|
|
20312
|
+
offset += getElementWidth(this.actionObj.clone);
|
|
20285
20313
|
}
|
|
20286
20314
|
let spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
|
|
20287
20315
|
(offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
|
|
@@ -20293,9 +20321,9 @@ class Resize extends ActionBase {
|
|
|
20293
20321
|
}
|
|
20294
20322
|
else {
|
|
20295
20323
|
const cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
|
|
20296
|
-
const originalWidth = Math.ceil((isLeft ? this.actionObj.element
|
|
20324
|
+
const originalWidth = Math.ceil((isLeft ? getElementWidth(this.actionObj.element) : 0) /
|
|
20297
20325
|
this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20298
|
-
const noOfDays = Math.ceil((this.actionObj.clone
|
|
20326
|
+
const noOfDays = Math.ceil((getElementWidth(this.actionObj.clone) - originalWidth) /
|
|
20299
20327
|
this.actionObj.cellWidth);
|
|
20300
20328
|
const tr = closest(this.actionObj.clone, 'tr');
|
|
20301
20329
|
let dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
|
|
@@ -20358,23 +20386,24 @@ class Resize extends ActionBase {
|
|
|
20358
20386
|
const slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
|
|
20359
20387
|
const pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
|
|
20360
20388
|
const targetWidth = isTimelineView ?
|
|
20361
|
-
(this.actionObj.element
|
|
20362
|
-
this.parent.currentView === 'Month' ? this.actionObj.element
|
|
20363
|
-
Math.ceil(this.actionObj.element
|
|
20389
|
+
(getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth :
|
|
20390
|
+
this.parent.currentView === 'Month' ? getElementWidth(this.actionObj.element) :
|
|
20391
|
+
Math.ceil(getElementWidth(this.actionObj.element) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
|
|
20364
20392
|
let offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
|
|
20365
20393
|
const left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
|
|
20366
20394
|
if (isTimeViews) {
|
|
20367
20395
|
offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
|
|
20368
20396
|
if (!isLeft) {
|
|
20369
20397
|
const roundedLeft = (+parseFloat(this.actionObj.element.style[this.parent.enableRtl ? 'right' : 'left'])).toFixed(1);
|
|
20370
|
-
|
|
20398
|
+
const roundedWidth = Math.round(targetWidth / slotInterval) * slotInterval;
|
|
20399
|
+
if (roundedLeft !== left.toFixed(1) || roundedWidth !== targetWidth) {
|
|
20371
20400
|
offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left;
|
|
20372
20401
|
}
|
|
20373
20402
|
}
|
|
20374
20403
|
this.actionObj.event[this.parent.eventFields.isAllDay] = false;
|
|
20375
20404
|
}
|
|
20376
20405
|
let width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
|
|
20377
|
-
this.actionObj.clone
|
|
20406
|
+
getElementWidth(this.actionObj.clone) : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
|
|
20378
20407
|
if (this.parent.enableRtl) {
|
|
20379
20408
|
let rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
|
|
20380
20409
|
-(offsetWidth - this.actionObj.cellWidth);
|
|
@@ -20388,7 +20417,7 @@ class Resize extends ActionBase {
|
|
|
20388
20417
|
}
|
|
20389
20418
|
rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
|
|
20390
20419
|
styles.right = formatUnit(rightValue);
|
|
20391
|
-
width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone
|
|
20420
|
+
width = width + rightValue > this.scrollArgs.width ? getElementWidth(this.actionObj.clone) : width;
|
|
20392
20421
|
}
|
|
20393
20422
|
else {
|
|
20394
20423
|
let offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
|
|
@@ -20396,12 +20425,12 @@ class Resize extends ActionBase {
|
|
|
20396
20425
|
if (isTimelineView) {
|
|
20397
20426
|
offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
|
|
20398
20427
|
if (this.parent.enableRtl) {
|
|
20399
|
-
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone
|
|
20428
|
+
offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - getElementWidth(this.actionObj.clone))
|
|
20400
20429
|
? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
|
|
20401
20430
|
}
|
|
20402
20431
|
else {
|
|
20403
|
-
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone
|
|
20404
|
-
this.actionObj.clone
|
|
20432
|
+
offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + getElementWidth(this.actionObj.clone) &&
|
|
20433
|
+
getElementWidth(this.actionObj.clone) === this.actionObj.cellWidth) ?
|
|
20405
20434
|
parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
|
|
20406
20435
|
}
|
|
20407
20436
|
}
|
|
@@ -20417,10 +20446,10 @@ class Resize extends ActionBase {
|
|
|
20417
20446
|
}
|
|
20418
20447
|
else {
|
|
20419
20448
|
offsetLeft = 0;
|
|
20420
|
-
width = this.actionObj.clone
|
|
20449
|
+
width = getElementWidth(this.actionObj.clone);
|
|
20421
20450
|
}
|
|
20422
20451
|
}
|
|
20423
|
-
const cloneWidth = Math.ceil(this.actionObj.clone
|
|
20452
|
+
const cloneWidth = Math.ceil(getElementWidth(this.actionObj.clone) / this.actionObj.cellWidth) *
|
|
20424
20453
|
this.actionObj.cellWidth;
|
|
20425
20454
|
if (isLeft) {
|
|
20426
20455
|
styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
|
|
@@ -20533,7 +20562,7 @@ class YearEvent extends TimelineEvent {
|
|
|
20533
20562
|
}
|
|
20534
20563
|
timelineYearViewEvents() {
|
|
20535
20564
|
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS + ':not(.' + OTHERMONTH_CLASS + ')');
|
|
20536
|
-
this.cellWidth =
|
|
20565
|
+
this.cellWidth = getElementWidth(workCell);
|
|
20537
20566
|
this.cellHeader = getOuterHeight(workCell.querySelector('.' + DATE_HEADER_CLASS));
|
|
20538
20567
|
const eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20539
20568
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
@@ -20682,7 +20711,7 @@ class YearEvent extends TimelineEvent {
|
|
|
20682
20711
|
const contentTable = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
|
|
20683
20712
|
const isVerticalScrollbarAvail = contentTable.offsetWidth > contentTable.clientWidth;
|
|
20684
20713
|
const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
|
|
20685
|
-
this.cellWidth = workCell
|
|
20714
|
+
this.cellWidth = getElementWidth(workCell);
|
|
20686
20715
|
this.cellHeader = 0;
|
|
20687
20716
|
const eventTable = this.parent.element.querySelector('.' + EVENT_TABLE_CLASS);
|
|
20688
20717
|
this.eventHeight = getElementHeightFromClass(eventTable, APPOINTMENT_CLASS);
|
|
@@ -20727,7 +20756,7 @@ class YearEvent extends TimelineEvent {
|
|
|
20727
20756
|
appWrapper.forEach((appWrap, cellIndex) => {
|
|
20728
20757
|
const td = row.querySelector(`td:nth-child(${cellIndex + 1})`);
|
|
20729
20758
|
const app = [].slice.call(appWrap.children);
|
|
20730
|
-
const width = td
|
|
20759
|
+
const width = getElementWidth(td);
|
|
20731
20760
|
const left = td.offsetLeft;
|
|
20732
20761
|
if (this.parent.enableRtl) {
|
|
20733
20762
|
const right = conTable.offsetWidth - left - td.offsetWidth;
|
|
@@ -21451,7 +21480,7 @@ class DragAndDrop extends ActionBase {
|
|
|
21451
21480
|
this.timelineEventModule.cellWidth = this.actionObj.cellWidth;
|
|
21452
21481
|
this.timelineEventModule.getSlotDates();
|
|
21453
21482
|
this.actionObj.cellWidth = this.isHeaderRows ? this.timelineEventModule.cellWidth :
|
|
21454
|
-
this.parent.element.querySelector('.' + WORK_CELLS_CLASS)
|
|
21483
|
+
getElementWidth(this.parent.element.querySelector('.' + WORK_CELLS_CLASS));
|
|
21455
21484
|
this.calculateTimelineTime(e);
|
|
21456
21485
|
}
|
|
21457
21486
|
else {
|
|
@@ -22263,7 +22292,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22263
22292
|
~~(dragArea.querySelector('table').offsetHeight / trCollection.length) : this.actionObj.cellHeight;
|
|
22264
22293
|
let rowIndex = Math.floor(Math.floor((this.actionObj.Y +
|
|
22265
22294
|
(dragArea.scrollTop - translateY - (window.scrollY || window.pageYOffset))) -
|
|
22266
|
-
dragArea
|
|
22295
|
+
getElementTop(dragArea)) / rowHeight);
|
|
22267
22296
|
rowIndex = (rowIndex < 0) ? 0 : (rowIndex > trCollection.length - 1) ? trCollection.length - 1 : rowIndex;
|
|
22268
22297
|
this.actionObj.index = rowIndex;
|
|
22269
22298
|
const eventContainer = this.parent.element.querySelectorAll('.e-appointment-container:not(.e-hidden)').item(rowIndex);
|
|
@@ -22279,7 +22308,7 @@ class DragAndDrop extends ActionBase {
|
|
|
22279
22308
|
if (!isNullOrUndefined(this.parent.eventDragArea)) {
|
|
22280
22309
|
return;
|
|
22281
22310
|
}
|
|
22282
|
-
let top = trCollection[parseInt(rowIndex.toString(), 10)]
|
|
22311
|
+
let top = getElementHeight(trCollection[parseInt(rowIndex.toString(), 10)]) * rowIndex;
|
|
22283
22312
|
if (this.parent.rowAutoHeight) {
|
|
22284
22313
|
const cursorElement = this.getCursorElement(e);
|
|
22285
22314
|
if (cursorElement) {
|
|
@@ -22792,7 +22821,7 @@ class ViewBase {
|
|
|
22792
22821
|
if (this.isTimelineView()) {
|
|
22793
22822
|
const colElements = this.getColElements();
|
|
22794
22823
|
const contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
|
|
22795
|
-
const colWidth = (contentBody
|
|
22824
|
+
const colWidth = (getElementWidth(contentBody) / (colElements.length / 2));
|
|
22796
22825
|
if (content.offsetHeight !== content.clientHeight) {
|
|
22797
22826
|
const resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
|
|
22798
22827
|
if (!isNullOrUndefined(resourceColumn)) {
|
|
@@ -23273,7 +23302,7 @@ class VerticalView extends ViewBase {
|
|
|
23273
23302
|
this.parent.activeViewOptions.timeScale.interval;
|
|
23274
23303
|
}
|
|
23275
23304
|
getWorkCellHeight() {
|
|
23276
|
-
return parseFloat(this.element.querySelector('.' + WORK_CELLS_CLASS)
|
|
23305
|
+
return parseFloat(getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
|
|
23277
23306
|
}
|
|
23278
23307
|
getTdContent(date, type, groupIndex) {
|
|
23279
23308
|
let cntEle;
|
|
@@ -23660,7 +23689,7 @@ class VerticalView extends ViewBase {
|
|
|
23660
23689
|
const msStartHour = startHour.getTime();
|
|
23661
23690
|
const msEndHour = endHour.getTime();
|
|
23662
23691
|
if (msStartHour !== msEndHour) {
|
|
23663
|
-
|
|
23692
|
+
const milliSeconds = (startHour.getTimezoneOffset() !== endHour.getTimezoneOffset()) ?
|
|
23664
23693
|
(msEndHour - msStartHour) - 3600000 : (msEndHour - msStartHour);
|
|
23665
23694
|
length = Math.round(milliSeconds / msInterval);
|
|
23666
23695
|
}
|
|
@@ -26059,7 +26088,7 @@ class TimelineViews extends VerticalView {
|
|
|
26059
26088
|
}
|
|
26060
26089
|
let scrollLeft;
|
|
26061
26090
|
if (isNullOrUndefined(hour) || !this.parent.activeViewOptions.timeScale.enable) {
|
|
26062
|
-
scrollLeft = index * this.
|
|
26091
|
+
scrollLeft = index * getElementWidth(this.element.querySelector('.e-work-cells'));
|
|
26063
26092
|
}
|
|
26064
26093
|
else {
|
|
26065
26094
|
scrollLeft = isNullOrUndefined(scrollDate) ? this.getLeftFromDateTime(null, date) :
|
|
@@ -26143,7 +26172,7 @@ class TimelineViews extends VerticalView {
|
|
|
26143
26172
|
if (this.parent.activeView.colLevels[parseInt(index.toString(), 10)] &&
|
|
26144
26173
|
this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan) {
|
|
26145
26174
|
diffInDates = currentDateIndex[0] * this.parent.activeView.colLevels[parseInt(index.toString(), 10)][0].colSpan *
|
|
26146
|
-
this.
|
|
26175
|
+
getElementWidth(this.element.querySelector('.e-work-cells'));
|
|
26147
26176
|
}
|
|
26148
26177
|
else {
|
|
26149
26178
|
const endHour = this.getEndHour();
|
|
@@ -26153,12 +26182,9 @@ class TimelineViews extends VerticalView {
|
|
|
26153
26182
|
}
|
|
26154
26183
|
}
|
|
26155
26184
|
}
|
|
26156
|
-
return diffInDates + ((diffInMinutes * this.
|
|
26185
|
+
return diffInDates + ((diffInMinutes * getElementWidth(this.element.querySelector('.e-work-cells')) * this.parent.activeViewOptions.timeScale.slotCount) /
|
|
26157
26186
|
this.parent.activeViewOptions.timeScale.interval);
|
|
26158
26187
|
}
|
|
26159
|
-
getWorkCellWidth() {
|
|
26160
|
-
return this.element.querySelector('.e-work-cells').getBoundingClientRect().width;
|
|
26161
|
-
}
|
|
26162
26188
|
renderHeader() {
|
|
26163
26189
|
const tr = createElement('tr');
|
|
26164
26190
|
if (this.parent.activeViewOptions.group.resources.length > 0 && !this.parent.uiStateValues.isGroupAdaptive) {
|
|
@@ -27533,5 +27559,5 @@ class Print {
|
|
|
27533
27559
|
* Export Schedule components
|
|
27534
27560
|
*/
|
|
27535
27561
|
|
|
27536
|
-
export { Schedule, cellClick, cellDoubleClick, moreEventsClick, select, hover, actionBegin, actionComplete, actionFailure, navigating, renderCell, eventClick, eventDoubleClick, eventRendered, dataBinding, dataBound, popupOpen, popupClose, dragStart, drag, dragStop, resizeStart, resizing, resizeStop, inlineClick, cellSelect, virtualScrollStart, virtualScrollStop, initialLoad, initialEnd, print$1 as print, dataReady, eventsLoaded, contentReady, scroll, virtualScroll, scrollUiUpdate, uiUpdate, documentClick, cellMouseDown, WEEK_LENGTH, DEFAULT_WEEKS, MS_PER_DAY, MS_PER_MINUTE, getElementHeightFromClass, getElementWidthFromClass, getTranslateY, getTranslateX, getWeekFirstDate, getWeekLastDate, firstDateOfMonth, lastDateOfMonth, getWeekNumber, getWeekMiddleDate, setTime, resetTime, getDateInMs, getDateCount, addDays, addMonths, addYears, getStartEndHours, getMaxDays, getDaysCount, getDateFromString, getScrollBarWidth, resetScrollbarWidth, findIndexInData, getOuterHeight, removeChildren, isDaylightSavingTime, getUniversalTime, isMobile, isIPadDevice, capitalizeFirstWord, Resize, DragAndDrop, HeaderRenderer, ViewBase, Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineViews, TimelineMonth, TimelineYear, Timezone, timezoneData, ICalendarExport, ICalendarImport, ExcelExport, Print, RecurrenceEditor, generateSummary, generate, getDateFromRecurrenceDateString, extractObjectFromRule, getCalendarUtil, getRecurrenceStringFromDate, Gregorian, Islamic };
|
|
27562
|
+
export { Schedule, cellClick, cellDoubleClick, moreEventsClick, select, hover, actionBegin, actionComplete, actionFailure, navigating, renderCell, eventClick, eventDoubleClick, eventRendered, dataBinding, dataBound, popupOpen, popupClose, dragStart, drag, dragStop, resizeStart, resizing, resizeStop, inlineClick, cellSelect, virtualScrollStart, virtualScrollStop, initialLoad, initialEnd, print$1 as print, dataReady, eventsLoaded, contentReady, scroll, virtualScroll, scrollUiUpdate, uiUpdate, documentClick, cellMouseDown, WEEK_LENGTH, DEFAULT_WEEKS, MS_PER_DAY, MS_PER_MINUTE, getElementHeightFromClass, getElementWidthFromClass, getTranslateY, getTranslateX, getWeekFirstDate, getWeekLastDate, firstDateOfMonth, lastDateOfMonth, getWeekNumber, getWeekMiddleDate, setTime, resetTime, getDateInMs, getDateCount, addDays, addMonths, addYears, getStartEndHours, getMaxDays, getDaysCount, getDateFromString, getScrollBarWidth, resetScrollbarWidth, findIndexInData, getOuterHeight, removeChildren, isDaylightSavingTime, getUniversalTime, isMobile, isIPadDevice, capitalizeFirstWord, getElementWidth, getElementHeight, getElementTop, Resize, DragAndDrop, HeaderRenderer, ViewBase, Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineViews, TimelineMonth, TimelineYear, Timezone, timezoneData, ICalendarExport, ICalendarImport, ExcelExport, Print, RecurrenceEditor, generateSummary, generate, getDateFromRecurrenceDateString, extractObjectFromRule, getCalendarUtil, getRecurrenceStringFromDate, Gregorian, Islamic };
|
|
27537
27563
|
//# sourceMappingURL=ej2-schedule.es2015.js.map
|