@agile-team/mach-table 0.19.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -110
- package/dist/adapter.cjs +1 -0
- package/dist/adapter.d.cts +384 -0
- package/dist/adapter.d.ts +384 -0
- package/dist/adapter.js +1 -0
- package/dist/configuration-BQ5WYIdm.d.cts +57 -0
- package/dist/configuration-CIdNt43y.d.ts +57 -0
- package/dist/index.cjs +5 -6
- package/dist/index.d.cts +10 -1469
- package/dist/index.d.ts +10 -1469
- package/dist/index.js +5 -6
- package/dist/{worker-P1ks_WSx.d.cts → options-CnUx414l.d.cts} +987 -1069
- package/dist/{worker-P1ks_WSx.d.ts → options-CnUx414l.d.ts} +987 -1069
- package/dist/worker.cjs +0 -1
- package/dist/worker.d.cts +47 -1
- package/dist/worker.d.ts +47 -1
- package/dist/worker.js +0 -1
- package/package.json +12 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/worker.cjs.map +0 -1
- package/dist/worker.js.map +0 -1
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
declare class ColumnGroup<TData = any> {
|
|
2
|
-
readonly groupId: string;
|
|
3
|
-
readonly def: ColDefGroup<TData>;
|
|
4
|
-
parent: ColumnGroup<TData> | null;
|
|
5
|
-
children: (ColumnGroup<TData> | Column<TData>)[];
|
|
6
|
-
constructor(groupId: string, def: ColDefGroup<TData>);
|
|
7
|
-
get headerName(): string;
|
|
8
|
-
getLeafColumns(out?: Column<TData>[]): Column<TData>[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare class Column<TData = any> {
|
|
12
|
-
readonly id: string;
|
|
13
|
-
readonly colDef: ColDef<TData>;
|
|
14
|
-
hide: boolean;
|
|
15
|
-
pinned: PinnedDirection | null;
|
|
16
|
-
manualWidth: number | null;
|
|
17
|
-
flex: number | null;
|
|
18
|
-
currentWidth: number;
|
|
19
|
-
parentGroup: ColumnGroup<TData> | null;
|
|
20
|
-
level: number;
|
|
21
|
-
isDetailToggle: boolean;
|
|
22
|
-
constructor(id: string, colDef: ColDef<TData>);
|
|
23
|
-
get sortable(): boolean;
|
|
24
|
-
get resizable(): boolean;
|
|
25
|
-
get movable(): boolean;
|
|
26
|
-
get filterable(): boolean;
|
|
27
|
-
get filterType(): FilterType;
|
|
28
|
-
get hasCheckbox(): boolean;
|
|
29
|
-
resetWidth(): void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
1
|
interface RowNode<TData = any> {
|
|
33
2
|
id: string;
|
|
34
3
|
data: TData | null;
|
|
@@ -277,73 +246,6 @@ interface GridEventMap<TData = any> {
|
|
|
277
246
|
dirtyStateChanged: DirtyStateChangedEvent<TData>;
|
|
278
247
|
}
|
|
279
248
|
|
|
280
|
-
declare const DEFAULT_LOCALE: {
|
|
281
|
-
readonly matchContains: "包含";
|
|
282
|
-
readonly matchNotContains: "不包含";
|
|
283
|
-
readonly matchEquals: "等于";
|
|
284
|
-
readonly matchNotEquals: "不等于";
|
|
285
|
-
readonly matchStartsWith: "开头是";
|
|
286
|
-
readonly matchEndsWith: "结尾是";
|
|
287
|
-
readonly matchBlank: "为空";
|
|
288
|
-
readonly matchNotBlank: "不为空";
|
|
289
|
-
readonly matchLessThan: "小于";
|
|
290
|
-
readonly matchLessThanOrEqual: "小于等于";
|
|
291
|
-
readonly matchGreaterThan: "大于";
|
|
292
|
-
readonly matchGreaterThanOrEqual: "大于等于";
|
|
293
|
-
readonly matchInRange: "在范围内";
|
|
294
|
-
readonly apply: "应用";
|
|
295
|
-
readonly reset: "重置";
|
|
296
|
-
readonly search: "搜索...";
|
|
297
|
-
readonly emptySetLabel: "(空)";
|
|
298
|
-
readonly selectedCount: "已选 {n} 项";
|
|
299
|
-
readonly sortAsc: "升序";
|
|
300
|
-
readonly sortDesc: "降序";
|
|
301
|
-
readonly clearSort: "取消排序";
|
|
302
|
-
readonly pinLeft: "固定左侧";
|
|
303
|
-
readonly pinRight: "固定右侧";
|
|
304
|
-
readonly clearPin: "取消固定";
|
|
305
|
-
readonly autoSize: "自适应列宽";
|
|
306
|
-
readonly hideColumn: "隐藏此列";
|
|
307
|
-
readonly columnVisibility: "列显示";
|
|
308
|
-
readonly resetAll: "重置全部";
|
|
309
|
-
readonly autoSizeAll: "全部自适应";
|
|
310
|
-
readonly columnSettings: "列设置";
|
|
311
|
-
readonly totalLabel: "合计";
|
|
312
|
-
readonly totalRowsLabel: "共 {n} 行";
|
|
313
|
-
readonly menuCopy: "复制";
|
|
314
|
-
readonly menuPaste: "粘贴";
|
|
315
|
-
readonly menuClearContents: "清除内容";
|
|
316
|
-
readonly loading: "加载中...";
|
|
317
|
-
readonly statusSelected: "已选 {n} 行";
|
|
318
|
-
readonly statusSum: "和 {n}";
|
|
319
|
-
readonly statusAvg: "均 {n}";
|
|
320
|
-
readonly statusCount: "计 {n}";
|
|
321
|
-
readonly emptyRows: "暂无数据";
|
|
322
|
-
readonly emptyRowsHint: "没有可显示的行";
|
|
323
|
-
readonly paginationTotal: "共 {n} 条";
|
|
324
|
-
readonly paginationPage: "第 {a} / {b} 页";
|
|
325
|
-
readonly perPage: "{n} 条/页";
|
|
326
|
-
readonly pageFirst: "首页";
|
|
327
|
-
readonly pagePrev: "上一页";
|
|
328
|
-
readonly pageNext: "下一页";
|
|
329
|
-
readonly pageLast: "末页";
|
|
330
|
-
readonly requestFailed: "数据加载失败";
|
|
331
|
-
readonly requestFailedHint: "请检查网络后重试";
|
|
332
|
-
readonly actionView: "查看";
|
|
333
|
-
readonly actionEdit: "编辑";
|
|
334
|
-
readonly actionDelete: "删除";
|
|
335
|
-
readonly actionConfirm: "确认";
|
|
336
|
-
readonly actionSave: "保存";
|
|
337
|
-
readonly actionCancel: "取消";
|
|
338
|
-
readonly actionMore: "更多操作";
|
|
339
|
-
};
|
|
340
|
-
type RgLocaleKey = keyof typeof DEFAULT_LOCALE;
|
|
341
|
-
type RgLocale = Partial<Record<RgLocaleKey, string>>;
|
|
342
|
-
declare const LOCALE_EN: RgLocale;
|
|
343
|
-
declare function matchLocaleKey(match: string): RgLocaleKey;
|
|
344
|
-
declare function formatText(template: string, n: number | string): string;
|
|
345
|
-
declare function formatTwo(template: string, a: number | string, b: number | string): string;
|
|
346
|
-
|
|
347
249
|
interface GridStateBase {
|
|
348
250
|
columns: ColumnState[];
|
|
349
251
|
sortModel: SortModel;
|
|
@@ -358,17 +260,13 @@ interface GridStateBase {
|
|
|
358
260
|
expandedRowIds: string[];
|
|
359
261
|
expandedGroupIds: string[];
|
|
360
262
|
}
|
|
361
|
-
/** Read-only compatibility shape accepted from MachTable 0.14/0.15. */
|
|
362
|
-
interface LegacyGridStateV1 extends GridStateBase {
|
|
363
|
-
version: 1;
|
|
364
|
-
}
|
|
365
263
|
/** Serializable snapshot of user-visible grid state. */
|
|
366
264
|
interface GridState extends GridStateBase {
|
|
367
265
|
/** State schema version, independent from the package version. */
|
|
368
266
|
version: 2;
|
|
369
267
|
advancedFilterModel: AdvancedFilterModel | null;
|
|
370
268
|
}
|
|
371
|
-
type GridStateInput = GridState
|
|
269
|
+
type GridStateInput = GridState;
|
|
372
270
|
type GridStateSection = "columns" | "sort" | "filter" | "pagination" | "selection" | "expansion";
|
|
373
271
|
interface ApplyGridStateOptions {
|
|
374
272
|
/** Applies all sections when omitted. */
|
|
@@ -377,1033 +275,1053 @@ interface ApplyGridStateOptions {
|
|
|
377
275
|
emitEvents?: boolean;
|
|
378
276
|
}
|
|
379
277
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
4: 3;
|
|
389
|
-
};
|
|
390
|
-
/** Dot-separated path to a serializable field, capped to keep editor inference fast. */
|
|
391
|
-
type FieldPath<T, D extends Depth = 4> = D extends 0 ? never : T extends Primitive ? never : {
|
|
392
|
-
[K in keyof T & string]: NonNullable<T[K]> extends Primitive | readonly unknown[] ? K : K | `${K}.${FieldPath<NonNullable<T[K]>, Previous[D]>}`;
|
|
393
|
-
}[keyof T & string];
|
|
394
|
-
type FieldPathValue<T, P extends string> = P extends keyof T ? T[P] : P extends `${infer Head}.${infer Tail}` ? Head extends keyof T ? FieldPathValue<NonNullable<T[Head]>, Tail> : unknown : unknown;
|
|
395
|
-
|
|
396
|
-
interface ColumnStateStore {
|
|
397
|
-
load(key: string): ColumnState[] | null | Promise<ColumnState[] | null>;
|
|
398
|
-
save(key: string, state: ColumnState[]): void | Promise<void>;
|
|
399
|
-
}
|
|
400
|
-
interface GridStateStore {
|
|
401
|
-
load(key: string): GridStateInput | null | Promise<GridStateInput | null>;
|
|
402
|
-
save(key: string, state: GridStateInput): void | Promise<void>;
|
|
403
|
-
clear?(key: string): void | Promise<void>;
|
|
404
|
-
}
|
|
405
|
-
/** Per-grid component overrides. These take precedence over the global registry. */
|
|
406
|
-
interface GridComponents {
|
|
407
|
-
cellRenderers?: Readonly<Record<string, CellRendererFn>>;
|
|
408
|
-
cellEditors?: Readonly<Record<string, CellEditorFactory>>;
|
|
409
|
-
}
|
|
410
|
-
interface GridFeatureContext<TData = any> {
|
|
411
|
-
readonly api: GridApi<TData>;
|
|
412
|
-
readonly root: HTMLElement;
|
|
413
|
-
getOptions(): Readonly<ResolvedGridOptions<TData>>;
|
|
414
|
-
addEventListener<K extends keyof GridEventMap<TData>>(type: K, listener: (event: GridEventMap<TData>[K]) => void): () => void;
|
|
415
|
-
/** Registers cleanup even when setup later throws or the feature is hot-replaced. */
|
|
416
|
-
onCleanup(cleanup: () => void): void;
|
|
417
|
-
addManagedDomListener(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
|
|
418
|
-
setManagedTimeout(handler: () => void, delayMs: number): ReturnType<typeof setTimeout>;
|
|
419
|
-
createAbortController(): AbortController;
|
|
420
|
-
reportError(error: unknown, source: string, context?: Record<string, unknown>): void;
|
|
421
|
-
}
|
|
422
|
-
interface GridFeatureRequirement {
|
|
423
|
-
key: string;
|
|
424
|
-
/** Semver range, for example `>=0.18 <1`, `^0.18.0` or an exact version. */
|
|
425
|
-
version?: string;
|
|
426
|
-
}
|
|
427
|
-
/** Composable extension point; feature instances are scoped to one grid. */
|
|
428
|
-
interface GridFeature<TData = any> {
|
|
429
|
-
readonly key: string;
|
|
430
|
-
/** Informational extension version exposed through diagnostics. */
|
|
431
|
-
readonly version?: string;
|
|
432
|
-
/** Feature keys that must be initialised before this feature. */
|
|
433
|
-
readonly requires?: readonly (string | GridFeatureRequirement)[];
|
|
434
|
-
/** Mutually exclusive feature keys. Conflicting features are not initialised. */
|
|
435
|
-
readonly conflicts?: readonly string[];
|
|
436
|
-
setup(context: GridFeatureContext<TData>): void | (() => void);
|
|
437
|
-
destroy?(): void;
|
|
278
|
+
interface CsvExportParams {
|
|
279
|
+
includeHeader?: boolean;
|
|
280
|
+
columnSeparator?: string;
|
|
281
|
+
prependBOM?: boolean;
|
|
282
|
+
onlySelected?: boolean;
|
|
283
|
+
onlyAllDisplayed?: boolean;
|
|
284
|
+
protectFormulas?: boolean;
|
|
285
|
+
headersOnly?: boolean;
|
|
438
286
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
287
|
+
interface ImportCsvOptions {
|
|
288
|
+
separator?: string;
|
|
289
|
+
mode?: "replace" | "append" | "paste";
|
|
290
|
+
headerRowIndex?: number;
|
|
291
|
+
coerceNumbers?: boolean;
|
|
292
|
+
parseValue?: (params: {
|
|
293
|
+
value: string;
|
|
294
|
+
field: string;
|
|
295
|
+
rowIndex: number;
|
|
296
|
+
columnIndex: number;
|
|
297
|
+
}) => any;
|
|
448
298
|
}
|
|
449
|
-
interface
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
sortModel: SortModel;
|
|
453
|
-
filterModel: FilterModel;
|
|
454
|
-
advancedFilterModel: AdvancedFilterModel | null;
|
|
455
|
-
quickFilterText: string | null;
|
|
456
|
-
signal: AbortSignal;
|
|
457
|
-
onSuccess(rows: TData[], lastRow?: number): void;
|
|
458
|
-
fail(reason?: unknown): void;
|
|
299
|
+
interface PrintOptions {
|
|
300
|
+
title?: string;
|
|
301
|
+
includeHeader?: boolean;
|
|
459
302
|
}
|
|
460
|
-
interface
|
|
461
|
-
|
|
303
|
+
interface RowTransaction<TData = any> {
|
|
304
|
+
add?: TData[];
|
|
305
|
+
addIndex?: number;
|
|
306
|
+
remove?: TData[];
|
|
307
|
+
update?: TData[];
|
|
462
308
|
}
|
|
463
|
-
|
|
464
|
-
interface GridDataProcessorColumn {
|
|
309
|
+
interface GridCellChange {
|
|
465
310
|
colId: string;
|
|
466
|
-
|
|
467
|
-
|
|
311
|
+
originalValue: unknown;
|
|
312
|
+
value: unknown;
|
|
468
313
|
}
|
|
469
|
-
interface
|
|
470
|
-
|
|
314
|
+
interface GridChange<TData = any> {
|
|
315
|
+
rowId: string;
|
|
471
316
|
data: TData;
|
|
317
|
+
cells: GridCellChange[];
|
|
472
318
|
}
|
|
473
|
-
interface
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
quickFilterText: string | null;
|
|
480
|
-
signal: AbortSignal;
|
|
319
|
+
interface GridDiagnosticError {
|
|
320
|
+
code: GridErrorCode;
|
|
321
|
+
source: string;
|
|
322
|
+
message: string;
|
|
323
|
+
timestamp: number;
|
|
324
|
+
context?: Record<string, unknown>;
|
|
481
325
|
}
|
|
482
|
-
interface
|
|
483
|
-
|
|
484
|
-
|
|
326
|
+
interface GridPerformanceSnapshot {
|
|
327
|
+
sampleCount: number;
|
|
328
|
+
lastRenderMs: number;
|
|
329
|
+
averageRenderMs: number;
|
|
330
|
+
maxRenderMs: number;
|
|
331
|
+
p95RenderMs: number;
|
|
332
|
+
longRenderCount: number;
|
|
333
|
+
renderedRows: number;
|
|
334
|
+
renderedColumns: number;
|
|
335
|
+
renderedCells: number;
|
|
336
|
+
layoutSampleCount: number;
|
|
337
|
+
p95LayoutMs: number;
|
|
338
|
+
modelSampleCount: number;
|
|
339
|
+
p95ModelMs: number;
|
|
340
|
+
longTaskCount: number;
|
|
341
|
+
longTaskTotalMs: number;
|
|
342
|
+
usedHeapBytes: number | null;
|
|
485
343
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
344
|
+
interface GridUpdateSchedulerSnapshot {
|
|
345
|
+
batchDepth: number;
|
|
346
|
+
flushCount: number;
|
|
347
|
+
requestCount: number;
|
|
348
|
+
coalescedRequestCount: number;
|
|
349
|
+
pending: boolean;
|
|
490
350
|
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
interface
|
|
351
|
+
interface RemoteBlockCacheSnapshot {
|
|
352
|
+
cachedBlockCount: number;
|
|
353
|
+
loadingBlockCount: number;
|
|
354
|
+
activeRequestCount: number;
|
|
355
|
+
queuedRequestCount: number;
|
|
356
|
+
cachedRowCount: number;
|
|
357
|
+
hitCount: number;
|
|
358
|
+
missCount: number;
|
|
359
|
+
evictionCount: number;
|
|
360
|
+
}
|
|
361
|
+
interface GridAsyncOptions {
|
|
362
|
+
signal?: AbortSignal;
|
|
363
|
+
}
|
|
364
|
+
interface RefreshCellsParams {
|
|
365
|
+
/** Stable row identifiers. Omit together with rowIndexes to target every rendered row. */
|
|
366
|
+
rowIds?: readonly string[];
|
|
367
|
+
/** Displayed row indexes. Omit together with rowIds to target every rendered row. */
|
|
368
|
+
rowIndexes?: readonly number[];
|
|
369
|
+
/** Column IDs. Omit to target every rendered column in matching rows. */
|
|
370
|
+
columns?: readonly string[];
|
|
371
|
+
/** Bypasses renderer refresh hooks and recreates matching cell content. */
|
|
372
|
+
force?: boolean;
|
|
373
|
+
/** Also refreshes pinned rows. Defaults to true only for an unscoped refresh. */
|
|
374
|
+
includePinned?: boolean;
|
|
375
|
+
}
|
|
376
|
+
interface ColumnWorkbenchItem {
|
|
377
|
+
colId: string;
|
|
378
|
+
label: string;
|
|
379
|
+
visible: boolean;
|
|
380
|
+
pinned: "left" | "right" | null;
|
|
381
|
+
width: number;
|
|
382
|
+
movable: boolean;
|
|
383
|
+
hideable: boolean;
|
|
384
|
+
}
|
|
385
|
+
interface GridDiagnostics {
|
|
386
|
+
gridId: number;
|
|
387
|
+
version: string;
|
|
388
|
+
destroyed: boolean;
|
|
389
|
+
infinite: boolean;
|
|
390
|
+
loading: boolean;
|
|
391
|
+
rowCount: number;
|
|
392
|
+
renderedRowCount: number;
|
|
393
|
+
columnCount: number;
|
|
394
|
+
selectedRowCount: number;
|
|
395
|
+
dirtyRowCount: number;
|
|
396
|
+
activeFeatures: ReadonlyArray<{
|
|
397
|
+
key: string;
|
|
398
|
+
version?: string;
|
|
399
|
+
}>;
|
|
400
|
+
performance: GridPerformanceSnapshot;
|
|
401
|
+
updates: GridUpdateSchedulerSnapshot;
|
|
402
|
+
recentErrors: readonly GridDiagnosticError[];
|
|
403
|
+
}
|
|
404
|
+
interface GridRowsApi<TData = any> {
|
|
405
|
+
setData(rows: TData[] | null | undefined): void;
|
|
406
|
+
transact(transaction: RowTransaction<TData>): void;
|
|
407
|
+
transactAsync(transaction: RowTransaction<TData>, options?: GridAsyncOptions): Promise<void>;
|
|
408
|
+
flushTransactions(): void;
|
|
409
|
+
getCount(): number;
|
|
410
|
+
getAt(index: number): RowNode<TData> | undefined;
|
|
411
|
+
getById(id: string): RowNode<TData> | undefined;
|
|
412
|
+
forEach(callback: (node: RowNode<TData>, index: number) => void): void;
|
|
413
|
+
forEachDisplayed(callback: (node: RowNode<TData>, index: number) => void): void;
|
|
414
|
+
reorder(fromIndex: number, toIndex: number): boolean;
|
|
415
|
+
isRemote(): boolean;
|
|
416
|
+
reload(options?: GridAsyncOptions): Promise<void>;
|
|
417
|
+
ensureLoaded(startRow: number, endRow: number, options?: GridAsyncOptions): Promise<void>;
|
|
418
|
+
purgeCache(): void;
|
|
419
|
+
getCacheSnapshot(): RemoteBlockCacheSnapshot;
|
|
420
|
+
}
|
|
421
|
+
interface GridColumnsApi<TData = any> {
|
|
422
|
+
getDefinitions(): (ColDef<TData> | ColDefGroup<TData>)[] | null;
|
|
423
|
+
setDefinitions(definitions: (ColDef<TData> | ColDefGroup<TData>)[] | null | undefined): void;
|
|
424
|
+
getState(): ColumnState[];
|
|
425
|
+
setState(state: ColumnState[]): void;
|
|
426
|
+
resetState(): void;
|
|
427
|
+
setVisible(colId: string, visible: boolean): void;
|
|
428
|
+
setPinned(colId: string, pinned: "left" | "right" | null): void;
|
|
429
|
+
move(colId: string, toIndex: number): void;
|
|
430
|
+
setWidth(colId: string, width: number): boolean;
|
|
431
|
+
fit(width?: number): void;
|
|
432
|
+
autoSize(colId: string, skipHeader?: boolean): void;
|
|
433
|
+
autoSizeAll(skipHeader?: boolean): void;
|
|
434
|
+
getWorkbenchItems(): ColumnWorkbenchItem[];
|
|
435
|
+
openWorkbench(anchor?: HTMLElement): void;
|
|
436
|
+
closeWorkbench(): void;
|
|
437
|
+
}
|
|
438
|
+
interface GridSelectionApi<TData = any> {
|
|
439
|
+
getRows(): TData[];
|
|
440
|
+
getVisibleRows(): TData[];
|
|
441
|
+
getNodes(): RowNode<TData>[];
|
|
442
|
+
getIds(): string[];
|
|
443
|
+
setRows(rows: TData[], clearOthers?: boolean): void;
|
|
444
|
+
setById(nodeId: string, selected?: boolean, clearOthers?: boolean): void;
|
|
445
|
+
selectAll(filteredOnly?: boolean): void;
|
|
446
|
+
clear(): void;
|
|
447
|
+
getMode(): RowSelectionMode;
|
|
448
|
+
setMode(mode: RowSelectionMode): void;
|
|
449
|
+
getRange(): GridCellRange | null;
|
|
450
|
+
clearRange(): void;
|
|
451
|
+
}
|
|
452
|
+
interface GridEditingApi<TData = any> {
|
|
453
|
+
startCell(params: {
|
|
454
|
+
rowIndex: number;
|
|
455
|
+
colId: string;
|
|
456
|
+
keyPress?: string;
|
|
457
|
+
}): boolean;
|
|
458
|
+
startRow(rowIndex: number): boolean;
|
|
459
|
+
isRowActive(rowIndex?: number): boolean;
|
|
460
|
+
stop(options?: {
|
|
461
|
+
cancel?: boolean;
|
|
462
|
+
}): Promise<boolean>;
|
|
463
|
+
getChanges(): GridChange<TData>[];
|
|
464
|
+
getDirtyRowIds(): string[];
|
|
465
|
+
markSaved(rowIds?: readonly string[]): void;
|
|
466
|
+
rollback(rowIds?: readonly string[]): boolean;
|
|
467
|
+
save(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridBatchSaveResult<TData>>;
|
|
468
|
+
undo(): boolean;
|
|
469
|
+
redo(): boolean;
|
|
470
|
+
canUndo(): boolean;
|
|
471
|
+
canRedo(): boolean;
|
|
472
|
+
}
|
|
473
|
+
interface GridStateApi {
|
|
474
|
+
get(): GridState;
|
|
475
|
+
apply(state: GridStateInput, options?: ApplyGridStateOptions): void;
|
|
476
|
+
}
|
|
477
|
+
interface GridDiagnosticsApi {
|
|
478
|
+
get(): GridDiagnostics;
|
|
479
|
+
getPerformance(): GridPerformanceSnapshot;
|
|
480
|
+
resetPerformance(): void;
|
|
481
|
+
}
|
|
482
|
+
/** Filtering owns filter state only; server requests remain in the host query layer. */
|
|
483
|
+
interface GridFilteringApi {
|
|
484
|
+
getModel(): FilterModel;
|
|
485
|
+
setModel(model: FilterModel | null): void;
|
|
486
|
+
getAdvancedModel(): AdvancedFilterModel | null;
|
|
487
|
+
setAdvancedModel(model: AdvancedFilterModel | null): void;
|
|
488
|
+
getQuickText(): string | null;
|
|
489
|
+
setQuickText(text: string | null | undefined): void;
|
|
490
|
+
isPresent(colId?: string): boolean;
|
|
491
|
+
}
|
|
492
|
+
interface GridPaginationApi {
|
|
493
|
+
isEnabled(): boolean;
|
|
494
|
+
setEnabled(enabled: boolean): void;
|
|
495
|
+
getPage(): number;
|
|
496
|
+
setPage(page: number): void;
|
|
497
|
+
getPageSize(): number;
|
|
498
|
+
setPageSize(size: number): void;
|
|
499
|
+
getPageCount(): number;
|
|
500
|
+
getTotalRowCount(): number;
|
|
501
|
+
}
|
|
502
|
+
interface GridSortingApi {
|
|
503
|
+
getModel(): SortModel;
|
|
504
|
+
setModel(model: SortModel | null): void;
|
|
505
|
+
}
|
|
506
|
+
interface GridHierarchyApi<TData = any> {
|
|
507
|
+
isRowExpanded(rowId: string): boolean;
|
|
508
|
+
setRowExpanded(rowId: string, expanded: boolean): boolean;
|
|
509
|
+
isTreeRowLoading(rowId: string): boolean;
|
|
510
|
+
loadTreeChildren(rowId: string, options?: {
|
|
511
|
+
force?: boolean;
|
|
512
|
+
}): Promise<readonly TData[]>;
|
|
513
|
+
isGroupExpanded(groupId: string): boolean;
|
|
514
|
+
setGroupExpanded(groupId: string, expanded: boolean): boolean;
|
|
515
|
+
setAllGroupsExpanded(expanded: boolean): void;
|
|
516
|
+
setAllDetailsExpanded(expanded: boolean): void;
|
|
517
|
+
}
|
|
518
|
+
interface GridViewApi<TData = any> {
|
|
519
|
+
getRoot(): HTMLElement | null;
|
|
520
|
+
scrollToRow(index: number, position?: "top" | "bottom" | "middle" | "nearest"): void;
|
|
521
|
+
refreshCells(params?: RefreshCellsParams): void;
|
|
522
|
+
refreshLayout(): void;
|
|
523
|
+
flush(): void;
|
|
524
|
+
setOverlay(type: "loading" | "noRows" | "error" | null): void;
|
|
525
|
+
getPinnedRows(position: "top" | "bottom"): TData[];
|
|
526
|
+
setPinnedRows(position: "top" | "bottom", rows: TData[] | null): void;
|
|
527
|
+
}
|
|
528
|
+
interface GridIoApi {
|
|
529
|
+
exportCsv(params?: CsvExportParams): string;
|
|
530
|
+
importCsv(text: string, options?: ImportCsvOptions): boolean;
|
|
531
|
+
print(options?: PrintOptions): boolean;
|
|
532
|
+
copyRange(): Promise<boolean>;
|
|
533
|
+
}
|
|
534
|
+
interface SaveChangeIssue {
|
|
535
|
+
rowId: string;
|
|
536
|
+
code?: string;
|
|
537
|
+
message: string;
|
|
538
|
+
colIds?: readonly string[];
|
|
539
|
+
retryable?: boolean;
|
|
540
|
+
}
|
|
541
|
+
interface SaveChangeConflict<TData = any> extends SaveChangeIssue {
|
|
542
|
+
serverData?: TData;
|
|
543
|
+
serverVersion?: string | number;
|
|
544
|
+
}
|
|
545
|
+
interface SaveChangesResult<TData = any> {
|
|
546
|
+
/** Omit to acknowledge every submitted row; return a subset for partial batch success. */
|
|
547
|
+
savedRowIds?: readonly string[];
|
|
548
|
+
failures?: readonly SaveChangeIssue[];
|
|
549
|
+
conflicts?: readonly SaveChangeConflict<TData>[];
|
|
550
|
+
}
|
|
551
|
+
interface GridBatchSaveResult<TData = any> {
|
|
552
|
+
submitted: GridChange<TData>[];
|
|
553
|
+
saved: GridChange<TData>[];
|
|
554
|
+
failures: SaveChangeIssue[];
|
|
555
|
+
conflicts: SaveChangeConflict<TData>[];
|
|
556
|
+
}
|
|
557
|
+
type SaveChangesHandler<TData = any> = (changes: readonly GridChange<TData>[]) => void | SaveChangesResult<TData> | Promise<void | SaveChangesResult<TData>>;
|
|
558
|
+
interface GridApi<TData = any> {
|
|
559
|
+
readonly rows: GridRowsApi<TData>;
|
|
560
|
+
readonly columns: GridColumnsApi<TData>;
|
|
561
|
+
readonly selection: GridSelectionApi<TData>;
|
|
562
|
+
readonly editing: GridEditingApi<TData>;
|
|
563
|
+
readonly filtering: GridFilteringApi;
|
|
564
|
+
readonly sorting: GridSortingApi;
|
|
565
|
+
readonly pagination: GridPaginationApi;
|
|
566
|
+
readonly hierarchy: GridHierarchyApi<TData>;
|
|
567
|
+
readonly view: GridViewApi<TData>;
|
|
568
|
+
readonly state: GridStateApi;
|
|
569
|
+
readonly io: GridIoApi;
|
|
570
|
+
readonly diagnostics: GridDiagnosticsApi;
|
|
571
|
+
/** Coalesces model/layout/render work from nested synchronous API calls. */
|
|
572
|
+
batch<TResult>(callback: (api: GridApi<TData>) => TResult): TResult;
|
|
573
|
+
/** Resolves after the first layout frame and gridReady emission. */
|
|
574
|
+
whenReady(): Promise<GridApi<TData>>;
|
|
575
|
+
/** Reads the currently resolved value after application, preset and table overrides. */
|
|
576
|
+
getOption<K extends keyof GridOptions<TData>>(key: K): GridOptions<TData>[K];
|
|
577
|
+
updateOptions(options: Partial<GridOptions<TData>>): void;
|
|
578
|
+
on<K extends GridEventType>(eventType: K, listener: (event: GridEventMap<TData>[K]) => void): () => void;
|
|
579
|
+
destroy(): void;
|
|
580
|
+
isDestroyed(): boolean;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
interface ValueGetterParams<TData = any, TValue = any> {
|
|
584
|
+
data: TData | null;
|
|
585
|
+
node: RowNode<TData>;
|
|
586
|
+
colDef: ColDef<TData, TValue>;
|
|
587
|
+
column: Column<TData>;
|
|
588
|
+
api: GridApi<TData>;
|
|
589
|
+
}
|
|
590
|
+
interface ValueFormatterParams<TData = any, TValue = any> extends ValueGetterParams<TData, TValue> {
|
|
591
|
+
value: TValue;
|
|
592
|
+
}
|
|
593
|
+
interface CellRendererParams<TData = any, TValue = any> extends ValueGetterParams<TData, TValue> {
|
|
594
|
+
value: TValue;
|
|
595
|
+
formatted: string;
|
|
596
|
+
rowIndex: number;
|
|
597
|
+
rendererParams?: Record<string, any>;
|
|
598
|
+
}
|
|
599
|
+
interface CellClassParams<TData = any, TValue = any> extends ValueGetterParams<TData, TValue> {
|
|
600
|
+
value: TValue;
|
|
601
|
+
rowIndex: number;
|
|
602
|
+
}
|
|
603
|
+
interface EditableParams<TData = any, TValue = any> extends ValueGetterParams<TData, TValue> {
|
|
604
|
+
value: TValue;
|
|
605
|
+
rowIndex: number;
|
|
606
|
+
}
|
|
607
|
+
interface CellEditorParams<TData = any, TValue = any> extends ValueGetterParams<TData, TValue> {
|
|
608
|
+
value: TValue;
|
|
609
|
+
rowIndex: number;
|
|
610
|
+
keyPress?: string | null;
|
|
611
|
+
}
|
|
612
|
+
interface ValueSetterParams<TData = any, TValue = any> {
|
|
613
|
+
oldValue: TValue;
|
|
614
|
+
newValue: TValue;
|
|
502
615
|
data: TData;
|
|
503
616
|
node: RowNode<TData>;
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
changes: readonly RowEditChange[];
|
|
617
|
+
colDef: ColDef<TData, TValue>;
|
|
618
|
+
column: Column<TData>;
|
|
507
619
|
api: GridApi<TData>;
|
|
508
620
|
}
|
|
509
|
-
|
|
510
|
-
|
|
621
|
+
interface GetRowIdParams<TData = any> {
|
|
622
|
+
data: TData;
|
|
623
|
+
index: number;
|
|
624
|
+
api: GridApi<TData>;
|
|
625
|
+
}
|
|
626
|
+
interface GetRowHeightParams<TData = any> {
|
|
511
627
|
data: TData | null;
|
|
512
628
|
node: RowNode<TData>;
|
|
513
629
|
api: GridApi<TData>;
|
|
514
630
|
}
|
|
515
|
-
interface
|
|
516
|
-
data: TData;
|
|
631
|
+
interface TooltipParams<TData = any> {
|
|
632
|
+
data: TData | null;
|
|
517
633
|
node: RowNode<TData>;
|
|
518
634
|
api: GridApi<TData>;
|
|
519
|
-
|
|
635
|
+
colId: string;
|
|
636
|
+
value: any;
|
|
637
|
+
formatted: string;
|
|
638
|
+
rowIndex: number;
|
|
520
639
|
}
|
|
521
|
-
interface
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
pageSize?: number;
|
|
529
|
-
pageSizeOptions?: number[];
|
|
530
|
-
showTotal?: boolean;
|
|
531
|
-
showPageSizeSelector?: boolean;
|
|
640
|
+
interface ContextMenuParams<TData = any> {
|
|
641
|
+
data: TData | null;
|
|
642
|
+
node: RowNode<TData>;
|
|
643
|
+
api: GridApi<TData>;
|
|
644
|
+
colId: string;
|
|
645
|
+
value: any;
|
|
646
|
+
rowIndex: number;
|
|
532
647
|
}
|
|
533
|
-
interface
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
angle?: number;
|
|
648
|
+
interface ContextMenuItem {
|
|
649
|
+
label?: string;
|
|
650
|
+
action?: () => void;
|
|
651
|
+
danger?: boolean;
|
|
652
|
+
disabled?: boolean;
|
|
653
|
+
separator?: boolean;
|
|
540
654
|
}
|
|
541
|
-
interface
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
message?: string;
|
|
546
|
-
params: CellRendererParams<TData>;
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Application-wide UI action policy. This centralises permission, confirmation
|
|
550
|
-
* and error handling while the backend remains the final security boundary.
|
|
551
|
-
*/
|
|
552
|
-
interface ActionPolicy<TData = any> {
|
|
553
|
-
canAccess?(context: ActionPolicyContext<TData>): boolean;
|
|
554
|
-
confirm?(context: ActionPolicyContext<TData>): boolean | Promise<boolean>;
|
|
555
|
-
onError?(error: unknown, context: ActionPolicyContext<TData>): void;
|
|
655
|
+
interface HeaderComponentParams<TData = any> {
|
|
656
|
+
colDef: ColDef<TData>;
|
|
657
|
+
column: Column<TData>;
|
|
658
|
+
api: GridApi<TData>;
|
|
556
659
|
}
|
|
557
|
-
interface
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
columnTypes?: Readonly<Record<string, Partial<ColDef<TData>>>>;
|
|
563
|
-
getRowId?: (params: GetRowIdParams<TData>) => string;
|
|
564
|
-
/** Stable business key shorthand. `getRowId` takes precedence when both are set. */
|
|
565
|
-
rowKey?: FieldPath<TData> | ((row: TData) => string | number);
|
|
566
|
-
rowHeight?: number;
|
|
567
|
-
headerHeight?: number;
|
|
568
|
-
rowBuffer?: number;
|
|
569
|
-
/** `fit` continuously fills the container without grid-ready glue code. */
|
|
570
|
-
columnLayout?: ColumnLayoutMode;
|
|
571
|
-
/** Enables pointer, double-click and Alt+Arrow column resizing. Disabled by default. */
|
|
572
|
-
enableColumnResize?: boolean;
|
|
573
|
-
/** Lets small grids grow with their rows. Avoid for large or infinite datasets. */
|
|
574
|
-
domLayout?: DomLayoutMode;
|
|
575
|
-
rowSelection?: RowSelectionMode;
|
|
576
|
-
multiSort?: boolean;
|
|
577
|
-
size?: GridSize;
|
|
578
|
-
stripedRows?: boolean;
|
|
579
|
-
showCellBorders?: boolean;
|
|
580
|
-
theme?: ThemeMode;
|
|
581
|
-
quickFilterText?: string | null;
|
|
582
|
-
/** Nested AND/OR filter expression, safe for local evaluation and backend serialization. */
|
|
583
|
-
advancedFilterModel?: AdvancedFilterModel | null;
|
|
584
|
-
masterDetail?: boolean;
|
|
585
|
-
detailRowHeight?: number;
|
|
586
|
-
detailRowRenderer?: (params: DetailRowRendererParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
587
|
-
isRowExpandable?: (params: DetailRowRendererParams<TData>) => boolean;
|
|
588
|
-
detailToggleColumn?: boolean;
|
|
589
|
-
columnMenu?: boolean;
|
|
590
|
-
columnStateKey?: string | null;
|
|
591
|
-
columnStateStore?: ColumnStateStore;
|
|
592
|
-
aggFuncs?: Record<string, (values: any[]) => any>;
|
|
593
|
-
components?: GridComponents;
|
|
594
|
-
/** Shared policy consumed by action column helpers. */
|
|
595
|
-
actionPolicy?: ActionPolicy<TData>;
|
|
596
|
-
features?: readonly GridFeature<TData>[];
|
|
597
|
-
/** State restored atomically after columns and initial rows are available. */
|
|
598
|
-
initialState?: GridStateInput;
|
|
599
|
-
/** Persist the complete user-visible GridState with a versioned store. */
|
|
600
|
-
stateKey?: string | null;
|
|
601
|
-
stateStore?: GridStateStore;
|
|
602
|
-
stateSaveDebounceMs?: number;
|
|
603
|
-
locale?: RgLocale;
|
|
604
|
-
/** Cell editing is isolated; fullRow stages every editable cell and commits them together. */
|
|
605
|
-
editType?: GridEditType;
|
|
606
|
-
/** Visibility of the subtle pencil affordance on editable cells. */
|
|
607
|
-
editableIndicator?: EditableIndicator;
|
|
608
|
-
/** Cross-field full-row validation. Return a message or a colId -> message map. */
|
|
609
|
-
rowEditValidator?: (params: RowEditValidationParams<TData>) => RowEditValidationResult | Promise<RowEditValidationResult>;
|
|
610
|
-
singleClickEdit?: boolean;
|
|
611
|
-
manualSorting?: boolean;
|
|
612
|
-
manualFiltering?: boolean;
|
|
613
|
-
showSummary?: boolean;
|
|
614
|
-
summaryMethod?: (params: {
|
|
615
|
-
colId: string;
|
|
616
|
-
column: Column<any>;
|
|
617
|
-
values: any[];
|
|
618
|
-
}) => string;
|
|
619
|
-
treeData?: boolean;
|
|
620
|
-
childrenKey?: string;
|
|
621
|
-
/** Marks rows that can load children even when `childrenKey` is currently empty. */
|
|
622
|
-
isTreeRowExpandable?: (params: Omit<TreeDataLoadParams<TData>, "signal">) => boolean;
|
|
623
|
-
/** Loads children once on first expansion; use the API retry/force methods to reload. */
|
|
624
|
-
loadTreeChildren?: (params: TreeDataLoadParams<TData>) => Promise<readonly TData[]>;
|
|
625
|
-
autoCheckedChildren?: boolean;
|
|
626
|
-
defaultExpandAll?: boolean;
|
|
627
|
-
indexOffset?: number;
|
|
628
|
-
applyRowDrag?: boolean;
|
|
629
|
-
undoStackSize?: number;
|
|
630
|
-
/** Milliseconds used to coalesce applyTransactionAsync calls. */
|
|
631
|
-
asyncTransactionWaitMillis?: number;
|
|
632
|
-
getRowHeight?: (params: GetRowHeightParams<TData>) => number;
|
|
633
|
-
pinnedTopRowData?: TData[] | null;
|
|
634
|
-
pinnedBottomRowData?: TData[] | null;
|
|
635
|
-
pagination?: boolean | PaginationConfig;
|
|
636
|
-
watermark?: boolean | WatermarkConfig;
|
|
637
|
-
suppressWarnings?: boolean;
|
|
638
|
-
enableRangeSelection?: boolean;
|
|
639
|
-
suppressClipboard?: boolean;
|
|
640
|
-
contextMenu?: boolean;
|
|
641
|
-
getContextMenuItems?: (params: ContextMenuParams<TData>) => ContextMenuItem[] | null;
|
|
642
|
-
tooltipComponent?: (params: TooltipParams<TData>) => string | HTMLElement;
|
|
643
|
-
tooltipShowDelay?: number;
|
|
644
|
-
flashCells?: boolean;
|
|
645
|
-
fillHandle?: boolean;
|
|
646
|
-
statusBar?: boolean | StatusBarConfig;
|
|
647
|
-
datasource?: GridDatasource<TData>;
|
|
648
|
-
/** Sequential append is the compatibility default; block enables random-access cached loading. */
|
|
649
|
-
datasourceMode?: DatasourceMode;
|
|
650
|
-
blockSize?: number;
|
|
651
|
-
infiniteBufferRows?: number;
|
|
652
|
-
/** Maximum retained blocks in random-access mode. */
|
|
653
|
-
maxBlocksInCache?: number;
|
|
654
|
-
/** Number of adjacent blocks prefetched around a requested viewport. */
|
|
655
|
-
blockPrefetch?: number;
|
|
656
|
-
/** Optional initial total enables immediate scrollbar range before the first response. */
|
|
657
|
-
datasourceRowCount?: number;
|
|
658
|
-
/** Opt-in async processor for large local filter/sort pipelines. */
|
|
659
|
-
dataProcessor?: GridDataProcessor<TData>;
|
|
660
|
-
/** Minimum local row count before dataProcessor is used. Defaults to 5,000. */
|
|
661
|
-
dataProcessorMinRows?: number;
|
|
662
|
-
/** Number of automatic retries after an infinite datasource request fails. */
|
|
663
|
-
datasourceRetryCount?: number;
|
|
664
|
-
/** Base retry delay in milliseconds. Retries use capped exponential backoff. */
|
|
665
|
-
datasourceRetryDelay?: number;
|
|
666
|
-
suppressCellFocus?: boolean;
|
|
667
|
-
suppressRowHoverHighlight?: boolean;
|
|
668
|
-
suppressNoRowsOverlay?: boolean;
|
|
669
|
-
suppressHeaderFocus?: boolean;
|
|
670
|
-
/** Accessible name applied to the element with role="grid"/"treegrid". */
|
|
671
|
-
ariaLabel?: string;
|
|
672
|
-
/** ID of an external element that labels the grid. Takes precedence over ariaLabel. */
|
|
673
|
-
ariaLabelledBy?: string;
|
|
674
|
-
/** ID of an external element that provides additional grid instructions. */
|
|
675
|
-
ariaDescribedBy?: string;
|
|
676
|
-
loading?: boolean;
|
|
677
|
-
/** Non-null errors take precedence over the empty state and remain retryable by the host. */
|
|
678
|
-
error?: unknown | null;
|
|
679
|
-
overlayNoRowsTemplate?: OverlayTemplate;
|
|
680
|
-
overlayLoadingTemplate?: OverlayTemplate;
|
|
681
|
-
overlayErrorTemplate?: OverlayTemplate;
|
|
682
|
-
/** Opt in only for trusted overlay strings. Prefer HTMLElement factories. */
|
|
683
|
-
allowUnsafeOverlayHtml?: boolean;
|
|
684
|
-
className?: string;
|
|
660
|
+
interface ICellRendererResult {
|
|
661
|
+
el: HTMLElement;
|
|
662
|
+
/** Reuses the mounted renderer for an update. Return false to request recreation. */
|
|
663
|
+
refresh?(params: CellRendererParams): boolean | void;
|
|
664
|
+
destroy?: () => void;
|
|
685
665
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
headerHeight: number;
|
|
695
|
-
rowBuffer: number;
|
|
696
|
-
columnLayout: ColumnLayoutMode;
|
|
697
|
-
enableColumnResize: boolean;
|
|
698
|
-
domLayout: DomLayoutMode;
|
|
699
|
-
rowSelection: RowSelectionMode;
|
|
700
|
-
multiSort: boolean;
|
|
701
|
-
size: GridSize;
|
|
702
|
-
stripedRows: boolean;
|
|
703
|
-
showCellBorders: boolean;
|
|
704
|
-
theme: ThemeMode;
|
|
705
|
-
quickFilterText: string | null;
|
|
706
|
-
advancedFilterModel: AdvancedFilterModel | null;
|
|
707
|
-
masterDetail: boolean;
|
|
708
|
-
detailRowHeight: number;
|
|
709
|
-
detailRowRenderer?: (params: DetailRowRendererParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
710
|
-
isRowExpandable?: (params: DetailRowRendererParams<TData>) => boolean;
|
|
711
|
-
detailToggleColumn: boolean;
|
|
712
|
-
columnMenu: boolean;
|
|
713
|
-
columnStateKey: string | null;
|
|
714
|
-
columnStateStore?: ColumnStateStore;
|
|
715
|
-
aggFuncs?: Record<string, (values: any[]) => any>;
|
|
716
|
-
components?: GridComponents;
|
|
717
|
-
actionPolicy?: ActionPolicy<TData>;
|
|
718
|
-
features: readonly GridFeature<TData>[];
|
|
719
|
-
initialState?: GridStateInput;
|
|
720
|
-
stateKey: string | null;
|
|
721
|
-
stateStore?: GridStateStore;
|
|
722
|
-
stateSaveDebounceMs: number;
|
|
723
|
-
locale: RgLocale;
|
|
724
|
-
editType: GridEditType;
|
|
725
|
-
editableIndicator: EditableIndicator;
|
|
726
|
-
rowEditValidator?: (params: RowEditValidationParams<TData>) => RowEditValidationResult | Promise<RowEditValidationResult>;
|
|
727
|
-
singleClickEdit: boolean;
|
|
728
|
-
manualSorting: boolean;
|
|
729
|
-
manualFiltering: boolean;
|
|
730
|
-
showSummary: boolean;
|
|
731
|
-
summaryMethod?: (params: {
|
|
732
|
-
colId: string;
|
|
733
|
-
column: Column<any>;
|
|
734
|
-
values: any[];
|
|
735
|
-
}) => string;
|
|
736
|
-
treeData: boolean;
|
|
737
|
-
childrenKey: string;
|
|
738
|
-
isTreeRowExpandable?: (params: Omit<TreeDataLoadParams<TData>, "signal">) => boolean;
|
|
739
|
-
loadTreeChildren?: (params: TreeDataLoadParams<TData>) => Promise<readonly TData[]>;
|
|
740
|
-
autoCheckedChildren: boolean;
|
|
741
|
-
defaultExpandAll: boolean;
|
|
742
|
-
indexOffset: number;
|
|
743
|
-
applyRowDrag: boolean;
|
|
744
|
-
undoStackSize: number;
|
|
745
|
-
asyncTransactionWaitMillis: number;
|
|
746
|
-
getRowHeight?: (params: GetRowHeightParams<TData>) => number;
|
|
747
|
-
pinnedTopRowData: TData[];
|
|
748
|
-
pinnedBottomRowData: TData[];
|
|
749
|
-
paginationEnabled: boolean;
|
|
750
|
-
paginationMode: "client" | "server";
|
|
751
|
-
paginationPage: number;
|
|
752
|
-
paginationTotal: number;
|
|
753
|
-
paginationPageSize: number;
|
|
754
|
-
paginationPageSizeOptions: number[];
|
|
755
|
-
paginationShowTotal: boolean;
|
|
756
|
-
paginationShowSizeSelector: boolean;
|
|
757
|
-
watermarkEnabled: boolean;
|
|
758
|
-
watermarkConfig: WatermarkConfig | null;
|
|
759
|
-
suppressWarnings: boolean;
|
|
760
|
-
enableRangeSelection: boolean;
|
|
761
|
-
suppressClipboard: boolean;
|
|
762
|
-
contextMenu: boolean;
|
|
763
|
-
getContextMenuItems?: (params: ContextMenuParams<TData>) => ContextMenuItem[] | null;
|
|
764
|
-
tooltipComponent?: (params: TooltipParams<TData>) => string | HTMLElement;
|
|
765
|
-
tooltipShowDelay: number;
|
|
766
|
-
flashCells: boolean;
|
|
767
|
-
fillHandle: boolean;
|
|
768
|
-
statusBarEnabled: boolean;
|
|
769
|
-
statusBarPanels: StatusBarPanel[];
|
|
770
|
-
datasource?: GridDatasource<TData>;
|
|
771
|
-
datasourceMode: DatasourceMode;
|
|
772
|
-
blockSize: number;
|
|
773
|
-
infiniteBufferRows: number;
|
|
774
|
-
maxBlocksInCache: number;
|
|
775
|
-
blockPrefetch: number;
|
|
776
|
-
datasourceRowCount: number | null;
|
|
777
|
-
dataProcessor?: GridDataProcessor<TData>;
|
|
778
|
-
dataProcessorMinRows: number;
|
|
779
|
-
datasourceRetryCount: number;
|
|
780
|
-
datasourceRetryDelay: number;
|
|
781
|
-
suppressCellFocus: boolean;
|
|
782
|
-
suppressRowHoverHighlight: boolean;
|
|
783
|
-
suppressNoRowsOverlay: boolean;
|
|
784
|
-
suppressHeaderFocus: boolean;
|
|
785
|
-
ariaLabel: string;
|
|
786
|
-
ariaLabelledBy: string;
|
|
787
|
-
ariaDescribedBy: string;
|
|
788
|
-
loading: boolean;
|
|
789
|
-
error: unknown | null;
|
|
790
|
-
overlayNoRowsTemplate: OverlayTemplate;
|
|
791
|
-
overlayLoadingTemplate: OverlayTemplate;
|
|
792
|
-
overlayErrorTemplate: OverlayTemplate;
|
|
793
|
-
allowUnsafeOverlayHtml: boolean;
|
|
794
|
-
className: string;
|
|
666
|
+
type CellRendererOutput = string | HTMLElement | ICellRendererResult | null | undefined;
|
|
667
|
+
interface ICellEditor<TValue = any> {
|
|
668
|
+
el: HTMLElement;
|
|
669
|
+
getValue(): TValue | null | undefined;
|
|
670
|
+
focus?(): void;
|
|
671
|
+
destroy?(): void;
|
|
672
|
+
isCancelBeforeStart?(): boolean;
|
|
673
|
+
isCancelAfterEnd?(value: TValue | null | undefined): boolean;
|
|
795
674
|
}
|
|
796
675
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
separator?: string;
|
|
808
|
-
mode?: "replace" | "append" | "paste";
|
|
809
|
-
headerRowIndex?: number;
|
|
810
|
-
coerceNumbers?: boolean;
|
|
811
|
-
parseValue?: (params: {
|
|
812
|
-
value: string;
|
|
813
|
-
field: string;
|
|
814
|
-
rowIndex: number;
|
|
815
|
-
columnIndex: number;
|
|
816
|
-
}) => any;
|
|
817
|
-
}
|
|
818
|
-
interface PrintOptions {
|
|
819
|
-
title?: string;
|
|
820
|
-
includeHeader?: boolean;
|
|
821
|
-
}
|
|
822
|
-
interface RowTransaction<TData = any> {
|
|
823
|
-
add?: TData[];
|
|
824
|
-
addIndex?: number;
|
|
825
|
-
remove?: TData[];
|
|
826
|
-
update?: TData[];
|
|
827
|
-
}
|
|
828
|
-
interface GridCellChange {
|
|
829
|
-
colId: string;
|
|
830
|
-
originalValue: unknown;
|
|
831
|
-
value: unknown;
|
|
832
|
-
}
|
|
833
|
-
interface GridChange<TData = any> {
|
|
834
|
-
rowId: string;
|
|
835
|
-
data: TData;
|
|
836
|
-
cells: GridCellChange[];
|
|
837
|
-
}
|
|
838
|
-
interface GridDiagnosticError {
|
|
839
|
-
code: GridErrorCode;
|
|
840
|
-
source: string;
|
|
841
|
-
message: string;
|
|
842
|
-
timestamp: number;
|
|
843
|
-
context?: Record<string, unknown>;
|
|
844
|
-
}
|
|
845
|
-
interface GridPerformanceSnapshot {
|
|
846
|
-
sampleCount: number;
|
|
847
|
-
lastRenderMs: number;
|
|
848
|
-
averageRenderMs: number;
|
|
849
|
-
maxRenderMs: number;
|
|
850
|
-
p95RenderMs: number;
|
|
851
|
-
longRenderCount: number;
|
|
852
|
-
renderedRows: number;
|
|
853
|
-
renderedColumns: number;
|
|
854
|
-
renderedCells: number;
|
|
855
|
-
layoutSampleCount: number;
|
|
856
|
-
p95LayoutMs: number;
|
|
857
|
-
modelSampleCount: number;
|
|
858
|
-
p95ModelMs: number;
|
|
859
|
-
longTaskCount: number;
|
|
860
|
-
longTaskTotalMs: number;
|
|
861
|
-
usedHeapBytes: number | null;
|
|
862
|
-
}
|
|
863
|
-
interface GridUpdateSchedulerSnapshot {
|
|
864
|
-
batchDepth: number;
|
|
865
|
-
flushCount: number;
|
|
866
|
-
requestCount: number;
|
|
867
|
-
coalescedRequestCount: number;
|
|
868
|
-
pending: boolean;
|
|
869
|
-
}
|
|
870
|
-
interface RemoteBlockCacheSnapshot {
|
|
871
|
-
cachedBlockCount: number;
|
|
872
|
-
loadingBlockCount: number;
|
|
873
|
-
cachedRowCount: number;
|
|
874
|
-
hitCount: number;
|
|
875
|
-
missCount: number;
|
|
876
|
-
evictionCount: number;
|
|
877
|
-
}
|
|
878
|
-
interface GridAsyncOptions {
|
|
879
|
-
signal?: AbortSignal;
|
|
880
|
-
}
|
|
881
|
-
interface RefreshCellsParams {
|
|
882
|
-
/** Stable row identifiers. Omit together with rowIndexes to target every rendered row. */
|
|
883
|
-
rowIds?: readonly string[];
|
|
884
|
-
/** Displayed row indexes. Omit together with rowIds to target every rendered row. */
|
|
885
|
-
rowIndexes?: readonly number[];
|
|
886
|
-
/** Column IDs. Omit to target every rendered column in matching rows. */
|
|
887
|
-
columns?: readonly string[];
|
|
888
|
-
/** Bypasses renderer refresh hooks and recreates matching cell content. */
|
|
889
|
-
force?: boolean;
|
|
890
|
-
/** Also refreshes pinned rows. Defaults to true only for an unscoped refresh. */
|
|
891
|
-
includePinned?: boolean;
|
|
892
|
-
}
|
|
893
|
-
interface ColumnWorkbenchItem {
|
|
894
|
-
colId: string;
|
|
895
|
-
label: string;
|
|
896
|
-
visible: boolean;
|
|
897
|
-
pinned: "left" | "right" | null;
|
|
898
|
-
width: number;
|
|
899
|
-
movable: boolean;
|
|
900
|
-
hideable: boolean;
|
|
901
|
-
}
|
|
902
|
-
interface GridDiagnostics {
|
|
903
|
-
gridId: number;
|
|
904
|
-
version: string;
|
|
905
|
-
destroyed: boolean;
|
|
906
|
-
infinite: boolean;
|
|
907
|
-
loading: boolean;
|
|
908
|
-
rowCount: number;
|
|
909
|
-
renderedRowCount: number;
|
|
910
|
-
columnCount: number;
|
|
911
|
-
selectedRowCount: number;
|
|
912
|
-
dirtyRowCount: number;
|
|
913
|
-
activeFeatures: ReadonlyArray<{
|
|
914
|
-
key: string;
|
|
915
|
-
version?: string;
|
|
916
|
-
}>;
|
|
917
|
-
performance: GridPerformanceSnapshot;
|
|
918
|
-
updates: GridUpdateSchedulerSnapshot;
|
|
919
|
-
recentErrors: readonly GridDiagnosticError[];
|
|
920
|
-
}
|
|
921
|
-
interface GridRowsApi<TData = any> {
|
|
922
|
-
setData(rows: TData[] | null | undefined): void;
|
|
923
|
-
apply(transaction: RowTransaction<TData>): void;
|
|
924
|
-
applyAsync(transaction: RowTransaction<TData>, options?: GridAsyncOptions): Promise<void>;
|
|
925
|
-
getDisplayedCount(): number;
|
|
926
|
-
getById(id: string): RowNode<TData> | undefined;
|
|
927
|
-
scrollTo(index: number, position?: "top" | "bottom" | "middle" | "nearest"): void;
|
|
928
|
-
ensureLoaded(startRow: number, endRow: number, options?: GridAsyncOptions): Promise<void>;
|
|
929
|
-
purgeCache(): void;
|
|
930
|
-
getCacheSnapshot(): RemoteBlockCacheSnapshot;
|
|
931
|
-
}
|
|
932
|
-
interface GridColumnsApi {
|
|
933
|
-
getState(): ColumnState[];
|
|
934
|
-
setState(state: ColumnState[]): void;
|
|
935
|
-
resetState(): void;
|
|
936
|
-
setVisible(colId: string, visible: boolean): void;
|
|
937
|
-
setWidth(colId: string, width: number): boolean;
|
|
938
|
-
}
|
|
939
|
-
interface GridSelectionApi<TData = any> {
|
|
940
|
-
getRows(): TData[];
|
|
941
|
-
getIds(): string[];
|
|
942
|
-
selectAll(filteredOnly?: boolean): void;
|
|
943
|
-
clear(): void;
|
|
944
|
-
}
|
|
945
|
-
interface GridEditingApi<TData = any> {
|
|
946
|
-
getChanges(): GridChange<TData>[];
|
|
947
|
-
rollback(rowIds?: readonly string[]): boolean;
|
|
948
|
-
save(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridBatchSaveResult<TData>>;
|
|
949
|
-
stop(cancel?: boolean): Promise<boolean>;
|
|
950
|
-
}
|
|
951
|
-
interface GridStateApi {
|
|
952
|
-
get(): GridState;
|
|
953
|
-
apply(state: GridStateInput, options?: ApplyGridStateOptions): void;
|
|
954
|
-
}
|
|
955
|
-
interface GridDiagnosticsApi {
|
|
956
|
-
get(): GridDiagnostics;
|
|
957
|
-
getPerformance(): GridPerformanceSnapshot;
|
|
958
|
-
resetPerformance(): void;
|
|
959
|
-
}
|
|
960
|
-
interface SaveChangeIssue {
|
|
961
|
-
rowId: string;
|
|
962
|
-
code?: string;
|
|
963
|
-
message: string;
|
|
964
|
-
colIds?: readonly string[];
|
|
965
|
-
retryable?: boolean;
|
|
966
|
-
}
|
|
967
|
-
interface SaveChangeConflict<TData = any> extends SaveChangeIssue {
|
|
968
|
-
serverData?: TData;
|
|
969
|
-
serverVersion?: string | number;
|
|
970
|
-
}
|
|
971
|
-
interface SaveChangesResult<TData = any> {
|
|
972
|
-
/** Omit to acknowledge every submitted row; return a subset for partial batch success. */
|
|
973
|
-
savedRowIds?: readonly string[];
|
|
974
|
-
failures?: readonly SaveChangeIssue[];
|
|
975
|
-
conflicts?: readonly SaveChangeConflict<TData>[];
|
|
976
|
-
}
|
|
977
|
-
interface GridBatchSaveResult<TData = any> {
|
|
978
|
-
submitted: GridChange<TData>[];
|
|
979
|
-
saved: GridChange<TData>[];
|
|
980
|
-
failures: SaveChangeIssue[];
|
|
981
|
-
conflicts: SaveChangeConflict<TData>[];
|
|
676
|
+
type SortDirection = "asc" | "desc";
|
|
677
|
+
type PinnedDirection = "left" | "right";
|
|
678
|
+
type FilterType = "text" | "number" | "date" | "set";
|
|
679
|
+
type CellAlign = "left" | "center" | "right";
|
|
680
|
+
type TextFilterMatch = "contains" | "notContains" | "equals" | "notEquals" | "startsWith" | "endsWith" | "blank" | "notBlank";
|
|
681
|
+
type NumberFilterMatch = "equals" | "notEquals" | "lessThan" | "lessThanOrEqual" | "greaterThan" | "greaterThanOrEqual" | "inRange" | "blank" | "notBlank";
|
|
682
|
+
type DateFilterMatch = "equals" | "notEquals" | "lessThan" | "greaterThan" | "inRange" | "blank" | "notBlank";
|
|
683
|
+
interface TextFilterCondition {
|
|
684
|
+
match: TextFilterMatch;
|
|
685
|
+
value?: string;
|
|
982
686
|
}
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
readonly columns: GridColumnsApi;
|
|
988
|
-
readonly selection: GridSelectionApi<TData>;
|
|
989
|
-
readonly editing: GridEditingApi<TData>;
|
|
990
|
-
readonly state: GridStateApi;
|
|
991
|
-
readonly diagnostics: GridDiagnosticsApi;
|
|
992
|
-
/** Coalesces model/layout/render work from nested synchronous API calls. */
|
|
993
|
-
batch<TResult>(callback: (api: GridApi<TData>) => TResult): TResult;
|
|
994
|
-
/** Flushes deferred work; normally only needed by tests and imperative measurements. */
|
|
995
|
-
flushUpdates(): void;
|
|
996
|
-
/** Resolves after the first layout frame and gridReady emission. */
|
|
997
|
-
whenReady(): Promise<GridApi<TData>>;
|
|
998
|
-
/** Stable grid root for portals, measurements and fullscreen targets; null after destroy. */
|
|
999
|
-
getRootElement(): HTMLElement | null;
|
|
1000
|
-
/** Reads the currently resolved value after application, preset and table overrides. */
|
|
1001
|
-
getGridOption<K extends keyof GridOptions<TData>>(key: K): GridOptions<TData>[K];
|
|
1002
|
-
/** Typed shorthand for updating one runtime option. */
|
|
1003
|
-
setGridOption<K extends keyof GridOptions<TData>>(key: K, value: GridOptions<TData>[K]): void;
|
|
1004
|
-
setRowData(rows: TData[] | null | undefined): void;
|
|
1005
|
-
applyTransaction(transaction: RowTransaction<TData>): void;
|
|
1006
|
-
/** Coalesces rapid transactions and refreshes the row pipeline once per batch. */
|
|
1007
|
-
applyTransactionAsync(transaction: RowTransaction<TData>, options?: GridAsyncOptions): Promise<void>;
|
|
1008
|
-
/** Immediately applies transactions currently waiting in the async queue. */
|
|
1009
|
-
flushAsyncTransactions(): void;
|
|
1010
|
-
getColumnDefs(): (ColDef<TData> | ColDefGroup<TData>)[] | null;
|
|
1011
|
-
setColumnDefs(colDefs: (ColDef<TData> | ColDefGroup<TData>)[] | null | undefined): void;
|
|
1012
|
-
getColumnState(): ColumnState[];
|
|
1013
|
-
setColumnState(state: ColumnState[]): void;
|
|
1014
|
-
resetColumnState(): void;
|
|
1015
|
-
setColumnVisibility(colId: string, visible: boolean): void;
|
|
1016
|
-
moveColumn(colId: string, toIndex: number): void;
|
|
1017
|
-
setColumnPinned(colId: string, pinned: "left" | "right" | null): void;
|
|
1018
|
-
/** Sets one width without replacing the rest of the column state. */
|
|
1019
|
-
setColumnWidth(colId: string, width: number): boolean;
|
|
1020
|
-
sizeColumnsToFit(width?: number): void;
|
|
1021
|
-
autoSizeColumn(colId: string, skipHeader?: boolean): void;
|
|
1022
|
-
autoSizeAllColumns(skipHeader?: boolean): void;
|
|
1023
|
-
getSortModel(): SortModel;
|
|
1024
|
-
setSortModel(sortModel: SortModel | null): void;
|
|
1025
|
-
getFilterModel(): FilterModel;
|
|
1026
|
-
setFilterModel(filterModel: FilterModel | null): void;
|
|
1027
|
-
getAdvancedFilterModel(): AdvancedFilterModel | null;
|
|
1028
|
-
setAdvancedFilterModel(model: AdvancedFilterModel | null): void;
|
|
1029
|
-
isColumnFilterPresent(colId: string): boolean;
|
|
1030
|
-
setQuickFilter(text: string | null | undefined): void;
|
|
1031
|
-
getQuickFilter(): string | null;
|
|
1032
|
-
getRowSelection(): RowSelectionMode;
|
|
1033
|
-
setRowSelection(mode: RowSelectionMode): void;
|
|
1034
|
-
getSelectedNodes(): RowNode<TData>[];
|
|
1035
|
-
getSelectedRows(): TData[];
|
|
1036
|
-
selectNodeById(nodeId: string, selected?: boolean, clearOthers?: boolean): void;
|
|
1037
|
-
selectAll(filteredOnly?: boolean): void;
|
|
1038
|
-
deselectAll(): void;
|
|
1039
|
-
getDisplayedRowCount(): number;
|
|
1040
|
-
getRowNode(rowIndex: number): RowNode<TData> | undefined;
|
|
1041
|
-
getNodeById(id: string): RowNode<TData> | undefined;
|
|
1042
|
-
forEachNode(callback: (node: RowNode<TData>, index: number) => void): void;
|
|
1043
|
-
forEachNodeAfterFilterAndSort(callback: (node: RowNode<TData>, index: number) => void): void;
|
|
1044
|
-
scrollToIndex(rowIndex: number, position?: "top" | "bottom" | "middle" | "nearest"): void;
|
|
1045
|
-
expandRow(rowId: string): boolean;
|
|
1046
|
-
collapseRow(rowId: string): boolean;
|
|
1047
|
-
toggleDetailRow(rowId: string): boolean;
|
|
1048
|
-
isRowExpanded(rowId: string): boolean;
|
|
1049
|
-
expandAllDetails(): void;
|
|
1050
|
-
collapseAllDetails(): void;
|
|
1051
|
-
/** Loads and caches lazy tree children. Concurrent calls for one row are deduplicated. */
|
|
1052
|
-
loadTreeChildren(rowId: string, options?: {
|
|
1053
|
-
force?: boolean;
|
|
1054
|
-
}): Promise<readonly TData[]>;
|
|
1055
|
-
retryTreeChildren(rowId: string): Promise<readonly TData[]>;
|
|
1056
|
-
isTreeRowLoading(rowId: string): boolean;
|
|
1057
|
-
toggleRowGroup(groupId: string): boolean;
|
|
1058
|
-
isGroupExpanded(groupId: string): boolean;
|
|
1059
|
-
expandAllGroups(): void;
|
|
1060
|
-
collapseAllGroups(): void;
|
|
1061
|
-
reorderRows(fromIndex: number, toIndex: number): boolean;
|
|
1062
|
-
setSelection(rows: TData[], clearOthers?: boolean): void;
|
|
1063
|
-
getVisibleSelection(): TData[];
|
|
1064
|
-
getSelectedIds(): string[];
|
|
1065
|
-
undo(): boolean;
|
|
1066
|
-
redo(): boolean;
|
|
1067
|
-
canUndo(): boolean;
|
|
1068
|
-
canRedo(): boolean;
|
|
1069
|
-
getDirtyRowIds(): string[];
|
|
1070
|
-
getChanges(): GridChange<TData>[];
|
|
1071
|
-
markChangesSaved(rowIds?: readonly string[]): void;
|
|
1072
|
-
/** Saves a stable snapshot; supports partial success and preserves edits made in flight. */
|
|
1073
|
-
saveChanges(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridChange<TData>[]>;
|
|
1074
|
-
saveChangesDetailed(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridBatchSaveResult<TData>>;
|
|
1075
|
-
rollbackChanges(rowIds?: readonly string[]): boolean;
|
|
1076
|
-
setPinnedTopRowData(rows: TData[] | null): void;
|
|
1077
|
-
getPinnedTopRowData(): TData[];
|
|
1078
|
-
setPinnedBottomRowData(rows: TData[] | null): void;
|
|
1079
|
-
getPinnedBottomRowData(): TData[];
|
|
1080
|
-
getRangeSelection(): GridCellRange | null;
|
|
1081
|
-
clearRangeSelection(): void;
|
|
1082
|
-
copyRangeToClipboard(): Promise<boolean>;
|
|
1083
|
-
/** Opens the built-in searchable column workbench. */
|
|
1084
|
-
openColumnWorkbench(anchor?: HTMLElement): void;
|
|
1085
|
-
closeColumnWorkbench(): void;
|
|
1086
|
-
getColumnWorkbenchItems(): ColumnWorkbenchItem[];
|
|
1087
|
-
/** @deprecated Use openColumnWorkbench. Kept during the 0.x compatibility window. */
|
|
1088
|
-
openColumnPanel(anchor?: HTMLElement): void;
|
|
1089
|
-
refreshLayout(): void;
|
|
1090
|
-
isInfinite(): boolean;
|
|
1091
|
-
reload(options?: GridAsyncOptions): Promise<void>;
|
|
1092
|
-
/** Ensures an inclusive/exclusive remote row range is cached in random-access block mode. */
|
|
1093
|
-
ensureRowsLoaded(startRow: number, endRow: number, options?: GridAsyncOptions): Promise<void>;
|
|
1094
|
-
/** Aborts block requests and removes all random-access datasource blocks. */
|
|
1095
|
-
purgeDatasourceCache(): void;
|
|
1096
|
-
getDatasourceCacheSnapshot(): RemoteBlockCacheSnapshot;
|
|
1097
|
-
paginationEnabled(): boolean;
|
|
1098
|
-
setPaginationEnabled(enabled: boolean): void;
|
|
1099
|
-
getPage(): number;
|
|
1100
|
-
setPage(page: number): void;
|
|
1101
|
-
getPageSize(): number;
|
|
1102
|
-
setPageSize(size: number): void;
|
|
1103
|
-
getPageCount(): number;
|
|
1104
|
-
getTotalRowCount(): number;
|
|
1105
|
-
importCsv(text: string, options?: ImportCsvOptions): boolean;
|
|
1106
|
-
print(options?: PrintOptions): boolean;
|
|
1107
|
-
startEditingCell(params: {
|
|
1108
|
-
rowIndex: number;
|
|
1109
|
-
colId: string;
|
|
1110
|
-
keyPress?: string;
|
|
1111
|
-
}): boolean;
|
|
1112
|
-
/** Starts staged editing for every editable cell in one displayed row. */
|
|
1113
|
-
startEditingRow(rowIndex: number): boolean;
|
|
1114
|
-
/** Returns whether any row, or the requested displayed row, is in full-row edit mode. */
|
|
1115
|
-
isRowEditing(rowIndex?: number): boolean;
|
|
1116
|
-
stopEditing(cancel?: boolean): void;
|
|
1117
|
-
/** Stops editing and resolves after synchronous or asynchronous validation. */
|
|
1118
|
-
stopEditingAsync(cancel?: boolean): Promise<boolean>;
|
|
1119
|
-
/** Explicit full-row counterpart; aliases stopEditingAsync when a row is active. */
|
|
1120
|
-
stopEditingRow(cancel?: boolean): Promise<boolean>;
|
|
1121
|
-
refreshCells(params?: RefreshCellsParams): void;
|
|
1122
|
-
updateOptions(options: Partial<GridOptions<TData>>): void;
|
|
1123
|
-
getDataAsCsv(params?: CsvExportParams): string;
|
|
1124
|
-
getState(): GridState;
|
|
1125
|
-
applyState(state: GridStateInput, options?: ApplyGridStateOptions): void;
|
|
1126
|
-
/** Lightweight runtime snapshot suitable for support logs and health panels. */
|
|
1127
|
-
getDiagnostics(): GridDiagnostics;
|
|
1128
|
-
/** Rolling viewport-render metrics for diagnostics and reproducible benchmarks. */
|
|
1129
|
-
getPerformanceSnapshot(): GridPerformanceSnapshot;
|
|
1130
|
-
resetPerformanceMetrics(): void;
|
|
1131
|
-
setOverlay(type: "loading" | "noRows" | "error" | null): void;
|
|
1132
|
-
hideOverlays(): void;
|
|
1133
|
-
addEventListener<K extends GridEventType>(eventType: K, listener: (event: GridEventMap<TData>[K]) => void): () => void;
|
|
1134
|
-
removeEventListener<K extends GridEventType>(eventType: K, listener: (event: GridEventMap<TData>[K]) => void): void;
|
|
1135
|
-
destroy(): void;
|
|
1136
|
-
isDestroyed(): boolean;
|
|
687
|
+
interface NumberFilterCondition {
|
|
688
|
+
match: NumberFilterMatch;
|
|
689
|
+
value?: number;
|
|
690
|
+
value2?: number;
|
|
1137
691
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
colDef: ColDef<TData, TValue>;
|
|
1143
|
-
column: Column<TData>;
|
|
1144
|
-
api: GridApi<TData>;
|
|
692
|
+
interface DateFilterCondition {
|
|
693
|
+
match: DateFilterMatch;
|
|
694
|
+
value?: string;
|
|
695
|
+
value2?: string;
|
|
1145
696
|
}
|
|
1146
|
-
interface
|
|
1147
|
-
|
|
697
|
+
interface SetFilterCondition {
|
|
698
|
+
values: (string | number | null)[];
|
|
1148
699
|
}
|
|
1149
|
-
interface
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
rendererParams?: Record<string, any>;
|
|
700
|
+
interface TextColumnFilter {
|
|
701
|
+
type: "text";
|
|
702
|
+
operator?: "and" | "or";
|
|
703
|
+
conditions: TextFilterCondition[];
|
|
1154
704
|
}
|
|
1155
|
-
interface
|
|
1156
|
-
|
|
1157
|
-
|
|
705
|
+
interface NumberColumnFilter {
|
|
706
|
+
type: "number";
|
|
707
|
+
operator?: "and" | "or";
|
|
708
|
+
conditions: NumberFilterCondition[];
|
|
1158
709
|
}
|
|
1159
|
-
interface
|
|
1160
|
-
|
|
1161
|
-
|
|
710
|
+
interface DateColumnFilter {
|
|
711
|
+
type: "date";
|
|
712
|
+
operator?: "and" | "or";
|
|
713
|
+
conditions: DateFilterCondition[];
|
|
1162
714
|
}
|
|
1163
|
-
interface
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
keyPress?: string | null;
|
|
715
|
+
interface SetColumnFilter {
|
|
716
|
+
type: "set";
|
|
717
|
+
values: (string | number | null)[];
|
|
1167
718
|
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
colDef: ColDef<TData, TValue>;
|
|
1174
|
-
column: Column<TData>;
|
|
1175
|
-
api: GridApi<TData>;
|
|
719
|
+
type ColumnFilter = TextColumnFilter | NumberColumnFilter | DateColumnFilter | SetColumnFilter;
|
|
720
|
+
type FilterModel = Record<string, ColumnFilter>;
|
|
721
|
+
interface SortModelItem {
|
|
722
|
+
colId: string;
|
|
723
|
+
direction: SortDirection;
|
|
1176
724
|
}
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
api: GridApi<TData>;
|
|
725
|
+
type SortModel = SortModelItem[];
|
|
726
|
+
interface SelectEditorParams {
|
|
727
|
+
values: (string | number)[];
|
|
1181
728
|
}
|
|
1182
|
-
interface
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
api: GridApi<TData>;
|
|
729
|
+
interface SetFilterParams {
|
|
730
|
+
values?: (string | number | null)[];
|
|
731
|
+
maxValues?: number;
|
|
1186
732
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
733
|
+
type CellEditorFactory = (params: CellEditorParams) => ICellEditor;
|
|
734
|
+
type CellRendererFn = (params: CellRendererParams) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
735
|
+
type CellClassRule = string | string[] | ((params: CellClassParams) => string | string[] | null | undefined);
|
|
736
|
+
type CellStyleRule = Partial<CSSStyleDeclaration> | ((params: CellClassParams<any, any>) => Partial<CSSStyleDeclaration> | null | undefined);
|
|
737
|
+
interface ColDef<TData = any, TValue = any> {
|
|
738
|
+
colId?: string;
|
|
739
|
+
field?: string;
|
|
740
|
+
headerName?: string;
|
|
741
|
+
align?: CellAlign;
|
|
742
|
+
headerAlign?: CellAlign;
|
|
743
|
+
headerClass?: string | string[];
|
|
744
|
+
headerTooltip?: string;
|
|
745
|
+
headerComponent?: (params: HeaderComponentParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
746
|
+
width?: number;
|
|
747
|
+
minWidth?: number;
|
|
748
|
+
maxWidth?: number;
|
|
749
|
+
flex?: number;
|
|
750
|
+
/** Excludes the column from `columnLayout: "fit"` scaling. */
|
|
751
|
+
suppressSizeToFit?: boolean;
|
|
752
|
+
hide?: boolean;
|
|
753
|
+
pinned?: PinnedDirection | boolean;
|
|
754
|
+
sortable?: boolean;
|
|
755
|
+
resizable?: boolean;
|
|
756
|
+
movable?: boolean;
|
|
757
|
+
filter?: boolean | FilterType;
|
|
758
|
+
filterParams?: SetFilterParams;
|
|
759
|
+
editable?: boolean | ((params: EditableParams<TData, TValue>) => boolean);
|
|
760
|
+
cellEditor?: "text" | "number" | "date" | "select" | CellEditorFactory | string;
|
|
761
|
+
cellEditorParams?: SelectEditorParams;
|
|
762
|
+
wrapText?: boolean;
|
|
763
|
+
checkboxSelection?: boolean;
|
|
764
|
+
rowGroup?: boolean;
|
|
765
|
+
aggFunc?: string;
|
|
766
|
+
cellStyle?: CellStyleRule;
|
|
767
|
+
selectable?: (params: CellClassParams<TData, TValue>) => boolean;
|
|
768
|
+
singleClickEdit?: boolean;
|
|
769
|
+
tooltipValueGetter?: (params: ValueFormatterParams<TData, TValue>) => string | null | undefined;
|
|
770
|
+
rowSpan?: (params: CellClassParams<TData, TValue>) => number;
|
|
771
|
+
autoRowSpan?: boolean;
|
|
772
|
+
colSpan?: (params: CellClassParams<TData, TValue>) => number;
|
|
773
|
+
autoHeight?: boolean;
|
|
774
|
+
validate?: (newValue: TValue, params: ValueSetterParams<TData, TValue>) => string | true | null | undefined | Promise<string | true | null | undefined>;
|
|
775
|
+
rowDrag?: boolean;
|
|
776
|
+
valueGetter?: (params: ValueGetterParams<TData, TValue>) => TValue;
|
|
777
|
+
valueSetter?: (params: ValueSetterParams<TData, TValue>) => boolean;
|
|
778
|
+
valueFormatter?: (params: ValueFormatterParams<TData, TValue>) => any;
|
|
779
|
+
cellRenderer?: CellRendererFn | string;
|
|
780
|
+
cellRendererParams?: Record<string, any>;
|
|
781
|
+
cellClass?: CellClassRule;
|
|
782
|
+
comparator?: (valueA: any, valueB: any, nodeA: RowNode<TData>, nodeB: RowNode<TData>) => number;
|
|
783
|
+
/** Named column type(s), resolved left-to-right before this column definition. */
|
|
784
|
+
type?: string | readonly string[];
|
|
785
|
+
initialSort?: SortDirection;
|
|
786
|
+
onCellClick?: (event: CellClickEvent<TData, TValue>) => void;
|
|
787
|
+
onCellDoubleClick?: (event: CellDoubleClickEvent<TData, TValue>) => void;
|
|
788
|
+
}
|
|
789
|
+
interface ColDefGroup<TData = any> {
|
|
790
|
+
groupId?: string;
|
|
791
|
+
headerName?: string;
|
|
792
|
+
headerClass?: string | string[];
|
|
793
|
+
children: (ColDefGroup<TData> | ColDef<TData>)[];
|
|
794
|
+
}
|
|
795
|
+
type ColDefOrGroup<TData = any> = ColDefGroup<TData> | ColDef<TData>;
|
|
796
|
+
declare function isColDefGroup<TData = any>(def: ColDefOrGroup<TData>): def is ColDefGroup<TData>;
|
|
797
|
+
interface ColumnState {
|
|
1191
798
|
colId: string;
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
799
|
+
hide?: boolean;
|
|
800
|
+
width?: number;
|
|
801
|
+
/** Active flex weight. A resize clears flex and turns width into a manual override. */
|
|
802
|
+
flex?: number | null;
|
|
803
|
+
/** Distinguishes responsive/definition width from an explicit user or API override. */
|
|
804
|
+
widthMode?: "auto" | "manual";
|
|
805
|
+
pinned?: "left" | "right" | null;
|
|
806
|
+
sort?: SortDirection | null;
|
|
807
|
+
sortIndex?: number | null;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
declare class ColumnGroup<TData = any> {
|
|
811
|
+
readonly groupId: string;
|
|
812
|
+
readonly def: ColDefGroup<TData>;
|
|
813
|
+
parent: ColumnGroup<TData> | null;
|
|
814
|
+
children: (ColumnGroup<TData> | Column<TData>)[];
|
|
815
|
+
constructor(groupId: string, def: ColDefGroup<TData>);
|
|
816
|
+
get headerName(): string;
|
|
817
|
+
getLeafColumns(out?: Column<TData>[]): Column<TData>[];
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
declare class Column<TData = any> {
|
|
821
|
+
readonly id: string;
|
|
822
|
+
readonly colDef: ColDef<TData>;
|
|
823
|
+
hide: boolean;
|
|
824
|
+
pinned: PinnedDirection | null;
|
|
825
|
+
manualWidth: number | null;
|
|
826
|
+
flex: number | null;
|
|
827
|
+
currentWidth: number;
|
|
828
|
+
parentGroup: ColumnGroup<TData> | null;
|
|
829
|
+
level: number;
|
|
830
|
+
isDetailToggle: boolean;
|
|
831
|
+
constructor(id: string, colDef: ColDef<TData>);
|
|
832
|
+
get sortable(): boolean;
|
|
833
|
+
get resizable(): boolean;
|
|
834
|
+
get movable(): boolean;
|
|
835
|
+
get filterable(): boolean;
|
|
836
|
+
get filterType(): FilterType;
|
|
837
|
+
get hasCheckbox(): boolean;
|
|
838
|
+
resetWidth(): void;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare const DEFAULT_LOCALE: {
|
|
842
|
+
readonly matchContains: "包含";
|
|
843
|
+
readonly matchNotContains: "不包含";
|
|
844
|
+
readonly matchEquals: "等于";
|
|
845
|
+
readonly matchNotEquals: "不等于";
|
|
846
|
+
readonly matchStartsWith: "开头是";
|
|
847
|
+
readonly matchEndsWith: "结尾是";
|
|
848
|
+
readonly matchBlank: "为空";
|
|
849
|
+
readonly matchNotBlank: "不为空";
|
|
850
|
+
readonly matchLessThan: "小于";
|
|
851
|
+
readonly matchLessThanOrEqual: "小于等于";
|
|
852
|
+
readonly matchGreaterThan: "大于";
|
|
853
|
+
readonly matchGreaterThanOrEqual: "大于等于";
|
|
854
|
+
readonly matchInRange: "在范围内";
|
|
855
|
+
readonly apply: "应用";
|
|
856
|
+
readonly reset: "重置";
|
|
857
|
+
readonly search: "搜索...";
|
|
858
|
+
readonly emptySetLabel: "(空)";
|
|
859
|
+
readonly selectedCount: "已选 {n} 项";
|
|
860
|
+
readonly sortAsc: "升序";
|
|
861
|
+
readonly sortDesc: "降序";
|
|
862
|
+
readonly clearSort: "取消排序";
|
|
863
|
+
readonly pinLeft: "固定左侧";
|
|
864
|
+
readonly pinRight: "固定右侧";
|
|
865
|
+
readonly clearPin: "取消固定";
|
|
866
|
+
readonly autoSize: "自适应列宽";
|
|
867
|
+
readonly hideColumn: "隐藏此列";
|
|
868
|
+
readonly columnVisibility: "列显示";
|
|
869
|
+
readonly resetAll: "重置全部";
|
|
870
|
+
readonly autoSizeAll: "全部自适应";
|
|
871
|
+
readonly columnSettings: "列设置";
|
|
872
|
+
readonly totalLabel: "合计";
|
|
873
|
+
readonly totalRowsLabel: "共 {n} 行";
|
|
874
|
+
readonly menuCopy: "复制";
|
|
875
|
+
readonly menuPaste: "粘贴";
|
|
876
|
+
readonly menuClearContents: "清除内容";
|
|
877
|
+
readonly loading: "加载中...";
|
|
878
|
+
readonly statusSelected: "已选 {n} 行";
|
|
879
|
+
readonly statusSum: "和 {n}";
|
|
880
|
+
readonly statusAvg: "均 {n}";
|
|
881
|
+
readonly statusCount: "计 {n}";
|
|
882
|
+
readonly emptyRows: "暂无数据";
|
|
883
|
+
readonly emptyRowsHint: "没有可显示的行";
|
|
884
|
+
readonly paginationTotal: "共 {n} 条";
|
|
885
|
+
readonly paginationPage: "第 {a} / {b} 页";
|
|
886
|
+
readonly perPage: "{n} 条/页";
|
|
887
|
+
readonly pageFirst: "首页";
|
|
888
|
+
readonly pagePrev: "上一页";
|
|
889
|
+
readonly pageNext: "下一页";
|
|
890
|
+
readonly pageLast: "末页";
|
|
891
|
+
readonly requestFailed: "数据加载失败";
|
|
892
|
+
readonly requestFailedHint: "请检查网络后重试";
|
|
893
|
+
readonly actionView: "查看";
|
|
894
|
+
readonly actionEdit: "编辑";
|
|
895
|
+
readonly actionDelete: "删除";
|
|
896
|
+
readonly actionConfirm: "确认";
|
|
897
|
+
readonly actionSave: "保存";
|
|
898
|
+
readonly actionCancel: "取消";
|
|
899
|
+
readonly actionMore: "更多操作";
|
|
900
|
+
};
|
|
901
|
+
type MachTableLocaleKey = keyof typeof DEFAULT_LOCALE;
|
|
902
|
+
type MachTableLocale = Partial<Record<MachTableLocaleKey, string>>;
|
|
903
|
+
declare const LOCALE_EN: MachTableLocale;
|
|
904
|
+
declare function matchLocaleKey(match: string): MachTableLocaleKey;
|
|
905
|
+
declare function formatText(template: string, n: number | string): string;
|
|
906
|
+
declare function formatTwo(template: string, a: number | string, b: number | string): string;
|
|
907
|
+
|
|
908
|
+
type Callable = (...args: never[]) => unknown;
|
|
909
|
+
type Primitive = string | number | boolean | bigint | symbol | null | undefined | Date | Callable;
|
|
910
|
+
type Depth = 0 | 1 | 2 | 3 | 4;
|
|
911
|
+
type Previous = {
|
|
912
|
+
0: 0;
|
|
913
|
+
1: 0;
|
|
914
|
+
2: 1;
|
|
915
|
+
3: 2;
|
|
916
|
+
4: 3;
|
|
917
|
+
};
|
|
918
|
+
/** Dot-separated path to a serializable field, capped to keep editor inference fast. */
|
|
919
|
+
type FieldPath<T, D extends Depth = 4> = D extends 0 ? never : T extends Primitive ? never : {
|
|
920
|
+
[K in keyof T & string]: NonNullable<T[K]> extends Primitive | readonly unknown[] ? K : K | `${K}.${FieldPath<NonNullable<T[K]>, Previous[D]>}`;
|
|
921
|
+
}[keyof T & string];
|
|
922
|
+
type FieldPathValue<T, P extends string> = P extends keyof T ? T[P] : P extends `${infer Head}.${infer Tail}` ? Head extends keyof T ? FieldPathValue<NonNullable<T[Head]>, Tail> : unknown : unknown;
|
|
923
|
+
|
|
924
|
+
interface GridStateStore {
|
|
925
|
+
load(key: string): GridStateInput | null | Promise<GridStateInput | null>;
|
|
926
|
+
save(key: string, state: GridStateInput): void | Promise<void>;
|
|
927
|
+
clear?(key: string): void | Promise<void>;
|
|
1195
928
|
}
|
|
1196
|
-
interface
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
929
|
+
interface GridPersistenceOptions {
|
|
930
|
+
/** Stable storage key; namespace it by application, user and table. */
|
|
931
|
+
key: string;
|
|
932
|
+
/** Restored state sections. Defaults to every section. */
|
|
933
|
+
sections?: readonly GridStateSection[];
|
|
934
|
+
store?: GridStateStore;
|
|
935
|
+
debounceMs?: number;
|
|
1203
936
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
disabled?: boolean;
|
|
1209
|
-
separator?: boolean;
|
|
937
|
+
/** Per-grid component overrides. These take precedence over the global registry. */
|
|
938
|
+
interface GridComponents {
|
|
939
|
+
cellRenderers?: Readonly<Record<string, CellRendererFn>>;
|
|
940
|
+
cellEditors?: Readonly<Record<string, CellEditorFactory>>;
|
|
1210
941
|
}
|
|
1211
|
-
interface
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
942
|
+
interface GridFeatureContext<TData = any> {
|
|
943
|
+
readonly api: GridApi<TData>;
|
|
944
|
+
readonly root: HTMLElement;
|
|
945
|
+
getOptions(): Readonly<ResolvedGridOptions<TData>>;
|
|
946
|
+
addEventListener<K extends keyof GridEventMap<TData>>(type: K, listener: (event: GridEventMap<TData>[K]) => void): () => void;
|
|
947
|
+
/** Registers cleanup even when setup later throws or the feature is hot-replaced. */
|
|
948
|
+
onCleanup(cleanup: () => void): void;
|
|
949
|
+
addManagedDomListener(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
|
|
950
|
+
setManagedTimeout(handler: () => void, delayMs: number): ReturnType<typeof setTimeout>;
|
|
951
|
+
createAbortController(): AbortController;
|
|
952
|
+
reportError(error: unknown, source: string, context?: Record<string, unknown>): void;
|
|
1215
953
|
}
|
|
1216
|
-
interface
|
|
1217
|
-
|
|
1218
|
-
/**
|
|
1219
|
-
|
|
1220
|
-
destroy?: () => void;
|
|
954
|
+
interface GridFeatureRequirement {
|
|
955
|
+
key: string;
|
|
956
|
+
/** Semver range, for example `>=0.18 <1`, `^0.18.0` or an exact version. */
|
|
957
|
+
version?: string;
|
|
1221
958
|
}
|
|
1222
|
-
|
|
1223
|
-
interface
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
959
|
+
/** Composable extension point; feature instances are scoped to one grid. */
|
|
960
|
+
interface GridFeature<TData = any> {
|
|
961
|
+
readonly key: string;
|
|
962
|
+
/** Informational extension version exposed through diagnostics. */
|
|
963
|
+
readonly version?: string;
|
|
964
|
+
/** Feature keys that must be initialised before this feature. */
|
|
965
|
+
readonly requires?: readonly (string | GridFeatureRequirement)[];
|
|
966
|
+
/** Mutually exclusive feature keys. Conflicting features are not initialised. */
|
|
967
|
+
readonly conflicts?: readonly string[];
|
|
968
|
+
setup(context: GridFeatureContext<TData>): void | (() => void);
|
|
1227
969
|
destroy?(): void;
|
|
1228
|
-
isCancelBeforeStart?(): boolean;
|
|
1229
|
-
isCancelAfterEnd?(value: TValue | null | undefined): boolean;
|
|
1230
970
|
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
type
|
|
1236
|
-
type
|
|
1237
|
-
type
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
match: TextFilterMatch;
|
|
1241
|
-
value?: string;
|
|
971
|
+
/**
|
|
972
|
+
* Safe overlay content. Strings render as text unless
|
|
973
|
+
* `allowUnsafeOverlayHtml` is explicitly enabled.
|
|
974
|
+
*/
|
|
975
|
+
type OverlayContent = string | HTMLElement | ICellRendererResult;
|
|
976
|
+
type OverlayTemplate = OverlayContent | (() => OverlayContent);
|
|
977
|
+
type StatusBarPanel = "rowCount" | "selectedRowCount" | "rangeAggregate";
|
|
978
|
+
interface StatusBarConfig {
|
|
979
|
+
panels?: StatusBarPanel[];
|
|
1242
980
|
}
|
|
1243
|
-
interface
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
981
|
+
interface InfiniteGetRowsParams<TData = any> {
|
|
982
|
+
startRow: number;
|
|
983
|
+
endRow: number;
|
|
984
|
+
sortModel: SortModel;
|
|
985
|
+
filterModel: FilterModel;
|
|
986
|
+
advancedFilterModel: AdvancedFilterModel | null;
|
|
987
|
+
quickFilterText: string | null;
|
|
988
|
+
signal: AbortSignal;
|
|
989
|
+
onSuccess(rows: TData[], lastRow?: number): void;
|
|
990
|
+
fail(reason?: unknown): void;
|
|
1247
991
|
}
|
|
1248
|
-
interface
|
|
1249
|
-
|
|
1250
|
-
value?: string;
|
|
1251
|
-
value2?: string;
|
|
992
|
+
interface GridDatasource<TData = any> {
|
|
993
|
+
getRows(params: InfiniteGetRowsParams<TData>): void | Promise<void>;
|
|
1252
994
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
995
|
+
type DatasourceMode = "sequential" | "block";
|
|
996
|
+
interface GridDataProcessorColumn {
|
|
997
|
+
colId: string;
|
|
998
|
+
/** Serializable field path when the column has one. */
|
|
999
|
+
field?: string;
|
|
1255
1000
|
}
|
|
1256
|
-
interface
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
conditions: TextFilterCondition[];
|
|
1001
|
+
interface GridDataProcessorRow<TData = any> {
|
|
1002
|
+
id: string;
|
|
1003
|
+
data: TData;
|
|
1260
1004
|
}
|
|
1261
|
-
interface
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1005
|
+
interface GridDataProcessorRequest<TData = any> {
|
|
1006
|
+
rows: readonly GridDataProcessorRow<TData>[];
|
|
1007
|
+
columns: readonly GridDataProcessorColumn[];
|
|
1008
|
+
sortModel: SortModel;
|
|
1009
|
+
filterModel: FilterModel;
|
|
1010
|
+
advancedFilterModel: AdvancedFilterModel | null;
|
|
1011
|
+
quickFilterText: string | null;
|
|
1012
|
+
signal: AbortSignal;
|
|
1265
1013
|
}
|
|
1266
|
-
interface
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
conditions: DateFilterCondition[];
|
|
1014
|
+
interface GridDataProcessorResult {
|
|
1015
|
+
/** Filtered and sorted stable row IDs, in final display order. */
|
|
1016
|
+
rowIds: readonly string[];
|
|
1270
1017
|
}
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1018
|
+
/** Optional async/Worker boundary for expensive local filtering and sorting. */
|
|
1019
|
+
interface GridDataProcessor<TData = any> {
|
|
1020
|
+
process(request: GridDataProcessorRequest<TData>): Promise<GridDataProcessorResult>;
|
|
1021
|
+
destroy?(): void;
|
|
1274
1022
|
}
|
|
1275
|
-
type
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1023
|
+
type EventHandlers<TData = any> = {
|
|
1024
|
+
[K in keyof GridEventMap<TData> as `on${Capitalize<K & string>}`]?: (event: GridEventMap<TData>[K]) => void;
|
|
1025
|
+
};
|
|
1026
|
+
type RowSelectionMode = "none" | "single" | "multiple";
|
|
1027
|
+
type GridSize = "compact" | "normal" | "large";
|
|
1028
|
+
type ColumnLayoutMode = "normal" | "fit";
|
|
1029
|
+
type DomLayoutMode = "normal" | "autoHeight";
|
|
1030
|
+
type ThemeMode = "light" | "dark" | "auto";
|
|
1031
|
+
type GridEditType = "cell" | "fullRow";
|
|
1032
|
+
type EditableIndicator = "hover" | "always" | "none";
|
|
1033
|
+
interface RowEditValidationParams<TData = any> {
|
|
1034
|
+
data: TData;
|
|
1035
|
+
node: RowNode<TData>;
|
|
1036
|
+
/** Draft values keyed by colId, including unchanged editable cells. */
|
|
1037
|
+
values: Readonly<Record<string, unknown>>;
|
|
1038
|
+
changes: readonly RowEditChange[];
|
|
1039
|
+
api: GridApi<TData>;
|
|
1280
1040
|
}
|
|
1281
|
-
type
|
|
1282
|
-
interface
|
|
1283
|
-
|
|
1041
|
+
type RowEditValidationResult = true | null | undefined | string | Readonly<Record<string, string>>;
|
|
1042
|
+
interface DetailRowRendererParams<TData = any> {
|
|
1043
|
+
data: TData | null;
|
|
1044
|
+
node: RowNode<TData>;
|
|
1045
|
+
api: GridApi<TData>;
|
|
1284
1046
|
}
|
|
1285
|
-
interface
|
|
1286
|
-
|
|
1287
|
-
|
|
1047
|
+
interface TreeDataLoadParams<TData = any> {
|
|
1048
|
+
data: TData;
|
|
1049
|
+
node: RowNode<TData>;
|
|
1050
|
+
api: GridApi<TData>;
|
|
1051
|
+
signal: AbortSignal;
|
|
1288
1052
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
headerTooltip?: string;
|
|
1301
|
-
headerComponent?: (params: HeaderComponentParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
1302
|
-
width?: number;
|
|
1303
|
-
minWidth?: number;
|
|
1304
|
-
maxWidth?: number;
|
|
1305
|
-
flex?: number;
|
|
1306
|
-
/** Excludes the column from `columnLayout: "fit"` scaling. */
|
|
1307
|
-
suppressSizeToFit?: boolean;
|
|
1308
|
-
hide?: boolean;
|
|
1309
|
-
pinned?: PinnedDirection | boolean;
|
|
1310
|
-
sortable?: boolean;
|
|
1311
|
-
resizable?: boolean;
|
|
1312
|
-
movable?: boolean;
|
|
1313
|
-
filter?: boolean | FilterType;
|
|
1314
|
-
filterParams?: SetFilterParams;
|
|
1315
|
-
editable?: boolean | ((params: EditableParams<TData, TValue>) => boolean);
|
|
1316
|
-
cellEditor?: "text" | "number" | "date" | "select" | CellEditorFactory | string;
|
|
1317
|
-
cellEditorParams?: SelectEditorParams;
|
|
1318
|
-
wrapText?: boolean;
|
|
1319
|
-
checkboxSelection?: boolean;
|
|
1320
|
-
rowGroup?: boolean;
|
|
1321
|
-
aggFunc?: string;
|
|
1322
|
-
cellStyle?: CellStyleRule;
|
|
1323
|
-
selectable?: (params: CellClassParams<TData, TValue>) => boolean;
|
|
1324
|
-
singleClickEdit?: boolean;
|
|
1325
|
-
tooltipValueGetter?: (params: ValueFormatterParams<TData, TValue>) => string | null | undefined;
|
|
1326
|
-
rowSpan?: (params: CellClassParams<TData, TValue>) => number;
|
|
1327
|
-
autoRowSpan?: boolean;
|
|
1328
|
-
colSpan?: (params: CellClassParams<TData, TValue>) => number;
|
|
1329
|
-
autoHeight?: boolean;
|
|
1330
|
-
validate?: (newValue: TValue, params: ValueSetterParams<TData, TValue>) => string | true | null | undefined | Promise<string | true | null | undefined>;
|
|
1331
|
-
rowDrag?: boolean;
|
|
1332
|
-
valueGetter?: (params: ValueGetterParams<TData, TValue>) => TValue;
|
|
1333
|
-
valueSetter?: (params: ValueSetterParams<TData, TValue>) => boolean;
|
|
1334
|
-
valueFormatter?: (params: ValueFormatterParams<TData, TValue>) => any;
|
|
1335
|
-
cellRenderer?: CellRendererFn | string;
|
|
1336
|
-
cellRendererParams?: Record<string, any>;
|
|
1337
|
-
cellClass?: CellClassRule;
|
|
1338
|
-
comparator?: (valueA: any, valueB: any, nodeA: RowNode<TData>, nodeB: RowNode<TData>) => number;
|
|
1339
|
-
/** Named column type(s), resolved left-to-right before this column definition. */
|
|
1340
|
-
type?: string | readonly string[];
|
|
1341
|
-
initialSort?: SortDirection;
|
|
1342
|
-
onCellClick?: (event: CellClickEvent<TData, TValue>) => void;
|
|
1343
|
-
onCellDoubleClick?: (event: CellDoubleClickEvent<TData, TValue>) => void;
|
|
1053
|
+
interface PaginationConfig {
|
|
1054
|
+
/** `server` displays the supplied page as-is and uses `total` for navigation. */
|
|
1055
|
+
mode?: "client" | "server";
|
|
1056
|
+
/** Controlled current page for server mode. */
|
|
1057
|
+
page?: number;
|
|
1058
|
+
/** Total rows across all server pages. */
|
|
1059
|
+
total?: number;
|
|
1060
|
+
pageSize?: number;
|
|
1061
|
+
pageSizeOptions?: number[];
|
|
1062
|
+
showTotal?: boolean;
|
|
1063
|
+
showPageSizeSelector?: boolean;
|
|
1344
1064
|
}
|
|
1345
|
-
interface
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1065
|
+
interface WatermarkConfig {
|
|
1066
|
+
text: string;
|
|
1067
|
+
fontSize?: number;
|
|
1068
|
+
color?: string;
|
|
1069
|
+
opacity?: number;
|
|
1070
|
+
gap?: number;
|
|
1071
|
+
angle?: number;
|
|
1350
1072
|
}
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
/** Active flex weight. A resize clears flex and turns width into a manual override. */
|
|
1358
|
-
flex?: number | null;
|
|
1359
|
-
/** Distinguishes responsive/definition width from an explicit user or API override. */
|
|
1360
|
-
widthMode?: "auto" | "manual";
|
|
1361
|
-
pinned?: "left" | "right" | null;
|
|
1362
|
-
sort?: SortDirection | null;
|
|
1363
|
-
sortIndex?: number | null;
|
|
1073
|
+
interface ActionPolicyContext<TData = any> {
|
|
1074
|
+
/** Stable business action identifier, for example `order.delete`. */
|
|
1075
|
+
actionId?: string;
|
|
1076
|
+
permissions: readonly string[];
|
|
1077
|
+
message?: string;
|
|
1078
|
+
params: CellRendererParams<TData>;
|
|
1364
1079
|
}
|
|
1365
|
-
|
|
1366
|
-
type GridDataProcessorPayload<TData = any> = Omit<GridDataProcessorRequest<TData>, "signal">;
|
|
1367
|
-
interface GridWorkerProcessMessage<TData = any> {
|
|
1368
|
-
type: "mach-table:process";
|
|
1369
|
-
requestId: number;
|
|
1370
|
-
payload: GridDataProcessorPayload<TData>;
|
|
1371
|
-
}
|
|
1372
|
-
interface GridWorkerCancelMessage {
|
|
1373
|
-
type: "mach-table:cancel";
|
|
1374
|
-
requestId: number;
|
|
1375
|
-
}
|
|
1376
|
-
type GridWorkerRequestMessage<TData = any> = GridWorkerProcessMessage<TData> | GridWorkerCancelMessage;
|
|
1377
|
-
type GridWorkerResponseMessage = {
|
|
1378
|
-
type: "mach-table:result";
|
|
1379
|
-
requestId: number;
|
|
1380
|
-
rowIds: readonly string[];
|
|
1381
|
-
} | {
|
|
1382
|
-
type: "mach-table:error";
|
|
1383
|
-
requestId: number;
|
|
1384
|
-
message: string;
|
|
1385
|
-
};
|
|
1386
|
-
interface WorkerDataProcessorOptions {
|
|
1387
|
-
/** Terminate the lazily-created worker when the grid is destroyed. Defaults to true. */
|
|
1388
|
-
terminateOnDestroy?: boolean;
|
|
1389
|
-
}
|
|
1390
|
-
interface FieldDataProcessorOptions {
|
|
1391
|
-
/** Cooperative cancellation/yield granularity. Defaults to 2,000 rows. */
|
|
1392
|
-
yieldEvery?: number;
|
|
1393
|
-
isCancelled?: () => boolean;
|
|
1394
|
-
}
|
|
1395
|
-
/** Built-in serializable field-path processor intended to run inside an application Worker. */
|
|
1396
|
-
declare function processFieldDataRequest<TData = any>(request: GridDataProcessorPayload<TData>, options?: FieldDataProcessorOptions): Promise<GridDataProcessorResult>;
|
|
1397
|
-
interface GridDataWorkerScope {
|
|
1398
|
-
addEventListener(type: "message", listener: (event: MessageEvent<GridWorkerRequestMessage>) => void): void;
|
|
1399
|
-
postMessage(message: GridWorkerResponseMessage): void;
|
|
1400
|
-
}
|
|
1401
|
-
/** Installs the standard field-path protocol in a dedicated Worker module. */
|
|
1402
|
-
declare function installGridDataWorker(scope: GridDataWorkerScope): void;
|
|
1403
1080
|
/**
|
|
1404
|
-
*
|
|
1405
|
-
*
|
|
1081
|
+
* Application-wide UI action policy. This centralises permission, confirmation
|
|
1082
|
+
* and error handling while the backend remains the final security boundary.
|
|
1406
1083
|
*/
|
|
1407
|
-
|
|
1084
|
+
interface ActionPolicy<TData = any> {
|
|
1085
|
+
canAccess?(context: ActionPolicyContext<TData>): boolean;
|
|
1086
|
+
confirm?(context: ActionPolicyContext<TData>): boolean | Promise<boolean>;
|
|
1087
|
+
onError?(error: unknown, context: ActionPolicyContext<TData>): void;
|
|
1088
|
+
}
|
|
1089
|
+
interface GridOptions<TData = any> extends EventHandlers<TData> {
|
|
1090
|
+
columnDefs?: (ColDef<TData> | ColDefGroup<TData>)[] | null;
|
|
1091
|
+
rowData?: TData[] | null;
|
|
1092
|
+
defaultColDef?: Partial<ColDef<TData>>;
|
|
1093
|
+
/** Reusable semantic column definitions referenced through `colDef.type`. */
|
|
1094
|
+
columnTypes?: Readonly<Record<string, Partial<ColDef<TData>>>>;
|
|
1095
|
+
/** Stable business key. Use a field path or a function for derived identifiers. */
|
|
1096
|
+
rowKey?: FieldPath<TData> | ((row: TData) => string | number);
|
|
1097
|
+
rowHeight?: number;
|
|
1098
|
+
headerHeight?: number;
|
|
1099
|
+
rowBuffer?: number;
|
|
1100
|
+
/** `fit` continuously fills the container without grid-ready glue code. */
|
|
1101
|
+
columnLayout?: ColumnLayoutMode;
|
|
1102
|
+
/** Enables pointer, double-click and Alt+Arrow column resizing. Disabled by default. */
|
|
1103
|
+
enableColumnResize?: boolean;
|
|
1104
|
+
/** Lets small grids grow with their rows. Avoid for large or infinite datasets. */
|
|
1105
|
+
domLayout?: DomLayoutMode;
|
|
1106
|
+
rowSelection?: RowSelectionMode;
|
|
1107
|
+
multiSort?: boolean;
|
|
1108
|
+
size?: GridSize;
|
|
1109
|
+
stripedRows?: boolean;
|
|
1110
|
+
showCellBorders?: boolean;
|
|
1111
|
+
theme?: ThemeMode;
|
|
1112
|
+
quickFilterText?: string | null;
|
|
1113
|
+
/** Nested AND/OR filter expression, safe for local evaluation and backend serialization. */
|
|
1114
|
+
advancedFilterModel?: AdvancedFilterModel | null;
|
|
1115
|
+
masterDetail?: boolean;
|
|
1116
|
+
detailRowHeight?: number;
|
|
1117
|
+
detailRowRenderer?: (params: DetailRowRendererParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
1118
|
+
isRowExpandable?: (params: DetailRowRendererParams<TData>) => boolean;
|
|
1119
|
+
detailToggleColumn?: boolean;
|
|
1120
|
+
columnMenu?: boolean;
|
|
1121
|
+
aggFuncs?: Record<string, (values: any[]) => any>;
|
|
1122
|
+
components?: GridComponents;
|
|
1123
|
+
/** Shared policy consumed by action column helpers. */
|
|
1124
|
+
actionPolicy?: ActionPolicy<TData>;
|
|
1125
|
+
features?: readonly GridFeature<TData>[];
|
|
1126
|
+
/** State restored atomically after columns and initial rows are available. */
|
|
1127
|
+
initialState?: GridStateInput;
|
|
1128
|
+
/** Opt-in versioned state persistence. Use sections: ["columns"] for width/order memory only. */
|
|
1129
|
+
persistence?: GridPersistenceOptions | false;
|
|
1130
|
+
locale?: MachTableLocale;
|
|
1131
|
+
/** Cell editing is isolated; fullRow stages every editable cell and commits them together. */
|
|
1132
|
+
editType?: GridEditType;
|
|
1133
|
+
/** Visibility of the subtle pencil affordance on editable cells. */
|
|
1134
|
+
editableIndicator?: EditableIndicator;
|
|
1135
|
+
/** Cross-field full-row validation. Return a message or a colId -> message map. */
|
|
1136
|
+
rowEditValidator?: (params: RowEditValidationParams<TData>) => RowEditValidationResult | Promise<RowEditValidationResult>;
|
|
1137
|
+
singleClickEdit?: boolean;
|
|
1138
|
+
manualSorting?: boolean;
|
|
1139
|
+
manualFiltering?: boolean;
|
|
1140
|
+
showSummary?: boolean;
|
|
1141
|
+
summaryMethod?: (params: {
|
|
1142
|
+
colId: string;
|
|
1143
|
+
column: Column<any>;
|
|
1144
|
+
values: any[];
|
|
1145
|
+
}) => string;
|
|
1146
|
+
treeData?: boolean;
|
|
1147
|
+
childrenKey?: string;
|
|
1148
|
+
/** Marks rows that can load children even when `childrenKey` is currently empty. */
|
|
1149
|
+
isTreeRowExpandable?: (params: Omit<TreeDataLoadParams<TData>, "signal">) => boolean;
|
|
1150
|
+
/** Loads children once on first expansion; use the API retry/force methods to reload. */
|
|
1151
|
+
loadTreeChildren?: (params: TreeDataLoadParams<TData>) => Promise<readonly TData[]>;
|
|
1152
|
+
autoCheckedChildren?: boolean;
|
|
1153
|
+
defaultExpandAll?: boolean;
|
|
1154
|
+
indexOffset?: number;
|
|
1155
|
+
applyRowDrag?: boolean;
|
|
1156
|
+
undoStackSize?: number;
|
|
1157
|
+
/** Milliseconds used to coalesce applyTransactionAsync calls. */
|
|
1158
|
+
asyncTransactionWaitMillis?: number;
|
|
1159
|
+
getRowHeight?: (params: GetRowHeightParams<TData>) => number;
|
|
1160
|
+
pinnedTopRowData?: TData[] | null;
|
|
1161
|
+
pinnedBottomRowData?: TData[] | null;
|
|
1162
|
+
pagination?: boolean | PaginationConfig;
|
|
1163
|
+
watermark?: boolean | WatermarkConfig;
|
|
1164
|
+
suppressWarnings?: boolean;
|
|
1165
|
+
enableRangeSelection?: boolean;
|
|
1166
|
+
suppressClipboard?: boolean;
|
|
1167
|
+
contextMenu?: boolean;
|
|
1168
|
+
getContextMenuItems?: (params: ContextMenuParams<TData>) => ContextMenuItem[] | null;
|
|
1169
|
+
tooltipComponent?: (params: TooltipParams<TData>) => string | HTMLElement;
|
|
1170
|
+
tooltipShowDelay?: number;
|
|
1171
|
+
flashCells?: boolean;
|
|
1172
|
+
fillHandle?: boolean;
|
|
1173
|
+
statusBar?: boolean | StatusBarConfig;
|
|
1174
|
+
datasource?: GridDatasource<TData>;
|
|
1175
|
+
/** Sequential append is the compatibility default; block enables random-access cached loading. */
|
|
1176
|
+
datasourceMode?: DatasourceMode;
|
|
1177
|
+
blockSize?: number;
|
|
1178
|
+
infiniteBufferRows?: number;
|
|
1179
|
+
/** Maximum retained blocks in random-access mode. */
|
|
1180
|
+
maxBlocksInCache?: number;
|
|
1181
|
+
/** Upper bound for active random-access datasource requests. Defaults to 4. */
|
|
1182
|
+
datasourceMaxConcurrentRequests?: number;
|
|
1183
|
+
/** Number of adjacent blocks prefetched around a requested viewport. */
|
|
1184
|
+
blockPrefetch?: number;
|
|
1185
|
+
/** Optional initial total enables immediate scrollbar range before the first response. */
|
|
1186
|
+
datasourceRowCount?: number;
|
|
1187
|
+
/** Opt-in async processor for large local filter/sort pipelines. */
|
|
1188
|
+
dataProcessor?: GridDataProcessor<TData>;
|
|
1189
|
+
/** Minimum local row count before dataProcessor is used. Defaults to 5,000. */
|
|
1190
|
+
dataProcessorMinRows?: number;
|
|
1191
|
+
/** Number of automatic retries after an infinite datasource request fails. */
|
|
1192
|
+
datasourceRetryCount?: number;
|
|
1193
|
+
/** Base retry delay in milliseconds. Retries use capped exponential backoff. */
|
|
1194
|
+
datasourceRetryDelay?: number;
|
|
1195
|
+
/** Symmetric retry jitter ratio in the 0..1 range. Defaults to 0.15. */
|
|
1196
|
+
datasourceRetryJitter?: number;
|
|
1197
|
+
suppressCellFocus?: boolean;
|
|
1198
|
+
suppressRowHoverHighlight?: boolean;
|
|
1199
|
+
suppressNoRowsOverlay?: boolean;
|
|
1200
|
+
suppressHeaderFocus?: boolean;
|
|
1201
|
+
/** Accessible name applied to the element with role="grid"/"treegrid". */
|
|
1202
|
+
ariaLabel?: string;
|
|
1203
|
+
/** ID of an external element that labels the grid. Takes precedence over ariaLabel. */
|
|
1204
|
+
ariaLabelledBy?: string;
|
|
1205
|
+
/** ID of an external element that provides additional grid instructions. */
|
|
1206
|
+
ariaDescribedBy?: string;
|
|
1207
|
+
loading?: boolean;
|
|
1208
|
+
/** Non-null errors take precedence over the empty state and remain retryable by the host. */
|
|
1209
|
+
error?: unknown | null;
|
|
1210
|
+
overlayNoRowsTemplate?: OverlayTemplate;
|
|
1211
|
+
overlayLoadingTemplate?: OverlayTemplate;
|
|
1212
|
+
overlayErrorTemplate?: OverlayTemplate;
|
|
1213
|
+
/** Opt in only for trusted overlay strings. Prefer HTMLElement factories. */
|
|
1214
|
+
allowUnsafeOverlayHtml?: boolean;
|
|
1215
|
+
className?: string;
|
|
1216
|
+
}
|
|
1217
|
+
interface ResolvedGridOptions<TData = any> extends EventHandlers<TData> {
|
|
1218
|
+
columnDefs: (ColDef<TData> | ColDefGroup<TData>)[];
|
|
1219
|
+
rowData: TData[];
|
|
1220
|
+
defaultColDef: Partial<ColDef<TData>>;
|
|
1221
|
+
columnTypes: Readonly<Record<string, Partial<ColDef<TData>>>>;
|
|
1222
|
+
/** Internal normalized identity resolver derived from rowKey. */
|
|
1223
|
+
resolveRowId?: (params: GetRowIdParams<TData>) => string;
|
|
1224
|
+
rowKey?: FieldPath<TData> | ((row: TData) => string | number);
|
|
1225
|
+
rowHeight: number;
|
|
1226
|
+
headerHeight: number;
|
|
1227
|
+
rowBuffer: number;
|
|
1228
|
+
columnLayout: ColumnLayoutMode;
|
|
1229
|
+
enableColumnResize: boolean;
|
|
1230
|
+
domLayout: DomLayoutMode;
|
|
1231
|
+
rowSelection: RowSelectionMode;
|
|
1232
|
+
multiSort: boolean;
|
|
1233
|
+
size: GridSize;
|
|
1234
|
+
stripedRows: boolean;
|
|
1235
|
+
showCellBorders: boolean;
|
|
1236
|
+
theme: ThemeMode;
|
|
1237
|
+
quickFilterText: string | null;
|
|
1238
|
+
advancedFilterModel: AdvancedFilterModel | null;
|
|
1239
|
+
masterDetail: boolean;
|
|
1240
|
+
detailRowHeight: number;
|
|
1241
|
+
detailRowRenderer?: (params: DetailRowRendererParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
|
|
1242
|
+
isRowExpandable?: (params: DetailRowRendererParams<TData>) => boolean;
|
|
1243
|
+
detailToggleColumn: boolean;
|
|
1244
|
+
columnMenu: boolean;
|
|
1245
|
+
aggFuncs?: Record<string, (values: any[]) => any>;
|
|
1246
|
+
components?: GridComponents;
|
|
1247
|
+
actionPolicy?: ActionPolicy<TData>;
|
|
1248
|
+
features: readonly GridFeature<TData>[];
|
|
1249
|
+
initialState?: GridStateInput;
|
|
1250
|
+
persistence: Required<Pick<GridPersistenceOptions, "key" | "debounceMs">> & Pick<GridPersistenceOptions, "sections" | "store"> | null;
|
|
1251
|
+
locale: MachTableLocale;
|
|
1252
|
+
editType: GridEditType;
|
|
1253
|
+
editableIndicator: EditableIndicator;
|
|
1254
|
+
rowEditValidator?: (params: RowEditValidationParams<TData>) => RowEditValidationResult | Promise<RowEditValidationResult>;
|
|
1255
|
+
singleClickEdit: boolean;
|
|
1256
|
+
manualSorting: boolean;
|
|
1257
|
+
manualFiltering: boolean;
|
|
1258
|
+
showSummary: boolean;
|
|
1259
|
+
summaryMethod?: (params: {
|
|
1260
|
+
colId: string;
|
|
1261
|
+
column: Column<any>;
|
|
1262
|
+
values: any[];
|
|
1263
|
+
}) => string;
|
|
1264
|
+
treeData: boolean;
|
|
1265
|
+
childrenKey: string;
|
|
1266
|
+
isTreeRowExpandable?: (params: Omit<TreeDataLoadParams<TData>, "signal">) => boolean;
|
|
1267
|
+
loadTreeChildren?: (params: TreeDataLoadParams<TData>) => Promise<readonly TData[]>;
|
|
1268
|
+
autoCheckedChildren: boolean;
|
|
1269
|
+
defaultExpandAll: boolean;
|
|
1270
|
+
indexOffset: number;
|
|
1271
|
+
applyRowDrag: boolean;
|
|
1272
|
+
undoStackSize: number;
|
|
1273
|
+
asyncTransactionWaitMillis: number;
|
|
1274
|
+
getRowHeight?: (params: GetRowHeightParams<TData>) => number;
|
|
1275
|
+
pinnedTopRowData: TData[];
|
|
1276
|
+
pinnedBottomRowData: TData[];
|
|
1277
|
+
paginationEnabled: boolean;
|
|
1278
|
+
paginationMode: "client" | "server";
|
|
1279
|
+
paginationPage: number;
|
|
1280
|
+
paginationTotal: number;
|
|
1281
|
+
paginationPageSize: number;
|
|
1282
|
+
paginationPageSizeOptions: number[];
|
|
1283
|
+
paginationShowTotal: boolean;
|
|
1284
|
+
paginationShowSizeSelector: boolean;
|
|
1285
|
+
watermarkEnabled: boolean;
|
|
1286
|
+
watermarkConfig: WatermarkConfig | null;
|
|
1287
|
+
suppressWarnings: boolean;
|
|
1288
|
+
enableRangeSelection: boolean;
|
|
1289
|
+
suppressClipboard: boolean;
|
|
1290
|
+
contextMenu: boolean;
|
|
1291
|
+
getContextMenuItems?: (params: ContextMenuParams<TData>) => ContextMenuItem[] | null;
|
|
1292
|
+
tooltipComponent?: (params: TooltipParams<TData>) => string | HTMLElement;
|
|
1293
|
+
tooltipShowDelay: number;
|
|
1294
|
+
flashCells: boolean;
|
|
1295
|
+
fillHandle: boolean;
|
|
1296
|
+
statusBarEnabled: boolean;
|
|
1297
|
+
statusBarPanels: StatusBarPanel[];
|
|
1298
|
+
datasource?: GridDatasource<TData>;
|
|
1299
|
+
datasourceMode: DatasourceMode;
|
|
1300
|
+
blockSize: number;
|
|
1301
|
+
infiniteBufferRows: number;
|
|
1302
|
+
maxBlocksInCache: number;
|
|
1303
|
+
datasourceMaxConcurrentRequests: number;
|
|
1304
|
+
blockPrefetch: number;
|
|
1305
|
+
datasourceRowCount: number | null;
|
|
1306
|
+
dataProcessor?: GridDataProcessor<TData>;
|
|
1307
|
+
dataProcessorMinRows: number;
|
|
1308
|
+
datasourceRetryCount: number;
|
|
1309
|
+
datasourceRetryDelay: number;
|
|
1310
|
+
datasourceRetryJitter: number;
|
|
1311
|
+
suppressCellFocus: boolean;
|
|
1312
|
+
suppressRowHoverHighlight: boolean;
|
|
1313
|
+
suppressNoRowsOverlay: boolean;
|
|
1314
|
+
suppressHeaderFocus: boolean;
|
|
1315
|
+
ariaLabel: string;
|
|
1316
|
+
ariaLabelledBy: string;
|
|
1317
|
+
ariaDescribedBy: string;
|
|
1318
|
+
loading: boolean;
|
|
1319
|
+
error: unknown | null;
|
|
1320
|
+
overlayNoRowsTemplate: OverlayTemplate;
|
|
1321
|
+
overlayLoadingTemplate: OverlayTemplate;
|
|
1322
|
+
overlayErrorTemplate: OverlayTemplate;
|
|
1323
|
+
allowUnsafeOverlayHtml: boolean;
|
|
1324
|
+
className: string;
|
|
1325
|
+
}
|
|
1408
1326
|
|
|
1409
|
-
export { type
|
|
1327
|
+
export { type DateFilterMatch as $, type AdvancedFilterCondition as A, type CellClickEvent as B, type ColDef as C, type CellContextMenuEvent as D, type CellDoubleClickEvent as E, type FilterModel as F, type GridOptions as G, type CellEditingStartedEvent as H, type CellEditingStoppedEvent as I, type CellEditorFactory as J, type CellEditorParams as K, type CellRendererOutput as L, type CellStyleRule as M, type CellValueChangedEvent as N, type ColDefOrGroup as O, type ColumnLayoutMode as P, type ColumnMovedEvent as Q, type ColumnResizedEvent as R, type SaveChangeConflict as S, type ColumnVisibilityChangedEvent as T, type ColumnWorkbenchItem as U, type ContextMenuItem as V, type ContextMenuParams as W, type CsvExportParams as X, DEFAULT_LOCALE as Y, type DatasourceMode as Z, type DateFilterCondition as _, type GridEventType as a, type RangeSelectionChangedEvent as a$, type DetailRowRendererParams as a0, type DetailToggledEvent as a1, type DirtyStateChangedEvent as a2, type DomLayoutMode as a3, EVENT_TYPES as a4, type EditableIndicator as a5, type EditableParams as a6, type EventHandlers as a7, type FilterChangedEvent as a8, type FilterType as a9, type GridPerformanceSnapshot as aA, type GridPersistenceOptions as aB, type GridReadyEvent as aC, type GridRowsApi as aD, type GridSelectionApi as aE, type GridSortingApi as aF, type GridStateApi as aG, type GridStateSection as aH, type GridUpdateSchedulerSnapshot as aI, type GridViewApi as aJ, type HeaderComponentParams as aK, type ICellEditor as aL, type ICellRendererResult as aM, type ImportCsvOptions as aN, type InfiniteGetRowsParams as aO, LOCALE_EN as aP, type MachTableLocale as aQ, type MachTableLocaleKey as aR, type ModelUpdatedEvent as aS, type NumberFilterCondition as aT, type NumberFilterMatch as aU, type OverlayContent as aV, type OverlayTemplate as aW, type PaginationChangedEvent as aX, type PaginationConfig as aY, type PinnedDirection as aZ, type PrintOptions as a_, type GetRowHeightParams as aa, type GridAsyncOptions as ab, type GridBatchSaveResult as ac, type GridCellChange as ad, type GridCellRange as ae, type GridColumnsApi as af, type GridDataProcessor as ag, type GridDataProcessorColumn as ah, type GridDataProcessorRequest as ai, type GridDataProcessorResult as aj, type GridDataProcessorRow as ak, type GridDatasource as al, type GridDiagnosticError as am, type GridDiagnostics as an, type GridDiagnosticsApi as ao, type GridEditType as ap, type GridEditingApi as aq, type GridErrorCode as ar, type GridErrorEvent as as, type GridEventBase as at, type GridEventMap as au, type GridFeatureContext as av, type GridFilteringApi as aw, type GridHierarchyApi as ax, type GridIoApi as ay, type GridPaginationApi as az, type GridComponents as b, type RefreshCellsParams as b0, type RemoteBlockCacheSnapshot as b1, type ResolvedGridOptions as b2, type RowClickEvent as b3, type RowDragEndEvent as b4, type RowEditChange as b5, type RowEditValidationParams as b6, type RowEditValidationResult as b7, type RowEditingStartedEvent as b8, type RowEditingStoppedEvent as b9, formatText as bA, formatTwo as bB, isColDefGroup as bC, matchLocaleKey as bD, type RowNode as ba, type RowSelectionMode as bb, type RowTransaction as bc, type SaveChangeIssue as bd, type SaveChangesHandler as be, type SaveChangesResult as bf, type SelectEditorParams as bg, type SelectionChangedEvent as bh, type SetFilterCondition as bi, type SetFilterParams as bj, type SortChangedEvent as bk, type SortDirection as bl, type SortModelItem as bm, type StatusBarConfig as bn, type StatusBarPanel as bo, type TextFilterCondition as bp, type TextFilterMatch as bq, type ThemeMode as br, type TooltipParams as bs, type TreeChildrenLoadFailedEvent as bt, type TreeChildrenLoadedEvent as bu, type TreeDataLoadParams as bv, type ValueFormatterParams as bw, type ValueGetterParams as bx, type ValueSetterParams as by, type WatermarkConfig as bz, type GridApi as c, type ColumnFilter as d, type AdvancedFilterNode as e, type AdvancedFilterGroup as f, type AdvancedFilterModel as g, type GridFeature as h, type ColDefGroup as i, type GridStateStore as j, type GridState as k, type GridStateInput as l, type GridSize as m, type CellRendererParams as n, type GridChange as o, type CellRendererFn as p, type FieldPath as q, type FieldPathValue as r, type ColumnState as s, type SortModel as t, type ActionPolicy as u, type ActionPolicyContext as v, type ApplyGridStateOptions as w, type CellAlign as x, type CellClassParams as y, type CellClassRule as z };
|