@ai-matrx/design-system 0.49.21 → 0.49.22
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 +6 -5
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +6 -5
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +6 -5
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +6 -5
- package/dist/data-table/pagination.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.49.22
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.49.21..npm/design-system/v0.49.22 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.49.21
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -36761,6 +36761,10 @@ function GenericTablePagination({
|
|
|
36761
36761
|
const host = useMatrxDataTableHost();
|
|
36762
36762
|
const positivePageSizes = pageSizeOptions.filter((size) => size > 0);
|
|
36763
36763
|
const availablePageSizes = itemsPerPage > 0 && !positivePageSizes.includes(itemsPerPage) ? [...positivePageSizes, itemsPerPage].sort((a, b) => a - b) : positivePageSizes;
|
|
36764
|
+
const pageSizeChoices = [...new Set(availablePageSizes)];
|
|
36765
|
+
const hasDistinctAllChoice = showAllOption && !unknownTotal && !pageSizeChoices.includes(allValue);
|
|
36766
|
+
if (hasDistinctAllChoice) pageSizeChoices.push(allValue);
|
|
36767
|
+
const pageSizeIsFixed = pageSizeChoices.length <= 1;
|
|
36764
36768
|
const effectiveItemsPerPage = itemsPerPage === 0 ? Math.max(totalItems, 1) : Math.max(itemsPerPage, 1);
|
|
36765
36769
|
const totalPages = Math.max(1, Math.ceil(totalItems / effectiveItemsPerPage));
|
|
36766
36770
|
const getPageNumbers = (limit = maxPagesToShow) => {
|
|
@@ -36803,7 +36807,7 @@ function GenericTablePagination({
|
|
|
36803
36807
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
36804
36808
|
Select,
|
|
36805
36809
|
{
|
|
36806
|
-
disabled: isFetching,
|
|
36810
|
+
disabled: isFetching || pageSizeIsFixed,
|
|
36807
36811
|
value: itemsPerPage.toString(),
|
|
36808
36812
|
onValueChange: (value) => onItemsPerPageChange(parseInt(value)),
|
|
36809
36813
|
children: [
|
|
@@ -36818,10 +36822,7 @@ function GenericTablePagination({
|
|
|
36818
36822
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectValue, { placeholder: itemsPerPage.toString() })
|
|
36819
36823
|
}
|
|
36820
36824
|
),
|
|
36821
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.
|
|
36822
|
-
availablePageSizes.map((size) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItem, { value: size.toString(), children: size }, size)),
|
|
36823
|
-
showAllOption && !unknownTotal ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItem, { value: allValue.toString(), children: allOptionLabel }) : null
|
|
36824
|
-
] })
|
|
36825
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectContent, { children: pageSizeChoices.map((size) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectItem, { value: size.toString(), children: size === allValue && hasDistinctAllChoice ? allOptionLabel : size }, size)) })
|
|
36825
36826
|
]
|
|
36826
36827
|
}
|
|
36827
36828
|
)
|