Pivot
For calculation input policies, defaults, execution pins, count meanings and numeric limits, see Aggregation policies. Signatures below describe the current supported exports; a server capability advertisement does not establish equivalent local/server results.
Module Extensions
Section titled “Module Extensions”PivotSavedViewStorageOptions
Section titled “PivotSavedViewStorageOptions”interface PivotSavedViewStorageOptions { /** Include authenticated user, workspace and report identity. No implicit global scope. */ scope: string; storage: PivotViewStorage}PivotConfigTotals
Section titled “PivotConfigTotals”interface PivotConfigTotals { /** * Show a grand total row and, when column dimensions exist, grand-total value columns. */ grandTotal?: boolean; /** * Show subtotal rows and subtotal value columns for multi-level pivot hierarchies. */ subtotals?: boolean; /** * Disable generated subtotal rows or columns for specific axis fields or * zero-based axis levels while keeping global subtotals enabled. */ disabledSubtotals?: { rows?: PivotSubtotalDisableRule; columns?: PivotSubtotalDisableRule; }; /** * Custom display label for the grand total row or value columns. */ grandTotalLabel?: string; /** * Custom display label for subtotal rows or value columns. */ subtotalLabel?: string; /** * Hide subtotal rows or columns when a branch contains only one * source-backed leaf and the subtotal would duplicate that leaf. */ suppressSingleChildSubtotals?: boolean; /** * Hide the grand-total row when the pivot contains only one source-backed * leaf and the total would duplicate that leaf. */ suppressGrandTotalWhenSingleLeaf?: boolean}PivotColumnLevelConfig
Section titled “PivotColumnLevelConfig”interface PivotColumnLevelConfig { /** * Enable drill-down controls for generated groups at this zero-based level. * Falls back to `columnCollapse.enabled`. */ collapsible?: boolean; /** * Start generated groups at this level collapsed. * Falls back to `columnCollapse.collapsed`. */ collapsed?: boolean; /** * Show the parent subtotal column at this level while global subtotals are enabled. * Explicit level settings take precedence over `totals.disabledSubtotals.columns`. */ subtotal?: boolean; /** Override the subtotal label at this level. */ subtotalLabel?: string; /** * Place the subtotal before or after descendant columns. * Defaults to `before`. */ subtotalPosition?: PivotColumnSubtotalPosition; /** * Ordered value fields to expose in this level's subtotal. * Defaults to every configured Pivot value field. */ subtotalValues?: ColumnProp[]; /** * Enable generated aggregate filters at this level. * Falls back to the value dimension and `columnCollapse.filterable`. */ filterable?: boolean; /** * Enable generated aggregate sorting at this level. * Falls back to the value dimension's `sortable` setting. */ sortable?: boolean}PivotQueryCapabilities
Section titled “PivotQueryCapabilities”Versioned standard transport capabilities. Omitted restrictions preserve the default capability behavior.
interface PivotQueryCapabilities { version: 1; /** Empty means no summaries. Only standard remote identities are supported. */ summaryTypes?: PivotSummaryType[]; /** Per public field ID; intersects the global list. An omitted field inherits the global list. */ summaryTypesByField?: Record<string, PivotSummaryType[]>; /** Allowed public physical row selectors. Omitted is unrestricted; empty forbids row grouping. */ allowedRowFields?: string[]; /** Allowed public physical column selectors. Omitted is unrestricted; empty forbids column grouping. */ allowedColumnFields?: string[]; /** Maximum physical grouping fields; zero disallows grouping on this axis. */ maxRowDepth?: number; maxColumnDepth?: number}HTMLRevoGridElementEventMap (Extended from global)
Section titled “HTMLRevoGridElementEventMap (Extended from global)”interface HTMLRevoGridElementEventMap { [PIVOT_CONTEXT_MENU_COMMAND_EVENT]: PivotContextMenuCommandDetail}HTMLRevoGridElement (Extended from @revolist/revogrid)
Section titled “HTMLRevoGridElement (Extended from @revolist/revogrid)”interface HTMLRevoGridElement { /** * Direct Pivot configuration. */ pivot?: Partial<PivotConfig>}AdditionalData (Extended from @revolist/revogrid)
Section titled “AdditionalData (Extended from @revolist/revogrid)”interface AdditionalData { /** * Legacy additionalData property for Pivot. * @deprecated Use `grid.pivot` instead. * * @example * ```typescript * const grid = document.createElement('revo-grid'); * grid.pivot = { * dimensions: [ * { prop: 'name' }, * { prop: 'age' }, * { prop: 'salary' }, * ], * rows: ['name'], * columns: ['age'], * values: [{ prop: 'salary', aggregator: 'sum' }], * }; * ``` */ pivot?: PivotConfig}Plugin API
Section titled “Plugin API”PivotReportPluginOptions (Extended from index.ts)
Section titled “PivotReportPluginOptions (Extended from index.ts)”Runtime/default migration bindings for a plugin; physical source is grid-owned.
/** Runtime/default migration bindings for a plugin; physical source is grid-owned. */export type PivotReportPluginOptions = Omit<PivotReportMigrationOptions, 'source' | 'runtime'> & { reportVersion?: 2; runtime?: PivotReportRuntimeV2Internal };PivotAuthoringController
Section titled “PivotAuthoringController”Restricted authoring of the attached grid’s existing state owner.
interface PivotAuthoringController { getSnapshot(): PivotAuthoringSnapshot; subscribe(listener: () => void): () => void; dispatch(command: PivotAuthoringCommand): Promise<PivotControllerOutcome>; transaction(commands: readonly PivotAuthoringCommand[]): Promise<PivotControllerOutcome>; undo(): Promise<PivotControllerOutcome>; redo(): Promise<PivotControllerOutcome>; reset(): Promise<PivotControllerOutcome>; cancel(): void}PivotAuthoringCommand
Section titled “PivotAuthoringCommand”Report replacement must use PivotPlugin.importPivotReport’s version/runtime admission.
/** Report replacement must use PivotPlugin.importPivotReport's version/runtime admission. */export type PivotAuthoringCommand = Exclude<PivotCommand, { type: 'report.replace' }>;PivotAuthoringSnapshot
Section titled “PivotAuthoringSnapshot”export type PivotAuthoringSnapshot = Readonly<Pick<PivotControllerSnapshot, 'revision' | 'report' | 'pendingReport' | 'canUndo' | 'canRedo' | 'error' | 'hasTransientContributions'> & { status: PivotControllerSnapshot['status'] | 'inactive' | 'destroyed' }>;createPivotReportFromConfig
Section titled “createPivotReportFromConfig”Convert current runtime configuration without dropping callbacks or live edits.
export function createPivotReportFromConfig( config: Partial<PivotConfig>, options: PivotReportMigrationOptions = {},): PivotReport;migratePivotReport
Section titled “migratePivotReport”One strict dispatcher for portable reports and the established legacy envelopes.
export function migratePivotReport( input: unknown, options: PivotReportMigrationOptions = {},): PivotReport;PivotReportMigrationOptions
Section titled “PivotReportMigrationOptions”interface PivotReportMigrationOptions { runtime?: PivotReportRuntime; /** Selects the actual typed physical property in config, including remapped properties. */ fieldIds?: readonly { sourceProp: ColumnProp; fieldId: string }[]; measureIds?: readonly { valueIndex: number; measureId: string }[]; bindings?: PivotReport['bindings']; runtimeColumns?: readonly { sourceProp: ColumnProp; bindingId: string }[]; runtimeAggregators?: readonly { sourceProp: ColumnProp; aggregator: string; bindingId: string; }[]; placeholderBindingId?: string; source?: readonly DataType[]; extensions?: PivotReport['extensions']}validatePivotReport
Section titled “validatePivotReport”Omitted options preserve the strict v1 public boundary.
export function validatePivotReport(value: unknown): PivotReport;;upgradePivotReport
Section titled “upgradePivotReport”Explicit, pure version conversion; it does not compile or execute v2 fields.
export function upgradePivotReport(input: PivotReport): PivotReportV2;serializePivotReport
Section titled “serializePivotReport”export function serializePivotReport(report: PivotReportDocument): string;parsePivotReport
Section titled “parsePivotReport”export function parsePivotReport(json: string): PivotReport;;compilePivotReport
Section titled “compilePivotReport”Resolve application-owned bindings and translate stable report identities into the existing PivotConfig. This does not execute a query or create a controller.
export function compilePivotReport(input: PivotReport, runtime?: PivotReportRuntime): CompiledPivotReport;;PivotReportError
Section titled “PivotReportError”class PivotReportError {}buildPivotAnalyticalView
Section titled “buildPivotAnalyticalView”Build an isolated native model. Source must already satisfy captured Core source predicates.
export function buildPivotAnalyticalView( source: readonly DataType[], base: Partial<PivotConfig>, request: PivotAnalyticalViewRequest, signal?: AbortSignal,): PivotAnalyticalView;parsePivotAnalyticalQuery
Section titled “parsePivotAnalyticalQuery”Own the serializable query. Config-aware validation resolves physical fields and measure identities.
export function parsePivotAnalyticalQuery( value: unknown, config?: Partial<PivotConfig>,): PivotAnalyticalQuery | undefined;resolvePivotAnalyticalMeasure
Section titled “resolvePivotAnalyticalMeasure”export function resolvePivotAnalyticalMeasure( config: Partial<PivotConfig>, measure: PivotAnalyticalMeasureSelection,): { value: PivotConfigValue; valueIndex: number };PivotAnalyticalMeasureSelection
Section titled “PivotAnalyticalMeasureSelection”interface PivotAnalyticalMeasureSelection { prop: ColumnProp; aggregator: string; id?: string; valueIndex?: number}PivotAnalyticalSort
Section titled “PivotAnalyticalSort”export type PivotAnalyticalSort = | { by: 'member'; direction: 'asc' | 'desc' } | { by: 'measure'; direction: 'asc' | 'desc'; measure: PivotAnalyticalMeasureSelection; };PivotAnalyticalQuery
Section titled “PivotAnalyticalQuery”interface PivotAnalyticalQuery { slice?: { rows?: ColumnProp[]; columns?: ColumnProp[]; measures?: PivotAnalyticalMeasureSelection[]; }; filters?: PivotFilterSelectionMap; sort?: PivotAnalyticalSort; topBottom?: { direction: 'top' | 'bottom'; count: number; measure: PivotAnalyticalMeasureSelection; otherLabel?: string; }}PivotAnalyticalQueryUnsupportedReason
Section titled “PivotAnalyticalQueryUnsupportedReason”export type PivotAnalyticalQueryUnsupportedReason = | 'inactive' | 'server' | 'baseTopBottom' | 'resultFilters' | 'opaqueCoreFilters';PivotAnalyticalQueryCapability
Section titled “PivotAnalyticalQueryCapability”interface PivotAnalyticalQueryCapability { supported: boolean; reasons: PivotAnalyticalQueryUnsupportedReason[]}PivotAnalyticalViewRequest
Section titled “PivotAnalyticalViewRequest”interface PivotAnalyticalViewRequest { revision: number; query: PivotAnalyticalQuery; rowPath?: PivotPath; columnPath?: PivotPath; limits?: { maxCategories?: number; maxSeries?: number; maxDataPoints?: number; }}PivotAnalyticalSyntheticMember
Section titled “PivotAnalyticalSyntheticMember”interface PivotAnalyticalSyntheticMember { axis: 'row'; path: PivotPath; kind: 'other'}PivotAnalyticalQueryResult
Section titled “PivotAnalyticalQueryResult”export type PivotAnalyticalQueryResult = PivotAnalyticalView;PivotAnalyticalView
Section titled “PivotAnalyticalView”interface PivotAnalyticalView { query: PivotAnalyticalQuery; snapshot: PivotRuntimeSnapshot; slice?: PivotSemanticSlice; syntheticMembers: readonly PivotAnalyticalSyntheticMember[]; queryDistributions( cells: PivotSourceDistributionCell[], maxSamples: number, context?: { signal?: AbortSignal }, ): Promise<PivotSourceDistributionsResponse>}PivotMemberPredicate
Section titled “PivotMemberPredicate”interface PivotMemberPredicate { field: ColumnProp; value: PivotFilterScalar}PivotMemberFilterContributionRequest
Section titled “PivotMemberFilterContributionRequest”interface PivotMemberFilterContributionRequest { ownerId: string; revision: number; tuples: PivotMemberPredicate[][]}PivotMemberFilterContributionResult
Section titled “PivotMemberFilterContributionResult”interface PivotMemberFilterContributionResult { /** Refresh outcome. Lifecycle disposal retires ownership even when refresh * fails or is cancelled; revision still identifies the last committed view. */ status: 'committed' | 'prevented' | 'cancelled' | 'failed'; revision: number; error?: Error}PIVOT_STATE_JSON_KIND
Section titled “PIVOT_STATE_JSON_KIND”PIVOT_STATE_JSON_KIND: string;PIVOT_STATE_JSON_VERSION
Section titled “PIVOT_STATE_JSON_VERSION”PIVOT_STATE_JSON_VERSION: 1;serializePivotStateJson
Section titled “serializePivotStateJson”export function serializePivotStateJson( config: Partial<PivotConfig>, options: PivotStateJsonOptions = {},): string;createSerializablePivotConfig
Section titled “createSerializablePivotConfig”Legacy lossy projection: removes runtime-only and unsupported values, including callbacks and cyclic branches. This is not a portable report specification; callers must reattach runtime behavior separately before using projected state.
export function createSerializablePivotConfig( config: Partial<PivotConfig>,): Partial<PivotConfig>;createPivotStateJsonEnvelope
Section titled “createPivotStateJsonEnvelope”export function createPivotStateJsonEnvelope( config: Partial<PivotConfig>, options: PivotStateJsonOptions = {},): PivotStateJsonEnvelope;parsePivotStateJson
Section titled “parsePivotStateJson”export function parsePivotStateJson(json: string): Partial<PivotConfig>;parsePivotStateJsonEnvelope
Section titled “parsePivotStateJsonEnvelope”export function parsePivotStateJsonEnvelope(json: string): PivotStateJsonEnvelope;stableJsonStringify
Section titled “stableJsonStringify”export function stableJsonStringify(value: unknown): string;PivotStateJsonEnvelope
Section titled “PivotStateJsonEnvelope”interface PivotStateJsonEnvelope { kind: typeof PIVOT_STATE_JSON_KIND; version: typeof PIVOT_STATE_JSON_VERSION; config: Partial<PivotConfig>; exportedAt?: string}PivotStateJsonOptions
Section titled “PivotStateJsonOptions”interface PivotStateJsonOptions { /** * Timestamp to include in the exported state. Omit it for deterministic JSON * without a time field. */ exportedAt?: string | Date; /** * Adds an export timestamp generated by this callback when `exportedAt` is * not provided. This keeps tests deterministic without mocking Date. */ now?: () => string | Date}PivotSourceDistributionLimitError
Section titled “PivotSourceDistributionLimitError”A bounded source query cannot return every requested observation.
class PivotSourceDistributionLimitError {}isPivotSourceDistributionMeasureAvailable
Section titled “isPivotSourceDistributionMeasureAvailable”Whether a configured measure has transaction-level numeric sample semantics.
export function isPivotSourceDistributionMeasureAvailable( config: Partial<PivotConfig>, measure: PivotSourceDistributionCell['measure'],): boolean;queryPivotSourceDistributions
Section titled “queryPivotSourceDistributions”Reads original transactions once; requested row/column prefixes are indexed before scanning. Work is O(source × row depth × column depth + emitted samples), rather than a source scan for every requested cell. No indexes persist after the query and the caller’s source is never changed.
export function queryPivotSourceDistributions( source: readonly DataType[], config: Partial<PivotConfig>, request: Pick<PivotSourceDistributionsRequest, 'cells' | 'maxSamples'> & { signal?: AbortSignal },): Pick<PivotSourceDistributionsResponse, 'cells'>;PivotSourceDistributionCell
Section titled “PivotSourceDistributionCell”One raw-measure distribution scoped to a semantic Pivot cell.
interface PivotSourceDistributionCell { id: string; rowPath: PivotPath; columnPath: PivotPath; measure: { prop: ColumnProp; aggregator: string; id?: string; valueIndex?: number }}PivotSourceDistributionsRequest
Section titled “PivotSourceDistributionsRequest”interface PivotSourceDistributionsRequest { revision: number; cells: PivotSourceDistributionCell[]; /** Bound across all returned samples, including overlapping scopes. Default 100,000. */ maxSamples?: number}PivotSourceDistributionResult
Section titled “PivotSourceDistributionResult”interface PivotSourceDistributionResult { id: string; samples: number[]; /** Post-aggregation calculations have no equivalent transaction-level samples. */ unavailableReason?: 'calculatedMeasure'}PivotSourceDistributionsResponse
Section titled “PivotSourceDistributionsResponse”interface PivotSourceDistributionsResponse { revision: number; cells: PivotSourceDistributionResult[]}PivotPlugin
Section titled “PivotPlugin”The PivotPlugin is a RevoGrid plugin that enables dynamic creation and manipulation of pivot table structures within the grid. It provides users with the ability to configure and apply pivot transformations on grid data for enhanced reporting and analysis.
Key Features:
- Configurable Pivot Table – Allows users to define row, column, and value fields dynamically.
- Interactive Configurator – Integrates a pivot configurator panel to modify pivot settings in real-time.
- Drag-and-Drop Support – Enables users to rearrange fields via the configurator for a flexible pivot experience.
- Efficient Data Transformation – Utilizes optimized data processing to group and aggregate large datasets.
- Custom Aggregations – Supports multiple aggregation functions, including
sum,count,avg,min, andmax. - Dynamic Theme Adaptation – Adjusts automatically to the applied RevoGrid theme.
- State Persistence – Observes direct
grid.pivotand legacyadditionalData.pivotconfiguration updates.
Usage:
- Instantiate the PivotPlugin in a RevoGrid instance and define a pivot configuration.
- Use
applyPivotto generate a pivoted grid based on selected row, column, and value fields. - Modify the pivot structure using the interactive configurator.
- Call
clearPivotto restore the original grid state.
Example
Section titled “Example”import { PivotPlugin } from '@revolist/pivot';
const grid = document.createElement('revo-grid');grid.plugins = [PivotPlugin];
grid.pivot = { dimensions: [{ prop: 'Age' }, { prop: 'City' }, { prop: 'Gender' }, { prop: 'Total Spend' }], rows: ['City', 'Age'], columns: ['Gender'], values: [ { prop: 'Total Spend', aggregator: 'sum' }, ], hasConfigurator: true,};This plugin is essential for users who require advanced pivot table functionalities within RevoGrid, offering comprehensive tools for data transformation and visualization.
Dependencies
Section titled “Dependencies”- Required
CorePlugin,PIVOT_CFG_UPDATE_EVENT,LOADER_EVENT: Uses Pro plugin infrastructure and events for lifecycle and loading state. - Config integration
direct-pivot-config: Reads direct pivot configuration from grid.pivot. - Config integration
additionalData.pivot: Reads legacy pivot configuration from additionalData.pivot. - Optional
sorting-capable-plugin: Integrates with sorting state when present for field panel and remote sorting. - Optional
pagination-capable-plugin: Integrates with pagination when present for remote pivot paging. - Auto-installed
ContextMenuPlugin,PivotContextMenuPlugin,TooltipPlugin: Installs the shared tooltip and context-menu infrastructure plus the Pivot-semantic menu workspace. - Event integration
groupexpandclick,column-collapse,column-expand,beforefilterapply,beforefilteroptionsourcerow,beforesortingapply: Listens to grid events to synchronize drill-down, collapsed groups, filter option rows, and server-mode requests.
class PivotPlugin { /** Opens an existing mounted editor; true acknowledges UI scheduling, never Save. */ requestPivotEditor(request: PivotEditorRequest): boolean;
/** Stable, restricted authoring facade for this attached grid's existing owner. */ getAuthoringController(): PivotAuthoringController;
/** * Returns the last successfully committed Pivot model. * * A pending or failed remote load never replaces the previous snapshot. * Returned arrays and records are read-only references to the active Pivot * model rather than defensive copies. */ getRuntimeSnapshot(): PivotRuntimeSnapshot | null;
/** Current logical visible report, with raw aggregate values and grouped headers. * Suitable for the CSV/XLSX writers and printable tables; detached from grid stores. */ getVisibleExportData();
/** CSV of the current visible report, including resolved group aggregates and pinned totals. */ exportCsv(options: PivotCsvExportOptions = {}): string;
/** XLSX of the current visible report, retaining numeric precision and grouped headers. */ exportXlsx(): Uint8Array;
/** Complete filtered server report, from one atomic snapshot at export time. * The backend must authorize the request and reject unsupported layout semantics. */ async exportFullReport(format: 'csv' | 'xlsx', options: PivotFullExportContext & { limits?: Partial<PivotFullExportLimits> } = {}): Promise<PivotFullExportResult>;
/** Escaped HTML table with configured measure display formats for application-owned print/PDF flows. */ buildPrintTable(): string;
/** Returns the unprojected source owned by the active client Pivot session. */ getPivotOriginalSource();
/** Queries bounded raw numeric observations from the committed client Pivot scope. */ async querySourceDistributions( request: PivotSourceDistributionsRequest, context: { signal?: AbortSignal } = {}, ): Promise<PivotSourceDistributionsResponse>;
/** Reports whether isolated source shaping can preserve the current filter context exactly. */ getAnalyticalQueryCapability(): PivotAnalyticalQueryCapability;
/** Reads an isolated analytical model without changing Pivot/Grid state or installing filter owners. */ async queryAnalyticalView(request: PivotAnalyticalViewRequest, context: { signal?: AbortSignal } = {}): Promise<PivotAnalyticalView>;
getPivotEngineCapabilities(): PivotEngineCapabilities;
/** Configure future detail dialogs with full grid properties and lifecycle callbacks. */ setDrillThroughOptions(options: import('./context-menu').PivotDrillThroughOptions): void;
/** Access the currently open detail grid and its column visibility/update APIs. */ getDrillThroughDialog(): import('./context-menu').PivotDrillThroughDialog | undefined;
async loadPivotFilterValues(input: { field: PivotSourceSelector; search?: string; offset: number; limit: number; signal?: AbortSignal; }): Promise<PivotFilterValuesResponse>;
async loadPivotDrilldown(input: { cell: PivotDrilldownCellRef; customColumns?: string[]; offset: number; limit: number; signal?: AbortSignal; }): Promise<PivotDrilldownResponse>;
/** Whether an owner currently contributes a committed native member filter. */ hasMemberFilterContribution(ownerId: string): boolean;
async applyMemberFilterContribution( request: PivotMemberFilterContributionRequest, context: { signal?: AbortSignal } = {}, ): Promise<PivotMemberFilterContributionResult>;
async disposeMemberFilterContribution(ownerId: string): Promise<PivotMemberFilterContributionResult>;
/** Applies one preventable authoring candidate through the active controller. */ async updatePivotConfig(nextConfig: Partial<PivotConfig>): Promise<boolean>;
/** Attach scoped durable saved views to the stock configurator; omit to return to session views. */ setSavedViewStorage(options?: PivotSavedViewStorageOptions): void;
/** Replaces report defaults without applying or executing a Pivot. */ setPivotReportRuntime(options: PivotReportPluginOptions): void;
/** Derives a portable report from the current accepted configuration. */ getPivotReport(options?: PivotReportPluginOptions): PivotReportDocument;
/** Serializes current live state; runtime callbacks remain explicit bindings. */ exportPivotReportJson(options?: PivotReportPluginOptions): string;
/** Preflights a portable/legacy report, then applies one preventable update. */ async importPivotReport(input: unknown, options?: PivotReportPluginOptions, context: { signal?: AbortSignal } = {}): Promise<boolean>;
/** Applies an explicit menu sorting state for a field or generated value column. */ async setPivotSorting( prop: ColumnProp, order?: 'asc' | 'desc', measure?: PivotMeasureMeta, ): Promise<void>;
/** * Returns the immediate row-hierarchy children for one committed client * Pivot scope. The query only reads the aggregate index built during apply. */ async querySemanticSlice( request: PivotSemanticSliceRequest, context: { signal?: AbortSignal } = {}, ): Promise<PivotSemanticSlice>;
/** * Applies a chart-owned semantic drill frontier to Pivot expansion state. * The operation uses the same config path for client and server engines, so * model revisions and cancellation remain observable through normal Pivot * lifecycle events. */ async synchronizeChartDrill( detail: { from: { active: { row: { path: PivotPath }; column: { path: PivotPath } }; }; to: { active: { row: { path: PivotPath }; column: { path: PivotPath } }; }; }, context: { signal?: AbortSignal } = {}, ): Promise<void>;
updateConfigurator(config?: Partial<PivotConfig>);
updateFieldPanel(config?: Partial<PivotConfig>, resizedColumns?: ColumnResizeDetail);
/** * Applies either the client or remote Pivot engine based on configuration. */ applyPivot(config?: Partial<PivotConfig>);
/** * Clears managed Pivot state and restores the original grid payload. */ clearPivot();}createPivotWeightedAverage
Section titled “createPivotWeightedAverage”Paired finite-number weighted average. Dependencies must resolve to finite numbers or null.
export function createPivotWeightedAverage(options: { id: string; valueFieldId: string; weightFieldId: string; label?: string;}): { fields: PivotReportFieldV2[]; measures: PivotReportMeasure[] };createBrowserPivotViewStorage
Section titled “createBrowserPivotViewStorage”Browser storage writes use the same origin-wide Web Lock in every participating tab.
export function createBrowserPivotViewStorage(): PivotViewStorage;PivotViewStorage
Section titled “PivotViewStorage”Storage must atomically compare the complete previous value before replacing it, and honor abort before commit. A previously committed write cannot be undone.
interface PivotViewStorage { read(scope: string, signal: AbortSignal): Promise<string | null>; compareAndSwap(scope: string, expected: string | null, next: string, signal: AbortSignal): Promise<boolean>}PIVOT_VALUES_AXIS_FIELD
Section titled “PIVOT_VALUES_AXIS_FIELD”PIVOT_VALUES_AXIS_FIELD: string;PivotAxisField
Section titled “PivotAxisField”export type PivotAxisField = ColumnProp | typeof PIVOT_VALUES_AXIS_FIELD;PivotConfigValue
Section titled “PivotConfigValue”interface PivotConfigValue { /** Optional stable identity when the same source field is configured more than once. */ id?: string; /** Source field used as the measure carrier. */ prop: ColumnProp; /** Aggregator id resolved from the matching dimension definition. */ aggregator: string; /** Optional independent operations at intermediate and grand-total coordinates. */ summaries?: { group?: string; total?: string }; /** Optional display label used for generated measure row and column labels. */ label?: string; /** Optional display name used when label is not provided. */ name?: string; /** Optional post-aggregation analytical calculation. */ calculation?: PivotValueCalculation; /** Optional Intl-backed display formatting. */ format?: PivotValueFormatConfig; /** Optional measure-wide conditional formatting. */ conditionalFormatting?: { match?: 'first' | 'all'; rules: PivotConditionalFormatRule[]; }}PivotSubtotalDisableRule
Section titled “PivotSubtotalDisableRule”interface PivotSubtotalDisableRule { /** Axis fields whose generated subtotal should be skipped. */ fields?: ColumnProp[]; /** Zero-based axis levels whose generated subtotal should be skipped. */ levels?: number[]}PivotColumnCollapseConfig
Section titled “PivotColumnCollapseConfig”interface PivotColumnCollapseConfig { /** * Enable collapse for generated Pivot column groups. */ enabled?: boolean; /** * Start all generated Pivot column groups collapsed or expanded by default. * Defaults to `true` when column collapse is enabled. * Persisted group-specific state in `collapsedColumns` still takes precedence. */ collapsed?: boolean; /** * Show aggregate filters on collapsed columns and their expanded group * headers. Defaults to `true`. * * This does not affect ordinary filters on expanded leaf value columns. */ filterable?: boolean; /** * Override the aggregator used for collapsed placeholder buckets. * A string applies to every value field, while a record can target a specific value prop. */ aggregator?: string | Partial<Record<string, string>>; /** * Override the generated placeholder header or cell template used for collapsed groups. */ placeholder?: string | ColumnTemplateFunc | ColumnCollapsePlaceholder}PivotColumnSubtotalPosition
Section titled “PivotColumnSubtotalPosition”export type PivotColumnSubtotalPosition = 'before' | 'after';PivotGroupLabelConfig
Section titled “PivotGroupLabelConfig”interface PivotGroupLabelConfig { /** Display label for empty-string row and column group members. */ empty?: string; /** Display label for null or undefined row and column group members. */ null?: string}PivotGroupLabelColumnMode
Section titled “PivotGroupLabelColumnMode”export type PivotGroupLabelColumnMode = 'grouped' | 'firstVisible';PivotRowAxisLayout
Section titled “PivotRowAxisLayout”export type PivotRowAxisLayout = 'compact' | 'tabular';PivotFieldPanelTexts (Extended from index.ts)
Section titled “PivotFieldPanelTexts (Extended from index.ts)”interface PivotFieldPanelTexts {
}PivotFieldPanelConfig
Section titled “PivotFieldPanelConfig”interface PivotFieldPanelConfig { /** Shows the in-grid Pivot field panel. */ visible?: boolean; /** Shows the Reset layout action in Pivot configuration UI. Hidden by default. */ showResetLayout?: boolean; /** Enables drag-and-drop field movement between panel areas. */ allowFieldDragging?: boolean; /** Shows non-drag Add field, Actions and Clear controls. Enabled by default. */ allowFieldActions?: boolean; /** Shows field Remove and Clear controls. Defaults to true in the full configurator and false in the compact panel. */ allowFieldRemoving?: boolean; /** Shows the Rows area. */ showRowFields?: boolean; /** Shows the Columns area. */ showColumnFields?: boolean; /** Shows the Values/Data area. */ showDataFields?: boolean; /** Shows the Filters area. */ showFilterFields?: boolean; /** UI strings for the field panel. */ texts?: PivotFieldPanelTexts}PanelType
Section titled “PanelType”The type of the panel
/** The type of the panel */export type PanelType = 'dimensions' | 'rows' | 'columns' | 'values' | 'filters';PivotFilterScalar
Section titled “PivotFilterScalar”export type PivotFilterScalar = string | number | boolean | null;PivotFilterExclusionSelection
Section titled “PivotFilterExclusionSelection”Selects every value except the explicitly excluded members.
interface PivotFilterExclusionSelection { mode: 'exclude'; values: PivotFilterScalar[]}PivotFilterSelection
Section titled “PivotFilterSelection”Arrays retain the original inclusive-selection contract.
/** Arrays retain the original inclusive-selection contract. */export type PivotFilterSelection = | PivotFilterScalar[] | PivotFilterExclusionSelection;PivotFilterSelectionMap
Section titled “PivotFilterSelectionMap”export type PivotFilterSelectionMap = Partial<Record<string, PivotFilterSelection>>;PivotConfigDimension (Extended from index.ts)
Section titled “PivotConfigDimension (Extended from index.ts)”interface PivotConfigDimension { prop: ColumnProp; /** Descriptive metadata only; does not infer, coerce or format source values. */ dataType?: PivotFieldDataType; /** Permitted authoring placements. Omitted means all; [] means none. Not authorization. */ allowedRoles?: PivotFieldRole[]; /** Preferred destination when the field is enabled through configurator selection. */ selectionTarget?: 'rows' | 'columns' | 'values'; /** Optional group label or nested group path used to organize the configurator dimensions grid. */ fieldGroup?: string | string[]; /** Optional field description shown by Pivot configuration UI. */ description?: string; /** Hides the field from Pivot field-list helpers unless show-hidden mode is enabled. */ hidden?: boolean; /** * Custom aggregators or use common aggregators */ aggregators?: { [name: string]: ((values: any[]) => any) }; /** Values offered by the inline selector when this field is in Filters. */ filterOptions?: PivotFilterScalar[]; /** * Aggregator value for the column * set automatically */ readonly aggregator?: string; /** * The type of the dimension: rows, values * set automatically */ readonly dimension?: PanelType}PivotConfig
Section titled “PivotConfig”interface PivotConfig { /** Pin aggregate meaning to local policies or the host server contract. * A mismatching execution engine is rejected; this never changes null/coercion policies. * Omit only for compatibility with existing unpinned configurations. */ aggregationSemantics?: 'local' | 'server'; dimensions?: PivotConfigDimension[]; /** Ordered row dimensions used to build the pivot row hierarchy. */ rows: ColumnProp[]; /** Ordered column dimensions used to build generated pivot headers. */ columns?: ColumnProp[]; /** Measures rendered in the generated pivot cells. */ values: PivotConfigValue[]; /** Ordered filter fields shown in the Pivot field panel. */ filters?: ColumnProp[]; /** * Canonical member selections for fields placed in Rows, Columns, or * Filters. Missing/empty entries mean All. */ filterSelections?: PivotFilterSelectionMap; /** * Semantic post-aggregation filters for generated measures and totals. * * Member filters remain in `filterSelections` and execute before * aggregation. Result filters execute after aggregation (SQL HAVING). */ resultFilters?: PivotAggregateFilterExpression; /** * Client-side member ranking on the first row field. Ranking uses the selected * configured measure over all column members after ordinary member filters. * Unselected members are omitted unless `otherLabel` groups them into Other. */ topBottom?: { direction: 'top' | 'bottom'; count: number; /** Zero-based index into `values`, so duplicate source measures are unambiguous. */ valueIndex: number; /** Optional label for the aggregate of unselected members. */ otherLabel?: string; }; /** Enables the configurator side panel. */ hasConfigurator?: boolean; /** Configures the in-grid Pivot field panel. */ fieldPanel?: PivotFieldPanelConfig; /** Advanced semantic Pivot context menu, enabled by default. */ contextMenu?: false | PivotContextMenuConfig; /** Optional external mount target for the configurator. */ mountTo?: HTMLElement; /** Flattens hierarchical column groups into single-label headers. */ flatHeaders?: boolean; /** Merges generated value headers into the terminal Pivot column headers. */ mergeValueHeaders?: boolean; /** * Render Pivot value measures as row members instead of generated value columns. */ valuesOnRows?: boolean; /** * Advanced row hierarchy order. Use `$values` to place the measure pseudo-field * at a specific position in the row tree. */ rowTree?: PivotAxisField[]; /** * Controls how an active multi-level row hierarchy is rendered. * `compact` uses one generated Rows column, while `tabular` keeps one * visible column per row field. Active drill-down defaults to `compact`. */ rowAxisLayout?: PivotRowAxisLayout; /** * Shows generated row group headers (default true). In `tabular` mode, false * shows all detail rows with repeated row labels, ignoring collapsed/expanded * state. Explicit subtotal and grand-total settings still apply. * Ignored in compact mode. */ showRowGroupHeaders?: boolean; /** Shows the legacy configurator columns zone. */ showColumns?: boolean; /** Shows the legacy configurator rows zone. */ showRows?: boolean; /** Shows the legacy configurator values zone. */ showValues?: boolean; /** Shows the legacy configurator filters zone. */ showFilters?: boolean; /** Configures grand totals and subtotals. */ totals?: PivotConfigTotals; /** Configures display labels for empty or null row and column group members. */ groupLabels?: PivotGroupLabelConfig; /** * Chooses which visible row cell renders the grouped-row label text. * `grouped` keeps label text in the grouped field column. * `firstVisible` renders label text in the first currently visible row cell. */ groupLabelColumn?: PivotGroupLabelColumnMode; /** * Enable Pivot drill-down based on the current row hierarchy. * `true` starts collapsed, `false` starts expanded. * The feature is only applied when at least two row fields are configured. */ collapsed?: boolean; /** * Persisted expand state for Pivot drill-down groups. * Legacy keys use comma-joined grouped paths. New typed keys require expandedKeyEncoding. * With `collapsed: false`, set a group to `false` to close it while other * groups remain expanded by default. */ expanded?: Record<string, boolean>; /** Typed expansion keys authored by createPivotExpandedPathKey. Absent means legacy comma keys. */ expandedKeyEncoding?: 'semantic-v1'; /** * Render aggregate values inside Pivot drill-down group rows. * The initial implementation applies to the client-side Pivot path. */ groupAggregations?: boolean; /** * Configure built-in column drill-down on generated Pivot groups. * Omit this option or use `true` to start collapsible groups collapsed. * Use `false` or `{ enabled: false }` to disable column drill-down. * `{ collapsed: false }` explicitly starts them expanded. */ columnCollapse?: boolean | PivotColumnCollapseConfig; /** * Per-level generated column behavior keyed by zero-based index in `columns`. * Global collapse, totals, filter, and sorting settings remain the defaults. */ columnLevels?: Partial<Record<number, PivotColumnLevelConfig>>; /** * Initial or persisted collapsed state for generated pivot column groups. * `true` collapses all generated groups by default. */ collapsedColumns?: boolean | Record<string, boolean>; /** * Replace configurator labels, tooltips, accessibility text and message templates. * Partial dictionaries and nested label maps retain English defaults. * Field captions, group names, member data and saved-view names remain application data. * Use diagnosticMessage to translate supplied engine/host diagnostics. */ i18n?: PivotConfigLocaleInput; /** * Optional engine selection. Omit it to keep the existing in-memory pivot behaviour. * Server mode uses the same row/column/value configuration but delegates computation * through an adapter or remote store. */ engine?: { mode?: 'client' | 'server'; /** Opt-in cooperative local work; host must provide a stable source revision lease. */ localExecution?: import('./pivot.work').PivotLocalExecutionOptions; adapter?: PivotEngineAdapter; remoteStore?: PivotRemoteStore; /** Explicit feature advertisement used by analytical UI commands. */ capabilities?: PivotEngineCapabilities; viewId?: string; fieldsVersion?: string; rowAxis?: Partial<PivotAxisViewport>; columnAxis?: Partial<PivotAxisViewport>; }}PivotLocalExecutionOptions
Section titled “PivotLocalExecutionOptions”Runtime-only scheduling policy. Never stored in a portable report.
interface PivotLocalExecutionOptions { mode: 'cooperative'; /** Maximum target time between task yields; default 8ms, greater than zero and at most 50ms. * An individual opaque application callback cannot be preempted. */ budgetMs?: number; /** Host-owned revision. Advance BEFORE mutating source membership or values. * Keep the source stable until the operation settles. Unknown in-place writes * cannot be detected, and application records are never frozen or deep-cloned. */ sourceRevision: () => unknown}isPivotFieldRoleAllowed
Section titled “isPivotFieldRoleAllowed”Omitted restrictions permit every placement; an empty list permits none.
export function isPivotFieldRoleAllowed( field: Pick<PivotFieldPolicy, 'allowedRoles'>, role: PivotFieldRole,): boolean;getPreferredPivotFieldRole
Section titled “getPreferredPivotFieldRole”Checkbox destinations omit filters; never rewrite an authored selection hint.
export function getPreferredPivotFieldRole( field: PivotFieldPolicy,): Exclude<PivotFieldRole, 'filters'> | undefined;PivotFieldRole
Section titled “PivotFieldRole”Authoring placement policy, independent of filtering and backend authorization.
/** Authoring placement policy, independent of filtering and backend authorization. */export type PivotFieldRole = 'rows' | 'columns' | 'values' | 'filters';createPivotController
Section titled “createPivotController”A Pivot state owner backed by the existing analytical engine, without a grid.
export function createPivotController(options: PivotControllerOptions): PivotController;;PivotControllerOptions (Extended from index.ts)
Section titled “PivotControllerOptions (Extended from index.ts)”export type PivotControllerOptions = PivotControllerCommonOptions & { report: PivotReport; reportVersion?: never; runtime?: PivotReportRuntime };PivotControllerOptionsV2 (Extended from index.ts)
Section titled “PivotControllerOptionsV2 (Extended from index.ts)”export type PivotControllerOptionsV2 = PivotControllerCommonOptions & { report: PivotReportDocument; reportVersion: 2; runtime?: PivotReportRuntimeV2 };PivotCommand
Section titled “PivotCommand”Command payloads follow the admitted report version; default callers retain V1.
/** Command payloads follow the admitted report version; default callers retain V1. */export type PivotCommand<TReport extends PivotReportDocument = PivotReport> = | Exclude<import('./controller/pivot.controller.types').PivotCommand, { type: 'report.replace' | 'field.configure' | 'resultFilters.replace' }> | { type: 'report.replace'; report: TReport } | { type: 'resultFilters.replace'; filters?: TReport['resultFilters'] } | { type: 'field.configure'; fieldId: string; patch?: Partial<PivotCommandFieldSettings<TReport>>; unset?: readonly (keyof PivotCommandFieldSettings<TReport>)[]; };PivotControllerSessionReport (Extended from index.ts)
Section titled “PivotControllerSessionReport (Extended from index.ts)”export type PivotControllerSessionReport<TReport extends PivotReportDocument = PivotReport> = Omit<import('./controller/pivot.controller.types').PivotControllerSessionReport, 'specification'> & { readonly specification: import('./controller/pivot.controller.types').PivotControllerReadonly<TReport> };PivotControllerSnapshot (Extended from index.ts)
Section titled “PivotControllerSnapshot (Extended from index.ts)”export type PivotControllerSnapshot<TReport extends PivotReportDocument = PivotReport> = Omit<import('./controller/pivot.controller.types').PivotControllerSnapshot, 'report' | 'pendingReport'> & { readonly report: PivotControllerSessionReport<TReport> | null; readonly pendingReport: PivotControllerSessionReport<TReport> | null };PivotController (Extended from index.ts)
Section titled “PivotController (Extended from index.ts)”export type PivotController<TReport extends PivotReportDocument = PivotReport> = Omit<InternalPublicController, 'getReport' | 'getSnapshot' | 'replaceReport' | 'dispatch' | 'transaction' | 'replaceRuntime'> & { replaceRuntime(runtime: TReport extends PivotReport ? PivotReportRuntime : PivotReportRuntimeV2): ReturnType<InternalPublicController['replaceRuntime']>; getReport(): TReport; getSnapshot(): PivotControllerSnapshot<TReport>; replaceReport(report: TReport): ReturnType<InternalPublicController['replaceReport']>; dispatch(command: PivotCommand<TReport>): ReturnType<InternalPublicController['dispatch']>; transaction(commands: readonly PivotCommand<TReport>[]): ReturnType<InternalPublicController['transaction']>;};PivotControllerQuery
Section titled “PivotControllerQuery”interface PivotControllerQuery { sourceFilter?: PivotSourceQueryExpression; sort?: readonly PivotQuerySort[]; having?: PivotQueryHavingExpression; rowOffset?: number; rowLimit?: number; columnOffset?: number; columnLimit?: number}PivotFieldSelector
Section titled “PivotFieldSelector”interface PivotFieldSelector { kind: 'field'; fieldId: string}PivotSourceSelector
Section titled “PivotSourceSelector”export type PivotSourceSelector = string | number | PivotFieldSelector;PivotSourceQueryExpression
Section titled “PivotSourceQueryExpression”export type PivotSourceQueryExpression = | [PivotSourceSelector, PivotFilterOperation, PivotFilterValue] | [PivotSourceQueryExpression, 'and' | 'or', PivotSourceQueryExpression] | ['!', PivotSourceQueryExpression];PivotQuerySort
Section titled “PivotQuerySort”interface PivotQuerySort { selector: PivotSourceSelector; desc?: boolean; bySummary?: string}PivotQueryHavingCondition
Section titled “PivotQueryHavingCondition”interface PivotQueryHavingCondition { measureId: string; columnPath: PivotPath; columnKind: PivotAggregateColumnKind; operation: PivotFilterOperation; value: PivotFilterValue}PivotQueryHavingExpression
Section titled “PivotQueryHavingExpression”export type PivotQueryHavingExpression = | PivotQueryHavingCondition | [PivotQueryHavingExpression, 'and' | 'or', PivotQueryHavingExpression] | ['!', PivotQueryHavingExpression];PivotControllerAxis
Section titled “PivotControllerAxis”export type PivotControllerAxis = 'rows' | 'columns' | 'filters';PivotControllerColumn
Section titled “PivotControllerColumn”Only the column containers are owned; custom application properties stay opaque.
/** Only the column containers are owned; custom application properties stay opaque. */export type PivotControllerColumn = | (Readonly<ColumnRegular> & { readonly children?: never }) | (Readonly<Omit<ColumnGrouping, 'children'>> & { readonly children: readonly PivotControllerColumn[]; });PivotControllerError
Section titled “PivotControllerError”interface PivotControllerError { readonly message: string; readonly diagnostics?: readonly Readonly<PivotReportDiagnostic>[]}PivotControllerOutcome
Section titled “PivotControllerOutcome”export type PivotControllerOutcome = | { status: 'committed' | 'noop' | 'prevented' | 'superseded' | 'cancelled'; revision: number; } | { status: 'failed'; revision: number; error: PivotControllerError };PivotControllerView
Section titled “PivotControllerView”interface PivotControllerView { readonly model: { readonly columns: readonly PivotControllerColumn[]; readonly source: readonly Readonly<DataType>[]; readonly pinnedBottomSource: readonly Readonly<DataType>[]; }; readonly groupAggregates: Readonly<Record<string, Readonly<DataType>>>; readonly semanticGroupAggregates: Readonly< Record<string, Readonly<DataType>> >; readonly warnings: readonly string[]}PIVOT_REPORT_KIND
Section titled “PIVOT_REPORT_KIND”PIVOT_REPORT_KIND: string;PIVOT_REPORT_VERSION
Section titled “PIVOT_REPORT_VERSION”PIVOT_REPORT_VERSION: 1;PIVOT_REPORT_VERSION_V2
Section titled “PIVOT_REPORT_VERSION_V2”PIVOT_REPORT_VERSION_V2: 2;PivotReportJson
Section titled “PivotReportJson”export type PivotReportJson = | null | boolean | number | string | PivotReportJson[] | { [key: string]: PivotReportJson };PivotReportColumn
Section titled “PivotReportColumn”Deliberate JSON boundary; Core’s open column index signature is not imported.
interface PivotReportColumn { name?: PivotReportJson; size?: number; minSize?: number; maxSize?: number; pin?: 'colPinStart' | 'colPinEnd'; autoSize?: boolean; readonly?: boolean; editor?: string; filter?: boolean | string | string[]; blankSemantics?: Partial< Record< | 'null' | 'undefined' | 'emptyString' | 'whitespaceOnlyString' | 'emptyArray' | 'missingProperty', boolean > >; sortable?: boolean; order?: 'asc' | 'desc'; rowDrag?: boolean; columnType?: string}PivotReportAggregator
Section titled “PivotReportAggregator”export type PivotReportAggregator = | { id: string; kind: 'builtin'; builtin: string } | { id: string; kind: 'runtime'; bindingId: string };PivotReportField
Section titled “PivotReportField”interface PivotReportField { id: string; sourceProp: ColumnProp; /** Descriptive only; source values and aggregate behavior remain unchanged. */ dataType?: PivotFieldDataType; /** Authoring placement policy, not predicate or backend authorization. */ allowedRoles?: PivotFieldRole[]; column?: PivotReportColumn; selectionTarget?: 'rows' | 'columns' | 'values'; fieldGroup?: string | string[]; description?: string; hidden?: boolean; filterOptions?: (string | number | boolean | null)[]; /** Nonempty lists replace the built-in map, exactly as runtime dimensions do. */ aggregators?: PivotReportAggregator[]; runtimeColumnId?: string}PivotReportCalculation
Section titled “PivotReportCalculation”export type PivotReportCalculation = PortableCalculation<PivotValueCalculation>;PivotReportFormat
Section titled “PivotReportFormat”export type PivotReportFormat = PortableFormat<PivotValueFormatConfig>;PivotReportConditionalRule (Extended from index.ts)
Section titled “PivotReportConditionalRule (Extended from index.ts)”export type PivotReportConditionalRule = Omit< PivotConditionalFormatRule, 'field' | 'class' | 'style' | 'props' | 'value' | 'min' | 'max'> & { /** Literal generated grid property selectors, not source field identities. */ generatedFields?: ColumnProp | ColumnProp[]; value?: PivotReportJson; min?: PivotReportJson; max?: PivotReportJson; class?: string | Record<string, boolean>; style?: string | Record<string, string | number>; props?: Record<string, PivotReportJson>;};PivotReportMeasure
Section titled “PivotReportMeasure”interface PivotReportMeasure { id: string; fieldId: string; aggregator: string; label?: string; name?: string; calculation?: PivotReportCalculation; format?: PivotReportFormat; conditionalFormatting?: { match?: 'first' | 'all'; rules: PivotReportConditionalRule[]; }}PivotReportColumnLevel (Extended from index.ts)
Section titled “PivotReportColumnLevel (Extended from index.ts)”export type PivotReportColumnLevel = Omit< PivotColumnLevelConfig, 'subtotalValues'> & { subtotalFields?: string[] };PivotReportColumnCollapse (Extended from index.ts)
Section titled “PivotReportColumnCollapse (Extended from index.ts)”export type PivotReportColumnCollapse = Omit< PivotColumnCollapseConfig, 'placeholder' | 'aggregator'> & { aggregator?: string | { fieldId: string; aggregator: string }[]; placeholder?: string | { bindingId: string };};PivotReportTexts
Section titled “PivotReportTexts”Built-in callback markers are distinct from portable string and full string-map labels.
/** Built-in callback markers are distinct from portable string and full string-map labels. */export type PivotReportTexts = Partial<{ [K in keyof NonNullable<PivotConfig['i18n']>]: NonNullable<NonNullable<PivotConfig['i18n']>[K]> extends (...args: never[]) => unknown ? { kind: 'builtin-default' } : NonNullable<PivotConfig['i18n']>[K];}>;PivotReportPresentation (Extended from index.ts)
Section titled “PivotReportPresentation (Extended from index.ts)”export type PivotReportPresentation = Omit< Partial<PivotConfig>, | 'dimensions' | 'rows' | 'columns' | 'values' | 'filters' | 'filterSelections' | 'resultFilters' | 'topBottom' | 'engine' | 'aggregationSemantics' | 'mountTo' | 'totals' | 'columnLevels' | 'columnCollapse' | 'i18n' | 'fieldPanel' | 'rowTree' | 'contextMenu'> & { rowTree?: string[]; contextMenu?: | false | (Omit< NonNullable<Exclude<PivotConfig['contextMenu'], false>>, 'drillThrough' > & { drillThrough?: false | { pageSize?: number; columns?: string[]; visibleColumns?: string[]; columnChooser?: boolean }; }); columnLevels?: Partial<Record<number, PivotReportColumnLevel>>; columnCollapse?: boolean | PivotReportColumnCollapse; i18n?: PivotReportTexts; fieldPanel?: Omit<NonNullable<PivotConfig['fieldPanel']>, 'texts'> & { texts?: PivotReportTexts; }; /** Analytical UI state; adapter/store/capabilities remain runtime authority. */ viewport?: { rows?: Partial<PivotAxisViewport>; columns?: Partial<PivotAxisViewport>; };};PivotReportTotals (Extended from index.ts)
Section titled “PivotReportTotals (Extended from index.ts)”export type PivotReportTotals = Omit<PivotConfigTotals, 'disabledSubtotals'> & { disabledSubtotals?: Partial< Record<'rows' | 'columns', { fields?: string[]; levels?: number[] }> >;};PivotReportSummary
Section titled “PivotReportSummary”interface PivotReportSummary { id: string; fieldId: string; summaryType: PivotSummaryType; calculation?: PivotReportCalculation}PivotReportSummaryV2 (Extended from index.ts)
Section titled “PivotReportSummaryV2 (Extended from index.ts)”export type PivotReportSummaryV2 = Omit<PivotReportSummary, 'summaryType'> & { summaryType: string };PivotReportResultFilter
Section titled “PivotReportResultFilter”export type PivotReportResultFilter = PortableResultFilter<PivotReportSummary>;PivotReportResultFilterV2
Section titled “PivotReportResultFilterV2”export type PivotReportResultFilterV2 = PortableResultFilter<PivotReportSummaryV2>;PivotReport
Section titled “PivotReport”Portable state only. Runtime capabilities, handles and source records are never imported.
interface PivotReport { /** Persist the intended execution semantics; switching engines requires explicit migration. */ aggregationSemantics?: PivotConfig['aggregationSemantics']; kind: typeof PIVOT_REPORT_KIND; version: typeof PIVOT_REPORT_VERSION; fields: PivotReportField[]; rows: string[]; columns: string[]; filters: string[]; measures: PivotReportMeasure[]; memberFilters?: { fieldId: string; selection: PivotFilterSelection }[]; resultFilters?: PivotReportResultFilter; ranking?: { direction: 'top' | 'bottom'; count: number; measureId: string; otherLabel?: string; }; totals?: PivotReportTotals; presentation?: PivotReportPresentation; bindings?: { sourceId?: string; engineId?: string; mountId?: string; i18nId?: string; fieldPanelTextsId?: string; }; extensions?: Record<string, PivotReportJson>}PivotReportV1
Section titled “PivotReportV1”Existing names remain strict v1 for source compatibility.
/** Existing names remain strict v1 for source compatibility. */export type PivotReportV1 = PivotReport;PivotReportFieldV1
Section titled “PivotReportFieldV1”export type PivotReportFieldV1 = PivotReportField;PivotFieldExpression
Section titled “PivotFieldExpression”Portable row expressions; these documents are not executable until a field plan is supported.
/** Portable row expressions; these documents are not executable until a field plan is supported. */export type PivotFieldExpression = | { type: 'literal'; value: string | number | boolean | null } | { type: 'field'; fieldId: string } | { type: 'binary'; operator: '+' | '-' | '*' | '/'; left: PivotFieldExpression; right: PivotFieldExpression; } | { type: 'concat'; args: PivotFieldExpression[] } | { type: 'coalesce'; args: PivotFieldExpression[] };PivotFieldSource
Section titled “PivotFieldSource”export type PivotFieldSource = | { kind: 'physical'; prop: ColumnProp } | { kind: 'expression'; expression: PivotFieldExpression } | { kind: 'date'; fieldId: string; operation: DateBucketOperation } | { kind: 'runtime'; bindingId: string; dependencies: string[] };PivotReportAggregatorV2 (Extended from index.ts)
Section titled “PivotReportAggregatorV2 (Extended from index.ts)”export type PivotReportAggregatorV2 = PivotReportAggregator & { operation?: AggregateOperationV1 };PivotReportFieldV2 (Extended from index.ts)
Section titled “PivotReportFieldV2 (Extended from index.ts)”export type PivotReportFieldV2 = PivotReportFieldV2Metadata & { aggregators?: PivotReportAggregatorV2[] } & ( | { source: Extract<PivotFieldSource, { kind: 'physical' }>; dataType?: PivotFieldDataType; } | { source: Exclude<PivotFieldSource, { kind: 'physical' }>; dataType: 'string' | 'number' | 'boolean'; } );PivotReportMeasureV2 (Extended from index.ts)
Section titled “PivotReportMeasureV2 (Extended from index.ts)”interface PivotReportMeasureV2 { summaries?: { group?: string; total?: string }; id: string; fieldId: string; aggregator: string; label?: string; name?: string; calculation?: PivotReportCalculation; format?: PivotReportFormat; conditionalFormatting?: { match?: 'first' | 'all'; rules: PivotReportConditionalRule[]; }}PivotReportV2 (Extended from index.ts)
Section titled “PivotReportV2 (Extended from index.ts)”interface PivotReportV2 { measures: PivotReportMeasureV2[]; version: typeof PIVOT_REPORT_VERSION_V2; fields: PivotReportFieldV2[]; resultFilters?: PivotReportResultFilterV2}PivotReportDocument
Section titled “PivotReportDocument”export type PivotReportDocument = PivotReport | PivotReportV2;PivotReportRuntime
Section titled “PivotReportRuntime”Categorized application authority. Maps also safely support prototype-like IDs.
interface PivotReportRuntime { fields?: ReadonlyMap<string, ColumnProp>; columns?: ReadonlyMap<string, Partial<ColumnRegular>>; aggregators?: ReadonlyMap<string, (values: any[]) => any>; placeholders?: ReadonlyMap< string, Exclude<NonNullable<PivotColumnCollapseConfig['placeholder']>, string> >; sources?: ReadonlyMap<string, readonly DataType[]>; engines?: ReadonlyMap<string, NonNullable<PivotConfig['engine']>>; mounts?: ReadonlyMap<string, HTMLElement>; texts?: ReadonlyMap<string, Partial<NonNullable<PivotConfig['i18n']>>>}PivotReportDiagnosticCode
Section titled “PivotReportDiagnosticCode”export type PivotReportDiagnosticCode = | 'INVALID_REPORT' | 'UNSUPPORTED_VERSION' | 'DUPLICATE_ID' | 'UNKNOWN_FIELD' | 'UNKNOWN_MEASURE' | 'MISSING_BINDING' | 'UNSUPPORTED_RUNTIME_VALUE' | 'AMBIGUOUS_SOURCE_MAPPING' | 'FIELD_ROLE_UNAVAILABLE';PivotReportDiagnostic
Section titled “PivotReportDiagnostic”interface PivotReportDiagnostic { code: PivotReportDiagnosticCode; path: string; message: string; reference?: string}CompiledPivotReport
Section titled “CompiledPivotReport”interface CompiledPivotReport { report: PivotReport; config: PivotConfig; source?: readonly DataType[]}PivotReportRuntimeV2 (Extended from index.ts)
Section titled “PivotReportRuntimeV2 (Extended from index.ts)”Explicit executable V2 runtime capabilities; callbacks are application-owned.
interface PivotReportRuntimeV2 { accessors?: ReadonlyMap<string, import('./pivot.field-plan').PivotFieldAccessor>; fields?: ReadonlyMap<string, ColumnProp>; columns?: ReadonlyMap<string, Partial<ColumnRegular>>; aggregators?: ReadonlyMap<string, (values: any[]) => any>; placeholders?: ReadonlyMap< string, Exclude<NonNullable<PivotColumnCollapseConfig['placeholder']>, string> >; sources?: ReadonlyMap<string, readonly DataType[]>; engines?: ReadonlyMap<string, NonNullable<PivotConfig['engine']>>; mounts?: ReadonlyMap<string, HTMLElement>; texts?: ReadonlyMap<string, Partial<NonNullable<PivotConfig['i18n']>>>}PivotFieldScalar
Section titled “PivotFieldScalar”Internal only until every execution/query consumer shares the field context.
/** Internal only until every execution/query consumer shares the field context. */export type PivotFieldScalar = string | number | boolean | null;PivotFieldAccessorContext
Section titled “PivotFieldAccessorContext”interface PivotFieldAccessorContext { readonly row: Readonly<DataType>; readonly sourceIndex: number; /** Available only during this callback, and only for declared dependencies. */ readonly get: (fieldId: string) => PivotFieldScalar}PivotFieldAccessor
Section titled “PivotFieldAccessor”export type PivotFieldAccessor = ( context: PivotFieldAccessorContext,) => PivotFieldScalar;CompiledPivotReportV2
Section titled “CompiledPivotReportV2”interface CompiledPivotReportV2 { report: PivotReportV2; config: PivotConfig; source: readonly DataType[]}savePivotReport
Section titled “savePivotReport”export async function savePivotReport( store: PivotRemoteStore, options: PivotSaveReportOptions,): Promise<PivotSavedReport>;loadPivotReport
Section titled “loadPivotReport”export async function loadPivotReport( store: PivotRemoteStore, options: PivotLoadReportOptions,): Promise<PivotSavedReport>;pivotSavedReportFromState
Section titled “pivotSavedReportFromState”export function pivotSavedReportFromState( response: PivotStateResponse, migration?: PivotReportMigrationOptions,): PivotSavedReport;PIVOT_SAVED_REPORT_KIND
Section titled “PIVOT_SAVED_REPORT_KIND”PIVOT_SAVED_REPORT_KIND: string;PIVOT_SAVED_REPORT_VERSION
Section titled “PIVOT_SAVED_REPORT_VERSION”PIVOT_SAVED_REPORT_VERSION: 1;createPivotSavedReportState
Section titled “createPivotSavedReportState”export function createPivotSavedReportState( report: PivotReport, metadata: PivotSavedReportMetadata = {},): PivotSavedReportState;PivotSavedReportState
Section titled “PivotSavedReportState”interface PivotSavedReportState { kind: typeof PIVOT_SAVED_REPORT_KIND; version: typeof PIVOT_SAVED_REPORT_VERSION; report: PivotReport; name?: string; savedAt?: string}PivotSavedReportMetadata
Section titled “PivotSavedReportMetadata”interface PivotSavedReportMetadata { name?: string; savedAt?: string}PivotSavedReport (Extended from index.ts)
Section titled “PivotSavedReport (Extended from index.ts)”interface PivotSavedReport { report: PivotReport; name?: string; savedAt?: string; /** Portable payload schema version, independent of backend record version. */ version: typeof PIVOT_SAVED_REPORT_VERSION; /** Backend record metadata, never used to select a payload migration. */ recordVersion?: number; requestId?: string; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotSaveReportOptions (Extended from index.ts)
Section titled “PivotSaveReportOptions (Extended from index.ts)”interface PivotSaveReportOptions { report: PivotReport; name?: string; savedAt?: string; requestId?: string; signal?: AbortSignal; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotLoadReportOptions (Extended from index.ts)
Section titled “PivotLoadReportOptions (Extended from index.ts)”interface PivotLoadReportOptions { signal?: AbortSignal; /** Explicit runtime identities and mappings needed when loading legacy state. */ migration?: PivotReportMigrationOptions; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}createPivotPathId
Section titled “createPivotPathId”Creates a stable collision-safe id for a typed analytical path.
JSON contains tagged scalar tuples so equal display strings with different primitive types remain distinct.
export function createPivotPathId( path: readonly (PivotAxisValue | undefined)[],);normalizePivotPath
Section titled “normalizePivotPath”export function normalizePivotPath( path: readonly (PivotAxisValue | undefined)[],): PivotAxisValue[];normalizePivotRuntimeConfig
Section titled “normalizePivotRuntimeConfig”export function normalizePivotRuntimeConfig( config: Partial<PivotConfig>,): PivotConfig;createPivotMeasureMeta
Section titled “createPivotMeasureMeta”export function createPivotMeasureMeta( value: Pick<PivotConfigValue, 'id' | 'prop' | 'aggregator' | 'label' | 'name'>, valueIndex?: number,): PivotMeasureMeta;createPivotRowMeta
Section titled “createPivotRowMeta”export function createPivotRowMeta(input: { path: readonly (PivotAxisValue | undefined)[]; labels: readonly string[]; kind: PivotRowKind; measure?: PivotMeasureMeta;}): PivotRowMeta;createPivotColumnMeta
Section titled “createPivotColumnMeta”export function createPivotColumnMeta(input: { path: readonly (PivotAxisValue | undefined)[]; labels: readonly string[]; kind: PivotColumnKind; prop?: ColumnProp; measure?: PivotMeasureMeta;}): PivotColumnMeta;getPivotRowMeta
Section titled “getPivotRowMeta”export function getPivotRowMeta(row?: DataType): PivotRowMeta | undefined;getPivotColumnMeta
Section titled “getPivotColumnMeta”Read metadata from grid columns or readonly renderer-neutral column carriers.
export function getPivotColumnMeta( column?: object,): PivotColumnMeta | undefined;PIVOT_MODEL_CHANGED_EVENT
Section titled “PIVOT_MODEL_CHANGED_EVENT”PIVOT_MODEL_CHANGED_EVENT: string;PIVOT_ROW_META
Section titled “PIVOT_ROW_META”PIVOT_ROW_META: typeof PIVOT_ROW_META;PIVOT_COLUMN_META
Section titled “PIVOT_COLUMN_META”PIVOT_COLUMN_META: typeof PIVOT_COLUMN_META;PivotEngineMode
Section titled “PivotEngineMode”export type PivotEngineMode = 'client' | 'server';PivotModelChangedReason
Section titled “PivotModelChangedReason”export type PivotModelChangedReason = 'client-apply' | 'server-apply' | 'clear';PivotAxisValue
Section titled “PivotAxisValue”export type PivotAxisValue = string | number | boolean | null;PivotRowKind
Section titled “PivotRowKind”export type PivotRowKind = 'leaf' | 'subtotal' | 'grandTotal' | 'group';PivotColumnKind
Section titled “PivotColumnKind”export type PivotColumnKind = | 'leaf' | 'subtotal' | 'grandTotal' | 'collapsed' | 'group';PivotMeasureMeta
Section titled “PivotMeasureMeta”interface PivotMeasureMeta { readonly id?: string; readonly valueIndex?: number; readonly prop: ColumnProp; readonly aggregator: string; readonly label: string}PivotRowMeta
Section titled “PivotRowMeta”interface PivotRowMeta { readonly id: string; readonly path: readonly PivotAxisValue[]; readonly labels: readonly string[]; readonly depth: number; readonly kind: PivotRowKind; readonly measure?: PivotMeasureMeta}PivotColumnMeta
Section titled “PivotColumnMeta”interface PivotColumnMeta { readonly id: string; readonly path: readonly PivotAxisValue[]; readonly labels: readonly string[]; readonly depth: number; readonly kind: PivotColumnKind; /** Generated RevoGrid cell carrier property. Omitted for header groups. */ readonly prop?: ColumnProp; /** Measure represented by a terminal value column. */ readonly measure?: PivotMeasureMeta}PivotModelChangedEventDetail
Section titled “PivotModelChangedEventDetail”interface PivotModelChangedEventDetail { readonly revision: number; readonly reason: PivotModelChangedReason; readonly engine: PivotEngineMode}PivotRuntimeSnapshot
Section titled “PivotRuntimeSnapshot”interface PivotRuntimeSnapshot { readonly revision: number; readonly engine: PivotEngineMode; /** Active config with row, column, value, dimension, and filter arrays present. */ readonly config: Readonly<PivotConfig>; readonly source: readonly DataType[]; readonly columns: ReadonlyArray<ColumnGrouping | ColumnRegular>; readonly pinnedBottomSource: readonly DataType[]; /** Group frontier aggregates keyed by collision-safe semantic row id. */ readonly groupAggregates: Readonly<Record<string, DataType>>; /** Optional JSON-safe hierarchy metadata for semantic analytical slices. */ readonly hierarchies?: PivotRuntimeHierarchies; readonly remoteRequest?: Readonly<PivotLoadRequest>}PivotRowWithMeta (Extended from index.ts)
Section titled “PivotRowWithMeta (Extended from index.ts)”export type PivotRowWithMeta = DataType & { [PIVOT_ROW_META]?: PivotRowMeta;};PivotColumnWithMeta (Extended from index.ts)
Section titled “PivotColumnWithMeta (Extended from index.ts)”export type PivotColumnWithMeta = (ColumnGrouping | ColumnRegular) & { [PIVOT_COLUMN_META]?: PivotColumnMeta;};createPivotData
Section titled “createPivotData”Builds the full client-side Pivot result set from raw source rows. Trusted execution helper: use report validation/compilation or a controller to enforce authoring placement policy. This does not authorize backend access.
export function createPivotData( originalData: DataType[], config: Partial<PivotConfig>,);createPivotDataModel
Section titled “createPivotDataModel”Builds the full client-side Pivot result set together with grouped-row aggregate payloads keyed by RevoGrid grouped path values. Accepts trusted raw configuration; does not enforce report authoring roles or coerce facts from descriptive field dataType metadata.
export function createPivotDataModel( originalData: DataType[], config: Partial<PivotConfig>, options: PivotDataModelOptions = {},): PivotDataModel;createPivotDataModelWork
Section titled “createPivotDataModelWork”export function* createPivotDataModelWork( originalData: DataType[], config: Partial<PivotConfig>, options: PivotDataModelOptions = {},): PivotWork<PivotDataModel>;PivotGroupAggregates
Section titled “PivotGroupAggregates”export type PivotGroupAggregates = Record<string, DataType>;PivotDataModel
Section titled “PivotDataModel”interface PivotDataModel { rows: DataType[]; groupAggregatesByPath: PivotGroupAggregates; semanticGroupAggregatesById: PivotGroupAggregates; /** @internal Shared path metadata used to project the same visible column frontier. */ columnAxis?: PivotColumnAxis; /** Runtime-only hierarchy index used by semantic Pivot slice queries. */ semanticSliceIndex?: PivotSemanticSliceIndex}PivotDataModelOptions
Section titled “PivotDataModelOptions”interface PivotDataModelOptions { /** * Collapsed aggregate paths that must remain materialized while their groups * are expanded because an active filter still targets those aggregates. */ aggregateFilterPaths?: readonly (readonly PivotGroupValue[])[]}pivotColumns
Section titled “pivotColumns”Builds the generated RevoGrid column model for the current Pivot config. The source is only used to discover unique analytical column paths.
export function pivotColumns( config: Partial<PivotConfig>, source: DataType[] = [], columnAxis?: PivotColumnAxis,);pivotColumnsWork
Section titled “pivotColumnsWork”export function* pivotColumnsWork( config: Partial<PivotConfig>, source: DataType[] = [], suppliedColumnAxis?: PivotColumnAxis,): PivotWork<(ColumnRegular | ColumnGrouping)[]>;withPivotTotalLabelTemplates
Section titled “withPivotTotalLabelTemplates”export function withPivotTotalLabelTemplates(columns: Array<ColumnGrouping | ColumnRegular>, config: Partial<PivotConfig>, columnTypes: ColumnTypes = {}): Array<ColumnGrouping | ColumnRegular>;withPivotTotalLabelTemplatesWork
Section titled “withPivotTotalLabelTemplatesWork”export function* withPivotTotalLabelTemplatesWork( columns: Array<ColumnGrouping | ColumnRegular>, config: Partial<PivotConfig>, columnTypes: ColumnTypes = {},): PivotWork<Array<ColumnGrouping | ColumnRegular>>;withPivotValuePresentation
Section titled “withPivotValuePresentation”Applies measure-owned number and conditional formatting to generated value columns after their semantic metadata has been materialized.
export function withPivotValuePresentation(columns: Array<ColumnGrouping | ColumnRegular>, config: Partial<PivotConfig>, columnTypes: ColumnTypes = {}): Array<ColumnGrouping | ColumnRegular>;withPivotValuePresentationWork
Section titled “withPivotValuePresentationWork”export function* withPivotValuePresentationWork( columns: Array<ColumnGrouping | ColumnRegular>, config: Partial<PivotConfig>, columnTypes: ColumnTypes = {},): PivotWork<Array<ColumnGrouping | ColumnRegular>>;pivotColumnsFromPaths
Section titled “pivotColumnsFromPaths”export function pivotColumnsFromPaths( config: Partial<PivotConfig>, paths: Array<Array<string | number | boolean | null>>, options: { authoritativeFrontier?: boolean; columnKeyResolver?: PivotColumnPathKeyResolver } = {},);pivotColumnsFromPathsWork
Section titled “pivotColumnsFromPathsWork”export function* pivotColumnsFromPathsWork( config: Partial<PivotConfig>, paths: Array<Array<string | number | boolean | null>>, options: { authoritativeFrontier?: boolean; columnKeyResolver?: PivotColumnPathKeyResolver } = {},): PivotWork<(ColumnRegular | ColumnGrouping)[]>;PIVOT_TOTAL_CELL_CLASS
Section titled “PIVOT_TOTAL_CELL_CLASS”PIVOT_TOTAL_CELL_CLASS: string;PIVOT_ROW_FILTER_ACTIVE_HEADER_CLASS
Section titled “PIVOT_ROW_FILTER_ACTIVE_HEADER_CLASS”PIVOT_ROW_FILTER_ACTIVE_HEADER_CLASS: string;PivotSummaryType
Section titled “PivotSummaryType”Closed remote aggregate identities, each requiring per-field registry authorization.
distinct is COUNT(DISTINCT field): counts non-null distinct scalar values at
each requested scope. Totals cannot be obtained by adding child counts.
/** Closed remote aggregate identities, each requiring per-field registry authorization. * `distinct` is COUNT(DISTINCT field): counts non-null distinct scalar values at * each requested scope. Totals cannot be obtained by adding child counts. */export type PivotSummaryType = 'sum' | 'min' | 'max' | 'avg' | 'count' | 'distinct';PivotFieldDataType
Section titled “PivotFieldDataType”export type PivotFieldDataType = 'string' | 'number' | 'date' | 'boolean';PivotLogicalOperator
Section titled “PivotLogicalOperator”export type PivotLogicalOperator = 'and' | 'or';PivotSortDirection
Section titled “PivotSortDirection”export type PivotSortDirection = 'asc' | 'desc';PivotSortBySummaryType
Section titled “PivotSortBySummaryType”Stable result id of the summary used for analytical member sorting.
/** Stable result id of the summary used for analytical member sorting. */export type PivotSortBySummaryType = string;PivotDateGroupInterval
Section titled “PivotDateGroupInterval”export type PivotDateGroupInterval = 'year' | 'quarter' | 'month' | 'day' | 'dayOfWeek';PivotGroupInterval
Section titled “PivotGroupInterval”export type PivotGroupInterval = | PivotDateGroupInterval | { /** Numeric bucket grouping for OLAP-style measure banding. */ type: 'numericBucket'; /** Bucket width. A size of `100` yields buckets such as `0-99`, `100-199`, and so on. */ size: number; };PivotFilterOperation
Section titled “PivotFilterOperation”export type PivotFilterOperation = | '=' | '<>' | '>' | '>=' | '<' | '<=' | 'contains' | 'notcontains' | 'startswith' | 'endswith' | 'in' | 'notin';PivotPath
Section titled “PivotPath”export type PivotPath = Array<string | number | boolean | null>;PivotFilterValue
Section titled “PivotFilterValue”export type PivotFilterValue = | string | number | boolean | null | Array<string | number | boolean | null>;PivotFilterCondition
Section titled “PivotFilterCondition”export type PivotFilterCondition = [selector: string, operation: PivotFilterOperation, value: PivotFilterValue];PivotFilterExpression
Section titled “PivotFilterExpression”export type PivotFilterExpression = | PivotFilterCondition | [left: PivotFilterExpression, operator: PivotLogicalOperator, right: PivotFilterExpression] | ['!', PivotFilterExpression];PivotAggregateColumnKind
Section titled “PivotAggregateColumnKind”export type PivotAggregateColumnKind = | 'leaf' | 'subtotal' | 'grandTotal' | 'collapsed';PivotAggregateFilterDescriptor
Section titled “PivotAggregateFilterDescriptor”Post-aggregation predicate for one generated Pivot value column.
The semantic path and summary replace the grid’s synthetic carrier prop so remote stores can compile a stable HAVING expression.
interface PivotAggregateFilterDescriptor { columnPath: PivotPath; columnKind: PivotAggregateColumnKind; summary: PivotSummaryDescriptor; operation: PivotFilterOperation; value: PivotFilterValue}PivotAggregateFilterExpression
Section titled “PivotAggregateFilterExpression”Boolean post-aggregation filter tree.
Aggregate filters use semantic Pivot coordinates instead of generated grid properties so the expression survives projection, saved-view, and server round trips.
/** * Boolean post-aggregation filter tree. * * Aggregate filters use semantic Pivot coordinates instead of generated grid * properties so the expression survives projection, saved-view, and server * round trips. */export type PivotAggregateFilterExpression = | PivotAggregateFilterDescriptor | [ left: PivotAggregateFilterExpression, operator: PivotLogicalOperator, right: PivotAggregateFilterExpression, ] | ['!', PivotAggregateFilterExpression];PivotGroupDescriptor
Section titled “PivotGroupDescriptor”interface PivotGroupDescriptor { /** Public field id resolved through the server-side field registry. */ selector: string; /** Descending sort flag for the grouped members on this axis level. */ desc?: boolean; /** Optional date or numeric-bucket grouping strategy for this selector. */ groupInterval?: PivotGroupInterval}PivotSummaryDescriptor
Section titled “PivotSummaryDescriptor”interface PivotSummaryDescriptor { /** Optional stable measure id, required when one selector is used more than once. */ id?: string; /** Public field id of the measure being aggregated. */ selector: string; /** Stable summary function id returned by the analytical engine. */ /** Local configured aggregate identity; remote registries still allow only PivotSummaryType. */ summaryType: string; /** Optional post-aggregation calculation advertised by the engine. */ calculation?: PivotValueCalculation}PivotEngineCapabilities
Section titled “PivotEngineCapabilities”Optional server feature advertisement. Context-menu analytical commands stay disabled until the backing engine explicitly opts into the corresponding operation.
interface PivotEngineCapabilities { aggregation?: boolean; calculations?: boolean | PivotValueCalculationType[]; filter?: boolean; filterValues?: boolean; sort?: boolean; drilldown?: boolean; /** Complete bounded filtered report from one atomic backend snapshot. */ fullExport?: boolean; /** Optional query limits used for preflight and authoring; never backend authorization. */ query?: PivotQueryCapabilities}PivotSortDescriptor
Section titled “PivotSortDescriptor”interface PivotSortDescriptor { /** Public field id to sort by. */ selector: string; /** Descending sort flag for the selector or summary. */ desc?: boolean; /** Optional summary id used when the backend supports sort-by-summary semantics. */ bySummary?: PivotSortBySummaryType}PivotAxisViewport
Section titled “PivotAxisViewport”interface PivotAxisViewport { /** Zero-based analytical offset for this axis window. */ offset: number; /** Requested analytical window size for this axis. */ limit: number; /** Expanded analytical members represented as paths, never as UI indexes. */ expandedPaths?: PivotPath[]; /** Collapsed analytical members represented as paths, never as UI indexes. */ collapsedPaths?: PivotPath[]}PivotUiStateHints
Section titled “PivotUiStateHints”interface PivotUiStateHints { /** Preferred row-header presentation for engines that can shape tree metadata. */ rowHeaderLayout?: 'tree' | 'flat'; /** Preferred totals placement hint for the analytical engine. */ showTotalsPrior?: 'rows' | 'columns' | 'none'; /** Hint that the UI currently expects collapsed-by-default hierarchies. */ collapsedByDefault?: boolean; /** Hint that generated column groups are collapsed by default. */ columnGroupsCollapsedByDefault?: boolean}PivotLoadOptions
Section titled “PivotLoadOptions”interface PivotLoadOptions { /** Registry-backed filter expression tree. */ filter?: PivotFilterExpression; /** Post-aggregation expression for generated Pivot value columns. */ having?: | PivotAggregateFilterExpression | PivotAggregateFilterDescriptor[]; /** Row-axis grouping descriptors. */ rows?: PivotGroupDescriptor[]; /** Column-axis grouping descriptors. */ columns?: PivotGroupDescriptor[]; /** Presence opts into independent local summaries and defines the leaf layout. */ leafSummary?: PivotSummaryDescriptor[]; /** Grand-total summary descriptors. */ totalSummary?: PivotSummaryDescriptor[]; /** Group-level summary descriptors. */ groupSummary?: PivotSummaryDescriptor[]; /** Analytical sorting directives. */ sort?: PivotSortDescriptor[]}PivotLoadRequest
Section titled “PivotLoadRequest”interface PivotLoadRequest { /** Client-generated correlation id for logs, tracing, and stale-response protection. */ requestId: string; /** Dataset or semantic view identifier understood by the backend. */ viewId: string; /** Version or checksum of the published field registry for this view. */ fieldsVersion: string; /** Analytical layout, filters, summaries, and sort instructions. */ loadOptions: PivotLoadOptions; /** Independent analytical windows for the row and column axes. */ viewport: { rowAxis: PivotAxisViewport; columnAxis: PivotAxisViewport; }; /** Optional UI hints that let a backend align with current Pivot presentation preferences. */ uiState?: PivotUiStateHints}PivotAxisWindowMeta
Section titled “PivotAxisWindowMeta”interface PivotAxisWindowMeta { /** Total number of analytical members available on this axis. */ totalCount?: number; /** Optional analytical paths used to materialize generated Pivot columns. */ paths?: PivotPath[]; /** Optional column bucket kinds aligned with paths. Disambiguates literal * member strings from legacy total/subtotal path markers. */ kinds?: PivotAggregateColumnKind[]; /** Zero-based analytical offset for this axis window. */ offset?: number; /** Requested analytical window size for this axis. */ limit?: number; /** Expanded analytical members represented as paths. */ expandedPaths?: PivotPath[]; /** Collapsed analytical members represented as paths. */ collapsedPaths?: PivotPath[]; /** Actual number of members returned in this window. */ returned?: number}PivotLoadResponseMeta
Section titled “PivotLoadResponseMeta”interface PivotLoadResponseMeta { /** Cache outcome for observability and UI diagnostics. */ cacheStatus: 'hit' | 'miss' | 'warm' | 'bypass'; /** Correlation cache key. */ cacheKey?: string; /** Server-side generation timestamp. */ generatedAt?: string; /** Elapsed processing time in milliseconds. */ elapsedMs?: number; /** Optional warnings or diagnostic messages. */ warnings?: string[]}PivotLoadResponse
Section titled “PivotLoadResponse”interface PivotLoadResponse { /** Visible analytical payload or already materialized row records. */ data: PivotMaterializedRow[]; /** Total or pinned summary rows for the current analytical request. */ summary: unknown[]; /** Row-axis window metadata. */ rowAxis: PivotAxisWindowMeta; /** Column-axis window metadata. */ columnAxis: PivotAxisWindowMeta; /** Optional grouped-row aggregate payloads keyed by grouped path values. */ groupAggregates?: Record<string, DataType>; /** Cache and timing metadata for diagnostics. */ meta: PivotLoadResponseMeta; /** Correlation id. */ requestId?: string; /** Response format version. */ version?: number}PIVOT_MEASURE_ID_PROP
Section titled “PIVOT_MEASURE_ID_PROP”Hidden stable measure identity accepted on already materialized values-on-rows response records. It disambiguates measures that intentionally share labels.
PIVOT_MEASURE_ID_PROP: string;PivotMaterializedRow (Extended from index.ts)
Section titled “PivotMaterializedRow (Extended from index.ts)”export type PivotMaterializedRow = DataType & { [PIVOT_MEASURE_ID_PROP]?: string;};PivotDrilldownCellRef
Section titled “PivotDrilldownCellRef”interface PivotDrilldownCellRef { /** Row-axis path for the visible summary cell. */ rowPath: PivotPath; /** Column-axis path for the visible summary cell. */ columnPath: PivotPath; /** Optional measure index when multiple values are present. */ dataIndex?: number}PivotDrilldownRequest
Section titled “PivotDrilldownRequest”interface PivotDrilldownRequest { /** Client-generated correlation id for the drilldown request. */ requestId: string; /** Dataset or semantic view identifier understood by the backend. */ viewId: string; /** Version or checksum of the published field registry for this view. */ fieldsVersion: string; /** Visible pivot cell that defines the drilldown scope. */ cell: PivotDrilldownCellRef; /** Source/member WHERE scope intersected with the cell. Excludes HAVING and analytical windows. */ filter?: PivotFilterExpression; /** Optional whitelist-validated columns to expose in the fact page. */ customColumns?: string[]; /** Zero-based fact-page offset. */ offset: number; /** Requested fact-page size. */ limit: number}PivotDrilldownResponse
Section titled “PivotDrilldownResponse”interface PivotDrilldownResponse { /** Matching fact rows for the requested summary cell. */ data: DataType[]; /** Total number of matching facts. */ totalCount: number; /** Optional cache metadata for drilldown responses. */ meta?: Partial<PivotLoadResponseMeta>; /** Correlation id. */ requestId?: string}PivotFilterValuesRequest
Section titled “PivotFilterValuesRequest”interface PivotFilterValuesRequest { /** Client-generated correlation id for cancellation and tracing. */ requestId: string; /** Dataset or semantic view identifier understood by the backend. */ viewId: string; /** Version or checksum of the published field registry. */ fieldsVersion: string; /** Public field id whose distinct values are requested. */ selector: string; /** Active report filters excluding the requested selector. */ filter?: PivotFilterExpression; /** Optional search text applied by the engine before paging. */ search?: string; /** Zero-based distinct-value page offset. */ offset: number; /** Requested distinct-value page size. */ limit: number}PivotFilterValuesResponse
Section titled “PivotFilterValuesResponse”interface PivotFilterValuesResponse { requestId?: string; values: Array<string | number | boolean | null>; totalCount: number}PivotStateSaveRequest
Section titled “PivotStateSaveRequest”interface PivotStateSaveRequest { /** Client-generated correlation id for persistence. */ requestId: string; /** View identifier whose UI state is being persisted. */ viewId: string; /** User identifier that owns the saved state. */ userId: string; /** Arbitrary persisted Pivot UI state payload. */ state: Record<string, unknown>}PivotStateResponse
Section titled “PivotStateResponse”interface PivotStateResponse { /** Optional echoed correlation id from the request. */ requestId?: string; /** User identifier that owns the state. */ userId: string; /** View identifier for the saved state. */ viewId: string; /** Persisted Pivot UI state payload. */ state: Record<string, unknown>; /** Optional schema version for persisted state. */ version?: number}PivotCacheInvalidationRequest
Section titled “PivotCacheInvalidationRequest”interface PivotCacheInvalidationRequest { /** Client-generated correlation id for invalidation requests. */ requestId: string; /** Tenant scope to invalidate. */ tenantId?: string; /** Optional view scope within the tenant. */ viewId?: string; /** Dataset watermark to invalidate. */ datasetWatermark?: string; /** Optional field-registry version scope. */ fieldsVersion?: string}PivotLimits
Section titled “PivotLimits”interface PivotLimits { /** Hard cap for row-axis windows. */ maxRowWindowSize: number; /** Hard cap for column-axis windows. */ maxColumnWindowSize: number; /** Hard cap for expanded analytical members. */ maxExpandedPaths: number; /** Hard cap for analytical hierarchy depth. */ maxExpansionDepth: number; /** Hard cap for drilldown page size. */ maxDrilldownLimit: number; /** Hard cap for requested summary descriptors. */ maxSummaryDescriptors: number; /** Hard cap for row or column grouping descriptors. */ maxGroupDescriptors: number; /** Hard cap for nested filter-expression depth. */ maxFilterDepth: number}PivotGridModel
Section titled “PivotGridModel”interface PivotGridModel { /** Generated RevoGrid columns for the visible Pivot window. */ columns: Array<ColumnGrouping | ColumnRegular>; /** Visible body rows to render in the grid viewport. */ source: DataType[]; /** Optional pinned grand-total rows. */ pinnedBottomSource?: DataType[]; /** Optional grouped-row metadata for Pivot drill-down. */ grouping?: GroupingOptions; /** Response metadata forwarded to UI diagnostics if needed. */ meta?: Partial<PivotLoadResponseMeta>}PivotEngineAdapter
Section titled “PivotEngineAdapter”Analytical engine boundary used by PivotPlugin.
Use this when your application wants to translate Pivot requests directly into
OLAP, warehouse, or semantic-layer queries without going through
HttpPivotRemoteStore.
interface PivotEngineAdapter { readonly capabilities?: PivotEngineCapabilities; exportReport?(request: PivotFullExportRequest, context?: PivotFullExportContext): Promise<PivotFullExportResponse>; load(request: PivotLoadRequest, signal?: AbortSignal): Promise<PivotLoadResponse>; drilldown?(request: PivotDrilldownRequest, signal?: AbortSignal): Promise<PivotDrilldownResponse>; filterValues?( request: PivotFilterValuesRequest, signal?: AbortSignal, ): Promise<PivotFilterValuesResponse>}PivotAuthProvider
Section titled “PivotAuthProvider”Async auth-header resolver used by HTTP-backed remote stores.
/** Async auth-header resolver used by HTTP-backed remote stores. */export type PivotAuthProvider = () => Promise<Record<string, string>>;PivotRemoteStore
Section titled “PivotRemoteStore”Framework-agnostic client contract for server-side Pivot operations.
In production this should usually talk to an application API that owns auth, tenancy, selector validation, and query translation. It is not intended for direct browser-to-database connections.
interface PivotRemoteStore { readonly capabilities?: PivotEngineCapabilities; exportReport?(request: PivotFullExportRequest, context?: PivotFullExportContext): Promise<PivotFullExportResponse>; load(request: PivotLoadRequest, signal?: AbortSignal): Promise<PivotLoadResponse>; drilldown( request: PivotDrilldownRequest, signal?: AbortSignal, ): Promise<PivotDrilldownResponse>; filterValues?( request: PivotFilterValuesRequest, signal?: AbortSignal, ): Promise<PivotFilterValuesResponse>; saveState(request: PivotStateSaveRequest, signal?: AbortSignal): Promise<void>; loadState(userId: string, viewId: string, signal?: AbortSignal): Promise<PivotStateResponse>}assertPivotExportJson
Section titled “assertPivotExportJson”Reject non-portable values before transporting or canonicalizing a query.
export function assertPivotExportJson(value: unknown, depth = 0): void;resolvePivotFullExportLimits
Section titled “resolvePivotFullExportLimits”export function resolvePivotFullExportLimits(input: Partial<PivotFullExportLimits> = {}): PivotFullExportLimits;pivotFullExportQueryKey
Section titled “pivotFullExportQueryKey”export function pivotFullExportQueryKey(query: PivotFullExportQuery): string;validatePivotFullExportRequest
Section titled “validatePivotFullExportRequest”export function validatePivotFullExportRequest(request: PivotFullExportRequest): void;validatePivotFullExportResponse
Section titled “validatePivotFullExportResponse”Validates injected and HTTP backends alike before any writer or download runs.
export function validatePivotFullExportResponse(request: PivotFullExportRequest, response: PivotFullExportResponse): PivotFullExportResponse;pivotFullExportTableInput
Section titled “pivotFullExportTableInput”Existing writer input; synthetic keys avoid untrusted property names and prototype mutation.
export function pivotFullExportTableInput(response: PivotFullExportResponse): PivotXlsxExportInput;withPivotExportAbort
Section titled “withPivotExportAbort”Settle cancellation promptly even when an injected adapter ignores its signal.
export function withPivotExportAbort<T>(promise: Promise<T>, signal: AbortSignal): Promise<T>;PivotFullExportLimits
Section titled “PivotFullExportLimits”interface PivotFullExportLimits { maxRows: number; maxColumns: number; maxCells: number; maxBytes: number}PIVOT_FULL_EXPORT_LIMITS
Section titled “PIVOT_FULL_EXPORT_LIMITS”PIVOT_FULL_EXPORT_LIMITS: Readonly<PivotFullExportLimits>;PivotFullExportQuery (Extended from index.ts)
Section titled “PivotFullExportQuery (Extended from index.ts)”interface PivotFullExportQuery { /** Collapse state is semantic; offset/limit windows are deliberately absent. */ axes: { rowAxis: { expandedPaths?: PivotPath[]; collapsedPaths?: PivotPath[] }; columnAxis: { expandedPaths?: PivotPath[]; collapsedPaths?: PivotPath[] } }; presentation: { valuesOnRows: boolean; totals: PivotConfigTotals; measureLabels: Record<string, string>; fieldLabels: Record<string, string> }}PivotFullExportRequest
Section titled “PivotFullExportRequest”interface PivotFullExportRequest { requestId: string; /** Exact canonical JSON identity, echoed by the backend; not an authorization token. */ queryKey: string; query: PivotFullExportQuery; limits: PivotFullExportLimits}PivotFullExportResponse
Section titled “PivotFullExportResponse”interface PivotFullExportResponse { requestId: string; queryKey: string; scope: 'complete-filtered-report'; complete: true; /** Atomic snapshot at export time; does not pin the earlier viewport's data version. */ snapshot: { id: string; consistency: 'atomic-at-export' }; columns: Array<{ headers: string[]; summaryId?: string }>; /** Exact complete dimensions, including total rows and label/measure columns. */ rowCount: number; columnCount: number; rows: Array<Array<string | number | boolean | null>>; /** Grand-total rows, appended after body rows. Counted by every bound. */ totals: Array<Array<string | number | boolean | null>>}PivotFullExportProgress
Section titled “PivotFullExportProgress”interface PivotFullExportProgress { phase: 'requesting' | 'receiving' | 'formatting' | 'complete'; receivedBytes?: number}PivotFullExportContext
Section titled “PivotFullExportContext”interface PivotFullExportContext { signal?: AbortSignal; onProgress?: (progress: PivotFullExportProgress) => void}PivotFullExportResult
Section titled “PivotFullExportResult”interface PivotFullExportResult { format: 'csv' | 'xlsx'; content: string | Uint8Array; snapshot: PivotFullExportResponse['snapshot']; queryKey: string}PivotRemoteRequestType
Section titled “PivotRemoteRequestType”export type PivotRemoteRequestType = 'load' | 'drilldown' | 'filterValues' | 'saveState' | 'loadState' | 'exportReport';PivotRemoteStoreHooks
Section titled “PivotRemoteStoreHooks”Observational callbacks; thrown errors and rejected promises do not affect requests.
interface PivotRemoteStoreHooks { requestStarted?: (event: { key: string; type: PivotRemoteRequestType }) => void; requestSucceeded?: ( event: { key: string; type: PivotRemoteRequestType; cacheStatus?: string }, ) => void; requestFailed?: ( event: { key: string; type: PivotRemoteRequestType; error: unknown }, ) => void; cacheStatusChanged?: (event: { key: string; cacheStatus: string }) => void}PivotRemoteStoreOptions
Section titled “PivotRemoteStoreOptions”interface PivotRemoteStoreOptions { /** Base URL of the application API that exposes `/api/pivot/*` endpoints. */ baseUrl?: string; /** Tenant scope used for cache keys and backend request routing. */ tenantId?: string; /** Dataset or cube watermark used to separate stale and fresh cached results. */ datasetWatermark?: string; /** Async auth-header provider, typically used for bearer tokens or session headers. */ authProvider?: PivotAuthProvider; /** Custom fetch implementation for frameworks, SSR, tests, or mocked transports. */ fetchImpl?: typeof fetch; /** Fetch cookie policy; omission retains the browser's default policy. Never saved in reports. */ credentials?: RequestCredentials; /** Explicit backend availability; never substitutes for server authorization. */ capabilities?: import('./pivot.remote.types').PivotEngineCapabilities; /** Optional lifecycle hooks for request telemetry and cache diagnostics. */ hooks?: PivotRemoteStoreHooks}HttpPivotRemoteStore
Section titled “HttpPivotRemoteStore”Default remote store backed by fetch and the public Pivot HTTP contract.
class HttpPivotRemoteStore { load(request: PivotLoadRequest, signal?: AbortSignal): Promise<PivotLoadResponse>;
drilldown(request: PivotDrilldownRequest, signal?: AbortSignal): Promise<PivotDrilldownResponse>;
/** Distinct members are filtered/searched by the backend before paging. */ filterValues(request: PivotFilterValuesRequest, signal?: AbortSignal): Promise<PivotFilterValuesResponse>;
/** Export requests never share transport/cancellation lifetimes. */ async exportReport(request: PivotFullExportRequest, context: PivotFullExportContext = {}): Promise<PivotFullExportResponse>;
async saveState(request: PivotStateSaveRequest, signal?: AbortSignal): Promise<void>;
loadState(userId: string, viewId: string, signal?: AbortSignal): Promise<PivotStateResponse>;}createPivotDrilldownRequest
Section titled “createPivotDrilldownRequest”export function createPivotDrilldownRequest( input: PivotDrilldownRequestInput, createRequestId: () => string = createDefaultDrilldownRequestId,): PivotDrilldownRequest;createPivotDrilldownTableModel
Section titled “createPivotDrilldownTableModel”export function createPivotDrilldownTableModel( response: PivotDrilldownResponse, request?: PivotDrilldownRequest,): PivotDrilldownTableModel;createPivotDrilldownColumns
Section titled “createPivotDrilldownColumns”export function createPivotDrilldownColumns( rows: DataType[], customColumns?: string[],): ColumnRegular[];PivotDrilldownStatus
Section titled “PivotDrilldownStatus”export type PivotDrilldownStatus = 'idle' | 'loading' | 'success' | 'error';PivotDrilldownRequestInput
Section titled “PivotDrilldownRequestInput”interface PivotDrilldownRequestInput { /** Dataset or semantic view identifier understood by the adapter/backend. */ viewId: string; /** Version or checksum of the field registry for this view. */ fieldsVersion: string; /** Visible pivot cell that defines the source-row scope. */ cell: PivotDrilldownCellRef; /** Source/member WHERE scope for this fact page, independent of HAVING/windows. */ filter?: PivotDrilldownRequest['filter']; /** Optional whitelist-validated columns to expose in the fact page. */ customColumns?: string[]; /** Zero-based fact-page offset. Defaults to 0. */ offset?: number; /** Requested fact-page size. Defaults to 100. */ limit?: number; /** Optional caller-provided correlation id. */ requestId?: string}PivotDrilldownTableModel
Section titled “PivotDrilldownTableModel”interface PivotDrilldownTableModel { /** RevoGrid/table-ready fact columns. */ columns: ColumnRegular[]; /** Fact rows returned by the adapter. */ rows: DataType[]; /** Total matching facts across all pages. */ totalCount: number}PivotDrilldownState (Extended from index.ts)
Section titled “PivotDrilldownState (Extended from index.ts)”interface PivotDrilldownState { status: PivotDrilldownStatus; loading: boolean; error?: unknown; request?: PivotDrilldownRequest; response?: PivotDrilldownResponse; /** RevoGrid/table-ready fact columns. */ columns: ColumnRegular[]; /** Fact rows returned by the adapter. */ rows: DataType[]; /** Total matching facts across all pages. */ totalCount: number}PivotDrilldownControllerOptions
Section titled “PivotDrilldownControllerOptions”interface PivotDrilldownControllerOptions { /** Default page size used when `load` does not specify a limit. */ defaultLimit?: number; /** Correlation id generator used by the request builder. */ createRequestId?: () => string}PivotDrilldownStateListener
Section titled “PivotDrilldownStateListener”export type PivotDrilldownStateListener = (state: PivotDrilldownState) => void;PivotDrilldownController
Section titled “PivotDrilldownController”class PivotDrilldownController { getState();
subscribe(listener: PivotDrilldownStateListener);
async load(input: PivotDrilldownRequestInput, signal?: AbortSignal);
abort();
reset();}savePivotView
Section titled “savePivotView”export async function savePivotView( store: PivotRemoteStore, options: PivotSaveViewOptions,): Promise<PivotSavedView>;loadPivotView
Section titled “loadPivotView”export async function loadPivotView( store: PivotRemoteStore, options: PivotLoadViewOptions,): Promise<PivotSavedView>;createPivotSavedViewState
Section titled “createPivotSavedViewState”export function createPivotSavedViewState( config: Partial<PivotConfig>, metadata: { name?: string; savedAt?: string } = {},): PivotSavedViewState;serializePivotConfig
Section titled “serializePivotConfig”export function serializePivotConfig(config: Partial<PivotConfig>): Partial<PivotConfig>;pivotSavedViewFromState
Section titled “pivotSavedViewFromState”export function pivotSavedViewFromState(response: PivotStateResponse): PivotSavedView;renamePivotSavedView
Section titled “renamePivotSavedView”export function renamePivotSavedView( views: readonly PivotSavedViewRecord[], options: PivotRenameViewOptions,): PivotSavedViewRecord[];duplicatePivotSavedView
Section titled “duplicatePivotSavedView”export function duplicatePivotSavedView( views: readonly PivotSavedViewRecord[], options: PivotDuplicateViewOptions,): PivotSavedViewRecord[];deletePivotSavedView
Section titled “deletePivotSavedView”export function deletePivotSavedView( views: readonly PivotSavedViewRecord[], options: PivotDeleteViewOptions,): PivotSavedViewRecord[];PIVOT_SAVED_VIEW_STATE_KIND
Section titled “PIVOT_SAVED_VIEW_STATE_KIND”PIVOT_SAVED_VIEW_STATE_KIND: string;PIVOT_SAVED_VIEW_STATE_VERSION
Section titled “PIVOT_SAVED_VIEW_STATE_VERSION”PIVOT_SAVED_VIEW_STATE_VERSION: 2;PivotSavedViewRef
Section titled “PivotSavedViewRef”interface PivotSavedViewRef { /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotSavedView (Extended from index.ts)
Section titled “PivotSavedView (Extended from index.ts)”interface PivotSavedView { /** Serializable Pivot configuration restored from the saved view payload. */ config: Partial<PivotConfig>; /** Optional display name supplied by the application. */ name?: string; /** Optional ISO timestamp supplied by the application or backend. */ savedAt?: string; /** Persisted state schema version. */ version: number; /** Optional echoed correlation id from the remote state response. */ requestId?: string; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotSavedViewDeleteIntent (Extended from index.ts)
Section titled “PivotSavedViewDeleteIntent (Extended from index.ts)”interface PivotSavedViewDeleteIntent { /** Marks a saved view for deletion by the application or remote state sync layer. */ deleted: true; /** Optional ISO timestamp supplied by the application. */ deletedAt?: string; /** Optional client-generated correlation id. */ requestId?: string; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotSavedViewRecord
Section titled “PivotSavedViewRecord”export type PivotSavedViewRecord = PivotSavedView | PivotSavedViewDeleteIntent;PivotSaveViewOptions (Extended from index.ts)
Section titled “PivotSaveViewOptions (Extended from index.ts)”interface PivotSaveViewOptions { /** Active Pivot config to serialize into the remote state payload. */ config: Partial<PivotConfig>; /** Optional display name supplied by the application. */ name?: string; /** Optional client-generated correlation id. */ requestId?: string; /** Optional ISO timestamp. Defaults to the current time. */ savedAt?: string; /** Optional abort signal forwarded to the remote store. */ signal?: AbortSignal; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotRenameViewOptions (Extended from index.ts)
Section titled “PivotRenameViewOptions (Extended from index.ts)”interface PivotRenameViewOptions { /** Next display name for the saved view. */ name: string; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotDuplicateViewOptions (Extended from index.ts)
Section titled “PivotDuplicateViewOptions (Extended from index.ts)”interface PivotDuplicateViewOptions { /** Optional nonblank identifier; must not collide with this user's active or deleted views. */ newViewId?: string; /** Optional duplicated view name. Defaults to "<source name> Copy". */ name?: string; /** Optional ISO timestamp copied into the duplicated view. */ savedAt?: string; /** Optional client-generated correlation id. */ requestId?: string; /** Stable id factory; its result must be nonblank and unique among this user's records. */ generateId?: (view: PivotSavedView, views: readonly PivotSavedViewRecord[]) => string; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotDeleteViewOptions (Extended from index.ts)
Section titled “PivotDeleteViewOptions (Extended from index.ts)”interface PivotDeleteViewOptions { /** Optional ISO timestamp supplied by the application. */ deletedAt?: string; /** Optional client-generated correlation id. */ requestId?: string; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotLoadViewOptions (Extended from index.ts)
Section titled “PivotLoadViewOptions (Extended from index.ts)”interface PivotLoadViewOptions { /** Optional abort signal forwarded to the remote store. */ signal?: AbortSignal; /** User identifier that owns the saved view. */ userId: string; /** View identifier used by the remote state store. */ viewId: string}PivotSavedViewState (Extended from index.ts)
Section titled “PivotSavedViewState (Extended from index.ts)”interface PivotSavedViewState { kind: typeof PIVOT_SAVED_VIEW_STATE_KIND; version: typeof PIVOT_SAVED_VIEW_STATE_VERSION; config: Partial<PivotConfig>; name?: string; savedAt?: string}createFieldRegistry
Section titled “createFieldRegistry”Converts a field entry list into an id-addressable registry map.
export function createFieldRegistry(entries: FieldRegistryEntry[]): PivotFieldRegistry;getFieldRegistryEntry
Section titled “getFieldRegistryEntry”Resolves a public selector or throws the stable invalid-selector error.
export function getFieldRegistryEntry( registry: PivotFieldRegistry, selector: string,): FieldRegistryEntry;assertSummaryAllowed
Section titled “assertSummaryAllowed”Validates that a requested summary is allowed for the selector.
export function assertSummaryAllowed( registry: PivotFieldRegistry, descriptor: PivotSummaryDescriptor,);assertGroupIntervalAllowed
Section titled “assertGroupIntervalAllowed”Validates that a requested grouping interval is allowed for the selector.
export function assertGroupIntervalAllowed( registry: PivotFieldRegistry, descriptor: PivotGroupDescriptor,);assertDrilldownColumnsAllowed
Section titled “assertDrilldownColumnsAllowed”Validates that requested drill-down columns are safe to expose.
export function assertDrilldownColumnsAllowed( registry: PivotFieldRegistry, columns: string[] = [],);assertRemotePivotSummaryIdentities
Section titled “assertRemotePivotSummaryIdentities”Backend transport has a closed summary vocabulary; local configured aliases are not backend authority.
export function assertRemotePivotSummaryIdentities(request: Pick<PivotLoadRequest, 'loadOptions'>): void;;BackendExpression
Section titled “BackendExpression”interface BackendExpression { kind: 'column' | 'sql'; value: string}FieldRegistryEntry
Section titled “FieldRegistryEntry”interface FieldRegistryEntry { id: string; label: string; dataType: PivotFieldDataType; expression: BackendExpression; allowedOperations: PivotFilterOperation[]; allowedSummaries?: PivotSummaryType[]; allowedGroupIntervals?: PivotGroupInterval[]; drilldownVisible?: boolean}PivotFieldRegistry
Section titled “PivotFieldRegistry”export type PivotFieldRegistry = Record<string, FieldRegistryEntry>;createPivotErrorResponse
Section titled “createPivotErrorResponse”Serializes either a PivotError or a raw payload into the wire format.
export function createPivotErrorResponse( requestId: string, error: PivotError | PivotErrorPayload,): PivotErrorResponse;PivotErrorCode
Section titled “PivotErrorCode”Pivot errors define the stable, serializable error contract shared by local validation and remote endpoint implementations.
/** * Pivot errors define the stable, serializable error contract shared by local * validation and remote endpoint implementations. */
export type PivotErrorCode = | 'PIVOT_NOT_ACTIVE' | 'REVISION_MISMATCH' | 'INVALID_HIERARCHY_PATH' | 'HIERARCHY_UNAVAILABLE' | 'INVALID_SELECTOR' | 'INVALID_FILTER_OPERATION' | 'INVALID_SUMMARY_TYPE' | 'INVALID_GROUP_INTERVAL' | 'WINDOW_LIMIT_EXCEEDED' | 'EXPANSION_LIMIT_EXCEEDED' | 'AUTH_REQUIRED' | 'FORBIDDEN' | 'STATE_NOT_FOUND' | 'CACHE_INVALIDATION_FORBIDDEN' | 'INTERNAL_ERROR';PivotErrorPayload
Section titled “PivotErrorPayload”interface PivotErrorPayload { code: PivotErrorCode; message: string; details?: Record<string, unknown>}PivotErrorResponse
Section titled “PivotErrorResponse”interface PivotErrorResponse { requestId: string; error: PivotErrorPayload}PivotError
Section titled “PivotError”Error class carrying the public Pivot error code and optional details.
class PivotError {}normalizePivotLoadRequest
Section titled “normalizePivotLoadRequest”Normalizes and validates a pivot load request.
export function normalizePivotLoadRequest( request: PivotLoadRequest, registry: PivotFieldRegistry, limits: PivotLimits = DEFAULT_PIVOT_LIMITS,): NormalizedPivotLoadRequest;normalizeAggregateFilterExpression
Section titled “normalizeAggregateFilterExpression”Validates both the semantic HAVING tree and the legacy flat descriptor list.
export function normalizeAggregateFilterExpression( expression: | PivotAggregateFilterExpression | PivotAggregateFilterDescriptor[] | undefined, registry: PivotFieldRegistry, limits: Pick< PivotLimits, 'maxSummaryDescriptors' | 'maxExpansionDepth' | 'maxFilterDepth' > = DEFAULT_PIVOT_LIMITS,): | PivotAggregateFilterExpression | PivotAggregateFilterDescriptor[] | undefined;normalizeAggregateFilters
Section titled “normalizeAggregateFilters”Validates post-aggregation filters without treating generated props as fields.
export function normalizeAggregateFilters( filters: PivotAggregateFilterDescriptor[], registry: PivotFieldRegistry, limits: Pick<PivotLimits, 'maxSummaryDescriptors' | 'maxExpansionDepth'> = DEFAULT_PIVOT_LIMITS,): PivotAggregateFilterDescriptor[] | undefined;normalizePivotDrilldownRequest
Section titled “normalizePivotDrilldownRequest”Normalizes and validates a drill-down request.
export function normalizePivotDrilldownRequest( request: PivotDrilldownRequest, registry: PivotFieldRegistry, limits: PivotLimits = DEFAULT_PIVOT_LIMITS,): NormalizedPivotDrilldownRequest;normalizeFilterExpression
Section titled “normalizeFilterExpression”Validates and normalizes nested filter expressions recursively.
export function normalizeFilterExpression( filter: PivotFilterExpression, registry: PivotFieldRegistry, maxDepth: number, depth = 1,): PivotFilterExpression;normalizeExpandedPaths
Section titled “normalizeExpandedPaths”Sorts and validates analytical expansion paths.
export function normalizeExpandedPaths( expandedPaths: PivotPath[] = [], limits: Pick<PivotLimits, 'maxExpandedPaths' | 'maxExpansionDepth'> = DEFAULT_PIVOT_LIMITS,);normalizeViewportAxis
Section titled “normalizeViewportAxis”Enforces viewport limits and normalized expansion state for one axis.
export function normalizeViewportAxis( viewport: PivotAxisViewport, maxWindowSize: number, limits: Pick<PivotLimits, 'maxExpandedPaths' | 'maxExpansionDepth'> = DEFAULT_PIVOT_LIMITS,): PivotAxisViewport;normalizeSummaries
Section titled “normalizeSummaries”Validates and canonicalizes summary descriptors.
export function normalizeSummaries( descriptors: PivotSummaryDescriptor[], registry: PivotFieldRegistry, limits: Pick<PivotLimits, 'maxSummaryDescriptors'> = DEFAULT_PIVOT_LIMITS,);normalizeGroups
Section titled “normalizeGroups”Validates and canonicalizes grouping descriptors.
export function normalizeGroups( descriptors: PivotGroupDescriptor[], registry: PivotFieldRegistry, limits: Pick<PivotLimits, 'maxGroupDescriptors'> = DEFAULT_PIVOT_LIMITS,);getSummaryResultId
Section titled “getSummaryResultId”Builds the stable result-field name for a summary descriptor.
export function getSummaryResultId(summary: PivotSummaryDescriptor);NormalizedPivotLoadRequest
Section titled “NormalizedPivotLoadRequest”export type NormalizedPivotLoadRequest = PivotLoadRequest;NormalizedPivotDrilldownRequest
Section titled “NormalizedPivotDrilldownRequest”export type NormalizedPivotDrilldownRequest = PivotDrilldownRequest;DEFAULT_PIVOT_LIMITS
Section titled “DEFAULT_PIVOT_LIMITS”DEFAULT_PIVOT_LIMITS: { maxRowWindowSize: number; maxColumnWindowSize: number; maxExpandedPaths: number; maxExpansionDepth: number; maxDrilldownLimit: number; maxSummaryDescriptors: number; maxGroupDescriptors: number; maxFilterDepth: number;};stableStringify
Section titled “stableStringify”Stringifies nested values with stable object key ordering.
export function stableStringify(value: unknown): string;createPivotCacheKey
Section titled “createPivotCacheKey”Builds the canonical cache key for a pivot load window.
export function createPivotCacheKey(context: PivotCacheKeyContext): string;PivotCacheKeyContext
Section titled “PivotCacheKeyContext”interface PivotCacheKeyContext { tenantId: string; viewId: string; fieldsVersion: string; datasetWatermark?: string; request: Omit<PivotLoadRequest, 'requestId' | 'viewId' | 'fieldsVersion'>}PlannedPivotSummary (Extended from index.ts)
Section titled “PlannedPivotSummary (Extended from index.ts)”interface PlannedPivotSummary { resultId: string; execution: | { type: 'direct'; field: FieldRegistryEntry; } | { type: 'composite'; components: Array<{ selector: string; summaryType: 'sum' | 'count'; }>; }; /** Optional stable measure id, required when one selector is used more than once. */ id?: string; /** Public field id of the measure being aggregated. */ selector: string; /** Stable summary function id returned by the analytical engine. */ /** Local configured aggregate identity; remote registries still allow only PivotSummaryType. */ summaryType: string; /** Optional post-aggregation calculation advertised by the engine. */ calculation?: PivotValueCalculation}PivotQueryPlan
Section titled “PivotQueryPlan”interface PivotQueryPlan { request: PivotLoadRequest; filteredBaseDataset: { viewId: string; fieldsVersion: string; filter?: PivotLoadRequest['loadOptions']['filter']; }; rowAxis: { groups: PivotGroupDescriptor[]; viewport: PivotLoadRequest['viewport']['rowAxis']; }; columnAxis: { groups: PivotGroupDescriptor[]; viewport: PivotLoadRequest['viewport']['columnAxis']; }; summaries: PlannedPivotSummary[]; /** Post-aggregation predicates compiled by the backend as HAVING clauses. */ having: PivotLoadRequest['loadOptions']['having']; orderBy: PivotLoadRequest['loadOptions']['sort']}DrilldownQueryPlan
Section titled “DrilldownQueryPlan”interface DrilldownQueryPlan { request: PivotDrilldownRequest; filteredBaseDataset: PivotQueryPlan['filteredBaseDataset']; visibleFields: FieldRegistryEntry[]}PivotQueryPlanner
Section titled “PivotQueryPlanner”interface PivotQueryPlanner { planLoad(request: PivotLoadRequest): PivotQueryPlan; planDrilldown(request: PivotDrilldownRequest): DrilldownQueryPlan}SqlPivotQueryPlanner
Section titled “SqlPivotQueryPlanner”SQL-oriented logical planner that resolves field metadata and summaries.
class SqlPivotQueryPlanner { planLoad(request: PivotLoadRequest): PivotQueryPlan;
planDrilldown(request: PivotDrilldownRequest): DrilldownQueryPlan;}ClientPivotEngineAdapter
Section titled “ClientPivotEngineAdapter”Client adapter keeps the existing client-side pivot behaviour behind the same engine interface used by the remote path.
class ClientPivotEngineAdapter { async load( request: PivotLoadRequest, signal?: AbortSignal, ): Promise<PivotLoadResponse>;
async drilldown(request: PivotDrilldownRequest, signal?: AbortSignal): Promise<PivotDrilldownResponse>;
async filterValues(request: PivotFilterValuesRequest, signal?: AbortSignal): Promise<PivotFilterValuesResponse>;}ServerPivotEngineAdapter
Section titled “ServerPivotEngineAdapter”Remote adapter forwards requests to a framework-agnostic PivotRemoteStore.
class ServerPivotEngineAdapter { exportReport(request: PivotFullExportRequest, context?: PivotFullExportContext);
load(request: PivotLoadRequest, signal?: AbortSignal);
drilldown(request: PivotDrilldownRequest, signal?: AbortSignal);
filterValues(request: PivotFilterValuesRequest, signal?: AbortSignal);}getPivotColumnPaths
Section titled “getPivotColumnPaths”Derives the visible analytical column paths used by the client adapter.
export function getPivotColumnPaths( source: DataType[], config: Partial<PivotConfig>,);createGridModelFromPivotResponse
Section titled “createGridModelFromPivotResponse”Same projection kernel for synchronous adapters and cooperative local query results.
export function createGridModelFromPivotResponse(config: Partial<PivotConfig>, response: PivotLoadResponse): PivotGridModel;createGridModelFromPivotResponseWork
Section titled “createGridModelFromPivotResponseWork”export function* createGridModelFromPivotResponseWork(config: Partial<PivotConfig>, response: PivotLoadResponse): PivotWork<PivotGridModel>;materializePivotRows
Section titled “materializePivotRows”Materializes cell-level remote responses into row records keyed by row path. Pre-materialized row records are shallow-copied to attach semantic metadata.
export function materializePivotRows(config: Partial<PivotConfig>, response: PivotLoadResponse, materializedColumnPaths?: PivotGroupValue[][]): DataType[];materializePivotRowsWork
Section titled “materializePivotRowsWork”export function* materializePivotRowsWork( config: Partial<PivotConfig>, response: PivotLoadResponse, materializedColumnPaths?: PivotGroupValue[][],): PivotWork<DataType[]>;materializePivotGroupAggregates
Section titled “materializePivotGroupAggregates”Adds semantic group-path metadata to remote aggregate payloads without changing their legacy grouped-path keys.
export function materializePivotGroupAggregates(config: Partial<PivotConfig>, groupAggregates: Record<string, DataType> = {});materializePivotGroupAggregatesWork
Section titled “materializePivotGroupAggregatesWork”export function* materializePivotGroupAggregatesWork(config: Partial<PivotConfig>, groupAggregates: Record<string, DataType> = {}): PivotWork<Record<string, DataType>>;materializePivotSemanticGroupAggregates
Section titled “materializePivotSemanticGroupAggregates”Builds a collision-safe semantic aggregate index for analytical consumers. The legacy keyed record above remains dedicated to RevoGrid’s grouping UI.
export function materializePivotSemanticGroupAggregates(config: Partial<PivotConfig>, groupAggregates: Record<string, DataType> = {});materializePivotSemanticGroupAggregatesWork
Section titled “materializePivotSemanticGroupAggregatesWork”export function* materializePivotSemanticGroupAggregatesWork( config: Partial<PivotConfig>, groupAggregates: Record<string, DataType> = {},): PivotWork<Record<string, DataType>>;exportVisiblePivotToCsv
Section titled “exportVisiblePivotToCsv”Exports the currently visible Pivot grid model to CSV.
export function exportVisiblePivotToCsv(input: PivotCsvExportInput): string;flattenPivotCsvColumns
Section titled “flattenPivotCsvColumns”Flattens grouped Pivot headers into one leaf entry per visible value column.
export function flattenPivotCsvColumns( columns: Array<ColumnGrouping | ColumnRegular>, headerPathDelimiter = DEFAULT_HEADER_PATH_DELIMITER,): PivotCsvLeafColumn[];PivotCsvExportOptions
Section titled “PivotCsvExportOptions”interface PivotCsvExportOptions { /** Cell delimiter. Defaults to comma. */ columnDelimiter?: string; /** Row delimiter. Defaults to CRLF. */ rowDelimiter?: string; /** Prefix the CSV with a UTF-8 BOM. Defaults to false. */ bom?: boolean; /** Separator used when flattening grouped headers. Defaults to ` / `. */ headerPathDelimiter?: string}PivotCsvExportInput (Extended from index.ts)
Section titled “PivotCsvExportInput (Extended from index.ts)”interface PivotCsvExportInput { /** Current visible Pivot columns. Grouped columns are flattened to leaves. */ columns: Array<ColumnGrouping | ColumnRegular>; /** Current visible body rows. */ source?: DataType[]; /** Current visible pinned bottom rows, appended after body rows. */ pinnedBottomSource?: DataType[]; /** Cell delimiter. Defaults to comma. */ columnDelimiter?: string; /** Row delimiter. Defaults to CRLF. */ rowDelimiter?: string; /** Prefix the CSV with a UTF-8 BOM. Defaults to false. */ bom?: boolean; /** Separator used when flattening grouped headers. Defaults to ` / `. */ headerPathDelimiter?: string}PivotDelimitedFormatOptions
Section titled “PivotDelimitedFormatOptions”interface PivotDelimitedFormatOptions { columnDelimiter: string; rowDelimiter: string}encodeDelimitedCell
Section titled “encodeDelimitedCell”export function encodeDelimitedCell( value: unknown, options: DelimitedFormatOptions, force = false,);capturePivotExportColumns
Section titled “capturePivotExportColumns”Capture logical visible headers in provider order, including pinning and reordered spans.
export function capturePivotExportColumns(viewports: readonly ColumnViewport[]): ExportColumn[];createPivotExportData
Section titled “createPivotExportData”Resolve synthetic grouped rows against the committed semantic aggregate model. Returns plain cell records, never grouping carriers. Values stay raw unless an explicit presentation formatter is supplied (print only).
export function createPivotExportData(input: { snapshot: PivotRuntimeSnapshot; columns: readonly ExportColumn[]; source: readonly DataType[]; pinnedBottomSource?: readonly DataType[]; formatValue?: PivotExportValueFormatter;}): PivotXlsxExportInput;createPivotVisibleRowResolver
Section titled “createPivotVisibleRowResolver”Resolve visible group carriers while retaining semantic measure metadata for copy formatting.
export function createPivotVisibleRowResolver(snapshot: PivotRuntimeSnapshot): (row: DataType) => DataType;capturePivotVisibleExportData
Section titled “capturePivotVisibleExportData”Synchronous capture prevents mixing row, column, and aggregate revisions.
export function capturePivotVisibleExportData(snapshot: PivotRuntimeSnapshot, providers: Pick<PluginProviders, 'column' | 'data'>, formatValue?: PivotExportValueFormatter): PivotXlsxExportInput;PivotExportValueFormatter
Section titled “PivotExportValueFormatter”Optional presentation-only projection; omitted by precise CSV/XLSX exports.
/** Optional presentation-only projection; omitted by precise CSV/XLSX exports. */export type PivotExportValueFormatter = (value: unknown, row: DataType, column: ColumnRegular) => unknown;exportVisiblePivotToXlsx
Section titled “exportVisiblePivotToXlsx”Exports grouped headers, typed numeric cells, visible rows and pinned totals as real XLSX bytes.
export function exportVisiblePivotToXlsx(input: PivotXlsxExportInput): Uint8Array;PivotXlsxExportInput (Extended from index.ts)
Section titled “PivotXlsxExportInput (Extended from index.ts)”interface PivotXlsxExportInput { /** Native Excel number formats, aligned with body then pinned rows and flattened leaf columns. * Captured from semantic measure identities by PivotPlugin.getVisibleExportData(). * Undefined retains the helper's default; General preserves raw unsupported formats. */ cellNumberFormats?: ReadonlyArray<ReadonlyArray<string | undefined>>; /** Current visible Pivot columns. Grouped columns are flattened to leaves. */ columns: Array<ColumnGrouping | ColumnRegular>; /** Current visible body rows. */ source?: DataType[]; /** Current visible pinned bottom rows, appended after body rows. */ pinnedBottomSource?: DataType[]; /** Cell delimiter. Defaults to comma. */ columnDelimiter?: string; /** Row delimiter. Defaults to CRLF. */ rowDelimiter?: string; /** Prefix the CSV with a UTF-8 BOM. Defaults to false. */ bom?: boolean; /** Separator used when flattening grouped headers. Defaults to ` / `. */ headerPathDelimiter?: string}createPivotPrintValueFormatter
Section titled “createPivotPrintValueFormatter”Reuses grid measure formatting before export projection discards semantic metadata.
export function createPivotPrintValueFormatter(config: Partial<PivotConfig>): PivotExportValueFormatter;buildPivotPrintTable
Section titled “buildPivotPrintTable”Creates the printable result table from the same visible grid model used by CSV/XLSX.
export function buildPivotPrintTable(input: PivotPrintTableInput): string;PivotPrintTableInput
Section titled “PivotPrintTableInput”Supply resolved cell records, for example PivotPlugin.getVisibleExportData().
/** Supply resolved cell records, for example PivotPlugin.getVisibleExportData(). */export type PivotPrintTableInput = Pick<PivotCsvExportInput, 'columns' | 'source' | 'pinnedBottomSource'>;buildPivotCopyTsv
Section titled “buildPivotCopyTsv”Builds clipboard-ready TSV for the visible Pivot model.
export function buildPivotCopyTsv(input: PivotTsvCopyInput): string;flattenPivotCopyColumns
Section titled “flattenPivotCopyColumns”export function flattenPivotCopyColumns( columns: Array<ColumnGrouping | ColumnRegular>,): PivotCopyLeafColumn[];PivotTsvCopyInput
Section titled “PivotTsvCopyInput”interface PivotTsvCopyInput { /** Current visible Pivot columns. Grouped columns are treated as header levels. */ columns: Array<ColumnGrouping | ColumnRegular>; /** Current visible body rows. */ source?: DataType[]; /** Current visible pinned bottom rows, appended after body rows. */ pinnedBottomSource?: DataType[]; /** Optional leaf props to include, in the requested order. */ selectedProps?: ColumnProp[]; /** Optional absolute row indexes from source + pinnedBottomSource to include. */ selectedRowIndexes?: number[]; /** Optional rows to include instead of source + pinnedBottomSource. */ selectedRows?: DataType[]; /** Cell delimiter. Defaults to tab. */ columnDelimiter?: string; /** Row delimiter. Defaults to LF, matching clipboard text conventions. */ rowDelimiter?: string; /** Optional display transformation applied before TSV escaping. */ formatValue?: ( value: unknown, column: PivotCopyLeafColumn, row: DataType, ) => unknown}PivotCopyLeafColumn
Section titled “PivotCopyLeafColumn”interface PivotCopyLeafColumn { prop: ColumnProp; headers: string[]; rowAxis: boolean}createPivotFilterChips
Section titled “createPivotFilterChips”Converts RevoGrid and/or Pivot expression filters into render-ready chip models.
export function createPivotFilterChips( input: PivotFilterChipInput, options: PivotFilterChipOptions = {},): PivotFilterChip[];createPivotFilterChipsFromCollection
Section titled “createPivotFilterChipsFromCollection”Converts a RevoGrid filter collection into render-ready chip models.
export function createPivotFilterChipsFromCollection( collection?: Record<ColumnProp, FilterCollectionItem>, options: PivotFilterChipOptions = {},): PivotFilterChip[];createPivotFilterChipsFromExpression
Section titled “createPivotFilterChipsFromExpression”Converts a Pivot remote filter expression into render-ready chip models.
export function createPivotFilterChipsFromExpression( expression?: PivotFilterExpression, options: PivotFilterChipOptions = {},): PivotFilterChip[];createPivotFilterClearOneIntent
Section titled “createPivotFilterClearOneIntent”Builds an intent payload for clearing a single visible filter chip.
export function createPivotFilterClearOneIntent(chip: PivotFilterChip): PivotFilterClearOneIntent;createPivotFilterClearAllIntent
Section titled “createPivotFilterClearAllIntent”Builds an intent payload for clearing every visible filter chip.
export function createPivotFilterClearAllIntent(chips: readonly PivotFilterChip[] = []): PivotFilterClearAllIntent;applyPivotFilterClearIntentToCollection
Section titled “applyPivotFilterClearIntentToCollection”Applies clear intents to a RevoGrid filter collection without mutating caller state.
export function applyPivotFilterClearIntentToCollection( collection: Record<ColumnProp, FilterCollectionItem> | undefined, intent: PivotFilterClearIntent,): Record<ColumnProp, FilterCollectionItem> | undefined;PivotFilterChipSource
Section titled “PivotFilterChipSource”export type PivotFilterChipSource = 'revo-grid' | 'pivot-expression';PivotFilterChipLabelResolver
Section titled “PivotFilterChipLabelResolver”interface PivotFilterChipLabelResolver { /** Optional field-label lookup used instead of raw field selectors. */ fieldLabel?: (selector: string) => string | undefined; /** Optional operation-label lookup used instead of built-in operation labels. */ operationLabel?: (operation: string) => string | undefined; /** Optional value formatter used instead of built-in value labels. */ valueLabel?: (value: unknown, selector: string, operation: string) => string | undefined}PivotFilterChip
Section titled “PivotFilterChip”interface PivotFilterChip { /** Stable id for rendering and clear-one actions. */ id: string; /** Original field selector. */ selector: string; /** Human-readable field label. */ fieldLabel: string; /** Filter operation id from RevoGrid or Pivot remote filters. */ operation: string; /** Human-readable operation label. */ operationLabel: string; /** Raw filter value, kept for caller-owned editor or telemetry needs. */ value: unknown; /** Human-readable value label. */ valueLabel: string; /** Complete visible chip label. */ label: string; /** Source filter model used to build the chip. */ source: PivotFilterChipSource; /** Path of the condition inside a Pivot filter expression tree. */ expressionPath?: readonly number[]}PivotFilterChipOptions (Extended from index.ts)
Section titled “PivotFilterChipOptions (Extended from index.ts)”interface PivotFilterChipOptions { /** Prefix included in generated chip ids when multiple Pivot views share UI. */ idPrefix?: string; /** Optional field-label lookup used instead of raw field selectors. */ fieldLabel?: (selector: string) => string | undefined; /** Optional operation-label lookup used instead of built-in operation labels. */ operationLabel?: (operation: string) => string | undefined; /** Optional value formatter used instead of built-in value labels. */ valueLabel?: (value: unknown, selector: string, operation: string) => string | undefined}PivotFilterChipInput
Section titled “PivotFilterChipInput”interface PivotFilterChipInput { /** RevoGrid filter collection from `beforefilterapply`. */ collection?: Record<ColumnProp, FilterCollectionItem>; /** Remote Pivot filter expression tree. */ expression?: PivotFilterExpression}PivotFilterClearOneIntent
Section titled “PivotFilterClearOneIntent”interface PivotFilterClearOneIntent { type: 'clear-one'; chipId: string; selector: string; source: PivotFilterChipSource; expressionPath?: readonly number[]}PivotFilterClearAllIntent
Section titled “PivotFilterClearAllIntent”interface PivotFilterClearAllIntent { type: 'clear-all'; selectors: string[]; sources: PivotFilterChipSource[]}PivotFilterClearIntent
Section titled “PivotFilterClearIntent”export type PivotFilterClearIntent = PivotFilterClearOneIntent | PivotFilterClearAllIntent;getInclusivePivotFilterValues
Section titled “getInclusivePivotFilterValues”export function getInclusivePivotFilterValues( selection: PivotFilterSelection | undefined,): PivotFilterScalar[];isPivotFilterExclusionSelection
Section titled “isPivotFilterExclusionSelection”export function isPivotFilterExclusionSelection( selection: PivotFilterSelection | undefined,): selection is Exclude<PivotFilterSelection, unknown[]>;hasActivePivotFilterSelection
Section titled “hasActivePivotFilterSelection”export function hasActivePivotFilterSelection( selection: PivotFilterSelection | undefined,): boolean;clonePivotFilterSelectionMap
Section titled “clonePivotFilterSelectionMap”export function clonePivotFilterSelectionMap( selections: PivotFilterSelectionMap,): PivotFilterSelectionMap;getPivotMemberFilterProps
Section titled “getPivotMemberFilterProps”Fields whose member predicates participate in the current Pivot layout.
export function getPivotMemberFilterProps( config: PivotMemberFilterConfig,): ColumnProp[];prunePivotFilterSelections
Section titled “prunePivotFilterSelections”Drops hidden predicates after a field leaves every filterable layout role.
export function prunePivotFilterSelections( config: PivotMemberFilterConfig,): PivotFilterSelectionMap;filterPivotSource
Section titled “filterPivotSource”Filters raw client-side rows before Pivot grouping and aggregation. Inclusive arrays use OR within a field; exclusion selections invert that field predicate. Independent fields retain AND semantics.
export function filterPivotSource<T extends DataType>( source: T[], config: PivotMemberFilterConfig, options: { semanticValues?: boolean } = {},): T[];filterPivotSourceWork
Section titled “filterPivotSourceWork”export function* filterPivotSourceWork<T extends DataType>( source: T[], config: PivotMemberFilterConfig, options: { semanticValues?: boolean } = {},): PivotWork<T[]>;PivotMemberFilterConfig
Section titled “PivotMemberFilterConfig”export type PivotMemberFilterConfig = Pick< Partial<PivotConfig>, 'rows' | 'columns' | 'filters' | 'filterSelections'>;createPivotDiagnosticsModel
Section titled “createPivotDiagnosticsModel”Converts remote Pivot response metadata into render-ready diagnostics rows and chips.
export function createPivotDiagnosticsModel( response: PivotDiagnosticsResponseInput, options: PivotDiagnosticsFormatterOptions = {},): PivotDiagnosticsModel;PivotDiagnosticTone
Section titled “PivotDiagnosticTone”export type PivotDiagnosticTone = 'neutral' | 'success' | 'warning';PivotDiagnosticRow
Section titled “PivotDiagnosticRow”interface PivotDiagnosticRow { /** Stable id for row rendering and tests. */ id: 'elapsed' | 'generatedAt' | 'visibleRows' | 'visibleColumns'; /** Human-readable row label. */ label: string; /** Human-readable row value. */ value: string; /** Raw value kept for sorting, telemetry, or custom formatting. */ rawValue?: string | number}PivotDiagnosticChip
Section titled “PivotDiagnosticChip”interface PivotDiagnosticChip { /** Stable id for chip rendering and tests. */ id: string; /** Human-readable chip label. */ label: string; /** Chip visual tone hint. */ tone: PivotDiagnosticTone; /** Raw value kept for telemetry or custom rendering. */ rawValue?: string}PivotDiagnosticsModel
Section titled “PivotDiagnosticsModel”interface PivotDiagnosticsModel { rows: PivotDiagnosticRow[]; chips: PivotDiagnosticChip[]; warnings: string[]; hasWarnings: boolean}PivotDiagnosticsFormatterLabels
Section titled “PivotDiagnosticsFormatterLabels”interface PivotDiagnosticsFormatterLabels { elapsed: string; cache: string; generatedAt: string; visibleRows: string; visibleColumns: string; warning: string}PivotDiagnosticsFormatterOptions
Section titled “PivotDiagnosticsFormatterOptions”interface PivotDiagnosticsFormatterOptions { labels?: Partial<PivotDiagnosticsFormatterLabels>; formatGeneratedAt?: (generatedAt: string) => string}createPivotValueFormatter
Section titled “createPivotValueFormatter”Creates a reusable formatter for Pivot aggregate and axis values.
export function createPivotValueFormatter(config: PivotValueFormatConfig): PivotValueFormatter;createPivotNumericFormatter
Section titled “createPivotNumericFormatter”Shared Intl numeric policy for displayed values and native export formats.
export function createPivotNumericFormatter(config: PivotValueFormatConfig): Intl.NumberFormat | undefined;formatPivotValue
Section titled “formatPivotValue”Formats one Pivot value without keeping formatter state between calls.
export function formatPivotValue(value: unknown, config: PivotValueFormatConfig): string;PivotValueFormatPreset
Section titled “PivotValueFormatPreset”export type PivotValueFormatPreset = 'number' | 'currency' | 'percent' | 'date' | 'datetime';PivotValueFormatBase
Section titled “PivotValueFormatBase”interface PivotValueFormatBase { /** Locale forwarded to the matching Intl formatter. */ locale?: Intl.LocalesArgument; /** Display value for null or undefined input. Defaults to an empty string. */ nullDisplay?: string; /** Display value for values that cannot be formatted by the selected preset. Defaults to an empty string. */ invalidDisplay?: string}PivotNumberFormatConfig (Extended from index.ts)
Section titled “PivotNumberFormatConfig (Extended from index.ts)”interface PivotNumberFormatConfig { preset: 'number'; options?: Intl.NumberFormatOptions; /** Locale forwarded to the matching Intl formatter. */ locale?: Intl.LocalesArgument; /** Display value for null or undefined input. Defaults to an empty string. */ nullDisplay?: string; /** Display value for values that cannot be formatted by the selected preset. Defaults to an empty string. */ invalidDisplay?: string}PivotCurrencyFormatConfig (Extended from index.ts)
Section titled “PivotCurrencyFormatConfig (Extended from index.ts)”interface PivotCurrencyFormatConfig { preset: 'currency'; currency: string; options?: Omit<Intl.NumberFormatOptions, 'style' | 'currency'>; /** Locale forwarded to the matching Intl formatter. */ locale?: Intl.LocalesArgument; /** Display value for null or undefined input. Defaults to an empty string. */ nullDisplay?: string; /** Display value for values that cannot be formatted by the selected preset. Defaults to an empty string. */ invalidDisplay?: string}PivotPercentFormatConfig (Extended from index.ts)
Section titled “PivotPercentFormatConfig (Extended from index.ts)”interface PivotPercentFormatConfig { preset: 'percent'; options?: Omit<Intl.NumberFormatOptions, 'style'>; /** Locale forwarded to the matching Intl formatter. */ locale?: Intl.LocalesArgument; /** Display value for null or undefined input. Defaults to an empty string. */ nullDisplay?: string; /** Display value for values that cannot be formatted by the selected preset. Defaults to an empty string. */ invalidDisplay?: string}PivotDateFormatConfig (Extended from index.ts)
Section titled “PivotDateFormatConfig (Extended from index.ts)”interface PivotDateFormatConfig { preset: 'date'; options?: Intl.DateTimeFormatOptions; /** Locale forwarded to the matching Intl formatter. */ locale?: Intl.LocalesArgument; /** Display value for null or undefined input. Defaults to an empty string. */ nullDisplay?: string; /** Display value for values that cannot be formatted by the selected preset. Defaults to an empty string. */ invalidDisplay?: string}PivotDateTimeFormatConfig (Extended from index.ts)
Section titled “PivotDateTimeFormatConfig (Extended from index.ts)”interface PivotDateTimeFormatConfig { preset: 'datetime'; options?: Intl.DateTimeFormatOptions; /** Locale forwarded to the matching Intl formatter. */ locale?: Intl.LocalesArgument; /** Display value for null or undefined input. Defaults to an empty string. */ nullDisplay?: string; /** Display value for values that cannot be formatted by the selected preset. Defaults to an empty string. */ invalidDisplay?: string}PivotValueFormatConfig
Section titled “PivotValueFormatConfig”export type PivotValueFormatConfig = | PivotNumberFormatConfig | PivotCurrencyFormatConfig | PivotPercentFormatConfig | PivotDateFormatConfig | PivotDateTimeFormatConfig;PivotValueFormatter
Section titled “PivotValueFormatter”export type PivotValueFormatter = (value: unknown) => string;createPivotConditionalCellProperties
Section titled “createPivotConditionalCellProperties”export function createPivotConditionalCellProperties( rules: PivotConditionalFormatRule[], options: PivotConditionalCellPropertiesOptions = {},): PropertiesFunc;getPivotConditionalCellProperties
Section titled “getPivotConditionalCellProperties”export function getPivotConditionalCellProperties( params: CellTemplateProp, rules: PivotConditionalFormatRule[], options: PivotConditionalCellPropertiesOptions = {},): CellProps | undefined;isPivotAnalyticalCell
Section titled “isPivotAnalyticalCell”export function isPivotAnalyticalCell(params: Pick<CellTemplateProp, 'column'>): boolean;PivotConditionalFormatOperator
Section titled “PivotConditionalFormatOperator”export type PivotConditionalFormatOperator = | 'gt' | 'lt' | 'between' | 'equal' | 'contains';PivotConditionalFormatRule
Section titled “PivotConditionalFormatRule”interface PivotConditionalFormatRule { /** Comparison operation used against the rendered analytical cell value. */ operator: PivotConditionalFormatOperator; /** Comparison value for `gt`, `lt`, `equal`, and `contains`; tuple bounds for `between`. */ value?: unknown; /** Inclusive lower bound for `between` when `value` is not a tuple. */ min?: unknown; /** Inclusive upper bound for `between` when `value` is not a tuple. */ max?: unknown; /** Optional generated value field selector. Omit to target every analytical cell. */ field?: ColumnProp | ColumnProp[]; /** Optional class value merged into the returned RevoGrid cell props. */ class?: CellClassValue; /** Optional style value merged into the returned RevoGrid cell props. */ style?: CellStyleValue; /** Additional RevoGrid cell props to return when the rule matches. */ props?: CellProps; /** Makes `equal` and `contains` string comparisons case-sensitive. */ caseSensitive?: boolean}PivotConditionalCellPropertiesOptions
Section titled “PivotConditionalCellPropertiesOptions”interface PivotConditionalCellPropertiesOptions { /** * Return only the first matching rule or merge all matching rules. * Defaults to `first` for predictable conditional-formatting priority. */ match?: 'first' | 'all'; /** Allows applying rules to non-generated row fields. Defaults to false. */ includeNonAnalytical?: boolean}pivotConditionalFormattingPresets
Section titled “pivotConditionalFormattingPresets”pivotConditionalFormattingPresets: { gt: (value: unknown, props?: PivotConditionalFormatPresetProps) => PivotConditionalFormatRule; lt: (value: unknown, props?: PivotConditionalFormatPresetProps) => PivotConditionalFormatRule; between: (min: unknown, max: unknown, props?: PivotConditionalFormatPresetProps) => PivotConditionalFormatRule; equal: (value: unknown, props?: PivotConditionalFormatPresetProps) => PivotConditionalFormatRule; textContains: (value: unknown, props?: PivotConditionalFormatPresetProps) => PivotConditionalFormatRule;};evaluatePivotConditionalFormatRule
Section titled “evaluatePivotConditionalFormatRule”export function evaluateConditionalRule( value: unknown, rule: ConditionalRule,): boolean;createPivotSemanticSliceIndex
Section titled “createPivotSemanticSliceIndex”Builds the runtime lookup from hierarchy membership discovered during the
original Pivot aggregation pass. Only hierarchy is committed publicly;
the Maps remain bound to the successful runtime revision.
export function createPivotSemanticSliceIndex(options: CreatePivotSemanticSliceIndexOptions): PivotSemanticSliceIndex;createPivotSemanticSliceIndexWork
Section titled “createPivotSemanticSliceIndexWork”export function* createPivotSemanticSliceIndexWork({ axis, fields, fieldLabels, nodes, rows,}: CreatePivotSemanticSliceIndexOptions): PivotWork<PivotSemanticSliceIndex>;queryPivotSemanticSlice
Section titled “queryPivotSemanticSlice”Resolves one immediate-child row slice without scanning or repivoting data.
export function queryPivotSemanticSlice( index: PivotSemanticSliceIndex, request: PivotSemanticSliceRequest,): PivotSemanticSlice;PivotHierarchyAxis
Section titled “PivotHierarchyAxis”export type PivotHierarchyAxis = 'row' | 'column';PivotHierarchyLevel
Section titled “PivotHierarchyLevel”interface PivotHierarchyLevel { readonly id: string; readonly axis: PivotHierarchyAxis; readonly index: number; readonly prop: ColumnProp; readonly label: string}PivotHierarchyMember
Section titled “PivotHierarchyMember”interface PivotHierarchyMember { readonly id: string; readonly axis: PivotHierarchyAxis; readonly hierarchyId: string; readonly levelId: string; readonly levelIndex: number; readonly path: readonly PivotAxisValue[]; readonly labels: readonly string[]; readonly parentId?: string; readonly hasChildren: boolean; readonly childCount: number}PivotHierarchyDescriptor
Section titled “PivotHierarchyDescriptor”interface PivotHierarchyDescriptor { readonly id: string; readonly axis: PivotHierarchyAxis; readonly levels: readonly PivotHierarchyLevel[]; readonly members: readonly PivotHierarchyMember[]}PivotRuntimeHierarchies
Section titled “PivotRuntimeHierarchies”interface PivotRuntimeHierarchies { readonly row?: PivotHierarchyDescriptor; readonly column?: PivotHierarchyDescriptor}PivotSemanticSliceRequest
Section titled “PivotSemanticSliceRequest”interface PivotSemanticSliceRequest { readonly revision: number; /** Parent row path. The result contains its immediate children. */ readonly rowPath: readonly PivotAxisValue[]}PivotSemanticSliceMember
Section titled “PivotSemanticSliceMember”interface PivotSemanticSliceMember { readonly member: PivotHierarchyMember; /** Values-on-rows layouts return one aggregate row per measure. */ readonly rows: readonly DataType[]}PivotSemanticSlice
Section titled “PivotSemanticSlice”interface PivotSemanticSlice { readonly revision: number; readonly rowPath: readonly PivotAxisValue[]; readonly members: readonly PivotSemanticSliceMember[]}PivotSemanticHierarchyNodeInput
Section titled “PivotSemanticHierarchyNodeInput”interface PivotSemanticHierarchyNodeInput { readonly path: readonly (PivotAxisValue | undefined)[]; readonly labels: readonly string[]; readonly childCount: number}PivotSemanticSliceIndex
Section titled “PivotSemanticSliceIndex”interface PivotSemanticSliceIndex { readonly hierarchy: PivotHierarchyDescriptor; readonly membersByPathId: ReadonlyMap<string, PivotHierarchyMember>; readonly childrenByParentPathId: ReadonlyMap<string, readonly PivotHierarchyMember[]>; readonly rowsByPathId: ReadonlyMap<string, readonly DataType[]>}CreatePivotSemanticSliceIndexOptions
Section titled “CreatePivotSemanticSliceIndexOptions”interface CreatePivotSemanticSliceIndexOptions { readonly axis: PivotHierarchyAxis; readonly fields: readonly ColumnProp[]; readonly fieldLabels: readonly string[]; readonly nodes: readonly PivotSemanticHierarchyNodeInput[]; readonly rows: readonly DataType[]}validatePivotFormulas
Section titled “validatePivotFormulas”Reject ambiguous IDs, missing operands and cycles before calculating a cube.
export function validatePivotFormulas(values: PivotConfig['values']): void;validatePivotFormulasWork
Section titled “validatePivotFormulasWork”export function* validatePivotFormulasWork(values: PivotConfig['values']): PivotWork<void>;applyPivotValueCalculations
Section titled “applyPivotValueCalculations”Applies configured show-values calculations to a fully aggregated client cube. Callers may project hidden totals after this pass.
export function applyPivotValueCalculations(input: Parameters<typeof applyPivotValueCalculationsWork>[0]): DataType[];applyPivotValueCalculationsWork
Section titled “applyPivotValueCalculationsWork”export function* applyPivotValueCalculationsWork(input: { rows: DataType[]; config: Partial<PivotConfig>; columnAxis: PivotColumnAxis; /** Internal raw dependencies that have no visible or explicitly requested display coordinate. */ rawOnlyColumnKeys?: ReadonlySet<string>;}): PivotWork<DataType[]>;evaluatePivotFormulaExpression
Section titled “evaluatePivotFormulaExpression”Shared formula arithmetic; opaque public resolvers remain one atomic call.
export function evaluatePivotFormulaExpression(expression: PivotFormulaExpression, resolveMeasure: (id: string) => number | null): number | null;evaluatePivotFormulaExpressionWork
Section titled “evaluatePivotFormulaExpressionWork”export function* evaluatePivotFormulaExpressionWork(expression: PivotFormulaExpression, resolveMeasure: (id: string) => PivotWork<number | null>): PivotWork<number | null>;getPivotRawValue
Section titled “getPivotRawValue”export function getPivotRawValue( row: DataType | undefined, prop: ColumnProp,): unknown;PivotValueCalculationType
Section titled “PivotValueCalculationType”export type PivotValueCalculationType = | 'percentOfGrandTotal' | 'percentOfRowTotal' | 'percentOfColumnTotal' | 'percentOfParentRowTotal' | 'percentOfParentColumnTotal' | 'index' | 'differenceFrom' | 'percentDifferenceFrom' | 'runningTotal' | 'percentRunningTotal' | 'rank' | 'formula';PivotFormulaExpression
Section titled “PivotFormulaExpression”Operands always refer to configured measure IDs, after aggregation.
/** Operands always refer to configured measure IDs, after aggregation. */export type PivotFormulaExpression = | { type: 'number'; value: number } | { type: 'measure'; id: string } | { type: 'binary'; operator: '+' | '-' | '*' | '/'; left: PivotFormulaExpression; right: PivotFormulaExpression };PivotValueCalculation
Section titled “PivotValueCalculation”export type PivotValueCalculation = | { type: | 'percentOfGrandTotal' | 'percentOfRowTotal' | 'percentOfColumnTotal' | 'percentOfParentRowTotal' | 'percentOfParentColumnTotal' | 'index'; } | { type: 'differenceFrom' | 'percentDifferenceFrom'; axis: 'rows' | 'columns'; field: ColumnProp; base: 'previous' | 'next' | PivotFilterScalar; } | { type: 'runningTotal' | 'percentRunningTotal'; axis: 'rows' | 'columns'; field: ColumnProp; } | { type: 'rank'; axis: 'rows' | 'columns'; field: ColumnProp; order?: 'asc' | 'desc'; } | { type: 'formula'; expression: PivotFormulaExpression; };PIVOT_RAW_VALUES
Section titled “PIVOT_RAW_VALUES”Raw aggregate values retained when calculated display values replace them.
PIVOT_RAW_VALUES: typeof PIVOT_RAW_VALUES;PivotRowWithRawValues (Extended from index.ts)
Section titled “PivotRowWithRawValues (Extended from index.ts)”export type PivotRowWithRawValues = DataType & { [PIVOT_RAW_VALUES]?: Readonly<Record<string, unknown>>;};PivotContextMenuEditorPort
Section titled “PivotContextMenuEditorPort”Internal mounted-owner adapter; absent on standalone context-menu hosts.
interface PivotContextMenuEditorPort { /** Attached stock actions share native admission and diagnostics with mounted editors. */ applyConfiguration?(config: Partial<PivotConfig>): Promise<boolean>; canOpen(context: PivotContextMenuContext): boolean; open(context: PivotContextMenuContext): boolean; reason?(context: PivotContextMenuContext): 'constructor' | 'pending' | 'identity' | 'policy' | undefined}PivotContextMenuPlugin
Section titled “PivotContextMenuPlugin”Dependencies
Section titled “Dependencies”- Auto-installed
ContextMenuPlugin: Contributes semantic Pivot commands to the shared Pro context menu. - Auto-installed
DialogPlugin,ConditionalFormattingDialogPlugin,ValueSelectionDialogPlugin: Uses shared Pro dialog plugins for Pivot context-menu workflows.
class PivotContextMenuPlugin { /** Runtime-only settings for future drill-through dialogs. */ setDrillThroughOptions(options: import('./pivot-drill-through.types').PivotDrillThroughOptions): void;
getDrillThroughDialog(): import('./pivot-drill-through.types').PivotDrillThroughDialog | undefined;
handleHeaderClick( event: CustomEvent<ColumnRegular & { originalEvent?: MouseEvent }>, ): boolean;
attach(host: PivotContextMenuHost, editorPort?: PivotContextMenuEditorPort): void;
detach(host?: PivotContextMenuHost): void;}PivotContextMenuActionHost
Section titled “PivotContextMenuActionHost”interface PivotContextMenuActionHost { updatePivotConfig(config: Partial<PivotConfig>): Promise<boolean>; setPivotSorting( prop: ColumnProp, order?: 'asc' | 'desc', measure?: PivotMeasureMeta, ): Promise<void>}PivotContextMenuActions
Section titled “PivotContextMenuActions”class PivotContextMenuActions { moveField( context: PivotContextMenuContext, target: Exclude<PivotContextMenuFieldRole, 'filters'> | 'filters', );
removeField(context: PivotContextMenuContext);
setAggregation(context: PivotContextMenuContext, aggregator: string);
setCalculation( context: PivotContextMenuContext, calculation?: PivotValueCalculation, );
setFormat( context: PivotContextMenuContext, format?: PivotValueFormatConfig, );
setValuesOnRows(context: PivotContextMenuContext, valuesOnRows: boolean);
keepOnly(context: PivotContextMenuContext);
clearFilter(context: PivotContextMenuContext);
setFilterSelection( context: PivotContextMenuContext, selection: PivotFilterSelection, );
setResultFilters( context: PivotContextMenuContext, resultFilters?: PivotAggregateFilterExpression, );
setConditionalFormatting( context: PivotContextMenuContext, rules: PivotConditionalFormatRule[], match: 'first' | 'all' = 'first', );
toggleGrandTotal(context: PivotContextMenuContext);
toggleSubtotals(context: PivotContextMenuContext);
setColumnCollapsed( context: PivotContextMenuContext, collapsed: boolean, all = false, );
setRowsExpanded( context: PivotContextMenuContext, expanded: boolean, all = false, );
sort(context: PivotContextMenuContext, order?: 'asc' | 'desc');}resolvePivotContextMenuContext
Section titled “resolvePivotContextMenuContext”export function resolvePivotContextMenuContext( menu: ContextMenuOpenContext, snapshot: PivotRuntimeSnapshot,): PivotContextMenuContext | undefined;PivotContextMenuHost (Extended from index.ts)
Section titled “PivotContextMenuHost (Extended from index.ts)”interface PivotContextMenuHost { getAuthoringController?(): Pick<PivotAuthoringController, 'getSnapshot' | 'subscribe'>; exportFullReport?(format: 'csv' | 'xlsx', options?: PivotFullExportContext): Promise<PivotFullExportResult>; getVisibleExportData(): PivotCsvExportInput; exportPivotReportJson(): string | Promise<string>; getRuntimeSnapshot(): PivotRuntimeSnapshot | null; getPivotOriginalSource(): readonly DataType[]; getPivotEngineCapabilities(): PivotEngineCapabilities; loadPivotFilterValues(input: { field: PivotSourceSelector; search?: string; offset: number; limit: number; signal?: AbortSignal; }): Promise<PivotFilterValuesResponse>; loadPivotDrilldown(input: { cell: PivotDrilldownCellRef; customColumns?: string[]; offset: number; limit: number; signal?: AbortSignal; }): Promise<PivotDrilldownResponse>; updatePivotConfig(config: Partial<PivotConfig>): Promise<boolean>; setPivotSorting( prop: ColumnProp, order?: 'asc' | 'desc', measure?: PivotMeasureMeta, ): Promise<void>}createPivotContextMenuLocaleText
Section titled “createPivotContextMenuLocaleText”export function createPivotContextMenuLocaleText( overrides?: Partial<PivotContextMenuLocaleText>,): PivotContextMenuLocaleText;formatPivotContextMenuText
Section titled “formatPivotContextMenuText”export function formatPivotContextMenuText( template: string, values: Record<string, string | number>,): string;resolvePivotCopyShortcut
Section titled “resolvePivotCopyShortcut”export function resolvePivotCopyShortcut( translatedShortcut?: string, platform = globalThis.navigator?.platform ?? '',): string;PIVOT_CONTEXT_MENU_EN
Section titled “PIVOT_CONTEXT_MENU_EN”PIVOT_CONTEXT_MENU_EN: { contextMenuAriaLabel: string; editMeasure: string; editMeasurePending: string; editMeasureUnavailable: string; editMeasureIdentityUnavailable: string; editMeasureOpenConstructor: string; moveField: string; fieldRoleUnavailable: string; valuesAxis: string; rows: string; columns: string; sort: string; sortAscending: string; sortDescending: string; clearSort: string; filter: string; keepOnly: string; clearFilter: string; moveToRows: string; moveToColumns: string; moveToValues: string; moveToFilters: string; removeField: string; removeUnavailable: string; expand: string; collapse: string; expandAll: string; collapseAll: string; totals: string; grandTotal: string; subtotals: string; aggregation: string; aggregatorLabels: { sum: string; count: string; avg: string; min: string; max: string; median: string; mode: string; range: string; variance: string; stdDev: string; varianceSample: string; stdDevSample: string; first: string; last: string; distinct: string; }; showValuesAs: string; noCalculation: string; percentOfGrandTotal: string; percentOfRowTotal: string; percentOfColumnTotal: string; percentOfParentRowTotal: string; percentOfParentColumnTotal: string; index: string; runningTotal: string; rank: string; rankDescending: string; differenceFromPrevious: string; rowCalculationGroup: string; columnCalculationGroup: string; numberFormat: string; number: string; currency: string; percent: string; clearFormat: string; conditionalFormatting: string; conditionalFormattingDescription: string; conditionalFormattingReplacementWarning: string; conditionalFormattingReplaceRules: string; rule: string; appearance: string; preview: string; sampleValue: string; drillThrough: string; searchColumns: string; columnOrder: string; drillThroughUnavailable: string; copy: string; copyWithHeaders: string; copyWithPivotHeaders: string; export: string; exportVisibleCsv: string; exportStateJson: string; exportFullCsv: string; exportFullXlsx: string; exportFullUnavailable: string; exportFullBusy: string; exportFullReceived: string; valuesOnRows: string; valuesOnColumns: string; copyShortcut: string; clipboardError: string; filterValuesUnavailable: string; filterUnavailable: string; sortUnavailable: string; aggregationUnavailable: string; calculationUnavailable: string; filterDescription: string; resultFilter: string; resultFilterDescription: string; resultFilterReadOnlyDescription: string; resultFilterAddCondition: string; resultFilterAnd: string; resultFilterOr: string; resultFilterValueRequired: string; searchValues: string; selectAllVisible: string; filterValuesLabel: string; selectedValues: string; noValues: string; blankValue: string; showingValues: string; valueCount: string; clear: string; cancel: string; apply: string; loadingValues: string; loadValuesError: string; greaterThan: string; lessThan: string; greaterThanOrEqual: string; lessThanOrEqual: string; notEqualTo: string; between: string; equalTo: string; contains: string; condition: string; value: string; secondValue: string; background: string; text: string; valuePlaceholder: string; maximumPlaceholder: string; clearRules: string; loadingRows: string; loadRowsError: string; close: string; closeDialog: string; rowCount: string;};PivotContextMenuConfig
Section titled “PivotContextMenuConfig”interface PivotContextMenuConfig { areas?: Partial<Record<PivotContextMenuSurface, boolean>>; items?: Partial<Record<PivotContextMenuItemId, boolean>>; allowFieldRemoving?: boolean; drillThrough?: false | { pageSize?: number; columns?: ColumnProp[]; /** Initial visible subset of available/requested columns. Empty hides all columns. */ visibleColumns?: ColumnProp[]; /** Show the searchable multi-selection column dropdown (default true). */ columnChooser?: boolean; }; filter?: false | { pageSize?: number; }; clipboard?: false | { formatted?: boolean; }; export?: false | { fileName?: string; }; localeText?: Partial<PivotContextMenuLocaleText>}PivotContextMenuItemId
Section titled “PivotContextMenuItemId”export type PivotContextMenuItemId = | 'editMeasure' | 'sort' | 'filter' | 'move' | 'remove' | 'expand' | 'collapse' | 'totals' | 'aggregation' | 'calculation' | 'numberFormat' | 'conditionalFormatting' | 'drillThrough' | 'copy' | 'export';PivotContextMenuLocaleText
Section titled “PivotContextMenuLocaleText”interface PivotContextMenuLocaleText { editMeasure?: string; editMeasurePending?: string; editMeasureUnavailable?: string; editMeasureIdentityUnavailable?: string; editMeasureOpenConstructor?: string; contextMenuAriaLabel: string; moveField: string; valuesAxis: string; rows: string; columns: string; sort: string; sortAscending: string; sortDescending: string; clearSort: string; filter: string; keepOnly: string; clearFilter: string; fieldRoleUnavailable: string; moveToRows: string; moveToColumns: string; moveToValues: string; moveToFilters: string; removeField: string; removeUnavailable: string; expand: string; collapse: string; expandAll: string; collapseAll: string; totals: string; grandTotal: string; subtotals: string; aggregation: string; aggregatorLabels: Record<string, string>; showValuesAs: string; noCalculation: string; percentOfGrandTotal: string; percentOfRowTotal: string; percentOfColumnTotal: string; percentOfParentRowTotal: string; percentOfParentColumnTotal: string; index: string; runningTotal: string; rank: string; rankDescending: string; differenceFromPrevious: string; rowCalculationGroup: string; columnCalculationGroup: string; numberFormat: string; number: string; currency: string; percent: string; clearFormat: string; conditionalFormatting: string; conditionalFormattingDescription: string; conditionalFormattingReplacementWarning: string; conditionalFormattingReplaceRules: string; rule: string; appearance: string; preview: string; sampleValue: string; drillThrough: string; searchColumns: string; columnOrder: string; drillThroughUnavailable: string; copy: string; copyWithHeaders: string; copyWithPivotHeaders: string; export: string; exportVisibleCsv: string; exportStateJson: string; exportFullCsv: string; exportFullXlsx: string; exportFullUnavailable: string; exportFullBusy: string; exportFullReceived: string; valuesOnRows: string; valuesOnColumns: string; copyShortcut: string; clipboardError: string; filterValuesUnavailable: string; filterUnavailable: string; sortUnavailable: string; aggregationUnavailable: string; calculationUnavailable: string; filterDescription: string; resultFilter: string; resultFilterDescription: string; resultFilterReadOnlyDescription: string; resultFilterAddCondition: string; resultFilterAnd: string; resultFilterOr: string; resultFilterValueRequired: string; searchValues: string; selectAllVisible: string; filterValuesLabel: string; selectedValues: string; noValues: string; blankValue: string; showingValues: string; valueCount: string; clear: string; cancel: string; apply: string; loadingValues: string; loadValuesError: string; greaterThan: string; lessThan: string; greaterThanOrEqual: string; lessThanOrEqual: string; notEqualTo: string; between: string; equalTo: string; contains: string; condition: string; value: string; secondValue: string; background: string; text: string; valuePlaceholder: string; maximumPlaceholder: string; clearRules: string; loadingRows: string; loadRowsError: string; close: string; closeDialog: string; rowCount: string}PivotContextMenuSurface
Section titled “PivotContextMenuSurface”export type PivotContextMenuSurface = | 'rowFieldHeader' | 'compactRowFieldHeader' | 'columnMemberHeader' | 'measureHeader' | 'rowMemberCell' | 'rowGroupCell' | 'valueCell' | 'subtotalCell' | 'grandTotalCell' | 'collapsedColumn';PivotContextMenuFieldRole
Section titled “PivotContextMenuFieldRole”export type PivotContextMenuFieldRole = | 'rows' | 'columns' | 'values' | 'filters';PivotContextMenuContext
Section titled “PivotContextMenuContext”interface PivotContextMenuContext { readonly surface: PivotContextMenuSurface; readonly menu: ContextMenuOpenContext; readonly snapshot: PivotRuntimeSnapshot; readonly field?: ColumnProp; readonly fields?: readonly ColumnProp[]; readonly fieldRole?: PivotContextMenuFieldRole; readonly valueIndex?: number; readonly measure?: PivotMeasureMeta; readonly row?: DataType; readonly rowMeta?: PivotRowMeta; readonly columnMeta?: PivotColumnMeta; /** Semantic row property used when the clicked surface has no sortable column. */ readonly sortProp?: ColumnProp; /** Generated value column used to sort aggregated Pivot rows. */ readonly sortColumnMeta?: PivotColumnMeta; readonly groupKey?: string; readonly member?: string | number | boolean | null}PivotContextMenuCommandDetail
Section titled “PivotContextMenuCommandDetail”interface PivotContextMenuCommandDetail { readonly id: PivotContextMenuItemId | string; readonly context: PivotContextMenuContext}PIVOT_CONTEXT_MENU_COMMAND_EVENT
Section titled “PIVOT_CONTEXT_MENU_COMMAND_EVENT”PIVOT_CONTEXT_MENU_COMMAND_EVENT: string;PivotDrillThroughOptions
Section titled “PivotDrillThroughOptions”Runtime customization; callbacks and grid plugins are not serialized into reports.
interface PivotDrillThroughOptions { /** Full RevoGrid properties. Applied after compact/read-only/filterable defaults. */ grid?: Partial<Components.RevoGrid>; /** Subscribe to grid events or extend the dialog. Return cleanup called on every close path. */ onGridReady?: (dialog: PivotDrillThroughDialog) => void | (() => void); /** Called for chooser changes and setVisibleColumns, including an empty selection. */ onColumnsChange?: (columns: ColumnProp[], dialog: PivotDrillThroughDialog) => void}PivotDrillThroughDialog
Section titled “PivotDrillThroughDialog”An active dialog session. Obtain it from PivotPlugin.getDrillThroughDialog().
interface PivotDrillThroughDialog { readonly grid: HTMLRevoGridElement; readonly context: PivotContextMenuContext; getAvailableColumns(): ColumnRegular[]; getVisibleColumns(): ColumnProp[]; setVisibleColumns(columns: readonly ColumnProp[]): void; /** Update any grid properties. New column definitions replace the chooser inventory. */ updateGrid(properties: Partial<Components.RevoGrid>): void; close(): void}createPivotExpandedPathKey
Section titled “createPivotExpandedPathKey”Canonical expansion key for a dimensional row prefix. Pair with expandedKeyEncoding: ‘semantic-v1’.
export function createPivotExpandedPathKey(path: readonly PivotAxisValue[]): string;getPivotExpandedPathKeysForConfig
Section titled “getPivotExpandedPathKeysForConfig”Translate analytical drill prefixes through the configured Values placement.
export function getPivotExpandedPathKeysForConfig(path: readonly PivotAxisValue[], config: Partial<PivotConfig>, selectedMeasure?: Pick<PivotMeasureMeta, 'id' | 'valueIndex'>): string[];createPivotStrictAggregators
Section titled “createPivotStrictAggregators”Portable V2 declarations for the shared strict aggregation compiler. Null and missing values are skipped by this preset. Native default callbacks retain their Number-coercion and count policies; see Aggregation policies above. Scalar identity is preserved, including empty strings and booleans.
export function createPivotStrictAggregators(options: PivotStrictAggregatorOptions): Array<Extract<PivotReportAggregatorV2, { kind: 'builtin' }>>;PivotStrictAggregatorOptions
Section titled “PivotStrictAggregatorOptions”interface PivotStrictAggregatorOptions { /** Scalar catalogs start with count; numeric catalogs start with sum. */ input: 'number' | 'numeric-string' | 'scalar'; /** Invalid values fail execution by default; skipping must be explicit. */ invalid?: 'error' | 'skip'}createPivotSummaryPresentationSource
Section titled “createPivotSummaryPresentationSource”Projects the last committed layout into Pro’s schema-independent summary. Pending/error states retain committed labels; pending states disable host actions. Ambiguous string-keyed member maps stay visible but disable all summary actions. Supply explicit Pro callbacks separately; this observer never applies configuration.
export function createPivotSummaryPresentationSource(owner: PivotSummaryPresentationOwner): PivotSummaryPanelPresentationSource;PivotSummaryPresentationOwner
Section titled “PivotSummaryPresentationOwner”Existing attached-owner observations only; no analytical mutation authority.
interface PivotSummaryPresentationOwner { getRuntimeSnapshot(): PivotRuntimeSnapshot | null; getAuthoringController(): Pick<PivotAuthoringController, 'getSnapshot' | 'subscribe'>}