"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/common/src/common/TableDateCell.tsx" 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.

TableDateCell.tsx  (fullcalendar-5.9.0):TableDateCell.tsx  (fullcalendar-5.10.0)
import { DateRange } from '../datelib/date-range' import { DateRange } from '../datelib/date-range'
import { getDayClassNames, getDateMeta } from '../component/date-rendering' import { getDayClassNames, getDateMeta } from '../component/date-rendering'
import { DateMarker } from '../datelib/marker' import { DateMarker } from '../datelib/marker'
import { createElement } from '../vdom' import { createElement } from '../vdom'
import { DateFormatter } from '../datelib/DateFormatter' import { DateFormatter } from '../datelib/DateFormatter'
import { formatDayString } from '../datelib/formatting-utils' import { formatDayString } from '../datelib/formatting-utils'
import { BaseComponent } from '../vdom-util' import { BaseComponent } from '../vdom-util'
import { RenderHook } from './render-hook' import { RenderHook } from './render-hook'
import { buildNavLinkData } from './nav-link' import { buildNavLinkAttrs } from './nav-link'
import { DateProfile } from '../DateProfileGenerator' import { DateProfile } from '../DateProfileGenerator'
import { DayHeaderContentArg } from '../render-hook-misc' import { DayHeaderContentArg } from '../render-hook-misc'
import { Dictionary } from '../options' import { Dictionary } from '../options'
import { CLASS_NAME, renderInner } from './table-cell-util' import { CLASS_NAME, renderInner } from './table-cell-util'
export interface TableDateCellProps { export interface TableDateCellProps {
date: DateMarker date: DateMarker
dateProfile: DateProfile dateProfile: DateProfile
todayRange: DateRange todayRange: DateRange
colCnt: number colCnt: number
skipping to change at line 40 skipping to change at line 40
let { props } = this let { props } = this
let { date, dateProfile } = props let { date, dateProfile } = props
let dayMeta = getDateMeta(date, props.todayRange, null, dateProfile) let dayMeta = getDateMeta(date, props.todayRange, null, dateProfile)
let classNames = [CLASS_NAME].concat( let classNames = [CLASS_NAME].concat(
getDayClassNames(dayMeta, theme), getDayClassNames(dayMeta, theme),
) )
let text = dateEnv.format(date, props.dayHeaderFormat) let text = dateEnv.format(date, props.dayHeaderFormat)
// if colCnt is 1, we are already in a day-view and don't need a navlink // if colCnt is 1, we are already in a day-view and don't need a navlink
let navLinkAttrs = (options.navLinks && !dayMeta.isDisabled && props.colCnt let navLinkAttrs = (!dayMeta.isDisabled && props.colCnt > 1)
> 1) ? buildNavLinkAttrs(this.context, date)
? { 'data-navlink': buildNavLinkData(date), tabIndex: 0 }
: {} : {}
let hookProps: DayHeaderContentArg = { let hookProps: DayHeaderContentArg = {
date: dateEnv.toDate(date), date: dateEnv.toDate(date),
view: viewApi, view: viewApi,
...props.extraHookProps, ...props.extraHookProps,
text, text,
...dayMeta, ...dayMeta,
} }
skipping to change at line 64 skipping to change at line 64
hookProps={hookProps} hookProps={hookProps}
classNames={options.dayHeaderClassNames} classNames={options.dayHeaderClassNames}
content={options.dayHeaderContent} content={options.dayHeaderContent}
defaultContent={renderInner} defaultContent={renderInner}
didMount={options.dayHeaderDidMount} didMount={options.dayHeaderDidMount}
willUnmount={options.dayHeaderWillUnmount} willUnmount={options.dayHeaderWillUnmount}
> >
{(rootElRef, customClassNames, innerElRef, innerContent) => ( {(rootElRef, customClassNames, innerElRef, innerContent) => (
<th <th
ref={rootElRef} ref={rootElRef}
role="columnheader"
className={classNames.concat(customClassNames).join(' ')} className={classNames.concat(customClassNames).join(' ')}
data-date={!dayMeta.isDisabled ? formatDayString(date) : undefined} data-date={!dayMeta.isDisabled ? formatDayString(date) : undefined}
colSpan={props.colSpan} colSpan={props.colSpan}
{...props.extraDataAttrs} {...props.extraDataAttrs}
> >
<div className="fc-scrollgrid-sync-inner"> <div className="fc-scrollgrid-sync-inner">
{!dayMeta.isDisabled && ( {!dayMeta.isDisabled && (
<a <a
ref={innerElRef} ref={innerElRef}
className={[ className={[
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added

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