calendar-utils
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -108,2 +108,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDifferenceInDaysWithExclusions", function() { return getDifferenceInDaysWithExclusions; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllDayWeekEvents", function() { return getAllDayWeekEvents; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWeekView", function() { return getWeekView; }); | ||
@@ -320,3 +321,5 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMonthView", function() { return getMonthView; }); | ||
function getAllDayWeekEvents(dateAdapter, _a) { | ||
var events = _a.events, excluded = _a.excluded, precision = _a.precision, absolutePositionedEvents = _a.absolutePositionedEvents, viewStart = _a.viewStart, viewEnd = _a.viewEnd, eventsInPeriod = _a.eventsInPeriod; | ||
var _b = _a.events, events = _b === void 0 ? [] : _b, _c = _a.excluded, excluded = _c === void 0 ? [] : _c, _d = _a.precision, precision = _d === void 0 ? 'days' : _d, _e = _a.absolutePositionedEvents, absolutePositionedEvents = _e === void 0 ? false : _e, viewStart = _a.viewStart, viewEnd = _a.viewEnd; | ||
viewStart = dateAdapter.startOfDay(viewStart); | ||
viewEnd = dateAdapter.endOfDay(viewEnd); | ||
var differenceInSeconds = dateAdapter.differenceInSeconds, differenceInDays = dateAdapter.differenceInDays; | ||
@@ -329,3 +332,3 @@ var maxRange = getDifferenceInDaysWithExclusions(dateAdapter, { | ||
var totalDaysInView = differenceInDays(viewEnd, viewStart) + 1; | ||
var eventsMapped = eventsInPeriod | ||
var eventsMapped = events | ||
.filter(function (event) { return event.allDay; }) | ||
@@ -424,3 +427,3 @@ .map(function (event) { | ||
hourDuration: hourDuration, | ||
minimumEventHeight: minimumEventHeight | ||
minimumEventHeight: minimumEventHeight, | ||
}); | ||
@@ -489,3 +492,3 @@ var hours = dayViewHourGrid.map(function (hour) { | ||
allDayEventRows: getAllDayWeekEvents(dateAdapter, { | ||
events: events, | ||
events: eventsInPeriod, | ||
excluded: excluded, | ||
@@ -496,3 +499,2 @@ precision: precision, | ||
viewEnd: viewEnd, | ||
eventsInPeriod: eventsInPeriod, | ||
}), | ||
@@ -517,3 +519,3 @@ period: { | ||
viewEnd: viewEnd, | ||
minimumEventHeight: minimumEventHeight | ||
minimumEventHeight: minimumEventHeight, | ||
}), | ||
@@ -520,0 +522,0 @@ }; |
@@ -145,2 +145,11 @@ import { DateAdapter } from './date-adapters/date-adapter/index'; | ||
}): number; | ||
interface GetAllDayEventArgs { | ||
precision?: 'days' | 'minutes'; | ||
events?: CalendarEvent[]; | ||
absolutePositionedEvents?: boolean; | ||
viewStart: Date; | ||
viewEnd: Date; | ||
excluded?: number[]; | ||
} | ||
export declare function getAllDayWeekEvents(dateAdapter: DateAdapter, { events, excluded, precision, absolutePositionedEvents, viewStart, viewEnd, }: GetAllDayEventArgs): WeekViewAllDayEventRow[]; | ||
export declare function getWeekView(dateAdapter: DateAdapter, { events, viewDate, weekStartsOn, excluded, precision, absolutePositionedEvents, hourSegments, hourDuration, dayStart, dayEnd, weekendDays, segmentHeight, minimumEventHeight, viewStart, viewEnd, }: GetWeekViewArgs): WeekView; | ||
@@ -147,0 +156,0 @@ export interface GetMonthViewArgs { |
@@ -207,4 +207,6 @@ var __assign = (this && this.__assign) || function () { | ||
} | ||
function getAllDayWeekEvents(dateAdapter, _a) { | ||
var events = _a.events, excluded = _a.excluded, precision = _a.precision, absolutePositionedEvents = _a.absolutePositionedEvents, viewStart = _a.viewStart, viewEnd = _a.viewEnd, eventsInPeriod = _a.eventsInPeriod; | ||
export function getAllDayWeekEvents(dateAdapter, _a) { | ||
var _b = _a.events, events = _b === void 0 ? [] : _b, _c = _a.excluded, excluded = _c === void 0 ? [] : _c, _d = _a.precision, precision = _d === void 0 ? 'days' : _d, _e = _a.absolutePositionedEvents, absolutePositionedEvents = _e === void 0 ? false : _e, viewStart = _a.viewStart, viewEnd = _a.viewEnd; | ||
viewStart = dateAdapter.startOfDay(viewStart); | ||
viewEnd = dateAdapter.endOfDay(viewEnd); | ||
var differenceInSeconds = dateAdapter.differenceInSeconds, differenceInDays = dateAdapter.differenceInDays; | ||
@@ -217,3 +219,3 @@ var maxRange = getDifferenceInDaysWithExclusions(dateAdapter, { | ||
var totalDaysInView = differenceInDays(viewEnd, viewStart) + 1; | ||
var eventsMapped = eventsInPeriod | ||
var eventsMapped = events | ||
.filter(function (event) { return event.allDay; }) | ||
@@ -312,3 +314,3 @@ .map(function (event) { | ||
hourDuration: hourDuration, | ||
minimumEventHeight: minimumEventHeight | ||
minimumEventHeight: minimumEventHeight, | ||
}); | ||
@@ -377,3 +379,3 @@ var hours = dayViewHourGrid.map(function (hour) { | ||
allDayEventRows: getAllDayWeekEvents(dateAdapter, { | ||
events: events, | ||
events: eventsInPeriod, | ||
excluded: excluded, | ||
@@ -384,3 +386,2 @@ precision: precision, | ||
viewEnd: viewEnd, | ||
eventsInPeriod: eventsInPeriod, | ||
}), | ||
@@ -405,3 +406,3 @@ period: { | ||
viewEnd: viewEnd, | ||
minimumEventHeight: minimumEventHeight | ||
minimumEventHeight: minimumEventHeight, | ||
}), | ||
@@ -408,0 +409,0 @@ }; |
{ | ||
"name": "calendar-utils", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Utility functions to generate views for calendars", | ||
@@ -5,0 +5,0 @@ "main": "bundles/calendar-utils.umd.js", |
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
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
107807
1809