@ai-matrx/design-system 0.49.21 → 0.49.23

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/data-table/copy-helpers.d.cts +1 -1
  3. package/dist/data-table/copy-helpers.d.ts +1 -1
  4. package/dist/data-table/filter-engine.d.cts +1 -1
  5. package/dist/data-table/filter-engine.d.ts +1 -1
  6. package/dist/data-table/host.d.cts +1 -1
  7. package/dist/data-table/host.d.ts +1 -1
  8. package/dist/data-table/index.cjs +6 -5
  9. package/dist/data-table/index.cjs.map +1 -1
  10. package/dist/data-table/index.d.cts +2 -2
  11. package/dist/data-table/index.d.ts +2 -2
  12. package/dist/data-table/index.js +6 -5
  13. package/dist/data-table/index.js.map +1 -1
  14. package/dist/data-table/infer-filter.d.cts +1 -1
  15. package/dist/data-table/infer-filter.d.ts +1 -1
  16. package/dist/data-table/layered-filters.d.cts +1 -1
  17. package/dist/data-table/layered-filters.d.ts +1 -1
  18. package/dist/data-table/pagination.cjs +6 -5
  19. package/dist/data-table/pagination.cjs.map +1 -1
  20. package/dist/data-table/pagination.js +6 -5
  21. package/dist/data-table/pagination.js.map +1 -1
  22. package/dist/data-table/query-control.d.cts +1 -1
  23. package/dist/data-table/query-control.d.ts +1 -1
  24. package/dist/data-table/types.cjs.map +1 -1
  25. package/dist/data-table/types.d.cts +1 -1
  26. package/dist/data-table/types.d.ts +1 -1
  27. package/dist/data-table/url-state.d.cts +1 -1
  28. package/dist/data-table/url-state.d.ts +1 -1
  29. package/dist/data-table/xlsx.d.cts +1 -1
  30. package/dist/data-table/xlsx.d.ts +1 -1
  31. package/dist/{layered-filters-BltsILT3.d.cts → layered-filters-DZNCPJsU.d.cts} +1 -1
  32. package/dist/{layered-filters-DrGJ_nuG.d.ts → layered-filters-LwqRKKni.d.ts} +1 -1
  33. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, f as ColumnFilterKind } from '../layered-filters-BltsILT3.cjs';
1
+ import { M as MatrxColumnDef, f as ColumnFilterKind } from '../layered-filters-DZNCPJsU.cjs';
2
2
  import '../content-transfer.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- import { M as MatrxColumnDef, f as ColumnFilterKind } from '../layered-filters-DrGJ_nuG.js';
1
+ import { M as MatrxColumnDef, f as ColumnFilterKind } from '../layered-filters-LwqRKKni.js';
2
2
  import '../content-transfer.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- export { aa as LAYERED_FILTER_OPERATORS, ab as LAYERED_FILTER_OPERATOR_LABELS, ac as LayeredFilterField, ad as LayeredFilterOperator, L as LayeredFilterRule, ae as columnFiltersToLayeredRules, af as completeLayeredFilterRules, ag as decodeLayeredFilterRules, ah as encodeLayeredFilterRules, ai as isCompleteLayeredFilterRule, aj as isLayeredFilterOperator, ak as layeredFilterMatchesValue, al as layeredFilterNeedsValue, am as layeredFilterRuleSummary, an as operatorsForLayeredField } from '../layered-filters-BltsILT3.cjs';
1
+ export { aa as LAYERED_FILTER_OPERATORS, ab as LAYERED_FILTER_OPERATOR_LABELS, ac as LayeredFilterField, ad as LayeredFilterOperator, L as LayeredFilterRule, ae as columnFiltersToLayeredRules, af as completeLayeredFilterRules, ag as decodeLayeredFilterRules, ah as encodeLayeredFilterRules, ai as isCompleteLayeredFilterRule, aj as isLayeredFilterOperator, ak as layeredFilterMatchesValue, al as layeredFilterNeedsValue, am as layeredFilterRuleSummary, an as operatorsForLayeredField } from '../layered-filters-DZNCPJsU.cjs';
2
2
  import '../content-transfer.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -1,4 +1,4 @@
1
- export { aa as LAYERED_FILTER_OPERATORS, ab as LAYERED_FILTER_OPERATOR_LABELS, ac as LayeredFilterField, ad as LayeredFilterOperator, L as LayeredFilterRule, ae as columnFiltersToLayeredRules, af as completeLayeredFilterRules, ag as decodeLayeredFilterRules, ah as encodeLayeredFilterRules, ai as isCompleteLayeredFilterRule, aj as isLayeredFilterOperator, ak as layeredFilterMatchesValue, al as layeredFilterNeedsValue, am as layeredFilterRuleSummary, an as operatorsForLayeredField } from '../layered-filters-DrGJ_nuG.js';
1
+ export { aa as LAYERED_FILTER_OPERATORS, ab as LAYERED_FILTER_OPERATOR_LABELS, ac as LayeredFilterField, ad as LayeredFilterOperator, L as LayeredFilterRule, ae as columnFiltersToLayeredRules, af as completeLayeredFilterRules, ag as decodeLayeredFilterRules, ah as encodeLayeredFilterRules, ai as isCompleteLayeredFilterRule, aj as isLayeredFilterOperator, ak as layeredFilterMatchesValue, al as layeredFilterNeedsValue, am as layeredFilterRuleSummary, an as operatorsForLayeredField } from '../layered-filters-LwqRKKni.js';
2
2
  import '../content-transfer.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/kit/content-transfer';
@@ -775,6 +775,10 @@ function GenericTablePagination({
775
775
  const host = useMatrxDataTableHost();
776
776
  const positivePageSizes = pageSizeOptions.filter((size) => size > 0);
777
777
  const availablePageSizes = itemsPerPage > 0 && !positivePageSizes.includes(itemsPerPage) ? [...positivePageSizes, itemsPerPage].sort((a, b) => a - b) : positivePageSizes;
778
+ const pageSizeChoices = [...new Set(availablePageSizes)];
779
+ const hasDistinctAllChoice = showAllOption && !unknownTotal && !pageSizeChoices.includes(allValue);
780
+ if (hasDistinctAllChoice) pageSizeChoices.push(allValue);
781
+ const pageSizeIsFixed = pageSizeChoices.length <= 1;
778
782
  const effectiveItemsPerPage = itemsPerPage === 0 ? Math.max(totalItems, 1) : Math.max(itemsPerPage, 1);
779
783
  const totalPages = Math.max(1, Math.ceil(totalItems / effectiveItemsPerPage));
780
784
  const getPageNumbers = (limit = maxPagesToShow) => {
@@ -817,7 +821,7 @@ function GenericTablePagination({
817
821
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
818
822
  Select,
819
823
  {
820
- disabled: isFetching,
824
+ disabled: isFetching || pageSizeIsFixed,
821
825
  value: itemsPerPage.toString(),
822
826
  onValueChange: (value) => onItemsPerPageChange(parseInt(value)),
823
827
  children: [
@@ -832,10 +836,7 @@ function GenericTablePagination({
832
836
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectValue, { placeholder: itemsPerPage.toString() })
833
837
  }
834
838
  ),
835
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SelectContent, { children: [
836
- availablePageSizes.map((size) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: size.toString(), children: size }, size)),
837
- showAllOption && !unknownTotal ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: allValue.toString(), children: allOptionLabel }) : null
838
- ] })
839
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectContent, { children: pageSizeChoices.map((size) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: size.toString(), children: size === allValue && hasDistinctAllChoice ? allOptionLabel : size }, size)) })
839
840
  ]
840
841
  }
841
842
  )