@vueye-table/headless 3.0.0-alpha.1 → 3.0.0-alpha.10

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.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { AnyDataTableBinding, DataGridBinding, DataTableBinding } from "@vueye-table/vue";
2
- import { PropType, SlotsType, VNode, VNodeChild } from "vue";
3
- import { GridDirection, PageItem, SelectionCoverage, SortInfo, TableColumn, TableRow } from "@vueye-table/core";
1
+ import { AnyDataTableBinding, DataGridBinding, DataTableBinding, RowDraft, VirtualBinding, VirtualColumnItem, VirtualRowItem } from "@vueye-table/vue";
2
+ import { PropType, SlotsType, VNode, VNodeChild, shallowRef } from "vue";
3
+ import { EditResult, EditorSpec, LoadState, PageItem, RowKey, SelectionCoverage, SortInfo, TableColumn, TableIssue, TableRow } from "@vueye-table/core";
4
4
  //#region src/controls.d.ts
5
5
  /**
6
6
  * Selects or clears every row in the table's select-all scope. It shows the indeterminate state
@@ -56,6 +56,7 @@ declare const DataTableSelectRow: import("vue").DefineComponent<import("vue").Ex
56
56
  }, SlotsType<{
57
57
  default?: (props: {
58
58
  selected: boolean;
59
+ indeterminate: boolean;
59
60
  toggle: () => void;
60
61
  }) => VNode[];
61
62
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -197,6 +198,21 @@ declare const DataTableColumnVisibility: import("vue").DefineComponent<import("v
197
198
  * A polite live region describing what is shown, such as "1–10 of 57 rows". Screen readers
198
199
  * announce it after a search, filter, or page change.
199
200
  */
201
+ interface TableStatusSlotProps {
202
+ readonly start: number;
203
+ readonly end: number;
204
+ readonly rowCount: number;
205
+ readonly totalRowCount: number;
206
+ readonly selectedCount: number;
207
+ readonly loadState: LoadState;
208
+ readonly loadedRowCount: number;
209
+ readonly loadError: TableIssue | undefined;
210
+ readonly canLoadMore: boolean;
211
+ readonly retry: () => void;
212
+ readonly loadNext: () => Promise<void>;
213
+ readonly loadingChildrenCount: number;
214
+ readonly childErrorCount: number;
215
+ }
200
216
  declare const DataTableStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
