@nocopypaste/vue-grid 0.6.0 → 0.8.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 (113) hide show
  1. package/AGENTS.md +33 -24
  2. package/CHANGELOG.md +44 -0
  3. package/README.md +214 -79
  4. package/agent/api.json +68 -10
  5. package/agent/api.md +17 -7
  6. package/agent/grid-config.schema.json +15 -11
  7. package/dist/agent/api.js +66 -10
  8. package/dist/agent/requirements.js +1 -0
  9. package/dist/agent/requirements.js.map +1 -1
  10. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +583 -522
  11. package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js +4 -3
  13. package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/dist/components/VGridColumnMenu.vue_vue_type_script_setup_true_lang.js +58 -53
  15. package/dist/components/VGridColumnMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  16. package/dist/components/VGridFilterInput.vue_vue_type_script_setup_true_lang.js +50 -49
  17. package/dist/components/VGridFilterInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  18. package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js +151 -146
  19. package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  20. package/dist/components/VGridFilterPopover.vue_vue_type_script_setup_true_lang.js +44 -43
  21. package/dist/components/VGridFilterPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  22. package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js +12 -10
  23. package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/components/VGridHeader.vue_vue_type_script_setup_true_lang.js +62 -57
  25. package/dist/components/VGridHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  26. package/dist/components/VGridMenu.vue_vue_type_script_setup_true_lang.js +59 -58
  27. package/dist/components/VGridMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  28. package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js +62 -55
  29. package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VGridResizeHandle.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/components/VGridResizeHandle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js +60 -59
  33. package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/dist/components/VGridSearch.vue_vue_type_script_setup_true_lang.js +27 -26
  35. package/dist/components/VGridSearch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js +12 -11
  37. package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  38. package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js +37 -30
  39. package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/composables/useDataSource.js +21 -19
  41. package/dist/composables/useDataSource.js.map +1 -1
  42. package/dist/composables/useGridExport.js +22 -7
  43. package/dist/composables/useGridExport.js.map +1 -1
  44. package/dist/composables/useGridMenus.js +41 -41
  45. package/dist/composables/useGridMenus.js.map +1 -1
  46. package/dist/composables/useRowGrouping.js +103 -74
  47. package/dist/composables/useRowGrouping.js.map +1 -1
  48. package/dist/composables/useServerGroups.js +106 -0
  49. package/dist/composables/useServerGroups.js.map +1 -0
  50. package/dist/composables/useStatusBar.js +9 -0
  51. package/dist/composables/useStatusBar.js.map +1 -1
  52. package/dist/core/grouping.js +41 -24
  53. package/dist/core/grouping.js.map +1 -1
  54. package/dist/features/export.js.map +1 -1
  55. package/dist/features/index.js +12 -10
  56. package/dist/features/index.js.map +1 -1
  57. package/dist/features/serverGrouping.js +9 -0
  58. package/dist/features/serverGrouping.js.map +1 -0
  59. package/dist/index.js +7 -6
  60. package/dist/internal/context.js.map +1 -1
  61. package/dist/internal/features.js.map +1 -1
  62. package/dist/internal/messages.js +20 -0
  63. package/dist/internal/messages.js.map +1 -0
  64. package/dist/internal/print.js +51 -0
  65. package/dist/internal/print.js.map +1 -0
  66. package/dist/renderers/ActionsMenuCell.vue_vue_type_script_setup_true_lang.js +31 -30
  67. package/dist/renderers/ActionsMenuCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/renderers/ChangeCell.vue_vue_type_script_setup_true_lang.js +28 -27
  69. package/dist/renderers/ChangeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  70. package/dist/renderers/CopyCell.vue_vue_type_script_setup_true_lang.js +22 -21
  71. package/dist/renderers/CopyCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/renderers/DetailsCell.vue_vue_type_script_setup_true_lang.js +37 -36
  73. package/dist/renderers/DetailsCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  74. package/dist/renderers/EditCell.vue_vue_type_script_setup_true_lang.js +16 -15
  75. package/dist/renderers/EditCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  76. package/dist/renderers/IconToggleCell.vue_vue_type_script_setup_true_lang.js +19 -18
  77. package/dist/renderers/IconToggleCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  78. package/dist/renderers/JsonCell.vue_vue_type_script_setup_true_lang.js +21 -20
  79. package/dist/renderers/JsonCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/renderers/JsonTreeCell.vue_vue_type_script_setup_true_lang.js +21 -20
  81. package/dist/renderers/JsonTreeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/renderers/ListCell.vue_vue_type_script_setup_true_lang.js +18 -17
  83. package/dist/renderers/ListCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  84. package/dist/renderers/MultiLineCell.vue_vue_type_script_setup_true_lang.js +35 -34
  85. package/dist/renderers/MultiLineCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  86. package/dist/renderers/parts/CopyButton.vue_vue_type_script_setup_true_lang.js +19 -18
  87. package/dist/renderers/parts/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  88. package/dist/types/agent/requirements.d.ts +1 -1
  89. package/dist/types/components/VGrid.vue.d.ts +45 -9
  90. package/dist/types/components/VGridColumnMenu.vue.d.ts +4 -5
  91. package/dist/types/components/VGridMenu.vue.d.ts +1 -1
  92. package/dist/types/components/VGridPagination.vue.d.ts +8 -3
  93. package/dist/types/components/VGridSearch.vue.d.ts +2 -2
  94. package/dist/types/composables/useDataSource.d.ts +33 -2
  95. package/dist/types/composables/useGridExport.d.ts +4 -1
  96. package/dist/types/composables/useGridMenus.d.ts +3 -1
  97. package/dist/types/composables/useRowGrouping.d.ts +12 -1
  98. package/dist/types/composables/useServerGroups.d.ts +37 -0
  99. package/dist/types/composables/useStatusBar.d.ts +7 -0
  100. package/dist/types/core/grouping.d.ts +26 -0
  101. package/dist/types/features/export.d.ts +2 -1
  102. package/dist/types/features/index.d.ts +2 -1
  103. package/dist/types/features/serverGrouping.d.ts +9 -0
  104. package/dist/types/index.d.ts +1 -1
  105. package/dist/types/internal/context.d.ts +5 -1
  106. package/dist/types/internal/features.d.ts +2 -1
  107. package/dist/types/internal/messages.d.ts +16 -0
  108. package/dist/types/internal/print.d.ts +16 -0
  109. package/dist/types/renderers/parts/CopyButton.vue.d.ts +1 -3
  110. package/dist/types/types.d.ts +305 -1
  111. package/llms-full.txt +264 -110
  112. package/llms.txt +1 -1
  113. package/package.json +1 -1
