@ai-matrx/design-system 0.21.1 → 0.21.2
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/CHANGELOG.md +6 -0
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.d.cts +1 -1
- package/dist/data-table/host.d.ts +1 -1
- package/dist/data-table/index.cjs +205 -131
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +205 -131
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/styles.css +9 -0
- package/dist/{types-B99KFITZ.d.cts → types-Bt-0UhEw.d.cts} +6 -0
- package/dist/{types-CryQuMmz.d.ts → types-DnnvjGV4.d.ts} +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.2
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.21.1..npm/design-system/v0.21.2 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.21.1
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.cjs';
|
|
2
|
-
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-
|
|
2
|
+
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-Bt-0UhEw.cjs';
|
|
3
3
|
import '../extensions-DCHtNwG3.cjs';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
5
5
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentPayloadInput } from './copy-types.js';
|
|
2
|
-
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-
|
|
2
|
+
import { f as MatrxDataTableCopyConfig, M as MatrxColumnDef } from '../types-DnnvjGV4.js';
|
|
3
3
|
import '../extensions-DCHtNwG3.js';
|
|
4
4
|
import '@ai-matrx/kit/content-transfer';
|
|
5
5
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-Bt-0UhEw.cjs';
|
|
2
2
|
import '../extensions-DCHtNwG3.cjs';
|
|
3
3
|
import '@ai-matrx/kit/content-transfer';
|
|
4
4
|
import 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-
|
|
1
|
+
import { M as MatrxColumnDef, C as ColumnFiltersState, S as SortState, L as LayeredFilterRule, T as TableSearchMatchMode, a as ColumnFilterValue } from '../types-DnnvjGV4.js';
|
|
2
2
|
import '../extensions-DCHtNwG3.js';
|
|
3
3
|
import '@ai-matrx/kit/content-transfer';
|
|
4
4
|
import 'react';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.cjs';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.cjs';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity } from '../types-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity } from '../types-Bt-0UhEw.cjs';
|
|
6
6
|
import '../extensions-DCHtNwG3.cjs';
|
|
7
7
|
import '@ai-matrx/kit/content-transfer';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ComponentType, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import { CopyControlProps } from './copy-types.js';
|
|
4
4
|
export { AgentPayloadInput, AiCustomSource, AiVariant, CopyExportConfig } from './copy-types.js';
|
|
5
|
-
import { b as TableSavedViewsProps, c as MatrxDataTableDensity } from '../types-
|
|
5
|
+
import { b as TableSavedViewsProps, c as MatrxDataTableDensity } from '../types-DnnvjGV4.js';
|
|
6
6
|
import '../extensions-DCHtNwG3.js';
|
|
7
7
|
import '@ai-matrx/kit/content-transfer';
|
|
8
8
|
|
|
@@ -8541,6 +8541,7 @@ function MatrxDataTableCore({
|
|
|
8541
8541
|
localPagination,
|
|
8542
8542
|
pageSizeOptions = [10, 25, 50, 100, 200, 500, 1e3, 2e3],
|
|
8543
8543
|
zebra = true,
|
|
8544
|
+
stickyHeader = true,
|
|
8544
8545
|
className,
|
|
8545
8546
|
tableClassName,
|
|
8546
8547
|
mobileCards,
|
|
@@ -8791,7 +8792,10 @@ function MatrxDataTableCore({
|
|
|
8791
8792
|
]);
|
|
8792
8793
|
const scrollRef = (0, import_react19.useRef)(null);
|
|
8793
8794
|
const tableRef = (0, import_react19.useRef)(null);
|
|
8795
|
+
const tableHeaderRef = (0, import_react19.useRef)(null);
|
|
8794
8796
|
const cardsScrollRef = (0, import_react19.useRef)(null);
|
|
8797
|
+
const [documentStickyHeader, setDocumentStickyHeader] = (0, import_react19.useState)(false);
|
|
8798
|
+
const documentStickyHeaderRef = (0, import_react19.useRef)(false);
|
|
8795
8799
|
const previousAppendKeyForScrollReset = (0, import_react19.useRef)(appendQueryKey);
|
|
8796
8800
|
(0, import_react19.useLayoutEffect)(() => {
|
|
8797
8801
|
const previous = previousAppendKeyForScrollReset.current;
|
|
@@ -8853,6 +8857,65 @@ function MatrxDataTableCore({
|
|
|
8853
8857
|
observer?.disconnect();
|
|
8854
8858
|
};
|
|
8855
8859
|
}, [updateScrollHint, data, columns]);
|
|
8860
|
+
(0, import_react19.useLayoutEffect)(() => {
|
|
8861
|
+
const scroll = scrollRef.current;
|
|
8862
|
+
const table = tableRef.current;
|
|
8863
|
+
const header = tableHeaderRef.current;
|
|
8864
|
+
if (!scroll || !table || !header || !stickyHeader) return;
|
|
8865
|
+
let frame = 0;
|
|
8866
|
+
const update = () => {
|
|
8867
|
+
const hasInternalVerticalScroll = scroll.scrollHeight > scroll.clientHeight + 1;
|
|
8868
|
+
const nextDocumentSticky = !hasInternalVerticalScroll;
|
|
8869
|
+
if (documentStickyHeaderRef.current !== nextDocumentSticky) {
|
|
8870
|
+
documentStickyHeaderRef.current = nextDocumentSticky;
|
|
8871
|
+
setDocumentStickyHeader(nextDocumentSticky);
|
|
8872
|
+
}
|
|
8873
|
+
if (!nextDocumentSticky) {
|
|
8874
|
+
header.style.setProperty("--matrx-document-sticky-offset", "0px");
|
|
8875
|
+
return;
|
|
8876
|
+
}
|
|
8877
|
+
const previousOffset = Number.parseFloat(
|
|
8878
|
+
header.style.getPropertyValue("--matrx-document-sticky-offset")
|
|
8879
|
+
) || 0;
|
|
8880
|
+
const headerRect = header.getBoundingClientRect();
|
|
8881
|
+
const naturalHeaderTop = headerRect.top - previousOffset;
|
|
8882
|
+
const tableRect = table.getBoundingClientRect();
|
|
8883
|
+
let scrollTargetTop = 0;
|
|
8884
|
+
for (let ancestor = scroll.parentElement; ancestor; ancestor = ancestor.parentElement) {
|
|
8885
|
+
const ancestorStyle = window.getComputedStyle(ancestor);
|
|
8886
|
+
const overflowY = ancestorStyle.overflowY;
|
|
8887
|
+
if (/^(auto|scroll|overlay)$/.test(overflowY) && ancestor.scrollHeight > ancestor.clientHeight + 1) {
|
|
8888
|
+
const scrollPaddingTop = Number.parseFloat(ancestorStyle.scrollPaddingTop) || 0;
|
|
8889
|
+
scrollTargetTop = ancestor.getBoundingClientRect().top + scrollPaddingTop;
|
|
8890
|
+
break;
|
|
8891
|
+
}
|
|
8892
|
+
}
|
|
8893
|
+
const offset = Math.max(
|
|
8894
|
+
0,
|
|
8895
|
+
Math.min(
|
|
8896
|
+
scrollTargetTop - naturalHeaderTop,
|
|
8897
|
+
tableRect.bottom - headerRect.height - naturalHeaderTop
|
|
8898
|
+
)
|
|
8899
|
+
);
|
|
8900
|
+
header.style.setProperty("--matrx-document-sticky-offset", `${offset}px`);
|
|
8901
|
+
};
|
|
8902
|
+
const requestUpdate = () => {
|
|
8903
|
+
cancelAnimationFrame(frame);
|
|
8904
|
+
frame = requestAnimationFrame(update);
|
|
8905
|
+
};
|
|
8906
|
+
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(requestUpdate);
|
|
8907
|
+
resizeObserver?.observe(scroll);
|
|
8908
|
+
resizeObserver?.observe(table);
|
|
8909
|
+
window.addEventListener("scroll", requestUpdate, true);
|
|
8910
|
+
window.addEventListener("resize", requestUpdate);
|
|
8911
|
+
requestUpdate();
|
|
8912
|
+
return () => {
|
|
8913
|
+
cancelAnimationFrame(frame);
|
|
8914
|
+
resizeObserver?.disconnect();
|
|
8915
|
+
window.removeEventListener("scroll", requestUpdate, true);
|
|
8916
|
+
window.removeEventListener("resize", requestUpdate);
|
|
8917
|
+
};
|
|
8918
|
+
}, [stickyHeader, data, columns]);
|
|
8856
8919
|
const [columnOrder, setColumnOrder] = (0, import_react19.useState)(() => columnState?.order ?? columns.map(columnId));
|
|
8857
8920
|
const [hiddenColumnIds, setHiddenColumnIds] = (0, import_react19.useState)(
|
|
8858
8921
|
() => new Set(columnState?.hidden ?? columns.filter((column) => column.hidden).map(columnId))
|
|
@@ -10230,7 +10293,7 @@ function MatrxDataTableCore({
|
|
|
10230
10293
|
"aria-busy": isLoading || isFetching,
|
|
10231
10294
|
...appendQuery === null ? {} : { style: { containerType: "inline-size" } },
|
|
10232
10295
|
className: cn(
|
|
10233
|
-
"flex h-full min-h-0 flex-col gap-2 overflow-y-auto rounded-md border border-border bg-card p-2",
|
|
10296
|
+
"relative flex h-full min-h-0 flex-col gap-2 overflow-y-auto rounded-md border border-border bg-card p-2",
|
|
10234
10297
|
mobileCardsClass
|
|
10235
10298
|
),
|
|
10236
10299
|
children: [
|
|
@@ -10238,7 +10301,7 @@ function MatrxDataTableCore({
|
|
|
10238
10301
|
"div",
|
|
10239
10302
|
{
|
|
10240
10303
|
role: "status",
|
|
10241
|
-
className: "h-0.5
|
|
10304
|
+
className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary/15",
|
|
10242
10305
|
children: [
|
|
10243
10306
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-full w-full animate-pulse bg-primary" }),
|
|
10244
10307
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "Refreshing table data" })
|
|
@@ -10360,7 +10423,7 @@ function MatrxDataTableCore({
|
|
|
10360
10423
|
"div",
|
|
10361
10424
|
{
|
|
10362
10425
|
role: "status",
|
|
10363
|
-
className: "
|
|
10426
|
+
className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-0.5 overflow-hidden bg-primary/15",
|
|
10364
10427
|
children: [
|
|
10365
10428
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-full w-full animate-pulse bg-primary" }),
|
|
10366
10429
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "Refreshing table data" })
|
|
@@ -10385,142 +10448,153 @@ function MatrxDataTableCore({
|
|
|
10385
10448
|
fixedLayoutActive && "sm:table-fixed sm:max-w-none sm:w-[var(--matrx-resized-table-width)]"
|
|
10386
10449
|
),
|
|
10387
10450
|
children: [
|
|
10388
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10451
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10452
|
+
"thead",
|
|
10453
|
+
{
|
|
10454
|
+
ref: tableHeaderRef,
|
|
10455
|
+
"data-matrx-table-sticky-header": stickyHeader ? "true" : void 0,
|
|
10456
|
+
className: cn(
|
|
10457
|
+
"z-10 border-b border-border bg-muted/90 shadow-[0_1px_0_0_var(--border)] backdrop-blur-sm",
|
|
10458
|
+
stickyHeader && (documentStickyHeader ? "relative translate-y-[var(--matrx-document-sticky-offset)]" : "sticky top-0")
|
|
10459
|
+
),
|
|
10460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { children: [
|
|
10461
|
+
selection ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10462
|
+
"th",
|
|
10397
10463
|
{
|
|
10398
|
-
"data-matrx-table-selection-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
event.currentTarget.querySelector('[role="checkbox"]')?.click();
|
|
10402
|
-
}
|
|
10403
|
-
},
|
|
10464
|
+
"data-matrx-table-selection-column": true,
|
|
10465
|
+
className: "h-9 w-9 px-2 text-left align-middle",
|
|
10466
|
+
style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth),
|
|
10404
10467
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10405
|
-
|
|
10468
|
+
"div",
|
|
10406
10469
|
{
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10470
|
+
"data-matrx-table-selection-target": true,
|
|
10471
|
+
onClick: (event) => {
|
|
10472
|
+
if (event.target === event.currentTarget) {
|
|
10473
|
+
event.currentTarget.querySelector('[role="checkbox"]')?.click();
|
|
10474
|
+
}
|
|
10475
|
+
},
|
|
10476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10477
|
+
Checkbox,
|
|
10478
|
+
{
|
|
10479
|
+
className: CHECKBOX_TAP_AREA,
|
|
10480
|
+
checked: allOnPageSelected ? true : someOnPageSelected ? "indeterminate" : false,
|
|
10481
|
+
disabled: selectableRows.length === 0,
|
|
10482
|
+
onCheckedChange: toggleAllOnPage,
|
|
10483
|
+
"aria-label": allOnPageSelected ? "Clear selection on this page" : "Select every row on this page"
|
|
10484
|
+
}
|
|
10485
|
+
)
|
|
10412
10486
|
}
|
|
10413
10487
|
)
|
|
10414
10488
|
}
|
|
10415
|
-
)
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10489
|
+
) : null,
|
|
10490
|
+
visibleColumns.map((col) => {
|
|
10491
|
+
const id = columnId(col);
|
|
10492
|
+
const meta = filterMeta.get(id);
|
|
10493
|
+
const isSorted = sort?.id === id;
|
|
10494
|
+
const headerLabel = col.label ?? (typeof col.header === "string" ? col.header : id);
|
|
10495
|
+
const defaultSortDirection = col.defaultSortDirection ?? "asc";
|
|
10496
|
+
const isColumnDragShadow = columnDragPreview?.draggedId === id && columnDragPreview.targetId !== null;
|
|
10497
|
+
const columnResizable = resizableColumns && col.resizable !== false;
|
|
10498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
10499
|
+
"th",
|
|
10500
|
+
{
|
|
10501
|
+
"data-matrx-table-column-id": id,
|
|
10502
|
+
"data-matrx-column-drag-shadow": isColumnDragShadow ? "true" : void 0,
|
|
10503
|
+
"aria-sort": isSorted ? sort?.direction === "asc" ? "ascending" : "descending" : void 0,
|
|
10504
|
+
className: cn(
|
|
10505
|
+
"relative h-9 text-left align-middle max-sm:whitespace-nowrap",
|
|
10506
|
+
// ICON COLUMN (MatrxColumnDef.compact): a 40px star
|
|
10507
|
+
// column cannot honor `width: 40` while paying 16px of
|
|
10508
|
+
// padding for a 14px glyph.
|
|
10509
|
+
col.compact ? "px-1" : "px-2",
|
|
10510
|
+
// An intentional mobile column set (see
|
|
10511
|
+
// MatrxColumnDef.mobileHidden). CSS, not a JS
|
|
10512
|
+
// breakpoint — no hydration mismatch, and the column
|
|
10513
|
+
// stays sortable/filterable from the toolbar.
|
|
10514
|
+
col.mobileHidden && "max-sm:hidden",
|
|
10515
|
+
// Consumer widths are desktop tuning: applied from `sm`
|
|
10516
|
+
// up via a CSS var. The minimum is load-bearing: without
|
|
10517
|
+
// it, a crowded table crushes a declared 190px column to a
|
|
10518
|
+
// few characters wide instead of using the canonical
|
|
10519
|
+
// horizontal-scroll surface.
|
|
10520
|
+
(col.width !== void 0 || columnResizable) && "sm:w-[var(--matrx-col-w)] sm:min-w-[var(--matrx-col-w)]",
|
|
10521
|
+
col.headerClassName,
|
|
10522
|
+
isColumnDragShadow && "bg-primary/10 shadow-[inset_2px_0_0_var(--primary),inset_-2px_0_0_var(--primary)]",
|
|
10523
|
+
col.align === "center" && "text-center",
|
|
10524
|
+
col.align === "right" && "text-right"
|
|
10525
|
+
),
|
|
10526
|
+
style: columnWidthVar(col.width, effectiveColumnWidths[id], id, columnResizable),
|
|
10527
|
+
children: [
|
|
10528
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ColumnHeaderDropZone, { id, enabled: reorderableColumns, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10529
|
+
ColumnHeaderCell,
|
|
10530
|
+
{
|
|
10531
|
+
label: col.header,
|
|
10532
|
+
labelText: headerLabel,
|
|
10533
|
+
sortable: col.sortable !== false,
|
|
10534
|
+
isSorted: Boolean(isSorted),
|
|
10535
|
+
sortDirection: sort?.direction ?? defaultSortDirection,
|
|
10536
|
+
onSortAsc: () => setSort({ id, direction: "asc" }),
|
|
10537
|
+
onSortDesc: () => setSort({ id, direction: "desc" }),
|
|
10538
|
+
onClearSort: () => setSort(null),
|
|
10539
|
+
onHeaderSortClick: () => {
|
|
10540
|
+
if (!isSorted) {
|
|
10541
|
+
setSort({ id, direction: defaultSortDirection });
|
|
10542
|
+
return;
|
|
10543
|
+
}
|
|
10544
|
+
if (sort?.direction === "asc") {
|
|
10545
|
+
setSort({ id, direction: "desc" });
|
|
10546
|
+
return;
|
|
10547
|
+
}
|
|
10548
|
+
setSort({ id, direction: "asc" });
|
|
10549
|
+
},
|
|
10550
|
+
filterKind: meta?.kind ?? null,
|
|
10551
|
+
filterValue: columnFilters[id],
|
|
10552
|
+
onFilterChange: (next) => setColumnFilter(id, next),
|
|
10553
|
+
selectOptions: meta?.options,
|
|
10554
|
+
selectSingle: col.filterSingle,
|
|
10555
|
+
filterApplyLabel: filterUi?.applyLabel,
|
|
10556
|
+
filterShowCancel: filterUi?.showCancel,
|
|
10557
|
+
filterFooterHint: filterUi?.footerHint,
|
|
10558
|
+
allowNegation: filterUi?.allowNegation,
|
|
10559
|
+
allowNullModes: filterUi?.allowNullModes,
|
|
10560
|
+
align: col.align,
|
|
10561
|
+
compact: col.compact,
|
|
10562
|
+
reorderColumn: reorderableColumns ? { id, label: headerLabel } : void 0
|
|
10471
10563
|
}
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10564
|
+
) }),
|
|
10565
|
+
columnResizable ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10566
|
+
ColumnResizeHandle,
|
|
10567
|
+
{
|
|
10568
|
+
columnId: id,
|
|
10569
|
+
label: headerLabel,
|
|
10570
|
+
tableRef,
|
|
10571
|
+
minWidth: col.minWidth,
|
|
10572
|
+
maxWidth: col.maxWidth,
|
|
10573
|
+
onResizeStart: captureResizeGestureSnapshot,
|
|
10574
|
+
onResizeCancel: clearResizeGestureSnapshot,
|
|
10575
|
+
onResizeCommit: (columnId2, width) => commitColumnWidths(
|
|
10576
|
+
{ ...effectiveColumnWidths, [columnId2]: width },
|
|
10577
|
+
true
|
|
10578
|
+
)
|
|
10475
10579
|
}
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
ColumnResizeHandle,
|
|
10495
|
-
{
|
|
10496
|
-
columnId: id,
|
|
10497
|
-
label: headerLabel,
|
|
10498
|
-
tableRef,
|
|
10499
|
-
minWidth: col.minWidth,
|
|
10500
|
-
maxWidth: col.maxWidth,
|
|
10501
|
-
onResizeStart: captureResizeGestureSnapshot,
|
|
10502
|
-
onResizeCancel: clearResizeGestureSnapshot,
|
|
10503
|
-
onResizeCommit: (columnId2, width) => commitColumnWidths(
|
|
10504
|
-
{ ...effectiveColumnWidths, [columnId2]: width },
|
|
10505
|
-
true
|
|
10506
|
-
)
|
|
10507
|
-
}
|
|
10508
|
-
) : null
|
|
10509
|
-
]
|
|
10510
|
-
},
|
|
10511
|
-
id
|
|
10512
|
-
);
|
|
10513
|
-
}),
|
|
10514
|
-
showActionsCol && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10515
|
-
"th",
|
|
10516
|
-
{
|
|
10517
|
-
"data-matrx-table-actions-column": true,
|
|
10518
|
-
className: "h-9 w-px px-2 text-right align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
10519
|
-
style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
|
|
10520
|
-
children: "Actions"
|
|
10521
|
-
}
|
|
10522
|
-
)
|
|
10523
|
-
] }) }),
|
|
10580
|
+
) : null
|
|
10581
|
+
]
|
|
10582
|
+
},
|
|
10583
|
+
id
|
|
10584
|
+
);
|
|
10585
|
+
}),
|
|
10586
|
+
showActionsCol && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10587
|
+
"th",
|
|
10588
|
+
{
|
|
10589
|
+
"data-matrx-table-actions-column": true,
|
|
10590
|
+
className: "h-9 w-px px-2 text-right align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground",
|
|
10591
|
+
style: fixedUtilityWidth(fixedTableGeometry?.actionsWidth),
|
|
10592
|
+
children: "Actions"
|
|
10593
|
+
}
|
|
10594
|
+
)
|
|
10595
|
+
] })
|
|
10596
|
+
}
|
|
10597
|
+
),
|
|
10524
10598
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tbody", { children: [
|
|
10525
10599
|
isLoading ? Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { className: "border-b border-border/60", children: [
|
|
10526
10600
|
selection ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-2 py-2", style: fixedUtilityWidth(fixedTableGeometry?.selectionWidth), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Skeleton, { className: "h-3.5 w-3.5" }) }) : null,
|