UNPKG

@progress/kendo-react-grid

Version:

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

34 lines (33 loc) 1.61 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as l from "react"; import { getClientCellProps as u, isClientReference as h } from "../utils/index.mjs"; import { GridHierarchyCellContainer as d } from "./client/GridHierarchyCellContainer.mjs"; import { GridHierarchyCellToggle as y } from "./client/GridHierarchyCellToggle.mjs"; const x = (e) => { let n = null, r = null, t = null; const a = u(e), m = e.expanded; e.rowType === "groupFooter" ? r = { className: "k-table-td k-hierarchy-cell", role: "gridcell" } : e.rowType !== "groupHeader" && (r = { className: "k-table-td k-hierarchy-cell", role: "gridcell", "aria-expanded": !!m, "aria-colindex": e.ariaColumnIndex }, t = /* @__PURE__ */ l.createElement(y, { ...a })); const c = e.rowType || "data", i = e.cells; if (i && i.hierarchy && i.hierarchy[c]) { const o = i.hierarchy[c], s = h(o); return /* @__PURE__ */ l.createElement(d, { cellProps: a, tdProps: r, isCustom: !0, isClient: s }, /* @__PURE__ */ l.createElement(o, { ...a, tdProps: r }, t)); } return e.rowType !== "groupHeader" && (n = /* @__PURE__ */ l.createElement("td", { ...r }, t)), /* @__PURE__ */ l.createElement(d, { cellProps: a, content: t, tdProps: r }, n); }; export { x as GridHierarchyCell };