@gp-grid/angular 0.13.0 → 0.13.1
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/fesm2022/gp-grid-angular.mjs +15 -5
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, output, computed, TemplateRef, ChangeDetectionStrategy, Component, ViewChild, signal, effect, HostListener, inject, PLATFORM_ID, InjectionToken, Injectable } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
4
|
-
import { isCellSelected, isCellActive,
|
|
4
|
+
import { getFieldValue, isCellSelected, isCellActive, formatCellValue, isCellInFillPreview, buildCellClasses, isCellEditing, calculateFilterPopupPosition, calculateScaledColumnPositions, getTotalWidth, calculateFillHandlePosition, DataSourceOwner, AutoScrollDriver, PendingRowDragController, InputEventAdapter, applyBatchInstructions, scrollCellIntoView, GridCore, createMutableClientDataSource } from '@gp-grid/core';
|
|
5
5
|
export { GridCore, createClientDataSource, createDataSourceFromArray, createMutableClientDataSource, createServerDataSource } from '@gp-grid/core';
|
|
6
6
|
|
|
7
7
|
const TEMPLATE$1 = `
|
|
@@ -302,8 +302,12 @@ class GridBodyComponent {
|
|
|
302
302
|
this.scrolled.emit(el.scrollLeft);
|
|
303
303
|
}
|
|
304
304
|
cellParams(rowData, column, rowIndex, colIndex) {
|
|
305
|
+
const rawValue = getFieldValue(rowData, column.field);
|
|
306
|
+
const displayValue = column.valueFormatter
|
|
307
|
+
? column.valueFormatter(rawValue)
|
|
308
|
+
: rawValue;
|
|
305
309
|
return {
|
|
306
|
-
value:
|
|
310
|
+
value: displayValue,
|
|
307
311
|
rowData,
|
|
308
312
|
column,
|
|
309
313
|
rowIndex,
|
|
@@ -339,8 +343,12 @@ class GridBodyComponent {
|
|
|
339
343
|
}
|
|
340
344
|
editParams(rowData, column, rowIndex, colIndex) {
|
|
341
345
|
const ec = this.editingCell();
|
|
346
|
+
const rawValue = getFieldValue(rowData, column.field);
|
|
347
|
+
const displayValue = column.valueFormatter
|
|
348
|
+
? column.valueFormatter(rawValue)
|
|
349
|
+
: rawValue;
|
|
342
350
|
return {
|
|
343
|
-
value:
|
|
351
|
+
value: displayValue,
|
|
344
352
|
rowData,
|
|
345
353
|
column,
|
|
346
354
|
rowIndex,
|
|
@@ -656,10 +664,12 @@ const computeUniqueValues = (distinctValues, formatter) => {
|
|
|
656
664
|
for (const val of distinctValues) {
|
|
657
665
|
if (val === null || val === undefined || val === '')
|
|
658
666
|
continue;
|
|
659
|
-
|
|
667
|
+
// Key by formatter output when available so filter-time comparison
|
|
668
|
+
// (which also goes through the formatter) matches what the user selects.
|
|
669
|
+
const key = formatter ? formatter(val) : String(val);
|
|
660
670
|
if (!seen.has(key)) {
|
|
661
671
|
seen.add(key);
|
|
662
|
-
result.push({ key, label:
|
|
672
|
+
result.push({ key, label: key });
|
|
663
673
|
}
|
|
664
674
|
}
|
|
665
675
|
return result.sort((a, b) => a.label.localeCompare(b.label, undefined, { numeric: true, sensitivity: 'base' }));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gp-grid/angular",
|
|
3
3
|
"description": "A high-performance Angular data grid component with virtual scrolling, cell selection, sorting, filtering, and Excel-like editing",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"module": "fesm2022/gp-grid-angular.mjs",
|
|
7
7
|
"typings": "types/gp-grid-angular.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@angular/core": ">=18.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@gp-grid/core": "0.13.
|
|
54
|
+
"@gp-grid/core": "0.13.1",
|
|
55
55
|
"tslib": "^2.8.1"
|
|
56
56
|
},
|
|
57
57
|
"sideEffects": false,
|