@rozie-ui/data-table-solid 0.3.2 → 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/README.md +51 -2
- package/dist/index.cjs +175 -90
- package/dist/index.d.cts +40 -11
- package/dist/index.d.mts +40 -11
- package/dist/index.mjs +175 -90
- package/package.json +2 -2
- package/src/DataTable.tsx +177 -102
package/README.md
CHANGED
|
@@ -399,6 +399,47 @@ export function Demo() {
|
|
|
399
399
|
}
|
|
400
400
|
```
|
|
401
401
|
|
|
402
|
+
### Per-column slot families (`cell-<id>` / `colHeader-<id>` / `filter-<id>` / `editor-<id>`)
|
|
403
|
+
|
|
404
|
+
```tsx
|
|
405
|
+
import { DataTable, Column } from '@rozie-ui/data-table-solid';
|
|
406
|
+
|
|
407
|
+
export function Demo() {
|
|
408
|
+
// A family fill is a STATIC per-column override — the additive `slots` record prop,
|
|
409
|
+
// NOT an extension of cellSlot/colHeaderSlot/filterSlot/editorSlot. Precedence per
|
|
410
|
+
// seam: slots['<seam>-<id>'] → the generic <seam>Slot prop → the built-in render.
|
|
411
|
+
// editor-<id> only reaches a column declared editor="custom"; filter-<id> only reaches
|
|
412
|
+
// a column declared filterable (shown on `category` below); cell-<id> / colHeader-<id>
|
|
413
|
+
// have no gate. A misspelled key silently no-ops — it typechecks (a trailing catch-all
|
|
414
|
+
// index signature) but is never invoked.
|
|
415
|
+
const rows = [
|
|
416
|
+
{ id: 1, name: 'Alpha', category: 'Hardware', price: 30 },
|
|
417
|
+
{ id: 2, name: 'Beta', category: 'Software', price: 90 },
|
|
418
|
+
{ id: 3, name: 'Gamma', category: 'Hardware', price: 10 },
|
|
419
|
+
{ id: 4, name: 'Delta', category: 'Service', price: 50 },
|
|
420
|
+
];
|
|
421
|
+
return (
|
|
422
|
+
<DataTable
|
|
423
|
+
data={rows}
|
|
424
|
+
slots={{
|
|
425
|
+
'cell-price': ({ value }) => <>💲 {value}</>,
|
|
426
|
+
'colHeader-price': ({ label }) => <>🏷️ {label}</>,
|
|
427
|
+
'filter-category': ({ columnId, uniqueValues, setFilter }) => (
|
|
428
|
+
<select onChange={(e) => setFilter(columnId, e.currentTarget.value || null)}>
|
|
429
|
+
<option value="">All</option>
|
|
430
|
+
{uniqueValues.map((v) => <option value={String(v)}>{String(v)}</option>)}
|
|
431
|
+
</select>
|
|
432
|
+
),
|
|
433
|
+
}}
|
|
434
|
+
>
|
|
435
|
+
<Column field="name" header="Name" />
|
|
436
|
+
<Column field="category" header="Category" filterable />
|
|
437
|
+
<Column field="price" header="Price" />
|
|
438
|
+
</DataTable>
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
```
|
|
442
|
+
|
|
402
443
|
## Theming
|
|
403
444
|
|
|
404
445
|
Every visual value is a `--rozie-data-table-*` CSS custom property — override any of them at any ancestor scope. Ready-made design-system bridges ship in the package (import `base.css` first, then a bridge):
|
|
@@ -523,14 +564,22 @@ All rendering slots live on the parent `<DataTable>` (a `<Column>` carries metad
|
|
|
523
564
|
|
|
524
565
|
The `detail` (expandable rows), `groupBar` (grouping) and `filter` (faceted filtering) scoped slots follow the SAME render-prop convention: on React they are `renderDetail` / `renderGroupBar` / `renderFilter`; on Solid they are `detailSlot` / `groupBarSlot` / `filterSlot`; on Lit they are the `.detail` / `.groupBar` / `.filter` properties — the documented React render-prop edge (per the cross-framework compatibility bar). On Vue / Svelte / Angular they are ordinary named scoped slots (`#detail` / `#groupBar` / `#filter`). The `groupBar` and `filter` slots are HEADLESS — the component ships NO built-in group-bar / facet control, so the consumer builds the UI purely from the exposed slot props.
|
|
525
566
|
|
|
567
|
+
`cell`, `colHeader`, `filter` and `editor` each also have a **per-column slot family** — a statically-named fill per `columnId` (`cell-price`, `colHeader-price`, `filter-category`, `editor-score`, …) that takes precedence OVER the matching generic slot above it: `<seam>-<id>` → the generic `<seam>` slot → the built-in render. `editor-<id>` (and `editor`) only render on a column declared `editor="custom"`; `filter-<id>` (and `filter`) only render on a column declared `filterable`; `cell-<id>` / `colHeader-<id>` have no gate. The auto-injected row-select / row-expander chrome columns never reach any family — they are excluded structurally. On Solid the family is the additive **`slots`** record prop — `slots={{ 'cell-price': (ctx) => … }}` — keyed by the exact `<seam>-<id>` string.
|
|
568
|
+
|
|
569
|
+
A misspelled family key does not fail to compile — the emitted type carries a trailing catch-all index signature alongside the templated key, so it typechecks but is simply never invoked. See the "Per-column slot families" example in Usage above for the full per-target syntax.
|
|
570
|
+
|
|
526
571
|
| Slot | Params |
|
|
527
572
|
| --- | --- |
|
|
528
573
|
| (default) | |
|
|
529
574
|
| groupBar | grouping, groupableColumns, applyGrouping, clearGrouping |
|
|
530
575
|
| selectAll | checked, indeterminate, toggle |
|
|
576
|
+
| colHeader-<id> | columnId, column, label |
|
|
577
|
+
| filter-<id> | columnId, value, uniqueValues, minMax, setFilter |
|
|
578
|
+
| selectCell | row, checked, toggle |
|
|
579
|
+
| cell-<id> | columnId, column, row, value |
|
|
580
|
+
| editor-<id> | columnId, column, row, value, commit, cancel, autofocus |
|
|
581
|
+
| detail | row |
|
|
531
582
|
| colHeader | columnId, column, label |
|
|
532
583
|
| filter | columnId, value, uniqueValues, minMax, setFilter |
|
|
533
|
-
| selectCell | row, checked, toggle |
|
|
534
584
|
| cell | columnId, column, row, value |
|
|
535
585
|
| editor | columnId, column, row, value, commit, cancel, autofocus |
|
|
536
|
-
| detail | row |
|
package/dist/index.cjs
CHANGED
|
@@ -1757,12 +1757,6 @@ function DataTable(_props) {
|
|
|
1757
1757
|
const m = editMetaOf(colId);
|
|
1758
1758
|
return m && m.editorOptions != null ? m.editorOptions : [];
|
|
1759
1759
|
}
|
|
1760
|
-
function hasEditorSlot(colId) {
|
|
1761
|
-
return editorTypeOf(colId) === "custom" && !!(_props.editorSlot ?? _props.slots?.["editor"]);
|
|
1762
|
-
}
|
|
1763
|
-
function hasFilterSlot() {
|
|
1764
|
-
return !!(_props.filterSlot ?? _props.slots?.["filter"]);
|
|
1765
|
-
}
|
|
1766
1760
|
function columnIsFilterable(colId) {
|
|
1767
1761
|
const d = defFor(colId);
|
|
1768
1762
|
return !!(d && d.filterable);
|
|
@@ -1771,11 +1765,9 @@ function DataTable(_props) {
|
|
|
1771
1765
|
const d = defFor(colId);
|
|
1772
1766
|
return d ? d.header : colId;
|
|
1773
1767
|
}
|
|
1774
|
-
function headerWidth(
|
|
1775
|
-
if (tick() < 0 || !
|
|
1776
|
-
const
|
|
1777
|
-
if (!col) return null;
|
|
1778
|
-
const w = col.getSize();
|
|
1768
|
+
function headerWidth(header) {
|
|
1769
|
+
if (tick() < 0 || !header || typeof header.getSize !== "function") return null;
|
|
1770
|
+
const w = header.getSize();
|
|
1779
1771
|
return w != null && w > 0 ? w + "px" : null;
|
|
1780
1772
|
}
|
|
1781
1773
|
function onResizeStart(colId, evt) {
|
|
@@ -1839,11 +1831,11 @@ function DataTable(_props) {
|
|
|
1839
1831
|
if (side === "right") return "position:sticky;right:" + (col.getAfter ? col.getAfter("right") : 0) + "px;z-index:" + zIndex + ";";
|
|
1840
1832
|
return "";
|
|
1841
1833
|
}
|
|
1842
|
-
function thStyle(
|
|
1834
|
+
function thStyle(header) {
|
|
1843
1835
|
let s = "";
|
|
1844
|
-
const w = headerWidth(
|
|
1836
|
+
const w = headerWidth(header);
|
|
1845
1837
|
if (w) s += "width:" + w + ";";
|
|
1846
|
-
s += pinStyle(
|
|
1838
|
+
s += pinStyle(header && header.column ? header.column.id : null, 2);
|
|
1847
1839
|
return s;
|
|
1848
1840
|
}
|
|
1849
1841
|
function onGlobalFilterInput(evt) {
|
|
@@ -3199,8 +3191,9 @@ function DataTable(_props) {
|
|
|
3199
3191
|
fillEdgeScrollRaf = null;
|
|
3200
3192
|
}
|
|
3201
3193
|
}
|
|
3202
|
-
|
|
3203
|
-
|
|
3194
|
+
const FILL_HITTEST_PROBE_RADIUS_PX = 8;
|
|
3195
|
+
const FILL_HITTEST_PROBE_STEP_PX = 2;
|
|
3196
|
+
function resolveCellAt(clientX, clientY) {
|
|
3204
3197
|
let el = document.elementFromPoint(clientX, clientY);
|
|
3205
3198
|
while (el && el.shadowRoot && el.shadowRoot.elementFromPoint) {
|
|
3206
3199
|
const inner = el.shadowRoot.elementFromPoint(clientX, clientY);
|
|
@@ -3221,6 +3214,18 @@ function DataTable(_props) {
|
|
|
3221
3214
|
c
|
|
3222
3215
|
};
|
|
3223
3216
|
}
|
|
3217
|
+
function cellIndexFromPoint(clientX, clientY) {
|
|
3218
|
+
if (typeof document === "undefined" || !document.elementFromPoint) return null;
|
|
3219
|
+
const direct = resolveCellAt(clientX, clientY);
|
|
3220
|
+
if (direct) return direct;
|
|
3221
|
+
for (let d = FILL_HITTEST_PROBE_STEP_PX; d <= FILL_HITTEST_PROBE_RADIUS_PX; d += FILL_HITTEST_PROBE_STEP_PX) {
|
|
3222
|
+
const right = resolveCellAt(clientX + d, clientY);
|
|
3223
|
+
if (right) return right;
|
|
3224
|
+
const left = resolveCellAt(clientX - d, clientY);
|
|
3225
|
+
if (left) return left;
|
|
3226
|
+
}
|
|
3227
|
+
return null;
|
|
3228
|
+
}
|
|
3224
3229
|
function onFillHandlePointerDown(e) {
|
|
3225
3230
|
if (!e) return;
|
|
3226
3231
|
if (e.preventDefault) e.preventDefault();
|
|
@@ -3393,12 +3398,24 @@ function DataTable(_props) {
|
|
|
3393
3398
|
const row = (rows() || [])[editingRow()];
|
|
3394
3399
|
return row ? row.id : null;
|
|
3395
3400
|
}
|
|
3396
|
-
function
|
|
3401
|
+
function resolveEditFocusCellEl(rowIndex, colIndex) {
|
|
3402
|
+
if (rowIndex == null || colIndex == null || rowIndex < 0 || colIndex < 0) return null;
|
|
3403
|
+
return resolveCellEl(String(rowIndex), colIndex);
|
|
3404
|
+
}
|
|
3405
|
+
function focusEditorWhenReady(rowIndex, colIndex, selectAll = true) {
|
|
3397
3406
|
if (!gridRoot) return;
|
|
3398
|
-
if (editFocusColId() != null && hasEditorSlot(editFocusColId())) return;
|
|
3399
3407
|
let attempts = 0;
|
|
3400
3408
|
const tryFocus = () => {
|
|
3401
|
-
const
|
|
3409
|
+
const cellEl = resolveEditFocusCellEl(rowIndex, colIndex);
|
|
3410
|
+
const el = cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell][data-builtin-editor]") : null;
|
|
3411
|
+
if (!el) {
|
|
3412
|
+
if (cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell]") : null) return;
|
|
3413
|
+
attempts = attempts + 1;
|
|
3414
|
+
if (attempts >= 30) return;
|
|
3415
|
+
if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
|
|
3416
|
+
else setTimeout(tryFocus, 16);
|
|
3417
|
+
return;
|
|
3418
|
+
}
|
|
3402
3419
|
const ae = gridRoot && gridRoot.getRootNode ? gridRoot.getRootNode().activeElement : null;
|
|
3403
3420
|
if (ae && el && ae !== el && ae.closest && gridRoot.contains(ae) && ae.hasAttribute && ae.hasAttribute("data-editing-cell")) {
|
|
3404
3421
|
const aeCell = ae.closest("[data-grid-cell]");
|
|
@@ -3407,17 +3424,10 @@ function DataTable(_props) {
|
|
|
3407
3424
|
const elCol = elCell ? elCell.getAttribute("data-col-index") : null;
|
|
3408
3425
|
if (aeCol != null && aeCol !== elCol) return;
|
|
3409
3426
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
} catch (e) {}
|
|
3415
|
-
return;
|
|
3416
|
-
}
|
|
3417
|
-
attempts = attempts + 1;
|
|
3418
|
-
if (attempts >= 30) return;
|
|
3419
|
-
if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
|
|
3420
|
-
else setTimeout(tryFocus, 16);
|
|
3427
|
+
el.focus();
|
|
3428
|
+
if (selectAll && el.select) try {
|
|
3429
|
+
el.select();
|
|
3430
|
+
} catch (e) {}
|
|
3421
3431
|
};
|
|
3422
3432
|
if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
|
|
3423
3433
|
else setTimeout(tryFocus, 0);
|
|
@@ -3448,7 +3458,7 @@ function DataTable(_props) {
|
|
|
3448
3458
|
setActiveInControl(true);
|
|
3449
3459
|
setEditVer(editVer() + 1);
|
|
3450
3460
|
setEditFocusColId(colId);
|
|
3451
|
-
focusEditorWhenReady(seed == null);
|
|
3461
|
+
focusEditorWhenReady(rowIndex, colIndex, seed == null);
|
|
3452
3462
|
}
|
|
3453
3463
|
function focusCellWhenReady(row, col) {
|
|
3454
3464
|
if (!gridRoot) return;
|
|
@@ -3516,7 +3526,7 @@ function DataTable(_props) {
|
|
|
3516
3526
|
const err = runValidator(colId, newValue, rowOriginal);
|
|
3517
3527
|
if (err !== true) {
|
|
3518
3528
|
setInvalid(err);
|
|
3519
|
-
focusEditorWhenReady();
|
|
3529
|
+
focusEditorWhenReady(editingRow(), editingCol());
|
|
3520
3530
|
return false;
|
|
3521
3531
|
}
|
|
3522
3532
|
setInvalid("");
|
|
@@ -3609,12 +3619,10 @@ function DataTable(_props) {
|
|
|
3609
3619
|
}
|
|
3610
3620
|
function focusRowEditorAt(rowIndex, colIndex) {
|
|
3611
3621
|
if (!gridRoot) return;
|
|
3612
|
-
const colId = columnIdAt(rowIndex, colIndex);
|
|
3613
|
-
if (colId != null && hasEditorSlot(colId)) return;
|
|
3614
3622
|
let attempts = 0;
|
|
3615
3623
|
const tryFocus = () => {
|
|
3616
3624
|
const cellEl = resolveCellEl(String(rowIndex), colIndex);
|
|
3617
|
-
const ed = cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell]") : null;
|
|
3625
|
+
const ed = cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell][data-builtin-editor]") : null;
|
|
3618
3626
|
if (ed) {
|
|
3619
3627
|
ed.focus();
|
|
3620
3628
|
if (ed.select) try {
|
|
@@ -3622,6 +3630,7 @@ function DataTable(_props) {
|
|
|
3622
3630
|
} catch (e) {}
|
|
3623
3631
|
return;
|
|
3624
3632
|
}
|
|
3633
|
+
if (cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell]") : null) return;
|
|
3625
3634
|
attempts = attempts + 1;
|
|
3626
3635
|
if (attempts >= 30) return;
|
|
3627
3636
|
if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
|
|
@@ -3653,7 +3662,7 @@ function DataTable(_props) {
|
|
|
3653
3662
|
setActiveInControl(true);
|
|
3654
3663
|
setEditVer(editVer() + 1);
|
|
3655
3664
|
setEditFocusColId(editable[0].colId);
|
|
3656
|
-
focusEditorWhenReady();
|
|
3665
|
+
focusEditorWhenReady(rowIndex, editable[0].colIndex);
|
|
3657
3666
|
}
|
|
3658
3667
|
function commitRow() {
|
|
3659
3668
|
if (editingRowIndex() == null) return false;
|
|
@@ -4130,14 +4139,18 @@ function DataTable(_props) {
|
|
|
4130
4139
|
"rdt-expander-th": isExpanderColumn(header().column.id),
|
|
4131
4140
|
"rdt-th-resizing": columnIsResizing(header().column.id),
|
|
4132
4141
|
"rdt-cell-active": isActiveCell("__header", headerColIndexOf(hg(), header()), hgLevel())
|
|
4133
|
-
})} role="columnheader" data-col={(0, _rozie_runtime_solid.rozieAttr)(header().column.id)} data-grid-cell="" data-row="__header" data-header-level={(0, _rozie_runtime_solid.rozieAttr)(hgLevel())} colSpan={(0, _rozie_runtime_solid.rozieAttr)(header().colSpan > 1 ? header().colSpan : null)} data-col-index={(0, _rozie_runtime_solid.rozieAttr)(headerColIndexOf(hg(), header()))} tabIndex={(0, _rozie_runtime_solid.rozieAttr)(cellTabindex("__header", headerColIndexOf(hg(), header()), hgLevel()))} aria-sort={(0, _rozie_runtime_solid.rozieAttr)(ariaSortFor(header().column.id))} style={(0, _rozie_runtime_solid.parseInlineStyle)(thStyle(header()
|
|
4142
|
+
})} role="columnheader" data-col={(0, _rozie_runtime_solid.rozieAttr)(header().column.id)} data-grid-cell="" data-row="__header" data-header-level={(0, _rozie_runtime_solid.rozieAttr)(hgLevel())} colSpan={(0, _rozie_runtime_solid.rozieAttr)(header().colSpan > 1 ? header().colSpan : null)} data-col-index={(0, _rozie_runtime_solid.rozieAttr)(headerColIndexOf(hg(), header()))} tabIndex={(0, _rozie_runtime_solid.rozieAttr)(cellTabindex("__header", headerColIndexOf(hg(), header()), hgLevel()))} aria-sort={(0, _rozie_runtime_solid.rozieAttr)(ariaSortFor(header().column.id))} style={(0, _rozie_runtime_solid.parseInlineStyle)(thStyle(header()))} data-rozie-s-d5dcab4c="">
|
|
4134
4143
|
|
|
4135
4144
|
|
|
4136
4145
|
{<Solid_js.Show when={isSelectColumn(header().column.id)} fallback={<Solid_js.Show when={isExpanderColumn(header().column.id)} fallback={<span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4137
4146
|
|
|
4138
4147
|
{<Solid_js.Show when={header().column.getCanSort && header().column.getCanSort()} fallback={<span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4139
4148
|
<span class={"rdt-header-label"} data-rozie-s-d5dcab4c="">
|
|
4140
|
-
{
|
|
4149
|
+
{_props.slots?.[`colHeader-${header().column.id}`]?.({
|
|
4150
|
+
columnId: header().column.id,
|
|
4151
|
+
column: header().column,
|
|
4152
|
+
label: headerLabel(header().column.id)
|
|
4153
|
+
}) ?? (_props.colHeaderSlot ?? _props.slots?.["colHeader"])?.({
|
|
4141
4154
|
columnId: header().column.id,
|
|
4142
4155
|
column: header().column,
|
|
4143
4156
|
label: headerLabel(header().column.id)
|
|
@@ -4148,7 +4161,11 @@ function DataTable(_props) {
|
|
|
4148
4161
|
}} data-rozie-s-d5dcab4c="">
|
|
4149
4162
|
|
|
4150
4163
|
<span class={"rdt-header-label"} data-rozie-s-d5dcab4c="">
|
|
4151
|
-
{
|
|
4164
|
+
{_props.slots?.[`colHeader-${header().column.id}`]?.({
|
|
4165
|
+
columnId: header().column.id,
|
|
4166
|
+
column: header().column,
|
|
4167
|
+
label: headerLabel(header().column.id)
|
|
4168
|
+
}) ?? (_props.colHeaderSlot ?? _props.slots?.["colHeader"])?.({
|
|
4152
4169
|
columnId: header().column.id,
|
|
4153
4170
|
column: header().column,
|
|
4154
4171
|
label: headerLabel(header().column.id)
|
|
@@ -4192,18 +4209,24 @@ function DataTable(_props) {
|
|
|
4192
4209
|
{<Solid_js.Show when={hasAnyFilterableColumn()}><tr class={"rdt-filter-row"} data-rozie-s-d5dcab4c="">
|
|
4193
4210
|
<_solid_primitives_keyed.Key each={headerGroups()[headerGroups().length - 1].headers} by={(header) => header.id}>{(header) => <th class={"rdt-filter-cell"} role="presentation" style={(0, _rozie_runtime_solid.parseInlineStyle)(pinStyle(header().column.id))} data-rozie-s-d5dcab4c="">
|
|
4194
4211
|
{<Solid_js.Show when={isSelectColumn(header().column.id)} fallback={<Solid_js.Show when={isExpanderColumn(header().column.id)} fallback={<span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4195
|
-
{<Solid_js.Show when={columnIsFilterable(header().column.id)
|
|
4196
|
-
|
|
4197
|
-
}} onClick={($event) => {
|
|
4198
|
-
stopEvent($event);
|
|
4199
|
-
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}{<Solid_js.Show when={columnIsFilterable(header().column.id)}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4200
|
-
{(_props.filterSlot ?? _props.slots?.["filter"])?.({
|
|
4212
|
+
{<Solid_js.Show when={columnIsFilterable(header().column.id)}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4213
|
+
{_props.slots?.[`filter-${header().column.id}`]?.({
|
|
4201
4214
|
columnId: header().column.id,
|
|
4202
4215
|
value: columnFilterValue(header().column.id),
|
|
4203
4216
|
uniqueValues: getFacetedUniqueValues(header().column.id),
|
|
4204
4217
|
minMax: getFacetedMinMaxValues(header().column.id),
|
|
4205
4218
|
setFilter: setColumnFilter
|
|
4206
|
-
})
|
|
4219
|
+
}) ?? (_props.filterSlot ?? _props.slots?.["filter"])?.({
|
|
4220
|
+
columnId: header().column.id,
|
|
4221
|
+
value: columnFilterValue(header().column.id),
|
|
4222
|
+
uniqueValues: getFacetedUniqueValues(header().column.id),
|
|
4223
|
+
minMax: getFacetedMinMaxValues(header().column.id),
|
|
4224
|
+
setFilter: setColumnFilter
|
|
4225
|
+
}) ?? <input type="text" aria-label={(0, _rozie_runtime_solid.rozieAttr)("Filter " + headerLabel(header().column.id))} class={"rdt-col-filter"} value={columnFilterValue(header().column.id)} onInput={($event) => {
|
|
4226
|
+
onColumnFilterInput(header().column.id, $event);
|
|
4227
|
+
}} onClick={($event) => {
|
|
4228
|
+
stopEvent($event);
|
|
4229
|
+
}} data-rozie-s-d5dcab4c="" />}
|
|
4207
4230
|
</span></Solid_js.Show>}</span>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}</th>}</_solid_primitives_keyed.Key>
|
|
4208
4231
|
</tr></Solid_js.Show>}</thead>
|
|
4209
4232
|
|
|
@@ -4219,26 +4242,55 @@ function DataTable(_props) {
|
|
|
4219
4242
|
})} role={(0, _rozie_runtime_solid.rozieAttr)(cellRole())} data-col={(0, _rozie_runtime_solid.rozieAttr)(cell().column.id)} data-grid-cell="" data-row={(0, _rozie_runtime_solid.rozieAttr)(rowIndexOf(row()))} data-col-index={(0, _rozie_runtime_solid.rozieAttr)(colIndexOf(row(), cell()))} tabIndex={(0, _rozie_runtime_solid.rozieAttr)(cellTabindex(String(rowIndexOf(row())), colIndexOf(row(), cell())))} style={(0, _rozie_runtime_solid.parseInlineStyle)(bodyCellStyle(row(), cell().column.id))} aria-invalid={(0, _rozie_runtime_solid.rozieAttr)(cellAriaInvalid(rowIndexOf(row()), colIndexOf(row(), cell())))} data-in-range={(0, _rozie_runtime_solid.rozieAttr)(inRange(rowIndexOf(row()), colIndexOf(row(), cell())) ? "true" : null)} data-agg-cell={(0, _rozie_runtime_solid.rozieAttr)(cellIsAggregated(cell()) ? cell().column.id : null)} data-rozie-s-d5dcab4c="">
|
|
4220
4243
|
|
|
4221
4244
|
{<Solid_js.Show when={isExpanderColumn(cell().column.id)} fallback={<Solid_js.Show when={isSelectColumn(cell().column.id)} fallback={<Solid_js.Show when={cellIsGrouped(cell())} fallback={<Solid_js.Show when={isEditing(rowIndexOf(row()), colIndexOf(row(), cell()))} fallback={<Solid_js.Show when={cellIsPlaceholder(cell())} fallback={<span class={"rdt-cell-value"} data-rozie-s-d5dcab4c="">
|
|
4222
|
-
{
|
|
4245
|
+
{_props.slots?.[`cell-${cell().column.id}`]?.({
|
|
4246
|
+
columnId: cell().column.id,
|
|
4247
|
+
column: cell().column,
|
|
4248
|
+
row: cellSlotRow(row()),
|
|
4249
|
+
value: cell().getValue()
|
|
4250
|
+
}) ?? (_props.cellSlot ?? _props.slots?.["cell"])?.({
|
|
4223
4251
|
columnId: cell().column.id,
|
|
4224
4252
|
column: cell().column,
|
|
4225
4253
|
row: cellSlotRow(row()),
|
|
4226
4254
|
value: cell().getValue()
|
|
4227
4255
|
}) ?? (0, _rozie_runtime_solid.rozieDisplay)(cell().getValue())}
|
|
4228
4256
|
</span>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4229
|
-
{<Solid_js.Show when={
|
|
4257
|
+
{<Solid_js.Show when={editorTypeOf(cell().column.id) === "number"} fallback={<Solid_js.Show when={editorTypeOf(cell().column.id) === "select"} fallback={<Solid_js.Show when={editorTypeOf(cell().column.id) === "checkbox"} fallback={<Solid_js.Show when={editorTypeOf(cell().column.id) === "custom"} fallback={<input type="text" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4258
|
+
onCellEditorInput(cell().column.id, $event);
|
|
4259
|
+
}} onKeyDown={($event) => {
|
|
4260
|
+
onEditorKeyDown($event);
|
|
4261
|
+
}} onBlur={($event) => {
|
|
4262
|
+
onEditorBlur($event);
|
|
4263
|
+
}} data-rozie-s-d5dcab4c="" />}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4264
|
+
{_props.slots?.[`editor-${cell().column.id}`]?.({
|
|
4265
|
+
columnId: cell().column.id,
|
|
4266
|
+
column: cell().column,
|
|
4267
|
+
row: cellSlotRow(row()),
|
|
4268
|
+
value: editorValueFor(cell().column.id),
|
|
4269
|
+
commit: editorCommitFor(cell().column.id),
|
|
4270
|
+
cancel: editorCancelFor(),
|
|
4271
|
+
autofocus: editorAutofocusFor(cell().column.id, rowIndexOf(row()))
|
|
4272
|
+
}) ?? (_props.editorSlot ?? _props.slots?.["editor"])?.({
|
|
4273
|
+
columnId: cell().column.id,
|
|
4274
|
+
column: cell().column,
|
|
4275
|
+
row: cellSlotRow(row()),
|
|
4276
|
+
value: editorValueFor(cell().column.id),
|
|
4277
|
+
commit: editorCommitFor(cell().column.id),
|
|
4278
|
+
cancel: editorCancelFor(),
|
|
4279
|
+
autofocus: editorAutofocusFor(cell().column.id, rowIndexOf(row()))
|
|
4280
|
+
}) ?? <input type="text" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4230
4281
|
onCellEditorInput(cell().column.id, $event);
|
|
4231
4282
|
}} onKeyDown={($event) => {
|
|
4232
4283
|
onEditorKeyDown($event);
|
|
4233
4284
|
}} onBlur={($event) => {
|
|
4234
4285
|
onEditorBlur($event);
|
|
4235
|
-
}} data-rozie-s-d5dcab4c="" />}
|
|
4286
|
+
}} data-rozie-s-d5dcab4c="" />}
|
|
4287
|
+
</span></Solid_js.Show>}><input type="checkbox" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} checked={editorCheckedFor(cell().column.id)} onChange={($event) => {
|
|
4236
4288
|
onCellEditorCheckbox(cell().column.id, $event);
|
|
4237
4289
|
}} onKeyDown={($event) => {
|
|
4238
4290
|
onEditorKeyDown($event);
|
|
4239
4291
|
}} onBlur={($event) => {
|
|
4240
4292
|
onEditorBlur($event);
|
|
4241
|
-
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><select data-editing-cell="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onChange={($event) => {
|
|
4293
|
+
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><select data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onChange={($event) => {
|
|
4242
4294
|
onCellEditorInput(cell().column.id, $event);
|
|
4243
4295
|
}} onKeyDown={($event) => {
|
|
4244
4296
|
onEditorKeyDown($event);
|
|
@@ -4246,28 +4298,23 @@ function DataTable(_props) {
|
|
|
4246
4298
|
onEditorBlur($event);
|
|
4247
4299
|
}} data-rozie-s-d5dcab4c="">
|
|
4248
4300
|
<_solid_primitives_keyed.Key each={editorOptionsOf(cell().column.id)} by={(opt) => opt.value}>{(opt) => <option value={(0, _rozie_runtime_solid.rozieAttr)(opt().value)} data-rozie-s-d5dcab4c="">{(0, _rozie_runtime_solid.rozieDisplay)(opt().label)}</option>}</_solid_primitives_keyed.Key>
|
|
4249
|
-
</select></Solid_js.Show>}><input type="number" data-editing-cell="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4301
|
+
</select></Solid_js.Show>}><input type="number" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4250
4302
|
onCellEditorInput(cell().column.id, $event);
|
|
4251
4303
|
}} onKeyDown={($event) => {
|
|
4252
4304
|
onEditorKeyDown($event);
|
|
4253
4305
|
}} onBlur={($event) => {
|
|
4254
4306
|
onEditorBlur($event);
|
|
4255
|
-
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4256
|
-
{(_props.editorSlot ?? _props.slots?.["editor"])?.({
|
|
4257
|
-
columnId: cell().column.id,
|
|
4258
|
-
column: cell().column,
|
|
4259
|
-
row: cellSlotRow(row()),
|
|
4260
|
-
value: editorValueFor(cell().column.id),
|
|
4261
|
-
commit: editorCommitFor(cell().column.id),
|
|
4262
|
-
cancel: editorCancelFor(),
|
|
4263
|
-
autofocus: editorAutofocusFor(cell().column.id, rowIndexOf(row()))
|
|
4264
|
-
})}
|
|
4265
|
-
</span></Solid_js.Show>}</span></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4307
|
+
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}</span></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4266
4308
|
<button type="button" data-expander="" aria-expanded={!!rowIsExpanded(row())} aria-label={(0, _rozie_runtime_solid.rozieAttr)(rowIsExpanded(row()) ? "Collapse group" : "Expand group")} class={"rdt-expander rdt-group-toggle"} onClick={($event) => {
|
|
4267
4309
|
onToggleExpand(row(), $event);
|
|
4268
4310
|
}} data-rozie-s-d5dcab4c="">{(0, _rozie_runtime_solid.rozieDisplay)(rowIsExpanded(row()) ? "▾" : "▸")}</button>
|
|
4269
4311
|
<span class={"rdt-group-value"} data-rozie-s-d5dcab4c="">
|
|
4270
|
-
{
|
|
4312
|
+
{_props.slots?.[`cell-${cell().column.id}`]?.({
|
|
4313
|
+
columnId: cell().column.id,
|
|
4314
|
+
column: cell().column,
|
|
4315
|
+
row: cellSlotRow(row()),
|
|
4316
|
+
value: cell().getValue()
|
|
4317
|
+
}) ?? (_props.cellSlot ?? _props.slots?.["cell"])?.({
|
|
4271
4318
|
columnId: cell().column.id,
|
|
4272
4319
|
column: cell().column,
|
|
4273
4320
|
row: cellSlotRow(row()),
|
|
@@ -4322,11 +4369,15 @@ function DataTable(_props) {
|
|
|
4322
4369
|
"rdt-expander-th": isExpanderColumn(wh().header.column.id),
|
|
4323
4370
|
"rdt-th-resizing": columnIsResizing(wh().header.column.id),
|
|
4324
4371
|
"rdt-cell-active": isActiveCell("__header", headerColIndexOf(hg(), wh().header), hgLevel())
|
|
4325
|
-
})} role="columnheader" data-col={(0, _rozie_runtime_solid.rozieAttr)(wh().header.column.id)} data-grid-cell="" data-row="__header" data-header-level={(0, _rozie_runtime_solid.rozieAttr)(hgLevel())} colSpan={(0, _rozie_runtime_solid.rozieAttr)(wh().span > 1 ? wh().span : null)} data-col-index={(0, _rozie_runtime_solid.rozieAttr)(headerColIndexOf(hg(), wh().header))} tabIndex={(0, _rozie_runtime_solid.rozieAttr)(cellTabindex("__header", headerColIndexOf(hg(), wh().header), hgLevel()))} aria-sort={(0, _rozie_runtime_solid.rozieAttr)(ariaSortFor(wh().header.column.id))} style={(0, _rozie_runtime_solid.parseInlineStyle)(thStyle(wh().header
|
|
4372
|
+
})} role="columnheader" data-col={(0, _rozie_runtime_solid.rozieAttr)(wh().header.column.id)} data-grid-cell="" data-row="__header" data-header-level={(0, _rozie_runtime_solid.rozieAttr)(hgLevel())} colSpan={(0, _rozie_runtime_solid.rozieAttr)(wh().span > 1 ? wh().span : null)} data-col-index={(0, _rozie_runtime_solid.rozieAttr)(headerColIndexOf(hg(), wh().header))} tabIndex={(0, _rozie_runtime_solid.rozieAttr)(cellTabindex("__header", headerColIndexOf(hg(), wh().header), hgLevel()))} aria-sort={(0, _rozie_runtime_solid.rozieAttr)(ariaSortFor(wh().header.column.id))} style={(0, _rozie_runtime_solid.parseInlineStyle)(thStyle(wh().header))} data-rozie-s-d5dcab4c="">
|
|
4326
4373
|
{<Solid_js.Show when={isSelectColumn(wh().header.column.id)} fallback={<Solid_js.Show when={isExpanderColumn(wh().header.column.id)} fallback={<span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4327
4374
|
{<Solid_js.Show when={wh().header.column.getCanSort && wh().header.column.getCanSort()} fallback={<span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4328
4375
|
<span class={"rdt-header-label"} data-rozie-s-d5dcab4c="">
|
|
4329
|
-
{
|
|
4376
|
+
{_props.slots?.[`colHeader-${wh().header.column.id}`]?.({
|
|
4377
|
+
columnId: wh().header.column.id,
|
|
4378
|
+
column: wh().header.column,
|
|
4379
|
+
label: headerLabel(wh().header.column.id)
|
|
4380
|
+
}) ?? (_props.colHeaderSlot ?? _props.slots?.["colHeader"])?.({
|
|
4330
4381
|
columnId: wh().header.column.id,
|
|
4331
4382
|
column: wh().header.column,
|
|
4332
4383
|
label: headerLabel(wh().header.column.id)
|
|
@@ -4336,7 +4387,11 @@ function DataTable(_props) {
|
|
|
4336
4387
|
onHeaderSort(wh().header.column.id, $event);
|
|
4337
4388
|
}} data-rozie-s-d5dcab4c="">
|
|
4338
4389
|
<span class={"rdt-header-label"} data-rozie-s-d5dcab4c="">
|
|
4339
|
-
{
|
|
4390
|
+
{_props.slots?.[`colHeader-${wh().header.column.id}`]?.({
|
|
4391
|
+
columnId: wh().header.column.id,
|
|
4392
|
+
column: wh().header.column,
|
|
4393
|
+
label: headerLabel(wh().header.column.id)
|
|
4394
|
+
}) ?? (_props.colHeaderSlot ?? _props.slots?.["colHeader"])?.({
|
|
4340
4395
|
columnId: wh().header.column.id,
|
|
4341
4396
|
column: wh().header.column,
|
|
4342
4397
|
label: headerLabel(wh().header.column.id)
|
|
@@ -4380,18 +4435,24 @@ function DataTable(_props) {
|
|
|
4380
4435
|
{<Solid_js.Show when={hasAnyFilterableColumn()}><tr class={"rdt-filter-row"} data-rozie-s-d5dcab4c="">
|
|
4381
4436
|
{<Solid_js.Show when={colsWindowed()}><th class={"rdt-col-spacer"} aria-hidden="true" style={(0, _rozie_runtime_solid.parseInlineStyle)("width:" + colPadLeft() + "px;padding:0;border:0")} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}<_solid_primitives_keyed.Key each={windowedHeadersFor(headerGroups()[headerGroups().length - 1], headerGroups().length - 1)} by={(wh) => wh.header.id}>{(wh) => <th class={"rdt-filter-cell"} role="presentation" data-col={(0, _rozie_runtime_solid.rozieAttr)(wh().header.column.id)} style={(0, _rozie_runtime_solid.parseInlineStyle)(pinStyle(wh().header.column.id))} data-rozie-s-d5dcab4c="">
|
|
4382
4437
|
{<Solid_js.Show when={isSelectColumn(wh().header.column.id)} fallback={<Solid_js.Show when={isExpanderColumn(wh().header.column.id)} fallback={<span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4383
|
-
{<Solid_js.Show when={columnIsFilterable(wh().header.column.id)
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4438
|
+
{<Solid_js.Show when={columnIsFilterable(wh().header.column.id)}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4439
|
+
{_props.slots?.[`filter-${wh().header.column.id}`]?.({
|
|
4440
|
+
columnId: wh().header.column.id,
|
|
4441
|
+
value: columnFilterValue(wh().header.column.id),
|
|
4442
|
+
uniqueValues: getFacetedUniqueValues(wh().header.column.id),
|
|
4443
|
+
minMax: getFacetedMinMaxValues(wh().header.column.id),
|
|
4444
|
+
setFilter: setColumnFilter
|
|
4445
|
+
}) ?? (_props.filterSlot ?? _props.slots?.["filter"])?.({
|
|
4389
4446
|
columnId: wh().header.column.id,
|
|
4390
4447
|
value: columnFilterValue(wh().header.column.id),
|
|
4391
4448
|
uniqueValues: getFacetedUniqueValues(wh().header.column.id),
|
|
4392
4449
|
minMax: getFacetedMinMaxValues(wh().header.column.id),
|
|
4393
4450
|
setFilter: setColumnFilter
|
|
4394
|
-
})}
|
|
4451
|
+
}) ?? <input type="text" aria-label={(0, _rozie_runtime_solid.rozieAttr)("Filter " + headerLabel(wh().header.column.id))} class={"rdt-col-filter"} value={columnFilterValue(wh().header.column.id)} onInput={($event) => {
|
|
4452
|
+
onColumnFilterInput(wh().header.column.id, $event);
|
|
4453
|
+
}} onClick={($event) => {
|
|
4454
|
+
stopEvent($event);
|
|
4455
|
+
}} data-rozie-s-d5dcab4c="" />}
|
|
4395
4456
|
</span></Solid_js.Show>}</span>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}</th>}</_solid_primitives_keyed.Key>
|
|
4396
4457
|
{<Solid_js.Show when={colsWindowed()}><th class={"rdt-col-spacer"} aria-hidden="true" style={(0, _rozie_runtime_solid.parseInlineStyle)("width:" + colPadRight() + "px;padding:0;border:0")} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}</tr></Solid_js.Show>}</thead>
|
|
4397
4458
|
|
|
@@ -4415,26 +4476,55 @@ function DataTable(_props) {
|
|
|
4415
4476
|
})} role={(0, _rozie_runtime_solid.rozieAttr)(cellRole())} data-col={(0, _rozie_runtime_solid.rozieAttr)(cell().column.id)} data-grid-cell="" data-row={(0, _rozie_runtime_solid.rozieAttr)(wr().vi.index)} data-col-index={(0, _rozie_runtime_solid.rozieAttr)(colIndexOf(wr().row, cell()))} tabIndex={(0, _rozie_runtime_solid.rozieAttr)(cellTabindex(String(wr().vi.index), colIndexOf(wr().row, cell())))} style={(0, _rozie_runtime_solid.parseInlineStyle)(bodyCellStyle(wr().row, cell().column.id))} aria-invalid={(0, _rozie_runtime_solid.rozieAttr)(cellAriaInvalid(wr().vi.index, colIndexOf(wr().row, cell())))} data-in-range={(0, _rozie_runtime_solid.rozieAttr)(inRange(wr().vi.index, colIndexOf(wr().row, cell())) ? "true" : null)} data-agg-cell={(0, _rozie_runtime_solid.rozieAttr)(cellIsAggregated(cell()) ? cell().column.id : null)} data-rozie-s-d5dcab4c="">
|
|
4416
4477
|
|
|
4417
4478
|
{<Solid_js.Show when={isExpanderColumn(cell().column.id)} fallback={<Solid_js.Show when={isSelectColumn(cell().column.id)} fallback={<Solid_js.Show when={cellIsGrouped(cell())} fallback={<Solid_js.Show when={isEditing(wr().vi.index, colIndexOf(wr().row, cell()))} fallback={<Solid_js.Show when={cellIsPlaceholder(cell())} fallback={<span class={"rdt-cell-value"} data-rozie-s-d5dcab4c="">
|
|
4418
|
-
{
|
|
4479
|
+
{_props.slots?.[`cell-${cell().column.id}`]?.({
|
|
4480
|
+
columnId: cell().column.id,
|
|
4481
|
+
column: cell().column,
|
|
4482
|
+
row: cellSlotRow(wr().row),
|
|
4483
|
+
value: cell().getValue()
|
|
4484
|
+
}) ?? (_props.cellSlot ?? _props.slots?.["cell"])?.({
|
|
4419
4485
|
columnId: cell().column.id,
|
|
4420
4486
|
column: cell().column,
|
|
4421
4487
|
row: cellSlotRow(wr().row),
|
|
4422
4488
|
value: cell().getValue()
|
|
4423
4489
|
}) ?? (0, _rozie_runtime_solid.rozieDisplay)(cell().getValue())}
|
|
4424
4490
|
</span>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4425
|
-
{<Solid_js.Show when={
|
|
4491
|
+
{<Solid_js.Show when={editorTypeOf(cell().column.id) === "number"} fallback={<Solid_js.Show when={editorTypeOf(cell().column.id) === "select"} fallback={<Solid_js.Show when={editorTypeOf(cell().column.id) === "checkbox"} fallback={<Solid_js.Show when={editorTypeOf(cell().column.id) === "custom"} fallback={<input type="text" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4492
|
+
onCellEditorInput(cell().column.id, $event);
|
|
4493
|
+
}} onKeyDown={($event) => {
|
|
4494
|
+
onEditorKeyDown($event);
|
|
4495
|
+
}} onBlur={($event) => {
|
|
4496
|
+
onEditorBlur($event);
|
|
4497
|
+
}} data-rozie-s-d5dcab4c="" />}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4498
|
+
{_props.slots?.[`editor-${cell().column.id}`]?.({
|
|
4499
|
+
columnId: cell().column.id,
|
|
4500
|
+
column: cell().column,
|
|
4501
|
+
row: cellSlotRow(wr().row),
|
|
4502
|
+
value: editorValueFor(cell().column.id),
|
|
4503
|
+
commit: editorCommitFor(cell().column.id),
|
|
4504
|
+
cancel: editorCancelFor(),
|
|
4505
|
+
autofocus: editorAutofocusFor(cell().column.id, wr().vi.index)
|
|
4506
|
+
}) ?? (_props.editorSlot ?? _props.slots?.["editor"])?.({
|
|
4507
|
+
columnId: cell().column.id,
|
|
4508
|
+
column: cell().column,
|
|
4509
|
+
row: cellSlotRow(wr().row),
|
|
4510
|
+
value: editorValueFor(cell().column.id),
|
|
4511
|
+
commit: editorCommitFor(cell().column.id),
|
|
4512
|
+
cancel: editorCancelFor(),
|
|
4513
|
+
autofocus: editorAutofocusFor(cell().column.id, wr().vi.index)
|
|
4514
|
+
}) ?? <input type="text" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4426
4515
|
onCellEditorInput(cell().column.id, $event);
|
|
4427
4516
|
}} onKeyDown={($event) => {
|
|
4428
4517
|
onEditorKeyDown($event);
|
|
4429
4518
|
}} onBlur={($event) => {
|
|
4430
4519
|
onEditorBlur($event);
|
|
4431
|
-
}} data-rozie-s-d5dcab4c="" />}
|
|
4520
|
+
}} data-rozie-s-d5dcab4c="" />}
|
|
4521
|
+
</span></Solid_js.Show>}><input type="checkbox" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} checked={editorCheckedFor(cell().column.id)} onChange={($event) => {
|
|
4432
4522
|
onCellEditorCheckbox(cell().column.id, $event);
|
|
4433
4523
|
}} onKeyDown={($event) => {
|
|
4434
4524
|
onEditorKeyDown($event);
|
|
4435
4525
|
}} onBlur={($event) => {
|
|
4436
4526
|
onEditorBlur($event);
|
|
4437
|
-
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><select data-editing-cell="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onChange={($event) => {
|
|
4527
|
+
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><select data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onChange={($event) => {
|
|
4438
4528
|
onCellEditorInput(cell().column.id, $event);
|
|
4439
4529
|
}} onKeyDown={($event) => {
|
|
4440
4530
|
onEditorKeyDown($event);
|
|
@@ -4442,28 +4532,23 @@ function DataTable(_props) {
|
|
|
4442
4532
|
onEditorBlur($event);
|
|
4443
4533
|
}} data-rozie-s-d5dcab4c="">
|
|
4444
4534
|
<_solid_primitives_keyed.Key each={editorOptionsOf(cell().column.id)} by={(opt) => opt.value}>{(opt) => <option value={(0, _rozie_runtime_solid.rozieAttr)(opt().value)} data-rozie-s-d5dcab4c="">{(0, _rozie_runtime_solid.rozieDisplay)(opt().label)}</option>}</_solid_primitives_keyed.Key>
|
|
4445
|
-
</select></Solid_js.Show>}><input type="number" data-editing-cell="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4535
|
+
</select></Solid_js.Show>}><input type="number" data-editing-cell="" data-builtin-editor="" class={"rdt-cell-editor"} value={editorValueFor(cell().column.id)} onInput={($event) => {
|
|
4446
4536
|
onCellEditorInput(cell().column.id, $event);
|
|
4447
4537
|
}} onKeyDown={($event) => {
|
|
4448
4538
|
onEditorKeyDown($event);
|
|
4449
4539
|
}} onBlur={($event) => {
|
|
4450
4540
|
onEditorBlur($event);
|
|
4451
|
-
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4452
|
-
{(_props.editorSlot ?? _props.slots?.["editor"])?.({
|
|
4453
|
-
columnId: cell().column.id,
|
|
4454
|
-
column: cell().column,
|
|
4455
|
-
row: cellSlotRow(wr().row),
|
|
4456
|
-
value: editorValueFor(cell().column.id),
|
|
4457
|
-
commit: editorCommitFor(cell().column.id),
|
|
4458
|
-
cancel: editorCancelFor(),
|
|
4459
|
-
autofocus: editorAutofocusFor(cell().column.id, wr().vi.index)
|
|
4460
|
-
})}
|
|
4461
|
-
</span></Solid_js.Show>}</span></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4541
|
+
}} data-rozie-s-d5dcab4c="" /></Solid_js.Show>}</span></Solid_js.Show>}><span style={{ display: "contents" }} data-rozie-s-d5dcab4c="">
|
|
4462
4542
|
<button type="button" data-expander="" aria-expanded={!!rowIsExpanded(wr().row)} aria-label={(0, _rozie_runtime_solid.rozieAttr)(rowIsExpanded(wr().row) ? "Collapse group" : "Expand group")} class={"rdt-expander rdt-group-toggle"} onClick={($event) => {
|
|
4463
4543
|
onToggleExpand(wr().row, $event);
|
|
4464
4544
|
}} data-rozie-s-d5dcab4c="">{(0, _rozie_runtime_solid.rozieDisplay)(rowIsExpanded(wr().row) ? "▾" : "▸")}</button>
|
|
4465
4545
|
<span class={"rdt-group-value"} data-rozie-s-d5dcab4c="">
|
|
4466
|
-
{
|
|
4546
|
+
{_props.slots?.[`cell-${cell().column.id}`]?.({
|
|
4547
|
+
columnId: cell().column.id,
|
|
4548
|
+
column: cell().column,
|
|
4549
|
+
row: cellSlotRow(wr().row),
|
|
4550
|
+
value: cell().getValue()
|
|
4551
|
+
}) ?? (_props.cellSlot ?? _props.slots?.["cell"])?.({
|
|
4467
4552
|
columnId: cell().column.id,
|
|
4468
4553
|
column: cell().column,
|
|
4469
4554
|
row: cellSlotRow(wr().row),
|