"Fossies" - the Fresh Open Source Software Archive  

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

TableDowCell.tsx  (fullcalendar-5.9.0):TableDowCell.tsx  (fullcalendar-5.10.0)
import { getDayClassNames, DateMeta } from '../component/date-rendering' import { getDayClassNames, DateMeta } from '../component/date-rendering'
import { addDays } from '../datelib/marker' import { addDays } from '../datelib/marker'
import { createElement } from '../vdom' import { createElement } from '../vdom'
import { DateFormatter } from '../datelib/DateFormatter' import { DateFormatter } from '../datelib/DateFormatter'
import { BaseComponent } from '../vdom-util' import { BaseComponent } from '../vdom-util'
import { RenderHook } from './render-hook' import { RenderHook } from './render-hook'
import { Dictionary } from '../options' import { Dictionary } from '../options'
import { CLASS_NAME, renderInner } from './table-cell-util' import { CLASS_NAME, renderInner } from './table-cell-util'
import { DayHeaderContentArg } from '../render-hook-misc' import { DayHeaderContentArg } from '../render-hook-misc'
import { createFormatter } from '../datelib/formatting'
export interface TableDowCellProps { export interface TableDowCellProps {
dow: number dow: number
dayHeaderFormat: DateFormatter dayHeaderFormat: DateFormatter
colSpan?: number colSpan?: number
isSticky?: boolean // TODO: get this outta here somehow isSticky?: boolean // TODO: get this outta here somehow
extraHookProps?: Dictionary extraHookProps?: Dictionary
extraDataAttrs?: Dictionary extraDataAttrs?: Dictionary
extraClassNames?: string[] extraClassNames?: string[]
} }
const WEEKDAY_FORMAT = createFormatter({ weekday: 'long' })
export class TableDowCell extends BaseComponent<TableDowCellProps> { export class TableDowCell extends BaseComponent<TableDowCellProps> {
render() { render() {
let { props } = this let { props } = this
let { dateEnv, theme, viewApi, options } = this.context let { dateEnv, theme, viewApi, options } = this.context
let date = addDays(new Date(259200000), props.dow) // start with Sun, 04 Jan 1970 00:00:00 GMT let date = addDays(new Date(259200000), props.dow) // start with Sun, 04 Jan 1970 00:00:00 GMT
let dateMeta: DateMeta = { let dateMeta: DateMeta = {
dow: props.dow, dow: props.dow,
isDisabled: false, isDisabled: false,
isFuture: false, isFuture: false,
isPast: false, isPast: false,
skipping to change at line 59 skipping to change at line 62
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(' ')}
colSpan={props.colSpan} colSpan={props.colSpan}
{...props.extraDataAttrs} {...props.extraDataAttrs}
> >
<div className="fc-scrollgrid-sync-inner"> <div className="fc-scrollgrid-sync-inner">
<a <a
aria-label={dateEnv.format(date, WEEKDAY_FORMAT)}
className={[ className={[
'fc-col-header-cell-cushion', 'fc-col-header-cell-cushion',
props.isSticky ? 'fc-sticky' : '', props.isSticky ? 'fc-sticky' : '',
].join(' ')} ].join(' ')}
ref={innerElRef} ref={innerElRef}
> >
{innerContent} {innerContent}
</a> </a>
</div> </div>
</th> </th>
 End of changes. 4 change blocks. 
0 lines changed or deleted 5 lines changed or added

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