import type { IDataRow } from '../model' ; import get from 'lodash.get' ; internal export function isComplexAccessor ( column ) { return typeof column === 'string' && ( column . includes ( '.' ) || column . includes ( '[' ) ) ; } internal export function resolveValue ( value , column ) { if ( value != null && value . hasOwnProperty ( column ) ) { return value [ column ] ; } return get ( value , column ) ; } internal export function rowComplexGetter ( row , desc ) { return resolveValue ( row . v , desc . column ) ; } internal export function rowGetter ( row , desc ) { return row . v [ desc . column ] ; } internal export function rowGuessGetter ( row , desc ) { const column = desc . column ; if ( isComplexAccessor ( column ) ) { return rowComplexGetter ( row , desc ) ; } return rowGetter ( row , desc ) ; }