201
217
  as: {
202
218
  readonly type: StringConstructor;
@@ -212,19 +228,531 @@ declare const DataTableStatus: import("vue").DefineComponent<import("vue").Extra
212
228
  }>> & Readonly<{}>, {
213
229
  as: string;
214
230
  }, SlotsType<{
215
- default?: (props: {
216
- start: number;
217
- end: number;
218
- rowCount: number;
219
- totalRowCount: number;
220
- selectedCount: number;
221
- }) => VNode[];
231
+ default?: (props: TableStatusSlotProps) => VNode[];
222
232
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
223
233
  //#endregion
234
+ //#region src/loading.d.ts
235
+ /** A keyboard-accessible alternative to automatic virtual-end loading, with error recovery. */
236
+ declare const DataTableLoadMore: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
237
+ label: {
238
+ type: StringConstructor;
239
+ default: string;
240
+ };
241
+ retryLabel: {
242
+ type: StringConstructor;
243
+ default: string;
244
+ };
245
+ loadingLabel: {
246
+ type: StringConstructor;
247
+ default: string;
248
+ };
249
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
250
+ [key: string]: any;
251
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
252
+ label: {
253
+ type: StringConstructor;
254
+ default: string;
255
+ };
256
+ retryLabel: {
257
+ type: StringConstructor;
258
+ default: string;
259
+ };
260
+ loadingLabel: {
261
+ type: StringConstructor;
262
+ default: string;
263
+ };
264
+ }>> & Readonly<{}>, {
265
+ label: string;
266
+ retryLabel: string;
267
+ loadingLabel: string;
268
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
269
+ //#endregion
270
+ //#region src/editor.d.ts
271
+ /** Shared by native editors and application-owned editor slots. */
272
+ interface CellEditorSlotProps {
273
+ readonly row: TableRow<unknown>;
274
+ readonly column: TableColumn<unknown>;
275
+ readonly value: unknown;
276
+ readonly draft: string;
277
+ readonly spec: EditorSpec;
278
+ readonly finish: (direction?: "up" | "down" | "left" | "right") => void;
279
+ readonly input: (text: string) => void;
280
+ /** Alias retained for existing headless grid slots. */
281
+ readonly update: (text: string) => void;
282
+ /** Strings pass through parse; typed values use core's value-edit path. */
283
+ readonly commit: (value?: unknown) => EditResult<unknown> | Promise<EditResult<unknown>> | undefined;
284
+ readonly cancel: () => void;
285
+ readonly issues: readonly TableIssue[];
286
+ readonly pending: boolean;
287
+ /** Bind to a custom field to associate its validation message. */
288
+ readonly attrs: Readonly<Record<string, string | undefined>>;
289
+ }
290
+ declare const cellEditorProps: {
291
+ readonly editor: {
292
+ readonly type: PropType<CellEditorSlotProps>;
293
+ readonly required: true;
294
+ };
295
+ readonly spec: {
296
+ readonly type: PropType<EditorSpec>;
297
+ readonly default: () => {
298
+ kind: string;
299
+ };
300
+ };
301
+ /** Keyboard movement is owned by the surrounding cell. */
302
+ readonly finish: {
303
+ readonly type: PropType<((direction?: "up" | "down" | "left" | "right") => void) | undefined>;
304
+ readonly default: undefined;
305
+ };
306
+ readonly autofocus: {
307
+ readonly type: BooleanConstructor;
308
+ readonly default: true;
309
+ };
310
+ readonly blurCommit: {
311
+ readonly type: BooleanConstructor;
312
+ readonly default: true;
313
+ };
314
+ readonly tabCommit: {
315
+ readonly type: BooleanConstructor;
316
+ readonly default: true;
317
+ };
318
+ };
319
+ /** Plain native fields. Select results are searched and capped at 50 mounted options. */
320
+ declare const DataCellEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
321
+ readonly editor: {
322
+ readonly type: PropType<CellEditorSlotProps>;
323
+ readonly required: true;
324
+ };
325
+ readonly spec: {
326
+ readonly type: PropType<EditorSpec>;
327
+ readonly default: () => {
328
+ kind: string;
329
+ };
330
+ };
331
+ /** Keyboard movement is owned by the surrounding cell. */
332
+ readonly finish: {
333
+ readonly type: PropType<((direction?: "up" | "down" | "left" | "right") => void) | undefined>;
334
+ readonly default: undefined;
335
+ };
336
+ readonly autofocus: {
337
+ readonly type: BooleanConstructor;
338
+ readonly default: true;
339
+ };
340
+ readonly blurCommit: {
341
+ readonly type: BooleanConstructor;
342
+ readonly default: true;
343
+ };
344
+ readonly tabCommit: {
345
+ readonly type: BooleanConstructor;
346
+ readonly default: true;
347
+ };
348
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
349
+ [key: string]: any;
350
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
351
+ readonly editor: {
352
+ readonly type: PropType<CellEditorSlotProps>;
353
+ readonly required: true;
354
+ };
355
+ readonly spec: {
356
+ readonly type: PropType<EditorSpec>;
357
+ readonly default: () => {
358
+ kind: string;
359
+ };
360
+ };
361
+ /** Keyboard movement is owned by the surrounding cell. */
362
+ readonly finish: {
363
+ readonly type: PropType<((direction?: "up" | "down" | "left" | "right") => void) | undefined>;
364
+ readonly default: undefined;
365
+ };
366
+ readonly autofocus: {
367
+ readonly type: BooleanConstructor;
368
+ readonly default: true;
369
+ };
370
+ readonly blurCommit: {
371
+ readonly type: BooleanConstructor;
372
+ readonly default: true;
373
+ };
374
+ readonly tabCommit: {
375
+ readonly type: BooleanConstructor;
376
+ readonly default: true;
377
+ };
378
+ }>> & Readonly<{}>, {
379
+ readonly spec: EditorSpec;
380
+ readonly finish: ((direction?: "up" | "down" | "left" | "right") => void) | undefined;
381
+ readonly autofocus: boolean;
382
+ readonly blurCommit: boolean;
383
+ readonly tabCommit: boolean;
384
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
385
+ //#endregion
224
386
  //#region src/shared.d.ts
225
387
  /** Columns of any row type; callbacks on a column make `TableColumn<unknown>` too narrow. */
226
388
  type AnyTableColumn = TableColumn<any>;
227
389
  //#endregion
390
+ //#region src/editing.d.ts
391
+ interface EditingContext {
392
+ readonly grid: DataGridBinding<unknown>;
393
+ readonly mode: "cell" | "row";
394
+ readonly draft: RowDraft<unknown> | undefined;
395
+ start(row: TableRow<unknown>): void;
396
+ save(): Promise<EditResult<unknown> | undefined>;
397
+ cancel(key: RowKey): void;
398
+ }
399
+ /** Renderless provider for editable data-table cells and row forms. */
400
+ declare const DataTableEditRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
401
+ table: {
402
+ type: PropType<AnyDataTableBinding>;
403
+ required: true;
404
+ };
405
+ mode: {
406
+ type: PropType<"cell" | "row">;
407
+ default: string;
408
+ };
409
+ }>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
410
+ save: (_result: EditResult<unknown>) => true;
411
+ cancel: (_key: RowKey) => true;
412
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
413
+ table: {
414
+ type: PropType<AnyDataTableBinding>;
415
+ required: true;
416
+ };
417
+ mode: {
418
+ type: PropType<"cell" | "row">;
419
+ default: string;
420
+ };
421
+ }>> & Readonly<{
422
+ onCancel?: (_key: RowKey) => any;
423
+ onSave?: (_result: EditResult<unknown>) => any;
424
+ }>, {
425
+ mode: "row" | "cell";
426
+ }, SlotsType<{
427
+ default?: (props: {
428
+ editing: EditingContext;
429
+ }) => VNodeChild;
430
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
431
+ /** A cell with on-demand editing; row mode shares one draft and one save operation. */
432
+ declare const DataTableEditCell: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
433
+ row: {
434
+ readonly type: PropType<TableRow<unknown>>;
435
+ readonly required: true;
436
+ };
437
+ column: {
438
+ readonly type: PropType<AnyTableColumn>;
439
+ readonly required: true;
440
+ };
441
+ rowIndex: {
442
+ type: PropType<number | undefined>;
443
+ default: undefined;
444
+ };
445
+ tree: {
446
+ type: BooleanConstructor;
447
+ default: boolean;
448
+ };
449
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
450
+ [key: string]: any;
451
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
452
+ save: (_result: EditResult<unknown>) => true;
453
+ cancel: (_key: RowKey) => true;
454
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
455
+ row: {
456
+ readonly type: PropType<TableRow<unknown>>;
457
+ readonly required: true;
458
+ };
459
+ column: {
460
+ readonly type: PropType<AnyTableColumn>;
461
+ readonly required: true;
462
+ };
463
+ rowIndex: {
464
+ type: PropType<number | undefined>;
465
+ default: undefined;
466
+ };
467
+ tree: {
468
+ type: BooleanConstructor;
469
+ default: boolean;
470
+ };
471
+ }>> & Readonly<{
472
+ onCancel?: (_key: RowKey) => any;
473
+ onSave?: (_result: EditResult<unknown>) => any;
474
+ }>, {
475
+ rowIndex: number | undefined;
476
+ tree: boolean;
477
+ }, SlotsType<{
478
+ default?: (props: {
479
+ row: TableRow<unknown>;
480
+ value: unknown;
481
+ display: string;
482
+ }) => VNodeChild;
483
+ editor?: (props: CellEditorSlotProps) => VNodeChild;
484
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
485
+ /** One active row form. Controls share the provider's draft and core save/undo path. */
486
+ declare const DataTableRowActions: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
487
+ row: {
488
+ readonly type: PropType<TableRow<unknown>>;
489
+ readonly required: true;
490
+ };
491
+ editable: {
492
+ type: BooleanConstructor;
493
+ default: boolean;
494
+ };
495
+ removable: {
496
+ type: BooleanConstructor;
497
+ default: boolean;
498
+ };
499
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
500
+ [key: string]: any;
501
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
502
+ row: {
503
+ readonly type: PropType<TableRow<unknown>>;
504
+ readonly required: true;
505
+ };
506
+ editable: {
507
+ type: BooleanConstructor;
508
+ default: boolean;
509
+ };
510
+ removable: {
511
+ type: BooleanConstructor;
512
+ default: boolean;
513
+ };
514
+ }>> & Readonly<{}>, {
515
+ editable: boolean;
516
+ removable: boolean;
517
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
518
+ //#endregion
519
+ //#region src/virtual.d.ts
520
+ interface ComponentVirtualOptions {
521
+ readonly rowHeight?: number | ((index: number) => number) | undefined;
522
+ readonly overscan?: number | undefined;
523
+ readonly initialCount?: number | undefined;
524
+ readonly columnWidth?: number | undefined;
525
+ readonly columnOverscan?: number | undefined;
526
+ readonly initialColumnCount?: number | undefined;
527
+ }
528
+ /** Shared opt-in renderer props. Options are applied when the virtual renderer is created. */
529
+ declare const virtualProps: {
530
+ readonly virtual: {
531
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
532
+ readonly default: false;
533
+ };
534
+ readonly height: {
535
+ readonly type: PropType<string | undefined>;
536
+ readonly default: undefined;
537
+ };
538
+ readonly rowHeight: {
539
+ readonly type: NumberConstructor;
540
+ readonly default: 40;
541
+ };
542
+ readonly overscan: {
543
+ readonly type: NumberConstructor;
544
+ readonly default: 5;
545
+ };
546
+ readonly virtualColumns: {
547
+ readonly type: BooleanConstructor;
548
+ readonly default: false;
549
+ };
550
+ readonly columnWidth: {
551
+ readonly type: NumberConstructor;
552
+ readonly default: 120;
553
+ };
554
+ };
555
+ interface ComponentVirtualBinding {
556
+ readonly rows: VirtualBinding<VirtualRowItem<unknown>>;
557
+ readonly columns: VirtualBinding<VirtualColumnItem<unknown>> | undefined;
558
+ readonly rowItems: readonly VirtualRowItem<unknown>[];
559
+ readonly columnItems: readonly VirtualColumnItem<unknown>[] | undefined;
560
+ readonly gutter: number;
561
+ }
562
+ declare function injectVirtual(): ComponentVirtualBinding | undefined;
563
+ /** A scroll container for a headless table/grid. It supplies its element without global reads. */
564
+ declare const DataTableViewport: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
565
+ as: {
566
+ readonly type: StringConstructor;
567
+ readonly default: string;
568
+ };
569
+ height: {
570
+ type: StringConstructor;
571
+ default: string;
572
+ };
573
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
574
+ [key: string]: any;
575
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
576
+ as: {
577
+ readonly type: StringConstructor;
578
+ readonly default: string;
579
+ };
580
+ height: {
581
+ type: StringConstructor;
582
+ default: string;
583
+ };
584
+ }>> & Readonly<{}>, {
585
+ as: string;
586
+ height: string;
587
+ }, SlotsType<{
588
+ default?: () => VNode[];
589
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
590
+ //#endregion
591
+ //#region src/hierarchy.d.ts
592
+ declare const hierarchyProps: {
593
+ readonly treeColumn: {
594
+ readonly type: PropType<string | undefined>;
595
+ readonly default: undefined;
596
+ };
597
+ readonly keepAliveDetail: {
598
+ readonly type: BooleanConstructor;
599
+ readonly default: false;
600
+ };
601
+ };
602
+ declare function resolveTreeColumn(table: AnyDataTableBinding, column?: string): string | undefined;
603
+ declare const expandToggleProps: {
604
+ readonly row: {
605
+ readonly type: PropType<TableRow<unknown>>;
606
+ readonly required: true;
607
+ };
608
+ readonly controls: {
609
+ readonly type: PropType<string | undefined>;
610
+ readonly default: undefined;
611
+ };
612
+ readonly expandLabel: {
613
+ readonly type: StringConstructor;
614
+ readonly default: "Expand row";
615
+ };
616
+ readonly collapseLabel: {
617
+ readonly type: StringConstructor;
618
+ readonly default: "Collapse row";
619
+ };
620
+ };
621
+ declare const treeCellProps: {
622
+ readonly row: {
623
+ readonly type: PropType<TableRow<unknown>>;
624
+ readonly required: true;
625
+ };
626
+ readonly as: {
627
+ readonly type: StringConstructor;
628
+ readonly default: string;
629
+ };
630
+ };
631
+ declare const DataTableExpandToggle: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
632
+ readonly row: {
633
+ readonly type: PropType<TableRow<unknown>>;
634
+ readonly required: true;
635
+ };
636
+ readonly controls: {
637
+ readonly type: PropType<string | undefined>;
638
+ readonly default: undefined;
639
+ };
640
+ readonly expandLabel: {
641
+ readonly type: StringConstructor;
642
+ readonly default: "Expand row";
643
+ };
644
+ readonly collapseLabel: {
645
+ readonly type: StringConstructor;
646
+ readonly default: "Collapse row";
647
+ };
648
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
649
+ [key: string]: any;
650
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
651
+ readonly row: {
652
+ readonly type: PropType<TableRow<unknown>>;
653
+ readonly required: true;
654
+ };
655
+ readonly controls: {
656
+ readonly type: PropType<string | undefined>;
657
+ readonly default: undefined;
658
+ };
659
+ readonly expandLabel: {
660
+ readonly type: StringConstructor;
661
+ readonly default: "Expand row";
662
+ };
663
+ readonly collapseLabel: {
664
+ readonly type: StringConstructor;
665
+ readonly default: "Collapse row";
666
+ };
667
+ }>> & Readonly<{}>, {
668
+ readonly controls: string | undefined;
669
+ readonly expandLabel: string;
670
+ readonly collapseLabel: string;
671
+ }, SlotsType<{
672
+ default?: (props: {
673
+ row: TableRow<unknown>;
674
+ expanded: boolean;
675
+ }) => VNodeChild;
676
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
677
+ declare const DataTableTreeCell: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
678
+ readonly row: {
679
+ readonly type: PropType<TableRow<unknown>>;
680
+ readonly required: true;
681
+ };
682
+ readonly as: {
683
+ readonly type: StringConstructor;
684
+ readonly default: string;
685
+ };
686
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
687
+ [key: string]: any;
688
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
689
+ readonly row: {
690
+ readonly type: PropType<TableRow<unknown>>;
691
+ readonly required: true;
692
+ };
693
+ readonly as: {
694
+ readonly type: StringConstructor;
695
+ readonly default: string;
696
+ };
697
+ }>> & Readonly<{}>, {
698
+ readonly as: string;
699
+ }, SlotsType<{
700
+ default?: () => VNodeChild;
701
+ toggle?: (props: {
702
+ row: TableRow<unknown>;
703
+ }) => VNodeChild;
704
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
705
+ /** One full-width detail; retained collapsed content remains hidden and unmeasured. */
706
+ declare const DataTableDetailRow: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
707
+ row: {
708
+ readonly type: PropType<TableRow<unknown>>;
709
+ readonly required: true;
710
+ };
711
+ colspan: {
712
+ type: NumberConstructor;
713
+ default: undefined;
714
+ };
715
+ hidden: {
716
+ type: BooleanConstructor;
717
+ default: boolean;
718
+ };
719
+ keepAlive: {
720
+ type: PropType<boolean | undefined>;
721
+ default: undefined;
722
+ };
723
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
724
+ [key: string]: any;
725
+ }> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
726
+ row: {
727
+ readonly type: PropType<TableRow<unknown>>;
728
+ readonly required: true;
729
+ };
730
+ colspan: {
731
+ type: NumberConstructor;
732
+ default: undefined;
733
+ };
734
+ hidden: {
735
+ type: BooleanConstructor;
736
+ default: boolean;
737
+ };
738
+ keepAlive: {
739
+ type: PropType<boolean | undefined>;
740
+ default: undefined;
741
+ };
742
+ }>> & Readonly<{}>, {
743
+ colspan: number;
744
+ hidden: boolean;
745
+ keepAlive: boolean | undefined;
746
+ }, SlotsType<{
747
+ default?: (props: {
748
+ row: TableRow<unknown>;
749
+ }) => VNodeChild;
750
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
751
+ interface DetailSlotProps {
752
+ readonly row: TableRow<unknown>;
753
+ readonly rowIndex: number;
754
+ }
755
+ //#endregion
228
756
  //#region src/grid.d.ts
229
757
  declare function cellId(gridId: string, row: number, column: number): string;
230
758
  /**
@@ -233,6 +761,43 @@ declare function cellId(gridId: string, row: number, column: number): string;
233
761
  * undo, redo, and clipboard copy, cut, and paste all work on the selected range.
234
762
  */
235
763
  declare const DataGridRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
764
+ /** Width reserved before data columns, for a row-number/header column. */
765
+ gutter: {
766
+ type: NumberConstructor;
767
+ default: number;
768
+ };
769
+ treeColumn: {
770
+ readonly type: PropType<string | undefined>;
771
+ readonly default: undefined;
772
+ };
773
+ keepAliveDetail: {
774
+ readonly type: BooleanConstructor;
775
+ readonly default: false;
776
+ };
777
+ virtual: {
778
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
779
+ readonly default: false;
780
+ };
781
+ height: {
782
+ readonly type: PropType<string | undefined>;
783
+ readonly default: undefined;
784
+ };
785
+ rowHeight: {
786
+ readonly type: NumberConstructor;
787
+ readonly default: 40;
788
+ };
789
+ overscan: {
790
+ readonly type: NumberConstructor;
791
+ readonly default: 5;
792
+ };
793
+ virtualColumns: {
794
+ readonly type: BooleanConstructor;
795
+ readonly default: false;
796
+ };
797
+ columnWidth: {
798
+ readonly type: NumberConstructor;
799
+ readonly default: 120;
800
+ };
236
801
  table: {
237
802
  type: PropType<AnyDataTableBinding>;
238
803
  required: true;
@@ -247,7 +812,47 @@ declare const DataGridRoot: import("vue").DefineComponent<import("vue").ExtractP
247
812
  };
248
813
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
249
814
  [key: string]: any;
250
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
815
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
816
+ save: (_result: unknown) => true;
817
+ cancel: (_key: string | number) => true;
818
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
819
+ /** Width reserved before data columns, for a row-number/header column. */
820
+ gutter: {
821
+ type: NumberConstructor;
822
+ default: number;
823
+ };
824
+ treeColumn: {
825
+ readonly type: PropType<string | undefined>;
826
+ readonly default: undefined;
827
+ };
828
+ keepAliveDetail: {
829
+ readonly type: BooleanConstructor;
830
+ readonly default: false;
831
+ };
832
+ virtual: {
833
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
834
+ readonly default: false;
835
+ };
836
+ height: {
837
+ readonly type: PropType<string | undefined>;
838
+ readonly default: undefined;
839
+ };
840
+ rowHeight: {
841
+ readonly type: NumberConstructor;
842
+ readonly default: 40;
843
+ };
844
+ overscan: {
845
+ readonly type: NumberConstructor;
846
+ readonly default: 5;
847
+ };
848
+ virtualColumns: {
849
+ readonly type: BooleanConstructor;
850
+ readonly default: false;
851
+ };
852
+ columnWidth: {
853
+ readonly type: NumberConstructor;
854
+ readonly default: 120;
855
+ };
251
856
  table: {
252
857
  type: PropType<AnyDataTableBinding>;
253
858
  required: true;
@@ -260,9 +865,21 @@ declare const DataGridRoot: import("vue").DefineComponent<import("vue").ExtractP
260
865
  type: PropType<string | undefined>;
261
866
  default: undefined;
262
867
  };
263
- }>> & Readonly<{}>, {
868
+ }>> & Readonly<{
869
+ onCancel?: (_key: string | number) => any;
870
+ onSave?: (_result: unknown) => any;
871
+ }>, {
264
872
  as: string;
873
+ height: string | undefined;
265
874
  label: string | undefined;
875
+ virtualColumns: boolean;
876
+ gutter: number;
877
+ treeColumn: string | undefined;
878
+ keepAliveDetail: boolean;
879
+ virtual: boolean | ComponentVirtualOptions;
880
+ rowHeight: number;
881
+ overscan: number;
882
+ columnWidth: number;
266
883
  }, SlotsType<{
267
884
  default?: (props: {
268
885
  table: DataTableBinding<unknown>;
@@ -282,6 +899,38 @@ interface GridCellSlotProps {
282
899
  * cell that is not being edited; the `rowHeader` slot adds a leading cell to each row.
283
900
  */
284
901
  declare const DataGridBody: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
902
+ colspan: {
903
+ type: NumberConstructor;
904
+ default: undefined;
905
+ };
906
+ treeCell: {
907
+ type: BooleanConstructor;
908
+ default: boolean;
909
+ };
910
+ virtual: {
911
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
912
+ readonly default: false;
913
+ };
914
+ height: {
915
+ readonly type: PropType<string | undefined>;
916
+ readonly default: undefined;
917
+ };
918
+ rowHeight: {
919
+ readonly type: NumberConstructor;
920
+ readonly default: 40;
921
+ };
922
+ overscan: {
923
+ readonly type: NumberConstructor;
924
+ readonly default: 5;
925
+ };
926
+ virtualColumns: {
927
+ readonly type: BooleanConstructor;
928
+ readonly default: false;
929
+ };
930
+ columnWidth: {
931
+ readonly type: NumberConstructor;
932
+ readonly default: 120;
933
+ };
285
934
  as: {
286
935
  readonly type: StringConstructor;
287
936
  readonly default: string;
@@ -289,12 +938,52 @@ declare const DataGridBody: import("vue").DefineComponent<import("vue").ExtractP
289
938
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
290
939
  [key: string]: any;
291
940
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
941
+ colspan: {
942
+ type: NumberConstructor;
943
+ default: undefined;
944
+ };
945
+ treeCell: {
946
+ type: BooleanConstructor;
947
+ default: boolean;
948
+ };
949
+ virtual: {
950
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
951
+ readonly default: false;
952
+ };
953
+ height: {
954
+ readonly type: PropType<string | undefined>;
955
+ readonly default: undefined;
956
+ };
957
+ rowHeight: {
958
+ readonly type: NumberConstructor;
959
+ readonly default: 40;
960
+ };
961
+ overscan: {
962
+ readonly type: NumberConstructor;
963
+ readonly default: 5;
964
+ };
965
+ virtualColumns: {
966
+ readonly type: BooleanConstructor;
967
+ readonly default: false;
968
+ };
969
+ columnWidth: {
970
+ readonly type: NumberConstructor;
971
+ readonly default: 120;
972
+ };
292
973
  as: {
293
974
  readonly type: StringConstructor;
294
975
  readonly default: string;
295
976
  };
296
977
  }>> & Readonly<{}>, {
297
978
  as: string;
979
+ height: string | undefined;
980
+ virtualColumns: boolean;
981
+ colspan: number;
982
+ virtual: boolean | ComponentVirtualOptions;
983
+ rowHeight: number;
984
+ overscan: number;
985
+ columnWidth: number;
986
+ treeCell: boolean;
298
987
  }, SlotsType<{
299
988
  default?: (props: {
300
989
  rows: readonly TableRow<unknown>[];
@@ -304,6 +993,8 @@ declare const DataGridBody: import("vue").DefineComponent<import("vue").ExtractP
304
993
  index: number;
305
994
  }) => VNode[];
306
995
  cell?: (props: GridCellSlotProps) => VNodeChild;
996
+ editor?: (props: CellEditorSlotProps) => VNodeChild;
997
+ detail?: (props: DetailSlotProps) => VNodeChild;
307
998
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
308
999
  /**
309
1000
  * A grid cell. A click selects it, Shift-click or dragging extends the range, and a double click
@@ -322,6 +1013,10 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
322
1013
  readonly type: StringConstructor;
323
1014
  readonly default: string;
324
1015
  };
1016
+ tree: {
1017
+ type: BooleanConstructor;
1018
+ default: boolean;
1019
+ };
325
1020
  /** The row's position on the page. Found by searching the rows when left out. */
326
1021
  rowIndex: {
327
1022
  type: PropType<number | undefined>;
@@ -347,6 +1042,10 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
347
1042
  readonly type: StringConstructor;
348
1043
  readonly default: string;
349
1044
  };
1045
+ tree: {
1046
+ type: BooleanConstructor;
1047
+ default: boolean;
1048
+ };
350
1049
  /** The row's position on the page. Found by searching the rows when left out. */
351
1050
  rowIndex: {
352
1051
  type: PropType<number | undefined>;
@@ -360,15 +1059,11 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
360
1059
  }>> & Readonly<{}>, {
361
1060
  as: string;
362
1061
  rowIndex: number | undefined;
1062
+ tree: boolean;
363
1063
  columnIndex: number | undefined;
364
1064
  }, SlotsType<{
365
1065
  default?: (props: GridCellSlotProps) => VNodeChild;
366
- editor?: (props: {
367
- draft: string;
368
- update: (draft: string) => void;
369
- commit: (then?: GridDirection) => unknown;
370
- cancel: () => void;
371
- }) => VNode[];
1066
+ editor?: (props: CellEditorSlotProps) => VNodeChild;
372
1067
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
373
1068
  //#endregion
374
1069
  //#region src/table.d.ts
@@ -377,6 +1072,38 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
377
1072
  * slot it renders a complete header and body.
378
1073
  */
379
1074
  declare const DataTableRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1075
+ treeColumn: {
1076
+ readonly type: PropType<string | undefined>;
1077
+ readonly default: undefined;
1078
+ };
1079
+ keepAliveDetail: {
1080
+ readonly type: BooleanConstructor;
1081
+ readonly default: false;
1082
+ };
1083
+ virtual: {
1084
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1085
+ readonly default: false;
1086
+ };
1087
+ height: {
1088
+ readonly type: PropType<string | undefined>;
1089
+ readonly default: undefined;
1090
+ };
1091
+ rowHeight: {
1092
+ readonly type: NumberConstructor;
1093
+ readonly default: 40;
1094
+ };
1095
+ overscan: {
1096
+ readonly type: NumberConstructor;
1097
+ readonly default: 5;
1098
+ };
1099
+ virtualColumns: {
1100
+ readonly type: BooleanConstructor;
1101
+ readonly default: false;
1102
+ };
1103
+ columnWidth: {
1104
+ readonly type: NumberConstructor;
1105
+ readonly default: 120;
1106
+ };
380
1107
  table: {
381
1108
  type: PropType<AnyDataTableBinding>;
382
1109
  required: true;
@@ -388,6 +1115,38 @@ declare const DataTableRoot: import("vue").DefineComponent<import("vue").Extract
388
1115
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
389
1116
  [key: string]: any;
390
1117
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1118
+ treeColumn: {
1119
+ readonly type: PropType<string | undefined>;
1120
+ readonly default: undefined;
1121
+ };
1122
+ keepAliveDetail: {
1123
+ readonly type: BooleanConstructor;
1124
+ readonly default: false;
1125
+ };
1126
+ virtual: {
1127
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1128
+ readonly default: false;
1129
+ };
1130
+ height: {
1131
+ readonly type: PropType<string | undefined>;
1132
+ readonly default: undefined;
1133
+ };
1134
+ rowHeight: {
1135
+ readonly type: NumberConstructor;
1136
+ readonly default: 40;
1137
+ };
1138
+ overscan: {
1139
+ readonly type: NumberConstructor;
1140
+ readonly default: 5;
1141
+ };
1142
+ virtualColumns: {
1143
+ readonly type: BooleanConstructor;
1144
+ readonly default: false;
1145
+ };
1146
+ columnWidth: {
1147
+ readonly type: NumberConstructor;
1148
+ readonly default: 120;
1149
+ };
391
1150
  table: {
392
1151
  type: PropType<AnyDataTableBinding>;
393
1152
  required: true;
@@ -398,6 +1157,14 @@ declare const DataTableRoot: import("vue").DefineComponent<import("vue").Extract
398
1157
  };
399
1158
  }>> & Readonly<{}>, {
400
1159
  as: string;
1160
+ height: string | undefined;
1161
+ virtualColumns: boolean;
1162
+ treeColumn: string | undefined;
1163
+ keepAliveDetail: boolean;
1164
+ virtual: boolean | ComponentVirtualOptions;
1165
+ rowHeight: number;
1166
+ overscan: number;
1167
+ columnWidth: number;
401
1168
  }, SlotsType<{
402
1169
  default?: (props: {
403
1170
  table: DataTableBinding<unknown>;
@@ -457,6 +1224,27 @@ declare const DataTableHeaderRow: import("vue").DefineComponent<import("vue").Ex
457
1224
  }, SlotsType<{
458
1225
  default?: () => VNode[];
459
1226
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1227
+ /** Shared header/body column slice, with native spacer cells for omitted columns. */
1228
+ declare const DataTableVirtualColumns: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1229
+ as: {
1230
+ type: PropType<"th" | "td">;
1231
+ default: string;
1232
+ };
1233
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
1234
+ [key: string]: any;
1235
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1236
+ as: {
1237
+ type: PropType<"th" | "td">;
1238
+ default: string;
1239
+ };
1240
+ }>> & Readonly<{}>, {
1241
+ as: "td" | "th";
1242
+ }, SlotsType<{
1243
+ default?: (props: {
1244
+ column: TableColumn<unknown>;
1245
+ index: number;
1246
+ }) => VNode[];
1247
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
460
1248
  /**
461
1249
  * A column header with `aria-sort`. Without a slot it shows the header text inside a sort button
462
1250
  * for sortable columns.
@@ -530,6 +1318,34 @@ declare const DataTableSortButton: import("vue").DefineComponent<import("vue").E
530
1318
  * a full-width row when there are none.
531
1319
  */
532
1320
  declare const DataTableBody: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1321
+ colspan: {
1322
+ type: PropType<number | undefined>;
1323
+ default: undefined;
1324
+ };
1325
+ virtual: {
1326
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1327
+ readonly default: false;
1328
+ };
1329
+ height: {
1330
+ readonly type: PropType<string | undefined>;
1331
+ readonly default: undefined;
1332
+ };
1333
+ rowHeight: {
1334
+ readonly type: NumberConstructor;
1335
+ readonly default: 40;
1336
+ };
1337
+ overscan: {
1338
+ readonly type: NumberConstructor;
1339
+ readonly default: 5;
1340
+ };
1341
+ virtualColumns: {
1342
+ readonly type: BooleanConstructor;
1343
+ readonly default: false;
1344
+ };
1345
+ columnWidth: {
1346
+ readonly type: NumberConstructor;
1347
+ readonly default: 120;
1348
+ };
533
1349
  as: {
534
1350
  readonly type: StringConstructor;
535
1351
  readonly default: string;
@@ -537,17 +1353,57 @@ declare const DataTableBody: import("vue").DefineComponent<import("vue").Extract
537
1353
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
538
1354
  [key: string]: any;
539
1355
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1356
+ colspan: {
1357
+ type: PropType<number | undefined>;
1358
+ default: undefined;
1359
+ };
1360
+ virtual: {
1361
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1362
+ readonly default: false;
1363
+ };
1364
+ height: {
1365
+ readonly type: PropType<string | undefined>;
1366
+ readonly default: undefined;
1367
+ };
1368
+ rowHeight: {
1369
+ readonly type: NumberConstructor;
1370
+ readonly default: 40;
1371
+ };
1372
+ overscan: {
1373
+ readonly type: NumberConstructor;
1374
+ readonly default: 5;
1375
+ };
1376
+ virtualColumns: {
1377
+ readonly type: BooleanConstructor;
1378
+ readonly default: false;
1379
+ };
1380
+ columnWidth: {
1381
+ readonly type: NumberConstructor;
1382
+ readonly default: 120;
1383
+ };
540
1384
  as: {
541
1385
  readonly type: StringConstructor;
542
1386
  readonly default: string;
543
1387
  };
544
1388
  }>> & Readonly<{}>, {
545
1389
  as: string;
1390
+ height: string | undefined;
1391
+ virtualColumns: boolean;
1392
+ colspan: number | undefined;
1393
+ virtual: boolean | ComponentVirtualOptions;
1394
+ rowHeight: number;
1395
+ overscan: number;
1396
+ columnWidth: number;
546
1397
  }, SlotsType<{
547
1398
  default?: (props: {
548
1399
  rows: readonly TableRow<unknown>[];
549
1400
  }) => VNode[];
550
1401
  empty?: () => VNode[];
1402
+ detail?: (props: {
1403
+ row: TableRow<unknown>;
1404
+ rowIndex: number;
1405
+ }) => VNode[];
1406
+ row?: (props: DetailSlotProps) => VNodeChild;
551
1407
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
552
1408
  /** A body row; `aria-selected` and `data-selected` follow the selection. */
553
1409
  declare const DataTableRow: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -559,6 +1415,10 @@ declare const DataTableRow: import("vue").DefineComponent<import("vue").ExtractP
559
1415
  readonly type: StringConstructor;
560
1416
  readonly default: string;
561
1417
  };
1418
+ rowIndex: {
1419
+ type: PropType<number | undefined>;
1420
+ default: undefined;
1421
+ };
562
1422
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
563
1423
  [key: string]: any;
564
1424
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -570,8 +1430,13 @@ declare const DataTableRow: import("vue").DefineComponent<import("vue").ExtractP
570
1430
  readonly type: StringConstructor;
571
1431
  readonly default: string;
572
1432
  };
1433
+ rowIndex: {
1434
+ type: PropType<number | undefined>;
1435
+ default: undefined;
1436
+ };
573
1437
  }>> & Readonly<{}>, {
574
1438
  as: string;
1439
+ rowIndex: number | undefined;
575
1440
  }, SlotsType<{
576
1441
  default?: (props: {
577
1442
  row: TableRow<unknown>;
@@ -593,6 +1458,10 @@ declare const DataTableCell: import("vue").DefineComponent<import("vue").Extract
593
1458
  readonly type: StringConstructor;
594
1459
  readonly default: string;
595
1460
  };
1461
+ tree: {
1462
+ type: BooleanConstructor;
1463
+ default: boolean;
1464
+ };
596
1465
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
597
1466
  [key: string]: any;
598
1467
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -608,8 +1477,13 @@ declare const DataTableCell: import("vue").DefineComponent<import("vue").Extract
608
1477
  readonly type: StringConstructor;
609
1478
  readonly default: string;
610
1479
  };
1480
+ tree: {
1481
+ type: BooleanConstructor;
1482
+ default: boolean;
1483
+ };
611
1484
  }>> & Readonly<{}>, {
612
1485
  as: string;
1486
+ tree: boolean;
613
1487
  }, SlotsType<{
614
1488
  default?: (props: {
615
1489
  row: TableRow<unknown>;
@@ -637,5 +1511,5 @@ declare const DataTableEmpty: import("vue").DefineComponent<import("vue").Extrac
637
1511
  default?: () => VNode[];
638
1512
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
639
1513
  //#endregion
640
- export { DataGridBody, DataGridCell, DataGridRoot, DataTableBody, DataTableCaption, DataTableCell, DataTableColumnVisibility, DataTableEmpty, DataTableHeader, DataTableHeaderCell, DataTableHeaderRow, DataTablePageSize, DataTablePagination, DataTableRoot, DataTableRow, DataTableSearch, DataTableSelectAll, DataTableSelectRow, DataTableSortButton, DataTableStatus, type GridCellSlotProps, cellId, columnStyle };
1514
+ export { type CellEditorSlotProps, type ComponentVirtualBinding, type ComponentVirtualOptions, DataCellEditor, DataGridBody, DataGridCell, DataGridRoot, DataTableBody, DataTableCaption, DataTableCell, DataTableColumnVisibility, DataTableDetailRow, DataTableEditCell, DataTableEditRoot, DataTableEmpty, DataTableExpandToggle, DataTableHeader, DataTableHeaderCell, DataTableHeaderRow, DataTableLoadMore, DataTablePageSize, DataTablePagination, DataTableRoot, DataTableRow, DataTableRowActions, DataTableSearch, DataTableSelectAll, DataTableSelectRow, DataTableSortButton, DataTableStatus, DataTableTreeCell, DataTableViewport, DataTableVirtualColumns, type DetailSlotProps, type GridCellSlotProps, type TableStatusSlotProps, cellEditorProps, cellId, columnStyle, expandToggleProps, hierarchyProps, injectVirtual as injectVirtualRenderer, resolveTreeColumn, treeCellProps, virtualProps };
641
1515
  //# sourceMappingURL=index.d.ts.map