devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
26 lines (25 loc) • 1.04 kB
JavaScript
/**
* DevExtreme (esm/__internal/grids/data_grid/summary/utils.js)
* Version: 25.2.7
* Build date: Tue May 05 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
isDefined
} from "../../../../core/utils/type";
export function getSummaryCellIndex(column, prevColumn) {
let isGroupRow = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : false;
const cellIndex = column.index ?? -1;
if (!isGroupRow) {
return cellIndex
}
if ("groupExpand" === (null === prevColumn || void 0 === prevColumn ? void 0 : prevColumn.type) || "groupExpand" === column.type) {
return (null === prevColumn || void 0 === prevColumn ? void 0 : prevColumn.index) ?? -1
}
return !isDefined(column.groupIndex) ? cellIndex : -1
}
export function getColumnFromMap(identifier, columnMap) {
return void 0 !== identifier ? columnMap.get(identifier) : void 0
}