package/agent/api.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@nocopypaste/vue-grid",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "component": "VGrid",
5
5
  "props": [
6
6
  {
@@ -37,7 +37,7 @@
37
37
  },
38
38
  {
39
39
  "name": "pagination",
40
- "type": "boolean | { pageSizes?: number[] }",
40
+ "type": "boolean | PaginationOptions",
41
41
  "required": false,
42
42
  "default": "false",
43
43
  "description": "Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise).",
@@ -50,6 +50,18 @@
50
50
  "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.",
51
51
  "feature": "statusBar"
52
52
  },
53
+ {
54
+ "name": "messages",
55
+ "type": "GridMessages",
56
+ "required": false,
57
+ "description": "Built-in text (translations, wording), over `createVueGrid({ messages })`."
58
+ },
59
+ {
60
+ "name": "parts",
61
+ "type": "GridParts",
62
+ "required": false,
63
+ "description": "Built-in parts to leave out (`{ progressBar: false }`), over `createVueGrid({ parts })`."
64
+ },
53
65
  {
54
66
  "name": "sortMode",
55
67
  "type": "'controlled' | 'client'",
@@ -84,8 +96,7 @@
84
96
  "name": "noMatchText",
85
97
  "type": "string",
86
98
  "required": false,
87
- "default": "'No rows match the current filters.'",
88
- "description": "Shown when filters hide every row.",
99
+ "description": "Shown when filters hide every row. Default: `messages.noMatch`, else `No rows match the current filters.`",
89
100
  "feature": "filtering"
90
101
  },
91
102
  {
@@ -234,8 +245,7 @@
234
245
  "name": "emptyText",
235
246
  "type": "string",
236
247
  "required": false,
237
- "default": "'No data to show.'",
238
- "description": "Shown when there are no rows."
248
+ "description": "Shown when there are no rows. Default: `messages.empty`, else `No data to show.`"
239
249
  },
240
250
  {
241
251
  "name": "ariaLabel",
@@ -290,8 +300,7 @@
290
300
  "name": "totalsLabel",
291
301
  "type": "string",
292
302
  "required": false,
293
- "default": "'Total'",
294
- "description": "The totals row's label, in its first column (unless that column has an aggregate).",
303
+ "description": "The totals row's label, in its first column (unless that column has an aggregate). Default: `messages.total`, else `Total`.",
295
304
  "feature": "aggregation"
296
305
  },
297
306
  {
@@ -377,6 +386,13 @@
377
386
  "default": "false",
378
387
  "description": "Server data: every row matching the query is selected, not just the loaded ones (set from the \"Select all N rows\" banner; ends when filters change or a row is unticked). Act on the query then, not on `selected`. Needs the selection feature.",
379
388
  "feature": "selection"
389
+ },
390
+ {
391
+ "name": "selectedGroups",
392
+ "type": "GroupPath[]",
393
+ "default": "[]",
394
+ "description": "Server data with row grouping: groups selected by query, by their paths, without loading their rows (a group's checkbox). Act on these with `selected` and the filters. Ends when the filters or the grouping change. Needs the selection and row grouping features.",
395
+ "feature": "serverGrouping"
380
396
  }
381
397
  ],
382
398
  "events": [
@@ -457,6 +473,21 @@
457
473
  "scope": null,
458
474
  "description": "Shown when there are no rows."
459
475
  },
476
+ {
477
+ "name": "no-match",
478
+ "scope": "{ clearFilters: () => void; filterCount: number }",
479
+ "description": "Shown when filters hide every row, instead of the message and its Clear filters button."
480
+ },
481
+ {
482
+ "name": "load-error",
483
+ "scope": "{ error: unknown; retry: () => Promise<void>; stale: boolean }",
484
+ "description": "A failed server request (server data): `stale` when the rows from before stay on screen (the notice above them), else in place of the rows. `retry()` asks again."
485
+ },
486
+ {
487
+ "name": "select-all-banner",
488
+ "scope": "{ total: number; page: number; all: boolean; selectAll: () => void; clearSelection: () => void }",
489
+ "description": "Selection with server data: the \"Select all N rows\" banner."
490
+ },
460
491
  {
461
492
  "name": "status-bar",
462
493
  "scope": "StatusBarScope",
@@ -474,7 +505,7 @@
474
505
  },
