@nocopypaste/vue-grid 0.9.0 → 0.11.0

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.
Files changed (71) hide show
  1. package/AGENTS.md +72 -34
  2. package/CHANGELOG.md +34 -0
  3. package/README.md +118 -26
  4. package/agent/api.json +67 -1
  5. package/agent/api.md +10 -1
  6. package/agent/grid-config.schema.json +16 -0
  7. package/dist/agent/api.js +65 -1
  8. package/dist/agent/requirements.js +7 -2
  9. package/dist/agent/requirements.js.map +1 -1
  10. package/dist/base.css +1 -1
  11. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +102 -84
  12. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  13. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js +78 -56
  14. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/components/VGridCellEditor.js +6 -0
  16. package/dist/components/VGridCellEditor.js.map +1 -0
  17. package/dist/components/VGridCellEditor.vue_vue_type_script_setup_true_lang.js +208 -0
  18. package/dist/components/VGridCellEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  19. package/dist/components/VGridSortMarker.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/components/VGridSortMarker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  21. package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js +2 -2
  22. package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/composables/useEditing.js +202 -0
  24. package/dist/composables/useEditing.js.map +1 -0
  25. package/dist/core/value.js +18 -2
  26. package/dist/core/value.js.map +1 -1
  27. package/dist/core.css +1 -1
  28. package/dist/features/editing.js +12 -0
  29. package/dist/features/editing.js.map +1 -0
  30. package/dist/features/index.js +30 -28
  31. package/dist/features/index.js.map +1 -1
  32. package/dist/index.js +63 -62
  33. package/dist/internal/context.js.map +1 -1
  34. package/dist/internal/features.js.map +1 -1
  35. package/dist/locales/de.js +133 -0
  36. package/dist/locales/de.js.map +1 -0
  37. package/dist/locales/en.js +133 -0
  38. package/dist/locales/en.js.map +1 -0
  39. package/dist/locales/es.js +151 -0
  40. package/dist/locales/es.js.map +1 -0
  41. package/dist/locales/fr.js +151 -0
  42. package/dist/locales/fr.js.map +1 -0
  43. package/dist/locales/plural.js +11 -0
  44. package/dist/locales/plural.js.map +1 -0
  45. package/dist/locales/sr-Latn.js +135 -0
  46. package/dist/locales/sr-Latn.js.map +1 -0
  47. package/dist/locales/sr.js +135 -0
  48. package/dist/locales/sr.js.map +1 -0
  49. package/dist/theme.css +1 -1
  50. package/dist/types/agent/requirements.d.ts +1 -1
  51. package/dist/types/components/VGrid.vue.d.ts +10 -3
  52. package/dist/types/components/VGridCellEditor.vue.d.ts +11 -0
  53. package/dist/types/composables/useEditing.d.ts +73 -0
  54. package/dist/types/core/value.d.ts +6 -0
  55. package/dist/types/features/editing.d.ts +2 -0
  56. package/dist/types/features/index.d.ts +2 -1
  57. package/dist/types/index.d.ts +1 -1
  58. package/dist/types/internal/context.d.ts +4 -0
  59. package/dist/types/internal/features.d.ts +2 -1
  60. package/dist/types/locales/de.d.ts +124 -0
  61. package/dist/types/locales/en.d.ts +127 -0
  62. package/dist/types/locales/es.d.ts +124 -0
  63. package/dist/types/locales/fr.d.ts +124 -0
  64. package/dist/types/locales/plural.d.ts +11 -0
  65. package/dist/types/locales/sr-Latn.d.ts +124 -0
  66. package/dist/types/locales/sr.d.ts +124 -0
  67. package/dist/types/types.d.ts +113 -8
  68. package/dist/vue-grid.css +1 -1
  69. package/llms-full.txt +200 -61
  70. package/llms.txt +1 -1
  71. package/package.json +5 -1
@@ -31,6 +31,7 @@
31
31
  "columnReorderFeature",
32
32
  "columnResizingFeature",
33
33
  "columnVisibilityFeature",
34
+ "editingFeature",
34
35
  "exportFeature",
35
36
  "filteringFeature",
36
37
  "keyboardNavigationFeature",
@@ -58,6 +59,9 @@
58
59
  "statusBar": {
59
60
  "description": "A status bar under the grid (status bar feature): rows that pass the filters (\"84 of 200 rows\"), selected rows, active filters with Clear; `{ summary: ['total'] }` adds the sum and average of those columns over the selected rows. `#status-bar` replaces its content."
60
61
  },
62
+ "saveCell": {
63
+ "description": "Saves an edited cell (editing feature), after `cell-edit`: return a Promise and the cell shows it saving; a rejection keeps the editor open with the error's message. Without it, `cell-edit` alone carries the change."
64
+ },
61
65
  "messages": {
62
66
  "description": "Built-in text (translations, wording), over `createVueGrid({ messages })`."
63
67
  },
@@ -688,6 +692,18 @@
688
692
  "type": "boolean",
689
693
  "description": "Included in CSV exports and copied rows (export feature)? Default `true`; set `false` on action columns."
690
694
  },
695
+ "editable": {
696
+ "description": "Cells can be edited in place (editing feature): `true`, or per row. Double-click, Enter or F2 on a focused cell, or typing, opens the editor; the grid emits `cell-edit` and your handler updates the data (the grid never changes rows itself)."
697
+ },
698
+ "editor": {
699
+ "description": "The editor (editing feature): `text`, `number`, `date`, `datetime`, `select`, `checkbox`, or your own component (`CellEditorProps`). Default from the renderer: numbers and money → number, dates → date, booleans → checkbox, status / chip → select, else text."
700
+ },
701
+ "editorOptions": {
702
+ "description": "Options of the editor: the choices of a select, a number's `min` / `max`, a `placeholder`."
703
+ },
704
+ "validate": {
705
+ "description": "Checks an edited value before it is saved (editing feature): return an error message to keep the editor open with it, or nothing to accept the value."
706
+ },
691
707
  "cellClass": {
692
708
  "description": "Extra classes for the column's body cells (or a function of the row)."
693
709
  },
