ag-grid-community 33.2.3 → 33.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.
- package/dist/ag-grid-community.js +36 -21
- package/dist/ag-grid-community.min.js +1 -1
- package/dist/ag-grid-community.min.noStyle.js +1 -1
- package/dist/ag-grid-community.noStyle.js +36 -21
- package/dist/package/main.cjs.js +31 -18
- package/dist/package/main.cjs.min.js +3 -3
- package/dist/package/main.esm.min.mjs +3 -3
- package/dist/package/main.esm.mjs +31 -18
- package/dist/package/package.json +2 -2
- package/dist/types/package.json +2 -2
- package/dist/types/src/rendering/row/rowCtrl.d.ts +1 -0
- package/dist/types/src/rendering/rowRenderer.d.ts +13 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -23675,7 +23675,8 @@ class FocusService extends beanStub_1.BeanStub {
|
|
|
23675
23675
|
// grid cell will still be focused as far as the grid is concerned,
|
|
23676
23676
|
// however the browser focus will have moved somewhere else.
|
|
23677
23677
|
getFocusCellToUseAfterRefresh() {
|
|
23678
|
-
|
|
23678
|
+
const { gos, focusedCell } = this;
|
|
23679
|
+
if (gos.get('suppressFocusAfterRefresh') || gos.get('suppressCellFocus') || !focusedCell) {
|
|
23679
23680
|
return null;
|
|
23680
23681
|
}
|
|
23681
23682
|
// we check that the browser is actually focusing on the grid, if it is not, then
|
|
@@ -23684,7 +23685,7 @@ class FocusService extends beanStub_1.BeanStub {
|
|
|
23684
23685
|
if (!this.doesRowOrCellHaveBrowserFocus()) {
|
|
23685
23686
|
return null;
|
|
23686
23687
|
}
|
|
23687
|
-
return
|
|
23688
|
+
return focusedCell;
|
|
23688
23689
|
}
|
|
23689
23690
|
getFocusHeaderToUseAfterRefresh() {
|
|
23690
23691
|
if (this.gos.get('suppressFocusAfterRefresh') || !this.focusedHeader) {
|
|
@@ -43950,6 +43951,9 @@ class RowCtrl extends beanStub_1.BeanStub {
|
|
|
43950
43951
|
this.allRowGuis.forEach(callback);
|
|
43951
43952
|
}
|
|
43952
43953
|
}
|
|
43954
|
+
isRowRendered() {
|
|
43955
|
+
return this.allRowGuis.length > 0;
|
|
43956
|
+
}
|
|
43953
43957
|
onRowHeightChanged(gui) {
|
|
43954
43958
|
// check for exists first - if the user is resetting the row height, then
|
|
43955
43959
|
// it will be null (or undefined) momentarily until the next time the flatten
|
|
@@ -44449,37 +44453,50 @@ class RowRenderer extends beanStub_1.BeanStub {
|
|
|
44449
44453
|
this.allRowCtrls = liveList;
|
|
44450
44454
|
}
|
|
44451
44455
|
}
|
|
44452
|
-
|
|
44456
|
+
/**
|
|
44457
|
+
* Checks if the cell is rendered or not. Also returns true if row ctrl is present but has not rendered
|
|
44458
|
+
* cells yet.
|
|
44459
|
+
* @returns true if cellCtrl is present, or if the row is present but has not rendered rows yet
|
|
44460
|
+
*/
|
|
44461
|
+
isCellBeingRendered(rowIndex, column) {
|
|
44453
44462
|
const rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
|
|
44454
|
-
// if no column, simply check for row ctrl
|
|
44455
|
-
if (!column) {
|
|
44463
|
+
// if no column, simply check for row ctrl, if no rowCtrl then return false
|
|
44464
|
+
if (!column || !rowCtrl) {
|
|
44456
44465
|
return !!rowCtrl;
|
|
44457
44466
|
}
|
|
44458
|
-
if (rowCtrl
|
|
44467
|
+
if (rowCtrl.isFullWidth()) {
|
|
44459
44468
|
return true;
|
|
44460
44469
|
}
|
|
44461
|
-
//
|
|
44470
|
+
// return true if:
|
|
44471
|
+
// - spannedRowRenderer has a cell for this position,
|
|
44472
|
+
// - or if the rowCtrl has a cell for this column
|
|
44473
|
+
// - or if the row is not rendered yet, as it might try to render it
|
|
44462
44474
|
const spannedCell = this.beans.spannedRowRenderer?.getCellByPosition({ rowIndex, column, rowPinned: null });
|
|
44463
|
-
|
|
44464
|
-
return true;
|
|
44465
|
-
}
|
|
44466
|
-
// otherwise, check if the cell is rendered
|
|
44467
|
-
return !!rowCtrl?.getCellCtrl(column);
|
|
44475
|
+
return !!spannedCell || !!rowCtrl.getCellCtrl(column) || !rowCtrl.isRowRendered();
|
|
44468
44476
|
}
|
|
44469
44477
|
/**
|
|
44470
44478
|
* Notifies all row and cell controls of any change in focused cell.
|
|
44471
44479
|
* @param event cell focused event
|
|
44472
44480
|
*/
|
|
44481
|
+
updateCellFocus(event) {
|
|
44482
|
+
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellFocused(event));
|
|
44483
|
+
this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
|
|
44484
|
+
}
|
|
44485
|
+
/**
|
|
44486
|
+
* Called when a new cell is focused in the grid
|
|
44487
|
+
* - if the focused cell isn't rendered; re-draw rows to dry to render it
|
|
44488
|
+
* - subsequently updates all cell and row controls with the new focused cell
|
|
44489
|
+
* @param event cell focused event
|
|
44490
|
+
*/
|
|
44473
44491
|
onCellFocusChanged(event) {
|
|
44474
44492
|
// if the focused cell has not been rendered, need to render cell so focus can be captured.
|
|
44475
44493
|
if (event && event.rowIndex != null && !event.rowPinned) {
|
|
44476
44494
|
const col = this.beans.colModel.getCol(event.column) ?? undefined;
|
|
44477
|
-
if (!this.
|
|
44495
|
+
if (!this.isCellBeingRendered(event.rowIndex, col)) {
|
|
44478
44496
|
this.redraw();
|
|
44479
44497
|
}
|
|
44480
44498
|
}
|
|
44481
|
-
this.
|
|
44482
|
-
this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
|
|
44499
|
+
this.updateCellFocus(event);
|
|
44483
44500
|
}
|
|
44484
44501
|
onSuppressCellFocusChanged(suppressCellFocus) {
|
|
44485
44502
|
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onSuppressCellFocusChanged(suppressCellFocus));
|
|
@@ -44490,10 +44507,8 @@ class RowRenderer extends beanStub_1.BeanStub {
|
|
|
44490
44507
|
// all active cells.
|
|
44491
44508
|
registerCellEventListeners() {
|
|
44492
44509
|
this.addManagedEventListeners({
|
|
44493
|
-
cellFocused: (event) =>
|
|
44494
|
-
|
|
44495
|
-
},
|
|
44496
|
-
cellFocusCleared: () => this.onCellFocusChanged(),
|
|
44510
|
+
cellFocused: (event) => this.onCellFocusChanged(event),
|
|
44511
|
+
cellFocusCleared: () => this.updateCellFocus(),
|
|
44497
44512
|
flashCells: (event) => {
|
|
44498
44513
|
const { cellFlashSvc } = this.beans;
|
|
44499
44514
|
if (cellFlashSvc) {
|
|
@@ -44840,7 +44855,7 @@ class RowRenderer extends beanStub_1.BeanStub {
|
|
|
44840
44855
|
}
|
|
44841
44856
|
// if the grid lost focus, we need to try to bring it back
|
|
44842
44857
|
if (!focusSvc.doesRowOrCellHaveBrowserFocus()) {
|
|
44843
|
-
this.
|
|
44858
|
+
this.updateCellFocus((0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
|
|
44844
44859
|
...cellToFocus,
|
|
44845
44860
|
forceBrowserFocus: true,
|
|
44846
44861
|
preventScrollOnBrowserFocus: true,
|
|
@@ -57353,7 +57368,7 @@ exports.VanillaFrameworkOverrides = VanillaFrameworkOverrides;
|
|
|
57353
57368
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57354
57369
|
exports.VERSION = void 0;
|
|
57355
57370
|
// DO NOT UPDATE MANUALLY: Generated from script during build time
|
|
57356
|
-
exports.VERSION = '33.2.
|
|
57371
|
+
exports.VERSION = '33.2.4';
|
|
57357
57372
|
|
|
57358
57373
|
|
|
57359
57374
|
/***/ }),
|