475
506
  {
476
507
  "name": "toolbar",
477
- "scope": "{ columns: readonly ColumnDef<T>[]; columnState: ColumnState; setColumnState: (state: ColumnState) => void; filters: FilterState; setFilters: (state: FilterState) => void; clearFilters: () => void; activeFilterCount: number; selected: readonly RowKey[]; selectedCount: number; selectAllMatching: boolean; clearSelection: () => void }",
508
+ "scope": "{ columns: readonly ColumnDef<T>[]; columnState: ColumnState; setColumnState: (state: ColumnState) => void; filters: FilterState; setFilters: (state: FilterState) => void; clearFilters: () => void; activeFilterCount: number; selected: readonly RowKey[]; selectedCount: number; selectedGroups: GroupPath[]; selectAllMatching: boolean; clearSelection: () => void }",
478
509
  "description": "Above the grid: put a search box, column menu, filter summary or batch actions here."
479
510
  }
480
511
  ],
@@ -586,6 +617,12 @@
586
617
  "required": true,
587
618
  "description": "Downloads the rows as an Excel file (`filename`, default `export.xlsx`). Export feature."
588
619
  },
620
+ {
621
+ "name": "print",
622
+ "type": "Promise<void>",
623
+ "required": true,
624
+ "description": "Prints the rows as a table (the browser's print dialog): the filtered, sorted rows on every page (not just those in view), as the cells show them, the header repeated on each printed page, numbers right-aligned, the totals in bold. Resolves when printing is over. Export feature."
625
+ },
589
626
  {
590
627
  "name": "copyRows",
591
628
  "type": "Promise<boolean>",
@@ -900,7 +937,7 @@
900
937
  {
901
938
  "id": "export",
902
939
  "export": "exportFeature",
903
- "description": "CSV and Excel export and copying: `grid.exportCsv()` downloads the filtered, sorted rows as a CSV file, `grid.getCsv()` returns the text, `grid.exportXlsx()` / `grid.getXlsx()` write an Excel workbook with typed cells (the writer loads on demand), `grid.copyRows()` copies rows as tab-separated text, and Ctrl/⌘+C copies the selected rows, else the focused cell, as displayed. Columns can set `exportValue` and `exportable: false`. Without it those methods only warn.",
940
+ "description": "CSV and Excel export and copying: `grid.exportCsv()` downloads the filtered, sorted rows as a CSV file, `grid.getCsv()` returns the text, `grid.exportXlsx()` / `grid.getXlsx()` write an Excel workbook with typed cells (the writer loads on demand), `grid.print()` prints every matching row as a table with the header on each page, `grid.copyRows()` copies rows as tab-separated text, and Ctrl/⌘+C copies the selected rows, else the focused cell, as displayed. Columns can set `exportValue` and `exportable: false`. Without it those methods only warn.",
904
941
  "props": [],
905
942
  "columnOptions": [
906
943
  "exportValue",
@@ -1002,6 +1039,15 @@
1002
1039
  ],
1003
1040
  "columnOptions": []
1004
1041
  },
1042
+ {
1043
+ "id": "serverGrouping",
1044
+ "export": "serverGroupingFeature",
1045
+ "description": "Row grouping with server data: with `group-by` and a `data-source`, the query carries `groupBy` and `groupPath`, the server answers with groups (value, count, aggregates), and each group's contents load when it expands. A group's checkbox selects it by query (`v-model:selected-groups`), without loading its rows. Needs the row grouping and server data features too. Without it, a grouped server grid groups only the rows it has loaded.",
1046
+ "props": [
1047
+ "selectedGroups"
1048
+ ],
1049
+ "columnOptions": []
1050
+ },
1005
1051
  {
1006
1052
  "id": "sorting",
1007
1053
  "export": "sortingFeature",
@@ -2490,6 +2536,18 @@
2490
2536
  "type": "Density",
2491
2537
  "required": false,
2492
2538
  "description": "Default density: `compact`, `cozy` (default) or `comfortable`."
2539
+ },
2540
+ {
2541
+ "name": "messages",
2542
+ "type": "GridMessages",
2543
+ "required": false,
2544
+ "description": "Built-in text for every grid (translations, wording); a grid's own `messages` win."
2545
+ },
2546
+ {
2547
+ "name": "parts",
2548
+ "type": "GridParts",
2549
+ "required": false,
2550
+ "description": "Built-in parts to turn off in every grid; a grid's own `parts` win."
2493
2551
  }
2494
2552
  ]
2495
2553
  }
package/agent/api.md CHANGED
@@ -1,4 +1,4 @@
1
- # @nocopypaste/vue-grid 0.6.0 — API reference
1
+ # @nocopypaste/vue-grid 0.8.0 — API reference
2
2
 
3
3
  > Generated from the TypeScript sources (`scripts/gen-agent.mjs`). Machine-readable: `agent/api.json`, `agent/grid-config.schema.json`.
4
4
 
@@ -14,7 +14,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
14
14
  | `columnReorderFeature` | Column reordering: drag a header (mouse, pen, touch), Alt+←/→ on a focused header, and the header menu's Move left / Move right. Columns opt out with `reorderable: false`. The order is part of `v-model:column-state` and persisted with `storage`; `<VGridColumnMenu>` works without it. | | `reorderable` |
15
15
  | `columnResizingFeature` | Column resizing: drag a header's edge (mouse, pen, touch), use ←/→ on the focused edge (Alt+Shift+←/→ on a header with keyboard navigation), or double-click the edge to fit the content. `minWidth` / `maxWidth` bound it; columns opt out with `resizable: false`. Widths are kept in `columnState.widths` and persisted with `storage`. The header menu gains Fit width / Reset width. | | `maxWidth` `resizable` |
16
16
  | `columnVisibilityFeature` | Column visibility: `hidden: true` columns, `columnState.hidden` (persisted with `storage`), the header menu's Hide column item and `<VGridColumnMenu>`'s checkboxes. Columns opt out with `hideable: false`. Without it, every column shows. | | `hidden` `hideable` |
