UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

9 lines (8 loc) 1.42 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../utils/index.js"),r=require("../../constants/index.js"),i=require("@progress/kendo-react-common"),g=e=>{var c,o;let t=null,a=null;const d=e.unstyled,n=d&&d.uGrid?d.uGrid:i.uGrid;if(e.rowType==="groupFooter")t={className:i.classNames(n.td({}),e.className),role:"gridcell"};else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const l=u.getNestedValue(e.field,e.dataItem);l!=null&&(a=e.intl&&e.format?e.intl.format(e.format,l):l.toString())}const s=i.classNames(n.td({selected:e.isSelected,highlighted:e.isHighlighted,sorted:e.isSorted,alt:e.isAlt}),e.className);t={rowSpan:(o=(c=e._rowSpan)==null?void 0:c.count)!=null?o:void 0,colSpan:e.colSpan,style:e.style,className:s,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[r.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex}}return{tdProps:t,content:a}},m=e=>{var t;return(t=e.cells)==null?void 0:t[e.rowType||"data"]};exports.getCellTdProps=g;exports.getCustomCell=m;