vueye-table 3.0.0-alpha.8 → 3.0.0-alpha.9

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,5 +1,5 @@
1
1
  import { CellChange, RowKey, TableIssue, TableRow, TableState } from "@vueye-table/core";
2
- import { GridCellSlotProps, TableStatusSlotProps } from "@vueye-table/headless";
2
+ import { DetailSlotProps, GridCellSlotProps, TableStatusSlotProps } from "@vueye-table/headless";
3
3
  import { Plugin, PropType, SlotsType, VNode } from "vue";
4
4
  export * from "@vueye-table/core";
5
5
  export * from "@vueye-table/headless";
@@ -52,6 +52,46 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
52
52
  type: BooleanConstructor;
53
53
  default: boolean;
54
54
  };
55
+ rowCanExpand: {
56
+ readonly type: PropType<((row: any) => boolean) | undefined>;
57
+ readonly default: undefined;
58
+ };
59
+ expandMode: {
60
+ readonly type: PropType<import("@vueye-table/core").ExpandMode>;
61
+ readonly default: "multiple";
62
+ };
63
+ expanded: {
64
+ readonly type: PropType<import("@vueye-table/core").ExpandedState | undefined>;
65
+ readonly default: undefined;
66
+ };
67
+ getChildren: {
68
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getChildren"]>;
69
+ readonly default: undefined;
70
+ };
71
+ setChildren: {
72
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["setChildren"]>;
73
+ readonly default: undefined;
74
+ };
75
+ getParentKey: {
76
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getParentKey"]>;
77
+ readonly default: undefined;
78
+ };
79
+ hasChildren: {
80
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["hasChildren"]>;
81
+ readonly default: undefined;
82
+ };
83
+ loadChildren: {
84
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any, AbortSignal>["loadChildren"]>;
85
+ readonly default: undefined;
86
+ };
87
+ treeFilter: {
88
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["treeFilter"]>;
89
+ readonly default: undefined;
90
+ };
91
+ paginateBy: {
92
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["paginateBy"]>;
93
+ readonly default: undefined;
94
+ };
55
95
  source: {
56
96
  readonly type: PropType<import("@vueye-table/vue").TableSource<unknown> | undefined>;
57
97
  readonly default: undefined;
@@ -156,6 +196,14 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
156
196
  readonly type: PropType<import("@vueye-table/core").SelectScope>;
157
197
  readonly default: "all";
158
198
  };