17
- | `exportFeature` | CSV and Excel export and copying: `grid.exportCsv()` downloads the filtered, sorted rows as a CSV file, `grid.getCsv()` returns the text, `grid.exportXlsx()` / `grid.getXlsx()` write an Excel workbook with typed cells (the writer loads on demand), `grid.copyRows()` copies rows as tab-separated text, and Ctrl/⌘+C copies the selected rows, else the focused cell, as displayed. Columns can set `exportValue` and `exportable: false`. Without it those methods only warn. | | `exportValue` `exportable` |
17
+ | `exportFeature` | CSV and Excel export and copying: `grid.exportCsv()` downloads the filtered, sorted rows as a CSV file, `grid.getCsv()` returns the text, `grid.exportXlsx()` / `grid.getXlsx()` write an Excel workbook with typed cells (the writer loads on demand), `grid.print()` prints every matching row as a table with the header on each page, `grid.copyRows()` copies rows as tab-separated text, and Ctrl/⌘+C copies the selected rows, else the focused cell, as displayed. Columns can set `exportValue` and `exportable: false`. Without it those methods only warn. | | `exportValue` `exportable` |
18
18
  | `filteringFeature` | Filtering: header funnels with typed filter popovers on `filterable` columns, the filter row, `<VGridSearch>`, the filter items of the header menu, `v-model:filters` and filter persistence. The popover body and the filter-row editors load on demand (own chunks). | `filterMode` `filterRow` `filterStorage` `noMatchText` `filters` | `filterable` `filter` `filterValue` `filterFn` `filterComponent` `searchable` |
19
19
  | `keyboardNavigationFeature` | Keyboard navigation (the ARIA grid pattern): the grid is one tab stop, arrow keys / Home / End / PageUp / PageDown move between cells, Enter activates a cell's control, Space selects a row, →/← expand and collapse, Alt+←/→ move a column, ContextMenu / Shift+F10 open the cell menu. Without it the grid is an ARIA `table`: its own controls (sort buttons, expanders, checkboxes, filter buttons) sit in the normal Tab order instead. | | |
20
20
  | `menusFeature` | Context menus: the built-in header menu (sort, filter, pin, move, hide, reset, your own items via `header-menu`) and body-cell menus (`context-menu`), opened by right-click, the ContextMenu key or Shift+F10. Without it the browser's own menu shows. The standalone `<VGridMenu>` and the `actions-menu` renderer don't need it. | `contextMenu` `headerMenu` | |
@@ -23,6 +23,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
23
23
  | `rowPinningFeature` | Pinned rows: `v-model:pinned-rows` (`{ top, bottom }` row keys), `pinned-top-rows` / `pinned-bottom-rows` (extra rows that aren't in the data) and the `pinRow()` method. Pinned rows stay in view (sticky) under the header or at the bottom while the body scrolls, and aren't filtered, sorted or paged. Without it, those options are ignored. | `pinnedTopRows` `pinnedBottomRows` `pinnedRows` | |
24
24
  | `selectionFeature` | Row selection: the `selectable` prop (multi or single), `v-model:selected`, `selection-mode` (cascade through sub-grids), `is-row-selectable`, Space on a row, shift-click (or Shift+Space) for a range, the select-all checkbox, `prune-selection`, and with server data a "select all N matching rows" banner (`v-model:select-all-matching`; it loads on demand, its own chunk). | `selectable` `selectionMode` `isRowSelectable` `pruneSelection` `selected` `selectAllMatching` | |
25
25
  | `serverDataFeature` | Server data: the `dataSource` prop. The grid sends sort, filters and page to your function, cancels superseded requests, and shows loading, error and retry states. | `dataSource` | |
26
+ | `serverGroupingFeature` | Row grouping with server data: with `group-by` and a `data-source`, the query carries `groupBy` and `groupPath`, the server answers with groups (value, count, aggregates), and each group's contents load when it expands. A group's checkbox selects it by query (`v-model:selected-groups`), without loading its rows. Needs the row grouping and server data features too. Without it, a grouped server grid groups only the rows it has loaded. | `selectedGroups` | |
26
27
  | `sortingFeature` | Sorting: the sort button on `sortable` column headers, the sort items of the header menu and, with `sort-mode="client"`, sorting the rows in the browser. | | `sortable` `sortValue` `sortFn` |
27
28
  | `statusBarFeature` | A status bar under the grid (`status-bar`): how many rows pass the filters ("84 of 200 rows"), how many are selected, how many filters are on (with Clear), and with `{ summary: ['total'] }` the sum and average of those columns over the selected rows, as the cells show them. The `#status-bar` slot replaces its content. Its component loads on demand (own chunk). | `statusBar` | |
28
29
  | `subGridsFeature` | Sub-grids: nested child rows in a CSS `subgrid`, from `sub-rows` (synchronous) or `load-sub-rows` (lazy, cached, with loading / error / retry). Detail rows (`#detail` slot) don't need it. | `subRows` `loadSubRows` `hasSubRows` | |
@@ -37,13 +38,15 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
37
38
  | `rowKey` (required) | `RowKeyGetter<T>` | | | Stable unique id of a row: a property name or `(row) => string \| number`. All row state is keyed by it. |
38
39
  | `features` | `readonly GridFeature[]` | | | Opt-in features for this grid (added to the app-wide `createVueGrid({ features })`): `sortingFeature`, `filteringFeature`, `serverDataFeature`, `paginationFeature`, or `allFeatures`. Read once, when the grid is created. |
39
40
  | `dataSource` | `DataSource<T>` | | `serverDataFeature` | Server data: called with the current query (sort, filters, search, page) whenever it changes. The grid cancels superseded requests, shows loading and errors, and sorts / filters / pages nothing itself. |
40
- | `pagination` | `boolean \| { pageSizes?: number[] }` | `false` | `paginationFeature` | Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise). |
41
+ | `pagination` | `boolean \| PaginationOptions` | `false` | `paginationFeature` | Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise). |
41
42
  | `statusBar` | `boolean \| StatusBarOptions` | | `statusBarFeature` | 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. |
