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

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,47 @@ 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
+ leadingColumns: {
770
+ readonly type: NumberConstructor;
771
+ readonly default: 0;
772
+ };
773
+ treeColumn: {
774
+ readonly type: PropType<string | undefined>;
775
+ readonly default: undefined;
776
+ };
777
+ keepAliveDetail: {
778
+ readonly type: BooleanConstructor;
779
+ readonly default: false;
780
+ };
781
+ virtual: {
782
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
783
+ readonly default: false;
784
+ };
785
+ height: {
786
+ readonly type: PropType<string | undefined>;
787
+ readonly default: undefined;
788
+ };
789
+ rowHeight: {
790
+ readonly type: NumberConstructor;
791
+ readonly default: 40;
792
+ };
793
+ overscan: {
794
+ readonly type: NumberConstructor;
795
+ readonly default: 5;
796
+ };
797
+ virtualColumns: {
798
+ readonly type: BooleanConstructor;
799
+ readonly default: false;
800
+ };
801
+ columnWidth: {
802
+ readonly type: NumberConstructor;
803
+ readonly default: 120;
804
+ };
236
805
  table: {
237
806
  type: PropType<AnyDataTableBinding>;
238
807
  required: true;
@@ -247,7 +816,51 @@ declare const DataGridRoot: import("vue").DefineComponent<import("vue").ExtractP
247
816
  };
248
817
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
249
818
  [key: string]: any;
250
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
819
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
820
+ save: (_result: unknown) => true;
821
+ cancel: (_key: string | number) => true;
822
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
823
+ /** Width reserved before data columns, for a row-number/header column. */
824
+ gutter: {
825
+ type: NumberConstructor;
826
+ default: number;
827
+ };
828
+ leadingColumns: {
829
+ readonly type: NumberConstructor;
830
+ readonly default: 0;
831
+ };
832
+ treeColumn: {
833
+ readonly type: PropType<string | undefined>;
834
+ readonly default: undefined;
835
+ };
836
+ keepAliveDetail: {
837
+ readonly type: BooleanConstructor;
838
+ readonly default: false;
839
+ };
840
+ virtual: {
841
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
842
+ readonly default: false;
843
+ };
844
+ height: {
845
+ readonly type: PropType<string | undefined>;
846
+ readonly default: undefined;
847
+ };
848
+ rowHeight: {
849
+ readonly type: NumberConstructor;
850
+ readonly default: 40;
851
+ };
852
+ overscan: {
853
+ readonly type: NumberConstructor;
854
+ readonly default: 5;
855
+ };
856
+ virtualColumns: {
857
+ readonly type: BooleanConstructor;
858
+ readonly default: false;
859
+ };
860
+ columnWidth: {
861
+ readonly type: NumberConstructor;
862
+ readonly default: 120;
863
+ };
251
864
  table: {
252
865
  type: PropType<AnyDataTableBinding>;
253
866
  required: true;
@@ -260,9 +873,22 @@ declare const DataGridRoot: import("vue").DefineComponent<import("vue").ExtractP
260
873
  type: PropType<string | undefined>;
261
874
  default: undefined;
262
875
  };