199
+ treeColumn: {
200
+ readonly type: PropType<string | undefined>;
201
+ readonly default: undefined;
202
+ };
203
+ keepAliveDetail: {
204
+ readonly type: BooleanConstructor;
205
+ readonly default: false;
206
+ };
159
207
  virtual: {
160
208
  readonly type: PropType<boolean | import("@vueye-table/headless").ComponentVirtualOptions>;
161
209
  readonly default: false;
@@ -194,12 +242,15 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
194
242
  "update:filters": null;
195
243
  "update:hiddenColumns": null;
196
244
  "update:selected": null;
245
+ "update:expanded": null;
197
246
  } & {
198
247
  "state-change": (state: TableState) => boolean;
199
248
  "update:data": (data: readonly unknown[]) => boolean;
200
249
  edit: (changes: readonly CellChange<unknown>[]) => boolean;
201
250
  "edit-error": (issues: readonly TableIssue[]) => boolean;
202
251
  export: (csv: string) => boolean;
252
+ expand: (item: unknown, row: TableRow<unknown>) => boolean;
253
+ collapse: (item: unknown, row: TableRow<unknown>) => boolean;
203
254
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
204
255
  searchable: {
205
256
  type: BooleanConstructor;
@@ -236,6 +287,46 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
236
287
  type: BooleanConstructor;
237
288
  default: boolean;
238
289
  };
290
+ rowCanExpand: {
291
+ readonly type: PropType<((row: any) => boolean) | undefined>;
292
+ readonly default: undefined;
293
+ };
294
+ expandMode: {
295
+ readonly type: PropType<import("@vueye-table/core").ExpandMode>;
296
+ readonly default: "multiple";
297
+ };
298
+ expanded: {
299
+ readonly type: PropType<import("@vueye-table/core").ExpandedState | undefined>;
300
+ readonly default: undefined;
301
+ };
302
+ getChildren: {
303
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getChildren"]>;
304
+ readonly default: undefined;
305
+ };
306
+ setChildren: {
307
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["setChildren"]>;
308
+ readonly default: undefined;
309
+ };
310
+ getParentKey: {
311
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getParentKey"]>;
312
+ readonly default: undefined;
313
+ };
314
+ hasChildren: {
315
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["hasChildren"]>;
316
+ readonly default: undefined;
317
+ };
318
+ loadChildren: {
319
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any, AbortSignal>["loadChildren"]>;
320
+ readonly default: undefined;
321
+ };
322
+ treeFilter: {
323
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["treeFilter"]>;
324
+ readonly default: undefined;
325
+ };
326
+ paginateBy: {
327
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["paginateBy"]>;
328
+ readonly default: undefined;
329
+ };
239
330
  source: {
240
331
  readonly type: PropType<import("@vueye-table/vue").TableSource<unknown> | undefined>;
241
332
  readonly default: undefined;
@@ -340,6 +431,14 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
340
431
  readonly type: PropType<import("@vueye-table/core").SelectScope>;
341
432
  readonly default: "all";
342
433
  };
434
+ treeColumn: {
435
+ readonly type: PropType<string | undefined>;
436
+ readonly default: undefined;
437
+ };
438
+ keepAliveDetail: {
439
+ readonly type: BooleanConstructor;
440
+ readonly default: false;
441
+ };
343
442
  virtual: {
344
443
  readonly type: PropType<boolean | import("@vueye-table/headless").ComponentVirtualOptions>;
345
444
  readonly default: false;
@@ -376,22 +475,27 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
376
475
  "onUpdate:filters"?: (...args: any[]) => any;
377
476
  "onUpdate:hiddenColumns"?: (...args: any[]) => any;
378
477
  "onUpdate:selected"?: (...args: any[]) => any;
478
+ "onUpdate:expanded"?: (...args: any[]) => any;
379
479
  "onState-change"?: (state: TableState) => any;
380
- "onUpdate:data"?: (data: readonly unknown[]) => any;
480
+ onExpand?: (item: unknown, row: TableRow<unknown>) => any;
481
+ onCollapse?: (item: unknown, row: TableRow<unknown>) => any;
381
482
  onEdit?: (changes: readonly CellChange<unknown>[]) => any;
483
+ "onUpdate:data"?: (data: readonly unknown[]) => any;
382
484
  "onEdit-error"?: (issues: readonly TableIssue[]) => any;
383
485
  onExport?: (csv: string) => any;
384
486
  }>, {
487
+ getChildren: ((row: any) => readonly any[] | undefined) | undefined;
488
+ setChildren: ((row: any, children: readonly any[]) => any) | undefined;
489
+ getParentKey: ((row: any) => import("@vueye-table/core").RowKey | null | undefined) | undefined;
490
+ hasChildren: ((row: any) => boolean) | undefined;
491
+ loadChildren: ((row: TableRow<any>, signal: AbortSignal) => Promise<readonly any[]>) | undefined;
492
+ treeFilter: import("@vueye-table/core").TreeFilter | undefined;
493
+ paginateBy: import("@vueye-table/core").TreePagination | undefined;
385
494
  page: number;
386
495
  data: readonly unknown[];
387
- searchable: boolean;
388
- columnToggle: boolean;
389
- pagination: boolean;
390
- editable: boolean;
391
- rowNumbers: boolean;
392
- columnLetters: boolean;
393
- label: string;
394
- toolbar: boolean;
496
+ rowCanExpand: ((row: any) => boolean) | undefined;
497
+ expandMode: import("@vueye-table/core").ExpandMode;
498
+ expanded: import("@vueye-table/core").ExpandedState | undefined;
395
499
  source: import("@vueye-table/vue").TableSource<unknown> | undefined;
396
500
  loadMore: import("@vueye-table/vue").LoadMore<unknown> | undefined;
397
501
  endThreshold: number;
@@ -409,7 +513,10 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
409
513
  stickyHeader: boolean;
410
514
  theme: "light" | "dark";
411
515
  maxHeight: string;
516
+ searchable: boolean;
412
517
  searchPlaceholder: string;
518
+ columnToggle: boolean;
519
+ pagination: boolean;
413
520
  pageSizeOptions: readonly number[];
414
521
  pageSize: number;
415
522
  sorting: readonly import("@vueye-table/core").SortRule[];
@@ -417,12 +524,19 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
417
524
  filters: Readonly<Record<string, unknown>>;
418
525
  hiddenColumns: readonly string[];
419
526
  selectScope: import("@vueye-table/core").SelectScope;
527
+ treeColumn: string | undefined;
528
+ keepAliveDetail: boolean;
420
529
  virtual: boolean | import("@vueye-table/headless").ComponentVirtualOptions;
421
530
  height: string | undefined;
422
531
  rowHeight: number;
423
532
  overscan: number;
424
533
  virtualColumns: boolean;
425
534
  columnWidth: number;
535
+ label: string;
536
+ toolbar: boolean;
537
+ editable: boolean;
538
+ rowNumbers: boolean;
539
+ columnLetters: boolean;
426
540
  }, SlotsType<{
427
541
  [key: `cell.${string}`]: GridCellSlotProps & {
428
542
  readonly item: unknown;
@@ -430,6 +544,7 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
430
544
  } & {
431
545
  default?: (props: Record<string, unknown>) => VNode[];
432
546
  status?: (props: TableStatusSlotProps) => VNode[];
547
+ expanded?: (props: DetailSlotProps) => VNode[];
433
548
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
434
549
  //#endregion
435
550
  //#region src/vueye-table.d.ts
@@ -467,6 +582,46 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
467
582
  type: StringConstructor;
468
583
  default: string;
469
584
  };
585
+ rowCanExpand: {
586
+ readonly type: PropType<((row: any) => boolean) | undefined>;
587
+ readonly default: undefined;
588
+ };
589
+ expandMode: {
590
+ readonly type: PropType<import("@vueye-table/core").ExpandMode>;
591
+ readonly default: "multiple";
592
+ };
593
+ expanded: {
594
+ readonly type: PropType<import("@vueye-table/core").ExpandedState | undefined>;
595
+ readonly default: undefined;
596
+ };
597
+ getChildren: {
598
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getChildren"]>;
599
+ readonly default: undefined;
600
+ };
601
+ setChildren: {
602
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["setChildren"]>;
603
+ readonly default: undefined;
604
+ };
605
+ getParentKey: {
606
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getParentKey"]>;
607
+ readonly default: undefined;
608
+ };
609
+ hasChildren: {
610
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["hasChildren"]>;
611
+ readonly default: undefined;
612
+ };
613
+ loadChildren: {
614
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any, AbortSignal>["loadChildren"]>;
615
+ readonly default: undefined;
616
+ };
617
+ treeFilter: {
618
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["treeFilter"]>;
619
+ readonly default: undefined;
620
+ };
621
+ paginateBy: {
622
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["paginateBy"]>;
623
+ readonly default: undefined;
624
+ };
470
625
  source: {
471
626
  readonly type: PropType<import("@vueye-table/vue").TableSource<unknown> | undefined>;
472
627
  readonly default: undefined;
@@ -583,6 +738,14 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
583
738
  readonly type: PropType<import("@vueye-table/core").SelectScope>;
584
739
  readonly default: "all";
585
740
  };
741
+ treeColumn: {
742
+ readonly type: PropType<string | undefined>;
743
+ readonly default: undefined;
744
+ };
745
+ keepAliveDetail: {
746
+ readonly type: BooleanConstructor;
747
+ readonly default: false;
748
+ };
586
749
  virtual: {
587
750
  readonly type: PropType<boolean | import("@vueye-table/headless").ComponentVirtualOptions>;
588
751
  readonly default: false;
@@ -621,9 +784,12 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
621
784
  "update:filters": null;
622
785
  "update:hiddenColumns": null;
623
786
  "update:selected": null;
787
+ "update:expanded": null;
624
788
  } & {
625
789
  "state-change": (state: TableState) => boolean;
626
790
  "row-click": (item: unknown, row: TableRow<unknown>) => boolean;
791
+ expand: (item: unknown, row: TableRow<unknown>) => boolean;
792
+ collapse: (item: unknown, row: TableRow<unknown>) => boolean;
627
793
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
628
794
  /** `true` or `"multiple"` for checkboxes, `"single"` for one row at a time. */
629
795
  selectable: {
@@ -640,6 +806,46 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
640
806
  type: StringConstructor;
641
807
  default: string;
642
808
  };
809
+ rowCanExpand: {
810
+ readonly type: PropType<((row: any) => boolean) | undefined>;
811
+ readonly default: undefined;
812
+ };
813
+ expandMode: {
814
+ readonly type: PropType<import("@vueye-table/core").ExpandMode>;
815
+ readonly default: "multiple";
816
+ };
817
+ expanded: {
818
+ readonly type: PropType<import("@vueye-table/core").ExpandedState | undefined>;
819
+ readonly default: undefined;
820
+ };
821
+ getChildren: {
822
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getChildren"]>;
823
+ readonly default: undefined;
824
+ };
825
+ setChildren: {
826
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["setChildren"]>;
827
+ readonly default: undefined;
828
+ };
829
+ getParentKey: {
830
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["getParentKey"]>;
831
+ readonly default: undefined;
832
+ };
833
+ hasChildren: {
834
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any>["hasChildren"]>;
835
+ readonly default: undefined;
836
+ };
837
+ loadChildren: {
838
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<any, AbortSignal>["loadChildren"]>;
839
+ readonly default: undefined;
840
+ };
841
+ treeFilter: {
842
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["treeFilter"]>;
843
+ readonly default: undefined;
844
+ };
845
+ paginateBy: {
846
+ readonly type: PropType<import("@vueye-table/core").TreeOptions<unknown>["paginateBy"]>;
847
+ readonly default: undefined;
848
+ };
643
849
  source: {
644
850
  readonly type: PropType<import("@vueye-table/vue").TableSource<unknown> | undefined>;
645
851
  readonly default: undefined;
@@ -756,6 +962,14 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
756
962
  readonly type: PropType<import("@vueye-table/core").SelectScope>;
757
963
  readonly default: "all";
758
964
  };
965
+ treeColumn: {
966
+ readonly type: PropType<string | undefined>;
967
+ readonly default: undefined;
968
+ };
969
+ keepAliveDetail: {
970
+ readonly type: BooleanConstructor;
971
+ readonly default: false;
972
+ };
759
973
  virtual: {
760
974
  readonly type: PropType<boolean | import("@vueye-table/headless").ComponentVirtualOptions>;
761
975
  readonly default: false;
@@ -792,14 +1006,27 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
792
1006
  "onUpdate:filters"?: (...args: any[]) => any;
793
1007
  "onUpdate:hiddenColumns"?: (...args: any[]) => any;
794
1008
  "onUpdate:selected"?: (...args: any[]) => any;
1009
+ "onUpdate:expanded"?: (...args: any[]) => any;
795
1010
  "onState-change"?: (state: TableState) => any;
796
1011
  "onRow-click"?: (item: unknown, row: TableRow<unknown>) => any;
1012
+ onExpand?: (item: unknown, row: TableRow<unknown>) => any;
1013
+ onCollapse?: (item: unknown, row: TableRow<unknown>) => any;
797
1014
  }>, {
1015
+ getChildren: ((row: any) => readonly any[] | undefined) | undefined;
1016
+ setChildren: ((row: any, children: readonly any[]) => any) | undefined;
1017
+ getParentKey: ((row: any) => RowKey | null | undefined) | undefined;
1018
+ hasChildren: ((row: any) => boolean) | undefined;
1019
+ loadChildren: ((row: TableRow<any>, signal: AbortSignal) => Promise<readonly any[]>) | undefined;
1020
+ treeFilter: import("@vueye-table/core").TreeFilter | undefined;
1021
+ paginateBy: import("@vueye-table/core").TreePagination | undefined;
798
1022
  page: number;
799
1023
  data: readonly unknown[];
800
- searchable: boolean;
801
- columnToggle: boolean;
802
- pagination: boolean;
1024
+ selectable: boolean | "single" | "multiple";
1025
+ selected: readonly RowKey[];
1026
+ loadingText: string;
1027
+ rowCanExpand: ((row: any) => boolean) | undefined;
1028
+ expandMode: import("@vueye-table/core").ExpandMode;
1029
+ expanded: import("@vueye-table/core").ExpandedState | undefined;
803
1030
  source: import("@vueye-table/vue").TableSource<unknown> | undefined;
804
1031
  loadMore: import("@vueye-table/vue").LoadMore<unknown> | undefined;
805
1032
  endThreshold: number;
@@ -817,7 +1044,10 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
817
1044
  stickyHeader: boolean;
818
1045
  theme: "light" | "dark";
819
1046
  maxHeight: string;
1047
+ searchable: boolean;
820
1048
  searchPlaceholder: string;
1049
+ columnToggle: boolean;
1050
+ pagination: boolean;
821
1051
  pageSizeOptions: readonly number[];
822
1052
  pageSize: number;
823
1053
  sorting: readonly import("@vueye-table/core").SortRule[];
@@ -825,15 +1055,14 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
825
1055
  filters: Readonly<Record<string, unknown>>;
826
1056
  hiddenColumns: readonly string[];
827
1057
  selectScope: import("@vueye-table/core").SelectScope;
1058
+ treeColumn: string | undefined;
1059
+ keepAliveDetail: boolean;
828
1060
  virtual: boolean | import("@vueye-table/headless").ComponentVirtualOptions;
829
1061
  height: string | undefined;
830
1062
  rowHeight: number;
831
1063
  overscan: number;
832
1064
  virtualColumns: boolean;
833
1065
  columnWidth: number;
834
- selected: readonly RowKey[];
835
- selectable: boolean | "single" | "multiple";
836
- loadingText: string;
837
1066
  }, SlotsType<{
838
1067
  [key: `cell.${string}`]: CellSlotProps;
839
1068
  [key: `header.${string}`]: {
@@ -852,6 +1081,7 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
852
1081
  table: unknown;
853
1082
  };
854
1083
  status: StatusSlotProps;
1084
+ expanded: DetailSlotProps;
855
1085
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
856
1086
  //#endregion
857
1087
  //#region src/index.d.ts
@@ -1 +1 @@
1
- {"version":3,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1,6 +1,6 @@
1
1
  import { inferColumns } from "@vueye-table/core";
2
- import { DataTableBody, DataTableCaption, DataTableCell, DataTableRoot, DataTableRow, DataTableSelectAll, DataTableSelectRow, DataTableViewport, virtualProps } from "@vueye-table/headless";
3
- import { VtColumnVisibility, VtEmpty, VtGrid, VtHeader, VtLoadMore, VtPageSize, VtPagination, VtSearch, VtStatus, VtToolbar } from "@vueye-table/styled";
2
+ import { DataTableBody, DataTableCaption, DataTableCell, DataTableRoot, DataTableRow, DataTableSelectAll, DataTableSelectRow, DataTableViewport, hierarchyProps, resolveTreeColumn, virtualProps } from "@vueye-table/headless";
3
+ import { VtColumnVisibility, VtEmpty, VtExpandToggle, VtGrid, VtHeader, VtLoadMore, VtPageSize, VtPagination, VtSearch, VtStatus, VtToolbar, VtTreeCell } from "@vueye-table/styled";
4
4
  import { provideDataTable, useDataTable } from "@vueye-table/vue";
5
5
  import { computed, defineComponent, h } from "vue";
6
6
 
@@ -13,9 +13,90 @@ export * from "@vueye-table/styled"
13
13
  export * from "@vueye-table/vue"
14
14
 
15
15
  //#region src/shared.ts
16
+ /** Isolate application cell slots from unrelated table/grid navigation updates. */
17
+ const CellContent = defineComponent({
18
+ name: "VueyeCellContent",
19
+ props: {
20
+ row: {
21
+ type: Object,
22
+ required: true
23
+ },
24
+ column: {
25
+ type: Object,
26
+ required: true
27
+ },
28
+ value: {
29
+ type: null,
30
+ required: true
31
+ },
32
+ display: {
33
+ type: String,
34
+ required: true
35
+ },
36
+ editable: {
37
+ type: Boolean,
38
+ default: false
39
+ },
40
+ render: {
41
+ type: Function,
42
+ required: true
43
+ }
44
+ },
45
+ setup(props) {
46
+ return () => props.render({
47
+ item: props.row.original,
48
+ row: props.row,
49
+ column: props.column,
50
+ value: props.value,
51
+ display: props.display,
52
+ editable: props.editable
53
+ });
54
+ }
55
+ });
16
56
  /** Props both full components share. */
17
57
  const commonProps = {
18
58
  ...virtualProps,
59
+ ...hierarchyProps,
60
+ rowCanExpand: {
61
+ type: Function,
62
+ default: void 0
63
+ },
64
+ expandMode: {
65
+ type: String,
66
+ default: "multiple"
67
+ },
68
+ expanded: {
69
+ type: [Boolean, Array],
70
+ default: void 0
71
+ },
72
+ getChildren: {
73
+ type: Function,
74
+ default: void 0
75
+ },
76
+ setChildren: {
77
+ type: Function,
78
+ default: void 0
79
+ },
80
+ getParentKey: {
81
+ type: Function,
82
+ default: void 0
83
+ },
84
+ hasChildren: {
85
+ type: Function,
86
+ default: void 0
87
+ },
88
+ loadChildren: {
89
+ type: Function,
90
+ default: void 0
91
+ },
92
+ treeFilter: {
93
+ type: String,
94
+ default: void 0
95
+ },
96
+ paginateBy: {
97
+ type: String,
98
+ default: void 0
99
+ },
19
100
  source: {
20
101
  type: [Object, Function],
21
102
  default: void 0
@@ -149,7 +230,8 @@ const stateEmits = [
149
230
  "update:search",
150
231
  "update:filters",
151
232
  "update:hiddenColumns",
152
- "update:selected"
233
+ "update:selected",
234
+ "update:expanded"
153
235
  ];
154
236
  /** The state a parent controls through `v-model`, as a table state patch. */
155
237
  function controlledState(props, current) {
@@ -159,6 +241,7 @@ function controlledState(props, current) {
159
241
  filters: props.filters,
160
242
  hiddenColumns: props.hiddenColumns,
161
243
  selection: props.selected,
244
+ expanded: props.expanded,
162
245
  pagination: props.page !== void 0 || props.pageSize !== void 0 ? {
163
246
  page: props.page ?? current.page,
164
247
  pageSize: props.pageSize ?? current.pageSize
@@ -177,6 +260,37 @@ function emitStateChanges(emit, state, previous) {
177
260
  if (state.filters !== previous.filters) emit("update:filters", state.filters);
178
261
  if (state.hiddenColumns !== previous.hiddenColumns) emit("update:hiddenColumns", state.hiddenColumns);
179
262
  if (state.selection !== previous.selection) emit("update:selected", state.selection);
263
+ if (state.expanded !== previous.expanded) emit("update:expanded", state.expanded);
264
+ }
265
+ function expansionOptions(props, detail) {
266
+ return {
267
+ getRowCanExpand: props.rowCanExpand ?? (detail ? () => true : void 0),
268
+ expandMode: props.expandMode,
269
+ getChildren: props.getChildren,
270
+ setChildren: props.setChildren,
271
+ getParentKey: props.getParentKey,
272
+ hasChildren: props.hasChildren,
273
+ loadChildren: props.loadChildren,
274
+ treeFilter: props.treeFilter,
275
+ paginateBy: props.paginateBy
276
+ };
277
+ }
278
+ function emitExpansionChanges(emit, state, previous, table) {
279
+ if (!table || state.expanded === previous.expanded) return;
280
+ const keys = /* @__PURE__ */ new Set([
281
+ ...table.processedRows.map((row) => row.key),
282
+ ...state.expanded === true ? [] : state.expanded,
283
+ ...previous.expanded === true ? [] : previous.expanded
284
+ ]);
285
+ for (const key of keys) {
286
+ const before = previous.expanded === true || previous.expanded.includes(key);
287
+ const after = state.expanded === true || state.expanded.includes(key);
288
+ const row = table.getRow(key);
289
+ if (row?.canExpand && before !== after) {
290
+ if (after) emit("expand", row.original, row);
291
+ else emit("collapse", row.original, row);
292
+ }
293
+ }
180
294
  }
181
295
  /**
182
296
  * The given columns, or columns inferred from the data. Inferred columns are reused while the
@@ -255,7 +369,9 @@ const VueyeGrid = defineComponent({
255
369
  "update:data": (_data) => true,
256
370
  edit: (_changes) => true,
257
371
  "edit-error": (_issues) => true,
258
- export: (_csv) => true
372
+ export: (_csv) => true,
373
+ expand: (_item, _row) => true,
374
+ collapse: (_item, _row) => true
259
375
  },
260
376
  setup(props, { emit, slots, expose, attrs }) {
261
377
  const resolveColumns = createColumnResolver();
@@ -270,6 +386,7 @@ const VueyeGrid = defineComponent({
270
386
  };
271
387
  let binding;
272
388
  const table = useDataTable({
389
+ ...expansionOptions(props, !!slots.expanded),
273
390
  data: () => props.data,
274
391
  source: computed(() => props.source),
275
392
  loadMore: computed(() => props.loadMore),
@@ -301,6 +418,7 @@ const VueyeGrid = defineComponent({
301
418
  },
302
419
  onStateChange(state, previous) {
303
420
  emitStateChanges(emit, state, previous);
421
+ emitExpansionChanges(emit, state, previous, binding?.table.getSnapshot());
304
422
  emit("state-change", state);
305
423
  }
306
424
  });
@@ -309,13 +427,14 @@ const VueyeGrid = defineComponent({
309
427
  expose({ table });
310
428
  const gridSlots = () => {
311
429
  const forwarded = {};
430
+ if (slots.expanded) forwarded["expanded"] = slots.expanded;
312
431
  for (const [name, slot] of Object.entries(slots)) if (name === "default" && slot) forwarded[name] = slot;
313
432
  else if (name.startsWith("cell.")) {
314
433
  const cellSlot = slots[name];
315
- forwarded[name] = (cellProps) => cellSlot?.({
434
+ forwarded[name] = (cellProps) => cellSlot ? h(CellContent, {
316
435
  ...cellProps,
317
- item: cellProps.row.original
318
- });
436
+ render: cellSlot
437
+ }) : cellProps.display;
319
438
  }
320
439
  return forwarded;
321
440
  };
@@ -357,9 +476,11 @@ const VueyeGrid = defineComponent({
357
476
  rowHeight: props.rowHeight,
358
477
  overscan: props.overscan,
359
478
  columnWidth: props.columnWidth,
479
+ treeColumn: props.treeColumn,
480
+ keepAliveDetail: props.keepAliveDetail,
360
481
  ...props.maxHeight ? { style: { "--vt-max-height": props.maxHeight } } : {}
361
482
  }, gridSlots()),
362
- props.pagination || table.loadingMode || slots.status ? h(VtToolbar, { class: "vt-footer" }, () => [
483
+ props.pagination || table.loadingMode || slots.status || table.tree ? h(VtToolbar, { class: "vt-footer" }, () => [
363
484
  h(VtStatus, null, slots.status ? { default: (status) => slots.status?.(status) } : void 0),
364
485
  ...table.loadingMode ? [h(VtLoadMore)] : [],
365
486
  props.pagination && table.paginate ? h("div", { class: "vt-footer-controls" }, [h(VtPageSize, { options: props.pageSizeOptions }), h(VtPagination)]) : null
@@ -402,7 +523,9 @@ const VueyeTable = defineComponent({
402
523
  emits: {
403
524
  ...Object.fromEntries(stateEmits.map((name) => [name, null])),
404
525
  "state-change": (_state) => true,
405
- "row-click": (_item, _row) => true
526
+ "row-click": (_item, _row) => true,
527
+ expand: (_item, _row) => true,
528
+ collapse: (_item, _row) => true
406
529
  },
407
530
  slots: Object,
408
531
  setup(props, { emit, slots, expose }) {
@@ -414,6 +537,7 @@ const VueyeTable = defineComponent({
414
537
  const resolveColumns = createColumnResolver();
415
538
  let binding;
416
539
  const table = useDataTable({
540
+ ...expansionOptions(props, !!slots.expanded),
417
541
  data: () => props.data,
418
542
  source: computed(() => props.source),
419
543
  loadMore: computed(() => props.loadMore),
@@ -429,6 +553,7 @@ const VueyeTable = defineComponent({
429
553
  state: () => controlledState(props, binding?.table.getState().pagination ?? initialPagination),
430
554
  onStateChange(state, previous) {
431
555
  emitStateChanges(emit, state, previous);
556
+ emitExpansionChanges(emit, state, previous, binding?.table.getSnapshot());
432
557
  emit("state-change", state);
433
558
  }
434
559
  });
@@ -439,33 +564,54 @@ const VueyeTable = defineComponent({
439
564
  const selectable = () => selectionMode.value !== "none";
440
565
  const cell = (row, column) => {
441
566
  const slot = slots[`cell.${column.id}`];
567
+ const treeCell = table.tree && column.id === resolveTreeColumn(table, props.treeColumn);
442
568
  return h(DataTableCell, {
443
569
  key: column.id,
444
570
  row,
445
- column
446
- }, slot ? { default: ({ value, display }) => slot({
447
- item: row.original,
448
- row,
449
- value,
450
- display,
451
- column
452
- }) } : void 0);
571
+ column,
572
+ tree: false
573
+ }, {
574
+ default: ({ value, display }) => {
575
+ const content = () => slot ? h(CellContent, {
576
+ row,
577
+ column,
578
+ value,
579
+ display,
580
+ render: slot
581
+ }) : display;
582
+ return treeCell ? h(VtTreeCell, { row }, { default: content }) : content();
583
+ },
584
+ $stable: true
585
+ });
453
586
  };
454
- const body = (rows = table.rows) => {
455
- const width = table.columns.length + (selectable() ? 1 : 0);
587
+ const hasDetails = () => !!slots.expanded && !table.tree;
588
+ const width = () => table.columns.length + (selectable() ? 1 : 0) + (hasDetails() ? 1 : 0);
589
+ const emptyBody = () => {
456
590
  if (table.rows.length === 0) {
457
591
  const content = busy() ? slots.loading?.({}) ?? h(VtEmpty, { text: props.loadingText }) : slots.empty?.({}) ?? h(VtEmpty, { text: table.loadingMode && table.loadState === "error" ? "Could not load rows." : "No matching rows" });
458
- return h("tr", { "data-empty": "" }, [h("td", { colspan: Math.max(1, width) }, content)]);
592
+ return h("tr", { "data-empty": "" }, [h("td", { colspan: Math.max(1, width()) }, content)]);
459
593
  }
460
- return rows.map((row) => h(DataTableRow, {
461
- key: row.key,
462
- row,
463
- onClick: () => emit("row-click", row.original, row)
464
- }, () => [selectable() ? h("td", {
465
- class: "vt-selection-cell",
466
- onClick: (event) => event.stopPropagation()
467
- }, [h(DataTableSelectRow, { row })]) : null, ...table.columns.map((column) => cell(row, column))]));
594
+ return null;
595
+ };
596
+ const cells = (row) => {
597
+ return [
598
+ hasDetails() ? h("td", { class: "vt-expansion-cell" }, [h(VtExpandToggle, { row })]) : null,
599
+ selectable() ? h("td", {
600
+ class: "vt-selection-cell",
601
+ onClick: (event) => event.stopPropagation()
602
+ }, [h(DataTableSelectRow, { row })]) : null,
603
+ ...table.columns.map((column) => cell(row, column))
604
+ ];
468
605
  };
606
+ const bodyRow = ({ row, rowIndex }) => h(DataTableRow, {
607
+ key: row.key,
608
+ row,
609
+ rowIndex,
610
+ onClick: () => emit("row-click", row.original, row)
611
+ }, {
612
+ default: () => cells(row),
613
+ $stable: true
614
+ });
469
615
  const headerSlots = () => {
470
616
  const forwarded = {};
471
617
  for (const column of table.columns) {
@@ -474,10 +620,14 @@ const VueyeTable = defineComponent({
474
620
  }
475
621
  return {
476
622
  ...forwarded,
477
- before: () => selectable() ? h("th", {
623
+ before: () => [hasDetails() ? h("th", {
624
+ class: "vt-expansion-cell",
625
+ scope: "col",
626
+ "aria-label": "Details"
627
+ }) : null, selectable() ? h("th", {
478
628
  class: "vt-selection-cell",
479
629
  scope: "col"
480
- }, selectionMode.value === "multiple" ? [h(DataTableSelectAll)] : []) : null
630
+ }, selectionMode.value === "multiple" ? [h(DataTableSelectAll)] : []) : null]
481
631
  };
482
632
  };
483
633
  const tableContent = () => {
@@ -486,8 +636,12 @@ const VueyeTable = defineComponent({
486
636
  h(VtHeader, null, headerSlots()),
487
637
  h(DataTableBody, {
488
638
  class: "vt-body",
489
- colspan: table.columns.length + (selectable() ? 1 : 0)
490
- }, { default: ({ rows }) => body(rows) })
639
+ colspan: width()
640
+ }, {
641
+ ...table.rows.length === 0 ? { default: emptyBody } : {},
642
+ row: bodyRow,
643
+ detail: slots.expanded ? (detail) => slots.expanded?.(detail) : void 0
644
+ })
491
645
  ];
492
646
  return props.virtual ? h(DataTableViewport, {
493
647
  class: "vt-scroll",
@@ -498,13 +652,17 @@ const VueyeTable = defineComponent({
498
652
  class: "vt-table",
499
653
  virtual: props.virtual,
500
654
  rowHeight: props.rowHeight,
501
- overscan: props.overscan
502
- }, children) }) : h("div", { class: "vt-scroll" }, [h("table", {
655
+ overscan: props.overscan,
656
+ treeColumn: props.treeColumn,
657
+ keepAliveDetail: props.keepAliveDetail
658
+ }, children) }) : h("div", { class: "vt-scroll" }, [h(DataTableRoot, {
659
+ table,
660
+ treeColumn: props.treeColumn,
661
+ keepAliveDetail: props.keepAliveDetail,
503
662
  class: "vt-table",
504
- "aria-rowcount": table.rowCount + 1,
505
663
  "aria-colcount": table.columns.length,
506
664
  "aria-busy": busy() ? "true" : void 0
507
- }, children())]);
665
+ }, children)]);
508
666
  };
509
667
  return () => h("div", {
510
668
  class: "vt-surface vueye-table",
@@ -530,7 +688,7 @@ const VueyeTable = defineComponent({
530
688
  role: "presentation"
531
689
  }),
532
690
  tableContent(),
533
- props.pagination && (!props.virtual || table.paginate) || slots.footer || slots.status || table.loadingMode ? h(VtToolbar, { class: "vt-footer" }, () => [
691
+ props.pagination && (!props.virtual || table.paginate) || slots.footer || slots.status || table.tree || table.loadingMode ? h(VtToolbar, { class: "vt-footer" }, () => [
534
692
  h(VtStatus, null, slots.status ? { default: (status) => slots.status?.(status) } : props.loading && table.rows.length === 0 ? { default: () => props.loadingText } : void 0),
535
693
  ...table.loadingMode ? [h(VtLoadMore)] : [],
536
694
  slots.footer?.({ table }),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/shared.ts","../src/vueye-grid.ts","../src/vueye-table.ts","../src/plugin.ts"],"sourcesContent":["import {\n inferColumns,\n type AnyColumnDef,\n type PaginationState,\n type RowKey,\n type SelectScope,\n type SortRule,\n type TableState,\n type TableStatePatch,\n} from \"@vueye-table/core\";\nimport { virtualProps } from \"@vueye-table/headless\";\nimport type { Density } from \"@vueye-table/styled\";\nimport type { TableSource, LoadMore } from \"@vueye-table/vue\";\nimport type { PropType } from \"vue\";\n\n/** Props both full components share. */\nexport const commonProps = {\n ...virtualProps,\n source: {\n type: [Object, Function] as PropType<TableSource<unknown> | undefined>,\n default: undefined,\n },\n loadMore: { type: Function as PropType<LoadMore<unknown> | undefined>, default: undefined },\n endThreshold: { type: Number, default: 5 },\n manual: { type: Boolean as PropType<boolean | undefined>, default: undefined },\n rowCount: { type: Number as PropType<number | undefined>, default: undefined },\n /** Override the virtual default of no pagination; permits virtualizing a large page. */\n paginate: { type: Boolean as PropType<boolean | undefined>, default: undefined },\n /** Column definitions. Without them, columns are inferred from the data. */\n columns: { type: Array as PropType<readonly AnyColumnDef[]>, default: undefined },\n /** A path into each row, or a function, giving its key. Defaults to `id`, then position. */\n rowKey: {\n type: [String, Function] as PropType<string | ((row: any, index: number) => RowKey)>,\n default: undefined,\n },\n caption: { type: String, default: undefined },\n loading: { type: Boolean, default: false },\n density: { type: String as PropType<Density>, default: \"comfortable\" },\n striped: { type: Boolean, default: false },\n bordered: { type: Boolean, default: false },\n hover: { type: Boolean, default: true },\n stickyHeader: { type: Boolean, default: false },\n theme: { type: String as PropType<\"light\" | \"dark\">, default: undefined },\n /** A CSS height that makes the body scroll, such as `\"24rem\"`. */\n maxHeight: { type: String, default: undefined },\n\n searchable: { type: Boolean, default: true },\n searchPlaceholder: { type: String, default: \"Search…\" },\n columnToggle: { type: Boolean, default: true },\n pagination: { type: Boolean, default: true },\n pageSizeOptions: { type: Array as PropType<readonly number[]>, default: () => [5, 10, 20, 50] },\n\n page: { type: Number, default: undefined },\n pageSize: { type: Number, default: undefined },\n sorting: { type: Array as PropType<readonly SortRule[]>, default: undefined },\n search: { type: String, default: undefined },\n filters: { type: Object as PropType<Readonly<Record<string, unknown>>>, default: undefined },\n hiddenColumns: { type: Array as PropType<readonly string[]>, default: undefined },\n selectScope: { type: String as PropType<SelectScope>, default: \"all\" },\n} as const;\n\nexport const stateEmits = [\n \"update:page\",\n \"update:pageSize\",\n \"update:sorting\",\n \"update:search\",\n \"update:filters\",\n \"update:hiddenColumns\",\n \"update:selected\",\n] as const;\n\ninterface ControlledProps {\n readonly page: number | undefined;\n readonly pageSize: number | undefined;\n readonly sorting: readonly SortRule[] | undefined;\n readonly search: string | undefined;\n readonly filters: Readonly<Record<string, unknown>> | undefined;\n readonly hiddenColumns: readonly string[] | undefined;\n readonly selected?: readonly RowKey[] | undefined;\n}\n\n/** The state a parent controls through `v-model`, as a table state patch. */\nexport function controlledState(props: ControlledProps, current: PaginationState): TableStatePatch {\n return {\n sorting: props.sorting,\n search: props.search,\n filters: props.filters,\n hiddenColumns: props.hiddenColumns,\n selection: props.selected,\n pagination:\n props.page !== undefined || props.pageSize !== undefined\n ? { page: props.page ?? current.page, pageSize: props.pageSize ?? current.pageSize }\n : undefined,\n };\n}\n\n/**\n * Emit a `v-model` update for each piece of state that changed. The state is frozen and replaced\n * piece by piece, so identity tells what changed.\n */\nexport function emitStateChanges(\n emit: (event: (typeof stateEmits)[number], value: unknown) => void,\n state: TableState,\n previous: TableState,\n): void {\n if (state.pagination.page !== previous.pagination.page) {\n emit(\"update:page\", state.pagination.page);\n }\n if (state.pagination.pageSize !== previous.pagination.pageSize) {\n emit(\"update:pageSize\", state.pagination.pageSize);\n }\n if (state.sorting !== previous.sorting) {\n emit(\"update:sorting\", state.sorting);\n }\n if (state.search !== previous.search) {\n emit(\"update:search\", state.search);\n }\n if (state.filters !== previous.filters) {\n emit(\"update:filters\", state.filters);\n }\n if (state.hiddenColumns !== previous.hiddenColumns) {\n emit(\"update:hiddenColumns\", state.hiddenColumns);\n }\n if (state.selection !== previous.selection) {\n emit(\"update:selected\", state.selection);\n }\n}\n\n/**\n * The given columns, or columns inferred from the data. Inferred columns are reused while the\n * data keeps the same fields, so an edit that replaces the array does not rebuild every row.\n */\nexport function createColumnResolver(): (\n columns: readonly AnyColumnDef[] | undefined,\n data: readonly unknown[],\n) => readonly AnyColumnDef[] {\n let inferred:\n | { readonly signature: string; readonly columns: readonly AnyColumnDef[] }\n | undefined;\n return (columns, data) => {\n if (columns) {\n return columns;\n }\n const next = inferColumns(data);\n const signature = next.map((column) => column.id).join(\"\\u0000\");\n if (inferred?.signature !== signature) {\n inferred = { signature, columns: next };\n }\n return inferred.columns;\n };\n}\n","import type { CellChange, ColumnDef, TableIssue, TableState } from \"@vueye-table/core\";\nimport type { GridCellSlotProps, TableStatusSlotProps } from \"@vueye-table/headless\";\nimport {\n VtGrid,\n VtPageSize,\n VtPagination,\n VtSearch,\n VtStatus,\n VtLoadMore,\n VtToolbar,\n} from \"@vueye-table/styled\";\nimport { provideDataTable, useDataTable, type DataTableBinding } from \"@vueye-table/vue\";\nimport { computed, defineComponent, h, type PropType, type SlotsType, type VNode } from \"vue\";\n\nimport {\n commonProps,\n controlledState,\n createColumnResolver,\n emitStateChanges,\n stateEmits,\n} from \"./shared\";\n\n/**\n * An editable spreadsheet over an array. Cells are edited in place with the keyboard or a double\n * click, ranges are selected with Shift or by dragging, and copy, cut, paste, clear, undo, and\n * redo work like a spreadsheet application. Every edit produces a new array through\n * `update:data`; the array passed in is never mutated.\n */\nexport const VueyeGrid = defineComponent({\n name: \"VueyeGrid\",\n slots: Object as SlotsType<\n { [key: `cell.${string}`]: GridCellSlotProps & { readonly item: unknown } } & {\n default?: (props: Record<string, unknown>) => VNode[];\n status?: (props: TableStatusSlotProps) => VNode[];\n }\n >,\n props: {\n data: { type: Array as PropType<readonly unknown[]>, default: () => [] },\n ...commonProps,\n searchable: { type: Boolean, default: false },\n columnToggle: { type: Boolean, default: false },\n /** Page the grid. By default every row is on one page. */\n pagination: { type: Boolean, default: false },\n /** Columns are editable unless their definition says otherwise. Set `false` to lock all. */\n editable: { type: Boolean, default: true },\n rowNumbers: { type: Boolean, default: true },\n columnLetters: { type: Boolean, default: false },\n label: { type: String, default: \"Spreadsheet\" },\n /** Show undo, redo, and CSV export buttons. */\n toolbar: { type: Boolean, default: true },\n },\n emits: {\n ...Object.fromEntries(stateEmits.map((name) => [name, null])),\n \"state-change\": (_state: TableState) => true,\n \"update:data\": (_data: readonly unknown[]) => true,\n edit: (_changes: readonly CellChange<unknown>[]) => true,\n \"edit-error\": (_issues: readonly TableIssue[]) => true,\n export: (_csv: string) => true,\n } as { [K in (typeof stateEmits)[number]]: null } & {\n \"state-change\": (state: TableState) => boolean;\n \"update:data\": (data: readonly unknown[]) => boolean;\n edit: (changes: readonly CellChange<unknown>[]) => boolean;\n \"edit-error\": (issues: readonly TableIssue[]) => boolean;\n export: (csv: string) => boolean;\n },\n setup(props, { emit, slots, expose, attrs }) {\n const resolveColumns = createColumnResolver();\n const columns = computed(() =>\n resolveColumns(props.columns, props.data).map(\n (column) =>\n ({\n ...column,\n editable: props.editable ? (column.editable ?? true) : false,\n }) as ColumnDef<unknown>,\n ),\n );\n const everyRow = (): number => Math.max(1, props.data.length);\n const initialPagination = {\n page: props.page ?? 1,\n pageSize: props.pagination ? (props.pageSize ?? props.pageSizeOptions[0] ?? 10) : everyRow(),\n };\n let binding: DataTableBinding<unknown> | undefined;\n const table = useDataTable<unknown>({\n data: () => props.data,\n source: computed(() => props.source),\n loadMore: computed(() => props.loadMore),\n endThreshold: props.endThreshold,\n manual: props.manual,\n rowCount: () => props.rowCount,\n columns,\n rowKey: props.rowKey as never,\n paginate:\n props.paginate ??\n (props.source || props.loadMore ? false : props.virtual ? props.pagination : true),\n selectionMode: \"none\",\n initialState: { pagination: initialPagination },\n state: () => {\n const controlled = controlledState(\n props,\n binding?.table.getState().pagination ?? initialPagination,\n );\n return {\n ...controlled,\n selection: undefined,\n pagination: props.pagination ? controlled.pagination : { page: 1, pageSize: everyRow() },\n };\n },\n onEditIssues(issues) {\n emit(\"edit-error\", issues);\n },\n onDataChange(data, changes) {\n emit(\"update:data\", data);\n emit(\"edit\", changes);\n },\n onStateChange(state, previous) {\n emitStateChanges(emit as never, state, previous);\n emit(\"state-change\", state);\n },\n });\n binding = table;\n provideDataTable(table);\n expose({ table });\n\n // `cell.<id>` slots also receive the row's data as `item`, as they do on `<VueyeTable>`.\n const gridSlots = (): Record<string, unknown> => {\n const forwarded: Record<string, unknown> = {};\n for (const [name, slot] of Object.entries(slots)) {\n if (name === \"default\" && slot) {\n forwarded[name] = slot;\n } else if (name.startsWith(\"cell.\")) {\n const cellSlot = slots[name as `cell.${string}`];\n forwarded[name] = (cellProps: GridCellSlotProps) =>\n cellSlot?.({ ...cellProps, item: cellProps.row.original });\n }\n }\n return forwarded;\n };\n\n const button = (label: string, disabled: boolean, onClick: () => void) =>\n h(\"button\", { type: \"button\", class: \"vt-button\", disabled, onClick }, label);\n\n return () =>\n h(\"div\", { class: \"vt-theme vueye-grid\", \"data-vt-theme\": props.theme }, [\n props.toolbar || props.searchable\n ? h(VtToolbar, () => [\n props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,\n h(\"div\", { class: \"vt-toolbar-spacer\" }),\n props.toolbar\n ? [\n button(\"Undo\", !table.canUndo, () => table.undo()),\n button(\"Redo\", !table.canRedo, () => table.redo()),\n button(\"Export CSV\", false, () => emit(\"export\", table.exportRows())),\n ]\n : null,\n ])\n : null,\n h(\n VtGrid,\n {\n table,\n label: props.label,\n \"aria-describedby\": attrs[\"aria-describedby\"],\n rowNumbers: props.rowNumbers,\n columnLetters: props.columnLetters,\n density: props.density,\n striped: props.striped,\n bordered: props.bordered,\n hover: false,\n stickyHeader: props.stickyHeader,\n loading:\n props.loading || table.loadState === \"loading\" || table.loadState === \"streaming\",\n theme: props.theme,\n virtual: props.virtual,\n virtualColumns: props.virtualColumns,\n height: props.height,\n rowHeight: props.rowHeight,\n overscan: props.overscan,\n columnWidth: props.columnWidth,\n ...(props.maxHeight ? { style: { \"--vt-max-height\": props.maxHeight } } : {}),\n },\n gridSlots(),\n ),\n props.pagination || table.loadingMode || slots.status\n ? h(VtToolbar, { class: \"vt-footer\" }, () => [\n h(\n VtStatus,\n null,\n slots.status\n ? { default: (status: TableStatusSlotProps) => slots.status?.(status) }\n : undefined,\n ),\n ...(table.loadingMode ? [h(VtLoadMore)] : []),\n props.pagination && table.paginate\n ? h(\"div\", { class: \"vt-footer-controls\" }, [\n h(VtPageSize, { options: props.pageSizeOptions }),\n h(VtPagination),\n ])\n : null,\n ])\n : null,\n ]);\n },\n});\n","import type { ColumnDef, RowKey, TableRow, TableState } from \"@vueye-table/core\";\nimport {\n DataTableBody,\n DataTableCaption,\n DataTableCell,\n DataTableRow,\n DataTableSelectAll,\n DataTableSelectRow,\n DataTableRoot,\n DataTableViewport,\n type TableStatusSlotProps,\n} from \"@vueye-table/headless\";\nimport {\n VtColumnVisibility,\n VtEmpty,\n VtHeader,\n VtPageSize,\n VtPagination,\n VtSearch,\n VtStatus,\n VtLoadMore,\n VtToolbar,\n} from \"@vueye-table/styled\";\nimport { provideDataTable, useDataTable, type DataTableBinding } from \"@vueye-table/vue\";\nimport { computed, defineComponent, h, type PropType, type SlotsType, type VNodeChild } from \"vue\";\n\nimport {\n commonProps,\n controlledState,\n createColumnResolver,\n emitStateChanges,\n stateEmits,\n} from \"./shared\";\n\n/** Slot props of `cell.<column id>` and `cell`. */\nexport interface CellSlotProps {\n readonly item: unknown;\n readonly row: TableRow<unknown>;\n readonly value: unknown;\n readonly display: string;\n readonly column: { readonly id: string; readonly header: string };\n}\n\n/** Slot props of `status`, the \"1–10 of 57 rows\" line. */\nexport type StatusSlotProps = TableStatusSlotProps;\n\n/**\n * A complete data table: search, column visibility, sorting, selection, pagination, a live\n * status line, loading and empty states, and theming. Every piece of state is available as a\n * `v-model`, and `manual` hands searching, sorting, and paging to a server.\n */\nexport const VueyeTable = defineComponent({\n name: \"VueyeTable\",\n props: {\n data: { type: Array as PropType<readonly unknown[]>, default: () => [] },\n ...commonProps,\n /** `true` or `\"multiple\"` for checkboxes, `\"single\"` for one row at a time. */\n selectable: {\n type: [Boolean, String] as PropType<boolean | \"single\" | \"multiple\">,\n default: false,\n },\n selected: { type: Array as PropType<readonly RowKey[]>, default: undefined },\n /** The data is one page from a server; `rowCount` is the total. */\n /** Shown instead of the empty state while `loading` and there are no rows yet. */\n loadingText: { type: String, default: \"Loading…\" },\n },\n emits: {\n ...Object.fromEntries(stateEmits.map((name) => [name, null])),\n \"state-change\": (_state: TableState) => true,\n \"row-click\": (_item: unknown, _row: TableRow<unknown>) => true,\n } as {\n [K in (typeof stateEmits)[number]]: null;\n } & {\n \"state-change\": (state: TableState) => boolean;\n \"row-click\": (item: unknown, row: TableRow<unknown>) => boolean;\n },\n slots: Object as SlotsType<\n {\n [key: `cell.${string}`]: CellSlotProps;\n [key: `header.${string}`]: { column: { id: string; header: string } };\n } & {\n toolbar: { table: unknown };\n empty: Record<string, never>;\n loading: Record<string, never>;\n footer: { table: unknown };\n status: StatusSlotProps;\n }\n >,\n setup(props, { emit, slots, expose }) {\n const selectionMode = computed(() =>\n props.selectable === false ? \"none\" : props.selectable === \"single\" ? \"single\" : \"multiple\",\n );\n const initialPagination = {\n page: props.page ?? 1,\n pageSize: props.pageSize ?? props.pageSizeOptions[0] ?? 10,\n };\n const resolveColumns = createColumnResolver();\n let binding: DataTableBinding<unknown> | undefined;\n const table = useDataTable<unknown>({\n data: () => props.data,\n source: computed(() => props.source),\n loadMore: computed(() => props.loadMore),\n endThreshold: props.endThreshold,\n columns: () => resolveColumns(props.columns, props.data) as readonly ColumnDef<unknown>[],\n rowKey: props.rowKey as never,\n manual: props.manual,\n paginate: props.paginate ?? !(props.virtual || props.source || props.loadMore),\n rowCount: () => props.rowCount,\n selectionMode: selectionMode.value,\n selectScope: props.selectScope,\n initialState: { pagination: initialPagination },\n state: () =>\n controlledState(props, binding?.table.getState().pagination ?? initialPagination),\n onStateChange(state, previous) {\n emitStateChanges(emit as never, state, previous);\n emit(\"state-change\", state);\n },\n });\n binding = table;\n provideDataTable(table);\n expose({ table });\n const busy = (): boolean =>\n props.loading || table.loadState === \"loading\" || table.loadState === \"streaming\";\n\n const selectable = (): boolean => selectionMode.value !== \"none\";\n\n const cell = (row: TableRow<unknown>, column: (typeof table.columns)[number]): VNodeChild => {\n const slot = slots[`cell.${column.id}`];\n return h(\n DataTableCell,\n { key: column.id, row, column },\n slot\n ? {\n default: ({ value, display }: { value: unknown; display: string }) =>\n slot({ item: row.original, row, value, display, column }),\n }\n : undefined,\n );\n };\n\n const body = (rows: readonly TableRow<unknown>[] = table.rows): VNodeChild => {\n const width = table.columns.length + (selectable() ? 1 : 0);\n if (table.rows.length === 0) {\n // While the first page is loading there is nothing to match yet, so say that instead.\n const content = busy()\n ? (slots.loading?.({}) ?? h(VtEmpty, { text: props.loadingText }))\n : (slots.empty?.({}) ??\n h(VtEmpty, {\n text:\n table.loadingMode && table.loadState === \"error\"\n ? \"Could not load rows.\"\n : \"No matching rows\",\n }));\n return h(\"tr\", { \"data-empty\": \"\" }, [h(\"td\", { colspan: Math.max(1, width) }, content)]);\n }\n return rows.map((row) =>\n h(\n DataTableRow,\n { key: row.key, row, onClick: () => emit(\"row-click\", row.original, row) },\n () => [\n selectable()\n ? h(\n \"td\",\n {\n class: \"vt-selection-cell\",\n onClick: (event: Event) => event.stopPropagation(),\n },\n [h(DataTableSelectRow, { row })],\n )\n : null,\n ...table.columns.map((column) => cell(row, column)),\n ],\n ),\n );\n };\n\n const headerSlots = () => {\n const forwarded: Record<string, unknown> = {};\n for (const column of table.columns) {\n const slot = slots[`header.${column.id}`];\n if (slot) {\n forwarded[`header.${column.id}`] = () => slot({ column });\n }\n }\n return {\n ...forwarded,\n before: () =>\n selectable()\n ? h(\n \"th\",\n { class: \"vt-selection-cell\", scope: \"col\" },\n selectionMode.value === \"multiple\" ? [h(DataTableSelectAll)] : [],\n )\n : null,\n };\n };\n\n const tableContent = (): VNodeChild => {\n const children = () => [\n props.caption ? h(DataTableCaption, () => props.caption) : null,\n h(VtHeader, null, headerSlots()),\n h(\n DataTableBody,\n { class: \"vt-body\", colspan: table.columns.length + (selectable() ? 1 : 0) },\n { default: ({ rows }: { rows: readonly TableRow<unknown>[] }) => body(rows) },\n ),\n ];\n return props.virtual\n ? h(\n DataTableViewport,\n {\n class: \"vt-scroll\",\n height: props.height ?? \"24rem\",\n style: { \"--vt-row-height\": `${props.rowHeight}px` },\n },\n {\n default: () =>\n h(\n DataTableRoot,\n {\n table,\n class: \"vt-table\",\n virtual: props.virtual,\n rowHeight: props.rowHeight,\n overscan: props.overscan,\n },\n children,\n ),\n },\n )\n : h(\"div\", { class: \"vt-scroll\" }, [\n h(\n \"table\",\n {\n class: \"vt-table\",\n \"aria-rowcount\": table.rowCount + 1,\n \"aria-colcount\": table.columns.length,\n \"aria-busy\": busy() ? \"true\" : undefined,\n },\n children(),\n ),\n ]);\n };\n\n return () =>\n h(\n \"div\",\n {\n class: \"vt-surface vueye-table\",\n \"data-density\": props.density,\n \"data-striped\": props.striped ? \"\" : undefined,\n \"data-bordered\": props.bordered ? \"\" : undefined,\n \"data-hover\": props.hover ? \"\" : undefined,\n \"data-sticky-header\": props.stickyHeader || props.virtual ? \"\" : undefined,\n \"data-virtual\": props.virtual ? \"\" : undefined,\n \"data-loading\": busy() ? \"\" : undefined,\n \"data-vt-theme\": props.theme,\n \"aria-busy\": props.loading ? \"true\" : undefined,\n style: props.maxHeight ? { \"--vt-max-height\": props.maxHeight } : undefined,\n },\n [\n h(\"div\", { class: \"vt-root\" }, [\n props.searchable || props.columnToggle || slots.toolbar\n ? h(VtToolbar, () => [\n props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,\n h(\"div\", { class: \"vt-toolbar-spacer\" }),\n slots.toolbar?.({ table }),\n props.columnToggle ? h(VtColumnVisibility) : null,\n ])\n : null,\n h(\"div\", { class: \"vt-progress\", role: \"presentation\" }),\n tableContent(),\n (props.pagination && (!props.virtual || table.paginate)) ||\n slots.footer ||\n slots.status ||\n table.loadingMode\n ? h(VtToolbar, { class: \"vt-footer\" }, () => [\n h(\n VtStatus,\n null,\n slots.status\n ? { default: (status: StatusSlotProps) => slots.status?.(status) }\n : props.loading && table.rows.length === 0\n ? { default: () => props.loadingText }\n : undefined,\n ),\n ...(table.loadingMode ? [h(VtLoadMore)] : []),\n slots.footer?.({ table }),\n props.pagination && table.paginate && (!props.virtual || table.paginate)\n ? h(\"div\", { class: \"vt-footer-controls\" }, [\n h(VtPageSize, { options: props.pageSizeOptions }),\n h(VtPagination),\n ])\n : null,\n ])\n : null,\n ]),\n ],\n );\n },\n});\n","import type { App, Plugin } from \"vue\";\n\nimport { VueyeGrid } from \"./vueye-grid\";\nimport { VueyeTable } from \"./vueye-table\";\n\n/** Register `<VueyeTable>` and `<VueyeGrid>` globally. */\nexport const VueyeTablePlugin: Plugin = {\n install(app: App): void {\n app.component(\"VueyeTable\", VueyeTable);\n app.component(\"VueyeGrid\", VueyeGrid);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAa,cAAc;CACzB,GAAG;CACH,QAAQ;EACN,MAAM,CAAC,QAAQ,QAAQ;EACvB,SAAS;CACX;CACA,UAAU;EAAE,MAAM;EAAqD,SAAS;CAAU;CAC1F,cAAc;EAAE,MAAM;EAAQ,SAAS;CAAE;CACzC,QAAQ;EAAE,MAAM;EAA0C,SAAS;CAAU;CAC7E,UAAU;EAAE,MAAM;EAAwC,SAAS;CAAU;;CAE7E,UAAU;EAAE,MAAM;EAA0C,SAAS;CAAU;;CAE/E,SAAS;EAAE,MAAM;EAA4C,SAAS;CAAU;;CAEhF,QAAQ;EACN,MAAM,CAAC,QAAQ,QAAQ;EACvB,SAAS;CACX;CACA,SAAS;EAAE,MAAM;EAAQ,SAAS;CAAU;CAC5C,SAAS;EAAE,MAAM;EAAS,SAAS;CAAM;CACzC,SAAS;EAAE,MAAM;EAA6B,SAAS;CAAc;CACrE,SAAS;EAAE,MAAM;EAAS,SAAS;CAAM;CACzC,UAAU;EAAE,MAAM;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M,UACN,MAAM,cACF,EAAE,WAAW,EAAE,OAAO,YAAY,SAAS;IACzC,EACE,UACA,MACA,MAAM,SACF,EAAE,UAAU,WAA4B,MAAM,SAAS,MAAM,EAAE,IAC/D,MAAM,WAAW,MAAM,KAAK,WAAW,IACrC,EAAE,eAAe,MAAM,YAAY,IACnC,MACR;IACA,GAAI,MAAM,cAAc,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;IAC3C,MAAM,SAAS,EAAE,MAAM,CAAC;IACxB,MAAM,cAAc,MAAM,aAAa,CAAC,MAAM,WAAW,MAAM,YAC3D,EAAE,OAAO,EAAE,OAAO,qBAAqB,GAAG,CACxC,EAAE,YAAY,EAAE,SAAS,MAAM,gBAAgB,CAAC,GAChD,EAAE,YAAY,CAChB,CAAC,IACD;GACN,CAAC,IACD;EACN,CAAC,CACH,CACF;CACJ;AACF,CAAC;;;;;ACtSD,MAAa,mBAA2B,EACtC,QAAQ,KAAgB;CACtB,IAAI,UAAU,cAAc,UAAU;CACtC,IAAI,UAAU,aAAa,SAAS;AACtC,EACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/shared.ts","../src/vueye-grid.ts","../src/vueye-table.ts","../src/plugin.ts"],"sourcesContent":["import {\n inferColumns,\n type AnyColumnDef,\n type PaginationState,\n type RowKey,\n type SelectScope,\n type SortRule,\n type TableState,\n type TableStatePatch,\n type ExpandedState,\n type ExpandMode,\n type TreeOptions,\n type TableRow,\n type TableColumn,\n} from \"@vueye-table/core\";\nimport { virtualProps } from \"@vueye-table/headless\";\nimport { hierarchyProps } from \"@vueye-table/headless\";\nimport type { Density } from \"@vueye-table/styled\";\nimport type { TableSource, LoadMore } from \"@vueye-table/vue\";\nimport { defineComponent, type PropType, type VNodeChild } from \"vue\";\n\ninterface ContentProps {\n readonly item: unknown;\n readonly row: TableRow<unknown>;\n readonly column: TableColumn<unknown>;\n readonly value: unknown;\n readonly display: string;\n readonly editable: boolean;\n}\n/** Isolate application cell slots from unrelated table/grid navigation updates. */\nexport const CellContent = defineComponent({\n name: \"VueyeCellContent\",\n props: {\n row: { type: Object as PropType<TableRow<unknown>>, required: true },\n column: { type: Object as PropType<TableColumn<unknown>>, required: true },\n value: { type: null as unknown as PropType<unknown>, required: true },\n display: { type: String, required: true },\n editable: { type: Boolean, default: false },\n render: { type: Function as PropType<(props: ContentProps) => VNodeChild>, required: true },\n },\n setup(props) {\n return () =>\n props.render({\n item: props.row.original,\n row: props.row,\n column: props.column,\n value: props.value,\n display: props.display,\n editable: props.editable,\n });\n },\n});\n\n/** Props both full components share. */\nexport const commonProps = {\n ...virtualProps,\n ...hierarchyProps,\n rowCanExpand: {\n type: Function as PropType<((row: any) => boolean) | undefined>,\n default: undefined,\n },\n expandMode: { type: String as PropType<ExpandMode>, default: \"multiple\" },\n expanded: { type: [Boolean, Array] as PropType<ExpandedState | undefined>, default: undefined },\n getChildren: { type: Function as PropType<TreeOptions<any>[\"getChildren\"]>, default: undefined },\n setChildren: { type: Function as PropType<TreeOptions<any>[\"setChildren\"]>, default: undefined },\n getParentKey: {\n type: Function as PropType<TreeOptions<any>[\"getParentKey\"]>,\n default: undefined,\n },\n hasChildren: { type: Function as PropType<TreeOptions<any>[\"hasChildren\"]>, default: undefined },\n loadChildren: {\n type: Function as PropType<TreeOptions<any, AbortSignal>[\"loadChildren\"]>,\n default: undefined,\n },\n treeFilter: { type: String as PropType<TreeOptions<unknown>[\"treeFilter\"]>, default: undefined },\n paginateBy: { type: String as PropType<TreeOptions<unknown>[\"paginateBy\"]>, default: undefined },\n source: {\n type: [Object, Function] as PropType<TableSource<unknown> | undefined>,\n default: undefined,\n },\n loadMore: { type: Function as PropType<LoadMore<unknown> | undefined>, default: undefined },\n endThreshold: { type: Number, default: 5 },\n manual: { type: Boolean as PropType<boolean | undefined>, default: undefined },\n rowCount: { type: Number as PropType<number | undefined>, default: undefined },\n /** Override the virtual default of no pagination; permits virtualizing a large page. */\n paginate: { type: Boolean as PropType<boolean | undefined>, default: undefined },\n /** Column definitions. Without them, columns are inferred from the data. */\n columns: { type: Array as PropType<readonly AnyColumnDef[]>, default: undefined },\n /** A path into each row, or a function, giving its key. Defaults to `id`, then position. */\n rowKey: {\n type: [String, Function] as PropType<string | ((row: any, index: number) => RowKey)>,\n default: undefined,\n },\n caption: { type: String, default: undefined },\n loading: { type: Boolean, default: false },\n density: { type: String as PropType<Density>, default: \"comfortable\" },\n striped: { type: Boolean, default: false },\n bordered: { type: Boolean, default: false },\n hover: { type: Boolean, default: true },\n stickyHeader: { type: Boolean, default: false },\n theme: { type: String as PropType<\"light\" | \"dark\">, default: undefined },\n /** A CSS height that makes the body scroll, such as `\"24rem\"`. */\n maxHeight: { type: String, default: undefined },\n\n searchable: { type: Boolean, default: true },\n searchPlaceholder: { type: String, default: \"Search…\" },\n columnToggle: { type: Boolean, default: true },\n pagination: { type: Boolean, default: true },\n pageSizeOptions: { type: Array as PropType<readonly number[]>, default: () => [5, 10, 20, 50] },\n\n page: { type: Number, default: undefined },\n pageSize: { type: Number, default: undefined },\n sorting: { type: Array as PropType<readonly SortRule[]>, default: undefined },\n search: { type: String, default: undefined },\n filters: { type: Object as PropType<Readonly<Record<string, unknown>>>, default: undefined },\n hiddenColumns: { type: Array as PropType<readonly string[]>, default: undefined },\n selectScope: { type: String as PropType<SelectScope>, default: \"all\" },\n} as const;\n\nexport const stateEmits = [\n \"update:page\",\n \"update:pageSize\",\n \"update:sorting\",\n \"update:search\",\n \"update:filters\",\n \"update:hiddenColumns\",\n \"update:selected\",\n \"update:expanded\",\n] as const;\n\ninterface ControlledProps {\n readonly page: number | undefined;\n readonly pageSize: number | undefined;\n readonly sorting: readonly SortRule[] | undefined;\n readonly search: string | undefined;\n readonly filters: Readonly<Record<string, unknown>> | undefined;\n readonly hiddenColumns: readonly string[] | undefined;\n readonly selected?: readonly RowKey[] | undefined;\n readonly expanded?: ExpandedState | undefined;\n}\n\n/** The state a parent controls through `v-model`, as a table state patch. */\nexport function controlledState(props: ControlledProps, current: PaginationState): TableStatePatch {\n return {\n sorting: props.sorting,\n search: props.search,\n filters: props.filters,\n hiddenColumns: props.hiddenColumns,\n selection: props.selected,\n expanded: props.expanded,\n pagination:\n props.page !== undefined || props.pageSize !== undefined\n ? { page: props.page ?? current.page, pageSize: props.pageSize ?? current.pageSize }\n : undefined,\n };\n}\n\n/**\n * Emit a `v-model` update for each piece of state that changed. The state is frozen and replaced\n * piece by piece, so identity tells what changed.\n */\nexport function emitStateChanges(\n emit: (event: (typeof stateEmits)[number], value: unknown) => void,\n state: TableState,\n previous: TableState,\n): void {\n if (state.pagination.page !== previous.pagination.page) {\n emit(\"update:page\", state.pagination.page);\n }\n if (state.pagination.pageSize !== previous.pagination.pageSize) {\n emit(\"update:pageSize\", state.pagination.pageSize);\n }\n if (state.sorting !== previous.sorting) {\n emit(\"update:sorting\", state.sorting);\n }\n if (state.search !== previous.search) {\n emit(\"update:search\", state.search);\n }\n if (state.filters !== previous.filters) {\n emit(\"update:filters\", state.filters);\n }\n if (state.hiddenColumns !== previous.hiddenColumns) {\n emit(\"update:hiddenColumns\", state.hiddenColumns);\n }\n if (state.selection !== previous.selection) {\n emit(\"update:selected\", state.selection);\n }\n if (state.expanded !== previous.expanded) emit(\"update:expanded\", state.expanded);\n}\n\nexport function expansionOptions(\n props: {\n readonly rowCanExpand: ((row: any) => boolean) | undefined;\n readonly expandMode: ExpandMode;\n } & TreeOptions<unknown, AbortSignal>,\n detail: boolean,\n): TreeOptions<unknown, AbortSignal> & {\n readonly getRowCanExpand: ((row: unknown) => boolean) | undefined;\n readonly expandMode: ExpandMode;\n} {\n return {\n getRowCanExpand: props.rowCanExpand ?? (detail ? () => true : undefined),\n expandMode: props.expandMode,\n getChildren: props.getChildren,\n setChildren: props.setChildren,\n getParentKey: props.getParentKey,\n hasChildren: props.hasChildren,\n loadChildren: props.loadChildren,\n treeFilter: props.treeFilter,\n paginateBy: props.paginateBy,\n };\n}\n\nexport function emitExpansionChanges(\n emit: {\n (event: \"expand\", item: unknown, row: TableRow<unknown>): void;\n (event: \"collapse\", item: unknown, row: TableRow<unknown>): void;\n },\n state: TableState,\n previous: TableState,\n table:\n | {\n readonly processedRows: readonly TableRow<unknown>[];\n getRow(key: RowKey): TableRow<unknown> | undefined;\n }\n | undefined,\n): void {\n if (!table || state.expanded === previous.expanded) return;\n const keys = new Set([\n ...table.processedRows.map((row) => row.key),\n ...(state.expanded === true ? [] : state.expanded),\n ...(previous.expanded === true ? [] : previous.expanded),\n ]);\n for (const key of keys) {\n const before = previous.expanded === true || previous.expanded.includes(key);\n const after = state.expanded === true || state.expanded.includes(key);\n const row = table.getRow(key);\n if (row?.canExpand && before !== after) {\n if (after) emit(\"expand\", row.original, row);\n else emit(\"collapse\", row.original, row);\n }\n }\n}\n\n/**\n * The given columns, or columns inferred from the data. Inferred columns are reused while the\n * data keeps the same fields, so an edit that replaces the array does not rebuild every row.\n */\nexport function createColumnResolver(): (\n columns: readonly AnyColumnDef[] | undefined,\n data: readonly unknown[],\n) => readonly AnyColumnDef[] {\n let inferred:\n | { readonly signature: string; readonly columns: readonly AnyColumnDef[] }\n | undefined;\n return (columns, data) => {\n if (columns) {\n return columns;\n }\n const next = inferColumns(data);\n const signature = next.map((column) => column.id).join(\"\\u0000\");\n if (inferred?.signature !== signature) {\n inferred = { signature, columns: next };\n }\n return inferred.columns;\n };\n}\n","import type { CellChange, ColumnDef, TableIssue, TableState, TableRow } from \"@vueye-table/core\";\nimport type {\n GridCellSlotProps,\n TableStatusSlotProps,\n DetailSlotProps,\n} from \"@vueye-table/headless\";\nimport {\n VtGrid,\n VtPageSize,\n VtPagination,\n VtSearch,\n VtStatus,\n VtLoadMore,\n VtToolbar,\n} from \"@vueye-table/styled\";\nimport { provideDataTable, useDataTable, type DataTableBinding } from \"@vueye-table/vue\";\nimport { computed, defineComponent, h, type PropType, type SlotsType, type VNode } from \"vue\";\n\nimport {\n commonProps,\n controlledState,\n createColumnResolver,\n emitStateChanges,\n stateEmits,\n expansionOptions,\n emitExpansionChanges,\n CellContent,\n} from \"./shared\";\n\n/**\n * An editable spreadsheet over an array. Cells are edited in place with the keyboard or a double\n * click, ranges are selected with Shift or by dragging, and copy, cut, paste, clear, undo, and\n * redo work like a spreadsheet application. Every edit produces a new array through\n * `update:data`; the array passed in is never mutated.\n */\nexport const VueyeGrid = defineComponent({\n name: \"VueyeGrid\",\n slots: Object as SlotsType<\n { [key: `cell.${string}`]: GridCellSlotProps & { readonly item: unknown } } & {\n default?: (props: Record<string, unknown>) => VNode[];\n status?: (props: TableStatusSlotProps) => VNode[];\n expanded?: (props: DetailSlotProps) => VNode[];\n }\n >,\n props: {\n data: { type: Array as PropType<readonly unknown[]>, default: () => [] },\n ...commonProps,\n searchable: { type: Boolean, default: false },\n columnToggle: { type: Boolean, default: false },\n /** Page the grid. By default every row is on one page. */\n pagination: { type: Boolean, default: false },\n /** Columns are editable unless their definition says otherwise. Set `false` to lock all. */\n editable: { type: Boolean, default: true },\n rowNumbers: { type: Boolean, default: true },\n columnLetters: { type: Boolean, default: false },\n label: { type: String, default: \"Spreadsheet\" },\n /** Show undo, redo, and CSV export buttons. */\n toolbar: { type: Boolean, default: true },\n },\n emits: {\n ...Object.fromEntries(stateEmits.map((name) => [name, null])),\n \"state-change\": (_state: TableState) => true,\n \"update:data\": (_data: readonly unknown[]) => true,\n edit: (_changes: readonly CellChange<unknown>[]) => true,\n \"edit-error\": (_issues: readonly TableIssue[]) => true,\n export: (_csv: string) => true,\n expand: (_item: unknown, _row: TableRow<unknown>) => true,\n collapse: (_item: unknown, _row: TableRow<unknown>) => true,\n } as { [K in (typeof stateEmits)[number]]: null } & {\n \"state-change\": (state: TableState) => boolean;\n \"update:data\": (data: readonly unknown[]) => boolean;\n edit: (changes: readonly CellChange<unknown>[]) => boolean;\n \"edit-error\": (issues: readonly TableIssue[]) => boolean;\n export: (csv: string) => boolean;\n expand: (item: unknown, row: TableRow<unknown>) => boolean;\n collapse: (item: unknown, row: TableRow<unknown>) => boolean;\n },\n setup(props, { emit, slots, expose, attrs }) {\n const resolveColumns = createColumnResolver();\n const columns = computed(() =>\n resolveColumns(props.columns, props.data).map(\n (column) =>\n ({\n ...column,\n editable: props.editable ? (column.editable ?? true) : false,\n }) as ColumnDef<unknown>,\n ),\n );\n const everyRow = (): number => Math.max(1, props.data.length);\n const initialPagination = {\n page: props.page ?? 1,\n pageSize: props.pagination ? (props.pageSize ?? props.pageSizeOptions[0] ?? 10) : everyRow(),\n };\n let binding: DataTableBinding<unknown> | undefined;\n const table = useDataTable<unknown>({\n ...expansionOptions(props, !!slots.expanded),\n data: () => props.data,\n source: computed(() => props.source),\n loadMore: computed(() => props.loadMore),\n endThreshold: props.endThreshold,\n manual: props.manual,\n rowCount: () => props.rowCount,\n columns,\n rowKey: props.rowKey as never,\n paginate:\n props.paginate ??\n (props.source || props.loadMore ? false : props.virtual ? props.pagination : true),\n selectionMode: \"none\",\n initialState: { pagination: initialPagination },\n state: () => {\n const controlled = controlledState(\n props,\n binding?.table.getState().pagination ?? initialPagination,\n );\n return {\n ...controlled,\n selection: undefined,\n pagination: props.pagination ? controlled.pagination : { page: 1, pageSize: everyRow() },\n };\n },\n onEditIssues(issues) {\n emit(\"edit-error\", issues);\n },\n onDataChange(data, changes) {\n emit(\"update:data\", data);\n emit(\"edit\", changes);\n },\n onStateChange(state, previous) {\n emitStateChanges(emit as never, state, previous);\n emitExpansionChanges(emit, state, previous, binding?.table.getSnapshot());\n emit(\"state-change\", state);\n },\n });\n binding = table;\n provideDataTable(table);\n expose({ table });\n\n // `cell.<id>` slots also receive the row's data as `item`, as they do on `<VueyeTable>`.\n const gridSlots = (): Record<string, unknown> => {\n const forwarded: Record<string, unknown> = {};\n if (slots.expanded) forwarded[\"expanded\"] = slots.expanded;\n for (const [name, slot] of Object.entries(slots)) {\n if (name === \"default\" && slot) {\n forwarded[name] = slot;\n } else if (name.startsWith(\"cell.\")) {\n const cellSlot = slots[name as `cell.${string}`];\n forwarded[name] = (cellProps: GridCellSlotProps) =>\n cellSlot ? h(CellContent, { ...cellProps, render: cellSlot }) : cellProps.display;\n }\n }\n return forwarded;\n };\n\n const button = (label: string, disabled: boolean, onClick: () => void) =>\n h(\"button\", { type: \"button\", class: \"vt-button\", disabled, onClick }, label);\n\n return () =>\n h(\"div\", { class: \"vt-theme vueye-grid\", \"data-vt-theme\": props.theme }, [\n props.toolbar || props.searchable\n ? h(VtToolbar, () => [\n props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,\n h(\"div\", { class: \"vt-toolbar-spacer\" }),\n props.toolbar\n ? [\n button(\"Undo\", !table.canUndo, () => table.undo()),\n button(\"Redo\", !table.canRedo, () => table.redo()),\n button(\"Export CSV\", false, () => emit(\"export\", table.exportRows())),\n ]\n : null,\n ])\n : null,\n h(\n VtGrid,\n {\n table,\n label: props.label,\n \"aria-describedby\": attrs[\"aria-describedby\"],\n rowNumbers: props.rowNumbers,\n columnLetters: props.columnLetters,\n density: props.density,\n striped: props.striped,\n bordered: props.bordered,\n hover: false,\n stickyHeader: props.stickyHeader,\n loading:\n props.loading || table.loadState === \"loading\" || table.loadState === \"streaming\",\n theme: props.theme,\n virtual: props.virtual,\n virtualColumns: props.virtualColumns,\n height: props.height,\n rowHeight: props.rowHeight,\n overscan: props.overscan,\n columnWidth: props.columnWidth,\n treeColumn: props.treeColumn,\n keepAliveDetail: props.keepAliveDetail,\n ...(props.maxHeight ? { style: { \"--vt-max-height\": props.maxHeight } } : {}),\n },\n gridSlots(),\n ),\n props.pagination || table.loadingMode || slots.status || table.tree\n ? h(VtToolbar, { class: \"vt-footer\" }, () => [\n h(\n VtStatus,\n null,\n slots.status\n ? { default: (status: TableStatusSlotProps) => slots.status?.(status) }\n : undefined,\n ),\n ...(table.loadingMode ? [h(VtLoadMore)] : []),\n props.pagination && table.paginate\n ? h(\"div\", { class: \"vt-footer-controls\" }, [\n h(VtPageSize, { options: props.pageSizeOptions }),\n h(VtPagination),\n ])\n : null,\n ])\n : null,\n ]);\n },\n});\n","import type { ColumnDef, RowKey, TableRow, TableState } from \"@vueye-table/core\";\nimport {\n DataTableBody,\n DataTableCaption,\n DataTableCell,\n DataTableRow,\n DataTableSelectAll,\n DataTableSelectRow,\n DataTableRoot,\n DataTableViewport,\n type TableStatusSlotProps,\n type DetailSlotProps,\n resolveTreeColumn,\n} from \"@vueye-table/headless\";\nimport {\n VtColumnVisibility,\n VtEmpty,\n VtHeader,\n VtPageSize,\n VtPagination,\n VtSearch,\n VtStatus,\n VtLoadMore,\n VtToolbar,\n VtExpandToggle,\n VtTreeCell,\n} from \"@vueye-table/styled\";\nimport { provideDataTable, useDataTable, type DataTableBinding } from \"@vueye-table/vue\";\nimport { computed, defineComponent, h, type PropType, type SlotsType, type VNodeChild } from \"vue\";\n\nimport {\n commonProps,\n controlledState,\n createColumnResolver,\n emitStateChanges,\n stateEmits,\n expansionOptions,\n emitExpansionChanges,\n CellContent,\n} from \"./shared\";\n\n/** Slot props of `cell.<column id>` and `cell`. */\nexport interface CellSlotProps {\n readonly item: unknown;\n readonly row: TableRow<unknown>;\n readonly value: unknown;\n readonly display: string;\n readonly column: { readonly id: string; readonly header: string };\n}\n\n/** Slot props of `status`, the \"1–10 of 57 rows\" line. */\nexport type StatusSlotProps = TableStatusSlotProps;\n\n/**\n * A complete data table: search, column visibility, sorting, selection, pagination, a live\n * status line, loading and empty states, and theming. Every piece of state is available as a\n * `v-model`, and `manual` hands searching, sorting, and paging to a server.\n */\nexport const VueyeTable = defineComponent({\n name: \"VueyeTable\",\n props: {\n data: { type: Array as PropType<readonly unknown[]>, default: () => [] },\n ...commonProps,\n /** `true` or `\"multiple\"` for checkboxes, `\"single\"` for one row at a time. */\n selectable: {\n type: [Boolean, String] as PropType<boolean | \"single\" | \"multiple\">,\n default: false,\n },\n selected: { type: Array as PropType<readonly RowKey[]>, default: undefined },\n /** The data is one page from a server; `rowCount` is the total. */\n /** Shown instead of the empty state while `loading` and there are no rows yet. */\n loadingText: { type: String, default: \"Loading…\" },\n },\n emits: {\n ...Object.fromEntries(stateEmits.map((name) => [name, null])),\n \"state-change\": (_state: TableState) => true,\n \"row-click\": (_item: unknown, _row: TableRow<unknown>) => true,\n expand: (_item: unknown, _row: TableRow<unknown>) => true,\n collapse: (_item: unknown, _row: TableRow<unknown>) => true,\n } as {\n [K in (typeof stateEmits)[number]]: null;\n } & {\n \"state-change\": (state: TableState) => boolean;\n \"row-click\": (item: unknown, row: TableRow<unknown>) => boolean;\n expand: (item: unknown, row: TableRow<unknown>) => boolean;\n collapse: (item: unknown, row: TableRow<unknown>) => boolean;\n },\n slots: Object as SlotsType<\n {\n [key: `cell.${string}`]: CellSlotProps;\n [key: `header.${string}`]: { column: { id: string; header: string } };\n } & {\n toolbar: { table: unknown };\n empty: Record<string, never>;\n loading: Record<string, never>;\n footer: { table: unknown };\n status: StatusSlotProps;\n expanded: DetailSlotProps;\n }\n >,\n setup(props, { emit, slots, expose }) {\n const selectionMode = computed(() =>\n props.selectable === false ? \"none\" : props.selectable === \"single\" ? \"single\" : \"multiple\",\n );\n const initialPagination = {\n page: props.page ?? 1,\n pageSize: props.pageSize ?? props.pageSizeOptions[0] ?? 10,\n };\n const resolveColumns = createColumnResolver();\n let binding: DataTableBinding<unknown> | undefined;\n const table = useDataTable<unknown>({\n ...expansionOptions(props, !!slots.expanded),\n data: () => props.data,\n source: computed(() => props.source),\n loadMore: computed(() => props.loadMore),\n endThreshold: props.endThreshold,\n columns: () => resolveColumns(props.columns, props.data) as readonly ColumnDef<unknown>[],\n rowKey: props.rowKey as never,\n manual: props.manual,\n paginate: props.paginate ?? !(props.virtual || props.source || props.loadMore),\n rowCount: () => props.rowCount,\n selectionMode: selectionMode.value,\n selectScope: props.selectScope,\n initialState: { pagination: initialPagination },\n state: () =>\n controlledState(props, binding?.table.getState().pagination ?? initialPagination),\n onStateChange(state, previous) {\n emitStateChanges(emit as never, state, previous);\n emitExpansionChanges(emit, state, previous, binding?.table.getSnapshot());\n emit(\"state-change\", state);\n },\n });\n binding = table;\n provideDataTable(table);\n expose({ table });\n const busy = (): boolean =>\n props.loading || table.loadState === \"loading\" || table.loadState === \"streaming\";\n\n const selectable = (): boolean => selectionMode.value !== \"none\";\n\n const cell = (row: TableRow<unknown>, column: (typeof table.columns)[number]): VNodeChild => {\n const slot = slots[`cell.${column.id}`];\n const treeCell = table.tree && column.id === resolveTreeColumn(table, props.treeColumn);\n return h(\n DataTableCell,\n { key: column.id, row, column, tree: false },\n {\n default: ({ value, display }: { value: unknown; display: string }) => {\n const content = () =>\n slot ? h(CellContent, { row, column, value, display, render: slot }) : display;\n return treeCell ? h(VtTreeCell, { row }, { default: content }) : content();\n },\n $stable: true,\n },\n );\n };\n\n const hasDetails = (): boolean => !!slots.expanded && !table.tree;\n const width = (): number =>\n table.columns.length + (selectable() ? 1 : 0) + (hasDetails() ? 1 : 0);\n const emptyBody = (): VNodeChild => {\n if (table.rows.length === 0) {\n // While the first page is loading there is nothing to match yet, so say that instead.\n const content = busy()\n ? (slots.loading?.({}) ?? h(VtEmpty, { text: props.loadingText }))\n : (slots.empty?.({}) ??\n h(VtEmpty, {\n text:\n table.loadingMode && table.loadState === \"error\"\n ? \"Could not load rows.\"\n : \"No matching rows\",\n }));\n return h(\"tr\", { \"data-empty\": \"\" }, [h(\"td\", { colspan: Math.max(1, width()) }, content)]);\n }\n return null;\n };\n const cells = (row: TableRow<unknown>): VNodeChild[] => {\n const result = [\n hasDetails() ? h(\"td\", { class: \"vt-expansion-cell\" }, [h(VtExpandToggle, { row })]) : null,\n selectable()\n ? h(\n \"td\",\n { class: \"vt-selection-cell\", onClick: (event: Event) => event.stopPropagation() },\n [h(DataTableSelectRow, { row })],\n )\n : null,\n ...table.columns.map((column) => cell(row, column)),\n ];\n return result;\n };\n const bodyRow = ({ row, rowIndex }: DetailSlotProps): VNodeChild =>\n h(\n DataTableRow,\n { key: row.key, row, rowIndex, onClick: () => emit(\"row-click\", row.original, row) },\n { default: () => cells(row), $stable: true },\n );\n\n const headerSlots = () => {\n const forwarded: Record<string, unknown> = {};\n for (const column of table.columns) {\n const slot = slots[`header.${column.id}`];\n if (slot) {\n forwarded[`header.${column.id}`] = () => slot({ column });\n }\n }\n return {\n ...forwarded,\n before: () => [\n hasDetails()\n ? h(\"th\", { class: \"vt-expansion-cell\", scope: \"col\", \"aria-label\": \"Details\" })\n : null,\n selectable()\n ? h(\n \"th\",\n { class: \"vt-selection-cell\", scope: \"col\" },\n selectionMode.value === \"multiple\" ? [h(DataTableSelectAll)] : [],\n )\n : null,\n ],\n };\n };\n\n const tableContent = (): VNodeChild => {\n const children = () => [\n props.caption ? h(DataTableCaption, () => props.caption) : null,\n h(VtHeader, null, headerSlots()),\n h(\n DataTableBody,\n { class: \"vt-body\", colspan: width() },\n {\n ...(table.rows.length === 0 ? { default: emptyBody } : {}),\n row: bodyRow,\n detail: slots.expanded\n ? (detail: DetailSlotProps) => slots.expanded?.(detail)\n : undefined,\n },\n ),\n ];\n return props.virtual\n ? h(\n DataTableViewport,\n {\n class: \"vt-scroll\",\n height: props.height ?? \"24rem\",\n style: { \"--vt-row-height\": `${props.rowHeight}px` },\n },\n {\n default: () =>\n h(\n DataTableRoot,\n {\n table,\n class: \"vt-table\",\n virtual: props.virtual,\n rowHeight: props.rowHeight,\n overscan: props.overscan,\n treeColumn: props.treeColumn,\n keepAliveDetail: props.keepAliveDetail,\n },\n children,\n ),\n },\n )\n : h(\"div\", { class: \"vt-scroll\" }, [\n h(\n DataTableRoot,\n {\n table,\n treeColumn: props.treeColumn,\n keepAliveDetail: props.keepAliveDetail,\n class: \"vt-table\",\n \"aria-colcount\": table.columns.length,\n \"aria-busy\": busy() ? \"true\" : undefined,\n },\n children,\n ),\n ]);\n };\n\n return () =>\n h(\n \"div\",\n {\n class: \"vt-surface vueye-table\",\n \"data-density\": props.density,\n \"data-striped\": props.striped ? \"\" : undefined,\n \"data-bordered\": props.bordered ? \"\" : undefined,\n \"data-hover\": props.hover ? \"\" : undefined,\n \"data-sticky-header\": props.stickyHeader || props.virtual ? \"\" : undefined,\n \"data-virtual\": props.virtual ? \"\" : undefined,\n \"data-loading\": busy() ? \"\" : undefined,\n \"data-vt-theme\": props.theme,\n \"aria-busy\": props.loading ? \"true\" : undefined,\n style: props.maxHeight ? { \"--vt-max-height\": props.maxHeight } : undefined,\n },\n [\n h(\"div\", { class: \"vt-root\" }, [\n props.searchable || props.columnToggle || slots.toolbar\n ? h(VtToolbar, () => [\n props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,\n h(\"div\", { class: \"vt-toolbar-spacer\" }),\n slots.toolbar?.({ table }),\n props.columnToggle ? h(VtColumnVisibility) : null,\n ])\n : null,\n h(\"div\", { class: \"vt-progress\", role: \"presentation\" }),\n tableContent(),\n (props.pagination && (!props.virtual || table.paginate)) ||\n slots.footer ||\n slots.status ||\n table.tree ||\n table.loadingMode\n ? h(VtToolbar, { class: \"vt-footer\" }, () => [\n h(\n VtStatus,\n null,\n slots.status\n ? { default: (status: StatusSlotProps) => slots.status?.(status) }\n : props.loading && table.rows.length === 0\n ? { default: () => props.loadingText }\n : undefined,\n ),\n ...(table.loadingMode ? [h(VtLoadMore)] : []),\n slots.footer?.({ table }),\n props.pagination && table.paginate && (!props.virtual || table.paginate)\n ? h(\"div\", { class: \"vt-footer-controls\" }, [\n h(VtPageSize, { options: props.pageSizeOptions }),\n h(VtPagination),\n ])\n : null,\n ])\n : null,\n ]),\n ],\n );\n },\n});\n","import type { App, Plugin } from \"vue\";\n\nimport { VueyeGrid } from \"./vueye-grid\";\nimport { VueyeTable } from \"./vueye-table\";\n\n/** Register `<VueyeTable>` and `<VueyeGrid>` globally. */\nexport const VueyeTablePlugin: Plugin = {\n install(app: App): void {\n app.component(\"VueyeTable\", VueyeTable);\n app.component(\"VueyeGrid\", VueyeGrid);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,MAAa,cAAc,gBAAgB;CACzC,MAAM;CACN,OAAO;EACL,KAAK;GAAE,MAAM;GAAuC,UAAU;EAAK;EACnE,QAAQ;GAAE,MA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rC,EAAE,eAAe,MAAM,YAAY,IACnC,MACR;IACA,GAAI,MAAM,cAAc,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;IAC3C,MAAM,SAAS,EAAE,MAAM,CAAC;IACxB,MAAM,cAAc,MAAM,aAAa,CAAC,MAAM,WAAW,MAAM,YAC3D,EAAE,OAAO,EAAE,OAAO,qBAAqB,GAAG,CACxC,EAAE,YAAY,EAAE,SAAS,MAAM,gBAAgB,CAAC,GAChD,EAAE,YAAY,CAChB,CAAC,IACD;GACN,CAAC,IACD;EACN,CAAC,CACH,CACF;CACJ;AACF,CAAC;;;;;AC1UD,MAAa,mBAA2B,EACtC,QAAQ,KAAgB;CACtB,IAAI,UAAU,cAAc,UAAU;CACtC,IAAI,UAAU,aAAa,SAAS;AACtC,EACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueye-table",
3
- "version": "3.0.0-alpha.8",
3
+ "version": "3.0.0-alpha.9",
4
4
  "description": "A Vue framework for data tables and spreadsheets: a complete, themeable data table and grid, plus every layer beneath them.",
5
5
  "keywords": [
6
6
  "data-grid",
@@ -42,10 +42,10 @@
42
42
  "provenance": true
43
43
  },
44
44
  "dependencies": {
45
- "@vueye-table/core": "3.0.0-alpha.8",
46
- "@vueye-table/headless": "3.0.0-alpha.8",
47
- "@vueye-table/styled": "3.0.0-alpha.8",
48
- "@vueye-table/vue": "3.0.0-alpha.8"
45
+ "@vueye-table/core": "3.0.0-alpha.9",
46
+ "@vueye-table/headless": "3.0.0-alpha.9",
47
+ "@vueye-table/styled": "3.0.0-alpha.9",
48
+ "@vueye-table/vue": "3.0.0-alpha.9"
49
49
  },
50
50
  "devDependencies": {
51
51
  "vue": "3.5.43",