View as Markdown

API reference

@salmonui/pivot-table/engine

64 exported symbols: 11 functions, 2 classes, 30 interfaces, 18 types and 3 constants. Each name links its page with the signature, docs and members.

import { … } from '@salmonui/pivot-table/engine';

Functions

  • compileFormulaCompiles a calculated field formula. fields are the source field names a reference may name (an empty list accepts any field). Throws PivotFormulaError with th…
  • computePivotOne-shot compute (SSR, servers).
  • createPivotEngine
  • createPivotJobA resumable compute for time slicing on the main thread or a Worker.
  • createPivotWorkerEngine
  • headersInHeader nodes (any depth) whose span overlaps [start, end), outer levels first per branch.
  • measureIdMeasure id of the value field at k (types.ts "Measure ids"): the field, field#aggregate when another value field uses the same field, and field#aggregate#k whe…
  • normalizePivotModelFills every default of a report model. The result is deeply frozen plain JSON; normalizing a normalized model returns an equal model.
  • parseCsvParses CSV text into row objects keyed by the header (quoted fields, escaped quotes, CRLF, BOM).
  • stableStringifyModelKey-sorted JSON of a model with its default-valued fields omitted (stable cache and URL key).
  • windowOfComputes one window of a result (used by the worker and by in-process hosts).

Classes

Interfaces

Types

Constants

  • DEFAULT_PIVOT_MODELThe normalized default model: every field present, nothing placed.
  • matchesValueOperatorWhether a pivot value operator matches (conditional formats reuse it).
  • plainHeaderA header node without children (plain JSON, never materializes the subtree).