263
- }>> & Readonly<{}>, {
876
+ }>> & Readonly<{
877
+ onCancel?: (_key: string | number) => any;
878
+ onSave?: (_result: unknown) => any;
879
+ }>, {
264
880
  as: string;
881
+ height: string | undefined;
265
882
  label: string | undefined;
883
+ virtualColumns: boolean;
884
+ gutter: number;
885
+ leadingColumns: number;
886
+ treeColumn: string | undefined;
887
+ keepAliveDetail: boolean;
888
+ virtual: boolean | ComponentVirtualOptions;
889
+ rowHeight: number;
890
+ overscan: number;
891
+ columnWidth: number;
266
892
  }, SlotsType<{
267
893
  default?: (props: {
268
894
  table: DataTableBinding<unknown>;
@@ -282,6 +908,38 @@ interface GridCellSlotProps {
282
908
  * cell that is not being edited; the `rowHeader` slot adds a leading cell to each row.
283
909
  */
284
910
  declare const DataGridBody: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
911
+ colspan: {
912
+ type: NumberConstructor;
913
+ default: undefined;
914
+ };
915
+ treeCell: {
916
+ type: BooleanConstructor;
917
+ default: boolean;
918
+ };
919
+ virtual: {
920
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
921
+ readonly default: false;
922
+ };
923
+ height: {
924
+ readonly type: PropType<string | undefined>;
925
+ readonly default: undefined;
926
+ };
927
+ rowHeight: {
928
+ readonly type: NumberConstructor;
929
+ readonly default: 40;
930
+ };
931
+ overscan: {
932
+ readonly type: NumberConstructor;
933
+ readonly default: 5;
934
+ };
935
+ virtualColumns: {
936
+ readonly type: BooleanConstructor;
937
+ readonly default: false;
938
+ };
939
+ columnWidth: {
940
+ readonly type: NumberConstructor;
941
+ readonly default: 120;
942
+ };
285
943
  as: {
286
944
  readonly type: StringConstructor;
287
945
  readonly default: string;
@@ -289,12 +947,52 @@ declare const DataGridBody: import("vue").DefineComponent<import("vue").ExtractP
289
947
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
290
948
  [key: string]: any;
291
949
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
950
+ colspan: {
951
+ type: NumberConstructor;
952
+ default: undefined;
953
+ };
954
+ treeCell: {
955
+ type: BooleanConstructor;
956
+ default: boolean;
957
+ };
958
+ virtual: {
959
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
960
+ readonly default: false;
961
+ };
962
+ height: {
963
+ readonly type: PropType<string | undefined>;
964
+ readonly default: undefined;
965
+ };
966
+ rowHeight: {
967
+ readonly type: NumberConstructor;
968
+ readonly default: 40;
969
+ };
970
+ overscan: {
971
+ readonly type: NumberConstructor;
972
+ readonly default: 5;
973
+ };
974
+ virtualColumns: {
975
+ readonly type: BooleanConstructor;
976
+ readonly default: false;
977
+ };
978
+ columnWidth: {
979
+ readonly type: NumberConstructor;
980
+ readonly default: 120;
981
+ };
292
982
  as: {
293
983
  readonly type: StringConstructor;
294
984
  readonly default: string;
295
985
  };
296
986
  }>> & Readonly<{}>, {
297
987
  as: string;
988
+ height: string | undefined;
989
+ virtualColumns: boolean;
990
+ colspan: number;
991
+ virtual: boolean | ComponentVirtualOptions;
992
+ rowHeight: number;
993
+ overscan: number;
994
+ columnWidth: number;
995
+ treeCell: boolean;
298
996
  }, SlotsType<{
299
997
  default?: (props: {
300
998
  rows: readonly TableRow<unknown>[];
@@ -304,6 +1002,8 @@ declare const DataGridBody: import("vue").DefineComponent<import("vue").ExtractP
304
1002
  index: number;
305
1003
  }) => VNode[];
306
1004
  cell?: (props: GridCellSlotProps) => VNodeChild;
1005
+ editor?: (props: CellEditorSlotProps) => VNodeChild;
1006
+ detail?: (props: DetailSlotProps) => VNodeChild;
307
1007
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
308
1008
  /**
309
1009
  * A grid cell. A click selects it, Shift-click or dragging extends the range, and a double click
@@ -322,6 +1022,10 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
322
1022
  readonly type: StringConstructor;
323
1023
  readonly default: string;
324
1024
  };
1025
+ tree: {
1026
+ type: BooleanConstructor;
1027
+ default: boolean;
1028
+ };
325
1029
  /** The row's position on the page. Found by searching the rows when left out. */
326
1030
  rowIndex: {
327
1031
  type: PropType<number | undefined>;
@@ -347,6 +1051,10 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
347
1051
  readonly type: StringConstructor;
348
1052
  readonly default: string;
349
1053
  };
1054
+ tree: {
1055
+ type: BooleanConstructor;
1056
+ default: boolean;
1057
+ };
350
1058
  /** The row's position on the page. Found by searching the rows when left out. */
351
1059
  rowIndex: {
352
1060
  type: PropType<number | undefined>;
@@ -360,15 +1068,11 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
360
1068
  }>> & Readonly<{}>, {
361
1069
  as: string;
362
1070
  rowIndex: number | undefined;
1071
+ tree: boolean;
363
1072
  columnIndex: number | undefined;
364
1073
  }, SlotsType<{
365
1074
  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[];
1075
+ editor?: (props: CellEditorSlotProps) => VNodeChild;
372
1076
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
373
1077
  //#endregion
374
1078
  //#region src/table.d.ts
@@ -377,6 +1081,42 @@ declare const DataGridCell: import("vue").DefineComponent<import("vue").ExtractP
377
1081
  * slot it renders a complete header and body.
378
1082
  */
379
1083
  declare const DataTableRoot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1084
+ leadingColumns: {
1085
+ readonly type: NumberConstructor;
1086
+ readonly default: 0;
1087
+ };
1088
+ treeColumn: {
1089
+ readonly type: PropType<string | undefined>;
1090
+ readonly default: undefined;
1091
+ };
1092
+ keepAliveDetail: {
1093
+ readonly type: BooleanConstructor;
1094
+ readonly default: false;
1095
+ };
1096
+ virtual: {
1097
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1098
+ readonly default: false;
1099
+ };
1100
+ height: {
1101
+ readonly type: PropType<string | undefined>;
1102
+ readonly default: undefined;
1103
+ };
1104
+ rowHeight: {
1105
+ readonly type: NumberConstructor;
1106
+ readonly default: 40;
1107
+ };
1108
+ overscan: {
1109
+ readonly type: NumberConstructor;
1110
+ readonly default: 5;
1111
+ };
1112
+ virtualColumns: {
1113
+ readonly type: BooleanConstructor;
1114
+ readonly default: false;
1115
+ };
1116
+ columnWidth: {
1117
+ readonly type: NumberConstructor;
1118
+ readonly default: 120;
1119
+ };
380
1120
  table: {
381
1121
  type: PropType<AnyDataTableBinding>;
382
1122
  required: true;
@@ -388,6 +1128,42 @@ declare const DataTableRoot: import("vue").DefineComponent<import("vue").Extract
388
1128
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
389
1129
  [key: string]: any;
390
1130
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1131
+ leadingColumns: {
1132
+ readonly type: NumberConstructor;
1133
+ readonly default: 0;
1134
+ };
1135
+ treeColumn: {
1136
+ readonly type: PropType<string | undefined>;
1137
+ readonly default: undefined;
1138
+ };
1139
+ keepAliveDetail: {
1140
+ readonly type: BooleanConstructor;
1141
+ readonly default: false;
1142
+ };
1143
+ virtual: {
1144
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1145
+ readonly default: false;
1146
+ };
1147
+ height: {
1148
+ readonly type: PropType<string | undefined>;
1149
+ readonly default: undefined;
1150
+ };
1151
+ rowHeight: {
1152
+ readonly type: NumberConstructor;
1153
+ readonly default: 40;
1154
+ };
1155
+ overscan: {
1156
+ readonly type: NumberConstructor;
1157
+ readonly default: 5;
1158
+ };
1159
+ virtualColumns: {
1160
+ readonly type: BooleanConstructor;
1161
+ readonly default: false;
1162
+ };
1163
+ columnWidth: {
1164
+ readonly type: NumberConstructor;
1165
+ readonly default: 120;
1166
+ };
391
1167
  table: {
392
1168
  type: PropType<AnyDataTableBinding>;
393
1169
  required: true;
@@ -398,6 +1174,15 @@ declare const DataTableRoot: import("vue").DefineComponent<import("vue").Extract
398
1174
  };
399
1175
  }>> & Readonly<{}>, {
400
1176
  as: string;
1177
+ height: string | undefined;
1178
+ virtualColumns: boolean;
1179
+ leadingColumns: number;
1180
+ treeColumn: string | undefined;
1181
+ keepAliveDetail: boolean;
1182
+ virtual: boolean | ComponentVirtualOptions;
1183
+ rowHeight: number;
1184
+ overscan: number;
1185
+ columnWidth: number;
401
1186
  }, SlotsType<{
402
1187
  default?: (props: {
403
1188
  table: DataTableBinding<unknown>;
@@ -457,6 +1242,27 @@ declare const DataTableHeaderRow: import("vue").DefineComponent<import("vue").Ex
457
1242
  }, SlotsType<{
458
1243
  default?: () => VNode[];
459
1244
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1245
+ /** Shared header/body column slice, with native spacer cells for omitted columns. */
1246
+ declare const DataTableVirtualColumns: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1247
+ as: {
1248
+ type: PropType<"th" | "td">;
1249
+ default: string;
1250
+ };
1251
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
1252
+ [key: string]: any;
1253
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1254
+ as: {
1255
+ type: PropType<"th" | "td">;
1256
+ default: string;
1257
+ };
1258
+ }>> & Readonly<{}>, {
1259
+ as: "td" | "th";
1260
+ }, SlotsType<{
1261
+ default?: (props: {
1262
+ column: TableColumn<unknown>;
1263
+ index: number;
1264
+ }) => VNode[];
1265
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
460
1266
  /**
461
1267
  * A column header with `aria-sort`. Without a slot it shows the header text inside a sort button
462
1268
  * for sortable columns.
@@ -530,6 +1336,34 @@ declare const DataTableSortButton: import("vue").DefineComponent<import("vue").E
530
1336
  * a full-width row when there are none.
531
1337
  */
532
1338
  declare const DataTableBody: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1339
+ colspan: {
1340
+ type: PropType<number | undefined>;
1341
+ default: undefined;
1342
+ };
1343
+ virtual: {
1344
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1345
+ readonly default: false;
1346
+ };
1347
+ height: {
1348
+ readonly type: PropType<string | undefined>;
1349
+ readonly default: undefined;
1350
+ };
1351
+ rowHeight: {
1352
+ readonly type: NumberConstructor;
1353
+ readonly default: 40;
1354
+ };
1355
+ overscan: {
1356
+ readonly type: NumberConstructor;
1357
+ readonly default: 5;
1358
+ };
1359
+ virtualColumns: {
1360
+ readonly type: BooleanConstructor;
1361
+ readonly default: false;
1362
+ };
1363
+ columnWidth: {
1364
+ readonly type: NumberConstructor;
1365
+ readonly default: 120;
1366
+ };
533
1367
  as: {
534
1368
  readonly type: StringConstructor;
535
1369
  readonly default: string;
@@ -537,17 +1371,57 @@ declare const DataTableBody: import("vue").DefineComponent<import("vue").Extract
537
1371
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
538
1372
  [key: string]: any;
539
1373
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1374
+ colspan: {
1375
+ type: PropType<number | undefined>;
1376
+ default: undefined;
1377
+ };
1378
+ virtual: {
1379
+ readonly type: PropType<boolean | ComponentVirtualOptions>;
1380
+ readonly default: false;
1381
+ };
1382
+ height: {
1383
+ readonly type: PropType<string | undefined>;
1384
+ readonly default: undefined;
1385
+ };
1386
+ rowHeight: {
1387
+ readonly type: NumberConstructor;
1388
+ readonly default: 40;
1389
+ };
1390
+ overscan: {
1391
+ readonly type: NumberConstructor;
1392
+ readonly default: 5;
1393
+ };
1394
+ virtualColumns: {
1395
+ readonly type: BooleanConstructor;
1396
+ readonly default: false;
1397
+ };
1398
+ columnWidth: {
1399
+ readonly type: NumberConstructor;
1400
+ readonly default: 120;
1401
+ };
540
1402
  as: {
541
1403
  readonly type: StringConstructor;
542
1404
  readonly default: string;
543
1405
  };
544
1406
  }>> & Readonly<{}>, {
545
1407
  as: string;
1408
+ height: string | undefined;
1409
+ virtualColumns: boolean;
1410
+ colspan: number | undefined;
1411
+ virtual: boolean | ComponentVirtualOptions;
1412
+ rowHeight: number;
1413
+ overscan: number;
1414
+ columnWidth: number;
546
1415
  }, SlotsType<{
547
1416
  default?: (props: {
548
1417
  rows: readonly TableRow<unknown>[];
549
1418
  }) => VNode[];
550
1419
  empty?: () => VNode[];
1420
+ detail?: (props: {
1421
+ row: TableRow<unknown>;
1422
+ rowIndex: number;
1423
+ }) => VNode[];
1424
+ row?: (props: DetailSlotProps) => VNodeChild;
551
1425
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
552
1426
  /** A body row; `aria-selected` and `data-selected` follow the selection. */
553
1427
  declare const DataTableRow: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -559,6 +1433,10 @@ declare const DataTableRow: import("vue").DefineComponent<import("vue").ExtractP
559
1433
  readonly type: StringConstructor;
560
1434
  readonly default: string;
561
1435
  };
1436
+ rowIndex: {
1437
+ type: PropType<number | undefined>;
1438
+ default: undefined;
1439
+ };
562
1440
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
563
1441
  [key: string]: any;
564
1442
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -570,8 +1448,13 @@ declare const DataTableRow: import("vue").DefineComponent<import("vue").ExtractP
570
1448
  readonly type: StringConstructor;
571
1449
  readonly default: string;
572
1450
  };
1451
+ rowIndex: {
1452
+ type: PropType<number | undefined>;
1453
+ default: undefined;
1454
+ };
573
1455
  }>> & Readonly<{}>, {
574
1456
  as: string;
1457
+ rowIndex: number | undefined;
575
1458
  }, SlotsType<{
576
1459
  default?: (props: {
577
1460
  row: TableRow<unknown>;
@@ -593,6 +1476,10 @@ declare const DataTableCell: import("vue").DefineComponent<import("vue").Extract
593
1476
  readonly type: StringConstructor;
594
1477
  readonly default: string;
595
1478
  };
1479
+ tree: {
1480
+ type: BooleanConstructor;
1481
+ default: boolean;
1482
+ };
596
1483
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
597
1484
  [key: string]: any;
598
1485
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -608,8 +1495,13 @@ declare const DataTableCell: import("vue").DefineComponent<import("vue").Extract
608
1495
  readonly type: StringConstructor;
609
1496
  readonly default: string;
610
1497
  };
1498
+ tree: {
1499
+ type: BooleanConstructor;
1500
+ default: boolean;
1501
+ };
611
1502
  }>> & Readonly<{}>, {
612
1503
  as: string;
1504
+ tree: boolean;
613
1505
  }, SlotsType<{
614
1506
  default?: (props: {
615
1507
  row: TableRow<unknown>;
@@ -637,5 +1529,5 @@ declare const DataTableEmpty: import("vue").DefineComponent<import("vue").Extrac
637
1529
  default?: () => VNode[];
638
1530
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
639
1531
  //#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 };
1532
+ 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
1533
  //# sourceMappingURL=index.d.ts.map