"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/common/src/component/event-rendering.ts" between
fullcalendar-5.9.0.tar.gz and fullcalendar-5.10.0.tar.gz

About: FullCalendar is a full-sized drag & drop JavaScript event calendar.

event-rendering.ts  (fullcalendar-5.9.0):event-rendering.ts  (fullcalendar-5.10.0)
skipping to change at line 17 skipping to change at line 17
import { computeVisibleDayRange } from '../util/date' import { computeVisibleDayRange } from '../util/date'
import { Seg } from './DateComponent' import { Seg } from './DateComponent'
import { EventApi } from '../api/EventApi' import { EventApi } from '../api/EventApi'
import { EventUi, EventUiHash, combineEventUis } from './event-ui' import { EventUi, EventUiHash, combineEventUis } from './event-ui'
import { mapHash } from '../util/object' import { mapHash } from '../util/object'
import { ViewContext } from '../ViewContext' import { ViewContext } from '../ViewContext'
import { DateFormatter } from '../datelib/DateFormatter' import { DateFormatter } from '../datelib/DateFormatter'
import { addMs, DateMarker, startOfDay } from '../datelib/marker' import { addMs, DateMarker, startOfDay } from '../datelib/marker'
import { ViewApi } from '../ViewApi' import { ViewApi } from '../ViewApi'
import { MountArg } from '../common/render-hook' import { MountArg } from '../common/render-hook'
import { createAriaKeyboardAttrs } from '../util/dom-event'
export interface EventRenderRange extends EventTuple { export interface EventRenderRange extends EventTuple {
ui: EventUi ui: EventUi
range: DateRange range: DateRange
isStart: boolean isStart: boolean
isEnd: boolean isEnd: boolean
} }
/* /*
Specifying nextDayThreshold signals that all-day ranges should be sliced. Specifying nextDayThreshold signals that all-day ranges should be sliced.
skipping to change at line 341 skipping to change at line 342
return classNames return classNames
} }
export function buildEventRangeKey(eventRange: EventRenderRange) { export function buildEventRangeKey(eventRange: EventRenderRange) {
return eventRange.instance return eventRange.instance
? eventRange.instance.instanceId ? eventRange.instance.instanceId
: `${eventRange.def.defId}:${eventRange.range.start.toISOString()}` : `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`
// inverse-background events don't have specific instances. TODO: better solut ion // inverse-background events don't have specific instances. TODO: better solut ion
} }
export function getSegAnchorAttrs(seg: Seg, context: ViewContext) {
let { def, instance } = seg.eventRange
let { url } = def
if (url) {
return { href: url }
}
let { emitter, options } = context
let { eventInteractive } = options
if (eventInteractive == null) {
eventInteractive = def.interactive
if (eventInteractive == null) {
eventInteractive = Boolean(emitter.hasHandlers('eventClick'))
}
}
// mock what happens in EventClicking
if (eventInteractive) {
// only attach keyboard-related handlers because click handler is already do
ne in EventClicking
return createAriaKeyboardAttrs((ev: UIEvent) => {
emitter.trigger('eventClick', {
el: ev.target as HTMLElement,
event: new EventApi(context, def, instance),
jsEvent: ev as MouseEvent,
view: context.viewApi,
})
})
}
return {}
}
 End of changes. 2 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)