gm-datagrid 0.1.22 → 0.1.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.
@@ -29,20 +29,24 @@ export type ExportFormat = 'xlsx' | 'csv' | 'txt' | 'json';
29
29
  /**
30
30
  * Built-in aggregation functions — mirrors MUI DataGrid Premium's built-in set.
31
31
  * - `sum` — total of all numeric values
32
- * - `avg` — arithmetic mean of non-null values
33
- * - `min` — smallest value
34
- * - `max` — largest value
35
- * - `size` — count of non-null cells
32
+ * - `avg` — arithmetic mean of non-null values
33
+ * - `min` — smallest value (numeric or lexicographic for strings/dates)
34
+ * - `max` — largest value (numeric or lexicographic for strings/dates)
35
+ * - `size` — legacy alias for `count`
36
+ * - `count` — count of non-null cells
37
+ * - `count-distinct`— count of unique non-null values
38
+ * - `count-true` — count of truthy values (boolean columns)
39
+ * - `count-false` — count of falsy (but non-null) values (boolean columns)
36
40
  */
37
- export type AggregationFunction = 'sum' | 'avg' | 'min' | 'max' | 'size';
41
+ export type AggregationFunction = 'sum' | 'avg' | 'min' | 'max' | 'size' | 'count' | 'count-distinct' | 'count-true' | 'count-false';
38
42
  /**
39
43
  * Aggregation model — keys are column `field` names, values are function names.
40
44
  * Compatible with MUI DataGrid Premium `aggregationModel` prop.
41
45
  * @example { gross: 'sum', year: 'max' }
42
46
  */
43
47
  export type AggregationModel = Record<string, AggregationFunction>;
44
- /** Computed aggregation results — keys are column `field` names, values are the aggregated numbers. */
45
- export type AggregationResults = Record<string, number | null>;
48
+ /** Computed aggregation results — keys are column `field` names, values are the aggregated result (number or string). */
49
+ export type AggregationResults = Record<string, number | string | null>;
46
50
  export interface StatusMapEntry {
47
51
  label: string;
48
52
  color: MuiChipColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-datagrid",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Enterprise Excel-like data grid with Rust/Wasm engine, featuring inline-aligned group subtotals and automatic group aggregate preloading",
5
5
  "keywords": [
6
6
  "datagrid",