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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Production Build
BUILD_GRID_VERSION=35.0.0-beta.20260118.2037
BUILD_CHARTS_VERSION=13.0.0-beta.20260118
BUILD_GRID_VERSION=35.0.0-beta.20260120.1527
BUILD_CHARTS_VERSION=13.0.0-beta.20260120
ENV=local
NX_BATCH_MODE=true
NX_ADD_PLUGINS=false
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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"repository": {
"type": "git",
"url": "https://github.com/ag-grid/ag-grid.git"
Expand Down Expand Up @@ -53,17 +53,17 @@
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@pqina/flip": "^1.8.4",
"ag-charts-angular": "13.0.0-beta.20260118",
"ag-charts-community": "13.0.0-beta.20260118",
"ag-charts-enterprise": "13.0.0-beta.20260118",
"ag-charts-types": "13.0.0-beta.20260118",
"ag-charts-react": "13.0.0-beta.20260118",
"ag-charts-vue3": "13.0.0-beta.20260118",
"ag-grid-angular": "35.0.0-beta.20260118.2037",
"ag-grid-community": "35.0.0-beta.20260118.2037",
"ag-grid-enterprise": "35.0.0-beta.20260118.2037",
"ag-grid-react": "35.0.0-beta.20260118.2037",
"ag-grid-vue3": "35.0.0-beta.20260118.2037",
"ag-charts-angular": "13.0.0-beta.20260120",
"ag-charts-community": "13.0.0-beta.20260120",
"ag-charts-enterprise": "13.0.0-beta.20260120",
"ag-charts-types": "13.0.0-beta.20260120",
"ag-charts-react": "13.0.0-beta.20260120",
"ag-charts-vue3": "13.0.0-beta.20260120",
"ag-grid-angular": "35.0.0-beta.20260120.1527",
"ag-grid-community": "35.0.0-beta.20260120.1527",
"ag-grid-enterprise": "35.0.0-beta.20260120.1527",
"ag-grid-react": "35.0.0-beta.20260120.1527",
"ag-grid-vue3": "35.0.0-beta.20260120.1527",
"algoliasearch": "^4.18.0",
"astro": "5.16.6",
"cheerio": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
flex-direction: column;
padding-left: 0;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
list-style: none;
z-index: -2;
Expand All @@ -71,7 +72,7 @@
}
}