43
+ | `messages` | `GridMessages` | | | Built-in text (translations, wording), over `createVueGrid({ messages })`. |
44
+ | `parts` | `GridParts` | | | Built-in parts to leave out (`{ progressBar: false }`), over `createVueGrid({ parts })`. |
42
45
  | `sortMode` | `'controlled' \| 'client'` | `'controlled'` | | `controlled` (default): a header click only updates `v-model:sort` (sort on the server or in your own code). `client`: the grid sorts the rows itself. Ignored with `dataSource`. |
43
46
  | `filterMode` | `'client' \| 'controlled'` | `'client'` | `filteringFeature` | `client` (default): the grid filters its rows. `controlled`: it only emits `update:filters`. |
44
47
  | `filterRow` | `boolean` | `false` | `filteringFeature` | Show the filter row: an input under each filterable column's header. |
45
48
  | `filterStorage` | `FilterStateStorage \| string` | | `filteringFeature` | Persist the filter model (`string` = localStorage key). |
46
- | `noMatchText` | `string` | `'No rows match the current filters.'` | `filteringFeature` | Shown when filters hide every row. |
49
+ | `noMatchText` | `string` | | `filteringFeature` | Shown when filters hide every row. Default: `messages.noMatch`, else `No rows match the current filters.` |
47
50
  | `selectable` | `boolean \| 'single'` | `false` | `selectionFeature` | A selection column: `true` = multi-select (with select-all), `'single'` = one row. |
48
51
  | `selectionMode` | `'cascade' \| 'independent'` | `'cascade'` | `selectionFeature` | `cascade` (default): selecting a parent selects its children. `independent`: rows alone. |
49
52
  | `isRowSelectable` | `(row: T) => boolean` | | `selectionFeature` | Rows that can't be selected get a disabled checkbox. |
@@ -65,7 +68,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
65
68
  | `timeZone` | `string` | | | IANA time zone for date renderers and date filters. |
66
69
  | `density` | `Density` | | | Cell padding scale. |
67
70
  | `loading` | `boolean` | `false` | | Shows a progress bar and sets `aria-busy` (server data sets it by itself). |
68
- | `emptyText` | `string` | `'No data to show.'` | | Shown when there are no rows. |
71
+ | `emptyText` | `string` | | | Shown when there are no rows. Default: `messages.empty`, else `No data to show.` |
69
72
  | `ariaLabel` | `string` | | | Accessible name of the grid. |
70
73
  | `ui` | `Partial<Record<GridPart, ClassValue>>` | | | Extra classes per part (`root`, `header`, `headerCell`, `row`, `cell`, `subgrid`, `detail`, `empty`), e.g. Tailwind utilities. |
71
74
  | `contextMenu` | `(ctx: CellContext<T>) => MenuItem[] \| null \| undefined` | | `menusFeature` | Right-click menu items for a body cell. Return `null`/`[]` to keep the browser's menu. |
@@ -73,7 +76,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
73
76
  | `pinnedTopRows` | `readonly T[]` | | `rowPinningFeature` | Extra rows above the body, not part of the data (row pinning feature). |
74
77
  | `pinnedBottomRows` | `readonly T[]` | | `rowPinningFeature` | Extra rows below the body, not part of the data (row pinning feature). |
75
78
  | `totals` | `boolean \| 'top' \| 'bottom'` | `false` | `aggregationFeature` | A totals row with each column's `aggregate` (aggregation feature): `true` / `'bottom'` sticks it to the bottom, `'top'` under the header. |
76
- | `totalsLabel` | `string` | `'Total'` | `aggregationFeature` | The totals row's label, in its first column (unless that column has an aggregate). |
79
+ | `totalsLabel` | `string` | | `aggregationFeature` | The totals row's label, in its first column (unless that column has an aggregate). Default: `messages.total`, else `Total`. |
77
80
  | `aggregates` | `Record<string, unknown>` | | `aggregationFeature` | Totals row values by column key, instead of computing them (e.g. totals from a server). |
78
81
  | `groupsExpanded` | `boolean` | `false` | `rowGroupingFeature` | Groups start expanded (row grouping feature). Default: collapsed. |
79
82
 
@@ -91,6 +94,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
91
94
  | `v-model:pinnedRows` | `PinnedRowsState \| null` | `null` | `rowPinningFeature` | Top-level rows pinned above / below the body, by key: `{ top, bottom }`. Needs the row pinning feature. |
92
95
  | `v-model:groupBy` | `readonly string[] \| string \| null` | `null` | `rowGroupingFeature` | Column keys to group the rows by, outermost first (`['region', 'status']`, or one key). Group rows show the value, the row count and the columns' aggregates. Needs the row grouping feature. |
93
96
  | `v-model:selectAllMatching` | `boolean` | `false` | `selectionFeature` | Server data: every row matching the query is selected, not just the loaded ones (set from the "Select all N rows" banner; ends when filters change or a row is unticked). Act on the query then, not on `selected`. Needs the selection feature. |
