vueye-table 3.0.0-alpha.9 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { CellChange, RowKey, TableIssue, TableRow, TableState } from "@vueye-table/core";
2
- import { DetailSlotProps, GridCellSlotProps, TableStatusSlotProps } from "@vueye-table/headless";
1
+ import { CellChange, EditResult, RowKey, TableIssue, TableRow, TableState } from "@vueye-table/core";
2
+ import { CellEditorSlotProps, 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";
@@ -228,6 +228,30 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
228
228
  readonly type: NumberConstructor;
229
229
  readonly default: 120;
230
230
  };
231
+ validateRow: {
232
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
233
+ readonly default: undefined;
234
+ };
235
+ asyncValidation: {
236
+ readonly type: PropType<"held" | "optimistic" | undefined>;
237
+ readonly default: undefined;
238
+ };
239
+ createRow: {
240
+ readonly type: PropType<(() => any) | undefined>;
241
+ readonly default: undefined;
242
+ };
243
+ setParentKey: {
244
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
245
+ readonly default: undefined;
246
+ };
247
+ addRow: {
248
+ readonly type: BooleanConstructor;
249
+ readonly default: false;
250
+ };
251
+ removeRows: {
252
+ readonly type: BooleanConstructor;
253
+ readonly default: false;
254
+ };
231
255
  data: {
232
256
  type: PropType<readonly unknown[]>;
233
257
  default: () => never[];
@@ -243,6 +267,13 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
243
267
  "update:hiddenColumns": null;
244
268
  "update:selected": null;
245
269
  "update:expanded": null;
270
+ } & {
271
+ "update:data": (_data: readonly unknown[]) => boolean;
272
+ edit: (_changes: readonly CellChange<unknown>[]) => boolean;
273
+ save: (_result: EditResult<unknown>) => boolean;
274
+ cancel: (_key: import("@vueye-table/core").RowKey) => boolean;
275
+ "edit-issues": (_issues: readonly TableIssue[]) => boolean;
276
+ "edit-error": (_issues: readonly TableIssue[]) => boolean;
246
277
  } & {
247
278
  "state-change": (state: TableState) => boolean;
248
279
  "update:data": (data: readonly unknown[]) => boolean;
@@ -463,6 +494,30 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
463
494
  readonly type: NumberConstructor;
464
495
  readonly default: 120;
465
496
  };
