@reforgium/data-grid 2.2.3 → 2.2.4

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-Op6gjm7A.mjs';
1
+ import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-BvHXvsVe.mjs';
2
2
 
3
3
  function createGridOverlayScrollFeature(ctx) {
4
4
  const showScrollbar = () => {
@@ -76,4 +76,4 @@ function createGridOverlayScrollFeature(ctx) {
76
76
  }
77
77
 
78
78
  export { createGridOverlayScrollFeature };
79
- //# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-BSdC3IrC.mjs.map
79
+ //# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-BqjRyijB.mjs.map
@@ -1306,19 +1306,19 @@ class DataGridCellComponent {
1306
1306
  [ngTemplateOutletContext]="{ $implicit: val, value: val, row, col, index: index() }"
1307
1307
  />
1308
1308
  }
1309
- @case ('date') {
1310
- <span class="re-dg-cell-text">{{ val | date: col?.typeParams }}</span>
1311
- }
1312
- @case ('number') {
1313
- <span class="re-dg-cell-text">{{ val | number: col?.typeParams }}</span>
1314
- }
1315
- @case ('index') {
1316
- <span class="re-dg-cell-text">{{ index() + 1 }}</span>
1317
- }
1318
- @default {
1319
- <span class="re-dg-cell-text">{{ val }}</span>
1320
- }
1321
- }
1309
+ @case ('date') {
1310
+ <span class="re-dg-cell-text">{{ val | date: col?.typeParams }}</span>
1311
+ }
1312
+ @case ('number') {
1313
+ <span class="re-dg-cell-text">{{ val | number: col?.typeParams }}</span>
1314
+ }
1315
+ @case ('index') {
1316
+ <span class="re-dg-cell-text">{{ index() + 1 }}</span>
1317
+ }
1318
+ @default {
1319
+ <span class="re-dg-cell-text">{{ val }}</span>
1320
+ }
1321
+ }
1322
1322
  `, isInline: true, styles: [":host{display:block;width:100%;min-width:0;text-align:inherit}.re-dg-cell-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:var(--re-data-grid-cell-line-height, 1.2);-webkit-box-orient:vertical;-webkit-line-clamp:var(--re-data-grid-cell-max-lines, 2)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: DecimalPipe, name: "number" }] });
1323
1323
  }
1324
1324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DataGridCellComponent, decorators: [{
@@ -1353,19 +1353,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
1353
1353
  [ngTemplateOutletContext]="{ $implicit: val, value: val, row, col, index: index() }"
1354
1354
  />
1355
1355
  }
1356
- @case ('date') {
1357
- <span class="re-dg-cell-text">{{ val | date: col?.typeParams }}</span>
1358
- }
1359
- @case ('number') {
1360
- <span class="re-dg-cell-text">{{ val | number: col?.typeParams }}</span>
1361
- }
1362
- @case ('index') {
1363
- <span class="re-dg-cell-text">{{ index() + 1 }}</span>
1364
- }
1365
- @default {
1366
- <span class="re-dg-cell-text">{{ val }}</span>
1367
- }
1368
- }
1356
+ @case ('date') {
1357
+ <span class="re-dg-cell-text">{{ val | date: col?.typeParams }}</span>
1358
+ }
1359
+ @case ('number') {
1360
+ <span class="re-dg-cell-text">{{ val | number: col?.typeParams }}</span>
1361
+ }
1362
+ @case ('index') {
1363
+ <span class="re-dg-cell-text">{{ index() + 1 }}</span>
1364
+ }
1365
+ @default {
1366
+ <span class="re-dg-cell-text">{{ val }}</span>
1367
+ }
1368
+ }
1369
1369
  `, imports: [NgTemplateOutlet, DatePipe, DecimalPipe], styles: [":host{display:block;width:100%;min-width:0;text-align:inherit}.re-dg-cell-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:var(--re-data-grid-cell-line-height, 1.2);-webkit-box-orient:vertical;-webkit-line-clamp:var(--re-data-grid-cell-max-lines, 2)}\n"] }]
1370
1370
  }], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }] } });
1371
1371
 
@@ -1512,6 +1512,9 @@ function createGridInfinityPageRequestFeature(ctx) {
1512
1512
  if (state.initial || state.mode !== 'infinity') {
1513
1513
  return false;
1514
1514
  }
1515
+ if (state.total <= 0) {
1516
+ return false;
1517
+ }
1515
1518
  const threshold = Math.max(0, state.total - Math.max(1, Math.floor(state.visibleCount * PREFETCH_FACTOR)));
1516
1519
  const nearEnd = state.start + state.visibleCount >= threshold;
1517
1520
  if (!nearEnd || ctx.isLoading()) {
@@ -3165,7 +3168,7 @@ class DataGrid {
3165
3168
  if (this.overlayScrollFeaturePromise) {
3166
3169
  return this.overlayScrollFeaturePromise;
3167
3170
  }
3168
- this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-BSdC3IrC.mjs').then(({ createGridOverlayScrollFeature }) => {
3171
+ this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-BqjRyijB.mjs').then(({ createGridOverlayScrollFeature }) => {
3169
3172
  const feature = createGridOverlayScrollFeature({
3170
3173
  getScrollElement: () => this.scrollEl()?.nativeElement ?? null,
3171
3174
  getThumbTop: () => this.vm.thumbTopPx(),
@@ -3290,4 +3293,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
3290
3293
  */
3291
3294
 
3292
3295
  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, DEFAULT_DATA_GRID_DEFAULTS as p, provideDataGridDefaults as q, DataGrid as r };
3293
- //# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-Op6gjm7A.mjs.map
3296
+ //# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-BvHXvsVe.mjs.map
@@ -1,2 +1,2 @@
1
- export { o as DATA_GRID_CONFIG, p as DEFAULT_DATA_GRID_DEFAULTS, r 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, q as provideDataGridDefaults } from './reforgium-data-grid-reforgium-data-grid-Op6gjm7A.mjs';
1
+ export { o as DATA_GRID_CONFIG, p as DEFAULT_DATA_GRID_DEFAULTS, r 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, q as provideDataGridDefaults } from './reforgium-data-grid-reforgium-data-grid-BvHXvsVe.mjs';
2
2
  //# sourceMappingURL=reforgium-data-grid.mjs.map
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.3",
2
+ "version": "2.2.4",
3
3
  "name": "@reforgium/data-grid",
4
4
  "description": "reforgium DataGrid component",
5
5
  "author": "rtommievich",