@reforgium/data-grid 3.2.5 → 3.2.6

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.
@@ -1,4 +1,4 @@
1
- import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-YzRaXPVK.mjs';
1
+ import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-Cwwi5rhv.mjs';
2
2
 
3
3
  function createGridOverlayScrollFeature(ctx) {
4
4
  let activeMove = null;
@@ -111,4 +111,4 @@ function createGridOverlayScrollFeature(ctx) {
111
111
  }
112
112
 
113
113
  export { createGridOverlayScrollFeature };
114
- //# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-XfJnWjT5.mjs.map
114
+ //# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-BfxJb8Ym.mjs.map
@@ -63,18 +63,20 @@ class DataGridPaginator {
63
63
  .map((value) => Number(value))
64
64
  .filter((value) => Number.isFinite(value) && value > 0));
65
65
  const currentPageSize = this.pageSize();
66
- if (currentPageSize > 0 && !uniq.has(currentPageSize)) {
66
+ if (Number.isFinite(currentPageSize) && currentPageSize > 0 && !uniq.has(currentPageSize)) {
67
67
  uniq.add(currentPageSize);
68
68
  }
69
69
  return [...uniq].sort((a, b) => a - b).map((value) => ({ label: `${value}`, value }));
70
70
  }, ...(ngDevMode ? [{ debugName: "normalizedPageSizeOptions" }] : /* istanbul ignore next */ []));
71
71
  totalPages = computed(() => {
72
72
  const size = this.pageSize();
73
- return size > 0 ? Math.ceil(this.totalElements() / size) : 0;
73
+ const total = this.totalElements();
74
+ return Number.isFinite(size) && size > 0 && Number.isFinite(total) && total > 0 ? Math.ceil(total / size) : 0;
74
75
  }, ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
75
76
  normalizedCurrent = computed(() => {
76
77
  const total = this.totalPages();
77
- return total > 0 ? Math.min(Math.max(0, this.current()), total - 1) : 0;
78
+ const current = this.current();
79
+ return total > 0 && Number.isFinite(current) ? Math.min(Math.max(0, Math.floor(current)), total - 1) : 0;
78
80
  }, ...(ngDevMode ? [{ debugName: "normalizedCurrent" }] : /* istanbul ignore next */ []));
79
81
  pages = computed(() => {
80
82
  const current = this.normalizedCurrent();
@@ -2221,7 +2221,7 @@ function createGridSourceDataFeature(ctx) {
2221
2221
  }
2222
2222
  return effectiveItems(source).length > 0;
2223
2223
  };
2224
- const resolvedBlockingLoading = () => resolvedLoading() && !hasRenderableRows();
2224
+ const resolvedBlockingLoading = () => resolvedLoading() && (ctx.getMode() === 'pagination' || !hasRenderableRows());
2225
2225
  const effectivePageSize = (source) => currentPageResult?.pageSize || source.pageSize || ctx.getFallbackPageSize();
2226
2226
  const effectiveTotalElements = (source) => currentPageResult?.totalElements ?? source.totalElements;
2227
2227
  const normalizePageResult = (result, requestedPage, source) => {
@@ -4526,7 +4526,7 @@ class DataGrid {
4526
4526
  if (this.overlayScrollFeaturePromise) {
4527
4527
  return this.overlayScrollFeaturePromise;
4528
4528
  }
4529
- this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-XfJnWjT5.mjs').then(({ createGridOverlayScrollFeature }) => {
4529
+ this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-BfxJb8Ym.mjs').then(({ createGridOverlayScrollFeature }) => {
4530
4530
  const feature = createGridOverlayScrollFeature({
4531
4531
  getScrollElement: () => this.scrollEl()?.nativeElement ?? null,
4532
4532
  getThumbTop: () => this.vm.thumbTopPx(),
@@ -4654,4 +4654,4 @@ const gridBackendSortField = (field) => field;
4654
4654
  */
4655
4655
 
4656
4656
  export { DataGridTypeCellTemplateDirective as D, clampThumbTop as a, DataGridCellTemplateDirective as b, computeScrollbarState as c, DataGridHeaderTemplateDirective as d, DataGridRowDirective as e, DataGridDeclarativeColumn as f, DataGridDeclarativeHeaderDirective as g, DataGridDeclarativeCellDirective as h, DataGridCellEmptyDirective as i, DataGridCellLoadingDirective as j, DataGridStickyRowDirective as k, DataGridSortIconDirective as l, mapThumbTopToScrollTop as m, DataGridExpanderIconDirective as n, DATA_GRID_CONFIG as o, DATA_GRID_HEADER_TEXT_RESOLVER as p, DATA_GRID_TYPE_RENDERERS as q, DATA_GRID_TYPE_TRANSFORMERS as r, DEFAULT_DATA_GRID_DEFAULTS as s, provideDataGridDefaults as t, provideDataGridHeaderTextResolver as u, provideDataGridHeaderTextResolverWithParent as v, provideDataGridTypeRenderers as w, provideDataGridTypeTransformers as x, DataGrid as y, gridBackendSortField as z };
4657
- //# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-YzRaXPVK.mjs.map
4657
+ //# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-Cwwi5rhv.mjs.map
@@ -1,2 +1,2 @@
1
- export { o as DATA_GRID_CONFIG, p as DATA_GRID_HEADER_TEXT_RESOLVER, q as DATA_GRID_TYPE_RENDERERS, r as DATA_GRID_TYPE_TRANSFORMERS, s as DEFAULT_DATA_GRID_DEFAULTS, y as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, z as gridBackendSortField, t as provideDataGridDefaults, u as provideDataGridHeaderTextResolver, v as provideDataGridHeaderTextResolverWithParent, w as provideDataGridTypeRenderers, x as provideDataGridTypeTransformers } from './reforgium-data-grid-reforgium-data-grid-YzRaXPVK.mjs';
1
+ export { o as DATA_GRID_CONFIG, p as DATA_GRID_HEADER_TEXT_RESOLVER, q as DATA_GRID_TYPE_RENDERERS, r as DATA_GRID_TYPE_TRANSFORMERS, s as DEFAULT_DATA_GRID_DEFAULTS, y as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, z as gridBackendSortField, t as provideDataGridDefaults, u as provideDataGridHeaderTextResolver, v as provideDataGridHeaderTextResolverWithParent, w as provideDataGridTypeRenderers, x as provideDataGridTypeTransformers } from './reforgium-data-grid-reforgium-data-grid-Cwwi5rhv.mjs';
2
2
  //# sourceMappingURL=reforgium-data-grid.mjs.map
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.2.5",
2
+ "version": "3.2.6",
3
3
  "name": "@reforgium/data-grid",
4
4
  "description": "reforgium DataGrid component",
5
5
  "author": "rtommievich",