@ai-matrx/design-system 0.48.16 → 0.49.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 +27 -0
- package/README.md +16 -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 +191 -48
- 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 +191 -48
- 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/pagination.cjs +12 -2
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.d.cts +6 -1
- package/dist/data-table/pagination.d.ts +6 -1
- package/dist/data-table/pagination.js +12 -2
- package/dist/data-table/pagination.js.map +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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{types-bIcXnlYS.d.cts → types-ClxgLUFi.d.cts} +34 -1
- package/dist/{types-DVTNnzU5.d.ts → types-DlgTSJsC.d.ts} +34 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../types-ClxgLUFi.cjs';
|
|
4
|
+
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as MatrxDataTableSummaryConfig, K as MatrxDataTableSummaryContext, N as MatrxDataTableSummaryMetric, O as MatrxDataTableToolbar, P as MatrxDataTableUrlStateConfig, Q as MatrxDataTableVirtualizeConfig, R as MatrxDataTableWindowConfig, U as MatrxTablePagination, V as NumberFilterOp, W as SavedTableViewTab, X as SortDirection, S as SortState, Y as SpreadsheetSelection, Z as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, _ as TableSearchRole, $ as TableSearchScope, a0 as TableViewQuery, a1 as TableViewTab, a2 as TableViewTabs, a3 as TableViewTabsProps, a4 as TableViewTabsStore, a5 as TextFilterMode, a6 as ToolbarFacet, a7 as inferTableSearchRole, a8 as rankTableSearchRows, a9 as resolveTableSearchScopes } from '../types-ClxgLUFi.cjs';
|
|
5
5
|
import { TableReadFailureProps, TableStaleNoticeProps } from './host.cjs';
|
|
6
6
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableContextMenuBoundaryProps, TableDoors, TableEntityRefProps, TableLinkProps, TableMenuIconProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.cjs';
|
|
7
7
|
import { CopyControlProps } from './copy-types.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../types-
|
|
4
|
-
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as
|
|
3
|
+
import { h as MatrxDataTableProps, i as TableViewSnapshot, d as MatrxDataTableRecordControls, j as MatrxDataTableRead, k as ColumnMarker, M as MatrxColumnDef } from '../types-DlgTSJsC.js';
|
|
4
|
+
export { A as AnyOfColumnSearch, l as CellEditType, m as CellEditsMap, f as ColumnFilterKind, a as ColumnFilterValue, C as ColumnFiltersState, n as MatrxDataTableContextMenuConfig, g as MatrxDataTableCopyConfig, o as MatrxDataTableCoverageConfig, c as MatrxDataTableDensity, p as MatrxDataTableDetailConfig, q as MatrxDataTableEditConfig, r as MatrxDataTableEmptyState, s as MatrxDataTableExpandedDetailConfig, t as MatrxDataTableFacetsConfig, u as MatrxDataTableFilterUi, v as MatrxDataTableGroupingConfig, w as MatrxDataTableHierarchyConfig, x as MatrxDataTableHierarchyMove, y as MatrxDataTableMobileCardControls, z as MatrxDataTableMultiExpandedDetailConfig, B as MatrxDataTableQueryControl, e as MatrxDataTableQueryState, D as MatrxDataTableReadStatus, E as MatrxDataTableSelectionConfig, F as MatrxDataTableSingleExpandedDetailConfig, G as MatrxDataTableSourceProcessing, H as MatrxDataTableSpreadsheetConfig, I as MatrxDataTableStyleConfig, J as MatrxDataTableSummaryConfig, K as MatrxDataTableSummaryContext, N as MatrxDataTableSummaryMetric, O as MatrxDataTableToolbar, P as MatrxDataTableUrlStateConfig, Q as MatrxDataTableVirtualizeConfig, R as MatrxDataTableWindowConfig, U as MatrxTablePagination, V as NumberFilterOp, W as SavedTableViewTab, X as SortDirection, S as SortState, Y as SpreadsheetSelection, Z as TableRankedSearchOptions, b as TableSavedViewsProps, T as TableSearchMatchMode, _ as TableSearchRole, $ as TableSearchScope, a0 as TableViewQuery, a1 as TableViewTab, a2 as TableViewTabs, a3 as TableViewTabsProps, a4 as TableViewTabsStore, a5 as TextFilterMode, a6 as ToolbarFacet, a7 as inferTableSearchRole, a8 as rankTableSearchRows, a9 as resolveTableSearchScopes } from '../types-DlgTSJsC.js';
|
|
5
5
|
import { TableReadFailureProps, TableStaleNoticeProps } from './host.js';
|
|
6
6
|
export { MatrxDataTableHost, MatrxDataTableProvider, MatrxTableRowAlchemy, TableContextMenuBoundaryProps, TableDoors, TableEntityRefProps, TableLinkProps, TableMenuIconProps, TablePeekProps, TableSidePanelProps, TableToolbarActionProps, TableWindowPanelProps, useMatrxDataTableHost, useMatrxTableRowAlchemy } from './host.js';
|
|
7
7
|
import { CopyControlProps } from './copy-types.js';
|
package/dist/data-table/index.js
CHANGED
|
@@ -36369,7 +36369,8 @@ function GenericTablePagination({
|
|
|
36369
36369
|
labelFormat,
|
|
36370
36370
|
compact = false,
|
|
36371
36371
|
hideEntriesInfo = false,
|
|
36372
|
-
progressive
|
|
36372
|
+
progressive,
|
|
36373
|
+
countUnavailable
|
|
36373
36374
|
}) {
|
|
36374
36375
|
const host = useMatrxDataTableHost();
|
|
36375
36376
|
const positivePageSizes = pageSizeOptions.filter((size) => size > 0);
|
|
@@ -36444,7 +36445,16 @@ function GenericTablePagination({
|
|
|
36444
36445
|
"div",
|
|
36445
36446
|
{
|
|
36446
36447
|
className: cn("flex min-w-0 justify-center", infoContainerClassName),
|
|
36447
|
-
children: showPageInfo && !hideEntriesInfo && /* @__PURE__ */
|
|
36448
|
+
children: showPageInfo && !hideEntriesInfo && countUnavailable === "failed" ? /* @__PURE__ */ jsx23(
|
|
36449
|
+
"span",
|
|
36450
|
+
{
|
|
36451
|
+
role: "img",
|
|
36452
|
+
"aria-label": "Row count unavailable",
|
|
36453
|
+
title: "Row count unavailable",
|
|
36454
|
+
className: "truncate text-sm tabular-nums text-muted-foreground",
|
|
36455
|
+
children: /* @__PURE__ */ jsx23("span", { "aria-hidden": "true", children: "\u2014" })
|
|
36456
|
+
}
|
|
36457
|
+
) : showPageInfo && !hideEntriesInfo && !countUnavailable && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
36448
36458
|
/* @__PURE__ */ jsx23("span", { className: "truncate text-xs tabular-nums text-muted-foreground sm:hidden", children: labelFormat ? formatLabel(startItem, endItem, totalItems) : unknownTotal ? defaultLabelFormat(startItem, endItem, totalItems) : totalItems === 0 ? "0 rows" : progressive ? `${endItem}/${totalItems} ${progressive.loadedCount !== void 0 && progressive.loadedCount !== totalItems ? "matching" : "loaded"}` : `${startItem}\u2013${endItem} of ${totalItems}` }),
|
|
36449
36459
|
/* @__PURE__ */ jsx23(
|
|
36450
36460
|
"span",
|
|
@@ -48097,6 +48107,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
48097
48107
|
selection: selectionConfig,
|
|
48098
48108
|
rowActions,
|
|
48099
48109
|
footerRows = [],
|
|
48110
|
+
summary,
|
|
48100
48111
|
rowClassName,
|
|
48101
48112
|
rowVersion,
|
|
48102
48113
|
cellClassName,
|
|
@@ -49466,6 +49477,48 @@ function MatrxDataTableCore(coreProps) {
|
|
|
49466
49477
|
return def !== void 0 && f.value !== def;
|
|
49467
49478
|
});
|
|
49468
49479
|
const hasActiveFilters = activeFilterCount > 0 || Boolean(searchValue.trim()) || intelligentSearchEnabled && searchScope !== "all" || Boolean(anyOfValue.trim()) || completeLayeredFilterRules(layeredFilters).length > 0 || facetActive;
|
|
49480
|
+
const summaryIsFiltered = activeFilterCount > 0 || Boolean(searchValue.trim()) || Boolean(anyOfValue.trim()) || completeLayeredFilterRules(layeredFilters).length > 0 || facetActive;
|
|
49481
|
+
const summaryCoverage = remoteQuery?.mode === "controlled" ? "page" : appendQuery !== null || !allRowsAreLoaded ? "loaded" : "all";
|
|
49482
|
+
const summaryContext = {
|
|
49483
|
+
rows: processed,
|
|
49484
|
+
isFiltered: summaryIsFiltered,
|
|
49485
|
+
coverage: summaryCoverage
|
|
49486
|
+
};
|
|
49487
|
+
const summaryCanReadRows = !readView.failure && (!isLoading || data.length > 0);
|
|
49488
|
+
const summaryUsesSource = summary?.source !== void 0;
|
|
49489
|
+
const summaryCaption = (() => {
|
|
49490
|
+
if (summaryUsesSource) {
|
|
49491
|
+
const sourceCaption = summary?.source?.isFiltered ? "Filtered source totals" : "Source totals";
|
|
49492
|
+
return readView.stale ? `${sourceCaption} (stale)` : sourceCaption;
|
|
49493
|
+
}
|
|
49494
|
+
const base = summaryCoverage === "all" ? "rows" : summaryCoverage === "loaded" ? "loaded rows" : "current page";
|
|
49495
|
+
const caption = summaryIsFiltered ? `Filtered ${base}` : base === "rows" ? "All rows" : base[0].toUpperCase() + base.slice(1);
|
|
49496
|
+
return readView.stale ? `${caption} (stale)` : caption;
|
|
49497
|
+
})();
|
|
49498
|
+
const resolveSummaryValue = (sourceValue, callback) => {
|
|
49499
|
+
if (!summaryCanReadRows) {
|
|
49500
|
+
return readView.failure ? { value: "Unavailable", unavailable: true } : { value: "Loading", unavailable: false };
|
|
49501
|
+
}
|
|
49502
|
+
if (summaryUsesSource) {
|
|
49503
|
+
return sourceValue === void 0 ? { value: "Unavailable", unavailable: true } : { value: sourceValue, unavailable: false };
|
|
49504
|
+
}
|
|
49505
|
+
if (!callback) return { value: "Unavailable", unavailable: true };
|
|
49506
|
+
try {
|
|
49507
|
+
return { value: callback(summaryContext), unavailable: false };
|
|
49508
|
+
} catch {
|
|
49509
|
+
return { value: "Unavailable", unavailable: true };
|
|
49510
|
+
}
|
|
49511
|
+
};
|
|
49512
|
+
const summaryMetrics = summary?.metrics.map((metric) => ({
|
|
49513
|
+
id: metric.id,
|
|
49514
|
+
label: metric.label,
|
|
49515
|
+
...resolveSummaryValue(summary.source?.metrics?.[metric.id], metric.value)
|
|
49516
|
+
})) ?? [];
|
|
49517
|
+
const summaryTotals = Object.entries(summary?.totals ?? {}).map(([id, value]) => ({
|
|
49518
|
+
id,
|
|
49519
|
+
...resolveSummaryValue(summary?.source?.totals?.[id], value)
|
|
49520
|
+
}));
|
|
49521
|
+
const hasSummaryTotals = summaryTotals.length > 0;
|
|
49469
49522
|
const changeCount = useMemo11(() => {
|
|
49470
49523
|
let n2 = 0;
|
|
49471
49524
|
for (const fields of Object.values(edits)) {
|
|
@@ -50367,7 +50420,16 @@ function MatrxDataTableCore(coreProps) {
|
|
|
50367
50420
|
controlledQuery,
|
|
50368
50421
|
emitControlledQueryChange
|
|
50369
50422
|
]);
|
|
50370
|
-
const footerEpoch = useRenderEpoch([
|
|
50423
|
+
const footerEpoch = useRenderEpoch([
|
|
50424
|
+
...chromeGeometry,
|
|
50425
|
+
footerRows,
|
|
50426
|
+
summaryContext.rows,
|
|
50427
|
+
summaryContext.isFiltered,
|
|
50428
|
+
summaryContext.coverage,
|
|
50429
|
+
summaryCaption,
|
|
50430
|
+
summaryUsesSource,
|
|
50431
|
+
...summaryTotals.flatMap((total) => [total.id, total.value, total.unavailable])
|
|
50432
|
+
]);
|
|
50371
50433
|
const paginationEpoch = useRenderEpoch([
|
|
50372
50434
|
totalItems,
|
|
50373
50435
|
sourceTotal,
|
|
@@ -50904,6 +50966,25 @@ function MatrxDataTableCore(coreProps) {
|
|
|
50904
50966
|
notice,
|
|
50905
50967
|
savedViewError ? /* @__PURE__ */ jsx50(ErrorBox, { className: "shrink-0 text-xs text-destructive", message: savedViewError, operation: "Save or apply a saved view", origin: "design-system/MatrxDataTable" }) : null,
|
|
50906
50968
|
toolbarActionError ? /* @__PURE__ */ jsx50(ErrorBox, { className: "shrink-0 text-xs text-destructive", message: toolbarActionError, operation: "Run a table toolbar action", origin: "design-system/MatrxDataTable" }) : null,
|
|
50969
|
+
summaryMetrics.length > 0 ? /* @__PURE__ */ jsxs39(
|
|
50970
|
+
"section",
|
|
50971
|
+
{
|
|
50972
|
+
"data-matrx-table-summary": true,
|
|
50973
|
+
"data-matrx-table-summary-scope": summaryUsesSource ? "source" : summaryCoverage,
|
|
50974
|
+
"aria-label": `Table summary: ${summaryCaption}`,
|
|
50975
|
+
className: "flex shrink-0 flex-wrap items-stretch gap-2",
|
|
50976
|
+
children: [
|
|
50977
|
+
/* @__PURE__ */ jsx50("span", { className: "flex items-center px-1 text-xs font-medium text-muted-foreground", children: summaryCaption }),
|
|
50978
|
+
summaryMetrics.map((metric) => /* @__PURE__ */ jsxs39("div", { className: "min-w-24 rounded-md border border-border bg-card px-3 py-2 shadow-xs", children: [
|
|
50979
|
+
/* @__PURE__ */ jsx50("div", { className: "text-xs text-muted-foreground", children: metric.label }),
|
|
50980
|
+
/* @__PURE__ */ jsxs39("div", { className: "mt-0.5 text-sm font-semibold tabular-nums text-foreground", children: [
|
|
50981
|
+
metric.value,
|
|
50982
|
+
metric.unavailable ? /* @__PURE__ */ jsx50(ErrorBox, { as: "span", className: "sr-only", message: `${metric.label} is unavailable`, operation: "Summarize this table", origin: "design-system/MatrxDataTable" }) : null
|
|
50983
|
+
] })
|
|
50984
|
+
] }, metric.id))
|
|
50985
|
+
]
|
|
50986
|
+
}
|
|
50987
|
+
) : null,
|
|
50907
50988
|
/* @__PURE__ */ jsx50(MatrxTableChrome, { part: "toolbar", epoch: toolbarEpoch, render: () => placeToolbar(!hideToolbar && (viewTabs || toolbar?.title || toolbar?.titleCount || showSearch || toolbar?.customSearch || toolbar?.anyOf || toolbar?.layeredFilters || toolbar?.facets && toolbar.facets.length > 0 || toolbar?.leading || toolbar?.actions || toolbar?.refresh || toolbar?.add || tableId && SavedViews || hasActiveFilters || showToolbarCopy || columns.length > 0) && /* @__PURE__ */ jsxs39(
|
|
50908
50989
|
TableTitleRow,
|
|
50909
50990
|
{
|
|
@@ -51744,50 +51825,111 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51744
51825
|
}
|
|
51745
51826
|
) }) : null
|
|
51746
51827
|
] }),
|
|
51747
|
-
/* @__PURE__ */ jsx50(MatrxTableChrome, { part: "footer", epoch: footerEpoch, render: () => footerRows.length > 0 ? /* @__PURE__ */
|
|
51748
|
-
|
|
51749
|
-
|
|
51750
|
-
|
|
51751
|
-
|
|
51752
|
-
|
|
51753
|
-
|
|
51754
|
-
className: "
|
|
51755
|
-
|
|
51756
|
-
|
|
51757
|
-
|
|
51758
|
-
|
|
51759
|
-
|
|
51760
|
-
|
|
51761
|
-
|
|
51762
|
-
|
|
51763
|
-
|
|
51764
|
-
|
|
51765
|
-
|
|
51766
|
-
|
|
51767
|
-
|
|
51768
|
-
)
|
|
51769
|
-
|
|
51770
|
-
|
|
51771
|
-
|
|
51772
|
-
|
|
51773
|
-
|
|
51774
|
-
|
|
51775
|
-
|
|
51776
|
-
|
|
51777
|
-
|
|
51778
|
-
|
|
51779
|
-
|
|
51780
|
-
|
|
51781
|
-
|
|
51782
|
-
|
|
51783
|
-
|
|
51784
|
-
|
|
51785
|
-
|
|
51786
|
-
|
|
51787
|
-
|
|
51788
|
-
|
|
51789
|
-
|
|
51790
|
-
|
|
51828
|
+
/* @__PURE__ */ jsx50(MatrxTableChrome, { part: "footer", epoch: footerEpoch, render: () => footerRows.length > 0 || hasSummaryTotals ? /* @__PURE__ */ jsxs39("tfoot", { className: cn(
|
|
51829
|
+
"border-t-2 border-border bg-muted/50 font-semibold",
|
|
51830
|
+
hasSummaryTotals && "sticky bottom-0 z-10 bg-muted/95 backdrop-blur-sm"
|
|
51831
|
+
), children: [
|
|
51832
|
+
hasSummaryTotals ? /* @__PURE__ */ jsxs39(Fragment12, { children: [
|
|
51833
|
+
/* @__PURE__ */ jsx50("tr", { "data-matrx-table-summary-total-caption": true, children: /* @__PURE__ */ jsxs39("td", { colSpan: renderedColSpan, className: "px-2 pt-2 text-xs font-medium text-muted-foreground", children: [
|
|
51834
|
+
summaryCaption,
|
|
51835
|
+
readView.stale ? /* @__PURE__ */ jsx50("span", { className: "ml-1 text-amber-700 dark:text-amber-300", children: "Retained rows may be out of date." }) : null
|
|
51836
|
+
] }) }),
|
|
51837
|
+
/* @__PURE__ */ jsxs39("tr", { "data-matrx-table-summary-totals": true, children: [
|
|
51838
|
+
selection ? /* @__PURE__ */ jsx50("td", { className: "px-2 py-2" }) : null,
|
|
51839
|
+
columnSpacers && columnSpacers.start > 0 ? /* @__PURE__ */ jsx50(
|
|
51840
|
+
"td",
|
|
51841
|
+
{
|
|
51842
|
+
"aria-hidden": "true",
|
|
51843
|
+
"data-matrx-table-column-spacer": "start",
|
|
51844
|
+
className: "border-0 p-0",
|
|
51845
|
+
style: { width: `${columnSpacers.start}px`, minWidth: `${columnSpacers.start}px` }
|
|
51846
|
+
},
|
|
51847
|
+
"matrx-summary-column-spacer-start"
|
|
51848
|
+
) : null,
|
|
51849
|
+
renderedColumns.map((column) => {
|
|
51850
|
+
const total = summaryTotals.find((candidate) => candidate.id === columnId(column));
|
|
51851
|
+
return /* @__PURE__ */ jsxs39(
|
|
51852
|
+
"td",
|
|
51853
|
+
{
|
|
51854
|
+
className: cn(
|
|
51855
|
+
"px-2 py-2 align-middle",
|
|
51856
|
+
(column.compact || resolveColumnMarker(column) !== void 0) && "px-1",
|
|
51857
|
+
column.className,
|
|
51858
|
+
column.align === "center" && "text-center",
|
|
51859
|
+
column.align === "right" && "text-right"
|
|
51860
|
+
),
|
|
51861
|
+
style: columnWidthVar(
|
|
51862
|
+
resolveColumnMarker(column) && column.width === void 0 ? 40 : column.width,
|
|
51863
|
+
windowedWidthFor(columnId(column), column.width),
|
|
51864
|
+
columnId(column),
|
|
51865
|
+
resizableColumns && column.resizable !== false
|
|
51866
|
+
),
|
|
51867
|
+
children: [
|
|
51868
|
+
total?.value,
|
|
51869
|
+
total?.unavailable ? /* @__PURE__ */ jsx50(ErrorBox, { as: "span", className: "sr-only", message: `${columnId(column)} total is unavailable`, operation: "Total this column", origin: "design-system/MatrxDataTable" }) : null
|
|
51870
|
+
]
|
|
51871
|
+
},
|
|
51872
|
+
columnId(column)
|
|
51873
|
+
);
|
|
51874
|
+
}),
|
|
51875
|
+
columnSpacers && columnSpacers.end > 0 ? /* @__PURE__ */ jsx50(
|
|
51876
|
+
"td",
|
|
51877
|
+
{
|
|
51878
|
+
"aria-hidden": "true",
|
|
51879
|
+
"data-matrx-table-column-spacer": "end",
|
|
51880
|
+
className: "border-0 p-0",
|
|
51881
|
+
style: { width: `${columnSpacers.end}px`, minWidth: `${columnSpacers.end}px` }
|
|
51882
|
+
},
|
|
51883
|
+
"matrx-summary-column-spacer-end"
|
|
51884
|
+
) : null,
|
|
51885
|
+
showActionsCol ? /* @__PURE__ */ jsx50("td", {}) : null
|
|
51886
|
+
] })
|
|
51887
|
+
] }) : null,
|
|
51888
|
+
footerRows.map((row, index) => /* @__PURE__ */ jsxs39("tr", { children: [
|
|
51889
|
+
selection ? /* @__PURE__ */ jsx50("td", { className: "px-2 py-2" }) : null,
|
|
51890
|
+
columnSpacers && columnSpacers.start > 0 ? /* @__PURE__ */ jsx50(
|
|
51891
|
+
"td",
|
|
51892
|
+
{
|
|
51893
|
+
"aria-hidden": "true",
|
|
51894
|
+
"data-matrx-table-column-spacer": "start",
|
|
51895
|
+
className: "border-0 p-0",
|
|
51896
|
+
style: { width: `${columnSpacers.start}px`, minWidth: `${columnSpacers.start}px` }
|
|
51897
|
+
},
|
|
51898
|
+
"matrx-column-spacer-start"
|
|
51899
|
+
) : null,
|
|
51900
|
+
renderedColumns.map((column) => /* @__PURE__ */ jsx50(
|
|
51901
|
+
"td",
|
|
51902
|
+
{
|
|
51903
|
+
className: cn(
|
|
51904
|
+
"px-2 py-2 align-middle",
|
|
51905
|
+
(column.compact || resolveColumnMarker(column) !== void 0) && "px-1",
|
|
51906
|
+
column.className,
|
|
51907
|
+
column.align === "center" && "text-center",
|
|
51908
|
+
column.align === "right" && "text-right"
|
|
51909
|
+
),
|
|
51910
|
+
style: columnWidthVar(
|
|
51911
|
+
resolveColumnMarker(column) && column.width === void 0 ? 40 : column.width,
|
|
51912
|
+
windowedWidthFor(columnId(column), column.width),
|
|
51913
|
+
columnId(column),
|
|
51914
|
+
resizableColumns && column.resizable !== false
|
|
51915
|
+
),
|
|
51916
|
+
children: renderCell(row, column, index)
|
|
51917
|
+
},
|
|
51918
|
+
columnId(column)
|
|
51919
|
+
)),
|
|
51920
|
+
columnSpacers && columnSpacers.end > 0 ? /* @__PURE__ */ jsx50(
|
|
51921
|
+
"td",
|
|
51922
|
+
{
|
|
51923
|
+
"aria-hidden": "true",
|
|
51924
|
+
"data-matrx-table-column-spacer": "end",
|
|
51925
|
+
className: "border-0 p-0",
|
|
51926
|
+
style: { width: `${columnSpacers.end}px`, minWidth: `${columnSpacers.end}px` }
|
|
51927
|
+
},
|
|
51928
|
+
"matrx-column-spacer-end"
|
|
51929
|
+
) : null,
|
|
51930
|
+
showActionsCol ? /* @__PURE__ */ jsx50("td", {}) : null
|
|
51931
|
+
] }, `footer-${index}`))
|
|
51932
|
+
] }) : null })
|
|
51791
51933
|
]
|
|
51792
51934
|
}
|
|
51793
51935
|
)
|
|
@@ -51953,6 +52095,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51953
52095
|
GenericTablePagination,
|
|
51954
52096
|
{
|
|
51955
52097
|
totalItems,
|
|
52098
|
+
...readView.failure ? { countUnavailable: "failed" } : read?.status === "loading" && data.length === 0 ? { countUnavailable: "loading" } : {},
|
|
51956
52099
|
...paginationLabelFormat ? { labelFormat: paginationLabelFormat } : sourceTotal === void 0 ? {} : { labelFormat: (start, end, total) => `${formatCount(start)}\u2013${formatCount(end)} of ${formatCount(total)} matching \xB7 ${formatCount(data.length)} / ${formatCount(sourceTotal)} loaded` },
|
|
51957
52100
|
...localProgressiveEnabled ? { progressive: {
|
|
51958
52101
|
shownCount: progressiveRows.shownCount,
|
|
@@ -52634,7 +52777,7 @@ var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
|
52634
52777
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
52635
52778
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
52636
52779
|
var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
52637
|
-
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
52780
|
+
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
52638
52781
|
var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
52639
52782
|
var DropdownMenuSubTrigger = React22.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs40(
|
|
52640
52783
|
DropdownMenuPrimitive.SubTrigger,
|