97
+ | `v-model:selectedGroups` | `GroupPath[]` | `[]` | `serverGroupingFeature` | Server data with row grouping: groups selected by query, by their paths, without loading their rows (a group's checkbox). Act on these with `selected` and the filters. Ends when the filters or the grouping change. Needs the selection and row grouping features. |
94
98
 
95
99
  ## Events
96
100
 
@@ -116,10 +120,13 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
116
120
  | `group-<key>` | `{ value: unknown; count: number; rows: readonly T[]; column: ColumnDef<T>; group: RowGroup<T> }` | The value of a group row grouped by this column (row grouping feature): `#group-<key>`. |
117
121
  | `detail` | `{ row: T; rowKey: RowKey; depth: number }` | Expandable detail row under a row: any content, even another grid. |
118
122
  | `empty` | | Shown when there are no rows. |
123
+ | `no-match` | `{ clearFilters: () => void; filterCount: number }` | Shown when filters hide every row, instead of the message and its Clear filters button. |
124
+ | `load-error` | `{ error: unknown; retry: () => Promise<void>; stale: boolean }` | A failed server request (server data): `stale` when the rows from before stay on screen (the notice above them), else in place of the rows. `retry()` asks again. |
125
+ | `select-all-banner` | `{ total: number; page: number; all: boolean; selectAll: () => void; clearSelection: () => void }` | Selection with server data: the "Select all N rows" banner. |
119
126
  | `status-bar` | `StatusBarScope` | The status bar's content (status bar feature): replaces the counts and the summary. |
120
127
  | `loading` | | Shown while loading with no rows yet. |
121
128
  | `sub-rows-loading` | `{ row: T }` | Shown while a row's lazy children load. |
122
- | `toolbar` | `{ columns: readonly ColumnDef<T>[]; columnState: ColumnState; setColumnState: (state: ColumnState) => void; filters: FilterState; setFilters: (state: FilterState) => void; clearFilters: () => void; activeFilterCount: number; selected: readonly RowKey[]; selectedCount: number; selectAllMatching: boolean; clearSelection: () => void }` | Above the grid: put a search box, column menu, filter summary or batch actions here. |
129
+ | `toolbar` | `{ columns: readonly ColumnDef<T>[]; columnState: ColumnState; setColumnState: (state: ColumnState) => void; filters: FilterState; setFilters: (state: FilterState) => void; clearFilters: () => void; activeFilterCount: number; selected: readonly RowKey[]; selectedCount: number; selectedGroups: GroupPath[]; selectAllMatching: boolean; clearSelection: () => void }` | Above the grid: put a search box, column menu, filter summary or batch actions here. |
123
130
 
124
131
  ## Exposed methods (`ref<VGridExposed>()`)
125
132
 
@@ -142,6 +149,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
142
149
  | `exportCsv` | `void` | | Downloads the rows as a CSV file (`filename`, default `export.csv`; UTF-8 with a BOM). Export feature. |
143
150
  | `getXlsx` | `Promise<Blob>` | | The rows as an Excel workbook (.xlsx): typed cells (numbers, dates, booleans), number formats from the columns' renderers, a bold frozen header. The writer loads on demand. Export feature. |
144
151
  | `exportXlsx` | `Promise<void>` | | Downloads the rows as an Excel file (`filename`, default `export.xlsx`). Export feature. |
152
+ | `print` | `Promise<void>` | | Prints the rows as a table (the browser's print dialog): the filtered, sorted rows on every page (not just those in view), as the cells show them, the header repeated on each printed page, numbers right-aligned, the totals in bold. Resolves when printing is over. Export feature. |
145
153
  | `copyRows` | `Promise<boolean>` | | 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. |
146
154
 
147
155
  ## `ColumnDef<T>`
@@ -651,4 +659,6 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
651
659
  | `currency`? | `string` | Default ISO 4217 currency for currency renderers. |
652
660
  | `timeZone`? | `string` | Default IANA time zone for date renderers and date filters. |
653
661
  | `density`? | `Density` | Default density: `compact`, `cozy` (default) or `comfortable`. |
662
+ | `messages`? | `GridMessages` | Built-in text for every grid (translations, wording); a grid's own `messages` win. |
663
+ | `parts`? | `GridParts` | Built-in parts to turn off in every grid; a grid's own `parts` win. |
654
664
 
@@ -40,6 +40,7 @@
40
40
  "rowPinningFeature",
41
41
  "selectionFeature",
42
42
  "serverDataFeature",
43
+ "serverGroupingFeature",
43
44
  "sortingFeature",
44
45
  "statusBarFeature",
45
46
  "subGridsFeature",
@@ -52,19 +53,17 @@
52
53
  "description": "Server data: called with the current query (sort, filters, search, page) whenever it changes. The grid cancels superseded requests, shows loading and errors, and sorts / filters / pages nothing itself."
53
54
  },
54
55
  "pagination": {
55
- "anyOf": [
56
- {
57
- "type": "boolean"
58
- },
59
- {
60
- "type": "object"
61
- }
62
- ],
63
56
  "description": "Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise)."
64
57
  },
65
58
  "statusBar": {
66
59
  "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."
67
60
  },
61
+ "messages": {
62
+ "description": "Built-in text (translations, wording), over `createVueGrid({ messages })`."
63
+ },
64
+ "parts": {
65
+ "description": "Built-in parts to leave out (`{ progressBar: false }`), over `createVueGrid({ parts })`."
66
+ },
68
67
  "sortMode": {
69
68
  "enum": [
70
69
  "controlled",
@@ -88,7 +87,7 @@
88
87
  },
89
88
  "noMatchText": {
90
89
  "type": "string",
91
- "description": "Shown when filters hide every row."
90
+ "description": "Shown when filters hide every row. Default: `messages.noMatch`, else `No rows match the current filters.`"
92
91
  },
93
92
  "selectable": {
94
93
  "anyOf": [
@@ -231,7 +230,7 @@
231
230
  },
232
231
  "emptyText": {
233
232
  "type": "string",
234
- "description": "Shown when there are no rows."
233
+ "description": "Shown when there are no rows. Default: `messages.empty`, else `No data to show.`"
235
234
  },
236
235
  "ariaLabel": {
237
236
  "type": "string",
@@ -273,7 +272,7 @@
273
272
  },
274
273
  "totalsLabel": {
275
274
  "type": "string",
276
- "description": "The totals row's label, in its first column (unless that column has an aggregate)."
275
+ "description": "The totals row's label, in its first column (unless that column has an aggregate). Default: `messages.total`, else `Total`."
277
276
  },
278
277
  "aggregates": {
279
278
  "type": "object",
@@ -434,6 +433,11 @@
434
433
  "selectAllMatching": {
435
434
  "type": "boolean",
436
435
  "description": "Server data: every row matching the query is selected, not just the loaded ones (set from the \"Select all N rows\" banner; ends when filters change or a row is unticked). Act on the query then, not on `selected`. Needs the selection feature."
436
+ },
437
+ "selectedGroups": {
438
+ "type": "array",
439
+ "items": {},
440
+ "description": "Server data with row grouping: groups selected by query, by their paths, without loading their rows (a group's checkbox). Act on these with `selected` and the filters. Ends when the filters or the grouping change. Needs the selection and row grouping features."
437
441
  }
438
442
  },
439
443
  "required": [
package/dist/agent/api.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/agent/api.json
2
- var e = "0.6.0", t = "VGrid", n = [
2
+ var e = "0.8.0", t = "VGrid", n = [
3
3
  {
4
4
  name: "rows",
5
5
  type: "readonly T[]",
@@ -34,7 +34,7 @@ var e = "0.6.0", t = "VGrid", n = [
34
34
  },
35
35
  {
36
36
  name: "pagination",
37
- type: "boolean | { pageSizes?: number[] }",
37
+ type: "boolean | PaginationOptions",
38
38
  required: !1,
39
39
  default: "false",
40
40
  description: "Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise).",
@@ -47,6 +47,18 @@ var e = "0.6.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: "messages",
52
+ type: "GridMessages",
53
+ required: !1,
54
+ description: "Built-in text (translations, wording), over `createVueGrid({ messages })`."
55
+ },
56
+ {
57
+ name: "parts",
58
+ type: "GridParts",
59
+ required: !1,
60
+ description: "Built-in parts to leave out (`{ progressBar: false }`), over `createVueGrid({ parts })`."
61
+ },
50
62
  {
51
63
  name: "sortMode",
52
64
  type: "'controlled' | 'client'",
@@ -81,8 +93,7 @@ var e = "0.6.0", t = "VGrid", n = [
81
93
  name: "noMatchText",
82
94
  type: "string",
83
95
  required: !1,
84
- default: "'No rows match the current filters.'",
85
- description: "Shown when filters hide every row.",
96
+ description: "Shown when filters hide every row. Default: `messages.noMatch`, else `No rows match the current filters.`",
86
97
  feature: "filtering"
87
98
  },
88
99
  {
@@ -231,8 +242,7 @@ var e = "0.6.0", t = "VGrid", n = [
231
242
  name: "emptyText",
232
243
  type: "string",
233
244
  required: !1,
234
- default: "'No data to show.'",
235
- description: "Shown when there are no rows."
245
+ description: "Shown when there are no rows. Default: `messages.empty`, else `No data to show.`"
236
246
  },
237
247
  {
238
248
  name: "ariaLabel",
@@ -287,8 +297,7 @@ var e = "0.6.0", t = "VGrid", n = [
287
297
  name: "totalsLabel",
288
298
  type: "string",
289
299
  required: !1,
290
- default: "'Total'",
291
- description: "The totals row's label, in its first column (unless that column has an aggregate).",
300
+ description: "The totals row's label, in its first column (unless that column has an aggregate). Default: `messages.total`, else `Total`.",
292
301
  feature: "aggregation"
293
302
  },
294
303
  {
@@ -373,6 +382,13 @@ var e = "0.6.0", t = "VGrid", n = [
373
382
  default: "false",
374
383
  description: "Server data: every row matching the query is selected, not just the loaded ones (set from the \"Select all N rows\" banner; ends when filters change or a row is unticked). Act on the query then, not on `selected`. Needs the selection feature.",
375
384
  feature: "selection"
385
+ },
386
+ {
387
+ name: "selectedGroups",
388
+ type: "GroupPath[]",
389
+ default: "[]",
390
+ description: "Server data with row grouping: groups selected by query, by their paths, without loading their rows (a group's checkbox). Act on these with `selected` and the filters. Ends when the filters or the grouping change. Needs the selection and row grouping features.",
391
+ feature: "serverGrouping"
376
392
  }
377
393
  ], i = [
378
394
  {
@@ -451,6 +467,21 @@ var e = "0.6.0", t = "VGrid", n = [
451
467
  scope: null,
452
468
  description: "Shown when there are no rows."
453
469
  },
470
+ {
471
+ name: "no-match",
472
+ scope: "{ clearFilters: () => void; filterCount: number }",
473
+ description: "Shown when filters hide every row, instead of the message and its Clear filters button."
474
+ },
475
+ {
476
+ name: "load-error",
477
+ scope: "{ error: unknown; retry: () => Promise<void>; stale: boolean }",
478
+ description: "A failed server request (server data): `stale` when the rows from before stay on screen (the notice above them), else in place of the rows. `retry()` asks again."
479
+ },
480
+ {
481
+ name: "select-all-banner",
482
+ scope: "{ total: number; page: number; all: boolean; selectAll: () => void; clearSelection: () => void }",
483
+ description: "Selection with server data: the \"Select all N rows\" banner."
484
+ },
454
485
  {
455
486
  name: "status-bar",
456
487
  scope: "StatusBarScope",
@@ -468,7 +499,7 @@ var e = "0.6.0", t = "VGrid", n = [
468
499
  },
469
500
  {
470
501
  name: "toolbar",
471
- scope: "{ columns: readonly ColumnDef<T>[]; columnState: ColumnState; setColumnState: (state: ColumnState) => void; filters: FilterState; setFilters: (state: FilterState) => void; clearFilters: () => void; activeFilterCount: number; selected: readonly RowKey[]; selectedCount: number; selectAllMatching: boolean; clearSelection: () => void }",
502
+ scope: "{ columns: readonly ColumnDef<T>[]; columnState: ColumnState; setColumnState: (state: ColumnState) => void; filters: FilterState; setFilters: (state: FilterState) => void; clearFilters: () => void; activeFilterCount: number; selected: readonly RowKey[]; selectedCount: number; selectedGroups: GroupPath[]; selectAllMatching: boolean; clearSelection: () => void }",
472
503
  description: "Above the grid: put a search box, column menu, filter summary or batch actions here."
473
504
  }
474
505
  ], o = [
@@ -579,6 +610,12 @@ var e = "0.6.0", t = "VGrid", n = [
579
610
  required: !0,
580
611
  description: "Downloads the rows as an Excel file (`filename`, default `export.xlsx`). Export feature."
581
612
  },
613
+ {
614
+ name: "print",
615
+ type: "Promise<void>",
616
+ required: !0,
617
+ description: "Prints the rows as a table (the browser's print dialog): the filtered, sorted rows on every page (not just those in view), as the cells show them, the header repeated on each printed page, numbers right-aligned, the totals in bold. Resolves when printing is over. Export feature."
618
+ },
582
619
  {
583
620
  name: "copyRows",
584
621
  type: "Promise<boolean>",
@@ -874,7 +911,7 @@ var e = "0.6.0", t = "VGrid", n = [
874
911
  {
875
912
  id: "export",
876
913
  export: "exportFeature",
877
- description: "CSV and Excel export and copying: `grid.exportCsv()` downloads the filtered, sorted rows as a CSV file, `grid.getCsv()` returns the text, `grid.exportXlsx()` / `grid.getXlsx()` write an Excel workbook with typed cells (the writer loads on demand), `grid.copyRows()` copies rows as tab-separated text, and Ctrl/⌘+C copies the selected rows, else the focused cell, as displayed. Columns can set `exportValue` and `exportable: false`. Without it those methods only warn.",
914
+ description: "CSV and Excel export and copying: `grid.exportCsv()` downloads the filtered, sorted rows as a CSV file, `grid.getCsv()` returns the text, `grid.exportXlsx()` / `grid.getXlsx()` write an Excel workbook with typed cells (the writer loads on demand), `grid.print()` prints every matching row as a table with the header on each page, `grid.copyRows()` copies rows as tab-separated text, and Ctrl/⌘+C copies the selected rows, else the focused cell, as displayed. Columns can set `exportValue` and `exportable: false`. Without it those methods only warn.",
878
915
  props: [],
879
916
  columnOptions: ["exportValue", "exportable"]
880
917
  },
@@ -962,6 +999,13 @@ var e = "0.6.0", t = "VGrid", n = [
962
999
  props: ["dataSource"],
963
1000
  columnOptions: []
964
1001
  },
1002
+ {
1003
+ id: "serverGrouping",
1004
+ export: "serverGroupingFeature",
1005
+ description: "Row grouping with server data: with `group-by` and a `data-source`, the query carries `groupBy` and `groupPath`, the server answers with groups (value, count, aggregates), and each group's contents load when it expands. A group's checkbox selects it by query (`v-model:selected-groups`), without loading its rows. Needs the row grouping and server data features too. Without it, a grouped server grid groups only the rows it has loaded.",
1006
+ props: ["selectedGroups"],
1007
+ columnOptions: []
1008
+ },
965
1009
  {
966
1010
  id: "sorting",
967
1011
  export: "sortingFeature",
@@ -2427,6 +2471,18 @@ var e = "0.6.0", t = "VGrid", n = [
2427
2471
  type: "Density",
2428
2472
  required: !1,
2429
2473
  description: "Default density: `compact`, `cozy` (default) or `comfortable`."
2474
+ },
2475
+ {
2476
+ name: "messages",
2477
+ type: "GridMessages",
2478
+ required: !1,
2479
+ description: "Built-in text for every grid (translations, wording); a grid's own `messages` win."
2480
+ },
2481
+ {
2482
+ name: "parts",
2483
+ type: "GridParts",
2484
+ required: !1,
2485
+ description: "Built-in parts to turn off in every grid; a grid's own `parts` win."
2430
2486
  }
2431
2487
  ]
2432
2488
  }, d = {
@@ -30,6 +30,7 @@ var e = {
30
30
  aggregates: "aggregation",
31
31
  groupBy: "rowGrouping",
32
32
  groupsExpanded: "rowGrouping",
33
+ selectedGroups: "serverGrouping",
33
34
  statusBar: "statusBar"
34
35
  }, t = {
35
36
  sortable: "sorting",
@@ -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\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 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":";AA2BA,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,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\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 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;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"}