package/dist/agent/api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/agent/api.json
2
- var e = "0.9.0", t = "VGrid", n = [
2
+ var e = "0.11.0", t = "VGrid", n = [
3
3
  {
4
4
  name: "rows",
5
5
  type: "readonly T[]",
@@ -47,6 +47,13 @@ var e = "0.9.0", t = "VGrid", n = [
47
47
  description: "A status bar under the grid (status bar feature): rows that pass the filters (\"84 of 200 rows\"), selected rows, active filters with Clear; `{ summary: ['total'] }` adds the sum and average of those columns over the selected rows. `#status-bar` replaces its content.",
48
48
  feature: "statusBar"
49
49
  },
50
+ {
51
+ name: "saveCell",
52
+ type: "(event: CellEditEvent<T>) => unknown",
53
+ required: !1,
54
+ description: "Saves an edited cell (editing feature), after `cell-edit`: return a Promise and the cell shows it saving; a rejection keeps the editor open with the error's message. Without it, `cell-edit` alone carries the change.",
55
+ feature: "editing"
56
+ },
50
57
  {
51
58
  name: "messages",
52
59
  type: "GridMessages",
@@ -430,6 +437,11 @@ var e = "0.9.0", t = "VGrid", n = [
430
437
  payload: "[event: CellActionEvent<T>]",
431
438
  description: "A renderer emitted an action (buttons, toggles, menus, edit, copy)."
432
439
  },
440
+ {
441
+ name: "cell-edit",
442
+ payload: "[event: CellEditEvent<T>]",
443
+ description: "A cell was edited (editing feature): update your data with `value`. The grid doesn't."
444
+ },
433
445
  {
434
446
  name: "sub-rows-error",
435
447
  payload: "[event: { row: T; error: unknown }]",
@@ -635,6 +647,18 @@ var e = "0.9.0", t = "VGrid", n = [
635
647
  type: "Promise<boolean>",
636
648
  required: !0,
637
649
  description: "Copies rows to the clipboard as tab-separated text (pastes as cells into spreadsheets): the selected rows by default, as displayed, no header. Resolves `false` if nothing was copied. Export feature."
650
+ },
651
+ {
652
+ name: "startEdit",
653
+ type: "boolean",
654
+ required: !0,
655
+ description: "Opens the editor of a cell (editing feature), if the column is `editable` for that row and the row is on screen. Returns whether it opened."
656
+ },
657
+ {
658
+ name: "stopEdit",
659
+ type: "void",
660
+ required: !0,
661
+ description: "Closes the open editor: saves its value, or with `cancel` drops it. Editing feature."
638
662
  }
639
663
  ], s = [
640
664
  {
@@ -863,6 +887,34 @@ var e = "0.9.0", t = "VGrid", n = [
863
887
  description: "Included in CSV exports and copied rows (export feature)? Default `true`; set `false` on action columns.",
864
888
  feature: "export"
865
889
  },
890
+ {
891
+ name: "editable",
892
+ type: "boolean | ((row: T) => boolean)",
893
+ required: !1,
894
+ description: "Cells can be edited in place (editing feature): `true`, or per row. Double-click, Enter or F2 on a focused cell, or typing, opens the editor; the grid emits `cell-edit` and your handler updates the data (the grid never changes rows itself).",
895
+ feature: "editing"
896
+ },
897
+ {
898
+ name: "editor",
899
+ type: "EditorName | Component",
900
+ required: !1,
901
+ description: "The editor (editing feature): `text`, `number`, `date`, `datetime`, `select`, `checkbox`, or your own component (`CellEditorProps`). Default from the renderer: numbers and money → number, dates → date, booleans → checkbox, status / chip → select, else text.",
902
+ feature: "editing"
903
+ },
904
+ {
905
+ name: "editorOptions",
906
+ type: "EditorOptions",
907
+ required: !1,
908
+ description: "Options of the editor: the choices of a select, a number's `min` / `max`, a `placeholder`.",
909
+ feature: "editing"
910
+ },
911
+ {
912
+ name: "validate",
913
+ type: "(value: unknown, row: T) => string | null | undefined | void",
914
+ required: !1,
915
+ description: "Checks an edited value before it is saved (editing feature): return an error message to keep the editor open with it, or nothing to accept the value.",
916
+ feature: "editing"
917
+ },
866
918
  {
867
919
  name: "cellClass",
868
920
  type: "ClassValue | ((row: T) => ClassValue)",
@@ -922,6 +974,18 @@ var e = "0.9.0", t = "VGrid", n = [
922
974
  props: [],
923
975
  columnOptions: ["hidden", "hideable"]
924
976
  },
977
+ {
978
+ id: "editing",
979
+ export: "editingFeature",
980
+ description: "",
981
+ props: ["saveCell"],
982
+ columnOptions: [
983
+ "editable",
984
+ "editor",
985
+ "editorOptions",
986
+ "validate"
987
+ ]
988
+ },
925
989
  {
926
990
  id: "export",
927
991
  export: "exportFeature",
@@ -33,7 +33,8 @@ var e = {
33
33
  selectedGroups: "serverGrouping",
34
34
  multiSort: "sorting",
35
35
  sorts: "sorting",
36
- statusBar: "statusBar"
36
+ statusBar: "statusBar",
37
+ saveCell: "editing"
37
38
  }, t = {
38
39
  sortable: "sorting",
39
40
  sortValue: "sorting",
@@ -56,7 +57,11 @@ var e = {
56
57
  groupable: "rowGrouping",
57
58
  groupValue: "rowGrouping",
58
59
  exportValue: "export",
59
- exportable: "export"
60
+ exportable: "export",
61
+ editable: "editing",
62
+ editor: "editing",
63
+ editorOptions: "editing",
64
+ validate: "editing"
60
65
  }, n = /* @__PURE__ */ new Set([
61
66
  "pinnable",
62
67
  "hideable",
@@ -1 +1 @@
1
- {"version":3,"file":"requirements.js","names":["propFeatures","columnFeatures","optOuts","featureExport","id"],"sources":["../../src/agent/requirements.ts"],"sourcesContent":["/**\n * Which feature each grid prop and column option needs (without it the option does nothing). The\n * one fact about the API the types don't carry: the agent API reference (`api.json`), the JSON\n * Schema and `validateGridConfig()` all read it from here.\n */\nexport type FeatureId =\n | 'sorting'\n | 'filtering'\n | 'serverData'\n | 'pagination'\n | 'selection'\n | 'subGrids'\n | 'menus'\n | 'columnReorder'\n | 'columnPinning'\n | 'virtualScrolling'\n | 'columnVisibility'\n | 'keyboardNavigation'\n | 'columnResizing'\n | 'columnGroups'\n | 'rowPinning'\n | 'aggregation'\n | 'rowGrouping'\n | 'export'\n | 'statusBar'\n | 'serverGrouping'\n\n/** Grid props (and `v-model`s) that need a feature. */\nexport const propFeatures: Readonly<Record<string, FeatureId>> = {\n dataSource: 'serverData',\n pagination: 'pagination',\n page: 'pagination',\n pageSize: 'pagination',\n selectable: 'selection',\n selected: 'selection',\n pruneSelection: 'selection',\n selectAllMatching: 'selection',\n selectionMode: 'selection',\n pinnedMaxShare: 'columnPinning',\n isRowSelectable: 'selection',\n subRows: 'subGrids',\n loadSubRows: 'subGrids',\n hasSubRows: 'subGrids',\n virtual: 'virtualScrolling',\n contextMenu: 'menus',\n headerMenu: 'menus',\n filters: 'filtering',\n filterMode: 'filtering',\n filterRow: 'filtering',\n filterStorage: 'filtering',\n noMatchText: 'filtering',\n pinnedRows: 'rowPinning',\n pinnedTopRows: 'rowPinning',\n pinnedBottomRows: 'rowPinning',\n totals: 'aggregation',\n totalsLabel: 'aggregation',\n aggregates: 'aggregation',\n groupBy: 'rowGrouping',\n groupsExpanded: 'rowGrouping',\n selectedGroups: 'serverGrouping',\n multiSort: 'sorting',\n sorts: 'sorting',\n statusBar: 'statusBar',\n}\n\n/** Column options that need a feature. */\nexport const columnFeatures: Readonly<Record<string, FeatureId>> = {\n sortable: 'sorting',\n sortValue: 'sorting',\n sortFn: 'sorting',\n filterable: 'filtering',\n filter: 'filtering',\n filterValue: 'filtering',\n filterFn: 'filtering',\n filterComponent: 'filtering',\n searchable: 'filtering',\n pinned: 'columnPinning',\n pinnable: 'columnPinning',\n hidden: 'columnVisibility',\n hideable: 'columnVisibility',\n reorderable: 'columnReorder',\n resizable: 'columnResizing',\n maxWidth: 'columnResizing',\n group: 'columnGroups',\n aggregate: 'aggregation',\n groupable: 'rowGrouping',\n groupValue: 'rowGrouping',\n exportValue: 'export',\n exportable: 'export',\n}\n\n/**\n * Options whose default is \"on\" and that only opt *out*: setting them without the feature changes\n * nothing worth a warning (`pinnable: false` on a grid without pinning is fine).\n */\nexport const optOuts: ReadonlySet<string> = new Set([\n 'pinnable',\n 'hideable',\n 'reorderable',\n 'resizable',\n 'searchable',\n 'headerMenu',\n 'exportable',\n 'pinnedMaxShare',\n])\n\n/** The export name of a feature: `sorting` → `sortingFeature`. */\nexport const featureExport = (id: FeatureId) => `${id}Feature`\n"],"mappings":";AA4BA,IAAaA,IAAoD;CAC/D,YAAY;CACZ,YAAY;CACZ,MAAM;CACN,UAAU;CACV,YAAY;CACZ,UAAU;CACV,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,SAAS;CACT,aAAa;CACb,YAAY;CACZ,SAAS;CACT,aAAa;CACb,YAAY;CACZ,SAAS;CACT,YAAY;CACZ,WAAW;CACX,eAAe;CACf,aAAa;CACb,YAAY;CACZ,eAAe;CACf,kBAAkB;CAClB,QAAQ;CACR,aAAa;CACb,YAAY;CACZ,SAAS;CACT,gBAAgB;CAChB,gBAAgB;CAChB,WAAW;CACX,OAAO;CACP,WAAW;AACb,GAGaC,IAAsD;CACjE,UAAU;CACV,WAAW;CACX,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,aAAa;CACb,UAAU;CACV,iBAAiB;CACjB,YAAY;CACZ,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,UAAU;CACV,aAAa;CACb,WAAW;CACX,UAAU;CACV,OAAO;CACP,WAAW;CACX,WAAW;CACX,YAAY;CACZ,aAAa;CACb,YAAY;AACd,GAMaC,oBAA+B,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,GAGYC,KAAiB,MAAkB,GAAGC,EAAG"}
1
+ {"version":3,"file":"requirements.js","names":["propFeatures","columnFeatures","optOuts","featureExport","id"],"sources":["../../src/agent/requirements.ts"],"sourcesContent":["/**\n * Which feature each grid prop and column option needs (without it the option does nothing). The\n * one fact about the API the types don't carry: the agent API reference (`api.json`), the JSON\n * Schema and `validateGridConfig()` all read it from here.\n */\nexport type FeatureId =\n | 'sorting'\n | 'filtering'\n | 'serverData'\n | 'pagination'\n | 'selection'\n | 'subGrids'\n | 'menus'\n | 'columnReorder'\n | 'columnPinning'\n | 'virtualScrolling'\n | 'columnVisibility'\n | 'keyboardNavigation'\n | 'columnResizing'\n | 'columnGroups'\n | 'rowPinning'\n | 'aggregation'\n | 'rowGrouping'\n | 'export'\n | 'statusBar'\n | 'serverGrouping'\n | 'editing'\n\n/** Grid props (and `v-model`s) that need a feature. */\nexport const propFeatures: Readonly<Record<string, FeatureId>> = {\n dataSource: 'serverData',\n pagination: 'pagination',\n page: 'pagination',\n pageSize: 'pagination',\n selectable: 'selection',\n selected: 'selection',\n pruneSelection: 'selection',\n selectAllMatching: 'selection',\n selectionMode: 'selection',\n pinnedMaxShare: 'columnPinning',\n isRowSelectable: 'selection',\n subRows: 'subGrids',\n loadSubRows: 'subGrids',\n hasSubRows: 'subGrids',\n virtual: 'virtualScrolling',\n contextMenu: 'menus',\n headerMenu: 'menus',\n filters: 'filtering',\n filterMode: 'filtering',\n filterRow: 'filtering',\n filterStorage: 'filtering',\n noMatchText: 'filtering',\n pinnedRows: 'rowPinning',\n pinnedTopRows: 'rowPinning',\n pinnedBottomRows: 'rowPinning',\n totals: 'aggregation',\n totalsLabel: 'aggregation',\n aggregates: 'aggregation',\n groupBy: 'rowGrouping',\n groupsExpanded: 'rowGrouping',\n selectedGroups: 'serverGrouping',\n multiSort: 'sorting',\n sorts: 'sorting',\n statusBar: 'statusBar',\n saveCell: 'editing',\n}\n\n/** Column options that need a feature. */\nexport const columnFeatures: Readonly<Record<string, FeatureId>> = {\n sortable: 'sorting',\n sortValue: 'sorting',\n sortFn: 'sorting',\n filterable: 'filtering',\n filter: 'filtering',\n filterValue: 'filtering',\n filterFn: 'filtering',\n filterComponent: 'filtering',\n searchable: 'filtering',\n pinned: 'columnPinning',\n pinnable: 'columnPinning',\n hidden: 'columnVisibility',\n hideable: 'columnVisibility',\n reorderable: 'columnReorder',\n resizable: 'columnResizing',\n maxWidth: 'columnResizing',\n group: 'columnGroups',\n aggregate: 'aggregation',\n groupable: 'rowGrouping',\n groupValue: 'rowGrouping',\n exportValue: 'export',\n exportable: 'export',\n editable: 'editing',\n editor: 'editing',\n editorOptions: 'editing',\n validate: 'editing',\n}\n\n/**\n * Options whose default is \"on\" and that only opt *out*: setting them without the feature changes\n * nothing worth a warning (`pinnable: false` on a grid without pinning is fine).\n */\nexport const optOuts: ReadonlySet<string> = new Set([\n 'pinnable',\n 'hideable',\n 'reorderable',\n 'resizable',\n 'searchable',\n 'headerMenu',\n 'exportable',\n 'pinnedMaxShare',\n])\n\n/** The export name of a feature: `sorting` → `sortingFeature`. */\nexport const featureExport = (id: FeatureId) => `${id}Feature`\n"],"mappings":";AA6BA,IAAaA,IAAoD;CAC/D,YAAY;CACZ,YAAY;CACZ,MAAM;CACN,UAAU;CACV,YAAY;CACZ,UAAU;CACV,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,gBAAgB;CAChB,iBAAiB;CACjB,SAAS;CACT,aAAa;CACb,YAAY;CACZ,SAAS;CACT,aAAa;CACb,YAAY;CACZ,SAAS;CACT,YAAY;CACZ,WAAW;CACX,eAAe;CACf,aAAa;CACb,YAAY;CACZ,eAAe;CACf,kBAAkB;CAClB,QAAQ;CACR,aAAa;CACb,YAAY;CACZ,SAAS;CACT,gBAAgB;CAChB,gBAAgB;CAChB,WAAW;CACX,OAAO;CACP,WAAW;CACX,UAAU;AACZ,GAGaC,IAAsD;CACjE,UAAU;CACV,WAAW;CACX,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,aAAa;CACb,UAAU;CACV,iBAAiB;CACjB,YAAY;CACZ,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,UAAU;CACV,aAAa;CACb,WAAW;CACX,UAAU;CACV,OAAO;CACP,WAAW;CACX,WAAW;CACX,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,UAAU;CACV,QAAQ;CACR,eAAe;CACf,UAAU;AACZ,GAMaC,oBAA+B,IAAI,IAAI;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,GAGYC,KAAiB,MAAkB,GAAGC,EAAG"}
package/dist/base.css CHANGED
@@ -1 +1 @@
1
- @layer vue-grid{:root{--vg-select-column-width:2.75rem;--vg-expander-size:1.5rem;--vg-subgrid-indent:1.25rem;--vg-z-header:3;--vg-z-pinned:2;--vg-z-pinned-header:4;--vg-menu-gap:4px}.vg-root{flex-direction:column;min-width:0;min-height:0;max-height:100%;display:flex}.vg-toolbar{flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.vg-selection-banner,.vg-load-error-banner{flex-wrap:wrap;justify-content:center;align-items:center;display:flex}.vg-viewport{flex-direction:column;flex:auto;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.vg{grid-template-columns:var(--vg-columns);isolation:isolate;overscroll-behavior:contain;flex:auto;grid-auto-rows:min-content;align-content:start;min-height:0;display:grid;overflow:auto}.vg-header,.vg-row,.vg-detail-row,.vg-status-row,.vg-empty-row{display:contents}.vg-header-cell{z-index:var(--vg-z-header);user-select:none;white-space:nowrap;align-items:center;display:flex;position:sticky;top:0}.vg-header-cell.vg-reorderable{cursor:grab}.vg-is-dragging,.vg-is-dragging .vg-header-cell{cursor:grabbing}.vg-header-label{text-overflow:ellipsis;min-width:0;overflow:hidden}.vg-sort{cursor:pointer;align-items:center;min-width:0;display:inline-flex}.vg-sort-icon{fill:none;stroke:currentColor;stroke-width:1.75px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:.875rem;height:.875rem}.vg-sort-icon path{opacity:.35}[aria-sort=ascending] .vg-sort-up,[aria-sort=descending] .vg-sort-down,[data-sort-dir=asc] .vg-sort-up,[data-sort-dir=desc] .vg-sort-down{opacity:1}.vg-sort-index{place-items:center;display:inline-grid}.vg-cell{align-items:center;display:flex}.vg-cell-content{flex:auto;align-items:center;min-width:0;display:flex}.vg-align-center,.vg-align-center>.vg-cell-content{text-align:center;justify-content:center}.vg-align-end,.vg-align-end>.vg-cell-content{text-align:end;justify-content:flex-end}.vg-header-cell.vg-align-end,.vg-header-cell.vg-align-end .vg-sort{flex-direction:row-reverse}.vg-row-clickable>.vg-cell,.vg-cell-clickable{cursor:pointer}.vg-cell-select,.vg-header-select{justify-content:center}.vg-pin-left,.vg-pin-right{z-index:var(--vg-z-pinned);position:sticky}.vg-pin-left{left:var(--vg-pin-offset,0)}.vg-pin-right{right:var(--vg-pin-offset,0)}.vg-header-cell.vg-pin-left,.vg-header-cell.vg-pin-right{z-index:var(--vg-z-pinned-header)}@supports (container-type:scroll-state){.vg{container-type:scroll-state}}.vg-cell-tree{--vg-depth:inherit}.vg-tree-gutter{width:calc(var(--vg-expander-size) + var(--vg-depth,0) * var(--vg-subgrid-indent));flex:none;justify-content:flex-end;display:inline-flex}.vg-expander{width:var(--vg-expander-size);height:var(--vg-expander-size);cursor:pointer;place-items:center;display:inline-grid}.vg-expander-icon{width:1rem;height:1rem}.vg-expander[aria-expanded=true] .vg-expander-icon{transform:rotate(90deg)}.vg-rowgroup-cell{cursor:pointer;container-type:inline-size}.vg-rowgroup-label{white-space:nowrap}.vg-rowgroup-name{flex:none;margin-inline-end:.5rem}@container (width<12rem){.vg-rowgroup-name{display:none}}.vg-rowgroup-value{text-overflow:ellipsis;flex:0 auto;min-width:0;display:block;overflow:hidden}.vg-rowgroup-count{flex:none;margin-inline-start:.5rem}.vg-subgrid{grid-column:1/-1;grid-template-columns:subgrid;display:grid}.vg-detail{grid-column:1/-1}.vg-status,.vg-empty{grid-column:1/-1;align-items:center;display:flex}.vg-empty{justify-content:center}.vg-spinner{width:.875rem;height:.875rem}.vg-progress{z-index:calc(var(--vg-z-pinned-header) + 1);height:2px;position:absolute;inset:0 0 auto;overflow:hidden}.vg-progress:after{content:"";width:40%;position:absolute;inset:0}.vg-spacer{grid-column:1/-1}.vg-virtual{overflow-anchor:none}.vg-virtual .vg-row>.vg-cell{box-sizing:border-box;height:var(--vg-row-height);overflow:hidden}.vg-checkbox{cursor:pointer;display:inline-flex}.vg-checkbox input{width:1rem;height:1rem;cursor:inherit}.vg-checkbox input:disabled{cursor:not-allowed}.vg-button{cursor:pointer;align-items:center;display:inline-flex}.vg-button-icon{width:1rem;height:1rem}.vg-icon-button{cursor:pointer;place-items:center;width:1.75rem;height:1.75rem;display:inline-grid}.vg-icon-button svg{fill:currentColor;width:1rem;height:1rem}.vg-link-button{text-align:inherit;cursor:pointer}.vg-menu{margin:var(--vg-menu-gap) 0;position-area:bottom span-left;position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-visibility:anchor-visible;min-width:10rem;max-height:min(22rem,70vh);position:fixed;inset:auto;overflow:auto}.vg-menu[data-placement=bottom-start]{position-area:bottom span-right}.vg-menu[data-placement=point]{position-area:bottom right;margin:2px}.vg-menu[data-vg-anchor-hidden]{visibility:hidden}.vg-menu-point{pointer-events:none;width:0;height:0;position:fixed}.vg-menu-item{text-align:start;white-space:nowrap;cursor:pointer;align-items:center;width:100%;display:flex}.vg-menu-item:disabled{cursor:not-allowed}.vg-menu-label{flex:auto}.vg-menu-icon{flex:none;width:1rem;height:1rem}.vg-filter-button{flex:none;width:1.5rem;height:1.5rem;margin-inline-start:auto}.vg-filter-button svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linejoin:round;width:.875rem;height:.875rem}.vg-filter-button.vg-filter-on svg{fill:currentColor}.vg-header-cell.vg-has-filter-row{flex-wrap:wrap;align-content:flex-start}.vg-filter-input{flex:1 0 100%;order:10}.vg-filter-input .vg-input{box-sizing:border-box;width:100%}.vg-filter-summary{text-align:start;cursor:pointer}.vg-filter-popover{min-width:15rem;max-width:min(20rem,90vw)}.vg-filter-panel{display:grid}.vg-filter-head{justify-content:space-between;align-items:center;display:flex}.vg-filter-head .vg-link-button:disabled{cursor:default}.vg-filter-fields{display:grid}.vg-filter-fields .vg-input{box-sizing:border-box;width:100%}.vg-filter-option{cursor:pointer;align-items:center;display:flex}.vg-filter-values{max-height:14rem;overflow:auto}.vg-filter-value-label{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.vg-search{min-width:12rem}.vg-no-match{flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex}.vg-column-panel{min-width:14rem}.vg-column-panel:popover-open{display:grid}.vg-column-list{display:grid}.vg-column-option{cursor:pointer;align-items:center;display:flex}.vg-pagination{flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}.vg-status-bar{flex-wrap:wrap;align-items:center;display:flex}.vg-status-item{flex-wrap:wrap;align-items:baseline;display:inline-flex}.vg-status-summary{flex-wrap:wrap;margin-inline-start:auto;display:flex}.vg-pagination-pages{flex-wrap:wrap;align-items:center;margin-inline-start:auto;display:flex}.vg-page{cursor:pointer;min-width:2rem;height:2rem}.vg-page:disabled{cursor:not-allowed}@media (width<30rem){.vg-page-first,.vg-page-last{display:none}}.vg-text{overflow-wrap:break-word;min-width:0}.vg-text-ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vg-text-clamp{-webkit-line-clamp:var(--vg-text-lines);line-clamp:var(--vg-text-lines);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.vg-text-pre{white-space:pre-line}.vg-text-fill{display:inline-block}.vg-text-adorned{align-items:center;min-width:0;max-width:100%;display:inline-flex}.vg-text-icon{flex:none;display:inline-flex}.vg-text-icon>svg{width:1rem;height:1rem}.vg-badge{flex:none;place-items:center;min-width:1.125rem;height:1.125rem;display:inline-grid}.vg-copy-button{flex:none}.vg-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vg-resize-handle{z-index:1;cursor:col-resize;touch-action:none;user-select:none;inline-size:8px;position:absolute;inset-block:0;inset-inline-end:0}.vg-header-groups{display:contents}.vg-group-cell{z-index:var(--vg-z-header);white-space:nowrap;justify-content:center;align-items:center;min-width:0;display:flex;position:sticky;top:0;overflow:hidden}.vg-group-label{text-overflow:ellipsis;min-width:0;overflow:hidden}.vg-group-cell.vg-pin-left,.vg-group-cell.vg-pin-right{z-index:var(--vg-z-pinned-header)}.vg-has-groups .vg-header-cell{top:var(--vg-group-row-height,0px)}.vg-pinned-rows{grid-column:1/-1;grid-template-columns:subgrid;z-index:var(--vg-z-header);display:grid;position:sticky}.vg-pinned-top{top:calc(var(--vg-group-row-height,0px) + var(--vg-header-height,0px))}.vg-pinned-bottom{bottom:0}.vg-has-pinned-rows{scroll-padding-block:calc(var(--vg-group-row-height,0px) + var(--vg-header-height,0px) + var(--vg-pinned-top-height,0px)) var(--vg-pinned-bottom-height,0px)}@media (pointer:coarse){.vg-header-cell,.vg-has-cell-menu .vg-cell{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.vg-col-sized{min-width:0;overflow:hidden}.vg-is-resizing,.vg-is-resizing .vg-header-cell,.vg-is-resizing .vg-sort{cursor:col-resize;user-select:none}.vg-header-cell,.vg-group-cell,.vg-pin-left,.vg-pin-right{background-color:canvas}}
1
+ @layer vue-grid{:root{--vg-select-column-width:2.75rem;--vg-expander-size:1.5rem;--vg-subgrid-indent:1.25rem;--vg-z-header:3;--vg-z-pinned:2;--vg-z-pinned-header:4;--vg-menu-gap:4px}.vg-root{flex-direction:column;min-width:0;min-height:0;max-height:100%;display:flex}.vg-toolbar{flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.vg-selection-banner,.vg-load-error-banner{flex-wrap:wrap;justify-content:center;align-items:center;display:flex}.vg-viewport{flex-direction:column;flex:auto;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.vg{grid-template-columns:var(--vg-columns);isolation:isolate;overscroll-behavior:contain;flex:auto;grid-auto-rows:min-content;align-content:start;min-height:0;display:grid;overflow:auto}.vg-header,.vg-row,.vg-detail-row,.vg-status-row,.vg-empty-row{display:contents}.vg-header-cell{z-index:var(--vg-z-header);user-select:none;white-space:nowrap;align-items:center;display:flex;position:sticky;top:0}.vg-header-cell.vg-reorderable{cursor:grab}.vg-is-dragging,.vg-is-dragging .vg-header-cell{cursor:grabbing}.vg-header-label{text-overflow:ellipsis;min-width:0;overflow:hidden}.vg-sort{cursor:pointer;align-items:center;min-width:0;display:inline-flex}.vg-sort-icon{fill:none;stroke:currentColor;stroke-width:1.75px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:.875rem;height:.875rem}.vg-sort-icon path{opacity:.35}[aria-sort=ascending] .vg-sort-up,[aria-sort=descending] .vg-sort-down,[data-sort-dir=asc] .vg-sort-up,[data-sort-dir=desc] .vg-sort-down{opacity:1}.vg-sort-index{place-items:center;display:inline-grid}.vg-cell{align-items:center;display:flex}.vg-cell-content{flex:auto;align-items:center;min-width:0;display:flex}.vg-align-center,.vg-align-center>.vg-cell-content{text-align:center;justify-content:center}.vg-align-end,.vg-align-end>.vg-cell-content{text-align:end;justify-content:flex-end}.vg-header-cell.vg-align-end,.vg-header-cell.vg-align-end .vg-sort{flex-direction:row-reverse}.vg-row-clickable>.vg-cell,.vg-cell-clickable{cursor:pointer}.vg-cell-select,.vg-header-select{justify-content:center}.vg-pin-left,.vg-pin-right{z-index:var(--vg-z-pinned);position:sticky}.vg-pin-left{left:var(--vg-pin-offset,0)}.vg-pin-right{right:var(--vg-pin-offset,0)}.vg-header-cell.vg-pin-left,.vg-header-cell.vg-pin-right{z-index:var(--vg-z-pinned-header)}@supports (container-type:scroll-state){.vg{container-type:scroll-state}}.vg-cell-tree{--vg-depth:inherit}.vg-tree-gutter{width:calc(var(--vg-expander-size) + var(--vg-depth,0) * var(--vg-subgrid-indent));flex:none;justify-content:flex-end;display:inline-flex}.vg-expander{width:var(--vg-expander-size);height:var(--vg-expander-size);cursor:pointer;place-items:center;display:inline-grid}.vg-expander-icon{width:1rem;height:1rem}.vg-expander[aria-expanded=true] .vg-expander-icon{transform:rotate(90deg)}.vg-rowgroup-cell{cursor:pointer;container-type:inline-size}.vg-rowgroup-label{white-space:nowrap}.vg-rowgroup-name{flex:none;margin-inline-end:.5rem}@container (width<12rem){.vg-rowgroup-name{display:none}}.vg-rowgroup-value{text-overflow:ellipsis;flex:0 auto;min-width:0;display:block;overflow:hidden}.vg-rowgroup-count{flex:none;margin-inline-start:.5rem}.vg-subgrid{grid-column:1/-1;grid-template-columns:subgrid;display:grid}.vg-detail{grid-column:1/-1}.vg-status,.vg-empty{grid-column:1/-1;align-items:center;display:flex}.vg-empty{justify-content:center}.vg-spinner{width:.875rem;height:.875rem}.vg-progress{z-index:calc(var(--vg-z-pinned-header) + 1);height:2px;position:absolute;inset:0 0 auto;overflow:hidden}.vg-progress:after{content:"";width:40%;position:absolute;inset:0}.vg-spacer{grid-column:1/-1}.vg-virtual{overflow-anchor:none}.vg-virtual .vg-row>.vg-cell{box-sizing:border-box;height:var(--vg-row-height);overflow:hidden}.vg-checkbox{cursor:pointer;display:inline-flex}.vg-checkbox input{width:1rem;height:1rem;cursor:inherit}.vg-checkbox input:disabled{cursor:not-allowed}.vg-button{cursor:pointer;align-items:center;display:inline-flex}.vg-button-icon{width:1rem;height:1rem}.vg-icon-button{cursor:pointer;place-items:center;width:1.75rem;height:1.75rem;display:inline-grid}.vg-icon-button svg{fill:currentColor;width:1rem;height:1rem}.vg-link-button{text-align:inherit;cursor:pointer}.vg-menu{margin:var(--vg-menu-gap) 0;position-area:bottom span-left;position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-visibility:anchor-visible;min-width:10rem;max-height:min(22rem,70vh);position:fixed;inset:auto;overflow:auto}.vg-menu[data-placement=bottom-start]{position-area:bottom span-right}.vg-menu[data-placement=point]{position-area:bottom right;margin:2px}.vg-menu[data-vg-anchor-hidden]{visibility:hidden}.vg-menu-point{pointer-events:none;width:0;height:0;position:fixed}.vg-menu-item{text-align:start;white-space:nowrap;cursor:pointer;align-items:center;width:100%;display:flex}.vg-menu-item:disabled{cursor:not-allowed}.vg-menu-label{flex:auto}.vg-menu-icon{flex:none;width:1rem;height:1rem}.vg-filter-button{flex:none;width:1.5rem;height:1.5rem;margin-inline-start:auto}.vg-filter-button svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linejoin:round;width:.875rem;height:.875rem}.vg-filter-button.vg-filter-on svg{fill:currentColor}.vg-header-cell.vg-has-filter-row{flex-wrap:wrap;align-content:flex-start}.vg-filter-input{flex:1 0 100%;order:10}.vg-filter-input .vg-input{box-sizing:border-box;width:100%}.vg-filter-summary{text-align:start;cursor:pointer}.vg-filter-popover{min-width:15rem;max-width:min(20rem,90vw)}.vg-filter-panel{display:grid}.vg-filter-head{justify-content:space-between;align-items:center;display:flex}.vg-filter-head .vg-link-button:disabled{cursor:default}.vg-filter-fields{display:grid}.vg-filter-fields .vg-input{box-sizing:border-box;width:100%}.vg-filter-option{cursor:pointer;align-items:center;display:flex}.vg-filter-values{max-height:14rem;overflow:auto}.vg-filter-value-label{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.vg-search{min-width:12rem}.vg-no-match{flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex}.vg-column-panel{min-width:14rem}.vg-column-panel:popover-open{display:grid}.vg-column-list{display:grid}.vg-column-option{cursor:pointer;align-items:center;display:flex}.vg-pagination{flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}.vg-status-bar{flex-wrap:wrap;align-items:center;display:flex}.vg-status-item{flex-wrap:wrap;align-items:baseline;display:inline-flex}.vg-status-summary{flex-wrap:wrap;margin-inline-start:auto;display:flex}.vg-pagination-pages{flex-wrap:wrap;align-items:center;margin-inline-start:auto;display:flex}.vg-page{cursor:pointer;min-width:2rem;height:2rem}.vg-page:disabled{cursor:not-allowed}@media (width<30rem){.vg-page-first,.vg-page-last{display:none}}.vg-text{overflow-wrap:break-word;min-width:0}.vg-text-ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vg-text-clamp{-webkit-line-clamp:var(--vg-text-lines);line-clamp:var(--vg-text-lines);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.vg-text-pre{white-space:pre-line}.vg-text-fill{display:inline-block}.vg-text-adorned{align-items:center;min-width:0;max-width:100%;display:inline-flex}.vg-text-icon{flex:none;display:inline-flex}.vg-text-icon>svg{width:1rem;height:1rem}.vg-badge{flex:none;place-items:center;min-width:1.125rem;height:1.125rem;display:inline-grid}.vg-copy-button{flex:none}.vg-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vg-resize-handle{z-index:1;cursor:col-resize;touch-action:none;user-select:none;inline-size:8px;position:absolute;inset-block:0;inset-inline-end:0}.vg-header-groups{display:contents}.vg-group-cell{z-index:var(--vg-z-header);white-space:nowrap;justify-content:center;align-items:center;min-width:0;display:flex;position:sticky;top:0;overflow:hidden}.vg-group-label{text-overflow:ellipsis;min-width:0;overflow:hidden}.vg-group-cell.vg-pin-left,.vg-group-cell.vg-pin-right{z-index:var(--vg-z-pinned-header)}.vg-has-groups .vg-header-cell{top:var(--vg-group-row-height,0px)}.vg-pinned-rows{grid-column:1/-1;grid-template-columns:subgrid;z-index:var(--vg-z-header);display:grid;position:sticky}.vg-pinned-top{top:calc(var(--vg-group-row-height,0px) + var(--vg-header-height,0px))}.vg-pinned-bottom{bottom:0}.vg-has-pinned-rows{scroll-padding-block:calc(var(--vg-group-row-height,0px) + var(--vg-header-height,0px) + var(--vg-pinned-top-height,0px)) var(--vg-pinned-bottom-height,0px)}@media (pointer:coarse){.vg-header-cell,.vg-has-cell-menu .vg-cell{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.vg-cell-editing:not(.vg-pin-left,.vg-pin-right){position:relative}.vg-cell-editing>.vg-cell-content{visibility:hidden}.vg-editor{min-width:0;padding:inherit;align-items:center;display:flex;position:absolute;inset:0}.vg-editor-control{box-sizing:border-box;width:100%;min-width:0;color:inherit;font:inherit;text-align:inherit;background:0 0;border:0;flex:auto;margin:0;padding:0}.vg-editor-control:focus{outline:none}.vg-edit-error[popover]{position-area:bottom span-right;position-try-fallbacks:flip-block;margin:0;position:fixed;inset:auto}.vg-col-sized{min-width:0;overflow:hidden}.vg-is-resizing,.vg-is-resizing .vg-header-cell,.vg-is-resizing .vg-sort{cursor:col-resize;user-select:none}.vg-header-cell,.vg-group-cell,.vg-pin-left,.vg-pin-right{background-color:canvas}}
@@ -50,6 +50,7 @@ var ke = ["data-density"], Ae = {
50
50
  default: !1
51
51
  },
52
52
  statusBar: { type: [Boolean, Object] },
53
+ saveCell: {},
53
54
  messages: {},
54
55
  parts: {},
55
56
  sortMode: { default: "controlled" },
@@ -155,6 +156,7 @@ var ke = ["data-density"], Ae = {
155
156
  "row-click",
156
157
  "cell-click",
157
158
  "cell-action",
159
+ "cell-edit",
158
160
  "sub-rows-error",
159
161
  "context-action",
160
162
  "header-action",
@@ -401,7 +403,7 @@ var ke = ["data-density"], Ae = {
401
403
  walk: Wt,
402
404
  view: () => ({
403
405
  rows: Sn.value,
404
- ctx: En
406
+ ctx: Dn
405
407
  }),
406
408
  prune: () => x.pruneSelection,
407
409
  allMatching: Je,
@@ -411,7 +413,7 @@ var ke = ["data-density"], Ae = {
411
413
  groupBy: () => w.value,
412
414
  setGroupBy: (e) => w.value = e,
413
415
  columns: () => x.columns,
414
- rows: () => _n.value,
416
+ rows: () => gn.value,
415
417
  sort: () => M.sorting ? z.value : [],
416
418
  expandedByDefault: () => x.groupsExpanded,
417
419
  selected: S,
@@ -482,7 +484,7 @@ var ke = ["data-density"], Ae = {
482
484
  } : void 0
483
485
  }), on = (e) => {
484
486
  an?.onKeyDown(e), A("copyShortcut") && Cn?.onKeyDown(e);
485
- }, sn = (e) => an?.onFocusIn(e), cn = c(() => rn ? En.treeMode.value ? "treegrid" : "grid" : "table"), ln = we(), X = M.menus?.useMenus({
487
+ }, sn = (e) => an?.onFocusIn(e), cn = c(() => rn ? Dn.treeMode.value ? "treegrid" : "grid" : "table"), ln = we(), X = M.menus?.useMenus({
486
488
  menu: ln,
487
489
  messages: () => k.value,
488
490
  columns: () => N.value,
@@ -518,40 +520,40 @@ var ke = ["data-density"], Ae = {
518
520
  }), un = () => {
519
521
  let e = x.rowKey;
520
522
  return (t) => o(t, e);
521
- }, dn = M.rowPinning?.PinnedRows ?? M.aggregation?.PinnedRows, fn = c(() => H ? H.apply(G.value) : G.value), pn = M.rowPinning?.usePinnedRows({
523
+ }, dn = M.rowPinning?.PinnedRows ?? M.aggregation?.PinnedRows, fn = c(() => H ? H.apply(G.value) : G.value), Z = M.rowPinning?.usePinnedRows({
522
524
  model: qe,
523
525
  rows: () => G.value,
524
526
  keyOf: un,
525
527
  extraTop: () => x.pinnedTopRows,
526
528
  extraBottom: () => x.pinnedBottomRows
527
- }), Z = M.aggregation?.useTotals({
529
+ }), Q = M.aggregation?.useTotals({
528
530
  totals: () => x.totals,
529
531
  given: () => x.aggregates,
530
532
  rows: () => fn.value,
531
533
  columns: () => x.columns
532
- }), mn = [], Q = c(() => {
533
- if (!pn && !Z) return {
534
- top: mn,
535
- bottom: mn
534
+ }), pn = [], $ = c(() => {
535
+ if (!Z && !Q) return {
536
+ top: pn,
537
+ bottom: pn
536
538
  };
537
- let e = Z?.at.value, t = e ? [Z.item.value] : [];
539
+ let e = Q?.at.value, t = e ? [Q.item.value] : [];
538
540
  return {
539
- top: [...e === "top" ? t : [], ...pn?.items.value.top ?? []],
540
- bottom: [...pn?.items.value.bottom ?? [], ...e === "bottom" ? t : []]
541
+ top: [...e === "top" ? t : [], ...Z?.items.value.top ?? []],
542
+ bottom: [...Z?.items.value.bottom ?? [], ...e === "bottom" ? t : []]
541
543
  };
542
- }), hn = c(() => Q.value.top.length);
543
- function gn(e, t) {
544
- pn ? pn.pinRow(e, t) : process.env.NODE_ENV !== "production" && s("feature:rowPinning", "pinRow() needs the row pinning feature (rowPinningFeature).");
544
+ }), mn = c(() => $.value.top.length);
545
+ function hn(e, t) {
546
+ Z ? Z.pinRow(e, t) : process.env.NODE_ENV !== "production" && s("feature:rowPinning", "pinRow() needs the row pinning feature (rowPinningFeature).");
545
547
  }
546
- let _n = c(() => {
547
- let e = yt(fn.value), t = pn?.keys.value;
548
+ let gn = c(() => {
549
+ let e = yt(fn.value), t = Z?.keys.value;
548
550
  if (!t?.size) return e;
549
551
  let n = un();
550
552
  return e.filter((e) => !t.has(n(e)));
551
- }), vn = c(() => q?.active.value ? q.groups.value : _n.value), yn = M.virtualScrolling?.useVirtualRows({
553
+ }), _n = c(() => q?.active.value ? q.groups.value : gn.value), vn = M.virtualScrolling?.useVirtualRows({
552
554
  root: O,
553
555
  options: () => it.value,
554
- rows: () => vn.value,
556
+ rows: () => _n.value,
555
557
  keyOf: q ? () => q.keyOf(un()) : un,
556
558
  expanded: () => q?.expanded(wt.value) ?? wt.value,
557
559
  subRows: () => {
@@ -565,12 +567,12 @@ var ke = ["data-density"], Ae = {
565
567
  let e = H?.visibleKeys.value ?? null, t = vt(), n = un(), r = (r) => t(e ? r.filter((t) => e.has(n(Te(t)))) : r);
566
568
  return q ? q.preparer(r) : r;
567
569
  }
568
- }), bn = () => yn?.onScroll(), $ = c(() => yn?.layout.value ?? null), xn = c(() => U.value ? W?.total.value ?? G.value.length : vn.value.length), Sn = c(() => {
570
+ }), yn = () => vn?.onScroll(), bn = c(() => vn?.layout.value ?? null), xn = c(() => U.value ? W?.total.value ?? G.value.length : _n.value.length), Sn = c(() => {
569
571
  if (Ft.value && !U.value) {
570
572
  let e = (Lt.value - 1) * It.value;
571
- return vn.value.slice(e, e + It.value);
573
+ return _n.value.slice(e, e + It.value);
572
574
  }
573
- return vn.value;
575
+ return _n.value;
574
576
  });
575
577
  b([
576
578
  Ft,
@@ -597,12 +599,20 @@ var ke = ["data-density"], Ae = {
597
599
  prepare: (e, t) => (t ? Nt : yt)(e),
598
600
  selected: S,
599
601
  extraRows: () => [...x.pinnedTopRows ?? [], ...x.pinnedBottomRows ?? []],
600
- totals: () => !!Z?.at.value && {
601
- values: Z.values.value,
602
+ totals: () => !!Q?.at.value && {
603
+ values: Q.values.value,
602
604
  label: Qe.value
603
605
  },
604
606
  onCopy: (e) => E("copy", e)
605
- }), wn = M.statusBar?.useStatusBar({
607
+ }), wn = M.editing?.useEditing({
608
+ root: O,
609
+ messages: () => k.value,
610
+ emit: (e) => E("cell-edit", e),
611
+ save: () => x.saveCell,
612
+ rows: () => G.value,
613
+ columns: () => x.columns,
614
+ preload: () => M.editing.preload()
615
+ }), Tn = M.statusBar?.useStatusBar({
606
616
  options: () => x.statusBar,
607
617
  rowCount: () => q?.server.value ? W?.rowTotal.value ?? q.groups.value.reduce((e, t) => e + t.count, 0) : U.value ? W?.total.value ?? G.value.length : fn.value.length,
608
618
  totalRowCount: () => U.value ? void 0 : G.value.length,
@@ -612,7 +622,7 @@ var ke = ["data-density"], Ae = {
612
622
  allMatching: Je,
613
623
  filterCount: Mt,
614
624
  canClear: !!M.filtering,
615
- clearFilters: () => Nn(),
625
+ clearFilters: () => Pn(),
616
626
  children: V,
617
627
  getKey: j,
618
628
  columns: () => x.columns,
@@ -641,15 +651,17 @@ var ke = ["data-density"], Ae = {
641
651
  !M.columnVisibility && r && e("columnVisibility", `Column "${r}" is hidden; that`);
642
652
  let i = x.columns.find((e) => e.pinned)?.key;
643
653
  !M.columnPinning && i && e("columnPinning", `Column "${i}" is pinned; that`), !M.menus && (x.contextMenu || typeof x.headerMenu == "function") && e("menus", "`context-menu` / a `header-menu` function"), !M.rowPinning && (qe.value || x.pinnedTopRows || x.pinnedBottomRows) && e("rowPinning", "`pinned-rows` / `pinned-top-rows` / `pinned-bottom-rows`"), !M.aggregation && x.totals && e("aggregation", "`totals`"), !M.statusBar && x.statusBar && e("statusBar", "`status-bar`");
644
- let a = x.columns.find((e) => e.exportValue)?.key;
645
- !M.export && a && e("export", `Column "${a}" has an \`exportValue\`; that`);
646
- let o = w.value == null ? [] : typeof w.value == "string" ? [w.value] : w.value;
647
- !M.rowGrouping && o.length && e("rowGrouping", "`group-by`");
648
- let ee = o.find((e) => !x.columns.some((t) => t.key === e));
649
- M.rowGrouping && ee !== void 0 && s(`group-by:${ee}`, `\`group-by\` names "${ee}", which is not a column key; it is ignored.`);
654
+ let a = x.columns.find((e) => e.editable)?.key;
655
+ !M.editing && a && e("editing", `Column "${a}" is \`editable\`; that`);
656
+ let o = x.columns.find((e) => e.exportValue)?.key;
657
+ !M.export && o && e("export", `Column "${o}" has an \`exportValue\`; that`);
658
+ let ee = w.value == null ? [] : typeof w.value == "string" ? [w.value] : w.value;
659
+ !M.rowGrouping && ee.length && e("rowGrouping", "`group-by`");
660
+ let te = ee.find((e) => !x.columns.some((t) => t.key === e));
661
+ M.rowGrouping && te !== void 0 && s(`group-by:${te}`, `\`group-by\` names "${te}", which is not a column key; it is ignored.`);
650
662
  }), b(() => x.features, () => s("features-changed", "`features` is read once, when the grid is created; changes are ignored."));
651
663
  }
652
- let Tn = c(() => new Set(x.highlightedRows ?? [])), En = {
664
+ let En = c(() => new Set(x.highlightedRows ?? [])), Dn = {
653
665
  keyboardNav: rn,
654
666
  messages: k,
655
667
  parts: Ze,
@@ -662,6 +674,10 @@ var ke = ["data-density"], Ae = {
662
674
  sortRows: Nt,
663
675
  sortable: mt,
664
676
  SortMarker: M.sorting?.SortMarker,
677
+ editing: wn && {
678
+ ...wn,
679
+ Editor: M.editing.Editor
680
+ },
665
681
  resize: R && {
666
682
  Handle: M.columnResizing.Handle,
667
683
  can: lt,
@@ -671,9 +687,9 @@ var ke = ["data-density"], Ae = {
671
687
  isSized: (e) => !!P.value.widths?.[e] || R.resizing.value === e
672
688
  },
673
689
  headerRows: pt,
674
- pinnedTopCount: hn,
675
- totals: Z && {
676
- values: Z.values,
690
+ pinnedTopCount: mn,
691
+ totals: Q && {
692
+ values: Q.values,
677
693
  label: Qe
678
694
  },
679
695
  treeMode: St,
@@ -690,7 +706,7 @@ var ke = ["data-density"], Ae = {
690
706
  isRowSelectable: (e) => K?.isRowSelectable(e) ?? !1,
691
707
  rowCheckState: (e) => K?.rowCheckState(e) ?? "none",
692
708
  toggleRow: (e, t) => K?.toggleRow(e, t),
693
- isHighlighted: (e) => Tn.value.has(e),
709
+ isHighlighted: (e) => En.value.has(e),
694
710
  rowClass: (e, t) => x.rowClass?.(e, t),
695
711
  rowClickable: c(() => x.rowClickable),
696
712
  flash: c(() => x.flash ?? !1),
@@ -708,7 +724,7 @@ var ke = ["data-density"], Ae = {
708
724
  open: At
709
725
  },
710
726
  virtual: at,
711
- virtualRows: yn?.context,
727
+ virtualRows: vn?.context,
712
728
  pinStyle: (e) => {
713
729
  let t = Qt?.value[e];
714
730
  return t === void 0 ? void 0 : { "--vg-pin-offset": t };
@@ -742,54 +758,56 @@ var ke = ["data-density"], Ae = {
742
758
  value: a(e, n.def)
743
759
  }, r, i) : void 0
744
760
  };
745
- q?.extend(En, M.rowGrouping.GroupCells), Ce(ae, En);
746
- function Dn() {
761
+ q?.extend(Dn, M.rowGrouping.GroupCells), Ce(ae, Dn);
762
+ function On() {
747
763
  O.value?.scrollTo({ top: 0 });
748
764
  }
749
- function On(e) {
750
- yn?.scrollToKey(e) || (O.value?.querySelector(`[data-row-key="${CSS.escape(String(e))}"] > .vg-cell`))?.scrollIntoView({ block: "nearest" });
765
+ function kn(e) {
766
+ vn?.scrollToKey(e) || (O.value?.querySelector(`[data-row-key="${CSS.escape(String(e))}"] > .vg-cell`))?.scrollIntoView({ block: "nearest" });
751
767
  }
752
- function kn() {
768
+ function An() {
753
769
  let e = [];
754
770
  Wt(G.value, (t) => {
755
771
  Tt(t) && e.push(j(t));
756
772
  }), We.value = e, q?.setAll(!0);
757
773
  }
758
- function An() {
774
+ function jn() {
759
775
  We.value = [], q?.setAll(!1);
760
776
  }
761
- function jn(e) {
777
+ function Mn(e) {
762
778
  return (B?.patchLoaded(e) ?? 0) + (U.value && W ? W.patch(e) : 0);
763
779
  }
764
- function Mn(e) {
780
+ function Nn(e) {
765
781
  H ? H.setFilters(e) : process.env.NODE_ENV !== "production" && s("feature:filtering", "setFilters() needs the filtering feature (filteringFeature).");
766
782
  }
767
- let Nn = () => H?.clearAll(), Pn = () => {
783
+ let Pn = () => H?.clearAll(), Fn = () => {
768
784
  K?.clear(), T.value.length && (T.value = []);
769
785
  };
770
- function Fn(e) {
786
+ function In(e) {
771
787
  return ((t) => Cn ? Cn[e](t) : (process.env.NODE_ENV !== "production" && s("feature:export", `${e}() needs the export feature (exportFeature).`), e === "getXlsx" ? Promise.reject(/* @__PURE__ */ Error("getXlsx() needs the export feature")) : e === "getCsv" ? "" : e === "copyRows" ? Promise.resolve(!1) : e === "exportXlsx" || e === "print" ? Promise.resolve() : void 0));
772
788
  }
773
789
  return ve({
774
- scrollToTop: Dn,
775
- scrollToRow: On,
776
- expandAll: kn,
777
- collapseAll: An,
790
+ scrollToTop: On,
791
+ scrollToRow: kn,
792
+ expandAll: An,
793
+ collapseAll: jn,
778
794
  setColumnState: F,
779
- patchLoadedRows: jn,
780
- setFilters: Mn,
781
- clearFilters: Nn,
795
+ patchLoadedRows: Mn,
796
+ setFilters: Nn,
797
+ clearFilters: Pn,
782
798
  openFilter: At,
783
799
  reload: Ht,
784
800
  reloadSubRows: Ut,
785
- pinRow: gn,
786
- getCsv: Fn("getCsv"),
787
- exportCsv: Fn("exportCsv"),
788
- getXlsx: Fn("getXlsx"),
789
- exportXlsx: Fn("exportXlsx"),
790
- print: Fn("print"),
791
- copyRows: Fn("copyRows"),
792
- clearSelection: Pn
801
+ pinRow: hn,
802
+ getCsv: In("getCsv"),
803
+ exportCsv: In("exportCsv"),
804
+ getXlsx: In("getXlsx"),
805
+ exportXlsx: In("exportXlsx"),
806
+ print: In("print"),
807
+ copyRows: In("copyRows"),
808
+ clearSelection: Fn,
809
+ startEdit: (e, t) => wn?.startAt(e, t) ?? !1,
810
+ stopEdit: (e = !1) => wn?.stop(e)
793
811
  }), (e, t) => (m(), d("div", {
794
812
  class: xe(["vg-root", p.ui?.root]),
795
813
  "data-density": p.density ?? v(D)?.density
@@ -799,21 +817,21 @@ var ke = ["data-density"], Ae = {
799
817
  columnState: P.value,
800
818
  setColumnState: F,
801
819
  filters: jt.value,
802
- setFilters: Mn,
803
- clearFilters: Nn,
820
+ setFilters: Nn,
821
+ clearFilters: Pn,
804
822
  activeFilterCount: Mt.value,
805
823
  selected: S.value,
806
824
  selectedCount: Yt.value,
807
825
  selectedGroups: T.value,
808
826
  selectAllMatching: Je.value,
809
- clearSelection: Pn
827
+ clearSelection: Fn
810
828
  })])) : u("", !0),
811
829
  v(M).selection && v(K)?.banner.value && A("selectAllBanner") ? h(e.$slots, "select-all-banner", ye(v(K).banner.value, {
812
830
  selectAll: () => Je.value = !0,
813
- clearSelection: Pn
831
+ clearSelection: Fn
814
832
  }), () => [(m(), l(g(v(M).selection.Banner), ye(v(K).banner.value, {
815
833
  onSelectAll: t[0] ||= (e) => Je.value = !0,
816
- onClear: Pn
834
+ onClear: Fn
817
835
  }), null, 16))], void 0, 1) : u("", !0),
818
836
  Vt.value && Sn.value.length && A("loadErrorNotice") ? h(e.$slots, "load-error", {
819
837
  error: Vt.value,
@@ -835,21 +853,21 @@ var ke = ["data-density"], Ae = {
835
853
  "vg-has-groups": ft.value,
836
854
  "vg-pins-dropped": ot.value,
837
855
  "vg-grouped": v(q)?.active.value,
838
- "vg-has-pinned-rows": Q.value.top.length || Q.value.bottom.length,
856
+ "vg-has-pinned-rows": $.value.top.length || $.value.bottom.length,
839
857
  "vg-has-cell-menu": !!v(X) && !!p.contextMenu
840
858
  }]),
841
859
  role: cn.value,
842
860
  tabindex: "0",
843
861
  "aria-label": p.ariaLabel,
844
862
  "aria-busy": Bt.value || void 0,
845
- "aria-rowcount": $.value ? $.value.rowCount + pt.value + Q.value.top.length + Q.value.bottom.length : void 0,
863
+ "aria-rowcount": bn.value ? bn.value.rowCount + pt.value + $.value.top.length + $.value.bottom.length : void 0,
846
864
  "aria-colcount": L.value.length,
847
865
  "aria-multiselectable": rn && I.value === "multi" || void 0,
848
866
  style: Se({
849
867
  "--vg-columns": dt.value,
850
868
  "--vg-row-height": it.value ? `${it.value.rowHeight}px` : void 0
851
869
  }),
852
- onScrollPassive: bn,
870
+ onScrollPassive: yn,
853
871
  onKeydown: on,
854
872
  onFocusin: sn
855
873
  }, [
@@ -872,20 +890,20 @@ var ke = ["data-density"], Ae = {
872
890
  "dragging",
873
891
  "drop-target"
874
892
  ]),
875
- v(dn) && Q.value.top.length ? (m(), l(g(v(dn)), {
893
+ v(dn) && $.value.top.length ? (m(), l(g(v(dn)), {
876
894
  key: 1,
877
895
  position: "top",
878
- items: Q.value.top,
879
- "aria-start": $.value ? pt.value + 1 : void 0
896
+ items: $.value.top,
897
+ "aria-start": bn.value ? pt.value + 1 : void 0
880
898
  }, null, 8, ["items", "aria-start"])) : u("", !0),
881
899
  Sn.value.length ? (m(), l(me, {
882
900
  key: 2,
883
901
  rows: Sn.value,
884
902
  presorted: "",
885
- layout: $.value ?? void 0
903
+ layout: bn.value ?? void 0
886
904
  }, null, 8, ["rows", "layout"])) : (m(), d("div", Fe, [f("div", {
887
- role: En.cellRole,
888
- tabindex: En.rovingTabindex,
905
+ role: Dn.cellRole,
906
+ tabindex: Dn.rovingTabindex,
889
907
  class: xe(["vg-empty", p.ui?.empty])
890
908
  }, [Bt.value ? h(e.$slots, "loading", {}, () => [he(_(k.value.loading ?? "Loading…"), 1)], void 0, 0) : Vt.value ? h(e.$slots, "load-error", {
891
909
  error: Vt.value,
@@ -897,24 +915,24 @@ var ke = ["data-density"], Ae = {
897
915
  class: "vg-link-button",
898
916
  onClick: t[3] ||= (e) => Ht()
899
917
  }, _(k.value.retry ?? "Retry"), 1)) : u("", !0)])], void 0, 1) : (U.value || p.rows.length) && Mt.value ? h(e.$slots, "no-match", {
900
- clearFilters: Nn,
918
+ clearFilters: Pn,
901
919
  filterCount: Mt.value
902
920
  }, () => [f("span", Re, [he(_(p.noMatchText ?? k.value.noMatch ?? "No rows match the current filters.") + " ", 1), A("clearFiltersButton") ? (m(), d("button", {
903
921
  key: 0,
904
922
  type: "button",
905
923
  class: "vg-link-button",
906
- onClick: t[4] ||= (e) => Nn()
924
+ onClick: t[4] ||= (e) => Pn()
907
925
  }, _(k.value.clearFilters ?? "Clear filters"), 1)) : u("", !0)])], void 0, 2) : h(e.$slots, "empty", {}, () => [he(_(p.emptyText ?? k.value.empty ?? "No data to show."), 1)], void 0, 3)], 10, Ie)])),
908
- v(dn) && Q.value.bottom.length ? (m(), l(g(v(dn)), {
926
+ v(dn) && $.value.bottom.length ? (m(), l(g(v(dn)), {
909
927
  key: 4,
910
928
  position: "bottom",
911
- items: Q.value.bottom,
912
- "aria-start": $.value ? pt.value + Q.value.top.length + $.value.rowCount + 1 : void 0
929
+ items: $.value.bottom,
930
+ "aria-start": bn.value ? pt.value + $.value.top.length + bn.value.rowCount + 1 : void 0
913
931
  }, null, 8, ["items", "aria-start"])) : u("", !0)
914
932
  ], 46, Pe)]),
915
- v(wn)?.enabled.value && v(M).statusBar ? (m(), l(g(v(M).statusBar.StatusBar), {
933
+ v(Tn)?.enabled.value && v(M).statusBar ? (m(), l(g(v(M).statusBar.StatusBar), {
916
934
  key: 3,
917
- bar: v(wn),
935
+ bar: v(Tn),
918
936
  render: v(Ye)["status-bar"]
919
937
  }, null, 8, ["bar", "render"])) : u("", !0),
920
938
  Ft.value && v(M).pagination ? (m(), l(g(v(M).pagination.Pagination), ye({