Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
''
) +
'>'
if (this.renderProps.cellWeekNumbersVisible && (date.getUTCDay() === weekCalcFirstDow)) {
html += buildGotoAnchorHtml(
options,
dateEnv,
{ date, type: 'week' },
{ 'class': 'fc-week-number' },
dateEnv.format(date, WEEK_NUM_FORMAT) // inner HTML
)
}
if (isDayNumberVisible) {
html += buildGotoAnchorHtml(
options,
dateEnv,
date,
{ 'class': 'fc-day-number' },
dateEnv.format(date, DAY_NUM_FORMAT) // inner HTML
)
}
html += ''
return html
}
classes = getDayClasses(date, this.props.dateProfile, this.context)
classes.unshift('fc-day-top')
if (this.renderProps.cellWeekNumbersVisible) {
weekCalcFirstDow = dateEnv.weekDow
}
html += ''
if (this.renderProps.cellWeekNumbersVisible && (date.getUTCDay() === weekCalcFirstDow)) {
html += buildGotoAnchorHtml(
options,
dateEnv,
{ date, type: 'week' },
{ 'class': 'fc-week-number' },
dateEnv.format(date, WEEK_NUM_FORMAT) // inner HTML
)
}
if (isDayNumberVisible) {
html += buildGotoAnchorHtml(
options,
dateEnv,
date,
{ 'class': 'fc-day-number' },
dateEnv.format(date, DAY_NUM_FORMAT) // inner HTML
)
classes = getDayClasses(date, this.props.dateProfile, this.context);
classes.unshift('fc-day-top');
if (this.renderProps.cellWeekNumbersVisible) {
weekCalcFirstDow = dateEnv.weekDow;
}
html += '';
if (this.renderProps.cellWeekNumbersVisible && (date.getUTCDay() === weekCalcFirstDow)) {
html += buildGotoAnchorHtml(view, { date: date, type: 'week' }, { 'class': 'fc-week-number' }, dateEnv.format(date, WEEK_NUM_FORMAT) // inner HTML
);
}
if (isDayNumberVisible) {
html += buildGotoAnchorHtml(view, date, { 'class': 'fc-day-number' }, dateEnv.format(date, DAY_NUM_FORMAT) // inner HTML
);
}
html += '';
return html;
};
/* Sizing
if (!isDayNumberVisible && !this.renderProps.cellWeekNumbersVisible) {
// no numbers in day cell (week number must be along the side)
return ''; // will create an empty space above events :(
}
classes = getDayClasses(date, this.props.dateProfile, this.context);
classes.unshift('fc-day-top');
if (this.renderProps.cellWeekNumbersVisible) {
weekCalcFirstDow = dateEnv.weekDow;
}
html += '';
if (this.renderProps.cellWeekNumbersVisible && (date.getUTCDay() === weekCalcFirstDow)) {
html += buildGotoAnchorHtml(view, { date: date, type: 'week' }, { 'class': 'fc-week-number' }, dateEnv.format(date, WEEK_NUM_FORMAT) // inner HTML
);
}
if (isDayNumberVisible) {
html += buildGotoAnchorHtml(view, date, { 'class': 'fc-day-number' }, dateEnv.format(date, DAY_NUM_FORMAT) // inner HTML
);
}
html += '';
return html;
};
/* Sizing
buildDayHeaderRow(dayDate) {
let { theme, dateEnv, options } = this.context
let mainFormat = createFormatter(options.listDayFormat) // TODO: cache
let altFormat = createFormatter(options.listDayAltFormat) // TODO: cache
return createElement('tr', {
className: 'fc-list-heading',
'data-date': dateEnv.formatIso(dayDate, { omitTime: true })
}, '' +
(mainFormat ?
buildGotoAnchorHtml(
options,
dateEnv,
dayDate,
{ 'class': 'fc-list-heading-main' },
htmlEscape(dateEnv.format(dayDate, mainFormat)) // inner HTML
) :
'') +
(altFormat ?
buildGotoAnchorHtml(
options,
dateEnv,
dayDate,
{ 'class': 'fc-list-heading-alt' },
htmlEscape(dateEnv.format(dayDate, altFormat)) // inner HTML
) :
'') +
_this.renderDayGridNumberIntroHtml = function (row, dayGrid) {
var dateEnv = _this.dateEnv;
var weekStart = dayGrid.props.cells[row][0].date;
if (_this.colWeekNumbersVisible) {
return '' +
'' +
buildGotoAnchorHtml(// aside from link, important for matchCellWidths
_this, { date: weekStart, type: 'week', forceOff: dayGrid.colCnt === 1 }, dateEnv.format(weekStart, WEEK_NUM_FORMAT$1) // inner HTML
) +
'';
}
return '';
};
// Generates the HTML that goes before the day bg cells for each day-row
renderHeadIntroHtml = () => {
let { theme, dateEnv, options } = this.context
let range = this.props.dateProfile.renderRange
let dayCnt = diffDays(range.start, range.end)
let weekText
if (options.weekNumbers) {
weekText = dateEnv.format(range.start, WEEK_HEADER_FORMAT)
return '' +
'' +
buildGotoAnchorHtml( // aside from link, important for matchCellWidths
options,
dateEnv,
{ date: range.start, type: 'week', forceOff: dayCnt > 1 },
htmlEscape(weekText) // inner HTML
) +
''
} else {
return ''
}
}
renderDayGridNumberIntroHtml = (row: number, dayGrid: DayGrid) => {
let { options, dateEnv } = this.context
let weekStart = dayGrid.props.cells[row][0].date
if (this.colWeekNumbersVisible) {
return '' +
'' +
buildGotoAnchorHtml( // aside from link, important for matchCellWidths
options,
dateEnv,
{ date: weekStart, type: 'week', forceOff: dayGrid.colCnt === 1 },
dateEnv.format(weekStart, WEEK_NUM_FORMAT) // inner HTML
) +
''
}
return ''
}