@rozie-ui/data-table-lit 0.2.7 → 0.3.1

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/dist/index.d.cts CHANGED
@@ -120,13 +120,17 @@ declare class DataTable extends DataTable_base {
120
120
  */
121
121
  undoLimit: number;
122
122
  /**
123
- * Opt-in vertical **row windowing**. When `true`, only the visible slice of rows renders inside a bounded `rdt-scroll` container (with leading/trailing spacer rows preserving total scroll height), windowing over the full filtered + sorted (pre-pagination) model and suppressing the client pagination chrome. Default `false` is byte-identical to a non-virtual table.
123
+ * Opt-in windowing grammar: `false` (default, off — byte-identical to a non-virtual table) | `true` or `'rows'` (vertical row windowing; `true` is byte-behavior-identical to every existing consumer, zero churn) | `'columns'` (horizontal column windowing) | `'both'` (both axes windowed). Row windowing renders only the visible slice of rows inside a bounded `rdt-scroll` container (with leading/trailing spacer rows preserving total scroll height), windowing over the full filtered + sorted (pre-pagination) model and suppressing the client pagination chrome. Column windowing renders only the visible slice of leaf columns inside the same `rdt-scroll` container. An unrecognised string behaves as `false`.
124
124
  */
125
- virtual: boolean;
125
+ virtual: boolean | string;
126
126
  /**
127
- * Estimated row height (px) seeding the windowing engine before `measureElement` refines actual heights. Only consulted when `virtual` is on.
127
+ * Estimated row height (px) — the first-paint seed for the windowing engine before any row has been measured. Only consulted when rows are windowed. When `autoMeasure` is `true`, later renders progressively refine the estimate from measured content; when `autoMeasure` is `false` this remains the explicit override for every render.
128
128
  */
129
129
  estimateRowHeight: number;
130
+ /**
131
+ * Opt-in content-driven row-size estimation. When `true`, the windowing engine feeds `estimateSize()` a running mean of measured row heights instead of the fixed `estimateRowHeight` seed, so `getTotalSize()` converges to the true content total on a large table with variable-height rows. Falls back to `estimateRowHeight` before any row has been measured. Default `false` keeps the estimate fixed at `estimateRowHeight` for every render (today's behavior).
132
+ */
133
+ autoMeasure: boolean;
130
134
  /**
131
135
  * A CSS length string bounding the `rdt-scroll` container when `virtual` is on (e.g. `'400px'`). Mirrored to the `--rozie-data-table-max-height` custom property; the prop wins, the token is the fallback.
132
136
  */
@@ -249,7 +253,11 @@ declare class DataTable extends DataTable_base {
249
253
  virtualizer: any;
250
254
  virtualizerCleanup: any;
251
255
  gridScrollEl: any;
256
+ colVirtualizer: any;
257
+ colVirtualizerCleanup: any;
252
258
  remeasurePending: boolean;
259
+ remeasureRaf: any;
260
+ remeasureDisposed: boolean;
253
261
  GRID_PAGE_STEP: number;
254
262
  gridRoot: any;
255
263
  programmatic: number;
@@ -263,8 +271,6 @@ declare class DataTable extends DataTable_base {
263
271
  effectiveColumnPinning: () => any;
264
272
  currentState: () => any;
265
273
  currentData: () => any;
266
- isSafeKey: (k: any) => boolean;
267
- wrapAggregationFn: (fn: any) => string | ((columnId: any, leafRows: any, childRows: any) => any);
268
274
  buildConfigDef: (c: any) => {
269
275
  id: string;
270
276
  header: any;
@@ -299,13 +305,15 @@ declare class DataTable extends DataTable_base {
299
305
  };
300
306
  columns?: undefined;
301
307
  };
308
+ columnDefsCache: any[] | null;
309
+ columnDefsCacheColumnsRef: any;
310
+ columnDefsCacheColRegRef: any;
302
311
  columnDefs: () => any[];
303
312
  SELECT_COL_ID: string;
304
313
  EXPANDER_COL_ID: string;
305
314
  selectionEnabled: () => boolean;
306
315
  tableColumns: () => any[];
307
316
  writeSorting: (next: any) => void;
308
- applyUpdater: (updater: any, current: any) => any;
309
317
  writeExpanded: (next: any) => void;
310
318
  writeGrouping: (next: any) => void;
311
319
  writeGlobalFilter: (next: any) => void;
@@ -340,12 +348,39 @@ declare class DataTable extends DataTable_base {
340
348
  onColumnOrderChangeCb: (updater: any) => void;
341
349
  onColumnPinningChangeCb: (updater: any) => void;
342
350
  onColumnSizingInfoChangeCb: (updater: any) => void;
351
+ resolveVirtual: () => "rows" | "columns" | "both" | "off";
352
+ rowsWindowed: () => boolean;
353
+ colsWindowed: () => boolean;
354
+ isWindowed: () => boolean;
355
+ autoMeasureOn: () => boolean;
356
+ columnCount: () => number;
357
+ columnSize: (i: number) => number;
358
+ forcedColumns: () => number[];
359
+ windowedCells: (row: any) => any;
343
360
  windowSource: () => any;
344
361
  scheduleRemeasure: () => void;
362
+ teardownRemeasure: () => void;
345
363
  pinnedEditIndex: () => any;
346
364
  pinnedMeasurement: (pin: any) => any;
347
365
  remeasureWindow: () => void;
348
366
  virtualItemKey: (i: any) => any;
367
+ COL_OVERSCAN: number;
368
+ colRtlObserver: any;
369
+ colRtlObserverEl: any;
370
+ isColRtl: () => boolean;
371
+ ensureColRtlWatch: () => void;
372
+ teardownColRtlWatch: () => void;
373
+ columnVirtualizerOptions: () => any;
374
+ measuredRowTotal: number;
375
+ measuredRowCount: number;
376
+ lastFedRowEstimate: number;
377
+ foldedRowHeights: Record<number, number>;
378
+ windowVerBumpPending: boolean;
379
+ bumpWindowVer: () => void;
380
+ ESTIMATE_REFEED_DELTA_PX: number;
381
+ estimateRowSize: (i: number) => number;
382
+ foldMeasuredRow: (index: number, height: number) => void;
383
+ refineRowEstimate: () => void;
349
384
  virtualizerOptions: () => any;
350
385
  pinMeasurement: (pin: number) => {
351
386
  start: number;
@@ -358,6 +393,11 @@ declare class DataTable extends DataTable_base {
358
393
  padBottom: () => number;
359
394
  pmIndexInWindow: (items: any, idx: any) => boolean;
360
395
  rowIsOutsideWindow: (r: any) => boolean;
396
+ windowedColIndices: () => any;
397
+ colPadLeft: () => any;
398
+ colPadRight: () => number;
399
+ colIsOutsideWindow: (c: any) => boolean;
400
+ afterRowRemeasure: () => void;
361
401
  announceState: {
362
402
  sorting: unknown;
363
403
  columnFilters: unknown;
@@ -467,7 +507,6 @@ declare class DataTable extends DataTable_base {
467
507
  bodyAriaRowIndex: (row: any) => number;
468
508
  visibleColCount: () => any;
469
509
  bodyRowCount: () => number;
470
- clamp: (v: any, lo: any, hi: any) => any;
471
510
  headerLeafLevel: () => number;
472
511
  headerCountAtLevel: (level: any) => any;
473
512
  headerAt: (level: any, colIndex: any) => any;
@@ -491,7 +530,6 @@ declare class DataTable extends DataTable_base {
491
530
  col: number;
492
531
  };
493
532
  currentCellEl: () => any;
494
- focusables: (cellEl: any) => any[];
495
533
  enterControl: () => void;
496
534
  cycleWithinCell: (cellEl: any, forward: any) => void;
497
535
  onGridKeyDown: (e: any) => void;
@@ -502,6 +540,9 @@ declare class DataTable extends DataTable_base {
502
540
  onGridFocusOut: (e: any) => void;
503
541
  recoverGridFocus: (rowKey: any, col: any, level: any, guardMoved?: boolean) => void;
504
542
  clampActiveCell: (rowCount: any, colCount: any) => void;
543
+ windowedHeadersFor: (hg: any, hgLevel: any) => any;
544
+ windowedColSpan: () => any;
545
+ remeasureColumnWindow: () => void;
505
546
  gridEmptyFallback: boolean;
506
547
  rangeTransition: boolean;
507
548
  rangeClickPending: boolean;
@@ -533,9 +574,7 @@ declare class DataTable extends DataTable_base {
533
574
  c0: any;
534
575
  c1: any;
535
576
  };
536
- escapeTsvField: (s: any) => any;
537
577
  rangeToTsv: () => string;
538
- parseTsv: (text: any) => any[];
539
578
  copyRange: () => void;
540
579
  applyGridToRange: (grid: any, originRow: any, originCol: any) => {
541
580
  wrote: number;
@@ -543,15 +582,20 @@ declare class DataTable extends DataTable_base {
543
582
  };
544
583
  rowOriginalAt: (rowIndex: any) => any;
545
584
  rowIdAt: (rowIndex: any) => any;
546
- tileGridToBox: (grid: any, box: any) => any;
547
585
  pasteRange: () => void;
548
586
  cutRange: () => void;
549
587
  clearActiveRange: () => void;
550
- tileIndex: (i: any, lo: any, hi: any) => any;
551
588
  fillRange: (sourceBox: any, endCell: any) => void;
552
589
  fillDragging: boolean;
553
590
  fillDragMove: any;
554
591
  fillDragUp: any;
592
+ fillEdgeScrollRaf: any;
593
+ FILL_EDGE_SCROLL_PX: number;
594
+ FILL_EDGE_SCROLL_STEP: number;
595
+ edgeDelta: (clientX: any, clientY: any) => {
596
+ dx: number;
597
+ dy: number;
598
+ };
555
599
  teardownFillDrag: () => void;
556
600
  cellIndexFromPoint: (clientX: any, clientY: any) => {
557
601
  r: number;
@@ -570,7 +614,6 @@ declare class DataTable extends DataTable_base {
570
614
  cellAriaInvalid: (rowIndex: any, colIndex: any) => "true" | null;
571
615
  runValidator: (colId: any, value: any, row: any) => string | true;
572
616
  setInvalid: (msg: any) => void;
573
- replaceRowValue: (rows: any, rowIndex: any, field: any, value: any) => any[];
574
617
  sourceIndexOfRow: (visibleRowIndex: any) => any;
575
618
  editingColumnId: () => any;
576
619
  editingColumnField: () => any;
@@ -582,7 +625,6 @@ declare class DataTable extends DataTable_base {
582
625
  cellValueAt: (rowIndex: any, colIndex: any) => any;
583
626
  beginEdit: (rowIndex: any, colIndex: any, seed: any) => void;
584
627
  focusCellWhenReady: (row: any, col: any) => void;
585
- indexOfRowIn: (rows: any, rowOriginal: any, rowId: any) => number;
586
628
  endEdit: () => void;
587
629
  endRowEdit: () => void;
588
630
  editorAutofocusFor: (colId: any, rowIndex: any) => boolean;
@@ -595,7 +637,6 @@ declare class DataTable extends DataTable_base {
595
637
  beginRowEdit: (row: any) => void;
596
638
  commitRow: () => boolean;
597
639
  cancelRow: () => void;
598
- replaceRowValues: (rows: any, rowIndex: any, fieldValues: any) => any[];
599
640
  nextEditableCell: (fromRow: any, fromCol: any) => {
600
641
  row: any;
601
642
  col: any;
package/dist/index.d.mts CHANGED
@@ -120,13 +120,17 @@ declare class DataTable extends DataTable_base {
120
120
  */
121
121
  undoLimit: number;
122
122
  /**
123
- * Opt-in vertical **row windowing**. When `true`, only the visible slice of rows renders inside a bounded `rdt-scroll` container (with leading/trailing spacer rows preserving total scroll height), windowing over the full filtered + sorted (pre-pagination) model and suppressing the client pagination chrome. Default `false` is byte-identical to a non-virtual table.
123
+ * Opt-in windowing grammar: `false` (default, off — byte-identical to a non-virtual table) | `true` or `'rows'` (vertical row windowing; `true` is byte-behavior-identical to every existing consumer, zero churn) | `'columns'` (horizontal column windowing) | `'both'` (both axes windowed). Row windowing renders only the visible slice of rows inside a bounded `rdt-scroll` container (with leading/trailing spacer rows preserving total scroll height), windowing over the full filtered + sorted (pre-pagination) model and suppressing the client pagination chrome. Column windowing renders only the visible slice of leaf columns inside the same `rdt-scroll` container. An unrecognised string behaves as `false`.
124
124
  */
125
- virtual: boolean;
125
+ virtual: boolean | string;
126
126
  /**
127
- * Estimated row height (px) seeding the windowing engine before `measureElement` refines actual heights. Only consulted when `virtual` is on.
127
+ * Estimated row height (px) — the first-paint seed for the windowing engine before any row has been measured. Only consulted when rows are windowed. When `autoMeasure` is `true`, later renders progressively refine the estimate from measured content; when `autoMeasure` is `false` this remains the explicit override for every render.
128
128
  */
129
129
  estimateRowHeight: number;
130
+ /**
131
+ * Opt-in content-driven row-size estimation. When `true`, the windowing engine feeds `estimateSize()` a running mean of measured row heights instead of the fixed `estimateRowHeight` seed, so `getTotalSize()` converges to the true content total on a large table with variable-height rows. Falls back to `estimateRowHeight` before any row has been measured. Default `false` keeps the estimate fixed at `estimateRowHeight` for every render (today's behavior).
132
+ */
133
+ autoMeasure: boolean;
130
134
  /**
131
135
  * A CSS length string bounding the `rdt-scroll` container when `virtual` is on (e.g. `'400px'`). Mirrored to the `--rozie-data-table-max-height` custom property; the prop wins, the token is the fallback.
132
136
  */
@@ -249,7 +253,11 @@ declare class DataTable extends DataTable_base {
249
253
  virtualizer: any;
250
254
  virtualizerCleanup: any;
251
255
  gridScrollEl: any;
256
+ colVirtualizer: any;
257
+ colVirtualizerCleanup: any;
252
258
  remeasurePending: boolean;
259
+ remeasureRaf: any;
260
+ remeasureDisposed: boolean;
253
261
  GRID_PAGE_STEP: number;
254
262
  gridRoot: any;
255
263
  programmatic: number;
@@ -263,8 +271,6 @@ declare class DataTable extends DataTable_base {
263
271
  effectiveColumnPinning: () => any;
264
272
  currentState: () => any;
265
273
  currentData: () => any;
266
- isSafeKey: (k: any) => boolean;
267
- wrapAggregationFn: (fn: any) => string | ((columnId: any, leafRows: any, childRows: any) => any);
268
274
  buildConfigDef: (c: any) => {
269
275
  id: string;
270
276
  header: any;
@@ -299,13 +305,15 @@ declare class DataTable extends DataTable_base {
299
305
  };
300
306
  columns?: undefined;
301
307
  };
308
+ columnDefsCache: any[] | null;
309
+ columnDefsCacheColumnsRef: any;
310
+ columnDefsCacheColRegRef: any;
302
311
  columnDefs: () => any[];
303
312
  SELECT_COL_ID: string;
304
313
  EXPANDER_COL_ID: string;
305
314
  selectionEnabled: () => boolean;
306
315
  tableColumns: () => any[];
307
316
  writeSorting: (next: any) => void;
308
- applyUpdater: (updater: any, current: any) => any;
309
317
  writeExpanded: (next: any) => void;
310
318
  writeGrouping: (next: any) => void;
311
319
  writeGlobalFilter: (next: any) => void;
@@ -340,12 +348,39 @@ declare class DataTable extends DataTable_base {
340
348
  onColumnOrderChangeCb: (updater: any) => void;
341
349
  onColumnPinningChangeCb: (updater: any) => void;
342
350
  onColumnSizingInfoChangeCb: (updater: any) => void;
351
+ resolveVirtual: () => "rows" | "columns" | "both" | "off";
352
+ rowsWindowed: () => boolean;
353
+ colsWindowed: () => boolean;
354
+ isWindowed: () => boolean;
355
+ autoMeasureOn: () => boolean;
356
+ columnCount: () => number;
357
+ columnSize: (i: number) => number;
358
+ forcedColumns: () => number[];
359
+ windowedCells: (row: any) => any;
343
360
  windowSource: () => any;
344
361
  scheduleRemeasure: () => void;
362
+ teardownRemeasure: () => void;
345
363
  pinnedEditIndex: () => any;
346
364
  pinnedMeasurement: (pin: any) => any;
347
365
  remeasureWindow: () => void;
348
366
  virtualItemKey: (i: any) => any;
367
+ COL_OVERSCAN: number;
368
+ colRtlObserver: any;
369
+ colRtlObserverEl: any;
370
+ isColRtl: () => boolean;
371
+ ensureColRtlWatch: () => void;
372
+ teardownColRtlWatch: () => void;
373
+ columnVirtualizerOptions: () => any;
374
+ measuredRowTotal: number;
375
+ measuredRowCount: number;
376
+ lastFedRowEstimate: number;
377
+ foldedRowHeights: Record<number, number>;
378
+ windowVerBumpPending: boolean;
379
+ bumpWindowVer: () => void;
380
+ ESTIMATE_REFEED_DELTA_PX: number;
381
+ estimateRowSize: (i: number) => number;
382
+ foldMeasuredRow: (index: number, height: number) => void;
383
+ refineRowEstimate: () => void;
349
384
  virtualizerOptions: () => any;
350
385
  pinMeasurement: (pin: number) => {
351
386
  start: number;
@@ -358,6 +393,11 @@ declare class DataTable extends DataTable_base {
358
393
  padBottom: () => number;
359
394
  pmIndexInWindow: (items: any, idx: any) => boolean;
360
395
  rowIsOutsideWindow: (r: any) => boolean;
396
+ windowedColIndices: () => any;
397
+ colPadLeft: () => any;
398
+ colPadRight: () => number;
399
+ colIsOutsideWindow: (c: any) => boolean;
400
+ afterRowRemeasure: () => void;
361
401
  announceState: {
362
402
  sorting: unknown;
363
403
  columnFilters: unknown;
@@ -467,7 +507,6 @@ declare class DataTable extends DataTable_base {
467
507
  bodyAriaRowIndex: (row: any) => number;
468
508
  visibleColCount: () => any;
469
509
  bodyRowCount: () => number;
470
- clamp: (v: any, lo: any, hi: any) => any;
471
510
  headerLeafLevel: () => number;
472
511
  headerCountAtLevel: (level: any) => any;
473
512
  headerAt: (level: any, colIndex: any) => any;
@@ -491,7 +530,6 @@ declare class DataTable extends DataTable_base {
491
530
  col: number;
492
531
  };
493
532
  currentCellEl: () => any;
494
- focusables: (cellEl: any) => any[];
495
533
  enterControl: () => void;
496
534
  cycleWithinCell: (cellEl: any, forward: any) => void;
497
535
  onGridKeyDown: (e: any) => void;
@@ -502,6 +540,9 @@ declare class DataTable extends DataTable_base {
502
540
  onGridFocusOut: (e: any) => void;
503
541
  recoverGridFocus: (rowKey: any, col: any, level: any, guardMoved?: boolean) => void;
504
542
  clampActiveCell: (rowCount: any, colCount: any) => void;
543
+ windowedHeadersFor: (hg: any, hgLevel: any) => any;
544
+ windowedColSpan: () => any;
545
+ remeasureColumnWindow: () => void;
505
546
  gridEmptyFallback: boolean;
506
547
  rangeTransition: boolean;
507
548
  rangeClickPending: boolean;
@@ -533,9 +574,7 @@ declare class DataTable extends DataTable_base {
533
574
  c0: any;
534
575
  c1: any;
535
576
  };
536
- escapeTsvField: (s: any) => any;
537
577
  rangeToTsv: () => string;
538
- parseTsv: (text: any) => any[];
539
578
  copyRange: () => void;
540
579
  applyGridToRange: (grid: any, originRow: any, originCol: any) => {
541
580
  wrote: number;
@@ -543,15 +582,20 @@ declare class DataTable extends DataTable_base {
543
582
  };
544
583
  rowOriginalAt: (rowIndex: any) => any;
545
584
  rowIdAt: (rowIndex: any) => any;
546
- tileGridToBox: (grid: any, box: any) => any;
547
585
  pasteRange: () => void;
548
586
  cutRange: () => void;
549
587
  clearActiveRange: () => void;
550
- tileIndex: (i: any, lo: any, hi: any) => any;
551
588
  fillRange: (sourceBox: any, endCell: any) => void;
552
589
  fillDragging: boolean;
553
590
  fillDragMove: any;
554
591
  fillDragUp: any;
592
+ fillEdgeScrollRaf: any;
593
+ FILL_EDGE_SCROLL_PX: number;
594
+ FILL_EDGE_SCROLL_STEP: number;
595
+ edgeDelta: (clientX: any, clientY: any) => {
596
+ dx: number;
597
+ dy: number;
598
+ };
555
599
  teardownFillDrag: () => void;
556
600
  cellIndexFromPoint: (clientX: any, clientY: any) => {
557
601
  r: number;
@@ -570,7 +614,6 @@ declare class DataTable extends DataTable_base {
570
614
  cellAriaInvalid: (rowIndex: any, colIndex: any) => "true" | null;
571
615
  runValidator: (colId: any, value: any, row: any) => string | true;
572
616
  setInvalid: (msg: any) => void;
573
- replaceRowValue: (rows: any, rowIndex: any, field: any, value: any) => any[];
574
617
  sourceIndexOfRow: (visibleRowIndex: any) => any;
575
618
  editingColumnId: () => any;
576
619
  editingColumnField: () => any;
@@ -582,7 +625,6 @@ declare class DataTable extends DataTable_base {
582
625
  cellValueAt: (rowIndex: any, colIndex: any) => any;
583
626
  beginEdit: (rowIndex: any, colIndex: any, seed: any) => void;
584
627
  focusCellWhenReady: (row: any, col: any) => void;
585
- indexOfRowIn: (rows: any, rowOriginal: any, rowId: any) => number;
586
628
  endEdit: () => void;
587
629
  endRowEdit: () => void;
588
630
  editorAutofocusFor: (colId: any, rowIndex: any) => boolean;
@@ -595,7 +637,6 @@ declare class DataTable extends DataTable_base {
595
637
  beginRowEdit: (row: any) => void;
596
638
  commitRow: () => boolean;
597
639
  cancelRow: () => void;
598
- replaceRowValues: (rows: any, rowIndex: any, fieldValues: any) => any[];
599
640
  nextEditableCell: (fromRow: any, fromCol: any) => {
600
641
  row: any;
601
642
  col: any;