@ai-matrx/design-system 0.48.10 → 0.48.11
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/index.cjs +8 -8
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +8 -8
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +4 -3
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +4 -3
- package/dist/data-table/pagination.js.map +1 -1
- package/package.json +1 -1
package/dist/data-table/index.js
CHANGED
|
@@ -36390,6 +36390,7 @@ function GenericTablePagination({
|
|
|
36390
36390
|
const startItem = totalItems === 0 ? 0 : progressive ? 1 : (currentPage - 1) * effectiveItemsPerPage + 1;
|
|
36391
36391
|
const endItem = Math.min(progressive?.shownCount ?? currentPage * effectiveItemsPerPage, totalItems);
|
|
36392
36392
|
const defaultLabelFormat = (start, end, total) => {
|
|
36393
|
+
if (total === 0 && !unknownTotal) return "0 rows";
|
|
36393
36394
|
if (unknownTotal) return `${unknownTotal.pageRowCount.toLocaleString()} on page ${currentPage.toLocaleString()}`;
|
|
36394
36395
|
if (progressive) return progressive.loadedCount !== void 0 && progressive.loadedCount !== total ? `${end} shown / ${total} matching \xB7 ${progressive.loadedCount} loaded` : `${end} shown / ${total} loaded`;
|
|
36395
36396
|
return compact ? `${start}-${end} of ${total}` : `Showing ${start} to ${end} of ${total} entries`;
|
|
@@ -36444,7 +36445,7 @@ function GenericTablePagination({
|
|
|
36444
36445
|
{
|
|
36445
36446
|
className: cn("flex min-w-0 justify-center", infoContainerClassName),
|
|
36446
36447
|
children: showPageInfo && !hideEntriesInfo && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
36447
|
-
/* @__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) : progressive ? `${endItem}/${totalItems} ${progressive.loadedCount !== void 0 && progressive.loadedCount !== totalItems ? "matching" : "loaded"}` : `${startItem}-${endItem} / ${totalItems}` }),
|
|
36448
|
+
/* @__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}-${endItem} / ${totalItems}` }),
|
|
36448
36449
|
/* @__PURE__ */ jsx23(
|
|
36449
36450
|
"span",
|
|
36450
36451
|
{
|
|
@@ -36519,7 +36520,7 @@ function GenericTablePagination({
|
|
|
36519
36520
|
),
|
|
36520
36521
|
fallbackClassName: page === currentPage ? pageActiveButtonClassName : pageButtonClassName,
|
|
36521
36522
|
onClick: () => onPageChange(page),
|
|
36522
|
-
disabled: isFetching,
|
|
36523
|
+
disabled: isFetching || totalPages <= 1,
|
|
36523
36524
|
children: /* @__PURE__ */ jsx23("span", { children: page })
|
|
36524
36525
|
},
|
|
36525
36526
|
`mobile-${page}`
|
|
@@ -36535,7 +36536,7 @@ function GenericTablePagination({
|
|
|
36535
36536
|
visibilityClassName: "hidden sm:inline-flex",
|
|
36536
36537
|
fallbackClassName: currentPage === page ? pageActiveButtonClassName : pageButtonClassName,
|
|
36537
36538
|
onClick: () => onPageChange(page),
|
|
36538
|
-
disabled: isFetching,
|
|
36539
|
+
disabled: isFetching || totalPages <= 1,
|
|
36539
36540
|
children: /* @__PURE__ */ jsx23("span", { children: page })
|
|
36540
36541
|
},
|
|
36541
36542
|
`desktop-${page}`
|
|
@@ -51404,11 +51405,10 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51404
51405
|
] }) : !isLoading && appendQuery.pagination.totalItems !== void 0 && data.length === appendQuery.pagination.totalItems ? /* @__PURE__ */ jsx48("span", { className: "min-w-0 max-w-full break-words whitespace-normal px-3 text-xs text-muted-foreground sm:text-sm", children: "All rows loaded" }) : null
|
|
51405
51406
|
]
|
|
51406
51407
|
}
|
|
51407
|
-
) : !hidePagination
|
|
51408
|
-
//
|
|
51409
|
-
//
|
|
51410
|
-
//
|
|
51411
|
-
// footer still says what was searched ("0–0 of 0 matching · 2 / 12 loaded").
|
|
51408
|
+
) : !hidePagination ? (
|
|
51409
|
+
// Keep the footer and disabled page controls in place for an empty table,
|
|
51410
|
+
// including an unfiltered empty source. The empty-state copy explains why
|
|
51411
|
+
// there are no records; the stable footer preserves the table controls.
|
|
51412
51412
|
/* @__PURE__ */ jsx48(MatrxTableChrome, { part: "pagination", epoch: paginationEpoch, render: () => /* @__PURE__ */ jsx48("div", { className: "shrink-0", children: /* @__PURE__ */ jsx48(
|
|
51413
51413
|
GenericTablePagination,
|
|
51414
51414
|
{
|