gridsmith-ui 0.20.0 → 0.22.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/dist/chat.js +3 -3
- package/dist/chunk-2RV23OBK.js +1349 -0
- package/dist/chunk-2RV23OBK.js.map +1 -0
- package/dist/chunk-7TOJ4G7S.js +197 -0
- package/dist/chunk-7TOJ4G7S.js.map +1 -0
- package/dist/{chunk-6MXHGH3D.js → chunk-AAYCQXZQ.js} +90 -161
- package/dist/chunk-AAYCQXZQ.js.map +1 -0
- package/dist/{chunk-ILIODA7W.js → chunk-CXMV7SXJ.js} +4 -3
- package/dist/chunk-CXMV7SXJ.js.map +1 -0
- package/dist/{chunk-EQDR57AM.js → chunk-EYMGLK4M.js} +3 -3
- package/dist/{chunk-EQDR57AM.js.map → chunk-EYMGLK4M.js.map} +1 -1
- package/dist/chunk-IVCVNAXG.js +115 -0
- package/dist/chunk-IVCVNAXG.js.map +1 -0
- package/dist/chunk-RG4KUCRS.js +9 -0
- package/dist/chunk-RG4KUCRS.js.map +1 -0
- package/dist/{chunk-JXANCXK6.js → chunk-RT7RYGC3.js} +39 -4
- package/dist/chunk-RT7RYGC3.js.map +1 -0
- package/dist/{chunk-XYDIBW3J.js → chunk-SBTBMAIU.js} +4 -3
- package/dist/chunk-SBTBMAIU.js.map +1 -0
- package/dist/data-grid.d.ts +38 -4
- package/dist/data-grid.js +304 -264
- package/dist/data-grid.js.map +1 -1
- package/dist/editor.d.ts +6 -5
- package/dist/editor.js +47 -11
- package/dist/editor.js.map +1 -1
- package/dist/index.d.ts +120 -153
- package/dist/index.js +1156 -1814
- package/dist/index.js.map +1 -1
- package/dist/kanban.js +2 -2
- package/dist/resizable.js +9 -8
- package/dist/resizable.js.map +1 -1
- package/dist/roots.css +10 -0
- package/dist/{table-utils-GounRE6s.d.ts → table-utils-BkjNEWts.d.ts} +5 -1
- package/dist/use-pagination-DiJo0aW5.d.ts +153 -0
- package/dist/virtualized.d.ts +11 -1
- package/dist/virtualized.js +67 -18
- package/dist/virtualized.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-6MXHGH3D.js.map +0 -1
- package/dist/chunk-ILIODA7W.js.map +0 -1
- package/dist/chunk-JN37OVTP.js +0 -67
- package/dist/chunk-JN37OVTP.js.map +0 -1
- package/dist/chunk-JXANCXK6.js.map +0 -1
- package/dist/chunk-TKVTZWBN.js +0 -50
- package/dist/chunk-TKVTZWBN.js.map +0 -1
- package/dist/chunk-XVB55M3N.js +0 -42
- package/dist/chunk-XVB55M3N.js.map +0 -1
- package/dist/chunk-XYDIBW3J.js.map +0 -1
package/dist/data-grid.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ColumnDef } from '@tanstack/react-table';
|
|
3
|
-
import { B as BreakpointKey, C as ColumnKind } from './table-utils-
|
|
3
|
+
import { B as BreakpointKey, C as ColumnKind } from './table-utils-BkjNEWts.js';
|
|
4
|
+
import { P as Pager } from './use-pagination-DiJo0aW5.js';
|
|
4
5
|
import 'react';
|
|
5
6
|
|
|
6
7
|
/** Column meta for opt-in truncation. Set on ColumnDef.meta. */
|
|
@@ -19,17 +20,50 @@ interface DataGridColumnMeta {
|
|
|
19
20
|
kind?: ColumnKind;
|
|
20
21
|
/** Horizontal alignment of the header and the cells; a block element (a Checkbox, a Button) is laid out with flex so it follows too (round 14). Default: numbers right, everything else left. */
|
|
21
22
|
align?: "left" | "center" | "right";
|
|
23
|
+
/** In an editable grid, whether this column's cells edit (default true); false for a column that shows (a status, actions). */
|
|
24
|
+
editable?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* In an editable grid, the value onCellEdit gets from the text typed (default the text itself): a number column's
|
|
27
|
+
* `(text) => Number(text)`, so a salary stays a number (the review of 30 September).
|
|
28
|
+
*/
|
|
29
|
+
parse?: (text: string) => unknown;
|
|
22
30
|
}
|
|
23
31
|
interface DataGridProps<T> {
|
|
24
32
|
data: T[];
|
|
25
33
|
columns: ColumnDef<T, any>[];
|
|
34
|
+
/**
|
|
35
|
+
* Rows a page, over the project's (dataDisplay.itemsPerPage), for a grid the user asked to page differently. Leave it
|
|
36
|
+
* out: the grid pages as the project says, with the project's control (Sprint 25.13 A5; it was 10).
|
|
37
|
+
*/
|
|
26
38
|
pageSize?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Cells edit in place, as the APG's grid (Sprint 25.13 A5): the grid is one Tab stop and the arrow keys move between
|
|
41
|
+
* cells; Enter or F2 (or a double-click) opens a cell's editor, Enter or leaving it saves and Escape cancels, and a
|
|
42
|
+
* brief tick, announced as "Saved", shows the save. A grid saves as you go, so it never marks a form around it.
|
|
43
|
+
*/
|
|
27
44
|
editable?: boolean;
|
|
28
|
-
|
|
29
|
-
|
|
45
|
+
/**
|
|
46
|
+
* A saved edit: the row's index in `data`, the column's id and the new value (the text typed, or the column's
|
|
47
|
+
* `meta.parse` of it). Called only when the value changed. Return a promise to have the tick and "Saved" wait for it:
|
|
48
|
+
* a rejection is announced as "Not saved", and the page says why and keeps the old value.
|
|
49
|
+
*/
|
|
50
|
+
onCellEdit?: (rowIndex: number, columnId: string, value: unknown) => void | Promise<unknown>;
|
|
51
|
+
/** The screen width below which the grid shows cards: the project's responsive.tableToCardsBreakpoint, else "md". */
|
|
30
52
|
mobileBreakpoint?: BreakpointKey;
|
|
53
|
+
/**
|
|
54
|
+
* The grid's own width below which it shows cards when it doesn't fit, in px (Sprint 25.13 A35): about a phone's; 0
|
|
55
|
+
* never switches by width. An editable grid never shows cards: it stays the APG's grid, scrolling sideways.
|
|
56
|
+
*/
|
|
57
|
+
cardsBelow?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The list's pager (Sprint 25.13 A3), from `usePagination(data)` over the same rows: pass it when the page also shows
|
|
60
|
+
* the count (TableToolbar). Without it the grid pages itself the same way.
|
|
61
|
+
*/
|
|
62
|
+
pager?: Pager<unknown>;
|
|
63
|
+
/** The grid's name for assistive tech. */
|
|
64
|
+
"aria-label"?: string;
|
|
31
65
|
className?: string;
|
|
32
66
|
}
|
|
33
|
-
declare function DataGrid<T>({ data, columns, pageSize, editable, onCellEdit, mobileBreakpoint: mobileBreakpointProp, className, }: DataGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function DataGrid<T>({ data, columns, pageSize, editable, onCellEdit, mobileBreakpoint: mobileBreakpointProp, cardsBelow, pager: pagerProp, "aria-label": ariaLabel, className, }: DataGridProps<T>): react_jsx_runtime.JSX.Element;
|
|
34
68
|
|
|
35
69
|
export { DataGrid, type DataGridColumnMeta };
|