.sideNav li:not(.level1) {
.sideNav li:where(:not(.level1)) {
--item-gap: 0.875em;

position: relative;
Expand Down Expand Up @@ -142,7 +143,6 @@

.sideNav .level1 {
margin-top: 0;
padding-bottom: 16px;

a {
display: inline-flex;
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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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.0.0-beta.20260118.2037",
"ag-grid-community": "35.0.0-beta.20260120.1527",
"@angular/animations": "^18.0.7",
"@angular/common": "^18.0.7",
"@angular/compiler": "^18.0.7",
Expand All @@ -27,7 +27,7 @@
"zone.js": "~0.15.1"
},
"devDependencies": {
"ag-grid-community": "35.0.0-beta.20260118.2037",
"ag-grid-community": "35.0.0-beta.20260120.1527",
"@angular-devkit/build-angular": "^18.0.7",
"@angular/cli": "^18.0.7",
"@angular/forms": "^18.0.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "ag-grid-angular",
"version": "35.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"description": "AG Grid Angular Component",
"license": "MIT",
"peerDependencies": {
"@angular/common": ">= 18.0.0",
"@angular/core": ">= 18.0.0"
},
"dependencies": {
"ag-grid-community": "35.0.0-beta.20260118.2037",
"ag-grid-community": "35.0.0-beta.20260120.1527",
"tslib": "^2.3.0"
},
"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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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.0.0-beta.20260118"
"ag-charts-types": "13.0.0-beta.20260120"
},
"devDependencies": {
"source-map-loader": "^5.0.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.0.0-beta.20260118.2037';
export const VERSION = '35.0.0-beta.20260120.1527';
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.0.0-beta.20260118.2037",
"version": "35.0.0-beta.20260120.1527",
"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,16 +113,16 @@
],
"homepage": "https://www.ag-grid.com/",
"dependencies": {
"ag-grid-community": "35.0.0-beta.20260118.2037"
"ag-grid-community": "35.0.0-beta.20260120.1527"
},
"optionalDependencies": {
"ag-charts-community": "13.0.0-beta.20260118",
"ag-charts-enterprise": "13.0.0-beta.20260118"
"ag-charts-community": "13.0.0-beta.20260120",
"ag-charts-enterprise": "13.0.0-beta.20260120"
},
"devDependencies": {
"source-map-loader": "^5.0.0",
"ag-charts-community": "13.0.0-beta.20260118",
"ag-charts-enterprise": "13.0.0-beta.20260118",
"ag-charts-community": "13.0.0-beta.20260120",
"ag-charts-enterprise": "13.0.0-beta.20260120",
"ts-loader": "^9.5.1",
"esbuild-loader": "^4.4.0",
"style-loader": "^3.3.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
GridOptionsService,
GridOptionsWithDefaults,
} from 'ag-grid-community';
import { AgPopupComponent, KeyCode, RefPlaceholder, _exists, _fuzzySuggestions } from 'ag-grid-community';
import { AgPopupComponent, KeyCode, RefPlaceholder, _exists, _fuzzySuggestions, _isVisible } from 'ag-grid-community';

import { VirtualList } from '../../widgets/virtualList';
import { AgAutocompleteRow } from './agAutocompleteRow';
Expand Down Expand Up @@ -43,6 +43,7 @@ export class AgAutocompleteList extends AgPopupComponent<
private selectedValue: AutocompleteEntry;

private searchString = '';
private lastAutoListHeight: number | null = null;

constructor(
private readonly params: {
Expand All @@ -52,6 +53,7 @@ export class AgAutocompleteList extends AgPopupComponent<
useStartsWithSearch?: boolean;
autoSizeList?: boolean;
maxVisibleItems?: number;
onListHeightChanged?: () => void;
forceLastSelection?: (lastSelection: AutocompleteEntry, searchString: string) => boolean;
}
) {
Expand Down Expand Up @@ -209,7 +211,16 @@ export class AgAutocompleteList extends AgPopupComponent<
height = rowHeight;
}

if (this.lastAutoListHeight === height) {
return;
}

this.lastAutoListHeight = height;
this.eList.style.height = `${height}px`;

if (_isVisible(this.eList)) {
this.params.onListHeightChanged?.();
}
}

private checkSetSelectedValue(index: number): void {
Expand Down Expand Up @@ -254,6 +265,7 @@ export class AgAutocompleteList extends AgPopupComponent<

public afterGuiAttached(): void {
this.virtualList.refresh();
this.updateListHeight();
}

public getSelectedValue(): AutocompleteEntry | null {
Expand Down
2 changes: 1 addition & 1 deletion packages/ag-grid-enterprise/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.0.0-beta.20260118.2037';
export const VERSION = '35.0.0-beta.20260120.1527';
46 changes: 35 additions & 11 deletions packages/ag-grid-enterprise/src/widgets/agFormulaInputField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { agFormulaInputFieldCSS } from './agFormulaInputField.css-GENERATED';
import { FormulaInputAutocompleteFeature } from './formulaInputAutocompleteFeature';
import { FormulaInputRangeSyncFeature } from './formulaInputRangeSyncFeature';
import { TOKEN_INSERT_AFTER_CHARS, getPreviousNonSpaceChar } from './formulaInputTokenUtils';
import { getColorClassesForRef } from './formulaRangeUtils';
import { getColorClassesForRef, getRefTokenMatchesForFormula } from './formulaRangeUtils';

const FORMULA_TOKEN_COLOR_COUNT = 7;
const DISPLAY_OPERATOR_LOOKUP: Record<string, string> = {
Expand Down Expand Up @@ -205,7 +205,7 @@ export class AgFormulaInputField extends AgContentEditableField<
return;
}

const refsInOrder = getOrderedRefs(value);
const refsInOrder = getOrderedRefs(this.beans, value);
let changed = refsInOrder.length !== this.formulaColorByRef.size;
const nextColors = new Map<string, number>();
refsInOrder.forEach((ref, index) => {
Expand Down Expand Up @@ -285,7 +285,7 @@ export class AgFormulaInputField extends AgContentEditableField<
const replaceLen = isNew || this.lastTokenValueLength == null ? 0 : this.lastTokenValueLength;
const value = this.getCurrentValue();
const updatedValue = value.slice(0, valueOffset) + ref + value.slice(valueOffset + replaceLen);
const tokenIndex = getTokenMatchAtOffset(updatedValue, valueOffset)?.index ?? null;
const tokenIndex = getTokenMatchAtOffset(this.beans, updatedValue, valueOffset)?.index ?? null;
let previousRef: string | undefined;
this.applyFormulaValueChange({
currentValue: value,
Expand All @@ -301,7 +301,7 @@ export class AgFormulaInputField extends AgContentEditableField<

public removeTokenRef(ref: string, tokenIndex?: number | null): boolean {
const value = this.getCurrentValue();
const matches = getRefTokenMatches(value);
const matches = getRefTokenMatchesForFormula(this.beans, value);
let token: TokenMatch | undefined;

if (tokenIndex != null) {
Expand Down Expand Up @@ -353,7 +353,7 @@ export class AgFormulaInputField extends AgContentEditableField<

const { valueOffset } = caretOffsets;
// if the caret is inside/adjacent to a token, replace that token.
const tokenMatch = getTokenMatchAtOffset(value, valueOffset);
const tokenMatch = getTokenMatchAtOffset(this.beans, value, valueOffset);

if (tokenMatch) {
const { end: tokenEnd, ref: tokenRef } = tokenMatch;
Expand All @@ -366,6 +366,15 @@ export class AgFormulaInputField extends AgContentEditableField<
return { action: 'replace', previousRef, tokenIndex };
}

// allow replacement for A1-like refs even when they are invalid for the current grid state.
const rawTokenMatch = getRawTokenMatchAtOffset(value, valueOffset);
if (rawTokenMatch) {
const updated = value.slice(0, rawTokenMatch.start) + ref + value.slice(rawTokenMatch.end);
const tokenIndex = getTokenMatchAtOffset(this.beans, updated, rawTokenMatch.start)?.index ?? null;
const { previousRef } = this.replaceTokenAtMatch(rawTokenMatch, ref, tokenIndex);
return { action: 'replace', previousRef, tokenIndex };
}

// only insert new refs after operator-like chars; otherwise we end the edit on click.
if (!shouldInsertTokenAtOffset(value, valueOffset)) {
return { action: 'none' };
Expand Down Expand Up @@ -397,7 +406,11 @@ export class AgFormulaInputField extends AgContentEditableField<
});
}

private replaceTokenAtMatch(token: TokenMatch, nextRef: string): TokenInsertResult {
private replaceTokenAtMatch(
token: TokenMatch,
nextRef: string,
tokenIndexOverride?: number | null
): TokenInsertResult {
// replace the exact token span so we don't accidentally touch adjacent text.
const value = this.getCurrentValue();
const updated = value.slice(0, token.start) + nextRef + value.slice(token.end);
Expand All @@ -411,7 +424,8 @@ export class AgFormulaInputField extends AgContentEditableField<
},
});

return { previousRef: token.ref, tokenIndex: token.index };
// preserve the caller's token index if it was recomputed for the updated value.
return { previousRef: token.ref, tokenIndex: tokenIndexOverride ?? token.index };
}

private getValueOffsetFromCaret(caretOffset: number): number | null {
Expand Down Expand Up @@ -620,11 +634,11 @@ const shouldUseTokenColors = (beans: BeanCollection): boolean => {
// walk the formula left-to-right, capture the first occurrence of each distinct ref,
// and assign colors in encounter order so token colors stay stable every time the
// user re-enters the editor (A1 -> color1, next ref -> color2, etc.).
const getOrderedRefs = (value: string): string[] => {
const getOrderedRefs = (beans: BeanCollection, value: string): string[] => {
// collect unique refs in their first-seen order to keep colors stable across re-entry.
const refsInOrder: string[] = [];
const seen = new Set<string>();
for (const match of getRefTokenMatches(value)) {
for (const match of getRefTokenMatchesForFormula(beans, value)) {
const ref = match.ref;
if (seen.has(ref)) {
continue;
Expand All @@ -635,8 +649,18 @@ const getOrderedRefs = (value: string): string[] => {
return refsInOrder;
};

const getTokenMatchAtOffset = (value: string, offset: number): TokenMatch | null => {
const getTokenMatchAtOffset = (beans: BeanCollection, value: string, offset: number): TokenMatch | null => {
// locate the token (if any) that covers the given value offset.
for (const match of getRefTokenMatchesForFormula(beans, value)) {
if (offset >= match.start && offset <= match.end) {
return { ref: match.ref, start: match.start, end: match.end, index: match.index };
}
}
return null;
};

const getRawTokenMatchAtOffset = (value: string, offset: number): TokenMatch | null => {
// match any A1-like token so invalid refs can still be replaced.
for (const match of getRefTokenMatches(value)) {
if (offset >= match.start && offset <= match.end) {
return { ref: match.ref, start: match.start, end: match.end, index: match.index };
Expand All @@ -660,7 +684,7 @@ const tokenize = (
// split the formula into text + token nodes while preserving operators for display.
const nodes: Node[] = [];
let lastIndex = 0;
const matches = getRefTokenMatches(value);
const matches = getRefTokenMatchesForFormula(beans, value);
const doc = _getDocument(beans);

for (const match of matches) {
Expand Down
Loading
Loading