UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

70 lines (66 loc) 2.24 kB
/** * DevExtreme (cjs/__internal/scheduler/r1/components/base/cell.js) * Version: 23.2.6 * Build date: Wed May 01 2024 * * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CellBaseDefaultProps = exports.CellBase = void 0; var _inferno = require("inferno"); var _inferno2 = require("@devextreme/runtime/inferno"); var _index = require("../../utils/index"); function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass) } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, p) { o.__proto__ = p; return o }; return _setPrototypeOf(o, p) } const CellBaseDefaultProps = { className: "", isFirstGroupCell: false, isLastGroupCell: false, startDate: new Date, endDate: new Date, allDay: false, text: "", index: 0, contentTemplateProps: { data: {}, index: 0 } }; exports.CellBaseDefaultProps = CellBaseDefaultProps; let CellBase = function(_BaseInfernoComponent) { _inheritsLoose(CellBase, _BaseInfernoComponent); function CellBase() { return _BaseInfernoComponent.apply(this, arguments) || this } var _proto = CellBase.prototype; _proto.render = function() { const { className: className, isFirstGroupCell: isFirstGroupCell, isLastGroupCell: isLastGroupCell, children: children, ariaLabel: ariaLabel } = this.props; const classes = _index.renderUtils.getGroupCellClasses(isFirstGroupCell, isLastGroupCell, className); return (0, _inferno.createVNode)(1, "td", classes, children, 0, { "aria-label": ariaLabel }) }; return CellBase }(_inferno2.BaseInfernoComponent); exports.CellBase = CellBase; CellBase.defaultProps = CellBaseDefaultProps;