@inandu-solutions/grid-core

The framework-agnostic core of the Inandu data grid. Pure TypeScript: sorting, filtering, parsing, formatting, aggregation, tree flattening, export helpers and translated messages.

Angular, React and Vue grids on top of one shared core package, which shares its query contract with Inandu.Grid.Extensions on .NET

Why one core

Install

npm install @inandu-solutions/grid-core

If you use grid-angular, grid-react or grid-vue you already get it. Install it directly only to build your own grid or to reuse the helpers.

Use

import { formatCellValue, escapeCsvValue, matchesColumnFilter } from '@inandu-solutions/grid-core';

formatCellValue(1234.5, 'number', '1.0-2', 'en-US');        // "1,234.50"
formatCellValue('2024-01-05', 'date', 'YYYY-MM-DD', 'en-US'); // "2024-01-05", in every time zone
escapeCsvValue('=HYPERLINK("http://example.com","x")');     // a quote is prefixed: opens as text

What is inside

AreaExports
FormattingformatCellValue, formatDateValue, coerceToDate, defaultNumberFormatter
FilteringmatchesColumnFilter, hasMeaningfulFilterValue
SortingcompareCellValues
TreesflattenTree, collectTreeRows
AggregatescomputeGroupAggregates, AGGREGATE_SYMBOLS
ParsingparseDraftValue, parsePastedCellValue, parsePastedCell
Export helpersescapeCsvValue, neutralizeCsvFormula, escapeMarkup, truncatePdfText, downloadBlob
i18nen, es, fr, it, zh, INANDU_GRID_TRANSLATIONS

Behaviours worth knowing

MIT, Inandu SAS.