UNPKG

1.75 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.CalendarGridRow = void 0;
4var tslib_1 = require("tslib");
5var React = require("react");
6var utilities_1 = require("@fluentui/utilities");
7var date_time_utilities_1 = require("@fluentui/date-time-utilities");
8var CalendarGridDayCell_1 = require("./CalendarGridDayCell");
9var CalendarGridRow = function (props) {
10 var classNames = props.classNames, week = props.week, weeks = props.weeks, weekIndex = props.weekIndex, rowClassName = props.rowClassName, ariaRole = props.ariaRole, showWeekNumbers = props.showWeekNumbers, firstDayOfWeek = props.firstDayOfWeek, firstWeekOfYear = props.firstWeekOfYear, navigatedDate = props.navigatedDate, strings = props.strings;
11 var weekNumbers = showWeekNumbers
12 ? date_time_utilities_1.getWeekNumbersInMonth(weeks.length, firstDayOfWeek, firstWeekOfYear, navigatedDate)
13 : null;
14 var titleString = weekNumbers
15 ? strings.weekNumberFormatString && utilities_1.format(strings.weekNumberFormatString, weekNumbers[weekIndex])
16 : '';
17 return (React.createElement("tr", { role: ariaRole, className: rowClassName, key: weekIndex + '_' + week[0].key },
18 showWeekNumbers && weekNumbers && (React.createElement("th", { className: classNames.weekNumberCell, key: weekIndex, title: titleString, "aria-label": titleString, scope: "row" },
19 React.createElement("span", null, weekNumbers[weekIndex]))),
20 week.map(function (day, dayIndex) { return (React.createElement(CalendarGridDayCell_1.CalendarGridDayCell, tslib_1.__assign({}, props, { key: day.key, day: day, dayIndex: dayIndex }))); })));
21};
22exports.CalendarGridRow = CalendarGridRow;
23//# sourceMappingURL=CalendarGridRow.js.map
\No newline at end of file