import { BaseComponent } from '../vdom-util' ; import { EventRenderRange } from './event-rendering' ; import { EventInstanceHash } from '../structs/event-instance' ; import { Hit } from '../interactions/hit' ; import { elementClosest } from '../util/dom-manip' ; import { guid } from '../util/misc' ; import { Dictionary } from '../options' ; export type DateComponentHash = { [ uid ] : DateComponent < any , any > ; } ; export interface Seg { component ? : DateComponent < any , any > ; isStart : boolean ; isEnd : boolean ; eventRange ? : EventRenderRange ; [ otherProp ] : any ; el ? : never ; } export interface EventSegUiInteractionState { affectedInstances : EventInstanceHash ; segs : Seg [ ] ; isEvent : boolean ; } export abstract class DateComponent < Props = Dictionary , State = Dictionary > extends BaseComponent < Props , State > { uid = guid ( ) ; prepareHits ( ) { } queryHit ( positionLeft , positionTop , elWidth , elHeight ) { return null ; } isValidSegDownEl ( el ) { return ! ( this . props as any ) . eventDrag && ! ( this . props as any ) . eventResize && ! elementClosest ( el , '.fc-event-mirror' ) ; } isValidDateDownEl ( el ) { return ! elementClosest ( el , '.fc-event:not(.fc-bg-event)' ) && ! elementClosest ( el , '.fc-more-link' ) && ! elementClosest ( el , 'a[data-navlink]' ) && ! elementClosest ( el , '.fc-popover' ) ; } }