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.38 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 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 s=require("../../utils/index.js"),r=require("../../constants/index.js"),c=require("@progress/kendo-react-common"),g=e=>{var n,a;let t=null,d=null;const i=e.unstyled,o=i&&i.uGrid?i.uGrid:c.uGrid;if(e.rowType==="groupFooter")t={className:e.className};else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const l=s.getNestedValue(e.field,e.dataItem);l!=null&&(d=e.intl&&e.format?e.intl.format(e.format,l):l.toString())}const u=c.classNames(o.td({selected:e.isSelected,highlighted:e.isHighlighted,sorted:e.isSorted,alt:e.isAlt}),e.className);t={rowSpan:(a=(n=e._rowSpan)==null?void 0:n.count)!=null?a:void 0,colSpan:e.colSpan,style:e.style,className:u,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[r.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex}}return{tdProps:t,content:d}},m=e=>{var t;return(t=e.cells)==null?void 0:t[e.rowType||"data"]};exports.getCellTdProps=g;exports.getCustomCell=m;