@event-calendar/core
Advanced tools
Comparing version 3.9.0 to 3.10.0
{ | ||
"name": "@event-calendar/core", | ||
"version": "3.9.0", | ||
"version": "3.10.0", | ||
"title": "Event Calendar Core package", | ||
@@ -5,0 +5,0 @@ "description": "Full-sized drag & drop event calendar with resource & timeline views", |
@@ -9,2 +9,3 @@ export * from './lib/a11y.js'; | ||
export * from './lib/payload.js'; | ||
export * from './lib/range.js'; | ||
export * from './lib/resources.js'; | ||
@@ -11,0 +12,0 @@ export * from './lib/stores.js'; |
@@ -163,4 +163,4 @@ export const DAY_IN_SECONDS = 86400; | ||
if (firstDay == 0) { // Western | ||
// Set to nearest Saturday: current date + 5 - current day number | ||
date.setUTCDate(date.getUTCDate() + 5 - date.getUTCDay()); | ||
// Set to nearest Saturday: current date + 6 - current day number | ||
date.setUTCDate(date.getUTCDate() + 6 - date.getUTCDay()); | ||
} else { // ISO | ||
@@ -167,0 +167,0 @@ // Set to nearest Thursday: current date + 4 - current day number |
@@ -59,3 +59,3 @@ import {addDay, addDuration, datesEqual, createDate, cloneDate, setMidnight, toLocalDate, toISOString, noTimePart, copyTime} from './date'; | ||
export function createEventChunk(event, start, end) { | ||
return { | ||
let chunk = { | ||
start: event.start > start ? event.start : start, | ||
@@ -65,2 +65,5 @@ end: event.end < end ? event.end : end, | ||
}; | ||
chunk.zeroDuration = datesEqual(chunk.start, chunk.end); | ||
return chunk; | ||
} | ||
@@ -113,9 +116,2 @@ | ||
export function handleZeroDurationChunk(chunk, preferredDuration) { | ||
if (datesEqual(chunk.start, chunk.end)) { | ||
chunk.zeroDuration = true; | ||
chunk.end = addDuration(cloneDate(chunk.end), preferredDuration); | ||
} | ||
} | ||
function createTimeElement(timeText, chunk, theme) { | ||
@@ -122,0 +118,0 @@ return createElement( |
import { | ||
assign, | ||
createDate, | ||
createDuration, | ||
keys, | ||
setMidnight, | ||
createEvents, | ||
createEventSources, | ||
createResources | ||
assign, createDate, createDuration, createEvents, createEventSources, createResources, createDateRange, keys, | ||
setMidnight | ||
} from '../lib.js'; | ||
@@ -93,2 +87,3 @@ | ||
days: 'ec-days', | ||
disabled: 'ec-disabled', | ||
event: 'ec-event', | ||
@@ -125,2 +120,3 @@ eventBody: 'ec-event-body', | ||
}, | ||
validRange: undefined, | ||
view: undefined, | ||
@@ -150,3 +146,4 @@ viewDidMount: undefined, | ||
slotMaxTime: createDuration, | ||
slotMinTime: createDuration | ||
slotMinTime: createDuration, | ||
validRange: createDateRange | ||
}; | ||
@@ -153,0 +150,0 @@ |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
244874
33
4759
3075