Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Production Build
BUILD_GRID_VERSION=35.3.0
BUILD_CHARTS_VERSION=13.3.0
ENV=production
BUILD_GRID_VERSION=35.3.0-beta.20260519.1722
BUILD_CHARTS_VERSION=13.3.0-beta.20260519
ENV=local
NX_BATCH_MODE=true
NX_ADD_PLUGINS=false
BUILD_FWS=1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gh-comment-hook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

const prLink = `https://github.com/${owner}/${repo}/pull/${issue_number}`;
// Sentinel string embedded in the comment so we can detect it later and avoid duplicates
const sentinel = `<!-- gh-pr-mention:pr=${issue_number} -->`;
const sentinel = `gh-pr-mention:pr=${issue_number}`;

const paragraph = (content) => ({ type: 'paragraph', content: Array.isArray(content) ? content : [content] });
const txt = (text) => ({ text, type: 'text' });
Expand All @@ -77,7 +77,7 @@ jobs:
const alreadyPosted = existing?.some(c => {
// Comments stored as ADF; fall back to plain text check on stringified body
const raw = JSON.stringify(c.body || '');
return raw.includes(`pr=${issue_number}`);
return raw.includes(sentinel);
});
if (alreadyPosted) {
console.log(`Skipping ${ticket} — already has a comment for PR #${issue_number}`);
Expand All @@ -89,12 +89,12 @@ jobs:
version: 1,
content: [
paragraph([
txt(`${sentinel}[This issue was mentioned in `),
txt(`This issue was mentioned in `),
link(`PR #${issue_number}`, prLink),
pr_title ? txt(` — ${pr_title}`) : txt(''),
txt(' by '),
link('CI workflow', process.env.JOB_URL || '#'),
txt('.]'),
txt(`.\n${sentinel}`),
]),
],
};
Expand Down
2 changes: 1 addition & 1 deletion community-modules/locale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ag-grid-community/locale",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "Localisation Module for AG Grid, providing translations in 31 languages.",
"main": "./dist/package/main.cjs.js",
"types": "./dist/types/src/main.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion community-modules/styles/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ag-grid-community/styles",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "AG Grid Styles and Themes",
"main": "_index.scss",
"files": [
Expand Down
24 changes: 12 additions & 12 deletions documentation/ag-grid-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ag-grid-docs",
"description": "Documentation for AG Grid",
"type": "module",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"repository": {
"type": "git",
"url": "https://github.com/ag-grid/ag-grid.git"
Expand Down Expand Up @@ -53,17 +53,17 @@
"@tweenjs/tween.js": "^18.6.4",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"ag-charts-angular": "13.3.0",
"ag-charts-community": "13.3.0",
"ag-charts-enterprise": "13.3.0",
"ag-charts-types": "13.3.0",
"ag-charts-react": "13.3.0",
"ag-charts-vue3": "13.3.0",
"ag-grid-angular": "35.3.0",
"ag-grid-community": "35.3.0",
"ag-grid-enterprise": "35.3.0",
"ag-grid-react": "35.3.0",
"ag-grid-vue3": "35.3.0",
"ag-charts-angular": "13.3.0-beta.20260519",
"ag-charts-community": "13.3.0-beta.20260519",
"ag-charts-enterprise": "13.3.0-beta.20260519",
"ag-charts-types": "13.3.0-beta.20260519",
"ag-charts-react": "13.3.0-beta.20260519",
"ag-charts-vue3": "13.3.0-beta.20260519",
"ag-grid-angular": "35.3.0-beta.20260519.1722",
"ag-grid-community": "35.3.0-beta.20260519.1722",
"ag-grid-enterprise": "35.3.0-beta.20260519.1722",
"ag-grid-react": "35.3.0-beta.20260519.1722",
"ag-grid-vue3": "35.3.0-beta.20260519.1722",
"algoliasearch": "^5.51.0",
"astro": "6.1.9",
"cheerio": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const gridOptions = {
### Allowed Functions

To restrict the aggregation functions that can be applied to a column, set the `allowedAggFuncs` column
definition property to an array of allowed aggregation function names.
definition property to an array of allowed aggregation function names. The functions appear in the order specified in the array.

{% gridExampleRunner title="Allowed Aggregations" name="user-configured-allowed-aggregations" /%}

Expand Down
2 changes: 1 addition & 1 deletion documentation/update-algolia-indices/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "update-algolia-indices",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "Update algolia indices",
"main": "src/index.ts",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"license": "MIT",
"scripts": {
"compressVideo": "tsx external/ag-website-shared/scripts/compress-video",
Expand Down
6 changes: 3 additions & 3 deletions packages/ag-grid-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid-angular",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "AG Grid Angular Component",
"scripts": {
"clean": "rimraf dist",
Expand All @@ -15,7 +15,7 @@
"module": "./dist/ag-grid-angular/fesm2022/ag-grid-angular.mjs",
"typings": "./dist/ag-grid-angular/index.d.ts",
"dependencies": {
"ag-grid-community": "35.3.0",
"ag-grid-community": "35.3.0-beta.20260519.1722",
"@angular/animations": "^20.0.0",
"@angular/common": "^20.0.0",
"@angular/compiler": "^20.0.0",
Expand All @@ -27,7 +27,7 @@
"zone.js": "~0.15.1"
},
"devDependencies": {
"ag-grid-community": "35.3.0",
"ag-grid-community": "35.3.0-beta.20260519.1722",
"@angular/build": "^20.0.0",
"@angular/cli": "^20.0.0",
"@angular/forms": "^20.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "ag-grid-angular",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "AG Grid Angular Component",
"license": "MIT",
"peerDependencies": {
"@angular/common": ">= 20.0.0",
"@angular/core": ">= 20.0.0"
},
"dependencies": {
"ag-grid-community": "35.3.0",
"ag-grid-community": "35.3.0-beta.20260519.1722",
"tslib": "^2.8.1"
},
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/ag-grid-community/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid-community",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"main": "./dist/package/main.cjs.js",
"types": "./dist/types/src/main.d.ts",
Expand Down Expand Up @@ -119,7 +119,7 @@
],
"homepage": "https://www.ag-grid.com/",
"dependencies": {
"ag-charts-types": "13.3.0"
"ag-charts-types": "13.3.0-beta.20260519"
},
"devDependencies": {
"web-streams-polyfill": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ag-grid-community/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// DO NOT UPDATE MANUALLY: Generated from script during build time
export const VERSION = '35.3.0';
export const VERSION = '35.3.0-beta.20260519.1722';
12 changes: 6 additions & 6 deletions packages/ag-grid-enterprise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid-enterprise",
"version": "35.3.0",
"version": "35.3.0-beta.20260519.1722",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"main": "./dist/package/main.cjs.js",
"types": "./dist/types/src/main.d.ts",
Expand Down Expand Up @@ -113,15 +113,15 @@
],
"homepage": "https://www.ag-grid.com/",
"dependencies": {
"ag-grid-community": "35.3.0"
"ag-grid-community": "35.3.0-beta.20260519.1722"
},
"optionalDependencies": {
"ag-charts-community": "13.3.0",
"ag-charts-enterprise": "13.3.0"
"ag-charts-community": "13.3.0-beta.20260519",
"ag-charts-enterprise": "13.3.0-beta.20260519"
},
"devDependencies": {
"ag-charts-community": "13.3.0",
"ag-charts-enterprise": "13.3.0",
"ag-charts-community": "13.3.0-beta.20260519",
"ag-charts-enterprise": "13.3.0-beta.20260519",
"canvas": "^3.2.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GridOptionsService, IAggFuncParams } from 'ag-grid-community';
import type { AgColumn, GridOptionsService, IAggFuncParams } from 'ag-grid-community';

import { mock } from '../test-utils/mock';
import { AggFuncService } from './aggFuncService';
Expand All @@ -13,12 +13,45 @@ function createService(): AggFuncService {
return service;
}

function createColumn(allowedAggFuncs?: string[]): AgColumn {
return { colDef: { allowedAggFuncs } } as AgColumn;
}

function createParams(values: any[]): IAggFuncParams {
return {
values: values,
} as IAggFuncParams;
}

describe('getFuncNames', () => {
it('returns built-in functions in priority order', () => {
const service = createService();
service.getAggFunc('sum');
const result = service.getFuncNames(createColumn());

expect(result).toEqual(['sum', 'avg', 'max', 'min', 'count', 'first', 'last']);
});

it('appends custom functions after built-ins in alphabetical order', () => {
const service = createService();
service.addAggFuncs({
median: () => 0,
absolute: () => 0,
zScore: () => 0,
});
const result = service.getFuncNames(createColumn());

expect(result).toEqual(['sum', 'avg', 'max', 'min', 'count', 'first', 'last', 'absolute', 'median', 'zScore']);
});

it('returns allowedAggFuncs as-is when specified on the column', () => {
const service = createService();
const result = service.getFuncNames(createColumn(['count', 'sum']));

expect(result).toEqual(['count', 'sum']);
});
});

describe('aggSum', () => {
const sum = createService().getAggFunc('sum');

Expand Down
61 changes: 38 additions & 23 deletions packages/ag-grid-enterprise/src/aggregation/aggFuncService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ const defaultAggFuncNames = {
count: 'Count',
avg: 'Average',
} as const;

const DEFAULT_AGG_FUNC_ORDER: DefaultAggFuncName[] = ['sum', 'avg', 'max', 'min', 'count', 'first', 'last'];
type DefaultAggFuncName = keyof typeof defaultAggFuncNames;

export class AggFuncService extends BeanStub implements NamedBean, IAggFuncService {
beanName = 'aggFuncSvc' as const;

private aggFuncsMap: { [key in string]: IAggFunc } = {};
private readonly aggFuncsMap = new Map<string, IAggFunc>();
private orderedFuncNames: string[] = [];
private initialised = false;

public postConstruct(): void {
Expand All @@ -32,22 +35,16 @@ export class AggFuncService extends BeanStub implements NamedBean, IAggFuncServi
}

private initialiseWithDefaultAggregations(): void {
const aggMap = this.aggFuncsMap as { [key in DefaultAggFuncName]: IAggFunc };
aggMap['sum'] = aggSum;
aggMap['first'] = aggFirst;
aggMap['last'] = aggLast;
aggMap['min'] = aggMin;
aggMap['max'] = aggMax;
aggMap['count'] = aggCount;
aggMap['avg'] = aggAvg;
const funcMap = this.aggFuncsMap;
funcMap.set('sum', aggSum);
funcMap.set('first', aggFirst);
funcMap.set('last', aggLast);
funcMap.set('min', aggMin);
funcMap.set('max', aggMax);
funcMap.set('count', aggCount);
funcMap.set('avg', aggAvg);
this.initialised = true;
}

private isAggFuncPossible(column: AgColumn, func: string): boolean {
const allKeys = this.getFuncNames(column);
const allowed = allKeys.includes(func);
const funcExists = _exists(this.aggFuncsMap[func]);
return allowed && funcExists;
this.updateOrderedFuncNames();
}

public getDefaultFuncLabel(fctName: DefaultAggFuncName): string {
Expand All @@ -57,11 +54,14 @@ export class AggFuncService extends BeanStub implements NamedBean, IAggFuncServi
public getDefaultAggFunc(column: AgColumn): string | null {
const defaultAgg = column.colDef.defaultAggFunc;

if (_exists(defaultAgg) && this.isAggFuncPossible(column, defaultAgg)) {
const isAggFuncPossible = (func: string) =>
_exists(this.aggFuncsMap.get(func)) && this.getFuncNames(column).includes(func);

if (_exists(defaultAgg) && isAggFuncPossible(defaultAgg)) {
return defaultAgg;
}

if (this.isAggFuncPossible(column, 'sum')) {
if (isAggFuncPossible('sum')) {
return 'sum';
}

Expand All @@ -76,24 +76,39 @@ export class AggFuncService extends BeanStub implements NamedBean, IAggFuncServi
}
for (const key of Object.keys(aggFuncs)) {
if (aggFuncs[key]) {
this.aggFuncsMap[key] = aggFuncs[key];
this.aggFuncsMap.set(key, aggFuncs[key]);
}
}
this.updateOrderedFuncNames();
}

public getAggFunc(name: string): IAggFunc {
this.init();
return this.aggFuncsMap[name];
return this.aggFuncsMap.get(name)!;
}

public getFuncNames(column: AgColumn): string[] {
const userAllowedFuncs = column.colDef.allowedAggFuncs;
return column.colDef.allowedAggFuncs ?? this.orderedFuncNames.slice();
}

return userAllowedFuncs == null ? Object.keys(this.aggFuncsMap).sort() : userAllowedFuncs;
private updateOrderedFuncNames(): void {
const result: string[] = [];
for (const key of DEFAULT_AGG_FUNC_ORDER) {
if (this.aggFuncsMap.has(key)) {
result.push(key);
}
}
for (const key of [...this.aggFuncsMap.keys()].sort()) {
if (!(key in defaultAggFuncNames)) {
result.push(key);
}
}
this.orderedFuncNames = result;
}

public clear(): void {
this.aggFuncsMap = {};
this.aggFuncsMap.clear();
this.orderedFuncNames = [];
}
}

Expand Down
Loading
Loading