@nocopypaste/vue-grid 0.4.3 → 0.5.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.
- package/AGENTS.md +1 -0
- package/CHANGELOG.md +14 -0
- package/README.md +59 -28
- package/agent/api.json +22 -1
- package/agent/api.md +4 -1
- package/agent/grid-config.schema.json +4 -0
- package/dist/agent/api.js +20 -1
- package/dist/agent/requirements.js +2 -1
- package/dist/agent/requirements.js.map +1 -1
- package/dist/base.css +1 -1
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +51 -29
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridStatusBar.js +6 -0
- package/dist/components/VGridStatusBar.js.map +1 -0
- package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composables/useStatusBar.js +73 -0
- package/dist/composables/useStatusBar.js.map +1 -0
- package/dist/core.css +1 -1
- package/dist/features/index.js +9 -7
- package/dist/features/index.js.map +1 -1
- package/dist/features/statusBar.js +11 -0
- package/dist/features/statusBar.js.map +1 -0
- package/dist/index.js +5 -4
- package/dist/internal/features.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/types/agent/requirements.d.ts +1 -1
- package/dist/types/components/VGrid.vue.d.ts +9 -1
- package/dist/types/components/VGridStatusBar.vue.d.ts +14 -0
- package/dist/types/composables/useStatusBar.d.ts +45 -0
- package/dist/types/features/index.d.ts +2 -1
- package/dist/types/features/statusBar.d.ts +8 -0
- package/dist/types/internal/features.d.ts +2 -1
- package/dist/types/types.d.ts +47 -1
- package/dist/vue-grid.css +1 -1
- package/llms-full.txt +64 -29
- package/llms.txt +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -65,6 +65,7 @@ runs in the [live examples](https://eboye.github.io/eboye-vue-grid/), each with
|
|
|
65
65
|
| A totals row (sum, avg, …) | `aggregationFeature` | column `aggregate: 'sum' \| 'avg' \| 'min' \| 'max' \| 'count' \| fn`; `totals` (or `'top'`) |
|
|
66
66
|
| Group rows by a column ("by status, then city") | `rowGroupingFeature` | `v-model:group-by="['status', 'city']"`, `groups-expanded`; column `groupable: true` (header menu), `groupValue: (row) => …` (e.g. month); `aggregate` shows per group |
|
|
67
67
|
| Download CSV, copy rows / cells (Ctrl+C) | `exportFeature` | `grid.exportCsv()`, `getCsv()`, `copyRows()`, `@copy`; column `exportValue`, `exportable: false` |
|
|
68
|
+
| Row / selection counts, sum of the selected rows | `statusBarFeature` | `status-bar` (or `{ summary: ['total'], aggregates?: ['sum', 'avg'] }`); `#status-bar="{ rowCount, selectedCount, summary, … }"` |
|
|
68
69
|
| Arrow-key navigation (ARIA grid) | `keyboardNavigationFeature` | — |
|
|
69
70
|
| Remember column layout | — | `storage="orders-grid"` (localStorage key) |
|
|
70
71
|
| Cell type (money, date, badge, link, …) | — | `renderer: currencyRenderer` etc. (list below) |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 — 2026-11-24
|
|
4
|
+
|
|
5
|
+
**Status bar** (`statusBarFeature`): `status-bar` adds a bar under the grid with the rows that pass
|
|
6
|
+
the filters (`84 of 200 rows`, or the server's `total`), the selected rows, and the active filters
|
|
7
|
+
with a Clear button. `{ summary: ['stake'] }` adds, like a spreadsheet, the sum and average of
|
|
8
|
+
those columns over the selected rows (`aggregates` picks sum, average, min, max), formatted like
|
|
9
|
+
the column's cells; selected child rows count too. The `#status-bar` slot replaces the content
|
|
10
|
+
(`rowCount`, `totalRowCount`, `selectedCount`, `allSelected`, `filterCount`, `summary`,
|
|
11
|
+
`clearFilters`). Its component loads on demand; a grid without the feature grows by 0.1 kB gzip.
|
|
12
|
+
New exported types `StatusBarOptions`, `StatusBarScope`, `StatusBarSummary`, `StatusBarAggregate`.
|
|
13
|
+
|
|
14
|
+
Docs: the bundle sizes in the READMEs are measured again (a plain grid is 14.0 kB gzip; the
|
|
15
|
+
numbers had last been taken at 0.3.0).
|
|
16
|
+
|
|
3
17
|
## 0.4.3 — 2026-11-24
|
|
4
18
|
|
|
5
19
|
**Server data: a failed request no longer leaves the old rows looking current.** When a
|
package/README.md
CHANGED
|
@@ -131,6 +131,7 @@ an opt-in feature:
|
|
|
131
131
|
| `aggregationFeature` | Column `aggregate` (`sum`, `avg`, `min`, `max`, `count`, a function) and `totals`: a sticky totals row over the filtered rows |
|
|
132
132
|
| `rowGroupingFeature` | `v-model:group-by`: rows grouped by one or more columns into collapsible group rows with the value, row count and aggregates; Group by / Ungroup in the header menu for `groupable` columns |
|
|
133
133
|
| `exportFeature` | `exportCsv()` / `getCsv()` / `copyRows()`, Ctrl/⌘+C for the selected rows or the focused cell, the `copy` event; column `exportValue` / `exportable` |
|
|
134
|
+
| `statusBarFeature` | `status-bar`: a bar under the grid with the rows that pass the filters, the selected rows, the active filters (with Clear), and `{ summary: [keys] }` columns' sum and average over the selected rows; the `#status-bar` slot |
|
|
134
135
|
|
|
135
136
|
```ts
|
|
136
137
|
// per grid
|
|
@@ -163,43 +164,44 @@ what you import.
|
|
|
163
164
|
|
|
164
165
|
| File | What | gzip |
|
|
165
166
|
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------ |
|
|
166
|
-
| `base.css` | Structure only: grid layout, subgrid, sticky header and pins, tree indent, popover placement, virtual rows, pinned rows, truncation | 2.
|
|
167
|
-
| `theme.css` | The default look on top of `base.css`: `--vg-*` tokens, colours, dark mode, densities, spacing, borders, typography, shadows, animation | 3.
|
|
168
|
-
| `core.css` | `base.css` + `theme.css` | 5.
|
|
167
|
+
| `base.css` | Structure only: grid layout, subgrid, sticky header and pins, tree indent, popover placement, virtual rows, pinned rows, truncation | 2.3 kB |
|
|
168
|
+
| `theme.css` | The default look on top of `base.css`: `--vg-*` tokens, colours, dark mode, densities, spacing, borders, typography, shadows, animation | 3.6 kB |
|
|
169
|
+
| `core.css` | `base.css` + `theme.css` | 5.4 kB |
|
|
169
170
|
| `renderers.css` | Styles for the cell renderers (other than text); uses the theme's tokens | 2.2 kB |
|
|
170
|
-
| `style.css` | All of the above |
|
|
171
|
+
| `style.css` | All of the above | 7.0 kB |
|
|
171
172
|
|
|
172
173
|
For a fully custom look, import only `base.css` (and `renderers.css` if you use renderers)
|
|
173
174
|
and style the `.vg-*` classes yourself. See [Theming](#theming).
|
|
174
175
|
|
|
175
176
|
| Import (minified / gzip, Vue excluded) | Initial chunk |
|
|
176
177
|
| ---------------------------------------------------------------------------- | ------------------ |
|
|
177
|
-
| `VGrid` (no features) |
|
|
178
|
-
| `VGrid` + `sortingFeature` |
|
|
179
|
-
| `VGrid` + `filteringFeature` |
|
|
180
|
-
| `VGrid` + `serverDataFeature` |
|
|
181
|
-
| `VGrid` + `paginationFeature` |
|
|
182
|
-
| `VGrid` + `selectionFeature` |
|
|
183
|
-
| `VGrid` + `subGridsFeature` |
|
|
184
|
-
| `VGrid` + `menusFeature` |
|
|
185
|
-
| `VGrid` + `columnReorderFeature` |
|
|
186
|
-
| `VGrid` + `columnPinningFeature` |
|
|
187
|
-
| `VGrid` + `virtualScrollingFeature` |
|
|
188
|
-
| `VGrid` + `columnVisibilityFeature` |
|
|
189
|
-
| `VGrid` + `keyboardNavigationFeature` |
|
|
190
|
-
| `VGrid` + `columnResizingFeature` |
|
|
191
|
-
| `VGrid` + `columnGroupsFeature` |
|
|
192
|
-
| `VGrid` + `rowPinningFeature` |
|
|
193
|
-
| `VGrid` + `aggregationFeature` |
|
|
194
|
-
| `VGrid` + `rowGroupingFeature` |
|
|
195
|
-
| `VGrid` + `exportFeature` |
|
|
196
|
-
| `VGrid` + `
|
|
197
|
-
| `VGrid` + `
|
|
198
|
-
| `VGrid` + `
|
|
178
|
+
| `VGrid` (no features) | 40.3 kB / 14.0 kB |
|
|
179
|
+
| `VGrid` + `sortingFeature` | 41.0 kB / 14.3 kB |
|
|
180
|
+
| `VGrid` + `filteringFeature` | 50.9 kB / 17.8 kB |
|
|
181
|
+
| `VGrid` + `serverDataFeature` | 41.6 kB / 14.6 kB |
|
|
182
|
+
| `VGrid` + `paginationFeature` | 40.4 kB / 14.1 kB |
|
|
183
|
+
| `VGrid` + `selectionFeature` | 44.4 kB / 15.4 kB |
|
|
184
|
+
| `VGrid` + `subGridsFeature` | 42.6 kB / 14.8 kB |
|
|
185
|
+
| `VGrid` + `menusFeature` | 50.7 kB / 17.5 kB |
|
|
186
|
+
| `VGrid` + `columnReorderFeature` | 44.0 kB / 15.2 kB |
|
|
187
|
+
| `VGrid` + `columnPinningFeature` | 43.2 kB / 15.0 kB |
|
|
188
|
+
| `VGrid` + `virtualScrollingFeature` | 46.0 kB / 16.2 kB |
|
|
189
|
+
| `VGrid` + `columnVisibilityFeature` | 40.4 kB / 14.0 kB |
|
|
190
|
+
| `VGrid` + `keyboardNavigationFeature` | 43.0 kB / 15.0 kB |
|
|
191
|
+
| `VGrid` + `columnResizingFeature` | 43.5 kB / 15.2 kB |
|
|
192
|
+
| `VGrid` + `columnGroupsFeature` | 41.6 kB / 14.5 kB |
|
|
193
|
+
| `VGrid` + `rowPinningFeature` | 45.2 kB / 15.3 kB |
|
|
194
|
+
| `VGrid` + `aggregationFeature` | 45.4 kB / 15.4 kB |
|
|
195
|
+
| `VGrid` + `rowGroupingFeature` | 50.0 kB / 16.9 kB |
|
|
196
|
+
| `VGrid` + `exportFeature` | 44.0 kB / 15.5 kB |
|
|
197
|
+
| `VGrid` + `statusBarFeature` | 42.6 kB / 14.9 kB |
|
|
198
|
+
| `VGrid` + `allFeatures` + `VGridSearch` | 106.9 kB / 36.0 kB |
|
|
199
|
+
| `VGrid` + `currencyRenderer` | 41.6 kB / 14.5 kB |
|
|
200
|
+
| `VGrid` + `VGridPagination` + `VGridColumnMenu` | 47.0 kB / 16.2 kB |
|
|
199
201
|
| `sortRows` only | 0.7 kB / 0.4 kB |
|
|
200
202
|
| `toCsv` only | 1.1 kB / 0.6 kB |
|
|
201
|
-
| everything |
|
|
202
|
-
| `validateGridConfig` (`@nocopypaste/vue-grid/agent`, never in an app bundle) |
|
|
203
|
+
| everything | 151.7 kB / 48.5 kB |
|
|
204
|
+
| `validateGridConfig` (`@nocopypaste/vue-grid/agent`, never in an app bundle) | 69.7 kB / 18.9 kB |
|
|
203
205
|
|
|
204
206
|
With `filteringFeature`, the filter popover body and the filter-row editors are **on-demand
|
|
205
207
|
chunks**: they load the first time a popover opens or `filter-row` is on. With
|
|
@@ -920,6 +922,35 @@ Without the grid: `toCsv(rows, columns, { delimiter, header, guard })` writes CS
|
|
|
920
922
|
and column definitions (raw values, `exportValue`, `exportable`); `toDelimited(table)`,
|
|
921
923
|
`plainText(value)` and `guardFormula(text)` are its parts.
|
|
922
924
|
|
|
925
|
+
## Status bar
|
|
926
|
+
|
|
927
|
+
`statusBarFeature` adds a bar under the grid, like a spreadsheet's:
|
|
928
|
+
|
|
929
|
+
```vue
|
|
930
|
+
<VGrid
|
|
931
|
+
v-model:selected="selected"
|
|
932
|
+
:rows="orders"
|
|
933
|
+
:columns="columns"
|
|
934
|
+
row-key="id"
|
|
935
|
+
selectable
|
|
936
|
+
:status-bar="{ summary: ['total'] }"
|
|
937
|
+
:features="[statusBarFeature, selectionFeature, filteringFeature]"
|
|
938
|
+
/>
|
|
939
|
+
<!-- 84 of 200 rows · 3 selected · 1 filter Clear Total: Sum €917.03 Average €305.68 -->
|
|
940
|
+
```
|
|
941
|
+
|
|
942
|
+
- **Counts**: the top-level rows that pass the filters, on every page (`84 of 200 rows`, or the
|
|
943
|
+
server's `total` with a data source), the selected rows, and the active filters with a **Clear**
|
|
944
|
+
button.
|
|
945
|
+
- **Summary**: `summary` lists column keys; while rows are selected, the bar shows each column's
|
|
946
|
+
sum and average over them (`aggregates: ['sum', 'avg', 'min', 'max']` picks), formatted
|
|
947
|
+
like the column's cells. Selected child rows count too. With "select all N matching rows" on
|
|
948
|
+
(server data) the summary hides: only the loaded page is known.
|
|
949
|
+
- **Your own content**: the `#status-bar` slot gets `{ rowCount, totalRowCount, selectedCount,
|
|
950
|
+
allSelected, filterCount, summary, clearFilters }` and replaces the default content.
|
|
951
|
+
- The bar is a `group` labelled "Grid status"; style it with `.vg-status-bar`. Its component loads
|
|
952
|
+
on demand (own chunk).
|
|
953
|
+
|
|
923
954
|
## Virtual scrolling
|
|
924
955
|
|
|
925
956
|
```vue
|
package/agent/api.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@nocopypaste/vue-grid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"component": "VGrid",
|
|
5
5
|
"props": [
|
|
6
6
|
{
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
"description": "Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise).",
|
|
44
44
|
"feature": "pagination"
|
|
45
45
|
},
|
|
46
|
+
{
|
|
47
|
+
"name": "statusBar",
|
|
48
|
+
"type": "boolean | StatusBarOptions",
|
|
49
|
+
"required": false,
|
|
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
|
+
"feature": "statusBar"
|
|
52
|
+
},
|
|
46
53
|
{
|
|
47
54
|
"name": "sortMode",
|
|
48
55
|
"type": "'controlled' | 'client'",
|
|
@@ -450,6 +457,11 @@
|
|
|
450
457
|
"scope": null,
|
|
451
458
|
"description": "Shown when there are no rows."
|
|
452
459
|
},
|
|
460
|
+
{
|
|
461
|
+
"name": "status-bar",
|
|
462
|
+
"scope": "StatusBarScope",
|
|
463
|
+
"description": "The status bar's content (status bar feature): replaces the counts and the summary."
|
|
464
|
+
},
|
|
453
465
|
{
|
|
454
466
|
"name": "loading",
|
|
455
467
|
"scope": null,
|
|
@@ -989,6 +1001,15 @@
|
|
|
989
1001
|
"sortFn"
|
|
990
1002
|
]
|
|
991
1003
|
},
|
|
1004
|
+
{
|
|
1005
|
+
"id": "statusBar",
|
|
1006
|
+
"export": "statusBarFeature",
|
|
1007
|
+
"description": "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).",
|
|
1008
|
+
"props": [
|
|
1009
|
+
"statusBar"
|
|
1010
|
+
],
|
|
1011
|
+
"columnOptions": []
|
|
1012
|
+
},
|
|
992
1013
|
{
|
|
993
1014
|
"id": "subGrids",
|
|
994
1015
|
"export": "subGridsFeature",
|
package/agent/api.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @nocopypaste/vue-grid 0.
|
|
1
|
+
# @nocopypaste/vue-grid 0.5.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
|
|
|
@@ -24,6 +24,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
|
|
|
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
26
|
| `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
|
+
| `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` | |
|
|
27
28
|
| `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` | |
|
|
28
29
|
| `virtualScrollingFeature` | Virtual scrolling: `:virtual="{ rowHeight, overscan?, detailHeight? }"` renders only the rows in view (plus `overscan`), so tens of thousands of rows stay fast — sub-grids and detail rows included, inside the same CSS grid / subgrid layout. Without it, `virtual` is ignored and every row renders. | `virtual` | |
|
|
29
30
|
|
|
@@ -37,6 +38,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
|
|
|
37
38
|
| `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. |
|
|
38
39
|
| `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. |
|
|
39
40
|
| `pagination` | `boolean \| { pageSizes?: number[] }` | `false` | `paginationFeature` | Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise). |
|
|
41
|
+
| `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. |
|
|
40
42
|
| `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`. |
|
|
41
43
|
| `filterMode` | `'client' \| 'controlled'` | `'client'` | `filteringFeature` | `client` (default): the grid filters its rows. `controlled`: it only emits `update:filters`. |
|
|
42
44
|
| `filterRow` | `boolean` | `false` | `filteringFeature` | Show the filter row: an input under each filterable column's header. |
|
|
@@ -114,6 +116,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
|
|
|
114
116
|
| `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>`. |
|
|
115
117
|
| `detail` | `{ row: T; rowKey: RowKey; depth: number }` | Expandable detail row under a row: any content, even another grid. |
|
|
116
118
|
| `empty` | | Shown when there are no rows. |
|
|
119
|
+
| `status-bar` | `StatusBarScope` | The status bar's content (status bar feature): replaces the counts and the summary. |
|
|
117
120
|
| `loading` | | Shown while loading with no rows yet. |
|
|
118
121
|
| `sub-rows-loading` | `{ row: T }` | Shown while a row's lazy children load. |
|
|
119
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. |
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"selectionFeature",
|
|
42
42
|
"serverDataFeature",
|
|
43
43
|
"sortingFeature",
|
|
44
|
+
"statusBarFeature",
|
|
44
45
|
"subGridsFeature",
|
|
45
46
|
"virtualScrollingFeature"
|
|
46
47
|
]
|
|
@@ -61,6 +62,9 @@
|
|
|
61
62
|
],
|
|
62
63
|
"description": "Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise)."
|
|
63
64
|
},
|
|
65
|
+
"statusBar": {
|
|
66
|
+
"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
|
+
},
|
|
64
68
|
"sortMode": {
|
|
65
69
|
"enum": [
|
|
66
70
|
"controlled",
|
package/dist/agent/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/agent/api.json
|
|
2
|
-
var e = "0.
|
|
2
|
+
var e = "0.5.0", t = "VGrid", n = [
|
|
3
3
|
{
|
|
4
4
|
name: "rows",
|
|
5
5
|
type: "readonly T[]",
|
|
@@ -40,6 +40,13 @@ var e = "0.4.3", t = "VGrid", n = [
|
|
|
40
40
|
description: "Built-in pagination under the grid (server-side with `dataSource`, client-side otherwise).",
|
|
41
41
|
feature: "pagination"
|
|
42
42
|
},
|
|
43
|
+
{
|
|
44
|
+
name: "statusBar",
|
|
45
|
+
type: "boolean | StatusBarOptions",
|
|
46
|
+
required: !1,
|
|
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
|
+
feature: "statusBar"
|
|
49
|
+
},
|
|
43
50
|
{
|
|
44
51
|
name: "sortMode",
|
|
45
52
|
type: "'controlled' | 'client'",
|
|
@@ -444,6 +451,11 @@ var e = "0.4.3", t = "VGrid", n = [
|
|
|
444
451
|
scope: null,
|
|
445
452
|
description: "Shown when there are no rows."
|
|
446
453
|
},
|
|
454
|
+
{
|
|
455
|
+
name: "status-bar",
|
|
456
|
+
scope: "StatusBarScope",
|
|
457
|
+
description: "The status bar's content (status bar feature): replaces the counts and the summary."
|
|
458
|
+
},
|
|
447
459
|
{
|
|
448
460
|
name: "loading",
|
|
449
461
|
scope: null,
|
|
@@ -949,6 +961,13 @@ var e = "0.4.3", t = "VGrid", n = [
|
|
|
949
961
|
"sortFn"
|
|
950
962
|
]
|
|
951
963
|
},
|
|
964
|
+
{
|
|
965
|
+
id: "statusBar",
|
|
966
|
+
export: "statusBarFeature",
|
|
967
|
+
description: "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).",
|
|
968
|
+
props: ["statusBar"],
|
|
969
|
+
columnOptions: []
|
|
970
|
+
},
|
|
952
971
|
{
|
|
953
972
|
id: "subGrids",
|
|
954
973
|
export: "subGridsFeature",
|
|
@@ -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\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}\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":";
|
|
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"}
|
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{opacity:1}.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-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{opacity:1}.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}}
|
|
@@ -53,6 +53,7 @@ var De = ["data-density"], Oe = {
|
|
|
53
53
|
type: [Boolean, Object],
|
|
54
54
|
default: !1
|
|
55
55
|
},
|
|
56
|
+
statusBar: { type: [Boolean, Object] },
|
|
56
57
|
sortMode: { default: "controlled" },
|
|
57
58
|
filterMode: { default: "client" },
|
|
58
59
|
filterRow: {
|
|
@@ -561,6 +562,22 @@ var De = ["data-density"], Oe = {
|
|
|
561
562
|
label: b.totalsLabel
|
|
562
563
|
},
|
|
563
564
|
onCopy: (e) => T("copy", e)
|
|
565
|
+
}), ln = k.statusBar?.useStatusBar({
|
|
566
|
+
options: () => b.statusBar,
|
|
567
|
+
rowCount: () => B.value ? H?.total.value ?? U.value.length : Zt.value.length,
|
|
568
|
+
totalRowCount: () => B.value ? void 0 : U.value.length,
|
|
569
|
+
rows: () => U.value,
|
|
570
|
+
selection: W,
|
|
571
|
+
selected: S,
|
|
572
|
+
allMatching: We,
|
|
573
|
+
filterCount: St,
|
|
574
|
+
canClear: !!k.filtering,
|
|
575
|
+
clearFilters: () => _n(),
|
|
576
|
+
children: R,
|
|
577
|
+
getKey: O,
|
|
578
|
+
columns: () => b.columns,
|
|
579
|
+
resolve: Ze,
|
|
580
|
+
format: Ke
|
|
564
581
|
});
|
|
565
582
|
if (process.env.NODE_ENV !== "production") {
|
|
566
583
|
Ee(() => {
|
|
@@ -583,7 +600,7 @@ var De = ["data-density"], Oe = {
|
|
|
583
600
|
let r = b.columns.find((e) => e.hidden)?.key ?? ze.value?.hidden?.[0];
|
|
584
601
|
!k.columnVisibility && r && e("columnVisibility", `Column "${r}" is hidden; that`);
|
|
585
602
|
let i = b.columns.find((e) => e.pinned)?.key;
|
|
586
|
-
!k.columnPinning && i && e("columnPinning", `Column "${i}" is pinned; that`), !k.menus && (b.contextMenu || typeof b.headerMenu == "function") && e("menus", "`context-menu` / a `header-menu` function"), !k.rowPinning && (Ue.value || b.pinnedTopRows || b.pinnedBottomRows) && e("rowPinning", "`pinned-rows` / `pinned-top-rows` / `pinned-bottom-rows`"), !k.aggregation && b.totals && e("aggregation", "`totals`");
|
|
603
|
+
!k.columnPinning && i && e("columnPinning", `Column "${i}" is pinned; that`), !k.menus && (b.contextMenu || typeof b.headerMenu == "function") && e("menus", "`context-menu` / a `header-menu` function"), !k.rowPinning && (Ue.value || b.pinnedTopRows || b.pinnedBottomRows) && e("rowPinning", "`pinned-rows` / `pinned-top-rows` / `pinned-bottom-rows`"), !k.aggregation && b.totals && e("aggregation", "`totals`"), !k.statusBar && b.statusBar && e("statusBar", "`status-bar`");
|
|
587
604
|
let a = b.columns.find((e) => e.exportValue)?.key;
|
|
588
605
|
!k.export && a && e("export", `Column "${a}" has an \`exportValue\`; that`);
|
|
589
606
|
let o = w.value == null ? [] : typeof w.value == "string" ? [w.value] : w.value;
|
|
@@ -592,7 +609,7 @@ var De = ["data-density"], Oe = {
|
|
|
592
609
|
k.rowGrouping && s !== void 0 && c(`group-by:${s}`, `\`group-by\` names "${s}", which is not a column key; it is ignored.`);
|
|
593
610
|
}), y(() => b.features, () => c("features-changed", "`features` is read once, when the grid is created; changes are ignored."));
|
|
594
611
|
}
|
|
595
|
-
let
|
|
612
|
+
let un = l(() => new Set(b.highlightedRows ?? [])), $ = {
|
|
596
613
|
keyboardNav: Ut,
|
|
597
614
|
cellRole: Ut ? "gridcell" : "cell",
|
|
598
615
|
rovingTabindex: Ut ? -1 : void 0,
|
|
@@ -630,7 +647,7 @@ var De = ["data-density"], Oe = {
|
|
|
630
647
|
isRowSelectable: (e) => W?.isRowSelectable(e) ?? !1,
|
|
631
648
|
rowCheckState: (e) => W?.rowCheckState(e) ?? "none",
|
|
632
649
|
toggleRow: (e, t) => W?.toggleRow(e, t),
|
|
633
|
-
isHighlighted: (e) =>
|
|
650
|
+
isHighlighted: (e) => un.value.has(e),
|
|
634
651
|
rowClass: (e, t) => b.rowClass?.(e, t),
|
|
635
652
|
rowClickable: l(() => b.rowClickable),
|
|
636
653
|
flash: l(() => b.flash ?? !1),
|
|
@@ -683,48 +700,48 @@ var De = ["data-density"], Oe = {
|
|
|
683
700
|
}, r, i) : void 0
|
|
684
701
|
};
|
|
685
702
|
G?.extend($, k.rowGrouping.GroupCells), ye(te, $);
|
|
686
|
-
function
|
|
703
|
+
function dn() {
|
|
687
704
|
D.value?.scrollTo({ top: 0 });
|
|
688
705
|
}
|
|
689
|
-
function
|
|
706
|
+
function fn(e) {
|
|
690
707
|
rn?.scrollToKey(e) || (D.value?.querySelector(`[data-row-key="${CSS.escape(String(e))}"] > .vg-cell`))?.scrollIntoView({ block: "nearest" });
|
|
691
708
|
}
|
|
692
|
-
function
|
|
709
|
+
function pn() {
|
|
693
710
|
let e = [];
|
|
694
711
|
Mt(U.value, (t) => {
|
|
695
712
|
ht(t) && e.push(O(t));
|
|
696
713
|
}), Be.value = e, G?.setAll(!0);
|
|
697
714
|
}
|
|
698
|
-
function
|
|
715
|
+
function mn() {
|
|
699
716
|
Be.value = [], G?.setAll(!1);
|
|
700
717
|
}
|
|
701
|
-
function
|
|
718
|
+
function hn(e) {
|
|
702
719
|
return (I?.patchLoaded(e) ?? 0) + (B.value && H ? H.patch(e) : 0);
|
|
703
720
|
}
|
|
704
|
-
function
|
|
721
|
+
function gn(e) {
|
|
705
722
|
z ? z.setFilters(e) : process.env.NODE_ENV !== "production" && c("feature:filtering", "setFilters() needs the filtering feature (filteringFeature).");
|
|
706
723
|
}
|
|
707
|
-
let
|
|
708
|
-
function
|
|
724
|
+
let _n = () => z?.clearAll(), vn = () => W?.clear();
|
|
725
|
+
function yn(e) {
|
|
709
726
|
return ((t) => cn ? cn[e](t) : (process.env.NODE_ENV !== "production" && c("feature:export", `${e}() needs the export feature (exportFeature).`), e === "getCsv" ? "" : e === "copyRows" ? Promise.resolve(!1) : void 0));
|
|
710
727
|
}
|
|
711
728
|
return me({
|
|
712
|
-
scrollToTop:
|
|
713
|
-
scrollToRow:
|
|
714
|
-
expandAll:
|
|
715
|
-
collapseAll:
|
|
729
|
+
scrollToTop: dn,
|
|
730
|
+
scrollToRow: fn,
|
|
731
|
+
expandAll: pn,
|
|
732
|
+
collapseAll: mn,
|
|
716
733
|
setColumnState: M,
|
|
717
|
-
patchLoadedRows:
|
|
718
|
-
setFilters:
|
|
719
|
-
clearFilters:
|
|
734
|
+
patchLoadedRows: hn,
|
|
735
|
+
setFilters: gn,
|
|
736
|
+
clearFilters: _n,
|
|
720
737
|
openFilter: bt,
|
|
721
738
|
reload: At,
|
|
722
739
|
reloadSubRows: jt,
|
|
723
740
|
pinRow: en,
|
|
724
|
-
getCsv:
|
|
725
|
-
exportCsv:
|
|
726
|
-
copyRows:
|
|
727
|
-
clearSelection:
|
|
741
|
+
getCsv: yn("getCsv"),
|
|
742
|
+
exportCsv: yn("exportCsv"),
|
|
743
|
+
copyRows: yn("copyRows"),
|
|
744
|
+
clearSelection: vn
|
|
728
745
|
}), (e, t) => (h(), f("div", {
|
|
729
746
|
class: _e(["vg-root", m.ui?.root]),
|
|
730
747
|
"data-density": m.density ?? _(E)?.density
|
|
@@ -734,17 +751,17 @@ var De = ["data-density"], Oe = {
|
|
|
734
751
|
columnState: j.value,
|
|
735
752
|
setColumnState: M,
|
|
736
753
|
filters: xt.value,
|
|
737
|
-
setFilters:
|
|
738
|
-
clearFilters:
|
|
754
|
+
setFilters: gn,
|
|
755
|
+
clearFilters: _n,
|
|
739
756
|
activeFilterCount: St.value,
|
|
740
757
|
selected: S.value,
|
|
741
758
|
selectedCount: _(W)?.count.value ?? 0,
|
|
742
759
|
selectAllMatching: We.value,
|
|
743
|
-
clearSelection:
|
|
760
|
+
clearSelection: vn
|
|
744
761
|
})])) : d("", !0),
|
|
745
762
|
_(k).selection && _(W)?.banner.value ? (h(), u(g(_(k).selection.Banner), he({ key: 1 }, _(W).banner.value, {
|
|
746
763
|
onSelectAll: t[0] ||= (e) => We.value = !0,
|
|
747
|
-
onClear:
|
|
764
|
+
onClear: vn
|
|
748
765
|
}), null, 16)) : d("", !0),
|
|
749
766
|
kt.value && sn.value.length ? (h(), f("div", ke, [t[8] ||= p("span", null, "Couldn't load the rows. These are from before.", -1), p("button", {
|
|
750
767
|
type: "button",
|
|
@@ -820,7 +837,7 @@ var De = ["data-density"], Oe = {
|
|
|
820
837
|
}, "Retry")])) : (B.value || m.rows.length) && St.value ? (h(), f("span", Ie, [de(Se(m.noMatchText) + " ", 1), p("button", {
|
|
821
838
|
type: "button",
|
|
822
839
|
class: "vg-link-button",
|
|
823
|
-
onClick: t[5] ||= (e) =>
|
|
840
|
+
onClick: t[5] ||= (e) => _n()
|
|
824
841
|
}, " Clear filters ")])) : be(e.$slots, "empty", {}, () => [de(Se(m.emptyText), 1)], void 0, 3)], 10, Pe)])),
|
|
825
842
|
_(Xt) && Z.value.bottom.length ? (h(), u(g(_(Xt)), {
|
|
826
843
|
key: 4,
|
|
@@ -829,8 +846,13 @@ var De = ["data-density"], Oe = {
|
|
|
829
846
|
"aria-start": Q.value ? st.value + Z.value.top.length + Q.value.rowCount + 1 : void 0
|
|
830
847
|
}, null, 8, ["items", "aria-start"])) : d("", !0)
|
|
831
848
|
], 46, Me)]),
|
|
832
|
-
|
|
849
|
+
_(ln)?.enabled.value && _(k).statusBar ? (h(), u(g(_(k).statusBar.StatusBar), {
|
|
833
850
|
key: 3,
|
|
851
|
+
bar: _(ln),
|
|
852
|
+
render: _(Ge)["status-bar"]
|
|
853
|
+
}, null, 8, ["bar", "render"])) : d("", !0),
|
|
854
|
+
V.value && _(k).pagination ? (h(), u(g(_(k).pagination.Pagination), {
|
|
855
|
+
key: 4,
|
|
834
856
|
page: C.value,
|
|
835
857
|
"onUpdate:page": t[6] ||= (e) => C.value = e,
|
|
836
858
|
"page-size": He.value,
|
|
@@ -845,7 +867,7 @@ var De = ["data-density"], Oe = {
|
|
|
845
867
|
"page-sizes"
|
|
846
868
|
])) : d("", !0),
|
|
847
869
|
_(k).menus && _(J) ? (h(), u(g(_(k).menus.Menu), {
|
|
848
|
-
key:
|
|
870
|
+
key: 5,
|
|
849
871
|
ref_key: "menuRef",
|
|
850
872
|
ref: Jt,
|
|
851
873
|
items: _(J).items.value,
|