@nocopypaste/vue-grid 0.3.1 → 0.4.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 +249 -84
- package/CHANGELOG.md +26 -0
- package/README.md +417 -228
- package/agent/api.json +101 -91
- package/agent/api.md +86 -85
- package/agent/grid-config.schema.json +22 -5
- package/dist/agent/api.js +99 -91
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/requirements.js +3 -1
- package/dist/agent/requirements.js.map +1 -1
- package/dist/agent/validate.js.map +1 -1
- package/dist/base.css +1 -1
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +196 -183
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridColumnMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridFilterInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridFilterPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/components/VGridGroupCells.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridGroupRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridPinnedRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridSearch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/VGridSelectionBanner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridTotalCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useColumnDrag.js.map +1 -1
- package/dist/composables/useColumnResize.js.map +1 -1
- package/dist/composables/useDataSource.js.map +1 -1
- package/dist/composables/useGridExport.js.map +1 -1
- package/dist/composables/useGridFilters.js.map +1 -1
- package/dist/composables/useGridKeyboard.js +46 -36
- package/dist/composables/useGridKeyboard.js.map +1 -1
- package/dist/composables/useGridMenus.js.map +1 -1
- package/dist/composables/useGridSelection.js.map +1 -1
- package/dist/composables/usePinFit.js +41 -0
- package/dist/composables/usePinFit.js.map +1 -0
- package/dist/composables/usePinnedRows.js.map +1 -1
- package/dist/composables/useRowGrouping.js.map +1 -1
- package/dist/composables/useTotals.js.map +1 -1
- package/dist/composables/useVirtualRows.js.map +1 -1
- package/dist/core/aggregate.js.map +1 -1
- package/dist/core/columns.js.map +1 -1
- package/dist/core/csv.js.map +1 -1
- package/dist/core/filter.js.map +1 -1
- package/dist/core/grouping.js.map +1 -1
- package/dist/core/pagination.js.map +1 -1
- package/dist/core/patch.js.map +1 -1
- package/dist/core/selection.js.map +1 -1
- package/dist/core/sort.js.map +1 -1
- package/dist/core/storage.js.map +1 -1
- package/dist/core/value.js.map +1 -1
- package/dist/core.css +1 -1
- package/dist/features/aggregation.js.map +1 -1
- package/dist/features/columnGroups.js.map +1 -1
- package/dist/features/columnPinning.js +8 -6
- package/dist/features/columnPinning.js.map +1 -1
- package/dist/features/columnVisibility.js.map +1 -1
- package/dist/features/filtering.js.map +1 -1
- package/dist/features/keyboardNavigation.js.map +1 -1
- package/dist/features/menus.js.map +1 -1
- package/dist/features/rowGrouping.js.map +1 -1
- package/dist/features/rowPinning.js.map +1 -1
- package/dist/features/selection.js.map +1 -1
- package/dist/features/virtualScrolling.js.map +1 -1
- package/dist/internal/RenderSlot.js.map +1 -1
- package/dist/internal/anchor.js.map +1 -1
- package/dist/internal/context.js.map +1 -1
- package/dist/internal/supports.js.map +1 -1
- package/dist/internal/touchHold.js.map +1 -1
- package/dist/registry/plugin.js.map +1 -1
- package/dist/registry/registry.js.map +1 -1
- package/dist/renderers/ActionButtonCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/ActionsMenuCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/BooleanCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/ButtonGroupCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/ChangeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/ChipCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/CodeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/CopyCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/DateCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/DateTimeCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/DetailsCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/EditCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/IconCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/IconToggleCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/JsonCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/LinkCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/MultiLineCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/NumberCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/StatusCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/TextCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/ToggleTextCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/format.js.map +1 -1
- package/dist/renderers/index.js.map +1 -1
- package/dist/renderers/options.js.map +1 -1
- package/dist/renderers/parts/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/parts/NumberValue.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/parts/ValueBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/renderers/parts/icons.js.map +1 -1
- package/dist/renderers/parts/useToggleControl.js.map +1 -1
- package/dist/renderers/plainText.js.map +1 -1
- package/dist/renderers/text.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/types/agent/index.d.ts +2 -2
- package/dist/types/components/VGrid.vue.d.ts +6 -0
- package/dist/types/composables/usePinFit.d.ts +17 -0
- package/dist/types/features/columnPinning.d.ts +3 -1
- package/dist/types/renderers/NumberCell.vue.d.ts +2 -4
- package/dist/types/renderers/index.d.ts +3 -5
- package/dist/types/renderers/options.d.ts +45 -0
- package/dist/types/renderers/plainText.d.ts +2 -4
- package/dist/types/types.d.ts +36 -0
- package/dist/vue-grid.css +1 -1
- package/llms-full.txt +752 -397
- package/package.json +1 -1
package/agent/api.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @nocopypaste/vue-grid 0.
|
|
1
|
+
# @nocopypaste/vue-grid 0.4.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
|
|
|
@@ -10,7 +10,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
|
|
|
10
10
|
|---|---|---|---|
|
|
11
11
|
| `aggregationFeature` | Aggregates and the totals row: columns with an `aggregate` (`sum`, `avg`, `min`, `max`, `count` or a function) and `totals` (`true` / `'bottom'` or `'top'`) show a sticky totals row over the rows that pass the filters, on every page. `aggregates` supplies the values instead (e.g. from a server). Without it, `aggregate` and `totals` are ignored. | `totals` `totalsLabel` `aggregates` | `aggregate` |
|
|
12
12
|
| `columnGroupsFeature` | Grouped column headers: give columns a `group` and adjacent visible columns of the same group get one header cell spanning them, in a sticky row above the column headers. Groups follow reordering, hiding and pinning (a pin boundary splits a group). Without it, `group` is ignored. | | `group` |
|
|
13
|
-
| `columnPinningFeature` | Pinned columns: `pinned: 'left' \| 'right'` columns stay put (sticky) while the grid scrolls sideways, with edge shadows; runtime pins from the header menu (Pin left / Pin right / Unpin) are kept in `v-model:column-state` and persisted with `storage`. Without it, pins are ignored. |
|
|
13
|
+
| `columnPinningFeature` | Pinned columns: `pinned: 'left' \| 'right'` columns stay put (sticky) while the grid scrolls sideways, with edge shadows; runtime pins from the header menu (Pin left / Pin right / Unpin) are kept in `v-model:column-state` and persisted with `storage`. While the pinned columns would take more than `pinned-max-share` of the grid's width (half, by default), they scroll like the others. Without it, pins are ignored. | `pinnedMaxShare` | `pinned` `pinnable` |
|
|
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` |
|
|
@@ -56,6 +56,7 @@ Opt-in: pass them as `:features="[…]"` on `<VGrid>` or once via `createVueGrid
|
|
|
56
56
|
| `flash` | `FlashMode` | | | Briefly highlight cells whose value changes (live data, enrichment). Columns can override. |
|
|
57
57
|
| `virtual` | `VirtualOptions \| false` | `false` | `virtualScrollingFeature` | Virtual scrolling: only the rows in view render. Rows share one height (`rowHeight`, px) and the grid needs a bounded height. Needs the virtual scrolling feature. |
|
|
58
58
|
| `storage` | `ColumnStateStorage \| string` | | | Persist column state (order, hidden, pins, widths): a localStorage key or your own storage. |
|
|
59
|
+
| `pinnedMaxShare` | `number \| false` | `0.5` | `columnPinningFeature` | Pinned columns scroll like the others while together they'd take more than this share of the grid's width (a phone, a narrow panel); pinned again once there's room. `false`: always pinned. Column pinning feature. |
|
|
59
60
|
| `renderers` | `CellRendererDefinition[]` | | | Renderers usable by name in this grid (merged over the app-wide ones). |
|
|
60
61
|
| `locale` | `string` | | | Locale for number / date renderers (default: the plugin's, else the browser's). |
|
|
61
62
|
| `currency` | `string` | | | Default ISO 4217 currency for currency renderers. |
|
|
@@ -191,16 +192,16 @@ Text, the default renderer (the only one `<VGrid>` bundles): ellipsis, line clam
|
|
|
191
192
|
|---|---|---|
|
|
192
193
|
| `ellipsis` | `boolean` | Single line with ellipsis (full text in a tooltip). |
|
|
193
194
|
| `lines` | `number` | Clamp to N lines. |
|
|
194
|
-
| `maxWidth` | `string` |
|
|
195
|
+
| `maxWidth` | `string` | CSS max width of the text, e.g. `'16rem'`: longer text wraps or, with `ellipsis`, is cut. |
|
|
195
196
|
| `preserveNewlines` | `boolean` | Keep line breaks in the value (`white-space: pre-line`). |
|
|
196
197
|
| `tooltip` | `boolean \| RowFn<string \| undefined>` | `true` = value as tooltip; a function computes it. |
|
|
197
198
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
198
|
-
| `tone` | `RowOption<Tone \| undefined>` |
|
|
199
|
+
| `tone` | `RowOption<Tone \| undefined>` | Colour of the text (`success`, `danger`, `warning`, `info`, `neutral`, `accent`), or `(value, row) => tone`. |
|
|
199
200
|
| `toneMode` | `'text' \| 'fill'` | `text` (default) colours the text; `fill` colours the badge-like background. |
|
|
200
|
-
| `bold` | `RowOption<boolean>` |
|
|
201
|
+
| `bold` | `RowOption<boolean>` | Bold text, for every row or `(value, row) => boolean`. |
|
|
201
202
|
| `secondary` | `RowFn<string \| null \| undefined>` | Muted text after the value, e.g. a half-time score: `2:1 (1:0)`. |
|
|
202
203
|
| `badge` | `RowFn<BadgeSpec \| string \| null \| undefined>` | Badge before (default) or after the value. |
|
|
203
|
-
| `badgePosition` | `'start' \| 'end'` |
|
|
204
|
+
| `badgePosition` | `'start' \| 'end'` | Where `badge` goes: `start` (default, before the value) or `end`. |
|
|
204
205
|
| `icon` | `RowFn<IconSpec \| null \| undefined>` | Icon before the value, e.g. `{ icon: BellIcon, tone: 'warning', label: 'Notify' }`. |
|
|
205
206
|
| `copyable` | `boolean` | Adds a copy-to-clipboard button; emits `copy` with the copied text. |
|
|
206
207
|
| `copyValue` | `RowFn<string>` | What gets copied (default: the displayed text). |
|
|
@@ -212,7 +213,7 @@ Text that toggles a highlight when clicked. Emits `toggle` (with `clickable`). A
|
|
|
212
213
|
| Option | Type | Description |
|
|
213
214
|
|---|---|---|
|
|
214
215
|
| `clickable` | `boolean \| RowFn<boolean>` | When true, the text is a button that emits action `toggle`. |
|
|
215
|
-
| `highlighted` | `boolean \| RowFn<boolean>` |
|
|
216
|
+
| `highlighted` | `boolean \| RowFn<boolean>` | Shown as switched on (highlighted, `aria-pressed`), e.g. `(v, row) => row.starred`. |
|
|
216
217
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
217
218
|
|
|
218
219
|
### `number` — `numberRenderer`
|
|
@@ -231,10 +232,10 @@ Numbers that always show their sign (+ / −). With `clickable`, emits `click`.
|
|
|
231
232
|
|
|
232
233
|
| Option | Type | Description |
|
|
233
234
|
|---|---|---|
|
|
235
|
+
| `signed` | `boolean` | Always show the sign (`+3`, `−2`). Default `true` for `signed-number`; `false` formats like `number`. |
|
|
234
236
|
| `format` | `Intl.NumberFormatOptions` | `Intl.NumberFormat` options, e.g. `{ maximumFractionDigits: 0 }` or `{ style: 'percent' }`. |
|
|
235
237
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
236
238
|
| `clickable` | `RowOption<boolean>` | Renders the number as a link-style button that emits `click` (drill-down). |
|
|
237
|
-
| `signed` | `boolean` | |
|
|
238
239
|
|
|
239
240
|
### `currency` — `currencyRenderer`
|
|
240
241
|
|
|
@@ -275,7 +276,7 @@ Date and time, on two lines by default. Align: `start` · filter type: `date`.
|
|
|
275
276
|
|
|
276
277
|
| Option | Type | Description |
|
|
277
278
|
|---|---|---|
|
|
278
|
-
| `milliseconds` | `boolean` |
|
|
279
|
+
| `milliseconds` | `boolean` | Show milliseconds in the time (`12:30:05.123`). |
|
|
279
280
|
| `twoLines` | `boolean` | Date and time on two lines (default true). |
|
|
280
281
|
| `format` | `Intl.DateTimeFormatOptions` | `Intl.DateTimeFormat` options, e.g. `{ dateStyle: 'medium' }`. |
|
|
281
282
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
@@ -286,9 +287,9 @@ Yes / no as text labels or icons. Align: `start` · filter type: `boolean`.
|
|
|
286
287
|
|
|
287
288
|
| Option | Type | Description |
|
|
288
289
|
|---|---|---|
|
|
289
|
-
| `trueLabel` | `string` |
|
|
290
|
-
| `falseLabel` | `string` |
|
|
291
|
-
| `nullLabel` | `string` |
|
|
290
|
+
| `trueLabel` | `string` | Text for `true` (and its accessible name in icon mode). Default “Yes”. |
|
|
291
|
+
| `falseLabel` | `string` | Text for `false`. Default “No”. |
|
|
292
|
+
| `nullLabel` | `string` | Text for `null` / `undefined`. Default: nothing. |
|
|
292
293
|
| `display` | `'text' \| 'icon'` | `text` (default): labels. `icon`: a check for true, nothing (or a cross) for false. |
|
|
293
294
|
| `falseIcon` | `boolean` | In icon mode, show a cross for false (default: nothing). |
|
|
294
295
|
|
|
@@ -298,9 +299,9 @@ A coloured status badge (tone from a map, a function or a constant). With `click
|
|
|
298
299
|
|
|
299
300
|
| Option | Type | Description |
|
|
300
301
|
|---|---|---|
|
|
301
|
-
| `tone` | `ToneOption` |
|
|
302
|
+
| `tone` | `ToneOption` | Badge colour: one tone, a value → tone map (`{ Paid: 'success', Open: 'info' }`), or `(value, row) => tone`. Default `neutral`. |
|
|
302
303
|
| `label` | `RowFn<string> \| Record<string, string>` | Label from a function, or a value → label map. |
|
|
303
|
-
| `dot` | `boolean` |
|
|
304
|
+
| `dot` | `boolean` | A coloured dot before the label. Default `true`; `false` hides it. |
|
|
304
305
|
| `variant` | `'soft' \| 'solid' \| 'outline'` | `soft` (default, tinted), `solid` (filled) or `outline`. |
|
|
305
306
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
306
307
|
| `clickable` | `RowOption<boolean>` | Badge becomes a button that emits `click`. |
|
|
@@ -311,11 +312,11 @@ A safe link (http(s), mailto, tel only), or a `<RouterLink>` with `to` when vue-
|
|
|
311
312
|
|
|
312
313
|
| Option | Type | Description |
|
|
313
314
|
|---|---|---|
|
|
314
|
-
| `href` | `RowFn<string \| undefined>` |
|
|
315
|
+
| `href` | `RowFn<string \| undefined>` | The URL, from the value and row (default: the value). Only http(s), mailto and tel are linked; wins over `to`. |
|
|
315
316
|
| `to` | `RowFn<RouteTarget \| null \| undefined>` | Router location; rendered with `<RouterLink>` when vue-router is installed, else as an href. |
|
|
316
|
-
| `label` | `RowFn<string>` |
|
|
317
|
-
| `target` | `'_self' \| '_blank'` |
|
|
318
|
-
| `tooltip` | `RowFn<string \| undefined>` |
|
|
317
|
+
| `label` | `RowFn<string>` | Link text (default: the value). |
|
|
318
|
+
| `target` | `'_self' \| '_blank'` | `_blank` opens a new tab (with `rel="noopener noreferrer"`). |
|
|
319
|
+
| `tooltip` | `RowFn<string \| undefined>` | Hover text of the link. |
|
|
319
320
|
|
|
320
321
|
### `icon` — `iconRenderer`
|
|
321
322
|
|
|
@@ -325,9 +326,9 @@ An icon component, fixed or picked per row. Align: `center` · filter type: `tex
|
|
|
325
326
|
|---|---|---|
|
|
326
327
|
| `icon` | `Component` | Static icon component. |
|
|
327
328
|
| `iconFor` | `RowFn<Component \| undefined>` | Picks the icon per row (wins over `icon`). Kept separate because functional components are functions too. |
|
|
328
|
-
| `show` | `RowFn<boolean>` |
|
|
329
|
-
| `label` | `string \| RowFn<string>` |
|
|
330
|
-
| `tone` | `Tone \| RowFn<Tone \| undefined>` |
|
|
329
|
+
| `show` | `RowFn<boolean>` | Show the icon for this row (default: always). A hidden icon keeps its space, so columns stay aligned. |
|
|
330
|
+
| `label` | `string \| RowFn<string>` | Accessible name and tooltip. Without one the icon is decorative. |
|
|
331
|
+
| `tone` | `Tone \| RowFn<Tone \| undefined>` | Icon colour, or `(value, row) => tone`. |
|
|
331
332
|
|
|
332
333
|
### `json` — `jsonRenderer`
|
|
333
334
|
|
|
@@ -335,8 +336,8 @@ A button that opens the value as escaped JSON in a dialog. Align: `start` · fil
|
|
|
335
336
|
|
|
336
337
|
| Option | Type | Description |
|
|
337
338
|
|---|---|---|
|
|
338
|
-
| `label` | `string` |
|
|
339
|
-
| `dialogTitle` | `string \| RowFn<string>` |
|
|
339
|
+
| `label` | `string` | Text of the button that opens the JSON in a dialog. Default “View”. |
|
|
340
|
+
| `dialogTitle` | `string \| RowFn<string>` | Heading of the dialog (default: the column header). |
|
|
340
341
|
|
|
341
342
|
### `json-tree` — `jsonTreeRenderer`
|
|
342
343
|
|
|
@@ -348,7 +349,7 @@ A collapsible tree of nested data. Align: `start` · filter type: `text`.
|
|
|
348
349
|
| `maxDepth` | `number` | Deeper nodes are summarised (“3 items”) instead of expanded. Default unlimited. |
|
|
349
350
|
| `parseNested` | `boolean` | String values that contain JSON are shown as nested trees. |
|
|
350
351
|
| `collapsed` | `boolean` | Starts hidden behind a toggle button (labelled `toggleLabel`, default “More info”). |
|
|
351
|
-
| `toggleLabel` | `string` |
|
|
352
|
+
| `toggleLabel` | `string` | Text of the `collapsed` toggle. Default “More info”. |
|
|
352
353
|
| `emptyText` | `string` | Shown for null / empty values. Default: nothing. |
|
|
353
354
|
|
|
354
355
|
### `actions-menu` — `actionsMenuRenderer`
|
|
@@ -358,7 +359,7 @@ A `⋯` button with a keyboard-friendly menu. Emits the chosen item's `name`. Al
|
|
|
358
359
|
| Option | Type | Description |
|
|
359
360
|
|---|---|---|
|
|
360
361
|
| `actions` | `MenuItem[] \| ((row: any) => MenuItem[])` | Menu items (actions and `{ separator: true }`), or a function of the row. |
|
|
361
|
-
| `label` | `string` |
|
|
362
|
+
| `label` | `string` | Accessible name of the `⋯` button and the menu. Default “Actions”. |
|
|
362
363
|
|
|
363
364
|
### `action-button` — `actionButtonRenderer`
|
|
364
365
|
|
|
@@ -366,13 +367,13 @@ One button per row. Emits its `action` (default `click`). Align: `start` · filt
|
|
|
366
367
|
|
|
367
368
|
| Option | Type | Description |
|
|
368
369
|
|---|---|---|
|
|
369
|
-
| `label` | `string \| RowFn<string>` |
|
|
370
|
+
| `label` | `string \| RowFn<string>` | Button text (default: the value), or `(value, row) => text`. |
|
|
370
371
|
| `action` | `string` | Action name emitted on click. Default `click`. |
|
|
371
|
-
| `icon` | `Component` |
|
|
372
|
-
| `tone` | `Tone` |
|
|
373
|
-
| `disabled` | `RowFn<boolean>` |
|
|
372
|
+
| `icon` | `Component` | An icon component before the label. |
|
|
373
|
+
| `tone` | `Tone` | Button colour, e.g. `danger` for a delete button. |
|
|
374
|
+
| `disabled` | `RowFn<boolean>` | Disable the button for some rows: `(value, row) => boolean`. |
|
|
374
375
|
| `visible` | `RowFn<boolean>` | Hide the button for some rows. |
|
|
375
|
-
| `variant` | `ButtonVariant` |
|
|
376
|
+
| `variant` | `ButtonVariant` | `outline` (default), `solid` or `ghost`. |
|
|
376
377
|
| `iconOnly` | `boolean` | Only the icon; the label becomes its accessible name and tooltip. |
|
|
377
378
|
|
|
378
379
|
### `multi-line` — `multiLineRenderer`
|
|
@@ -384,7 +385,7 @@ Stacked lines, each with its own style, link, badge, trend or action. Align: `st
|
|
|
384
385
|
| `lines` | `RowFn<LineInput[] \| null \| undefined>` | Builds the lines; default: the value itself when it's an array. |
|
|
385
386
|
| `boldLines` | `number[]` | Indexes of lines to show in bold. |
|
|
386
387
|
| `ellipsis` | `boolean` | Each line on one row with ellipsis (default true). |
|
|
387
|
-
| `target` | `'_self' \| '_blank'` |
|
|
388
|
+
| `target` | `'_self' \| '_blank'` | `_blank` opens linked lines in a new tab. |
|
|
388
389
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
389
390
|
|
|
390
391
|
### `copy` — `copyRenderer`
|
|
@@ -407,9 +408,9 @@ A chip in any colour (readable text picked by contrast), square, circle or pill.
|
|
|
407
408
|
|---|---|---|
|
|
408
409
|
| `color` | `RowOption<string \| null \| undefined>` | Any CSS colour (e.g. from an API); text colour is picked for contrast. |
|
|
409
410
|
| `tone` | `ToneOption` | Named tone instead of a raw colour. |
|
|
410
|
-
| `label` | `RowFn<string>` |
|
|
411
|
-
| `tooltip` | `RowFn<string \| null \| undefined>` |
|
|
412
|
-
| `shape` | `'square' \| 'circle' \| 'pill'` |
|
|
411
|
+
| `label` | `RowFn<string>` | Chip text (default: the value, or its `label` / `name` / `text` field). A tone map is keyed by this label. |
|
|
412
|
+
| `tooltip` | `RowFn<string \| null \| undefined>` | Hover text (default: the value's `description` field, if any). |
|
|
413
|
+
| `shape` | `'square' \| 'circle' \| 'pill'` | `square` (default), `circle` or `pill`. |
|
|
413
414
|
| `size` | `string` | Box size for square/circle. Default `1.75rem`. |
|
|
414
415
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
415
416
|
|
|
@@ -420,7 +421,7 @@ A controlled checkbox, with a tooltip when disabled. Emits `change` with the req
|
|
|
420
421
|
| Option | Type | Description |
|
|
421
422
|
|---|---|---|
|
|
422
423
|
| `checked` | `RowFn<boolean>` | Default: the value is truthy. |
|
|
423
|
-
| `disabled` | `RowOption<boolean>` |
|
|
424
|
+
| `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
|
|
424
425
|
| `disabledReason` | `RowFn<string \| null \| undefined>` | Tooltip explaining why it's disabled. |
|
|
425
426
|
| `label` | `RowOption<string>` | Accessible name. Default: the column header. |
|
|
426
427
|
|
|
@@ -431,7 +432,7 @@ A controlled on / off switch. Emits `change` with the requested state. Align: `c
|
|
|
431
432
|
| Option | Type | Description |
|
|
432
433
|
|---|---|---|
|
|
433
434
|
| `checked` | `RowFn<boolean>` | Default: the value is truthy. |
|
|
434
|
-
| `disabled` | `RowOption<boolean>` |
|
|
435
|
+
| `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
|
|
435
436
|
| `disabledReason` | `RowFn<string \| null \| undefined>` | Tooltip explaining why it's disabled. |
|
|
436
437
|
| `label` | `RowOption<string>` | Accessible name. Default: the column header. |
|
|
437
438
|
|
|
@@ -443,7 +444,7 @@ One selected row across the column (controlled). Emits `select`. Align: `center`
|
|
|
443
444
|
|---|---|---|
|
|
444
445
|
| `name` | `string` | Radio group name. Default: the column key. |
|
|
445
446
|
| `checked` | `RowFn<boolean>` | Default: the value is truthy. |
|
|
446
|
-
| `disabled` | `RowOption<boolean>` |
|
|
447
|
+
| `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
|
|
447
448
|
| `disabledReason` | `RowFn<string \| null \| undefined>` | Tooltip explaining why it's disabled. |
|
|
448
449
|
| `label` | `RowOption<string>` | Accessible name. Default: the column header. |
|
|
449
450
|
|
|
@@ -456,8 +457,8 @@ A value with an edit button, for opening your own editor. Emits `edit`. Align: `
|
|
|
456
457
|
| `format` | `RowFn<string>` | Text shown next to the edit button (default: the value). |
|
|
457
458
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
458
459
|
| `label` | `string` | Accessible name of the button. Default “Edit”. |
|
|
459
|
-
| `disabled` | `RowOption<boolean>` |
|
|
460
|
-
| `bold` | `boolean` |
|
|
460
|
+
| `disabled` | `RowOption<boolean>` | Disables the edit button, for every row or `(value, row) => boolean`. |
|
|
461
|
+
| `bold` | `boolean` | Bold text. |
|
|
461
462
|
|
|
462
463
|
### `image` — `imageRenderer`
|
|
463
464
|
|
|
@@ -467,10 +468,10 @@ A thumbnail, with a placeholder when empty or broken. Align: `center` · filter
|
|
|
467
468
|
|---|---|---|
|
|
468
469
|
| `src` | `RowFn<string \| null \| undefined>` | Default: the value. |
|
|
469
470
|
| `baseUrl` | `string` | Prefixed to relative paths (e.g. a CDN). |
|
|
470
|
-
| `alt` | `RowOption<string>` |
|
|
471
|
+
| `alt` | `RowOption<string>` | Alternative text (default: none, a decorative image), or `(value, row) => text`. |
|
|
471
472
|
| `size` | `string` | Default `2.5rem`. |
|
|
472
|
-
| `fit` | `'contain' \| 'cover'` |
|
|
473
|
-
| `shape` | `'rounded' \| 'circle' \| 'square'` |
|
|
473
|
+
| `fit` | `'contain' \| 'cover'` | `contain` (default) shows the whole image; `cover` fills the box and crops. |
|
|
474
|
+
| `shape` | `'rounded' \| 'circle' \| 'square'` | `rounded` (default), `circle` (avatars) or `square`. |
|
|
474
475
|
|
|
475
476
|
### `code` — `codeRenderer`
|
|
476
477
|
|
|
@@ -489,7 +490,7 @@ Several buttons, fixed or per row. Emits the clicked button's `name`. Align: `st
|
|
|
489
490
|
|
|
490
491
|
| Option | Type | Description |
|
|
491
492
|
|---|---|---|
|
|
492
|
-
| `buttons` | `ButtonSpec[] \| ((row: any) => ButtonSpec[])` |
|
|
493
|
+
| `buttons` | `ButtonSpec[] \| ((row: any) => ButtonSpec[])` | The buttons (`{ name, label, tone?, variant?, disabled?, icon?, hidden? }`), or a function of the row. A click emits the button's `name`. |
|
|
493
494
|
|
|
494
495
|
### `icon-toggle` — `iconToggleRenderer`
|
|
495
496
|
|
|
@@ -502,7 +503,7 @@ A star / flag style on-off button (controlled). Emits `toggle`. Align: `center`
|
|
|
502
503
|
| `activeIcon` | `Component` | Default: a filled star (or `icon`). |
|
|
503
504
|
| `label` | `RowOption<string>` | Accessible name. Default “Toggle”. |
|
|
504
505
|
| `activeTone` | `Tone` | Tone when active. Default `warning`. |
|
|
505
|
-
| `disabled` | `RowOption<boolean>` |
|
|
506
|
+
| `disabled` | `RowOption<boolean>` | Disabled for every row, or `(value, row) => boolean`. |
|
|
506
507
|
|
|
507
508
|
### `details` — `detailsRenderer`
|
|
508
509
|
|
|
@@ -511,7 +512,7 @@ A status badge plus an info button with an anchored popover of label / value row
|
|
|
511
512
|
| Option | Type | Description |
|
|
512
513
|
|---|---|---|
|
|
513
514
|
| `tone` | `ToneOption` | Summary badge tone, like `status`. |
|
|
514
|
-
| `label` | `RowFn<string>` |
|
|
515
|
+
| `label` | `RowFn<string>` | Badge text (default: the value). |
|
|
515
516
|
| `items` | `RowFn<DetailItem[] \| null \| undefined>` | Popover rows. Empty → no info button. |
|
|
516
517
|
| `title` | `RowOption<string>` | Popover heading. Default: the column header. |
|
|
517
518
|
| `triggerLabel` | `string` | Accessible name of the info button. Default “Details”. |
|
|
@@ -523,7 +524,7 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
|
|
|
523
524
|
| Option | Type | Description |
|
|
524
525
|
|---|---|---|
|
|
525
526
|
| `items` | `RowFn<unknown[] \| null \| undefined>` | Default: the value when it's an array. |
|
|
526
|
-
| `itemLabel` | `RowFn<string>` |
|
|
527
|
+
| `itemLabel` | `RowFn<string>` | Text of one item, `(item, row) => string` (default: the item, objects as JSON). |
|
|
527
528
|
| `max` | `number` | Items shown before “+N more”. Default 1. |
|
|
528
529
|
| `placeholder` | `string` | Shown when the value is empty. |
|
|
529
530
|
|
|
@@ -541,8 +542,8 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
|
|
|
541
542
|
|
|
542
543
|
| Field | Type | Description |
|
|
543
544
|
|---|---|---|
|
|
544
|
-
| `top`? | `RowKey[]` |
|
|
545
|
-
| `bottom`? | `RowKey[]` |
|
|
545
|
+
| `top`? | `RowKey[]` | Keys of the rows pinned above the body, in display order. |
|
|
546
|
+
| `bottom`? | `RowKey[]` | Keys of the rows pinned below the body, in display order. |
|
|
546
547
|
|
|
547
548
|
### `ColumnState`
|
|
548
549
|
|
|
@@ -557,14 +558,14 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
|
|
|
557
558
|
|
|
558
559
|
| Field | Type | Description |
|
|
559
560
|
|---|---|---|
|
|
560
|
-
| `key` | `string` |
|
|
561
|
-
| `dir` | `SortDir` |
|
|
561
|
+
| `key` | `string` | The sorted column’s `key`. |
|
|
562
|
+
| `dir` | `SortDir` | `asc` or `desc`. |
|
|
562
563
|
|
|
563
564
|
### `ColumnFilterOptions`
|
|
564
565
|
|
|
565
566
|
| Field | Type | Description |
|
|
566
567
|
|---|---|---|
|
|
567
|
-
| `type`? | `FilterType` |
|
|
568
|
+
| `type`? | `FilterType` | `text`, `number`, `date`, `boolean` or `set` (default: from the renderer). |
|
|
568
569
|
| `options`? | `readonly FilterOption[] \| FilterOptionsLoader` | Choices for a `set` filter: a list, or a loader called with the search text (e.g. from a backend — honour `signal`). Default: distinct values from the rows. |
|
|
569
570
|
| `placeholder`? | `string` | Placeholder of the filter-row input. |
|
|
570
571
|
|
|
@@ -572,8 +573,8 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
|
|
|
572
573
|
|
|
573
574
|
| Field | Type | Description |
|
|
574
575
|
|---|---|---|
|
|
575
|
-
| `value` | `unknown` |
|
|
576
|
-
| `label`? | `string` |
|
|
576
|
+
| `value` | `unknown` | The value rows are matched against. |
|
|
577
|
+
| `label`? | `string` | Text shown for the option (default: the value). |
|
|
577
578
|
| `count`? | `number` | Shown next to the option (e.g. number of rows). |
|
|
578
579
|
|
|
579
580
|
### `MenuAction`
|
|
@@ -581,68 +582,68 @@ The first items of a list, with a “+N more” toggle. Emits `expand`. Align: `
|
|
|
581
582
|
| Field | Type | Description |
|
|
582
583
|
|---|---|---|
|
|
583
584
|
| `name` | `string` | Emitted as the action name. |
|
|
584
|
-
| `label` | `string` |
|
|
585
|
-
| `disabled`? | `boolean` |
|
|
586
|
-
| `tone`? | `MenuTone` |
|
|
587
|
-
| `icon`? | `Component` |
|
|
585
|
+
| `label` | `string` | Text of the item. |
|
|
586
|
+
| `disabled`? | `boolean` | Shown but can’t be chosen. |
|
|
587
|
+
| `tone`? | `MenuTone` | Colour, e.g. `danger` for a delete item. |
|
|
588
|
+
| `icon`? | `Component` | An icon component before the label. |
|
|
588
589
|
| `hint`? | `string` | Shown right-aligned, e.g. a shortcut hint. |
|
|
589
590
|
|
|
590
591
|
### `CellContext`
|
|
591
592
|
|
|
592
593
|
| Field | Type | Description |
|
|
593
594
|
|---|---|---|
|
|
594
|
-
| `row` | `T` |
|
|
595
|
-
| `rowKey` | `RowKey` |
|
|
596
|
-
| `column` | `ColumnDef<T>` |
|
|
597
|
-
| `value` | `unknown` |
|
|
595
|
+
| `row` | `T` | The row the cell belongs to. |
|
|
596
|
+
| `rowKey` | `RowKey` | The row’s key (`row-key`). |
|
|
597
|
+
| `column` | `ColumnDef<T>` | The cell’s column definition. |
|
|
598
|
+
| `value` | `unknown` | The cell value (`value` / `field` / `key`). |
|
|
598
599
|
|
|
599
600
|
### `CellActionEvent`
|
|
600
601
|
|
|
601
602
|
| Field | Type | Description |
|
|
602
603
|
|---|---|---|
|
|
603
|
-
| `name` | `string` |
|
|
604
|
-
| `payload` | `unknown` |
|
|
605
|
-
| `row` | `T` |
|
|
606
|
-
| `rowKey` | `RowKey` |
|
|
607
|
-
| `column` | `ColumnDef<T>` |
|
|
604
|
+
| `name` | `string` | The action, e.g. `click`, `change`, `toggle`, `copy` or a button’s `name`. |
|
|
605
|
+
| `payload` | `unknown` | Action data: the new value of a toggle or input, the copied text, a line index… |
|
|
606
|
+
| `row` | `T` | The row the cell belongs to. |
|
|
607
|
+
| `rowKey` | `RowKey` | The row’s key (`row-key`). |
|
|
608
|
+
| `column` | `ColumnDef<T>` | The cell’s column definition. |
|
|
608
609
|
|
|
609
610
|
### `CellClickEvent`
|
|
610
611
|
|
|
611
612
|
| Field | Type | Description |
|
|
612
613
|
|---|---|---|
|
|
613
|
-
| `row` | `T` |
|
|
614
|
-
| `rowKey` | `RowKey` |
|
|
615
|
-
| `column` | `ColumnDef<T>` |
|
|
616
|
-
| `value` | `unknown` |
|
|
617
|
-
| `event` | `MouseEvent \| KeyboardEvent` |
|
|
614
|
+
| `row` | `T` | The row the cell belongs to. |
|
|
615
|
+
| `rowKey` | `RowKey` | The row’s key (`row-key`). |
|
|
616
|
+
| `column` | `ColumnDef<T>` | The clicked column (one with `clickable: true`). |
|
|
617
|
+
| `value` | `unknown` | The cell value. |
|
|
618
|
+
| `event` | `MouseEvent \| KeyboardEvent` | The DOM event of the click (Enter on a focused cell clicks it too). |
|
|
618
619
|
|
|
619
620
|
### `ContextActionEvent`
|
|
620
621
|
|
|
621
622
|
| Field | Type | Description |
|
|
622
623
|
|---|---|---|
|
|
623
|
-
| `name` | `string` |
|
|
624
|
-
| `item` | `MenuAction` |
|
|
625
|
-
| `row` | `T` |
|
|
626
|
-
| `rowKey` | `RowKey` |
|
|
627
|
-
| `column` | `ColumnDef<T>` |
|
|
628
|
-
| `value` | `unknown` |
|
|
624
|
+
| `name` | `string` | The chosen item’s `name`. |
|
|
625
|
+
| `item` | `MenuAction` | The chosen item. |
|
|
626
|
+
| `row` | `T` | The row the cell belongs to. |
|
|
627
|
+
| `rowKey` | `RowKey` | The row’s key (`row-key`). |
|
|
628
|
+
| `column` | `ColumnDef<T>` | The cell’s column definition. |
|
|
629
|
+
| `value` | `unknown` | The cell value (`value` / `field` / `key`). |
|
|
629
630
|
|
|
630
631
|
### `HeaderActionEvent`
|
|
631
632
|
|
|
632
633
|
| Field | Type | Description |
|
|
633
634
|
|---|---|---|
|
|
634
|
-
| `name` | `string` |
|
|
635
|
-
| `item` | `MenuAction` |
|
|
636
|
-
| `column` | `ColumnDef<T>` |
|
|
635
|
+
| `name` | `string` | The chosen item’s `name`. |
|
|
636
|
+
| `item` | `MenuAction` | The chosen item. |
|
|
637
|
+
| `column` | `ColumnDef<T>` | The column whose header menu it was. |
|
|
637
638
|
|
|
638
639
|
### `VueGridConfig`
|
|
639
640
|
|
|
640
641
|
| Field | Type | Description |
|
|
641
642
|
|---|---|---|
|
|
642
|
-
| `renderers`? | `CellRendererDefinition[]` |
|
|
643
|
+
| `renderers`? | `CellRendererDefinition[]` | Renderers every grid can use by name (`renderer: 'currency'`); `allRenderers` for all of them. |
|
|
643
644
|
| `features`? | `readonly GridFeature[]` | Features every grid in the app gets (`allFeatures` for all of them). |
|
|
644
|
-
| `locale`? | `string` |
|
|
645
|
-
| `currency`? | `string` |
|
|
646
|
-
| `timeZone`? | `string` |
|
|
647
|
-
| `density`? | `Density` |
|
|
645
|
+
| `locale`? | `string` | Default locale for number and date renderers (default: the browser’s). |
|
|
646
|
+
| `currency`? | `string` | Default ISO 4217 currency for currency renderers. |
|
|
647
|
+
| `timeZone`? | `string` | Default IANA time zone for date renderers and date filters. |
|
|
648
|
+
| `density`? | `Density` | Default density: `compact`, `cozy` (default) or `comfortable`. |
|
|
648
649
|
|
|
@@ -185,6 +185,17 @@
|
|
|
185
185
|
"storage": {
|
|
186
186
|
"description": "Persist column state (order, hidden, pins, widths): a localStorage key or your own storage."
|
|
187
187
|
},
|
|
188
|
+
"pinnedMaxShare": {
|
|
189
|
+
"anyOf": [
|
|
190
|
+
{
|
|
191
|
+
"type": "number"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"const": false
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"description": "Pinned columns scroll like the others while together they'd take more than this share of the grid's width (a phone, a narrow panel); pinned again once there's room. `false`: always pinned. Column pinning feature."
|
|
198
|
+
},
|
|
188
199
|
"renderers": {
|
|
189
200
|
"type": "array",
|
|
190
201
|
"items": {},
|
|
@@ -274,9 +285,12 @@
|
|
|
274
285
|
"type": "object",
|
|
275
286
|
"properties": {
|
|
276
287
|
"key": {
|
|
277
|
-
"type": "string"
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "The sorted column’s `key`."
|
|
278
290
|
},
|
|
279
|
-
"dir": {
|
|
291
|
+
"dir": {
|
|
292
|
+
"description": "`asc` or `desc`."
|
|
293
|
+
}
|
|
280
294
|
},
|
|
281
295
|
"required": [
|
|
282
296
|
"key",
|
|
@@ -373,7 +387,8 @@
|
|
|
373
387
|
"string",
|
|
374
388
|
"number"
|
|
375
389
|
]
|
|
376
|
-
}
|
|
390
|
+
},
|
|
391
|
+
"description": "Keys of the rows pinned above the body, in display order."
|
|
377
392
|
},
|
|
378
393
|
"bottom": {
|
|
379
394
|
"type": "array",
|
|
@@ -382,7 +397,8 @@
|
|
|
382
397
|
"string",
|
|
383
398
|
"number"
|
|
384
399
|
]
|
|
385
|
-
}
|
|
400
|
+
},
|
|
401
|
+
"description": "Keys of the rows pinned below the body, in display order."
|
|
386
402
|
}
|
|
387
403
|
},
|
|
388
404
|
"required": [],
|
|
@@ -581,7 +597,8 @@
|
|
|
581
597
|
"date",
|
|
582
598
|
"boolean",
|
|
583
599
|
"set"
|
|
584
|
-
]
|
|
600
|
+
],
|
|
601
|
+
"description": "`text`, `number`, `date`, `boolean` or `set` (default: from the renderer)."
|
|
585
602
|
},
|
|
586
603
|
"options": {
|
|
587
604
|
"description": "Choices for a `set` filter: a list, or a loader called with the search text (e.g. from a backend — honour `signal`). Default: distinct values from the rows."
|