@syncfusion/ej2-schedule
Advanced tools
Comparing version 24.2.3 to 24.2.4
/*! | ||
* filename: index.d.ts | ||
* version : 24.2.3 | ||
* version : 24.2.4 | ||
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-schedule@*", | ||
"_id": "@syncfusion/ej2-schedule@24.1.41", | ||
"_id": "@syncfusion/ej2-schedule@24.2.3", | ||
"_inBundle": false, | ||
"_integrity": "sha512-PMFUzrOa5gFauoO79WYC7vNHSJIoHrPUZJwE/aDZPIKkc0pUdaPPcJhLrxMUrKEOLJvmhVo0bqOQkMwUXLswTA==", | ||
"_integrity": "sha512-Gl514rzz50QthXreUYNs3USTKmeufyBVrP23DMVahPJiR8tVS8350GXUgGOhvsVaHn5NmtgDvqcqB3StCeJZxw==", | ||
"_location": "/@syncfusion/ej2-schedule", | ||
@@ -26,4 +26,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-24.1.41.tgz", | ||
"_shasum": "dfaee919781c2f41866763e373d84a7f4e8b46ad", | ||
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-24.2.3.tgz", | ||
"_shasum": "68cf18dacb39bf44d0164f3b73fdb185aae9fbd4", | ||
"_spec": "@syncfusion/ej2-schedule@*", | ||
@@ -43,7 +43,7 @@ "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included", | ||
"@syncfusion/ej2-data": "~24.2.3", | ||
"@syncfusion/ej2-dropdowns": "~24.2.3", | ||
"@syncfusion/ej2-excel-export": "~24.2.3", | ||
"@syncfusion/ej2-inputs": "~24.2.3", | ||
"@syncfusion/ej2-lists": "~24.2.3", | ||
"@syncfusion/ej2-navigations": "~24.2.3", | ||
"@syncfusion/ej2-dropdowns": "~24.2.4", | ||
"@syncfusion/ej2-excel-export": "~24.2.4", | ||
"@syncfusion/ej2-inputs": "~24.2.4", | ||
"@syncfusion/ej2-lists": "~24.2.4", | ||
"@syncfusion/ej2-navigations": "~24.2.4", | ||
"@syncfusion/ej2-popups": "~24.2.3" | ||
@@ -78,4 +78,4 @@ }, | ||
"typings": "index.d.ts", | ||
"version": "24.2.3", | ||
"version": "24.2.4", | ||
"sideEffects": false | ||
} |
@@ -510,3 +510,8 @@ var __extends = (this && this.__extends) || (function () { | ||
offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval); | ||
offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left; | ||
if (!isLeft) { | ||
var roundedLeft = (+parseFloat(this.actionObj.element.style[this.parent.enableRtl ? 'right' : 'left'])).toFixed(1); | ||
if (roundedLeft !== left.toFixed(1)) { | ||
offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left; | ||
} | ||
} | ||
this.actionObj.event[this.parent.eventFields.isAllDay] = false; | ||
@@ -521,5 +526,7 @@ } | ||
if (isTimelineView && !isLeft) { | ||
rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.getBoundingClientRect().width + | ||
(this.actionObj.pageX - this.actionObj.X))) / slotInterval) * slotInterval; | ||
rightValue = rightValue < 0 ? Math.abs(rightValue) : -rightValue; | ||
rightValue = rightValue - (Math.ceil((this.actionObj.pageX - this.actionObj.X) / slotInterval) * slotInterval); | ||
if (rightValue < 0) { | ||
rightValue = parseInt(this.actionObj.clone.style.right, 10); | ||
width = parseInt(this.actionObj.clone.style.width, 10); | ||
} | ||
} | ||
@@ -546,8 +553,15 @@ rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue; | ||
var leftValue = offsetLeft; | ||
offsetLeft = isTimelineView ? isTimeViews ? isLeft ? Math.floor(offsetLeft / slotInterval) * slotInterval : offsetLeft : | ||
offsetLeft = isTimelineView ? isTimeViews ? isLeft ? this.actionObj.element.offsetLeft - | ||
(Math.ceil((this.actionObj.element.offsetLeft - offsetLeft) / slotInterval) * slotInterval) : offsetLeft : | ||
Math.floor(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth : | ||
Math.ceil(Math.abs(offsetLeft) / this.actionObj.cellWidth) * this.actionObj.cellWidth; | ||
if (offsetLeft < 0) { | ||
offsetLeft = 0; | ||
width = this.actionObj.clone.getBoundingClientRect().width; | ||
if (isTimelineView && isLeft && (offsetLeft % slotInterval)) { | ||
offsetLeft = parseInt(this.actionObj.clone.style.left, 10); | ||
width = parseInt(this.actionObj.clone.style.width, 10); | ||
} | ||
else { | ||
offsetLeft = 0; | ||
width = this.actionObj.clone.getBoundingClientRect().width; | ||
} | ||
} | ||
@@ -554,0 +568,0 @@ var cloneWidth = Math.ceil(this.actionObj.clone.getBoundingClientRect().width / this.actionObj.cellWidth) * |
@@ -92,4 +92,5 @@ import { Predicate } from '@syncfusion/ej2-data'; | ||
addCellHeight(selector: string, eventHeight: number, eventGap: number, headerHeight: number, indHeight: number, isScrollUpdate?: boolean): void; | ||
getCellWidth(element: HTMLElement): number; | ||
private unWireEvents; | ||
destroy(): void; | ||
} |
@@ -177,6 +177,5 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? | ||
0 : this.workCells.length - 1].getBoundingClientRect(); | ||
this.cellWidth = cellDetail.width; | ||
this.cellHeight = cellDetail.height; | ||
var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ? 0 : this.workCells.length - 1]; | ||
this.cellWidth = this.parent.eventBase.getCellWidth(cellDetail); | ||
this.cellHeight = cellDetail.getBoundingClientRect().height; | ||
this.dateRender = dateRender; | ||
@@ -183,0 +182,0 @@ var filteredDates = this.getRenderedDates(dateRender); |
@@ -26,2 +26,3 @@ import { Schedule } from '../base/schedule'; | ||
renderEvents(event: Record<string, any>, resIndex: number, appointmentsList?: Record<string, any>[]): void; | ||
private adjustToNearestTimeSlot; | ||
private renderTimelineMoreIndicator; | ||
@@ -28,0 +29,0 @@ updateCellHeight(cell: HTMLElement, height: number): void; |
@@ -240,4 +240,7 @@ var __extends = (this && this.__extends) || (function () { | ||
startDate = (k === 0) ? new Date(startDate.getTime()) : new Date(startDate.getTime() + (60000 * interval)); | ||
if (slotCount < 1) { | ||
startDate = this.adjustToNearestTimeSlot(startDate, interval); | ||
} | ||
endDate = new Date(startDate.getTime() + (60000 * interval)); | ||
if (endDate.getTime() > endTime.getTime()) { | ||
if (slotCount >= 1 && endDate.getTime() > endTime.getTime()) { | ||
break; | ||
@@ -258,2 +261,16 @@ } | ||
}; | ||
TimelineEvent.prototype.adjustToNearestTimeSlot = function (inputTime, interval) { | ||
// Parse the input time | ||
var parsedTime = new Date(inputTime); | ||
// Get the minutes of the input time in milliseconds | ||
var minutesInMilliseconds = parsedTime.getHours() * 60 * 60 * 1000 + parsedTime.getMinutes() * 60 * 1000; | ||
// Calculate the adjusted time in milliseconds (nearest time slot) | ||
var adjustedMinutesInMilliseconds = Math.floor(minutesInMilliseconds / (interval * 60 * 1000)) * (interval * 60 * 1000); | ||
// Create a new Date object with the adjusted time | ||
var adjustedTime = new Date(parsedTime.getTime()); | ||
adjustedTime.setHours(adjustedMinutesInMilliseconds / (60 * 60 * 1000) % 24); | ||
adjustedTime.setMinutes((adjustedMinutesInMilliseconds % (60 * 60 * 1000)) / (60 * 1000)); | ||
// Return the adjusted time in string format | ||
return adjustedTime; | ||
}; | ||
TimelineEvent.prototype.renderTimelineMoreIndicator = function (startTime, startDate, endDate, appHeight, interval, resIndex, appointmentsList, top, appLeft, appRight, cellTd, moreIndicator, appPos, position) { | ||
@@ -318,4 +335,5 @@ appLeft = (this.parent.enableRtl) ? appRight = position : position; | ||
var tr = this.parent.element.querySelector('.' + cls.CONTENT_TABLE_CLASS + ' tbody tr'); | ||
this.cellWidth = this.workCells[0].getBoundingClientRect().width; | ||
var currentPercentage = (this.cellWidth * tr.children.length) / (conWidth / 100); | ||
var actualCellWidth = this.workCells[0].getBoundingClientRect().width; | ||
this.cellWidth = actualCellWidth / +(this.workCells[0].getAttribute('colspan') || 1); | ||
var currentPercentage = (actualCellWidth * tr.children.length) / (conWidth / 100); | ||
var apps = [].slice.call(this.parent.element.querySelectorAll('.' + cls.APPOINTMENT_CLASS)); | ||
@@ -322,0 +340,0 @@ apps.forEach(function (app) { |
@@ -92,3 +92,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var workCell = this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS + ':not(.' + cls.OTHERMONTH_CLASS + ')'); | ||
this.cellWidth = workCell.getBoundingClientRect().width; | ||
this.cellWidth = this.parent.eventBase.getCellWidth(workCell); | ||
this.cellHeader = util.getOuterHeight(workCell.querySelector('.' + cls.DATE_HEADER_CLASS)); | ||
@@ -95,0 +95,0 @@ var eventTable = this.parent.element.querySelector('.' + cls.EVENT_TABLE_CLASS); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22050997
255327