@rozie-ui/data-table-solid 0.2.2 → 0.2.4
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/README.md +2 -0
- package/dist/index.cjs +16 -1
- package/dist/index.mjs +16 -1
- package/package.json +2 -2
- package/src/DataTable.tsx +1 -1
- package/src/themes/base.css +15 -0
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ npm i @rozie-ui/data-table-solid
|
|
|
10
10
|
|
|
11
11
|
Peer dependencies: `solid-js + @tanstack/table-core + @tanstack/virtual-core + @rozie-ui/popover-solid`. Install them alongside this package.
|
|
12
12
|
|
|
13
|
+
Also installed: `@rozie/runtime-solid` — Rozie's small, tree-shaken runtime helper package (controllable state, keyboard navigation, event modifiers, and safe interpolation). It arrives as a regular dependency, so npm pulls it for you. Your bundler keeps only the helpers this component actually uses — typically a few hundred bytes to a few KB, minified and gzipped. [What's in it and what it costs](https://github.com/One-Learning-Community/rozie.js/blob/main/docs/guide/output-and-runtime.md).
|
|
14
|
+
|
|
13
15
|
## Usage
|
|
14
16
|
|
|
15
17
|
Columns may be declared as a `:columns` config array **or** as `<Column>` children (or both — an id-keyed last-write-wins union). Per-cell rendering is one parent `#cell` / `#colHeader` renderer on `<DataTable>`, dispatched by `columnId`, so it works the same with either column form.
|
package/dist/index.cjs
CHANGED
|
@@ -386,7 +386,22 @@ function DataTable(_props) {
|
|
|
386
386
|
"estimateRowHeight",
|
|
387
387
|
"maxHeight",
|
|
388
388
|
"children",
|
|
389
|
-
"ref"
|
|
389
|
+
"ref",
|
|
390
|
+
"onSortChange",
|
|
391
|
+
"onExpandChange",
|
|
392
|
+
"onGroupChange",
|
|
393
|
+
"onFilterChange",
|
|
394
|
+
"onPageChange",
|
|
395
|
+
"onSelectionChange",
|
|
396
|
+
"onVisibilityChange",
|
|
397
|
+
"onResizeChange",
|
|
398
|
+
"onReorderChange",
|
|
399
|
+
"onPinChange",
|
|
400
|
+
"onHistoryChange",
|
|
401
|
+
"onActivecellChange",
|
|
402
|
+
"onRangeChange",
|
|
403
|
+
"onCellEditCommit",
|
|
404
|
+
"onRowEditCommit"
|
|
390
405
|
]);
|
|
391
406
|
const resolved = () => local.children;
|
|
392
407
|
(0, Solid_js.onMount)(() => {
|
package/dist/index.mjs
CHANGED
|
@@ -359,7 +359,22 @@ function DataTable(_props) {
|
|
|
359
359
|
"estimateRowHeight",
|
|
360
360
|
"maxHeight",
|
|
361
361
|
"children",
|
|
362
|
-
"ref"
|
|
362
|
+
"ref",
|
|
363
|
+
"onSortChange",
|
|
364
|
+
"onExpandChange",
|
|
365
|
+
"onGroupChange",
|
|
366
|
+
"onFilterChange",
|
|
367
|
+
"onPageChange",
|
|
368
|
+
"onSelectionChange",
|
|
369
|
+
"onVisibilityChange",
|
|
370
|
+
"onResizeChange",
|
|
371
|
+
"onReorderChange",
|
|
372
|
+
"onPinChange",
|
|
373
|
+
"onHistoryChange",
|
|
374
|
+
"onActivecellChange",
|
|
375
|
+
"onRangeChange",
|
|
376
|
+
"onCellEditCommit",
|
|
377
|
+
"onRowEditCommit"
|
|
363
378
|
]);
|
|
364
379
|
const resolved = () => local.children;
|
|
365
380
|
onMount(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozie-ui/data-table-solid",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@solid-primitives/keyed": "^1.5.3",
|
|
49
|
-
"@rozie/runtime-solid": "0.
|
|
49
|
+
"@rozie/runtime-solid": "0.6.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"solid-js": "^1.8",
|
package/src/DataTable.tsx
CHANGED
|
@@ -561,7 +561,7 @@ export interface DataTableHandle {
|
|
|
561
561
|
|
|
562
562
|
export default function DataTable(_props: DataTableProps): JSX.Element {
|
|
563
563
|
const _merged = mergeProps({ columns: (() => [])() as any[], selectionMode: 'none', manual: false, rowCount: null, pageCount: null, expandable: false, getSubRows: null, groupable: false, stickyHeader: false, interactionMode: 'table', singleClickEdit: false, undoable: false, undoLimit: 100, virtual: false, estimateRowHeight: 40, maxHeight: '' }, _props);
|
|
564
|
-
const [local, attrs] = splitProps(_merged, ['data', 'columns', 'selectionMode', 'sorting', 'globalFilter', 'columnFilters', 'pagination', 'manual', 'rowCount', 'pageCount', 'expandable', 'expanded', 'getSubRows', 'groupable', 'grouping', 'rowSelection', 'columnVisibility', 'columnSizing', 'columnOrder', 'columnPinning', 'stickyHeader', 'interactionMode', 'singleClickEdit', 'undoable', 'undoLimit', 'virtual', 'estimateRowHeight', 'maxHeight', 'children', 'ref']);
|
|
564
|
+
const [local, attrs] = splitProps(_merged, ['data', 'columns', 'selectionMode', 'sorting', 'globalFilter', 'columnFilters', 'pagination', 'manual', 'rowCount', 'pageCount', 'expandable', 'expanded', 'getSubRows', 'groupable', 'grouping', 'rowSelection', 'columnVisibility', 'columnSizing', 'columnOrder', 'columnPinning', 'stickyHeader', 'interactionMode', 'singleClickEdit', 'undoable', 'undoLimit', 'virtual', 'estimateRowHeight', 'maxHeight', 'children', 'ref', 'onSortChange', 'onExpandChange', 'onGroupChange', 'onFilterChange', 'onPageChange', 'onSelectionChange', 'onVisibilityChange', 'onResizeChange', 'onReorderChange', 'onPinChange', 'onHistoryChange', 'onActivecellChange', 'onRangeChange', 'onCellEditCommit', 'onRowEditCommit']);
|
|
565
565
|
const resolved = () => local.children;
|
|
566
566
|
onMount(() => { local.ref?.({ sortColumn, clearSorting, toggleRowExpanded, expandAll, collapseAll, getExpandedRows, applyGrouping, clearGrouping, getFacetedUniqueValues, getFacetedMinMaxValues, getColumnDefs, toggleAllRows, clearSelection, getSelectedRows, setPage, setRowsPerPage, toggleColumnVisibility, applyColumnOrder, resetColumnSizing, pinColumn, focusCell, getActiveCell, clearActiveCell, getRowIndexRelativeToPage, editCell, commitEditing, editRow, getSelectedRange, cut, undo, redo, canUndo, canRedo, clearHistory }); });
|
|
567
567
|
|
package/src/themes/base.css
CHANGED
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
*/
|
|
25
25
|
.rozie-data-table-wrap,
|
|
26
26
|
.rozie-data-table {
|
|
27
|
+
/* NOTE (see file-head comment): most of the tokens below are declared but
|
|
28
|
+
never read via a CSS var() inside THIS component's own scoped <style> —
|
|
29
|
+
that is by design. This is the public surface; the "Wire the PUBLIC
|
|
30
|
+
tokens..." block further down assigns each one onto the short internal
|
|
31
|
+
--rdt-* custom property the component actually reads. A future audit
|
|
32
|
+
must not delete these as dead — they are the intended public API. */
|
|
33
|
+
|
|
27
34
|
/* ── palette (the few values most consumers will set) ───────────────────── */
|
|
28
35
|
--rozie-data-table-fg: inherit;
|
|
29
36
|
--rozie-data-table-accent: #0066cc;
|
|
@@ -62,6 +69,14 @@
|
|
|
62
69
|
/* ── disabled pagination controls ──────────────────────────────────────── */
|
|
63
70
|
--rozie-data-table-disabled-opacity: 0.4;
|
|
64
71
|
|
|
72
|
+
/* ── virtual scroll (row windowing, req-3/D-06) ─────────────────────────── */
|
|
73
|
+
/* Read with NO fallback at its one use site (`max-height: var(--rozie-data-table-max-height);`
|
|
74
|
+
on `.rdt-scroll`) — when unset the property is invalid at computed-value
|
|
75
|
+
time and the rule behaves as if `max-height` were never declared there,
|
|
76
|
+
i.e. `none` (unbounded). Declaring `none` here is the render-neutral
|
|
77
|
+
equivalent of that unset behavior, made explicit and overridable. */
|
|
78
|
+
--rozie-data-table-max-height: none;
|
|
79
|
+
|
|
65
80
|
/* ─────────────────────────────────────────────────────────────────────────
|
|
66
81
|
* Wire the PUBLIC tokens onto the INTERNAL `--rdt-*` the component reads. A
|
|
67
82
|
* bridge only needs to remap the public tokens above; these passthroughs do
|