@devexpress/dx-scheduler-core
Advanced tools
Comparing version 1.10.4 to 1.11.0-alpha.1
/** | ||
* Bundle of @devexpress/dx-scheduler-core | ||
* Generated: 2019-03-11 | ||
* Version: 1.10.4 | ||
* Generated: 2019-03-13 | ||
* Version: 1.11.0-alpha.1 | ||
* License: https://js.devexpress.com/Licensing | ||
@@ -71,2 +71,5 @@ */ | ||
var HORIZONTAL_TYPE = 'horizontal'; | ||
var SCROLL_OFFSET = 50; | ||
var SCROLL_SPEED_PX = 30; | ||
var SECONDS = 'seconds'; | ||
@@ -705,3 +708,62 @@ var computed = function (getters, viewName, baseComputed, defaultValue) { | ||
export { dayScale, timeScale, availableViewNames, viewCellsData, allDayCells, startViewDate, endViewDate, getViewType, appointments, monthCellsData, calculateMonthDateIntervals, sliceAppointmentByWeek, getMonthCellIndexByDate, calculateWeekDateIntervals, sliceAppointmentByDay, dayBoundaryPredicate, reduceAppointmentByDayBounds, changeCurrentDate, setCurrentViewName, viewBoundText, setAppointmentMeta, OPEN_COMMAND_BUTTON, CLOSE_COMMAND_BUTTON, DELETE_COMMAND_BUTTON, CANCEL_COMMAND_BUTTON, COMMIT_COMMAND_BUTTON, setAppointmentData, callActionIfExists, isAllDayCell, calculateAllDayDateIntervals, allDayPredicate, getAllDayCellIndexByDate, sliceAppointmentsByBoundaries, addAppointment, cancelAddedAppointment, startEditAppointment, stopEditAppointment, changeAppointment, cancelChanges, changedAppointmentById, getHorizontalRectByDates, getCellByDate, getVerticalRectByDates, VERTICAL_TYPE, HORIZONTAL_TYPE, computed, toPercentage, viewPredicate, sortAppointments, findOverlappedAppointments, adjustAppointments, calculateFirstDateOfWeek, unwrapGroups, getAppointmentStyle, calculateRectByDateIntervals }; | ||
var clamp = function (value, min, max) { return Math.max(Math.min(value, max), min); }; | ||
var cellType = function (data) { return moment(data.startDate) | ||
.isSame(data.endDate, 'day') ? VERTICAL_TYPE : HORIZONTAL_TYPE; }; | ||
var intervalDuration = function (data, type) { return moment(data.endDate).diff(data.startDate, type); }; | ||
var cellIndex = function (timeTableCells, clientOffset) { return timeTableCells.findIndex(function (timeTableCell) { | ||
var _a = timeTableCell.getBoundingClientRect(), left = _a.left, top = _a.top, right = _a.right, bottom = _a.bottom; | ||
var isOver = clientOffset | ||
&& clamp(clientOffset.x, left, right) === clientOffset.x | ||
&& clamp(clientOffset.y, top, bottom) === clientOffset.y; | ||
return isOver; | ||
}); }; | ||
var cellData = function (timeTableIndex, allDayIndex, viewCellsData) { | ||
if (allDayIndex !== -1) { | ||
var allDayCellsData = allDayCells(viewCellsData); | ||
return allDayCellsData[allDayIndex]; | ||
} | ||
var firstIndex = Math.floor(timeTableIndex / viewCellsData[0].length); | ||
var secondIndex = timeTableIndex % viewCellsData[0].length; | ||
return viewCellsData[firstIndex][secondIndex]; | ||
}; | ||
var allDayRects = function (draftAppointments, startViewDate, endViewDate, excludedDays, viewCellsData, cellElements) { | ||
var intervals = calculateAllDayDateIntervals(draftAppointments, startViewDate, endViewDate, excludedDays); | ||
return calculateRectByDateIntervals({ | ||
growDirection: HORIZONTAL_TYPE, | ||
multiline: false, | ||
}, intervals, getHorizontalRectByDates, { | ||
startViewDate: startViewDate, | ||
endViewDate: endViewDate, | ||
viewCellsData: viewCellsData, | ||
cellElements: cellElements, | ||
excludedDays: excludedDays, | ||
}); | ||
}; | ||
var verticalTimeTableRects = function (draftAppointments, startViewDate, endViewDate, excludedDays, viewCellsData, cellDuration, cellElements) { | ||
var intervals = calculateWeekDateIntervals(draftAppointments, startViewDate, endViewDate, excludedDays); | ||
return calculateRectByDateIntervals({ | ||
growDirection: VERTICAL_TYPE, | ||
multiline: false, | ||
}, intervals, getVerticalRectByDates, { | ||
startViewDate: startViewDate, | ||
endViewDate: endViewDate, | ||
viewCellsData: viewCellsData, | ||
cellDuration: cellDuration, | ||
cellElements: cellElements, | ||
}); | ||
}; | ||
var horizontalTimeTableRects = function (draftAppointments, startViewDate, endViewDate, excludedDays, viewCellsData, cellElements) { | ||
var intervals = calculateMonthDateIntervals(draftAppointments, startViewDate, endViewDate); | ||
return calculateRectByDateIntervals({ | ||
growDirection: HORIZONTAL_TYPE, | ||
multiline: true, | ||
}, intervals, getHorizontalRectByDates, { | ||
startViewDate: startViewDate, | ||
endViewDate: endViewDate, | ||
viewCellsData: viewCellsData, | ||
cellElements: cellElements, | ||
}); | ||
}; | ||
export { dayScale, timeScale, availableViewNames, viewCellsData, allDayCells, startViewDate, endViewDate, getViewType, appointments, monthCellsData, calculateMonthDateIntervals, sliceAppointmentByWeek, getMonthCellIndexByDate, calculateWeekDateIntervals, sliceAppointmentByDay, dayBoundaryPredicate, reduceAppointmentByDayBounds, changeCurrentDate, setCurrentViewName, viewBoundText, setAppointmentMeta, OPEN_COMMAND_BUTTON, CLOSE_COMMAND_BUTTON, DELETE_COMMAND_BUTTON, CANCEL_COMMAND_BUTTON, COMMIT_COMMAND_BUTTON, setAppointmentData, callActionIfExists, isAllDayCell, calculateAllDayDateIntervals, allDayPredicate, getAllDayCellIndexByDate, sliceAppointmentsByBoundaries, addAppointment, cancelAddedAppointment, startEditAppointment, stopEditAppointment, changeAppointment, cancelChanges, changedAppointmentById, getHorizontalRectByDates, getCellByDate, getVerticalRectByDates, cellType, intervalDuration, cellIndex, cellData, allDayRects, verticalTimeTableRects, horizontalTimeTableRects, VERTICAL_TYPE, HORIZONTAL_TYPE, SCROLL_OFFSET, SCROLL_SPEED_PX, SECONDS, computed, toPercentage, viewPredicate, sortAppointments, findOverlappedAppointments, adjustAppointments, calculateFirstDateOfWeek, unwrapGroups, getAppointmentStyle, calculateRectByDateIntervals }; | ||
//# sourceMappingURL=dx-scheduler-core.es.js.map |
/** | ||
* Bundle of @devexpress/dx-scheduler-core | ||
* Generated: 2019-03-11 | ||
* Version: 1.10.4 | ||
* Generated: 2019-03-13 | ||
* Version: 1.11.0-alpha.1 | ||
* License: https://js.devexpress.com/Licensing | ||
@@ -79,2 +79,5 @@ */ | ||
var HORIZONTAL_TYPE = 'horizontal'; | ||
var SCROLL_OFFSET = 50; | ||
var SCROLL_SPEED_PX = 30; | ||
var SECONDS = 'seconds'; | ||
@@ -713,2 +716,61 @@ var computed = function (getters, viewName, baseComputed, defaultValue) { | ||
var clamp = function (value, min, max) { return Math.max(Math.min(value, max), min); }; | ||
var cellType = function (data) { return moment(data.startDate) | ||
.isSame(data.endDate, 'day') ? VERTICAL_TYPE : HORIZONTAL_TYPE; }; | ||
var intervalDuration = function (data, type) { return moment(data.endDate).diff(data.startDate, type); }; | ||
var cellIndex = function (timeTableCells, clientOffset) { return timeTableCells.findIndex(function (timeTableCell) { | ||
var _a = timeTableCell.getBoundingClientRect(), left = _a.left, top = _a.top, right = _a.right, bottom = _a.bottom; | ||
var isOver = clientOffset | ||
&& clamp(clientOffset.x, left, right) === clientOffset.x | ||
&& clamp(clientOffset.y, top, bottom) === clientOffset.y; | ||
return isOver; | ||
}); }; | ||
var cellData = function (timeTableIndex, allDayIndex, viewCellsData) { | ||
if (allDayIndex !== -1) { | ||
var allDayCellsData = allDayCells(viewCellsData); | ||
return allDayCellsData[allDayIndex]; | ||
} | ||
var firstIndex = Math.floor(timeTableIndex / viewCellsData[0].length); | ||
var secondIndex = timeTableIndex % viewCellsData[0].length; | ||
return viewCellsData[firstIndex][secondIndex]; | ||
}; | ||
var allDayRects = function (draftAppointments, startViewDate, endViewDate, excludedDays, viewCellsData, cellElements) { | ||
var intervals = calculateAllDayDateIntervals(draftAppointments, startViewDate, endViewDate, excludedDays); | ||
return calculateRectByDateIntervals({ | ||
growDirection: HORIZONTAL_TYPE, | ||
multiline: false, | ||
}, intervals, getHorizontalRectByDates, { | ||
startViewDate: startViewDate, | ||
endViewDate: endViewDate, | ||
viewCellsData: viewCellsData, | ||
cellElements: cellElements, | ||
excludedDays: excludedDays, | ||
}); | ||
}; | ||
var verticalTimeTableRects = function (draftAppointments, startViewDate, endViewDate, excludedDays, viewCellsData, cellDuration, cellElements) { | ||
var intervals = calculateWeekDateIntervals(draftAppointments, startViewDate, endViewDate, excludedDays); | ||
return calculateRectByDateIntervals({ | ||
growDirection: VERTICAL_TYPE, | ||
multiline: false, | ||
}, intervals, getVerticalRectByDates, { | ||
startViewDate: startViewDate, | ||
endViewDate: endViewDate, | ||
viewCellsData: viewCellsData, | ||
cellDuration: cellDuration, | ||
cellElements: cellElements, | ||
}); | ||
}; | ||
var horizontalTimeTableRects = function (draftAppointments, startViewDate, endViewDate, excludedDays, viewCellsData, cellElements) { | ||
var intervals = calculateMonthDateIntervals(draftAppointments, startViewDate, endViewDate); | ||
return calculateRectByDateIntervals({ | ||
growDirection: HORIZONTAL_TYPE, | ||
multiline: true, | ||
}, intervals, getHorizontalRectByDates, { | ||
startViewDate: startViewDate, | ||
endViewDate: endViewDate, | ||
viewCellsData: viewCellsData, | ||
cellElements: cellElements, | ||
}); | ||
}; | ||
exports.dayScale = dayScale; | ||
@@ -757,4 +819,14 @@ exports.timeScale = timeScale; | ||
exports.getVerticalRectByDates = getVerticalRectByDates; | ||
exports.cellType = cellType; | ||
exports.intervalDuration = intervalDuration; | ||
exports.cellIndex = cellIndex; | ||
exports.cellData = cellData; | ||
exports.allDayRects = allDayRects; | ||
exports.verticalTimeTableRects = verticalTimeTableRects; | ||
exports.horizontalTimeTableRects = horizontalTimeTableRects; | ||
exports.VERTICAL_TYPE = VERTICAL_TYPE; | ||
exports.HORIZONTAL_TYPE = HORIZONTAL_TYPE; | ||
exports.SCROLL_OFFSET = SCROLL_OFFSET; | ||
exports.SCROLL_SPEED_PX = SCROLL_SPEED_PX; | ||
exports.SECONDS = SECONDS; | ||
exports.computed = computed; | ||
@@ -761,0 +833,0 @@ exports.toPercentage = toPercentage; |
{ | ||
"name": "@devexpress/dx-scheduler-core", | ||
"version": "1.10.4", | ||
"version": "1.11.0-alpha.1", | ||
"description": "Core library for the DevExtreme Reactive Scheduler component", | ||
@@ -44,3 +44,3 @@ "author": { | ||
"@babel/preset-env": "^7.3.1", | ||
"@devexpress/dx-core": "1.10.4", | ||
"@devexpress/dx-core": "1.11.0-alpha.1", | ||
"babel-core": "^7.0.0-bridge.0", | ||
@@ -60,3 +60,3 @@ "babel-jest": "^24.1.0", | ||
"peerDependencies": { | ||
"@devexpress/dx-core": "1.10.4" | ||
"@devexpress/dx-core": "1.11.0-alpha.1" | ||
}, | ||
@@ -66,3 +66,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "b67a8aea7e713a96731fd2fbf063acde1a1bb4c7" | ||
"gitHead": "04937befc4fe9c5e329039533983c956deb78390" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
224322
1548
1