497
+ validateRow: {
498
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
499
+ readonly default: undefined;
500
+ };
501
+ asyncValidation: {
502
+ readonly type: PropType<"held" | "optimistic" | undefined>;
503
+ readonly default: undefined;
504
+ };
505
+ createRow: {
506
+ readonly type: PropType<(() => any) | undefined>;
507
+ readonly default: undefined;
508
+ };
509
+ setParentKey: {
510
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
511
+ readonly default: undefined;
512
+ };
513
+ addRow: {
514
+ readonly type: BooleanConstructor;
515
+ readonly default: false;
516
+ };
517
+ removeRows: {
518
+ readonly type: BooleanConstructor;
519
+ readonly default: false;
520
+ };
466
521
  data: {
467
522
  type: PropType<readonly unknown[]>;
468
523
  default: () => never[];
@@ -476,14 +531,19 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
476
531
  "onUpdate:hiddenColumns"?: (...args: any[]) => any;
477
532
  "onUpdate:selected"?: (...args: any[]) => any;
478
533
  "onUpdate:expanded"?: (...args: any[]) => any;
534
+ "onUpdate:data"?: (_data: readonly unknown[]) => any;
535
+ onEdit?: (_changes: readonly CellChange<unknown>[]) => any;
536
+ onSave?: (_result: EditResult<unknown>) => any;
537
+ onCancel?: (_key: import("@vueye-table/core").RowKey) => any;
538
+ "onEdit-issues"?: (_issues: readonly TableIssue[]) => any;
539
+ "onEdit-error"?: (_issues: readonly TableIssue[]) => any;
479
540
  "onState-change"?: (state: TableState) => any;
480
541
  onExpand?: (item: unknown, row: TableRow<unknown>) => any;
481
542
  onCollapse?: (item: unknown, row: TableRow<unknown>) => any;
482
- onEdit?: (changes: readonly CellChange<unknown>[]) => any;
483
- "onUpdate:data"?: (data: readonly unknown[]) => any;
484
- "onEdit-error"?: (issues: readonly TableIssue[]) => any;
485
543
  onExport?: (csv: string) => any;
486
544
  }>, {
545
+ validateRow: ((next: any, previous: any) => import("@vueye-table/core").ValidationResult | Promise<import("@vueye-table/core").ValidationResult>) | undefined;
546
+ setParentKey: ((row: any, parent: import("@vueye-table/core").RowKey | undefined) => any) | undefined;
487
547
  getChildren: ((row: any) => readonly any[] | undefined) | undefined;
488
548
  setChildren: ((row: any, children: readonly any[]) => any) | undefined;
489
549
  getParentKey: ((row: any) => import("@vueye-table/core").RowKey | null | undefined) | undefined;
@@ -532,8 +592,12 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
532
592
  overscan: number;
533
593
  virtualColumns: boolean;
534
594
  columnWidth: number;
535
- label: string;
595
+ asyncValidation: "held" | "optimistic" | undefined;
596
+ createRow: (() => any) | undefined;
597
+ addRow: boolean;
598
+ removeRows: boolean;
536
599
  toolbar: boolean;
600
+ label: string;
537
601
  editable: boolean;
538
602
  rowNumbers: boolean;
539
603
  columnLetters: boolean;
@@ -541,6 +605,7 @@ declare const VueyeGrid: import("vue").DefineComponent<import("vue").ExtractProp
541
605
  [key: `cell.${string}`]: GridCellSlotProps & {
542
606
  readonly item: unknown;
543
607
  };
608
+ [key: `editor.${string}`]: CellEditorSlotProps;
544
609
  } & {
545
610
  default?: (props: Record<string, unknown>) => VNode[];
546
611
  status?: (props: TableStatusSlotProps) => VNode[];
@@ -567,6 +632,10 @@ type StatusSlotProps = TableStatusSlotProps;
567
632
  * `v-model`, and `manual` hands searching, sorting, and paging to a server.
568
633
  */
569
634
  declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
635
+ editMode: {
636
+ type: PropType<"cell" | "row" | undefined>;
637
+ default: undefined;
638
+ };
570
639
  /** `true` or `"multiple"` for checkboxes, `"single"` for one row at a time. */
571
640
  selectable: {
572
641
  type: PropType<boolean | "single" | "multiple">;
@@ -770,6 +839,30 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
770
839
  readonly type: NumberConstructor;
771
840
  readonly default: 120;
772
841
  };
842
+ validateRow: {
843
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
844
+ readonly default: undefined;
845
+ };
846
+ asyncValidation: {
847
+ readonly type: PropType<"held" | "optimistic" | undefined>;
848
+ readonly default: undefined;
849
+ };
850
+ createRow: {
851
+ readonly type: PropType<(() => any) | undefined>;
852
+ readonly default: undefined;
853
+ };
854
+ setParentKey: {
855
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
856
+ readonly default: undefined;
857
+ };
858
+ addRow: {
859
+ readonly type: BooleanConstructor;
860
+ readonly default: false;
861
+ };
862
+ removeRows: {
863
+ readonly type: BooleanConstructor;
864
+ readonly default: false;
865
+ };
773
866
  data: {
774
867
  type: PropType<readonly unknown[]>;
775
868
  default: () => never[];
@@ -785,12 +878,23 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
785
878
  "update:hiddenColumns": null;
786
879
  "update:selected": null;
787
880
  "update:expanded": null;
881
+ } & {
882
+ "update:data": (_data: readonly unknown[]) => boolean;
883
+ edit: (_changes: readonly import("@vueye-table/core").CellChange<unknown>[]) => boolean;
884
+ save: (_result: EditResult<unknown>) => boolean;
885
+ cancel: (_key: RowKey) => boolean;
886
+ "edit-issues": (_issues: readonly import("@vueye-table/core").TableIssue[]) => boolean;
887
+ "edit-error": (_issues: readonly import("@vueye-table/core").TableIssue[]) => boolean;
788
888
  } & {
789
889
  "state-change": (state: TableState) => boolean;
790
890
  "row-click": (item: unknown, row: TableRow<unknown>) => boolean;
791
891
  expand: (item: unknown, row: TableRow<unknown>) => boolean;
792
892
  collapse: (item: unknown, row: TableRow<unknown>) => boolean;
793
893
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
894
+ editMode: {
895
+ type: PropType<"cell" | "row" | undefined>;
896
+ default: undefined;
897
+ };
794
898
  /** `true` or `"multiple"` for checkboxes, `"single"` for one row at a time. */
795
899
  selectable: {
796
900
  type: PropType<boolean | "single" | "multiple">;
@@ -994,6 +1098,30 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
994
1098
  readonly type: NumberConstructor;
995
1099
  readonly default: 120;
996
1100
  };
1101
+ validateRow: {
1102
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["validateRow"]>;
1103
+ readonly default: undefined;
1104
+ };
1105
+ asyncValidation: {
1106
+ readonly type: PropType<"held" | "optimistic" | undefined>;
1107
+ readonly default: undefined;
1108
+ };
1109
+ createRow: {
1110
+ readonly type: PropType<(() => any) | undefined>;
1111
+ readonly default: undefined;
1112
+ };
1113
+ setParentKey: {
1114
+ readonly type: PropType<import("@vueye-table/core").TableOptions<any>["setParentKey"]>;
1115
+ readonly default: undefined;
1116
+ };
1117
+ addRow: {
1118
+ readonly type: BooleanConstructor;
1119
+ readonly default: false;
1120
+ };
1121
+ removeRows: {
1122
+ readonly type: BooleanConstructor;
1123
+ readonly default: false;
1124
+ };
997
1125
  data: {
998
1126
  type: PropType<readonly unknown[]>;
999
1127
  default: () => never[];
@@ -1007,11 +1135,19 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
1007
1135
  "onUpdate:hiddenColumns"?: (...args: any[]) => any;
1008
1136
  "onUpdate:selected"?: (...args: any[]) => any;
1009
1137
  "onUpdate:expanded"?: (...args: any[]) => any;
1138
+ "onUpdate:data"?: (_data: readonly unknown[]) => any;
1139
+ onEdit?: (_changes: readonly import("@vueye-table/core").CellChange<unknown>[]) => any;
1140
+ onSave?: (_result: EditResult<unknown>) => any;
1141
+ onCancel?: (_key: RowKey) => any;
1142
+ "onEdit-issues"?: (_issues: readonly import("@vueye-table/core").TableIssue[]) => any;
1143
+ "onEdit-error"?: (_issues: readonly import("@vueye-table/core").TableIssue[]) => any;
1010
1144
  "onState-change"?: (state: TableState) => any;
1011
1145
  "onRow-click"?: (item: unknown, row: TableRow<unknown>) => any;
1012
1146
  onExpand?: (item: unknown, row: TableRow<unknown>) => any;
1013
1147
  onCollapse?: (item: unknown, row: TableRow<unknown>) => any;
1014
1148
  }>, {
1149
+ validateRow: ((next: any, previous: any) => import("@vueye-table/core").ValidationResult | Promise<import("@vueye-table/core").ValidationResult>) | undefined;
1150
+ setParentKey: ((row: any, parent: RowKey | undefined) => any) | undefined;
1015
1151
  getChildren: ((row: any) => readonly any[] | undefined) | undefined;
1016
1152
  setChildren: ((row: any, children: readonly any[]) => any) | undefined;
1017
1153
  getParentKey: ((row: any) => RowKey | null | undefined) | undefined;
@@ -1021,6 +1157,7 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
1021
1157
  paginateBy: import("@vueye-table/core").TreePagination | undefined;
1022
1158
  page: number;
1023
1159
  data: readonly unknown[];
1160
+ editMode: "row" | "cell" | undefined;
1024
1161
  selectable: boolean | "single" | "multiple";
1025
1162
  selected: readonly RowKey[];
1026
1163
  loadingText: string;
@@ -1063,8 +1200,13 @@ declare const VueyeTable: import("vue").DefineComponent<import("vue").ExtractPro
1063
1200
  overscan: number;
1064
1201
  virtualColumns: boolean;
1065
1202
  columnWidth: number;
1203
+ asyncValidation: "held" | "optimistic" | undefined;
1204
+ createRow: (() => any) | undefined;
1205
+ addRow: boolean;
1206
+ removeRows: boolean;
1066
1207
  }, SlotsType<{
1067
1208
  [key: `cell.${string}`]: CellSlotProps;
1209
+ [key: `editor.${string}`]: CellEditorSlotProps;
1068
1210
  [key: `header.${string}`]: {
1069
1211
  column: {
1070
1212
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"s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AA;;;;IAGF,MAAA,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IARtB,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgCgB;MAAE;MAAY;;;;EAE1C;IAAE;;EACJ,OAAA;EACE,SAAA;EACD;IAAE;;EACF,QAAA;EACE,UAAA;kCAyUd;;;;YChbiB;IACf,mBAAmB;IACnB,kBAAkB"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { inferColumns } from "@vueye-table/core";
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";
2
+ import { DataTableBody, DataTableCaption, DataTableCell, DataTableEditCell, DataTableEditRoot, DataTableRoot, DataTableRow, DataTableSelectAll, DataTableSelectRow, DataTableViewport, hierarchyProps, resolveTreeColumn, virtualProps } from "@vueye-table/headless";
3
+ import { VtColumnVisibility, VtEmpty, VtExpandToggle, VtGrid, VtHeader, VtLoadMore, VtPageSize, VtPagination, VtRowActions, VtSearch, VtStatus, VtToolbar, VtTreeCell } from "@vueye-table/styled";
4
4
  import { provideDataTable, useDataTable } from "@vueye-table/vue";
5
- import { computed, defineComponent, h } from "vue";
5
+ import { computed, defineComponent, h, mergeProps } from "vue";
6
6
 
7
7
  export * from "@vueye-table/core"
8
8
 
@@ -55,6 +55,30 @@ const CellContent = defineComponent({
55
55
  });
56
56
  /** Props both full components share. */
57
57
  const commonProps = {
58
+ validateRow: {
59
+ type: Function,
60
+ default: void 0
61
+ },
62
+ asyncValidation: {
63
+ type: String,
64
+ default: void 0
65
+ },
66
+ createRow: {
67
+ type: Function,
68
+ default: void 0
69
+ },
70
+ setParentKey: {
71
+ type: Function,
72
+ default: void 0
73
+ },
74
+ addRow: {
75
+ type: Boolean,
76
+ default: false
77
+ },
78
+ removeRows: {
79
+ type: Boolean,
80
+ default: false
81
+ },
58
82
  ...virtualProps,
59
83
  ...hierarchyProps,
60
84
  rowCanExpand: {
@@ -223,6 +247,22 @@ const commonProps = {
223
247
  default: "all"
224
248
  }
225
249
  };
250
+ const editingEmits = {
251
+ "update:data": (_data) => true,
252
+ edit: (_changes) => true,
253
+ save: (_result) => true,
254
+ cancel: (_key) => true,
255
+ "edit-issues": (_issues) => true,
256
+ "edit-error": (_issues) => true
257
+ };
258
+ function editingOptions(props) {
259
+ return {
260
+ validateRow: props.validateRow,
261
+ asyncValidation: props.asyncValidation,
262
+ createRow: props.createRow,
263
+ setParentKey: props.setParentKey
264
+ };
265
+ }
226
266
  const stateEmits = [
227
267
  "update:page",
228
268
  "update:pageSize",
@@ -271,7 +311,7 @@ function expansionOptions(props, detail) {
271
311
  getParentKey: props.getParentKey,
272
312
  hasChildren: props.hasChildren,
273
313
  loadChildren: props.loadChildren,
274
- treeFilter: props.treeFilter,
314
+ treeFilter: () => props.treeFilter,
275
315
  paginateBy: props.paginateBy
276
316
  };
277
317
  }
@@ -364,6 +404,7 @@ const VueyeGrid = defineComponent({
364
404
  }
365
405
  },
366
406
  emits: {
407
+ ...editingEmits,
367
408
  ...Object.fromEntries(stateEmits.map((name) => [name, null])),
368
409
  "state-change": (_state) => true,
369
410
  "update:data": (_data) => true,
@@ -375,10 +416,21 @@ const VueyeGrid = defineComponent({
375
416
  },
376
417
  setup(props, { emit, slots, expose, attrs }) {
377
418
  const resolveColumns = createColumnResolver();
378
- const columns = computed(() => resolveColumns(props.columns, props.data).map((column) => ({
379
- ...column,
380
- editable: props.editable ? column.editable ?? true : false
381
- })));
419
+ let previousColumns;
420
+ const columns = computed(() => {
421
+ const source = resolveColumns(props.columns, props.data);
422
+ if (previousColumns?.source === source && previousColumns.editable === props.editable) return previousColumns.columns;
423
+ const resolved = source.map((column) => ({
424
+ ...column,
425
+ editable: props.editable ? column.editable ?? true : false
426
+ }));
427
+ previousColumns = {
428
+ source,
429
+ editable: props.editable,
430
+ columns: resolved
431
+ };
432
+ return resolved;
433
+ });
382
434
  const everyRow = () => Math.max(1, props.data.length);
383
435
  const initialPagination = {
384
436
  page: props.page ?? 1,
@@ -387,6 +439,7 @@ const VueyeGrid = defineComponent({
387
439
  let binding;
388
440
  const table = useDataTable({
389
441
  ...expansionOptions(props, !!slots.expanded),
442
+ ...editingOptions(props),
390
443
  data: () => props.data,
391
444
  source: computed(() => props.source),
392
445
  loadMore: computed(() => props.loadMore),
@@ -411,6 +464,7 @@ const VueyeGrid = defineComponent({
411
464
  },
412
465
  onEditIssues(issues) {
413
466
  emit("edit-error", issues);
467
+ emit("edit-issues", issues);
414
468
  },
415
469
  onDataChange(data, changes) {
416
470
  emit("update:data", data);
@@ -435,7 +489,7 @@ const VueyeGrid = defineComponent({
435
489
  ...cellProps,
436
490
  render: cellSlot
437
491
  }) : cellProps.display;
438
- }
492
+ } else if (name.startsWith("editor.")) forwarded[name] = slot;
439
493
  return forwarded;
440
494
  };
441
495
  const button = (label, disabled, onClick) => h("button", {
@@ -448,8 +502,11 @@ const VueyeGrid = defineComponent({
448
502
  class: "vt-theme vueye-grid",
449
503
  "data-vt-theme": props.theme
450
504
  }, [
451
- props.toolbar || props.searchable ? h(VtToolbar, () => [
505
+ props.toolbar || props.searchable || props.addRow ? h(VtToolbar, () => [
452
506
  props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,
507
+ props.addRow ? button("Add row", false, () => {
508
+ table.insertRows();
509
+ }) : null,
453
510
  h("div", { class: "vt-toolbar-spacer" }),
454
511
  props.toolbar ? [
455
512
  button("Undo", !table.canUndo, () => table.undo()),
@@ -462,6 +519,10 @@ const VueyeGrid = defineComponent({
462
519
  label: props.label,
463
520
  "aria-describedby": attrs["aria-describedby"],
464
521
  rowNumbers: props.rowNumbers,
522
+ rowActions: props.editable || props.removeRows,
523
+ removable: props.removeRows,
524
+ onSave: (result) => emit("save", result),
525
+ onCancel: (key) => emit("cancel", key),
465
526
  columnLetters: props.columnLetters,
466
527
  density: props.density,
467
528
  striped: props.striped,
@@ -498,12 +559,17 @@ const VueyeGrid = defineComponent({
498
559
  */
499
560
  const VueyeTable = defineComponent({
500
561
  name: "VueyeTable",
562
+ inheritAttrs: false,
501
563
  props: {
502
564
  data: {
503
565
  type: Array,
504
566
  default: () => []
505
567
  },
506
568
  ...commonProps,
569
+ editMode: {
570
+ type: String,
571
+ default: void 0
572
+ },
507
573
  /** `true` or `"multiple"` for checkboxes, `"single"` for one row at a time. */
508
574
  selectable: {
509
575
  type: [Boolean, String],
@@ -521,6 +587,7 @@ const VueyeTable = defineComponent({
521
587
  }
522
588
  },
523
589
  emits: {
590
+ ...editingEmits,
524
591
  ...Object.fromEntries(stateEmits.map((name) => [name, null])),
525
592
  "state-change": (_state) => true,
526
593
  "row-click": (_item, _row) => true,
@@ -528,7 +595,7 @@ const VueyeTable = defineComponent({
528
595
  collapse: (_item, _row) => true
529
596
  },
530
597
  slots: Object,
531
- setup(props, { emit, slots, expose }) {
598
+ setup(props, { emit, slots, expose, attrs }) {
532
599
  const selectionMode = computed(() => props.selectable === false ? "none" : props.selectable === "single" ? "single" : "multiple");
533
600
  const initialPagination = {
534
601
  page: props.page ?? 1,
@@ -538,6 +605,7 @@ const VueyeTable = defineComponent({
538
605
  let binding;
539
606
  const table = useDataTable({
540
607
  ...expansionOptions(props, !!slots.expanded),
608
+ ...editingOptions(props),
541
609
  data: () => props.data,
542
610
  source: computed(() => props.source),
543
611
  loadMore: computed(() => props.loadMore),
@@ -550,6 +618,14 @@ const VueyeTable = defineComponent({
550
618
  selectionMode: selectionMode.value,
551
619
  selectScope: props.selectScope,
552
620
  initialState: { pagination: initialPagination },
621
+ onDataChange(data, changes) {
622
+ emit("update:data", data);
623
+ emit("edit", changes);
624
+ },
625
+ onEditIssues(issues) {
626
+ emit("edit-issues", issues);
627
+ emit("edit-error", issues);
628
+ },
553
629
  state: () => controlledState(props, binding?.table.getState().pagination ?? initialPagination),
554
630
  onStateChange(state, previous) {
555
631
  emitStateChanges(emit, state, previous);
@@ -562,15 +638,21 @@ const VueyeTable = defineComponent({
562
638
  expose({ table });
563
639
  const busy = () => props.loading || table.loadState === "loading" || table.loadState === "streaming";
564
640
  const selectable = () => selectionMode.value !== "none";
565
- const cell = (row, column) => {
641
+ const cell = (row, column, rowIndex) => {
566
642
  const slot = slots[`cell.${column.id}`];
567
643
  const treeCell = table.tree && column.id === resolveTreeColumn(table, props.treeColumn);
568
- return h(DataTableCell, {
644
+ return h(props.editMode ? DataTableEditCell : DataTableCell, {
569
645
  key: column.id,
570
646
  row,
571
647
  column,
572
- tree: false
648
+ tree: false,
649
+ ...props.editMode ? {
650
+ rowIndex,
651
+ onSave: (result) => emit("save", result),
652
+ onCancel: (key) => emit("cancel", key)
653
+ } : {}
573
654
  }, {
655
+ editor: slots[`editor.${column.id}`],
574
656
  default: ({ value, display }) => {
575
657
  const content = () => slot ? h(CellContent, {
576
658
  row,
@@ -585,7 +667,9 @@ const VueyeTable = defineComponent({
585
667
  });
586
668
  };
587
669
  const hasDetails = () => !!slots.expanded && !table.tree;
588
- const width = () => table.columns.length + (selectable() ? 1 : 0) + (hasDetails() ? 1 : 0);
670
+ const hasActions = () => !!props.editMode || props.removeRows;
671
+ const leadingColumns = () => Number(hasActions()) + Number(hasDetails()) + Number(selectable());
672
+ const width = () => table.columns.length + (selectable() ? 1 : 0) + (hasDetails() ? 1 : 0) + (hasActions() ? 1 : 0);
589
673
  const emptyBody = () => {
590
674
  if (table.rows.length === 0) {
591
675
  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" });
@@ -593,14 +677,27 @@ const VueyeTable = defineComponent({
593
677
  }
594
678
  return null;
595
679
  };
596
- const cells = (row) => {
680
+ const cells = (row, rowIndex) => {
597
681
  return [
598
- hasDetails() ? h("td", { class: "vt-expansion-cell" }, [h(VtExpandToggle, { row })]) : null,
682
+ hasActions() ? h("td", {
683
+ class: "vt-row-controls",
684
+ "aria-colindex": 1,
685
+ onClick: (event) => event.stopPropagation()
686
+ }, [h(VtRowActions, {
687
+ row,
688
+ editable: props.editMode === "row",
689
+ removable: props.removeRows
690
+ })]) : null,
691
+ hasDetails() ? h("td", {
692
+ class: "vt-expansion-cell",
693
+ "aria-colindex": Number(hasActions()) + 1
694
+ }, [h(VtExpandToggle, { row })]) : null,
599
695
  selectable() ? h("td", {
600
696
  class: "vt-selection-cell",
697
+ "aria-colindex": Number(hasActions()) + Number(hasDetails()) + 1,
601
698
  onClick: (event) => event.stopPropagation()
602
699
  }, [h(DataTableSelectRow, { row })]) : null,
603
- ...table.columns.map((column) => cell(row, column))
700
+ ...table.columns.map((column) => cell(row, column, rowIndex))
604
701
  ];
605
702
  };
606
703
  const bodyRow = ({ row, rowIndex }) => h(DataTableRow, {
@@ -609,7 +706,7 @@ const VueyeTable = defineComponent({
609
706
  rowIndex,
610
707
  onClick: () => emit("row-click", row.original, row)
611
708
  }, {
612
- default: () => cells(row),
709
+ default: () => cells(row, rowIndex),
613
710
  $stable: true
614
711
  });
615
712
  const headerSlots = () => {
@@ -620,14 +717,24 @@ const VueyeTable = defineComponent({
620
717
  }
621
718
  return {
622
719
  ...forwarded,
623
- before: () => [hasDetails() ? h("th", {
624
- class: "vt-expansion-cell",
625
- scope: "col",
626
- "aria-label": "Details"
627
- }) : null, selectable() ? h("th", {
628
- class: "vt-selection-cell",
629
- scope: "col"
630
- }, selectionMode.value === "multiple" ? [h(DataTableSelectAll)] : []) : null]
720
+ before: () => [
721
+ hasActions() ? h("th", {
722
+ class: "vt-row-controls",
723
+ scope: "col",
724
+ "aria-colindex": 1
725
+ }, "Row actions") : null,
726
+ hasDetails() ? h("th", {
727
+ class: "vt-expansion-cell",
728
+ scope: "col",
729
+ "aria-colindex": Number(hasActions()) + 1,
730
+ "aria-label": "Details"
731
+ }) : null,
732
+ selectable() ? h("th", {
733
+ class: "vt-selection-cell",
734
+ scope: "col",
735
+ "aria-colindex": Number(hasActions()) + Number(hasDetails()) + 1
736
+ }, selectionMode.value === "multiple" ? [h(DataTableSelectAll)] : []) : null
737
+ ]
631
738
  };
632
739
  };
633
740
  const tableContent = () => {
@@ -650,6 +757,7 @@ const VueyeTable = defineComponent({
650
757
  }, { default: () => h(DataTableRoot, {
651
758
  table,
652
759
  class: "vt-table",
760
+ leadingColumns: leadingColumns(),
653
761
  virtual: props.virtual,
654
762
  rowHeight: props.rowHeight,
655
763
  overscan: props.overscan,
@@ -660,11 +768,11 @@ const VueyeTable = defineComponent({
660
768
  treeColumn: props.treeColumn,
661
769
  keepAliveDetail: props.keepAliveDetail,
662
770
  class: "vt-table",
663
- "aria-colcount": table.columns.length,
771
+ leadingColumns: leadingColumns(),
664
772
  "aria-busy": busy() ? "true" : void 0
665
773
  }, children)]);
666
774
  };
667
- return () => h("div", {
775
+ const surface = () => h("div", mergeProps(attrs, {
668
776
  class: "vt-surface vueye-table",
669
777
  "data-density": props.density,
670
778
  "data-striped": props.striped ? "" : void 0,
@@ -676,9 +784,14 @@ const VueyeTable = defineComponent({
676
784
  "data-vt-theme": props.theme,
677
785
  "aria-busy": props.loading ? "true" : void 0,
678
786
  style: props.maxHeight ? { "--vt-max-height": props.maxHeight } : void 0
679
- }, [h("div", { class: "vt-root" }, [
680
- props.searchable || props.columnToggle || slots.toolbar ? h(VtToolbar, () => [
787
+ }), [h("div", { class: "vt-root" }, [
788
+ props.searchable || props.columnToggle || slots.toolbar || props.addRow ? h(VtToolbar, () => [
681
789
  props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,
790
+ props.addRow ? h("button", {
791
+ type: "button",
792
+ class: "vt-button",
793
+ onClick: () => table.insertRows()
794
+ }, "Add row") : null,
682
795
  h("div", { class: "vt-toolbar-spacer" }),
683
796
  slots.toolbar?.({ table }),
684
797
  props.columnToggle ? h(VtColumnVisibility) : null
@@ -695,6 +808,12 @@ const VueyeTable = defineComponent({
695
808
  props.pagination && table.paginate && (!props.virtual || table.paginate) ? h("div", { class: "vt-footer-controls" }, [h(VtPageSize, { options: props.pageSizeOptions }), h(VtPagination)]) : null
696
809
  ]) : null
697
810
  ])]);
811
+ return () => props.editMode ? h(DataTableEditRoot, {
812
+ table,
813
+ mode: props.editMode,
814
+ onSave: (result) => emit("save", result),
815
+ onCancel: (key) => emit("cancel", key)
816
+ }, surface) : surface();
698
817
  }
699
818
  });
700
819
 
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 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;GA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AC/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;;;;;AC1UD,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 type TableOptions,\n type EditResult,\n type TableIssue,\n type CellChange,\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 validateRow: { type: Function as PropType<TableOptions<any>[\"validateRow\"]>, default: undefined },\n asyncValidation: {\n type: String as PropType<\"held\" | \"optimistic\" | undefined>,\n default: undefined,\n },\n createRow: { type: Function as PropType<(() => any) | undefined>, default: undefined },\n setParentKey: {\n type: Function as PropType<TableOptions<any>[\"setParentKey\"]>,\n default: undefined,\n },\n addRow: { type: Boolean, default: false },\n removeRows: { type: Boolean, default: false },\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 editingEmits = {\n \"update:data\": (_data: readonly unknown[]) => true,\n edit: (_changes: readonly CellChange<unknown>[]) => true,\n save: (_result: EditResult<unknown>) => true,\n cancel: (_key: RowKey) => true,\n \"edit-issues\": (_issues: readonly TableIssue[]) => true,\n \"edit-error\": (_issues: readonly TableIssue[]) => true,\n};\n\nexport function editingOptions(\n props: Pick<\n TableOptions<unknown>,\n \"validateRow\" | \"asyncValidation\" | \"createRow\" | \"setParentKey\"\n >,\n): Pick<TableOptions<unknown>, \"validateRow\" | \"asyncValidation\" | \"createRow\" | \"setParentKey\"> {\n return {\n validateRow: props.validateRow,\n asyncValidation: props.asyncValidation,\n createRow: props.createRow,\n setParentKey: props.setParentKey,\n };\n}\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): Omit<TreeOptions<unknown, AbortSignal>, \"treeFilter\"> & {\n readonly treeFilter: () => TreeOptions<unknown>[\"treeFilter\"];\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 {\n CellChange,\n ColumnDef,\n TableIssue,\n TableState,\n TableRow,\n EditResult,\n} from \"@vueye-table/core\";\nimport type {\n GridCellSlotProps,\n TableStatusSlotProps,\n DetailSlotProps,\n CellEditorSlotProps,\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 editingOptions,\n editingEmits,\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 {\n [key: `cell.${string}`]: GridCellSlotProps & { readonly item: unknown };\n [key: `editor.${string}`]: CellEditorSlotProps;\n } & {\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 ...editingEmits,\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 } & typeof editingEmits & {\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 let previousColumns:\n | { source: readonly unknown[]; editable: boolean; columns: readonly ColumnDef<unknown>[] }\n | undefined;\n const columns = computed(() => {\n const source = resolveColumns(props.columns, props.data);\n if (previousColumns?.source === source && previousColumns.editable === props.editable)\n return previousColumns.columns;\n const resolved = source.map(\n (column) =>\n ({\n ...column,\n editable: props.editable ? (column.editable ?? true) : false,\n }) as ColumnDef<unknown>,\n );\n previousColumns = { source, editable: props.editable, columns: resolved };\n return resolved;\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 ...editingOptions(props),\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 emit(\"edit-issues\", 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 } else if (name.startsWith(\"editor.\")) {\n forwarded[name] = slot;\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 || props.addRow\n ? h(VtToolbar, () => [\n props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,\n props.addRow\n ? button(\"Add row\", false, () => {\n table.insertRows();\n })\n : 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 rowActions: props.editable || props.removeRows,\n removable: props.removeRows,\n onSave: (result: unknown) => emit(\"save\", result as EditResult<unknown>),\n onCancel: (key: unknown) => emit(\"cancel\", key as string | number),\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, EditResult } 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 DataTableEditRoot,\n DataTableEditCell,\n type CellEditorSlotProps,\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 VtRowActions,\n} from \"@vueye-table/styled\";\nimport { provideDataTable, useDataTable, type DataTableBinding } from \"@vueye-table/vue\";\nimport {\n computed,\n defineComponent,\n h,\n mergeProps,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from \"vue\";\n\nimport {\n commonProps,\n controlledState,\n createColumnResolver,\n emitStateChanges,\n stateEmits,\n expansionOptions,\n emitExpansionChanges,\n CellContent,\n editingEmits,\n editingOptions,\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 inheritAttrs: false,\n props: {\n data: { type: Array as PropType<readonly unknown[]>, default: () => [] },\n ...commonProps,\n editMode: { type: String as PropType<\"cell\" | \"row\" | undefined>, default: undefined },\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 ...editingEmits,\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 } & typeof editingEmits & {\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: `editor.${string}`]: CellEditorSlotProps;\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, attrs }) {\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 ...editingOptions(props),\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 onDataChange(data, changes) {\n emit(\"update:data\", data);\n emit(\"edit\", changes);\n },\n onEditIssues(issues) {\n emit(\"edit-issues\", issues);\n emit(\"edit-error\", issues);\n },\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 = (\n row: TableRow<unknown>,\n column: (typeof table.columns)[number],\n rowIndex: number,\n ): VNodeChild => {\n const slot = slots[`cell.${column.id}`];\n const treeCell = table.tree && column.id === resolveTreeColumn(table, props.treeColumn);\n return h(\n props.editMode ? DataTableEditCell : DataTableCell,\n {\n key: column.id,\n row,\n column,\n tree: false,\n ...(props.editMode\n ? {\n rowIndex,\n onSave: (result: EditResult<unknown>) => emit(\"save\", result),\n onCancel: (key: RowKey) => emit(\"cancel\", key),\n }\n : {}),\n },\n {\n editor: slots[`editor.${column.id}`],\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 hasActions = (): boolean => !!props.editMode || props.removeRows;\n const leadingColumns = (): number =>\n Number(hasActions()) + Number(hasDetails()) + Number(selectable());\n const width = (): number =>\n table.columns.length +\n (selectable() ? 1 : 0) +\n (hasDetails() ? 1 : 0) +\n (hasActions() ? 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>, rowIndex: number): VNodeChild[] => {\n const result = [\n hasActions()\n ? h(\n \"td\",\n {\n class: \"vt-row-controls\",\n \"aria-colindex\": 1,\n onClick: (event: Event) => event.stopPropagation(),\n },\n [\n h(VtRowActions, {\n row,\n editable: props.editMode === \"row\",\n removable: props.removeRows,\n }),\n ],\n )\n : null,\n hasDetails()\n ? h(\"td\", { class: \"vt-expansion-cell\", \"aria-colindex\": Number(hasActions()) + 1 }, [\n h(VtExpandToggle, { row }),\n ])\n : null,\n selectable()\n ? h(\n \"td\",\n {\n class: \"vt-selection-cell\",\n \"aria-colindex\": Number(hasActions()) + Number(hasDetails()) + 1,\n onClick: (event: Event) => event.stopPropagation(),\n },\n [h(DataTableSelectRow, { row })],\n )\n : null,\n ...table.columns.map((column) => cell(row, column, rowIndex)),\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, rowIndex), $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 hasActions()\n ? h(\"th\", { class: \"vt-row-controls\", scope: \"col\", \"aria-colindex\": 1 }, \"Row actions\")\n : null,\n hasDetails()\n ? h(\"th\", {\n class: \"vt-expansion-cell\",\n scope: \"col\",\n \"aria-colindex\": Number(hasActions()) + 1,\n \"aria-label\": \"Details\",\n })\n : null,\n selectable()\n ? h(\n \"th\",\n {\n class: \"vt-selection-cell\",\n scope: \"col\",\n \"aria-colindex\": Number(hasActions()) + Number(hasDetails()) + 1,\n },\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 leadingColumns: leadingColumns(),\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 leadingColumns: leadingColumns(),\n \"aria-busy\": busy() ? \"true\" : undefined,\n },\n children,\n ),\n ]);\n };\n\n const surface = () =>\n h(\n \"div\",\n mergeProps(attrs, {\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 || props.addRow\n ? h(VtToolbar, () => [\n props.searchable ? h(VtSearch, { placeholder: props.searchPlaceholder }) : null,\n props.addRow\n ? h(\n \"button\",\n { type: \"button\", class: \"vt-button\", onClick: () => table.insertRows() },\n \"Add row\",\n )\n : 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 return () =>\n props.editMode\n ? h(\n DataTableEditRoot,\n {\n table,\n mode: props.editMode,\n onSave: (result) => emit(\"save\", result),\n onCancel: (key) => emit(\"cancel\", key),\n },\n surface,\n )\n : surface();\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":";;;;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,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;EACF,aACE,MAAM,WACF,EACE,mBACA;GACE;GACA,MAAM,MAAM;GACZ,SAAS,WAAW,KAAK,QAAQ,MAAM;GACvC,WAAW,QAAQ,KAAK,UAAU,GAAG;EACvC,GACA,OACF,IACA,QAAQ;CAChB;AACF,CAAC;;;;;ACtbD,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.9",
3
+ "version": "3.0.0-beta.1",
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.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"
45
+ "@vueye-table/core": "3.0.0-beta.1",
46
+ "@vueye-table/headless": "3.0.0-beta.1",
47
+ "@vueye-table/vue": "3.0.0-beta.1",
48
+ "@vueye-table/styled": "3.0.0-beta.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "vue": "3.5.43",