@dzgrid/core
Every public name of @dzgrid/core, entry by entry, with its declaration as the published types give it. Made from api/dzgrid-core.api.txt, the surface a test keeps from shrinking between versions; the guides and the option pages say what each name does.
@dzgrid/core
Section titled “@dzgrid/core”AbortHandle
Section titled “AbortHandle”export interface AbortHandle { readonly signal: AbortSignalLike; abort(reason?: unknown): void;}AbortSignalLike
Section titled “AbortSignalLike”export interface AbortSignalLike { readonly aborted: boolean; readonly reason?: unknown;}AggCtx
Section titled “AggCtx”export interface AggCtx { readonly column: string; readonly level: number | null;}export type AggFn<V = unknown> = { agg(values: readonly (V | null)[], ctx: AggCtx): unknown;}['agg'];AggFuncName
Section titled “AggFuncName”export type AggFuncName = 'sum' | 'avg' | 'min' | 'max' | 'count' | 'first' | 'last';AnyFilterKind
Section titled “AnyFilterKind”export type AnyFilterKind = FilterKind<any, any>;BlockLoadingNode
Section titled “BlockLoadingNode”export interface BlockLoadingNode { readonly key: RowKey; readonly kind: 'loading'; readonly level: number; readonly parent: null; readonly failed: boolean;}CellAddr
Section titled “CellAddr”export interface CellAddr { readonly row: RowKey; readonly column: string;}CellClassContext
Section titled “CellClassContext”export interface CellClassContext<T, V = unknown> { readonly value: V | null; readonly text: string; readonly row: Readonly<T>; readonly key: RowKey; readonly column: string; readonly context: unknown;}CellFocus
Section titled “CellFocus”export type CellFocus = Extract<FocusPos, { readonly kind: 'cell';}>;CellRange
Section titled “CellRange”export interface CellRange { readonly anchor: CellAddr; readonly focus: CellAddr;}ChangeSource
Section titled “ChangeSource”export type ChangeSource = 'user' | 'host' | 'api' | 'data';ClientModel
Section titled “ClientModel”export interface ClientModel<T> extends RowModel<T> { readonly kind: 'client'; readonly allRows: DisplayedRows<T>; row(key: RowKey): DataNode<T> | undefined; readonly query: Query; readonly counts: { readonly total: number; readonly filtered: number; readonly displayed: number; }; readonly problems: readonly Problem[]; setRows(rows: Iterable<T>, source?: ChangeSource): TransactionResult; applyTransaction(tx: RowTransaction<T>, source?: ChangeSource): TransactionResult; setColumns(columns: ColumnLookup<T>, source?: ChangeSource): void; setContext(ctx: LocaleCtx, source?: ChangeSource): void; setReader(reader: ValueReader<T>, changed?: readonly string[]): void; reapply(source?: ChangeSource): void; readonly orderStale: boolean; setApp(context: unknown, source?: ChangeSource): void; setValues(column: string, o?: ValuesOptions): ValuesHandle; warmSearch(): SearchWarmup; tick(): void; isExpanded(key: RowKey): boolean; setExpansion(set: ReadonlySet<RowKey>, source?: ChangeSource): void; expand(rows: readonly RowKey[], expanded: boolean, source?: ChangeSource): readonly RowKey[]; expandable(depth?: number): readonly RowKey[]; expandAll(expanded: boolean, depth?: number, source?: ChangeSource): readonly RowKey[]; readonly diagnostics: { readonly foldBuilds: number; readonly filterRuns: number; readonly sortRuns: number; readonly displayedBuilds: number; readonly retested: number; readonly keyBuilds: number; readonly rankBuilds: number; readonly quickScanned: number; readonly displayBuilds: number; readonly pageCuts: number; readonly indexBuilds: number; readonly countBuilds: number; };}ClientOptions
Section titled “ClientOptions”export interface ClientOptions<T> { readonly rows: Iterable<T>; readonly getRowId: (row: T) => RowIdInput; readonly columns: ColumnLookup<T>; readonly ctx: LocaleCtx; readonly reader?: ValueReader<T>; readonly page?: PageOptions; readonly filterKinds?: (name: string) => AnyFilterKind | undefined; readonly now?: () => number; readonly shape?: RowShape<T>; readonly app?: unknown; readonly sameRow?: ((a: T, b: T) => boolean) | undefined;}CollatorSpec
Section titled “CollatorSpec”export interface CollatorSpec { readonly sensitivity?: 'base' | 'accent' | 'variant'; readonly numeric?: boolean;}ColumnChange
Section titled “ColumnChange”export interface ColumnChange { readonly changed: readonly string[]; readonly layoutChanged: boolean; readonly problems: readonly Problem[];}ColumnDef
Section titled “ColumnDef”export interface ColumnDef<T, V = unknown> { readonly id: string; readonly field?: string; readonly value?: (row: Readonly<T>) => V; readonly header?: string; readonly headerShort?: string; readonly type?: ColumnType; readonly codec?: ValueCodec<V>; readonly enumOptions?: readonly EnumOption[]; readonly assumeZone?: string; readonly numberFormat?: NumberFormatSpec; readonly instantFormat?: InstantFormatSpec; readonly width?: number; readonly minWidth?: number; readonly maxWidth?: number; readonly flex?: number; readonly resizable?: boolean; readonly movable?: boolean; readonly hideable?: false; readonly menu?: false; readonly chooser?: false; readonly sortable?: boolean; readonly groupable?: boolean; readonly aggFunc?: AggFuncName | AggFn<V>; readonly total?: AggFuncName | AggFn<V>; readonly headerVertical?: boolean; readonly headerWrap?: boolean; readonly collapsePriority?: number; readonly filter?: false | { readonly kind?: string; readonly floating?: boolean; readonly debounceMs?: number; readonly ops?: readonly string[]; readonly optionPart?: string; readonly exclude?: false; readonly start?: 'all' | 'empty'; readonly selectAll?: boolean; readonly maxConditions?: number; readonly matchCase?: boolean; readonly condition?: boolean; }; readonly pinned?: Side | null; readonly hidden?: boolean; readonly align?: 'start' | 'center' | 'end'; readonly headerAlign?: 'start' | 'center' | 'end'; readonly wrap?: boolean; readonly ui?: { readonly cell?: string; readonly header?: string; readonly tooltip?: string; readonly cellClass?: (c: CellClassContext<T, V>) => string | null | undefined; readonly headerClass?: string; readonly data?: Readonly<Record<string, unknown>>; }; readonly headerTooltip?: string; readonly tooltip?: (value: V | null, row: Readonly<T>, context: unknown) => string | null; readonly merge?: true | ((a: SpanCtx<T>, b: SpanCtx<T>) => boolean) | { readonly same?: (a: SpanCtx<T>, b: SpanCtx<T>) => boolean; readonly within?: readonly string[]; }; readonly rowSpan?: (ctx: SpanCtx<T>) => number; readonly colSpan?: (ctx: SpanCtx<T>) => number; readonly groupShow?: 'open' | 'closed'; readonly csv?: 'text'; readonly editable?: EditableRule<T>; readonly validate?: (value: V | null, row: Readonly<T>, context: unknown) => string | null | undefined; readonly edit?: EditChecks<T, V>;}ColumnFilter
Section titled “ColumnFilter”export type ColumnFilter = { readonly type: 'text'; readonly op: TextOp; readonly value?: string; readonly caseSensitive?: boolean;} | { readonly type: 'number'; readonly op: NumOp; readonly value?: number; readonly valueTo?: number;} | { readonly type: 'day'; readonly op: NumOp | 'relative'; readonly value?: Day | string; readonly valueTo?: Day | string; readonly range?: RelativeRange;} | { readonly type: 'instant'; readonly op: InstantOp | 'relative'; readonly day?: Day | string; readonly dayTo?: Day | string; readonly at?: string; readonly atTo?: string; readonly range?: RelativeRange;} | { readonly type: 'boolean'; readonly value: boolean | null;} | { readonly type: 'set'; readonly include?: readonly string[]; readonly exclude?: readonly string[]; readonly blanks?: 'include' | 'exclude';} | { readonly type: 'combined'; readonly join: 'and' | 'or'; readonly conditions: readonly ColumnFilter[];} | { readonly type: 'custom'; readonly kind: string; readonly state: Json;};ColumnGroupDef
Section titled “ColumnGroupDef”export interface ColumnGroupDef<T> { readonly id: string; readonly header?: string; readonly children: readonly ColumnOrGroup<T>[]; readonly collapsible?: boolean; readonly open?: boolean;}ColumnLayout
Section titled “ColumnLayout”export interface ColumnLayout { readonly start: ColumnSlice; readonly center: ColumnSlice; readonly end: ColumnSlice; readonly totalWidth: number;}ColumnLookup
Section titled “ColumnLookup”export interface ColumnLookup<T> { get(id: string): ResolvedColumn<T> | undefined; visible(): readonly ResolvedColumn<T>[]; readonly version: number; readonly dataVersion: number; withCollapsed?(): readonly ResolvedColumn<T>[];}ColumnModel
Section titled “ColumnModel”export interface ColumnModel<T> extends ColumnLookup<T> { readonly layout: ColumnLayout; readonly problems: readonly Problem[]; state(): readonly ColumnState[]; apply(patch: readonly ColumnState[], source: ChangeSource): ColumnChange; setDefs(defs: readonly ColumnOrGroup<T>[]): ColumnChange; setAvailableInline(px: number): ColumnChange; readonly folded: ReadonlySet<string>; fold(ids: ReadonlySet<string>): ColumnChange; readonly collapsed?: ReadonlySet<string>; collapse?(rank: ((c: ResolvedColumn<T>) => number) | null): ColumnChange; floor?(f: ((c: ResolvedColumn<T>) => number) | null): ColumnChange; minOf?(id: string): number;}ColumnOrGroup
Section titled “ColumnOrGroup”export type ColumnOrGroup<T> = ColumnDef<T, any> | ColumnGroupDef<T>;ColumnSlice
Section titled “ColumnSlice”export interface ColumnSlice { readonly columns: readonly ResolvedColumn<any>[]; readonly widths: PrefixSums; readonly width: number;}ColumnState
Section titled “ColumnState”export interface ColumnState { readonly id: string; readonly width?: number | null; readonly hidden?: boolean; readonly pinned?: Side | null; readonly order?: number;}ColumnType
Section titled “ColumnType”export type ColumnType = 'text' | 'number' | 'day' | 'instant' | 'boolean' | 'enum' | 'custom';DEFAULT_PAGE_SIZE
Section titled “DEFAULT_PAGE_SIZE”export declare const DEFAULT_PAGE_SIZE = 50;DEFAULT_PAGE_SIZES
Section titled “DEFAULT_PAGE_SIZES”export declare const DEFAULT_PAGE_SIZES: readonly number[];DataNode
Section titled “DataNode”export interface DataNode<T> { readonly key: RowKey; readonly kind: 'data'; readonly level: number; readonly id: RowIdInput; readonly data: Readonly<T>; readonly pinned?: 'top' | 'bottom';}export type Day = string & { readonly [dayBrand]: true;};DetailNode
Section titled “DetailNode”export interface DetailNode<T> { readonly key: RowKey; readonly kind: 'detail'; readonly level: number; readonly master: RowKey; readonly data: Readonly<T>;}Disambiguation
Section titled “Disambiguation”export type Disambiguation = 'compatible' | 'earlier' | 'later' | 'reject';DisplayIndex
Section titled “DisplayIndex”export type DisplayIndex = number & { readonly [displayIndexBrand]: true;};DisplayedRows
Section titled “DisplayedRows”export interface DisplayedRows<T> { readonly version: number; readonly count: number; nodeAt(i: DisplayIndex): RowNode<T>; keyAt(i: DisplayIndex): RowKey; indexOf(key: RowKey): DisplayIndex | -1; index(n: number): DisplayIndex | null; nextData(i: DisplayIndex, delta: 1 | -1): DataNode<T> | null; readonly dataCount?: number; matchedAt?(i: DisplayIndex): boolean; parentOf?(key: RowKey): RowKey | null; levelAt?(i: DisplayIndex): number; held?(): Iterable<DisplayIndex>;}EMPTY_QUERY
Section titled “EMPTY_QUERY”export declare const EMPTY_QUERY: Query;EditChecks
Section titled “EditChecks”export interface EditChecks<T, V = unknown> { readonly required?: boolean; readonly min?: V; readonly max?: V; readonly pattern?: string | RegExp; readonly options?: readonly EnumOption[] | ((row: Readonly<T>, context: unknown) => readonly EnumOption[]); readonly maxLength?: number; readonly editor?: string;}EditableInfo
Section titled “EditableInfo”export interface EditableInfo { readonly pinned?: 'top' | 'bottom' | undefined;}EditableRule
Section titled “EditableRule”export type EditableRule<T> = boolean | ((row: Readonly<T>, context: unknown, info: EditableInfo) => boolean);EnumOption
Section titled “EnumOption”export interface EnumOption { readonly value: string; readonly label?: string; readonly aliases?: readonly string[];}ExportScope
Section titled “ExportScope”export type ExportScope = 'displayed' | 'selected' | 'all';ExportServerPart
Section titled “ExportServerPart”export interface ExportServerPart { readonly filter?: Readonly<Record<string, unknown>>; readonly quick?: string; readonly sort?: readonly SortItem[]; readonly params: Readonly<Record<string, Json>>; readonly zone: string; readonly key: string;}ExportTrace
Section titled “ExportTrace”export interface ExportTrace { readonly source: ChangeSource; readonly id: string; readonly at: string; readonly scope: ExportScope; readonly format?: 'csv' | 'xlsx' | 'json';}FilterKind
Section titled “FilterKind”export interface FilterKind<S extends Json = Json, V = unknown> { readonly name: string; readonly types?: readonly ColumnType[]; read(state: unknown): S | 'invalid'; active(s: S): boolean; test?(s: S, ctx: LocaleCtx, context?: unknown): (value: V | null, row: Readonly<unknown>) => boolean; wire?(s: S, ctx: LocaleCtx, zone: string, context?: unknown): Json;}FilterModel
Section titled “FilterModel”export type FilterModel = Readonly<Record<string, ColumnFilter>>;FocusOwner
Section titled “FocusOwner”export type FocusOwner<T> = (f: CellFocus, rows: DisplayedRows<T>) => FocusPos;FocusPos
Section titled “FocusPos”export type FocusPos = { readonly kind: 'cell'; readonly row: RowKey; readonly column: string;} | { readonly kind: 'header'; readonly column: string; readonly level?: number;};FooterNode
Section titled “FooterNode”export interface FooterNode { readonly key: RowKey; readonly kind: 'footer'; readonly level: number; readonly group: RowKey | null; readonly label: string; readonly count: number; readonly aggs: Readonly<Record<string, unknown>>;}Formatters
Section titled “Formatters”export interface Formatters { number(spec?: NumberFormatSpec): (n: number) => string; day(): (d: Day) => string; instant(spec?: InstantFormatSpec): (ms: InstantMs) => string;}GridCommand
Section titled “GridCommand”export type GridCommand = { readonly type: 'sort.toggle'; readonly column: string; readonly multi: boolean;} | { readonly type: 'sort.set'; readonly sort: readonly SortItem[];} | { readonly type: 'query.set'; readonly query: Query;} | { readonly type: 'selection.toggle'; readonly row: RowKey;} | { readonly type: 'selection.only'; readonly row: RowKey;} | { readonly type: 'selection.range'; readonly target: RowKey; readonly additive: boolean;} | { readonly type: 'selection.allDisplayed';} | { readonly type: 'selection.clear';} | { readonly type: 'selection.set'; readonly selection: SelectionState;} | { readonly type: 'column.resize'; readonly column: string; readonly width: number; readonly finished: boolean;} | { readonly type: 'column.state'; readonly patch: readonly ColumnState[];} | { readonly type: 'focus.set'; readonly focus: FocusPos | null;} | { readonly type: 'filter.set'; readonly filter: FilterModel;} | { readonly type: 'filter.column'; readonly column: string; readonly filter: ColumnFilter | null;} | { readonly type: 'quick.set'; readonly text: string;} | { readonly type: 'selection.all';} | { readonly type: 'selection.allFiltered';} | { readonly type: 'selection.keepOnFilter'; readonly keep: boolean;} | { readonly type: 'rows.refresh';} | { readonly type: 'columns.set'; readonly defs: readonly ColumnOrGroup<any>[];} | { readonly type: 'context.set'; readonly ctx: LocaleCtx;} | { readonly type: 'page.go'; readonly index: number;} | { readonly type: 'page.size'; readonly size: number;} | { readonly type: 'rows.expand'; readonly rows: readonly RowKey[]; readonly expanded: boolean;} | { readonly type: 'rows.expandAll'; readonly expanded: boolean; readonly depth?: number;} | { readonly type: 'edits.reader'; readonly reader: ValueReader<any>; readonly columns?: readonly string[];} | { readonly type: 'rows.reapply';} | { readonly type: 'context.app'; readonly value: unknown;};GridCommandResult
Section titled “GridCommandResult”export type GridCommandResult = { readonly ok: true;} | { readonly ok: false; readonly reason: string; readonly problems: readonly Problem[];};GridEvent
Section titled “GridEvent”export type GridEvent<T> = { readonly type: 'modelUpdated'; readonly source: ChangeSource; readonly displayed: DisplayedRows<T>; readonly kind: ModelChange<T>['kind'];} | { readonly type: 'sortChanged'; readonly source: ChangeSource; readonly sort: readonly SortItem[];} | { readonly type: 'selectionChanged'; readonly source: ChangeSource; readonly selection: SelectionState; readonly count: number | null; readonly query: Query | null; readonly scope: RowScope | null; readonly reason: SelectionReason | null;} | ({ readonly type: 'selectionRefused'; readonly source: ChangeSource;} & SelectionRefusal) | { readonly type: 'filterChanged'; readonly source: ChangeSource; readonly filter: FilterModel;} | { readonly type: 'quickChanged'; readonly source: ChangeSource; readonly text: string;} | { readonly type: 'columnResized'; readonly source: ChangeSource; readonly column: string; readonly width: number; readonly finished: boolean;} | { readonly type: 'columnsChanged'; readonly source: ChangeSource; readonly changed: readonly string[]; readonly layoutChanged: boolean;} | { readonly type: 'focusChanged'; readonly source: ChangeSource; readonly focus: FocusPos | null;} | { readonly type: 'cellClicked'; readonly source: 'user'; readonly row: RowNode<T>; readonly column: string;} | { readonly type: 'rowClicked'; readonly source: 'user'; readonly row: RowNode<T>;} | { readonly type: 'problems'; readonly source: ChangeSource; readonly problems: readonly Problem[];} | { readonly type: 'firstDataRendered'; readonly source: 'data';} | { readonly type: 'rowExpanded'; readonly source: ChangeSource; readonly rows: readonly RowKey[]; readonly expanded: boolean;} | { readonly type: 'pageChanged'; readonly source: ChangeSource; readonly page: PageState;} | { readonly type: 'fetchFailed'; readonly source: 'data'; readonly error: unknown; readonly key: string; readonly page: number | null;} | { readonly type: 'orderStale'; readonly source: ChangeSource; readonly stale: boolean;} | { readonly type: 'cellEdited'; readonly source: ChangeSource; readonly key: RowKey; readonly column: string; readonly value: unknown; readonly previous: unknown; readonly origin: SaveOrigin;} | { readonly type: 'saveFailed'; readonly source: 'data'; readonly key: RowKey; readonly column: string; readonly value: unknown; readonly error: unknown; readonly reason: string | null; readonly code: string | null;} | { readonly type: 'editStates'; readonly source: ChangeSource; readonly cells: readonly { readonly key: RowKey; readonly column: string; }[];} | { readonly type: 'editingStarted'; readonly source: 'user'; readonly key: RowKey; readonly column: string; readonly start: 'f2' | 'enter' | 'key' | 'dblclick' | 'tap' | 'tab';} | { readonly type: 'editingStopped'; readonly source: 'user'; readonly key: RowKey; readonly column: string; readonly kept: boolean; readonly via: 'enter' | 'tab' | 'escape' | 'blur' | 'lost';} | { readonly type: 'rangeChanged'; readonly source: ChangeSource; readonly range: CellRange | null;} | { readonly type: 'rangeCopied'; readonly source: ChangeSource; readonly rows: number; readonly columns: number; readonly cells: number; readonly cut: boolean;} | { readonly type: 'stateChanged'; readonly source: ChangeSource; readonly state: GridState;} | { readonly type: 'stateRestored'; readonly source: ChangeSource; readonly problems: readonly Problem[];} | { readonly type: 'densityChanged'; readonly source: ChangeSource; readonly density: 'compact' | 'comfortable' | 'spacious';} | { readonly type: 'undoChanged'; readonly source: ChangeSource; readonly canUndo: boolean; readonly canRedo: boolean;} | { readonly type: 'groupByChanged'; readonly source: ChangeSource; readonly by: readonly string[];} | { readonly type: 'pinnedChanged'; readonly source: ChangeSource;} | { readonly type: 'rowMove'; readonly source: ChangeSource; readonly via: 'pointer' | 'keys' | 'menu' | 'api'; readonly keys: readonly RowKey[]; readonly rows: readonly T[]; readonly target: { readonly key: RowKey | null; readonly where: 'before' | 'after' | 'inside'; }; readonly parent: RowKey | null; readonly applied: boolean;} | { readonly type: 'cellAction'; readonly source: 'user'; readonly column: string; readonly key: RowKey; readonly name: string; readonly detail: unknown;} | { readonly type: 'partAction'; readonly source: 'user'; readonly slot: string; readonly column: string | null; readonly name: string; readonly detail: unknown;} | ({ readonly type: 'exportRequested';} & ExportTrace & { readonly columns: readonly string[]; readonly query: Query; readonly queryKey: string; readonly server?: ExportServerPart; readonly count: number | null; readonly selection?: { readonly mode: 'include' | 'exclude'; readonly count: number | null; }; readonly zone: string; readonly locale: string;}) | ({ readonly type: 'exportRefused';} & ExportTrace & { readonly refusal: 'host' | 'too-large' | 'error'; readonly reason?: string;}) | ({ readonly type: 'exportFinished';} & ExportTrace & { readonly outcome: 'done' | 'failed' | 'cancelled'; readonly via: 'browser' | 'server'; readonly rows: number | null; readonly columns: number; readonly bytes: number | null; readonly fileName: string | null; readonly hidden?: number; readonly durationMs: number; readonly blank?: number; readonly invalid?: number; readonly failure?: { readonly stage: 'load' | 'rows' | 'canExport' | 'exportAll' | 'build' | 'download'; readonly name: string; };});GridKernel
Section titled “GridKernel”export interface GridKernel<T, M extends RowModel<T> = RowModel<T>> { readonly rows: M; readonly columns: ColumnModel<T>; readonly query: Query; readonly selection: SelectionState; readonly anchor: RowKey | null; readonly focus: FocusPos | null; readonly expansion: ReadonlySet<RowKey>; readonly selectionScope: SelectionScope | null; readonly headerState: HeaderSelection; dispatch(cmd: GridCommand, source: ChangeSource): GridCommandResult; values(column: string, o?: ValuesOptions): ValuesHandle; readonly reader: ValueReader<T>; readonly app: unknown; readonly orderStale: boolean; editable(key: RowKey, column: string): boolean; rowOf(key: RowKey): DataNode<T> | undefined; tick(): void; subscribe(fn: (e: GridEvent<T>) => void): () => void; destroy(): void;}GroupNode
Section titled “GroupNode”export interface GroupNode { readonly key: RowKey; readonly kind: 'group'; readonly level: number; readonly label: string; readonly path: readonly string[]; readonly column?: string; readonly value?: unknown; readonly count?: number; readonly aggs?: Readonly<Record<string, unknown>>;}GroupProblemCode
Section titled “GroupProblemCode”export type GroupProblemCode = 'agg-type' | 'agg-threw' | 'pivot-too-many';HeaderSelection
Section titled “HeaderSelection”export type HeaderSelection = 'none' | 'some' | 'all';INTENT_OWNERS
Section titled “INTENT_OWNERS”export declare const INTENT_OWNERS: { readonly [K in Intent['kind']]: readonly KeyOwner[];};InstantFilter
Section titled “InstantFilter”export type InstantFilter = Extract<ColumnFilter, { type: 'instant';}>;InstantFormatSpec
Section titled “InstantFormatSpec”export interface InstantFormatSpec { readonly seconds?: boolean; readonly date?: boolean; readonly time?: boolean;}InstantMs
Section titled “InstantMs”export type InstantMs = number & { readonly [instantBrand]: true;};InstantOp
Section titled “InstantOp”export type InstantOp = 'onDay' | 'betweenDays' | 'before' | 'after' | 'between' | 'blank' | 'notBlank';InstantOptions
Section titled “InstantOptions”export interface InstantOptions { readonly assumeZone?: string; readonly disambiguation?: Disambiguation;}InstantRange
Section titled “InstantRange”export interface InstantRange { readonly from: number | null; readonly to: number | null;}InstantReading
Section titled “InstantReading”export type InstantReading = { readonly ok: true; readonly value: InstantMs; readonly warning?: 'wall-time-skipped' | 'wall-time-ambiguous';} | { readonly ok: false; readonly code: 'invalid-instant' | 'ambiguous-instant' | 'unknown-zone' | 'wall-time-skipped' | 'wall-time-ambiguous';};Intent
Section titled “Intent”export type Intent = { readonly kind: 'move'; readonly axis: 'row' | 'col'; readonly delta: -1 | 1;} | { readonly kind: 'edge'; readonly axis: 'row' | 'col' | 'both'; readonly to: 'first' | 'last';} | { readonly kind: 'page'; readonly delta: -1 | 1;} | { readonly kind: 'toggleSelect';} | { readonly kind: 'selectAll';} | { readonly kind: 'sort'; readonly multi: boolean;} | { readonly kind: 'enter';} | { readonly kind: 'leave';};IntentContext
Section titled “IntentContext”export interface IntentContext { readonly dir: 'ltr' | 'rtl'; readonly owner: KeyOwner; readonly mac: boolean;}export type Json = null | boolean | number | string | readonly Json[] | { readonly [k: string]: Json;};KeyLike
Section titled “KeyLike”export interface KeyLike { readonly key: string; readonly ctrlKey: boolean; readonly metaKey: boolean; readonly shiftKey: boolean; readonly altKey: boolean; readonly code?: string;}KeyOwner
Section titled “KeyOwner”export type KeyOwner = 'cell' | 'header' | 'editor' | 'filter-input' | 'popup' | 'cell-widget' | 'outside';LayerPlacement
Section titled “LayerPlacement”export interface LayerPlacement { readonly base: number; readonly layerTop: number;}LoadingNode
Section titled “LoadingNode”export interface LoadingNode { readonly key: RowKey; readonly kind: 'loading'; readonly level: number; readonly parent: RowKey; readonly failed: boolean;}LocaleCtx
Section titled “LocaleCtx”export interface LocaleCtx { readonly locale: string; readonly numerals: 'latn' | 'locale'; readonly timeZone: string; readonly calendar: 'gregory'; readonly yesNo?: readonly [ yes: string, no: string ];}MAX_INSTANT
Section titled “MAX_INSTANT”export declare const MAX_INSTANT = 8640000000000000;MAX_PHYSICAL
Section titled “MAX_PHYSICAL”export declare const MAX_PHYSICAL = 4000000;ModelChange
Section titled “ModelChange”export interface ModelChange<T> { readonly source: ChangeSource; readonly displayed: DisplayedRows<T>; readonly kind: 'rows' | 'order' | 'query' | 'context' | 'page' | 'status' | 'expand'; readonly transaction?: TransactionResult; readonly problems: readonly Problem[]; readonly told?: readonly Problem[]; readonly failure?: { readonly error: unknown; readonly key: string; readonly page: number | null; };}ModelEnv
Section titled “ModelEnv”export interface ModelEnv<T> { readonly getRowId: (row: T) => RowIdInput; readonly columns: ColumnLookup<T>; readonly ctx: LocaleCtx; readonly page?: PageOptions; readonly operations?: OperationsInput; readonly query?: Query; readonly abort?: () => AbortHandle; readonly filterKinds?: (name: string) => AnyFilterKind | undefined; readonly now?: () => number; readonly shape?: RowShape<T>; readonly app?: unknown; readonly held?: boolean | undefined; readonly sameRow?: ((a: T, b: T) => boolean) | undefined; readonly timer?: ((fn: () => void, ms: number) => () => void) | undefined; readonly frame?: ((fn: () => void) => void) | undefined;}ModelStatus
Section titled “ModelStatus”export type ModelStatus = { readonly phase: 'idle';} | { readonly phase: 'loading';} | { readonly phase: 'error'; readonly failure: unknown; readonly key?: string; readonly page?: number | null;};NO_OVERLAY
Section titled “NO_OVERLAY”export declare const NO_OVERLAY: ValueReader<never>;NO_SELECTION
Section titled “NO_SELECTION”export declare const NO_SELECTION: SelectionState;export type NumOp = 'equals' | 'notEqual' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'blank' | 'notBlank';NumberFormatSpec
Section titled “NumberFormatSpec”export interface NumberFormatSpec { readonly style?: 'decimal' | 'percent' | 'currency'; readonly currency?: string; readonly minimumFractionDigits?: number; readonly maximumFractionDigits?: number; readonly useGrouping?: boolean;}NumberSeparators
Section titled “NumberSeparators”export interface NumberSeparators { readonly group: string; readonly decimal: string;}Operation
Section titled “Operation”export type Operation = 'filter' | 'quick' | 'sort' | 'page';Operations
Section titled “Operations”export interface Operations { readonly filter: Placement; readonly quick: Placement; readonly sort: Placement; readonly page: Placement | 'off';}OperationsInput
Section titled “OperationsInput”export type OperationsInput = 'client' | 'server' | Partial<Operations>;PROBLEM_CODES
Section titled “PROBLEM_CODES”export declare const PROBLEM_CODES: readonly [ "invalid-row-id", "duplicate-row-id", "unknown-row-id", "invalid-transaction", "invalid-day", "invalid-instant", "ambiguous-instant", "unknown-zone", "wall-time-skipped", "wall-time-ambiguous", "invalid-column", "duplicate-column-id", "invalid-field-path", "unknown-column", "invalid-sort", "invalid-filter", "filter-needs-server", "invalid-cell-value", "too-many-pinned", "invalid-operations", "unsupported-live-change", "unknown-part", "missing-message", "invalid-page", "invalid-page-response", "fetched-set-large", "invalid-values-response", "invalid-span", "span-overlap", "span-clipped", "invalid-column-group", "missing-feature", "selection-refused", "part-shadowed", "unsupported-combination", "tree-orphan", "tree-cycle", "tree-column-not-first", "tree-shape", "edit-structure", "invalid-setting"];PageOptions
Section titled “PageOptions”export interface PageOptions { readonly pageSize?: number; readonly pageSizes?: readonly number[];}PageState
Section titled “PageState”export interface PageState { readonly index: number; readonly size: number; readonly sizes: readonly number[]; readonly total: number | null; readonly pageCount: number | null; readonly hasNext: boolean; readonly canJump: boolean;}PartColumn
Section titled “PartColumn”export interface PartColumn { readonly id: string; readonly type: ColumnType; readonly ui?: { readonly cell?: string; readonly header?: string; readonly tooltip?: string; }; readonly filter?: false | { readonly kind?: string; readonly floating?: boolean; readonly debounceMs?: number; readonly ops?: readonly string[]; };}PartSlot
Section titled “PartSlot”export type PartSlot = 'cell' | 'header' | 'filter' | 'floating' | 'overlay' | 'tooltip' | 'footer' | 'detail' | 'filterOption';Placement
Section titled “Placement”export type Placement = 'client' | 'server';PrefixSums
Section titled “PrefixSums”export declare class PrefixSums { #private; constructor(sizes: ArrayLike<number>); get length(): number; get total(): number; sizeAt(i: number): number; set(i: number, size: number): boolean; offsetOf(i: number): number; indexAt(offset: number): number; rebuild(): void;}Problem
Section titled “Problem”export interface Problem { readonly code: ProblemCode; readonly severity: Severity; readonly path: string; readonly detail?: string;}ProblemCode
Section titled “ProblemCode”export type ProblemCode = (typeof PROBLEM_CODES)[number] | GroupProblemCode | StateProblemCode | PinnedProblemCode | AutoHeightProblemCode | GapProblemCode | XlsxProblemCode | ImportProblemCode | 'print-too-many' | 'unknown-ui-key' | 'rows-not-loaded' | 'unbounded-viewport';export interface Query { readonly sort: readonly SortItem[]; readonly filter: FilterModel; readonly quick: string; readonly key: string;}REBASE
Section titled “REBASE”export declare const REBASE: number;REJECTED
Section titled “REJECTED”export declare const REJECTED: unique symbol;RELATIVE_RANGES
Section titled “RELATIVE_RANGES”export declare const RELATIVE_RANGES: ReadonlySet<RelativeRange>;RangeResult
Section titled “RangeResult”export type RangeResult = { readonly ok: true; readonly state: SelectionState;} | { readonly ok: false; readonly reason: 'anchor-not-displayed' | 'target-not-displayed' | 'rows-not-loaded';};Rejected
Section titled “Rejected”export type Rejected = typeof REJECTED;RelativeRange
Section titled “RelativeRange”export type RelativeRange = 'today' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisMonth' | 'lastMonth';ResolvedColumn
Section titled “ResolvedColumn”export interface ResolvedColumn<T> { readonly id: string; readonly def: ColumnDef<T, any>; readonly type: ColumnType; readonly codec: ValueCodec<any>; readonly read: (row: Readonly<T>) => unknown; readonly sortable: boolean; readonly filterable: boolean;}RowCounts
Section titled “RowCounts”export interface RowCounts { readonly total: number | null; readonly filtered: number | null; readonly displayed: number;}RowIdInput
Section titled “RowIdInput”export type RowIdInput = string | number;RowKey
Section titled “RowKey”export type RowKey = string & { readonly [rowKeyBrand]: true;};RowKind
Section titled “RowKind”export type RowKind = 'data' | 'group' | 'footer' | 'detail' | 'full-width' | 'loading';RowLayout
Section titled “RowLayout”export interface RowLayout { readonly count: number; readonly total: number; readonly uniform: boolean; offsetOf(i: DisplayIndex): number; heightOf(i: DisplayIndex): number; indexAt(offset: number): DisplayIndex; setHeight(i: DisplayIndex, h: number): boolean;}RowModel
Section titled “RowModel”export interface RowModel<T> { readonly kind: 'client' | 'source'; readonly ops: Operations; readonly displayed: DisplayedRows<T>; readonly status: ModelStatus; readonly counts: RowCounts; readonly problems: readonly Problem[]; readonly selectAll: 'displayed' | 'query'; readonly allRows?: DisplayedRows<T> | undefined; keeps(key: RowKey): boolean; membershipOf(q: Query): string; matches?(key: RowKey): boolean; readonly scope: RowScope; row(key: RowKey): DataNode<T> | undefined; setQuery(q: Query, source?: ChangeSource): void; setColumns(columns: ColumnLookup<T>, source?: ChangeSource): void; setContext(ctx: LocaleCtx, source?: ChangeSource): void; invalidate(o?: { readonly purge?: boolean; }): void; readonly page: PageState | null; warmSearch?(): SearchWarmup; setPage(p: { readonly index?: number; readonly size?: number; }, source?: ChangeSource): void; setValues?(column: string, o?: ValuesOptions): ValuesHandle; tick?(): void; readonly expansion?: ReadonlySet<RowKey>; isExpanded?(key: RowKey): boolean; setExpansion?(set: ReadonlySet<RowKey>, source?: ChangeSource): void; expand?(rows: readonly RowKey[], expanded: boolean, source?: ChangeSource): readonly RowKey[]; expandable?(depth?: number): readonly RowKey[]; expandAll?(expanded: boolean, depth?: number, source?: ChangeSource): readonly RowKey[]; setReader?(reader: ValueReader<T>, changed?: readonly string[]): void; reapply?(source?: ChangeSource): void; readonly orderStale?: boolean; setApp?(context: unknown, source?: ChangeSource): void; want?(first: number, last: number, keep?: readonly number[]): void; hold?(fn: () => void): void; subscribe(fn: (c: ModelChange<T>) => void): () => void; destroy(): void;}RowNode
Section titled “RowNode”export type RowNode<T> = DataNode<T> | GroupNode | DetailNode<T> | LoadingNode | FooterNode | BlockLoadingNode;RowScope
Section titled “RowScope”export interface RowScope { readonly params: Readonly<Record<string, Json>>; readonly zone: string;}RowShape
Section titled “RowShape”export interface RowShape<T> { readonly kind: 'tree' | 'detail' | 'group'; readonly initial?: 'none' | 'all' | number; build(input: ShapeInput<T>): DisplayedRows<T>; all?(): DisplayedRows<T>; parents?(snap: RowSnapshot<T>, depth: number, shown?: boolean, env?: ColumnEnv<T>): readonly RowKey[]; isOpen?(key: RowKey): boolean; opens?(key: RowKey): boolean; readonly problems: readonly Problem[]; load?(rows: Iterable<T>, id: (row: T) => RowIdInput): Iterable<T>; tx?(tx: RowTransaction<T>, id: (row: T) => RowIdInput, snap: RowSnapshot<T>): RowTransaction<T>; rekey?(snap: RowSnapshot<T>): ((key: RowKey) => RowKey) | null; attach?(model: ClientModel<T>, redraw: (kind?: 'rows' | 'expand', source?: ChangeSource) => void): void; reads?(): readonly string[]; values?(changed?: readonly string[]): void; refresh?(): void;}RowTransaction
Section titled “RowTransaction”export interface RowTransaction<T> { readonly add?: readonly T[]; readonly addAt?: number; readonly update?: readonly T[]; readonly patch?: readonly { readonly id: RowIdInput; readonly set: Partial<T>; }[]; readonly remove?: readonly RowIdInput[];}SaveOrigin
Section titled “SaveOrigin”export type SaveOrigin = 'edit' | 'undo' | 'redo' | 'paste' | 'fill' | 'bulk' | 'cut';ScrollAnchor
Section titled “ScrollAnchor”export type ScrollAnchor = { readonly kind: 'row'; readonly index: DisplayIndex; readonly delta: number;} | { readonly kind: 'end';};ScrollMapper
Section titled “ScrollMapper”export interface ScrollMapper { readonly scaled: boolean; readonly logicalHeight: number; readonly physicalHeight: number; readonly ratio: number; readonly maxLogical: number; readonly maxPhysical: number; toLogical(physicalTop: number): number; toPhysical(logicalTop: number): number;}SelectionGate
Section titled “SelectionGate”export interface SelectionGate { readonly on: boolean; vet(prev: SelectionState, next: SelectionState): { readonly state: SelectionState; readonly refused: SelectionRefusal | null; } | null; readonly skip: (key: RowKey) => boolean; rowsChanged?(): void;}SelectionReason
Section titled “SelectionReason”export type SelectionReason = 'scope-changed' | 'rows-dropped';SelectionRefusal
Section titled “SelectionRefusal”export interface SelectionRefusal { readonly rows: readonly RowKey[]; readonly reason: string | null; readonly cause: 'rule' | 'unknown-row' | 'needs-rows';}SelectionScope
Section titled “SelectionScope”export interface SelectionScope extends RowScope { readonly query: Query;}SelectionState
Section titled “SelectionState”export type SelectionState = { readonly mode: 'include'; readonly keys: ReadonlySet<RowKey>;} | { readonly mode: 'exclude'; readonly keys: ReadonlySet<RowKey>;};ServerQuery
Section titled “ServerQuery”export interface ServerQuery { readonly filter?: FilterModel; readonly quick?: string; readonly sort?: readonly SortItem[]; readonly key: string;}SetValue
Section titled “SetValue”export interface SetValue { readonly value: string; readonly label: string; readonly count: number | null; readonly selected?: boolean;}Severity
Section titled “Severity”export type Severity = 'error' | 'warning';ShapeInput
Section titled “ShapeInput”export interface ShapeInput<T> { readonly snap: RowSnapshot<T>; readonly order: Uint32Array | null; readonly matched: Uint8Array | null; readonly filterActive: boolean; readonly expansion: ReadonlySet<RowKey>; readonly layer: ReadonlyMap<RowKey, boolean> | null; readonly changed?: readonly RowKey[]; readonly version: number; readonly env?: ColumnEnv<T>;}export type Side = 'start' | 'end';SortItem
Section titled “SortItem”export interface SortItem { readonly column: string; readonly dir: 'asc' | 'desc'; readonly nulls?: 'first' | 'last';}SourceBinding
Section titled “SourceBinding”export interface SourceBinding<T> { create(env: ModelEnv<T>): SourceHandle<T>;}SourceHandle
Section titled “SourceHandle”export interface SourceHandle<T> extends RowModel<T> { readonly kind: 'source'; setSource(next: SourceBinding<T>, source?: ChangeSource): void; tick(): void;}SpanCtx
Section titled “SpanCtx”export interface SpanCtx<T> { readonly row: Readonly<T>; readonly value: unknown; readonly key: RowKey; readonly index: number; readonly column: string; readonly prev: Readonly<T> | null; readonly next: Readonly<T> | null;}TextOp
Section titled “TextOp”export type TextOp = 'contains' | 'notContains' | 'equals' | 'notEqual' | 'startsWith' | 'endsWith' | 'blank' | 'notBlank';TransactionResult
Section titled “TransactionResult”export interface TransactionResult { readonly kind: 'reset' | 'delta' | 'none'; readonly version: number; readonly added: readonly RowKey[]; readonly updated: readonly RowKey[]; readonly removed: readonly RowKey[]; readonly problems: readonly Problem[];}VALUES_MAX
Section titled “VALUES_MAX”export declare const VALUES_MAX = 2000;ValueCodec
Section titled “ValueCodec”export interface ValueCodec<V> { readonly kind: ColumnType; readonly keyKind: 'number' | 'text'; coerce(raw: unknown, ctx: LocaleCtx): V | null; why?(raw: unknown, ctx: LocaleCtx): string; warning?(raw: unknown, ctx: LocaleCtx): 'wall-time-skipped' | 'wall-time-ambiguous' | null; parse(text: string, ctx: LocaleCtx): V | Rejected; format(v: V, ctx: LocaleCtx): string; sortKey(v: V, ctx: LocaleCtx): number | string; compare(a: V, b: V, ctx: LocaleCtx): number; isEmpty(v: unknown): boolean; equals(a: V, b: V): boolean; toExport(v: V): string;}ValueList
Section titled “ValueList”export interface ValueList { readonly values: readonly SetValue[]; readonly blanks: number | null; readonly truncated: boolean;}ValueReader
Section titled “ValueReader”export interface ValueReader<T> { readonly version: number; readonly overlay: boolean; value(col: ResolvedColumn<T>, row: Readonly<T>, id: string): unknown;}ValuesHandle
Section titled “ValuesHandle”export interface ValuesHandle { readonly status: 'idle' | 'loading' | 'error'; readonly result: ValueList | null; readonly available: boolean; readonly failure?: unknown; readonly problems: readonly Problem[]; search(text: string): void; refresh(): void; subscribe(fn: () => void): () => void; close(): void;}ValuesOptions
Section titled “ValuesOptions”export interface ValuesOptions { readonly search?: string; readonly max?: number;}WallResolution
Section titled “WallResolution”export type WallResolution = { readonly ok: true; readonly value: InstantMs; readonly warning?: 'wall-time-skipped' | 'wall-time-ambiguous';} | { readonly ok: false; readonly code: 'unknown-zone' | 'invalid-instant' | 'wall-time-skipped' | 'wall-time-ambiguous';};Window2D
Section titled “Window2D”export interface Window2D { readonly rows: { readonly first: DisplayIndex; readonly last: DisplayIndex; } | null; readonly cols: { readonly first: number; readonly last: number; } | null; readonly placement: LayerPlacement;}WindowView
Section titled “WindowView”export interface WindowView { readonly block: number; readonly inline: number;}addDays
Section titled “addDays”export declare const addDays: (day: Day, n: number) => Day | null;anchorFor
Section titled “anchorFor”export declare function anchorFor(layout: RowLayout, scrollTop: number, viewBlock: number, isMeasured: (i: DisplayIndex) => boolean): ScrollAnchor | null;assignKeys
Section titled “assignKeys”export declare function assignKeys(ids: readonly unknown[], path?: string, make?: (id: unknown) => RowKey | null): { readonly keys: readonly (RowKey | null)[]; readonly problems: readonly Problem[];};booleanCodec
Section titled “booleanCodec”export declare const booleanCodec: ValueCodec<boolean>;booleanCodecWith
Section titled “booleanCodecWith”export declare function booleanCodecWith(labels?: { readonly true: string; readonly false: string;}): ValueCodec<boolean>;canonicalId
Section titled “canonicalId”export declare function canonicalId(id: unknown): string | null;civilToEpochDay
Section titled “civilToEpochDay”export declare function civilToEpochDay(y: number, m: number, d: number): number;clearSelection
Section titled “clearSelection”export declare const clearSelection: () => SelectionState;clientRows
Section titled “clientRows”export declare function clientRows<T>(o: ClientOptions<T>): ClientModel<T>;collatorFor
Section titled “collatorFor”export declare function collatorFor(ctx: Pick<LocaleCtx, 'locale'>, spec?: CollatorSpec): Intl.Collator;compareDays
Section titled “compareDays”export declare const compareDays: (a: Day, b: Day) => number;compilePath
Section titled “compilePath”export declare function compilePath(path: string): ((row: unknown) => unknown) | null;createColumnModel
Section titled “createColumnModel”export declare function createColumnModel<T>(initial: readonly ColumnOrGroup<T>[], o?: { availableInline?: number;}): ColumnModel<T>;createKernel
Section titled “createKernel”export declare function createKernel<T, M extends RowModel<T> = RowModel<T>>(o: { readonly rows: M; readonly columns: ColumnModel<T>; readonly query?: Query; readonly keepSelectionOnFilter?: boolean; readonly multiSort?: boolean | undefined;}): GridKernel<T, M>;dataKey
Section titled “dataKey”export declare function dataKey(id: unknown): RowKey | null;export declare function dayAt(now: number, zone: string): { readonly day: Day; readonly until: number;} | null;dayCodec
Section titled “dayCodec”export declare const dayCodec: ValueCodec<Day>;dayFieldOrder
Section titled “dayFieldOrder”export declare function dayFieldOrder(ctx: LocaleCtx): readonly [ 'd' | 'm' | 'y', 'd' | 'm' | 'y', 'd' | 'm' | 'y'];dayToEpochDay
Section titled “dayToEpochDay”export declare function dayToEpochDay(day: Day): number;daysInMonth
Section titled “daysInMonth”export declare function daysInMonth(y: number, m: number): number;detailKey
Section titled “detailKey”export declare function detailKey(master: RowKey): RowKey;editableAt
Section titled “editableAt”export declare function editableAt<T>(node: RowNode<T> | undefined, col: ResolvedColumn<T> | undefined, context: unknown, locked?: ReadonlySet<string>, threw?: (column: string) => void): boolean;enumCodec
Section titled “enumCodec”export declare function enumCodec(options: readonly EnumOption[], o?: { sort?: 'label' | 'option-order';}): ValueCodec<string>;epochDayToCivil
Section titled “epochDayToCivil”export declare function epochDayToCivil(n: number): { y: number; m: number; d: number;};epochDayToDay
Section titled “epochDayToDay”export declare function epochDayToDay(n: number): Day | null;filterKindOf
Section titled “filterKindOf”export declare const filterKindOf: (c: PartColumn) => string;export declare function fold(s: string): string;formattersFor
Section titled “formattersFor”export declare function formattersFor(ctx: LocaleCtx): Formatters;groupKey
Section titled “groupKey”export declare function groupKey(path: readonly string[]): RowKey;headerSelection
Section titled “headerSelection”export declare function headerSelection<T>(s: SelectionState, d: DisplayedRows<T>): HeaderSelection;idOfDataKey
Section titled “idOfDataKey”export declare function idOfDataKey(key: RowKey): string | null;instantCodec
Section titled “instantCodec”export declare function instantCodec(o?: { assumeZone?: string; format?: InstantFormatSpec;}): ValueCodec<InstantMs>;instantToDayIn
Section titled “instantToDayIn”export declare function instantToDayIn(instant: InstantMs, zone: string): Day | null;instantToIso
Section titled “instantToIso”export declare function instantToIso(ms: InstantMs): string;intentFor
Section titled “intentFor”export declare function intentFor(e: KeyLike, ctx: IntentContext): Intent | null;isAscii
Section titled “isAscii”export declare const isAscii: (s: string) => boolean;isBlank
Section titled “isBlank”export declare const isBlank: (v: unknown) => boolean;isKnownZone
Section titled “isKnownZone”export declare function isKnownZone(zone: string): boolean;isLeapYear
Section titled “isLeapYear”export declare const isLeapYear: (y: number) => boolean;isSelected
Section titled “isSelected”export declare function isSelected(s: SelectionState, k: RowKey): boolean;layerPlacement
Section titled “layerPlacement”export declare function layerPlacement(logicalTop: number, physicalTop: number, rebase?: number): LayerPlacement;liveChangeProblems
Section titled “liveChangeProblems”export declare function liveChangeProblems(policy: Readonly<Record<string, 'live' | 'fixed'>>, prev: Readonly<Record<string, unknown>>, patch: Readonly<Record<string, unknown>>): Problem[];localeCtx
Section titled “localeCtx”export declare function localeCtx(o: { locale: string; numerals?: 'latn' | 'locale'; timeZone?: string;}): LocaleCtx;makeQuery
Section titled “makeQuery”export declare function makeQuery(q?: Partial<Pick<Query, 'sort' | 'filter' | 'quick'>>): Query;messageProblems
Section titled “messageProblems”export declare function messageProblems(key: string, available: ReadonlySet<string>): Problem[];nextSort
Section titled “nextSort”export declare function nextSort(sort: readonly SortItem[], column: string, multi: boolean): readonly SortItem[];normalizeDigits
Section titled “normalizeDigits”export declare function normalizeDigits(s: string): string;numberCodec
Section titled “numberCodec”export declare const numberCodec: ValueCodec<number>;numberCodecWith
Section titled “numberCodecWith”export declare function numberCodecWith(spec?: NumberFormatSpec): ValueCodec<number>;offsetAt
Section titled “offsetAt”export declare function offsetAt(instant: number, zone: string): number;overscanRows
Section titled “overscanRows”export declare function overscanRows(speedPxPerSec: number, rowHeight: number, o?: { readonly min?: number; readonly max?: number;}): number;parseDay
Section titled “parseDay”export declare function parseDay(s: unknown): Day | null;parseInstant
Section titled “parseInstant”export declare function parseInstant(v: unknown, o?: InstantOptions): InstantMs | null;partNameFor
Section titled “partNameFor”export declare function partNameFor(slot: PartSlot, column: PartColumn, available: ReadonlySet<string>): { readonly name: string | null; readonly problems: readonly Problem[];};pinnedKey
Section titled “pinnedKey”export declare function pinnedKey(side: 'top' | 'bottom', id: unknown): RowKey | null;problem
Section titled “problem”export declare const problem: (code: ProblemCode, severity: Severity, path: string, detail?: string) => Problem;quickWords
Section titled “quickWords”export declare function quickWords(text: string): readonly string[];readDayText
Section titled “readDayText”export declare function readDayText(text: string, order: readonly [ 'd' | 'm' | 'y', 'd' | 'm' | 'y', 'd' | 'm' | 'y']): Day | null;readInstant
Section titled “readInstant”export declare function readInstant(v: unknown, o?: InstantOptions): InstantReading;readMachineNumber
Section titled “readMachineNumber”export declare function readMachineNumber(raw: unknown): number | null;readNumber
Section titled “readNumber”export declare function readNumber(text: string, ctx: LocaleCtx): number | null;reconcileFocus
Section titled “reconcileFocus”export declare function reconcileFocus<T>(f: FocusPos | null, before: DisplayedRows<T>, after: DisplayedRows<T>, columns: ColumnLookup<T>, owner?: FocusOwner<T>, held?: (key: RowKey) => unknown): FocusPos | null;reconcileSelection
Section titled “reconcileSelection”export declare function reconcileSelection(s: SelectionState, has: (k: RowKey) => boolean): SelectionState;relativeDays
Section titled “relativeDays”export declare function relativeDays(range: RelativeRange, today: Day): { readonly from: Day; readonly to: Day;} | null;resolveColumns
Section titled “resolveColumns”export declare function resolveColumns<T>(tree: readonly ColumnOrGroup<T>[]): { readonly columns: readonly ResolvedColumn<T>[]; readonly problems: readonly Problem[];};resolveInstantRange
Section titled “resolveInstantRange”export declare function resolveInstantRange(f: InstantFilter, zone: string, path?: string, now?: number): { range: InstantRange | null; problems: readonly Problem[]; days?: { readonly from: Day; readonly to: Day; };};resolveOperations
Section titled “resolveOperations”export declare function resolveOperations(input: OperationsInput | undefined, hasSource: boolean): { readonly ops: Operations; readonly problems: readonly Problem[];};resolveWall
Section titled “resolveWall”export declare function resolveWall(wallMs: number, zone: string, disambiguation?: Disambiguation): WallResolution;scrollMapper
Section titled “scrollMapper”export declare function scrollMapper(logicalHeight: number, maxPhysical: number, viewportBlockSize: number): ScrollMapper;scrollTopFor
Section titled “scrollTopFor”export declare function scrollTopFor(anchor: ScrollAnchor, layout: RowLayout, viewBlock: number): number;selectAll
Section titled “selectAll”export declare const selectAll: () => SelectionState;selectOnly
Section titled “selectOnly”export declare const selectOnly: (keys: Iterable<RowKey>) => SelectionState;selectRange
Section titled “selectRange”export declare function selectRange<T>(s: SelectionState, displayed: DisplayedRows<T>, anchor: RowKey, target: RowKey, o?: { readonly additive?: boolean;}): RangeResult;selectionCount
Section titled “selectionCount”export declare function selectionCount(s: SelectionState, total: number | null): number | null;splitQuery
Section titled “splitQuery”export declare function splitQuery(q: Query, ops: Operations): { readonly server: ServerQuery; readonly client: Query;};stripMarks
Section titled “stripMarks”export declare function stripMarks(s: string): string;textCodec
Section titled “textCodec”export declare const textCodec: ValueCodec<string>;toggle
Section titled “toggle”export declare function toggle(s: SelectionState, k: RowKey): SelectionState;uniformRowLayout
Section titled “uniformRowLayout”export declare function uniformRowLayout(rows: IndexMint, height: number): RowLayout;variableRowLayout
Section titled “variableRowLayout”export declare function variableRowLayout(rows: IndexMint, estimate: number, heights?: ArrayLike<number>): RowLayout;visibleWindow
Section titled “visibleWindow”export declare function visibleWindow(rows: RowLayout, centerCols: PrefixSums, mapper: ScrollMapper, physicalScrollTop: number, scrollInline: number, view: WindowView, o: { readonly overscanRows: number; readonly overscanCols: number;}): Window2D;windowAt
Section titled “windowAt”export declare function windowAt(rows: RowLayout, centerCols: PrefixSums, logicalTop: number, physicalScrollTop: number, scrollInline: number, view: WindowView, o: { readonly overscanRows: number; readonly overscanCols: number;}): Window2D;zoneDayBounds
Section titled “zoneDayBounds”export declare function zoneDayBounds(day: Day, zone: string): { readonly from: InstantMs; readonly to: InstantMs;};@dzgrid/core/server
Section titled “@dzgrid/core/server”AbortHandle
Section titled “AbortHandle”export interface AbortHandle { readonly signal: AbortSignalLike; abort(reason?: unknown): void;}AbortSignalLike
Section titled “AbortSignalLike”export interface AbortSignalLike { readonly aborted: boolean; readonly reason?: unknown;}ChildRequest
Section titled “ChildRequest”export interface ChildRequest<T> { readonly parent: RowKey; readonly id: string; readonly row: T; readonly filter?: WireFilterModel; readonly quick?: string; readonly sort?: readonly SortItem[]; readonly params: Readonly<Record<string, Json>>; readonly zone: string; readonly epoch: number; readonly key: string; readonly signal: AbortSignalLike;}ChildResponse
Section titled “ChildResponse”export type ChildResponse<T> = readonly T[] | { readonly rows: readonly T[];};DataRequest
Section titled “DataRequest”export interface DataRequest { readonly filter?: WireFilterModel; readonly quick?: string; readonly sort?: readonly SortItem[]; readonly page?: PageWindow; readonly blocks?: true; readonly group?: GroupPart; readonly params: Readonly<Record<string, Json>>; readonly zone: string; readonly key: string; readonly signal: AbortSignalLike;}DataResponse
Section titled “DataResponse”export interface DataResponse<T> { readonly rows: readonly T[]; readonly total?: number; readonly hasNext?: boolean; readonly nextCursor?: string | null;}DataSource
Section titled “DataSource”export interface DataSource<T> { readonly fetch: (req: DataRequest) => Promise<DataResponse<T>> | PromiseLike<DataResponse<T>> | DataResponse<T>; readonly values?: (req: ValuesRequest) => Promise<ValuesResponse> | PromiseLike<ValuesResponse> | ValuesResponse; readonly children?: (req: ChildRequest<T>) => Promise<ChildResponse<T>> | PromiseLike<ChildResponse<T>> | ChildResponse<T>;}DropReason
Section titled “DropReason”export type DropReason = 'superseded' | 'stale-epoch' | 'aborted' | 'destroyed';GateDiagnostics
Section titled “GateDiagnostics”export interface GateDiagnostics { readonly begun: number; readonly accepted: number; readonly dropped: Readonly<Record<DropReason, number>>;}export type Json = null | boolean | number | string | readonly Json[] | { readonly [k: string]: Json;};PageWindow
Section titled “PageWindow”export interface PageWindow { readonly index: number; readonly size: number; readonly offset: number; readonly cursor: string | null;}RequestGate
Section titled “RequestGate”export interface RequestGate { begin(channel: string, key: string): { readonly ticket: Ticket; readonly signal: AbortSignalLike; }; accepts(t: Ticket): DropReason | null; settle(t: Ticket): DropReason | null; cancel(channel: string): void; forget?(channel: string): void; newEpoch(): void; destroy(): void; readonly epoch: number; readonly diagnostics: GateDiagnostics;}SourceModel
Section titled “SourceModel”export interface SourceModel<T> extends SourceHandle<T> { readonly diagnostics: { readonly fetches: number; readonly valueFetches: number; readonly childFetches?: number; readonly gate: GateDiagnostics; };}SourceRows
Section titled “SourceRows”export interface SourceRows<T> extends SourceBinding<T> { create(env: ModelEnv<T>): SourceModel<T>;}SourceRowsOptions
Section titled “SourceRowsOptions”export interface SourceRowsOptions { readonly paging?: 'offset' | 'cursor'; readonly maxRows?: number; readonly params?: Readonly<Record<string, Json>>; readonly abort?: () => AbortHandle;}Ticket
Section titled “Ticket”export interface Ticket { readonly seq: number; readonly epoch: number; readonly channel: string; readonly key: string;}ValuesRequest
Section titled “ValuesRequest”export interface ValuesRequest { readonly column: string; readonly search: string; readonly limit: number; readonly filter?: WireFilterModel; readonly quick?: string; readonly params: Readonly<Record<string, Json>>; readonly zone: string; readonly key: string; readonly signal: AbortSignalLike;}ValuesResponse
Section titled “ValuesResponse”export type ValuesResponse = readonly SetValue[] | { readonly values: readonly SetValue[]; readonly blanks?: number | null; readonly truncated?: boolean;};WireEnv
Section titled “WireEnv”export interface WireEnv<T> { readonly ctx: LocaleCtx; readonly columns: ColumnLookup<T>; readonly kinds?: (name: string) => WireKind | undefined; readonly now?: number; readonly app?: unknown;}WireFilter
Section titled “WireFilter”export type WireFilter = { readonly type: 'text'; readonly op: TextOp; readonly value?: string; readonly caseSensitive?: true;} | { readonly type: 'number'; readonly op: NumOp; readonly value?: number; readonly valueTo?: number;} | { readonly type: 'day'; readonly op: NumOp; readonly value?: Day; readonly valueTo?: Day; readonly relative?: RelativeRange; readonly zone?: string;} | { readonly type: 'instant'; readonly op: 'blank' | 'notBlank';} | { readonly type: 'instant'; readonly op: 'onDay' | 'betweenDays' | 'before' | 'after' | 'between'; readonly day?: string; readonly dayTo?: string; readonly at?: string | number; readonly atTo?: string | number; readonly resolved: { readonly from: WireInstant | null; readonly to: WireInstant | null; }; readonly zone: string; readonly relative?: RelativeRange;} | { readonly type: 'boolean'; readonly value: boolean;} | { readonly type: 'set'; readonly include?: readonly string[]; readonly exclude?: readonly string[]; readonly blanks?: 'include' | 'exclude';} | { readonly type: 'combined'; readonly join: 'and' | 'or'; readonly conditions: readonly WireFilter[];} | { readonly type: 'custom'; readonly kind: string; readonly value: Json;};WireFilterModel
Section titled “WireFilterModel”export type WireFilterModel = Readonly<Record<string, WireFilter>>;WireInstant
Section titled “WireInstant”export type WireInstant = string;WireKind
Section titled “WireKind”export interface WireKind { read(state: Json): Json | 'invalid'; active(state: Json): boolean; wire?(state: Json, ctx: LocaleCtx, zone: string, context?: unknown): Json; readonly types?: readonly ColumnType[];}createGate
Section titled “createGate”export declare function createGate(abort: () => AbortHandle): RequestGate;sourceRows
Section titled “sourceRows”export declare function sourceRows<T>(data: DataSource<T>, o?: SourceRowsOptions): SourceRows<T>;toWire
Section titled “toWire”export declare function toWire<T>(f: FilterModel, env: WireEnv<T>): { readonly filter: WireFilterModel; readonly problems: readonly Problem[];};@dzgrid/core/spans
Section titled “@dzgrid/core/spans”BandFragment
Section titled “BandFragment”export interface BandFragment { readonly group: string; readonly first: number; readonly count: number; readonly label: string;}GroupEntry
Section titled “GroupEntry”export interface GroupEntry { readonly open: boolean; readonly leaves: readonly string[]; readonly shownOpen: readonly string[]; readonly shownClosed: readonly string[];}GroupTable
Section titled “GroupTable”export interface GroupTable { readonly groups: ReadonlyMap<string, GroupEntry>; readonly problems: readonly Problem[];}HeaderBands
Section titled “HeaderBands”export interface HeaderBands { readonly depth: number; readonly levels: readonly (readonly BandFragment[])[]; readonly problems: readonly Problem[];}NavMove
Section titled “NavMove”export interface NavMove { readonly to: Slot; readonly goal: Slot;}NavShape
Section titled “NavShape”export interface NavShape { readonly rows: number; readonly cols: number; readonly page: number;}RowSpanPlan
Section titled “RowSpanPlan”export interface RowSpanPlan { readonly covered: ReadonlySet<number>; readonly cells: ReadonlyMap<number, { readonly rows: number; readonly cols: number; readonly width: number; }>; readonly mount: readonly number[]; readonly spans: boolean; readonly full: boolean; readonly tall: readonly (readonly [ string, SpanCell ])[]; readonly pinned: readonly (readonly [ string, number, boolean ])[];}export interface Slot { readonly row: number; readonly col: number;}SpanCell
Section titled “SpanCell”export interface SpanCell { readonly row: number; readonly col: number; readonly rows: number; readonly cols: number;}SpanColumns
Section titled “SpanColumns”export interface SpanColumns<T> { readonly layout: { readonly start: { readonly columns: readonly ResolvedColumn<T>[]; }; readonly center: { readonly columns: readonly ResolvedColumn<T>[]; }; readonly end: { readonly columns: readonly ResolvedColumn<T>[]; }; }; get(id: string): ResolvedColumn<T> | undefined;}SpanInput
Section titled “SpanInput”export interface SpanInput<T> { readonly rows: DisplayedRows<T>; readonly columns: SpanColumns<T>; readonly ctx: LocaleCtx; readonly fullWidth?: ((row: Readonly<T>) => boolean | { readonly part?: string; }) | null | undefined; readonly text?: ((col: ResolvedColumn<T>, row: Readonly<T>, index: number) => string | null) | undefined; readonly apart?: ((row: number) => boolean) | undefined; readonly treeColumn?: string | ((row: T) => string | undefined) | undefined; readonly acrossLevels?: boolean | undefined;}SpanLookup
Section titled “SpanLookup”export interface SpanLookup { ownerAt(row: number, col: number): SpanCell | null;}SpanMap
Section titled “SpanMap”export interface SpanMap extends SpanLookup { readonly version: number; readonly none: boolean; coveringAbove(firstRow: number): SpanCell[]; inRow(row: number, colFirst: number, colLast: number): SpanCell[]; fullWidth(row: number): boolean; readonly problems: readonly Problem[];}buildSpanMap
Section titled “buildSpanMap”export declare function buildSpanMap<T>(input: SpanInput<T>, prev?: SpanMap | null): SpanMap;diffState
Section titled “diffState”export declare function diffState(t: GroupTable, state: ReadonlyMap<string, boolean>): Record<string, boolean>;foldedColumns
Section titled “foldedColumns”export declare function foldedColumns(t: GroupTable, state: ReadonlyMap<string, boolean>): Set<string>;groupTable
Section titled “groupTable”export declare function groupTable<T>(tree: readonly ColumnOrGroup<T>[]): GroupTable;headerBands
Section titled “headerBands”export declare function headerBands<T>(tree: readonly ColumnOrGroup<T>[], layout: Segments): HeaderBands;export declare const land: (map: SpanLookup | null, row: number, col: number) => Slot;navigate
Section titled “navigate”export declare function navigate(map: SpanLookup | null, s: NavShape, from: Slot, goal: Slot | null, intent: Intent): NavMove | null;ownerFocus
Section titled “ownerFocus”export declare function ownerFocus<T>(map: SpanMap, columns: readonly string[]): FocusOwner<T>;rowPlanner
Section titled “rowPlanner”export declare function rowPlanner(map: SpanMap, layout: ColumnLayout): (row: number) => RowSpanPlan | null;spanAt
Section titled “spanAt”export declare const spanAt: (map: SpanMap | null, row: number, col: number) => SpanCell | null;@dzgrid/core/csv
Section titled “@dzgrid/core/csv”CsvInput
Section titled “CsvInput”export interface CsvInput<T> { readonly rows: DisplayedRows<T>; readonly at?: Uint32Array | null; readonly columns: ColumnLookup<T>; readonly ctx: LocaleCtx; readonly reader?: ValueReader<T>; readonly spans?: SpanMap | null; readonly spanColumns?: readonly string[]; readonly groupLabel?: ((node: GroupNode | FooterNode) => string) | undefined; readonly aggFuncs?: Readonly<Record<string, AggFuncName | AggFn>> | undefined;}CsvOptions
Section titled “CsvOptions”export interface CsvOptions { readonly text?: 'value' | 'display'; readonly separator?: ',' | ';' | '\t'; readonly bom?: boolean; readonly header?: boolean; readonly numbers?: 'excel' | 'raw'; readonly instants?: 'wall' | 'iso'; readonly enums?: 'label' | 'code'; readonly sanitizeFormulas?: boolean; readonly spans?: 'repeat' | 'first'; readonly columns?: readonly string[]; readonly chunkRows?: number; readonly tree?: 'none' | 'level' | 'indent'; readonly levelHeader?: string; readonly treeColumn?: string; readonly groupRows?: boolean;}CsvScope
Section titled “CsvScope”export type CsvScope = ExportScope;CsvSummary
Section titled “CsvSummary”export interface CsvSummary { readonly rows: number; readonly columns: number; readonly blank: number; readonly invalid: number;}ExportRequest
Section titled “ExportRequest”export interface ExportRequest { readonly scope: CsvScope; readonly columns: readonly string[]; readonly query: Query; readonly count: number | null; readonly selection?: SelectionState; readonly server?: Omit<DataRequest, 'page' | 'signal'>; readonly format?: 'csv' | 'xlsx' | 'json';}csvChunks
Section titled “csvChunks”export declare function csvChunks<T>(i: CsvInput<T>, o?: CsvOptions): Generator<string, CsvSummary>;csvColumns
Section titled “csvColumns”export declare function csvColumns<T>(cols: ColumnLookup<T>, ids?: readonly string[]): { columns: ResolvedColumn<T>[]; problems: Problem[];};csvRows
Section titled “csvRows”export declare function csvRows<T>(model: Pick<RowModel<T>, 'displayed' | 'allRows'>, scope: CsvScope, selection: SelectionState): { rows: DisplayedRows<T>; at: Uint32Array | null; count: number;} | null;csvSeparatorFor
Section titled “csvSeparatorFor”export declare const csvSeparatorFor: (ctx: LocaleCtx) => "," | ";";export declare function toCsv<T>(i: CsvInput<T>, o?: CsvOptions): string;@dzgrid/core/xlsx
Section titled “@dzgrid/core/xlsx”XLSX_COLUMNS
Section titled “XLSX_COLUMNS”export declare const XLSX_COLUMNS = 16384;XLSX_MIME
Section titled “XLSX_MIME”export declare const XLSX_MIME = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";XLSX_ROWS
Section titled “XLSX_ROWS”export declare const XLSX_ROWS = 1048576;XlsxInput
Section titled “XlsxInput”export interface XlsxInput<T> extends CsvInput<T> { readonly widths?: Readonly<Record<string, number>>; readonly pinned?: readonly string[]; readonly groups?: readonly ColumnOrGroup<T>[];}XlsxOptions
Section titled “XlsxOptions”export interface XlsxOptions<T = any> { readonly text?: 'value' | 'display' | undefined; readonly enums?: 'label' | 'code' | undefined; readonly header?: boolean | undefined; readonly columns?: readonly string[]; readonly levelHeader?: string | undefined; readonly treeColumn?: string | undefined; readonly sheetName?: string; readonly groups?: boolean; readonly freeze?: boolean; readonly spans?: 'repeat' | 'merge'; readonly tree?: 'outline' | 'level' | 'none'; readonly instants?: 'wall' | 'utc'; readonly rtl?: boolean; readonly xlsxStyle?: (c: XlsxStyleContext<T>) => XlsxStyle | null | undefined; readonly chunkRows?: number; readonly groupRows?: boolean | undefined;}XlsxPiece
Section titled “XlsxPiece”export interface XlsxPiece { readonly entry: string; readonly text: string;}XlsxStyle
Section titled “XlsxStyle”export interface XlsxStyle { readonly fill?: string; readonly color?: string; readonly bold?: boolean; readonly italic?: boolean;}XlsxStyleContext
Section titled “XlsxStyleContext”export interface XlsxStyleContext<T> { readonly column: string; readonly value: unknown; readonly row: Readonly<T> | null; readonly header: boolean;}XlsxSummary
Section titled “XlsxSummary”export interface XlsxSummary extends CsvSummary { readonly problems: readonly Problem[];}ZipEntry
Section titled “ZipEntry”export interface ZipEntry { readonly name: string; readonly crc: number; readonly size: number; readonly method: 0 | 8; readonly data: readonly Uint8Array[];}export declare function crc32(b: Uint8Array, crc?: number): number;numFmtFor
Section titled “numFmtFor”export declare function numFmtFor(spec: NumberFormatSpec | undefined, ctx: LocaleCtx): string | 0;serialOfDay
Section titled “serialOfDay”export declare const serialOfDay: (d: Day) => number | null;sheetNameOf
Section titled “sheetNameOf”export declare function sheetNameOf(name: unknown): string;toXlsx
Section titled “toXlsx”export declare function toXlsx<T>(i: XlsxInput<T>, o?: XlsxOptions<T>, deflate?: (b: Uint8Array) => Uint8Array): { readonly parts: Uint8Array[]; readonly summary: XlsxSummary;};export declare function utf8(s: string): Uint8Array;xlsxParts
Section titled “xlsxParts”export declare function xlsxParts<T>(i: XlsxInput<T>, o?: XlsxOptions<T>): Generator<XlsxPiece, XlsxSummary>;zipFile
Section titled “zipFile”export declare function zipFile(entries: readonly ZipEntry[]): { readonly parts: Uint8Array[]; readonly problems: Problem[];};@dzgrid/core/rules
Section titled “@dzgrid/core/rules”SelectionRule
Section titled “SelectionRule”export type SelectionRule<T> = (row: DataNode<T>, selection: SelectionState) => boolean | string;refusalProblems
Section titled “refusalProblems”export declare const refusalProblems: (r: SelectionRefusal) => Problem[];ruleGate
Section titled “ruleGate”export declare function ruleGate<T>(rule: () => ((row: DataNode<T>, selection: SelectionState, context: unknown) => boolean | string) | undefined, rowOf: (key: RowKey) => DataNode<T> | undefined, selection: () => SelectionState, context: () => unknown, report: (err: unknown) => void): SelectionGate & { refused(key: RowKey): boolean;};vetSelection
Section titled “vetSelection”export declare function vetSelection<T>(rule: SelectionRule<T>, rowOf: (key: RowKey) => DataNode<T> | undefined, prev: SelectionState, next: SelectionState): { readonly state: SelectionState; readonly refused: SelectionRefusal | null;};@dzgrid/core/tree
Section titled “@dzgrid/core/tree”TreeOptions
Section titled “TreeOptions”export interface TreeOptions<T> { readonly parentId?: (row: T) => RowIdInput | null | undefined; readonly children?: (row: T) => readonly T[] | undefined; readonly path?: (row: T) => readonly string[]; readonly filter?: 'ancestors' | 'subtree'; readonly initial?: 'none' | 'all' | number; readonly fixedOpen?: (row: T) => boolean;}TreeRows
Section titled “TreeRows”export interface TreeRows<T> extends DisplayedRows<T> { parentOf(key: RowKey): RowKey | null; levelAt(i: DisplayIndex): number; posAt(i: DisplayIndex): number; sizeAt(i: DisplayIndex): number; childrenAt(i: DisplayIndex): number; kidsOf(key: RowKey): number; expandedAt(i: DisplayIndex): boolean; matchedAt(i: DisplayIndex): boolean;}TreeShape
Section titled “TreeShape”export interface TreeShape<T> extends RowShape<T> { readonly kind: 'tree'; readonly diagnostics: { readonly builds: number; readonly orders: number; readonly filters: number; readonly flattens: number; };}treeColumnProblems
Section titled “treeColumnProblems”export declare function treeColumnProblems(visible: readonly string[], column: string | undefined): Problem[];treeConflicts
Section titled “treeConflicts”export declare function treeConflicts(o: { readonly spans?: boolean; readonly detail?: boolean; readonly page?: boolean;}): Problem[];treeShape
Section titled “treeShape”export declare function treeShape<T>(o: TreeOptions<T>): TreeShape<T>;@dzgrid/core/tree-lazy
Section titled “@dzgrid/core/tree-lazy”ChildLoader
Section titled “ChildLoader”export type ChildLoader<T> = (parent: RowKey, row: T, answer: (ok: boolean, value: unknown) => void) => () => void;LazyControl
Section titled “LazyControl”export interface LazyControl<T> { loader: ChildLoader<T> | null; abort: (() => AbortHandle) | null; retry(parent: RowKey): void; sync(): void; reset(again?: boolean): void; on(fn: (parent: RowKey, ok: boolean, request: number) => void): () => void; readonly diagnostics: { readonly started: number; readonly answered: number; readonly failed: number; readonly aborted: number; readonly live: number; };}LazyOptions
Section titled “LazyOptions”export interface LazyOptions<T> { readonly has: (row: T) => boolean; readonly load?: (row: T, o: { readonly signal: AbortSignalLike; }) => PromiseLike<readonly T[]> | readonly T[];}LazyShape
Section titled “LazyShape”export interface LazyShape<T> extends TreeShape<T> { readonly lazy: LazyControl<T>;}lazyShape
Section titled “lazyShape”export declare function lazyShape<T>(inner: TreeShape<T>, o: LazyOptions<T>): LazyShape<T>;@dzgrid/core/detail
Section titled “@dzgrid/core/detail”DetailOptions
Section titled “DetailOptions”export interface DetailOptions<T> { readonly height?: number | ((master: Readonly<T>) => number) | 'auto'; readonly initial?: 'none' | 'all'; readonly sizes?: ReadonlyMap<RowKey, number>; readonly isMaster?: (master: Readonly<T>) => boolean;}DetailRows
Section titled “DetailRows”export interface DetailRows<T> extends DisplayedRows<T> { readonly dataCount: number; readonly details: Uint32Array; readonly heights: readonly number[]; parentOf(key: RowKey): RowKey | null; isMaster?(key: RowKey): boolean;}DetailShape
Section titled “DetailShape”export interface DetailShape<T> extends RowShape<T> { readonly kind: 'detail';}SparseExtras
Section titled “SparseExtras”export interface SparseExtras { readonly at: ArrayLike<number>; readonly heights: ArrayLike<number>;}SparseLayout
Section titled “SparseLayout”export interface SparseLayout extends RowLayout { setHeights(changes: Iterable<readonly [ DisplayIndex, number ]>): boolean;}detailConflicts
Section titled “detailConflicts”export declare function detailConflicts(o: { readonly spans?: boolean; readonly tree?: boolean; readonly depth?: number;}): Problem[];detailShape
Section titled “detailShape”export declare function detailShape<T>(o?: DetailOptions<T>): DetailShape<T>;sparseRowLayout
Section titled “sparseRowLayout”export declare function sparseRowLayout(rows: Pick<DisplayedRows<unknown>, 'count' | 'index'>, h: number, x: SparseExtras): SparseLayout;@dzgrid/core/grouping
Section titled “@dzgrid/core/grouping”AggCtx
Section titled “AggCtx”export interface AggCtx { readonly column: string; readonly level: number | null;}export type AggFn<V = unknown> = { agg(values: readonly (V | null)[], ctx: AggCtx): unknown;}['agg'];AggFuncName
Section titled “AggFuncName”export type AggFuncName = 'sum' | 'avg' | 'min' | 'max' | 'count' | 'first' | 'last';FooterNode
Section titled “FooterNode”export interface FooterNode { readonly key: RowKey; readonly kind: 'footer'; readonly level: number; readonly group: RowKey | null; readonly label: string; readonly count: number; readonly aggs: Readonly<Record<string, unknown>>;}GroupShape
Section titled “GroupShape”export interface GroupShape<T> extends RowShape<T> { readonly kind: 'group'; readonly options?: GroupingOptions; readonly by: readonly string[]; setBy(by: readonly string[], source?: ChangeSource): void; totals(): Readonly<Record<string, unknown>>; off(): void; readonly diagnostics: { readonly builds: number; readonly aggs: number; readonly flattens: number; };}GroupedRows
Section titled “GroupedRows”export type GroupedRows<T> = TreeRows<T>;GroupingOptions
Section titled “GroupingOptions”export interface GroupingOptions { readonly by?: readonly string[]; readonly aggFuncs?: Readonly<Record<string, AggFuncName | AggFn>>; readonly expanded?: 'none' | 'all' | number; readonly footers?: 'none' | 'group' | 'grand' | 'both'; readonly grandTotal?: 'top' | 'bottom';}checkRowGroups
Section titled “checkRowGroups”export declare function checkRowGroups<T>(raw: unknown, columns: Pick<ColumnLookup<T>, 'get'>): { readonly by: readonly string[] | null; readonly problems: readonly Problem[];};groupConflicts
Section titled “groupConflicts”export declare function groupConflicts(o: { readonly tree?: boolean; readonly detail?: boolean; readonly spans?: boolean; readonly page?: boolean; readonly server?: boolean;}): Problem[];groupShape
Section titled “groupShape”export declare function groupShape<T>(o?: GroupingOptions): GroupShape<T>;@dzgrid/core/infinite
Section titled “@dzgrid/core/infinite”InfiniteDiagnostics
Section titled “InfiniteDiagnostics”export interface InfiniteDiagnostics { readonly fetches: number; readonly valueFetches: number; readonly gate: GateDiagnostics; readonly blocks: { readonly held: number; readonly asked: number; readonly evicted: number; readonly max: number; readonly failed: number; };}InfiniteModel
Section titled “InfiniteModel”export interface InfiniteModel<T> extends SourceHandle<T> { readonly diagnostics: InfiniteDiagnostics; want(first: number, last: number, keep?: readonly number[]): void; applyTransaction(tx: RowTransaction<T>, source?: ChangeSource): TransactionResult; applyTransactionAsync(tx: RowTransaction<T>, done?: (r: TransactionResult) => void): void;}InfiniteOptions
Section titled “InfiniteOptions”export interface InfiniteOptions { readonly blockSize?: number; readonly maxBlocks?: number; readonly ahead?: number; readonly concurrency?: number; readonly restMs?: number; readonly batchMs?: number; readonly params?: Readonly<Record<string, Json>>; readonly abort?: () => AbortHandle;}InfiniteRows
Section titled “InfiniteRows”export interface InfiniteRows<T> extends SourceBinding<T> { create(env: ModelEnv<T>): InfiniteModel<T>;}infiniteRows
Section titled “infiniteRows”export declare function infiniteRows<T>(data: DataSource<T>, o?: InfiniteOptions): InfiniteRows<T>;@dzgrid/core/server-side
Section titled “@dzgrid/core/server-side”GroupPart
Section titled “GroupPart”export interface GroupPart { readonly by: readonly string[]; readonly path: readonly GroupValue[]; readonly aggs: readonly { readonly column: string; readonly fn: AggFuncName; }[]; readonly pivot?: PivotPart;}GroupResponse
Section titled “GroupResponse”export interface GroupResponse { readonly groups: readonly { readonly value: GroupValue; readonly count?: number; readonly aggs?: Readonly<Record<string, Json>>; }[]; readonly total?: number; readonly hasNext?: boolean; readonly totals?: Readonly<Record<string, Json>>;}GroupValue
Section titled “GroupValue”export type GroupValue = string | number | boolean | null;PivotCells
Section titled “PivotCells”export type PivotCells = Readonly<Record<string, Readonly<Record<string, Json>>>>;PivotPart
Section titled “PivotPart”export interface PivotPart { readonly columns: readonly string[]; readonly desc?: readonly string[]; readonly subtotals?: true; readonly limit: number; readonly sort?: { readonly crossing: readonly GroupValue[]; readonly column: string; readonly dir: 'asc' | 'desc'; }; readonly crossings?: readonly (readonly GroupValue[])[];}PivotResponse
Section titled “PivotResponse”export interface PivotResponse extends Omit<GroupResponse, 'groups'> { readonly groups: readonly (GroupResponse['groups'][number] & { readonly cells?: PivotCells; })[]; readonly pivot?: { readonly crossings?: readonly (readonly GroupValue[])[]; readonly count?: number; readonly totals?: PivotCells; };}ServerPivotPlug
Section titled “ServerPivotPlug”export interface ServerPivotPlug { link(env: ModelEnv<any>, model: ServerPivotHooks): ServerPivotLink | null;}ServerSideDiagnostics
Section titled “ServerSideDiagnostics”export interface ServerSideDiagnostics { readonly fetches: number; readonly valueFetches: number; readonly gate: GateDiagnostics; readonly blocks: { readonly held: number; readonly asked: number; readonly evicted: number; readonly max: number; readonly failed: number; }; readonly levels: number; readonly flattens: number;}ServerSideModel
Section titled “ServerSideModel”export interface ServerSideModel<T> extends SourceHandle<T> { readonly diagnostics: ServerSideDiagnostics; want(first: number, last: number, keep?: readonly number[]): void; readonly by: readonly string[]; readonly pivot?: boolean; readonly wireSort?: readonly SortItem[] | undefined; setBy(by: readonly string[], source?: ChangeSource): void; totals(): Readonly<Record<string, unknown>>; readonly group: GroupPart | null; readonly expansion: ReadonlySet<RowKey>; isExpanded(key: RowKey): boolean; setExpansion(set: ReadonlySet<RowKey>, source?: ChangeSource): void; expand(rows: readonly RowKey[], expanded: boolean, source?: ChangeSource): readonly RowKey[]; expandable(depth?: number): readonly RowKey[]; expandAll(expanded: boolean, depth?: number, source?: ChangeSource): readonly RowKey[]; applyTransaction(tx: RowTransaction<T>, source?: ChangeSource): TransactionResult; applyTransactionAsync(tx: RowTransaction<T>, done?: (r: TransactionResult) => void): void;}ServerSideOptions
Section titled “ServerSideOptions”export interface ServerSideOptions { readonly blockSize?: number; readonly maxBlocks?: number; readonly ahead?: number; readonly concurrency?: number; readonly restMs?: number; readonly batchMs?: number; readonly by?: readonly string[]; readonly aggFuncs?: Readonly<Record<string, AggFuncName>>; readonly footers?: 'none' | 'group' | 'grand' | 'both'; readonly grandTotal?: 'top' | 'bottom'; readonly params?: Readonly<Record<string, Json>>; readonly abort?: () => AbortHandle; readonly pivot?: ServerPivotPlug;}ServerSideRows
Section titled “ServerSideRows”export interface ServerSideRows<T> extends SourceBinding<T> { create(env: ModelEnv<T>): ServerSideModel<T>;}serverSideRows
Section titled “serverSideRows”export declare function serverSideRows<T>(data: DataSource<T>, o?: ServerSideOptions): ServerSideRows<T>;@dzgrid/core/row-drag
Section titled “@dzgrid/core/row-drag”DropWhere
Section titled “DropWhere”export type DropWhere = 'before' | 'after' | 'inside';MoveRowsOptions
Section titled “MoveRowsOptions”export interface MoveRowsOptions<T> { readonly parentId?: (row: T) => RowIdInput | null | undefined; readonly setParent?: (row: T, parent: RowIdInput | null) => T;}MoveStep
Section titled “MoveStep”export type MoveStep = -1 | 1 | 'start' | 'end' | 'in' | 'out';RowDrop
Section titled “RowDrop”export interface RowDrop { readonly key: RowKey | null; readonly where: DropWhere;}RowMove
Section titled “RowMove”export interface RowMove { readonly keys: readonly RowKey[]; readonly target: RowDrop;}dropPlace
Section titled “dropPlace”export declare function dropPlace(d: Rows, i: number, frac: number, moving: readonly RowKey[], tree: boolean): RowDrop | null;movableAt
Section titled “movableAt”export declare const movableAt: (d: Rows, i: number) => RowKey | null;moveRows
Section titled “moveRows”export declare function moveRows<T>(rows: readonly T[], move: RowMove, getRowId: (row: T) => RowIdInput, o?: MoveRowsOptions<T>): T[];movingRows
Section titled “movingRows”export declare function movingRows(d: Rows, keys: readonly RowKey[]): RowKey[];nextPlace
Section titled “nextPlace”export declare function nextPlace(d: Rows, keys: readonly RowKey[], focus: RowKey, by: MoveStep, tree: boolean): RowDrop | null;parentAfter
Section titled “parentAfter”export declare const parentAfter: (d: Rows, t: RowDrop) => RowKey | null;placeOf
Section titled “placeOf”export declare function placeOf(d: Rows, key: RowKey, tree: boolean): { readonly n: number; readonly total: number; readonly level: number;} | null;siblings
Section titled “siblings”export declare function siblings(d: Rows, parent: RowKey | null, tree: boolean): RowKey[];unchanged
Section titled “unchanged”export declare function unchanged(d: Rows, keys: readonly RowKey[], t: RowDrop, tree: boolean): boolean;within
Section titled “within”export declare function within(d: Rows, key: RowKey, set: ReadonlySet<RowKey>): boolean;@dzgrid/core/dock
Section titled “@dzgrid/core/dock”DOCK_AREAS
Section titled “DOCK_AREAS”export declare const DOCK_AREAS: readonly DockArea[];DockArea
Section titled “DockArea”export type DockArea = 'start' | 'end' | 'bottom' | 'float';DockAreaState
Section titled “DockAreaState”export interface DockAreaState { readonly active?: string; readonly size?: number; readonly collapsed?: boolean;}DockPanelState
Section titled “DockPanelState”export interface DockPanelState { readonly area: DockArea; readonly open: boolean; readonly at?: { readonly inline: number; readonly block: number; };}DockState
Section titled “DockState”export interface DockState { readonly panels: Readonly<Record<string, DockPanelState>>; readonly areas: { readonly start?: DockAreaState; readonly end?: DockAreaState; readonly bottom?: DockAreaState; };}checkDock
Section titled “checkDock”export declare function checkDock(raw: unknown, lim: { readonly min: number; readonly max: number;}): { dock: DockState | null; problems: Problem[];};@dzgrid/core/pivot
Section titled “@dzgrid/core/pivot”PivotColumns
Section titled “PivotColumns”export interface PivotColumns<T> { readonly columns: readonly ColumnOrGroup<T>[]; readonly key: string; readonly count: number;}PivotOptions
Section titled “PivotOptions”export interface PivotOptions extends GroupingOptions { readonly on?: boolean; readonly columns?: readonly string[]; readonly desc?: readonly string[]; readonly values?: Fns; readonly subtotals?: boolean; readonly maxColumns?: number; readonly width?: number; readonly labels?: { readonly blank?: string; readonly total?: string; };}PivotSeries
Section titled “PivotSeries”export interface PivotSeries { readonly categories: readonly string[]; readonly series: readonly { readonly id: string; readonly name: string; readonly values: readonly (number | null)[]; }[];}PivotShape
Section titled “PivotShape”export interface PivotShape<T> extends GroupShape<T> { readonly on: boolean; setOn(on: boolean, source?: ChangeSource): void; readonly pivotBy: readonly string[]; setPivotBy(columns: readonly string[], source?: ChangeSource): void; readonly pivotDesc: readonly string[]; valueFns(): Fns; setValueFns(values: Fns, source?: ChangeSource): void; set(p: { readonly on?: boolean; readonly columns?: readonly string[]; readonly desc?: readonly string[]; readonly values?: Fns; }, source?: ChangeSource): void; generated(): PivotColumns<T>; made(id: string): boolean; valueColumn(id: string): string | undefined; rows(key: RowKey): readonly T[]; series(o?: { readonly value?: string; readonly level?: number; }): PivotSeries; readonly passes: number; serve?(link: PivotServe): (C: PivotCrossings | null, values: readonly { readonly col: ResolvedColumn<T>; readonly fn: AggFuncName; }[], depth: number, told: Problem[], count?: number) => { readonly n: number; readonly slot: ArrayLike<number>; readonly ids: readonly string[]; };}checkPivot
Section titled “checkPivot”export declare function checkPivot<T>(raw: unknown, columns: Pick<ColumnLookup<T>, 'get'>): { readonly pivot: { readonly on?: boolean; readonly columns?: readonly string[]; readonly desc?: readonly string[]; readonly values?: Readonly<Record<string, AggFuncName>>; } | null; readonly problems: readonly Problem[];};pivotShape
Section titled “pivotShape”export declare function pivotShape<T>(o?: PivotOptions): PivotShape<T>;pivotState
Section titled “pivotState”export declare function pivotState<T>(shape: PivotShape<T>, columns: Pick<ColumnLookup<T>, 'get'>): { get(): PivotState; set(raw: unknown): readonly Problem[]; made(id: string): boolean;};@dzgrid/core/server-pivot
Section titled “@dzgrid/core/server-pivot”serverPivot
Section titled “serverPivot”export declare function serverPivot(): ServerPivotPlug;@dzgrid/core/edit
Section titled “@dzgrid/core/edit”CellInput
Section titled “CellInput”export type CellInput = { readonly text: string;} | { readonly value: unknown;};CellState
Section titled “CellState”export interface CellState { readonly status: 'pending' | 'saving' | 'saved' | 'failed'; readonly generation: number; readonly refused?: unknown; readonly reason: string | null; readonly code: string | null;}Checked
Section titled “Checked”export type Checked = { readonly ok: true; readonly value: unknown;} | { readonly ok: false; readonly code: string;};CommitResult
Section titled “CommitResult”export interface CommitResult { readonly generation: number | null; readonly staged: number; readonly refused: readonly { readonly key: RowKey; readonly column: string; readonly code: string; }[];}EditController
Section titled “EditController”export interface EditController<T> { readonly reader: ValueReader<T>; check(key: RowKey, column: string, input: CellInput): Checked; commit(cells: readonly { readonly key: RowKey; readonly column: string; readonly input: CellInput; }[], o?: { readonly origin?: SaveOrigin; readonly source?: ChangeSource; }): CommitResult; state(key: RowKey, column: string): CellState | undefined; readonly dirty: boolean; undo(source?: ChangeSource): UndoResult | null; redo(source?: ChangeSource): UndoResult | null; readonly canUndo: boolean; readonly canRedo: boolean; setSave(save?: SaveHandler<T>): void; destroy(): number;}EditOptions
Section titled “EditOptions”export interface EditOptions<T> { readonly ctx: () => LocaleCtx; readonly save?: SaveHandler<T>; readonly abort?: () => AbortHandle;}SaveChange
Section titled “SaveChange”export interface SaveChange<T> { readonly key: RowKey; readonly column: string; readonly value: unknown; readonly previous: unknown; readonly row: Readonly<T>; readonly pinned?: 'top' | 'bottom' | undefined;}SaveHandler
Section titled “SaveHandler”export type SaveHandler<T> = (req: SaveRequest<T>, signal: AbortSignalLike) => unknown;SaveRequest
Section titled “SaveRequest”export interface SaveRequest<T> { readonly origin: SaveOrigin; readonly generation: number; readonly changes: readonly SaveChange<T>[];}UndoResult
Section titled “UndoResult”export interface UndoResult { readonly cells: readonly { readonly key: RowKey; readonly column: string; }[]; readonly skipped: number;}checkValue
Section titled “checkValue”export declare function checkValue<T>(col: ResolvedColumn<T>, value: unknown, o: { readonly row: Readonly<T>; readonly app: unknown; readonly ctx: LocaleCtx; readonly current?: unknown; readonly threw?: (column: string, rule: string) => void;}): Checked;createEdits
Section titled “createEdits”export declare function createEdits<T>(kernel: GridKernel<T>, o: EditOptions<T>): EditController<T>;parseInput
Section titled “parseInput”export declare function parseInput<T>(col: ResolvedColumn<T>, input: CellInput, ctx: LocaleCtx): Checked;@dzgrid/core/range
Section titled “@dzgrid/core/range”CopyOptions
Section titled “CopyOptions”export interface CopyOptions<T> { readonly ctx: LocaleCtx; readonly reader: ValueReader<T>; readonly guard?: boolean; readonly raw?: boolean; readonly headers?: boolean;}FillOptions
Section titled “FillOptions”export interface FillOptions<T> { readonly ctx: LocaleCtx; readonly reader: ValueReader<T>; readonly mode?: 'auto' | 'copy'; readonly swap?: boolean;}FillWay
Section titled “FillWay”export type FillWay = 'down' | 'up' | 'end' | 'start';PASTE_MAX
Section titled “PASTE_MAX”export declare const PASTE_MAX = 100000;PastePlan
Section titled “PastePlan”export interface PastePlan { readonly cells: readonly PlannedCell[]; readonly outside: number; readonly tooBig: boolean; readonly box: RangeBox | null;}PlannedCell
Section titled “PlannedCell”export interface PlannedCell { readonly key: RowKey; readonly column: string; readonly input: CellInput;}RangeBox
Section titled “RangeBox”export interface RangeBox { readonly top: number; readonly bottom: number; readonly start: number; readonly end: number;}RangeStats
Section titled “RangeStats”export interface RangeStats { readonly cells: number; readonly filled: number; readonly numbers: number; readonly sum: number; readonly min: number | null; readonly max: number | null; readonly partial: boolean; readonly formats: readonly NumberFormatSpec[];}boxHeld
Section titled “boxHeld”export declare function boxHeld(b: RangeBox, d: DisplayedRows<unknown>): boolean;boxRows
Section titled “boxRows”export declare function boxRows<T>(b: RangeBox, displayed: DisplayedRows<T>): DataNode<T>[];boxSize
Section titled “boxSize”export declare function boxSize(b: RangeBox, displayed: DisplayedRows<unknown>): { rows: number; cols: number; cells: number;};copyMatrix
Section titled “copyMatrix”export declare function copyMatrix<T>(b: RangeBox, displayed: DisplayedRows<T>, columns: readonly ResolvedColumn<T>[], o: CopyOptions<T>): { readonly text: string[][]; readonly values: unknown[][];};decodeTsv
Section titled “decodeTsv”export declare function decodeTsv(text: string, o?: { readonly pad?: boolean; readonly sep?: string;}): string[][];encodeTsv
Section titled “encodeTsv”export declare function encodeTsv(m: readonly (readonly string[])[]): string;fillTarget
Section titled “fillTarget”export declare function fillTarget(src: RangeBox, to: { readonly row: number; readonly col: number;}, along?: 'row' | 'column'): { readonly box: RangeBox; readonly way: FillWay;} | null;pasteText
Section titled “pasteText”export declare function pasteText<T>(text: string, col: ResolvedColumn<T>): string;planFill
Section titled “planFill”export declare function planFill<T>(src: RangeBox, target: RangeBox, way: FillWay, displayed: DisplayedRows<T>, columns: readonly ResolvedColumn<T>[], o: FillOptions<T>): PlannedCell[];planPaste
Section titled “planPaste”export declare function planPaste<T>(src: readonly (readonly CellInput[])[], at: RangeBox, displayed: DisplayedRows<T>, columns: readonly ResolvedColumn<T>[], o?: { readonly max?: number;}): PastePlan;rangeBox
Section titled “rangeBox”export declare function rangeBox(r: CellRange, displayed: DisplayedRows<unknown>, columns: readonly string[]): RangeBox | null;rangeStats
Section titled “rangeStats”export declare function rangeStats<T>(b: RangeBox, displayed: DisplayedRows<T>, columns: readonly ResolvedColumn<T>[], o: { readonly ctx: LocaleCtx; readonly reader: ValueReader<T>;}): RangeStats;@dzgrid/core/state
Section titled “@dzgrid/core/state”Density
Section titled “Density”export type Density = 'compact' | 'comfortable' | 'spacious';GridState
Section titled “GridState”export interface GridState { readonly v: 1; readonly columns: readonly GridStateColumn[]; readonly groups?: Readonly<Record<string, boolean>>; readonly sort: readonly SortItem[]; readonly filter: FilterModel; readonly quick: string; readonly page?: number; readonly pageSize?: number; readonly density?: Density; readonly rowGroups?: readonly string[]; readonly dock?: DockState; readonly pivot?: PivotState;}GridStateColumn
Section titled “GridStateColumn”export interface GridStateColumn { readonly id: string; readonly width?: number; readonly hidden?: boolean; readonly pinned: Side | null; readonly order: number;}GroupsAdapter
Section titled “GroupsAdapter”export interface GroupsAdapter { collapsible(id: string): boolean; get(): Readonly<Record<string, boolean>>; set(open: Readonly<Record<string, boolean>>): void;}PivotState
Section titled “PivotState”export interface PivotState { readonly on?: boolean; readonly columns?: readonly string[]; readonly desc?: readonly string[]; readonly values?: Readonly<Record<string, AggFuncName>>;}RowGroupsAdapter
Section titled “RowGroupsAdapter”export interface RowGroupsAdapter { get(): readonly string[]; set(raw: unknown): readonly Problem[];}STATE_UPGRADES
Section titled “STATE_UPGRADES”export declare const STATE_UPGRADES: readonly ((s: any) => any)[];STATE_VERSION
Section titled “STATE_VERSION”export declare const STATE_VERSION = 1;StateEnv
Section titled “StateEnv”export interface StateEnv { density?(): Density | undefined; setDensity?(d: unknown): boolean | void; readonly groups?: GroupsAdapter | undefined; readonly rowGroups?: RowGroupsAdapter | undefined; readonly dock?: { get(): DockState | undefined; set(raw: unknown): readonly Problem[]; } | undefined; readonly pivot?: { get(): PivotState | undefined; set(raw: unknown): readonly Problem[]; made(id: string): boolean; } | undefined;}StateOptions
Section titled “StateOptions”export interface StateOptions { readonly include?: readonly StatePart[]; readonly exclude?: readonly StatePart[];}StatePart
Section titled “StatePart”export type StatePart = 'columns' | 'groups' | 'sort' | 'filter' | 'quick' | 'page' | 'density' | 'rowGroups' | 'dock' | 'pivot';StateProblemCode
Section titled “StateProblemCode”export type StateProblemCode = 'state-version' | 'state-column' | 'state-group' | 'state-field' | 'state-storage';captureState
Section titled “captureState”export declare function captureState<T>(k: GridKernel<T>, env?: StateEnv, opts?: StateOptions): GridState;checkState
Section titled “checkState”export declare function checkState(raw: unknown, upgrades?: readonly ((s: any) => any)[]): { state: GridState | null; problems: Problem[];};restoreState
Section titled “restoreState”export declare function restoreState<T>(k: GridKernel<T>, raw: unknown, env?: StateEnv, source?: ChangeSource): Problem[];stateText
Section titled “stateText”export declare const stateText: (s: GridState) => string;@dzgrid/core/row-gaps
Section titled “@dzgrid/core/row-gaps”GapCtx
Section titled “GapCtx”export interface GapCtx<T> { readonly row: Readonly<T> | null; readonly key: RowKey; readonly index: number; readonly level: number; readonly prev: Readonly<T> | null;}GapRule
Section titled “GapRule”export type GapRule<T> = (c: GapCtx<T>) => boolean | number | null | undefined;gapLayout
Section titled “gapLayout”export declare function gapLayout(inner: RowLayout, at: readonly number[], sizes: readonly number[]): RowLayout;gapsOf
Section titled “gapsOf”export declare function gapsOf<T>(rows: DisplayedRows<T>, rule: GapRule<T>, size: number): { at: number[]; sizes: number[]; problems: Problem[];};export declare const roots: (c: GapCtx<unknown>) => boolean;@dzgrid/core/compare
Section titled “@dzgrid/core/compare”sameValues
Section titled “sameValues”export declare function sameValues(a: unknown, b: unknown): boolean;@dzgrid/core/auto-columns
Section titled “@dzgrid/core/auto-columns”AutoColumnsOptions
Section titled “AutoColumnsOptions”export interface AutoColumnsOptions<T, C extends { readonly id: string;} = ColumnDef<T>> { readonly sample?: number; readonly header?: (field: string) => string; readonly override?: Readonly<Record<string, Partial<C>>>; readonly merge?: Readonly<Record<string, MergedColumn<T, C>>>; readonly hide?: readonly string[]; readonly add?: readonly C[]; readonly order?: readonly string[];}MergedColumn
Section titled “MergedColumn”export type MergedColumn<T, C extends { readonly id: string;} = ColumnDef<T>> = Partial<Omit<C, 'id'>> & { readonly from: readonly string[];};autoColumns
Section titled “autoColumns”export declare function autoColumns<T, C extends { readonly id: string;} = ColumnDef<T>>(rows: readonly T[], o?: AutoColumnsOptions<T, NoInfer<C>>): { columns: C[]; problems: Problem[];};@dzgrid/core/totals
Section titled “@dzgrid/core/totals”ColumnTotals
Section titled “ColumnTotals”export interface ColumnTotals { readonly values: Readonly<Record<string, unknown>>; readonly columns: readonly string[]; readonly problems: readonly Problem[];}columnTotals
Section titled “columnTotals”export declare function columnTotals<T>(rows: DisplayedRows<T>, columns: readonly ResolvedColumn<T>[], o: { readonly ctx: LocaleCtx; readonly reader: ValueReader<T>;}): ColumnTotals;@dzgrid/core/import
Section titled “@dzgrid/core/import”ImportCell
Section titled “ImportCell”export type ImportCell = string | number | boolean | null | { readonly error: true;};ImportResult
Section titled “ImportResult”export interface ImportResult { readonly rows: Record<string, unknown>[]; readonly problems: Problem[];}ZipEntry
Section titled “ZipEntry”export interface ZipEntry { readonly method: number; readonly data: Uint8Array; readonly size: number;}importRows
Section titled “importRows”export declare function importRows<T>(table: readonly (readonly ImportCell[])[], columns: readonly ResolvedColumn<T>[], ctx: LocaleCtx): ImportResult;readCsv
Section titled “readCsv”export declare function readCsv(text: string): string[][];readSheet
Section titled “readSheet”export declare function readSheet(xml: string, shared: readonly string[]): ImportCell[][];sharedStrings
Section titled “sharedStrings”export declare const sharedStrings: (xml: string) => string[];sheetPath
Section titled “sheetPath”export declare function sheetPath(workbook: string, rels: string): string | null;zipEntries
Section titled “zipEntries”export declare function zipEntries(b: Uint8Array): Map<string, ZipEntry> | null;