ag-grid-enterprise 33.2.2 → 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.
@@ -31059,7 +31059,7 @@ class LicenseManager {
31059
31059
  }
31060
31060
  }
31061
31061
  exports.LicenseManager = LicenseManager;
31062
- LicenseManager.RELEASE_INFORMATION = 'MTc0NDEwNDI3Nzc5Nw==';
31062
+ LicenseManager.RELEASE_INFORMATION = 'MTc0NDc4ODcwODE2Nw==';
31063
31063
 
31064
31064
 
31065
31065
  /***/ }),
@@ -53106,7 +53106,7 @@ exports.clearTreeRowFlags = clearTreeRowFlags;
53106
53106
  Object.defineProperty(exports, "__esModule", ({ value: true }));
53107
53107
  exports.VERSION = void 0;
53108
53108
  // DO NOT UPDATE MANUALLY: Generated from script during build time
53109
- exports.VERSION = '33.2.2';
53109
+ exports.VERSION = '33.2.4';
53110
53110
 
53111
53111
 
53112
53112
  /***/ }),
@@ -58274,7 +58274,6 @@ function _getAriaCheckboxStateName(translate, state) {
58274
58274
 
58275
58275
  // packages/ag-grid-community/src/utils/browser.ts
58276
58276
  var isSafari;
58277
- var isChrome;
58278
58277
  var isFirefox;
58279
58278
  var isMacOs;
58280
58279
  var isIOS;
@@ -58287,13 +58286,6 @@ function _isBrowserSafari() {
58287
58286
  }
58288
58287
  return isSafari;
58289
58288
  }
58290
- function _isBrowserChrome() {
58291
- if (isChrome === void 0) {
58292
- const win = window;
58293
- isChrome = !!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime) || /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
58294
- }
58295
- return isChrome;
58296
- }
58297
58289
  function _isBrowserFirefox() {
58298
58290
  if (isFirefox === void 0) {
58299
58291
  isFirefox = /(firefox)/i.test(navigator.userAgent);
@@ -58382,7 +58374,6 @@ function _isInvisibleScrollbar() {
58382
58374
  }
58383
58375
 
58384
58376
  // packages/ag-grid-community/src/utils/dom.ts
58385
- var rtlNegativeScroll;
58386
58377
  function _radioCssClass(element, elementClass, otherElementClass) {
58387
58378
  const parent = element.parentElement;
58388
58379
  let sibling = parent && parent.firstChild;
@@ -58515,46 +58506,16 @@ function _getElementRectWithOffset(el) {
58515
58506
  bottom: offsetElementRect.bottom + (borderBottomWidth || 0)
58516
58507
  };
58517
58508
  }
58518
- function _isRtlNegativeScroll() {
58519
- if (typeof rtlNegativeScroll === "boolean") {
58520
- return rtlNegativeScroll;
58521
- }
58522
- const template = document.createElement("div");
58523
- template.style.direction = "rtl";
58524
- template.style.width = "10px";
58525
- template.style.height = "5px";
58526
- template.style.position = "fixed";
58527
- template.style.top = "0px";
58528
- template.style.overflow = "hidden";
58529
- template.dir = "rtl";
58530
- template.innerHTML = /* html */
58531
- `<div style="width: 20px">
58532
- <span style="display: inline-block; width: 1px"></span>
58533
- <span style="display: inline-block; width: 1px"></span>
58534
- </div>`;
58535
- document.body.appendChild(template);
58536
- template.scrollLeft = 1;
58537
- rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;
58538
- document.body.removeChild(template);
58539
- return rtlNegativeScroll;
58540
- }
58541
58509
  function _getScrollLeft(element, rtl) {
58542
58510
  let scrollLeft = element.scrollLeft;
58543
58511
  if (rtl) {
58544
58512
  scrollLeft = Math.abs(scrollLeft);
58545
- if (_isBrowserChrome() && !_isRtlNegativeScroll()) {
58546
- scrollLeft = element.scrollWidth - element.getBoundingClientRect().width - scrollLeft;
58547
- }
58548
58513
  }
58549
58514
  return scrollLeft;
58550
58515
  }
58551
58516
  function _setScrollLeft(element, value, rtl) {
58552
58517
  if (rtl) {
58553
- if (_isRtlNegativeScroll()) {
58554
- value *= -1;
58555
- } else if (_isBrowserSafari() || _isBrowserChrome()) {
58556
- value = element.scrollWidth - element.getBoundingClientRect().width - value;
58557
- }
58518
+ value *= -1;
58558
58519
  }
58559
58520
  element.scrollLeft = value;
58560
58521
  }
@@ -58915,7 +58876,7 @@ function _waitUntil(condition, callback, timeout = 100, timeoutMessage) {
58915
58876
  }
58916
58877
 
58917
58878
  // packages/ag-grid-community/src/version.ts
58918
- var VERSION = "33.2.2";
58879
+ var VERSION = "33.2.4";
58919
58880
 
58920
58881
  // packages/ag-grid-community/src/validation/logging.ts
58921
58882
  var MAX_URL_LENGTH = 2e3;
@@ -67703,7 +67664,7 @@ var GridBodyScrollFeature = class extends BeanStub {
67703
67664
  shouldBlockHorizontalScroll(scrollTo) {
67704
67665
  const clientWidth = this.centerRowsCtrl.getCenterWidth();
67705
67666
  const { scrollWidth } = this.centerRowsCtrl.eViewport;
67706
- if (this.enableRtl && _isRtlNegativeScroll()) {
67667
+ if (this.enableRtl) {
67707
67668
  if (scrollTo > 0) {
67708
67669
  return true;
67709
67670
  }
@@ -67745,7 +67706,7 @@ var GridBodyScrollFeature = class extends BeanStub {
67745
67706
  const minScrollLeft = 0;
67746
67707
  const maxScrollLeft = this.centerRowsCtrl.eViewport.scrollWidth - this.centerRowsCtrl.getCenterWidth();
67747
67708
  if (!fromAlignedGridsService && this.shouldBlockScrollUpdate(1 /* Horizontal */, hScrollPosition)) {
67748
- if (this.enableRtl && _isRtlNegativeScroll()) {
67709
+ if (this.enableRtl) {
67749
67710
  hScrollPosition = hScrollPosition > 0 ? 0 : maxScrollLeft;
67750
67711
  } else {
67751
67712
  hScrollPosition = Math.min(Math.max(hScrollPosition, minScrollLeft), maxScrollLeft);
@@ -69328,6 +69289,9 @@ var RowCtrl = class extends BeanStub {
69328
69289
  this.allRowGuis.forEach(callback);
69329
69290
  }
69330
69291
  }
69292
+ isRowRendered() {
69293
+ return this.allRowGuis.length > 0;
69294
+ }
69331
69295
  onRowHeightChanged(gui) {
69332
69296
  if (this.rowNode.rowHeight == null) {
69333
69297
  return;
@@ -85463,13 +85427,14 @@ var FocusService = class extends BeanStub {
85463
85427
  // grid cell will still be focused as far as the grid is concerned,
85464
85428
  // however the browser focus will have moved somewhere else.
85465
85429
  getFocusCellToUseAfterRefresh() {
85466
- if (this.gos.get("suppressFocusAfterRefresh") || !this.focusedCell) {
85430
+ const { gos, focusedCell } = this;
85431
+ if (gos.get("suppressFocusAfterRefresh") || gos.get("suppressCellFocus") || !focusedCell) {
85467
85432
  return null;
85468
85433
  }
85469
85434
  if (!this.doesRowOrCellHaveBrowserFocus()) {
85470
85435
  return null;
85471
85436
  }
85472
- return this.focusedCell;
85437
+ return focusedCell;
85473
85438
  }
85474
85439
  getFocusHeaderToUseAfterRefresh() {
85475
85440
  if (this.gos.get("suppressFocusAfterRefresh") || !this.focusedHeader) {
@@ -88859,33 +88824,44 @@ var RowRenderer = class extends BeanStub {
88859
88824
  this.allRowCtrls = liveList;
88860
88825
  }
88861
88826
  }
88862
- isCellRendered(rowIndex, column) {
88827
+ /**
88828
+ * Checks if the cell is rendered or not. Also returns true if row ctrl is present but has not rendered
88829
+ * cells yet.
88830
+ * @returns true if cellCtrl is present, or if the row is present but has not rendered rows yet
88831
+ */
88832
+ isCellBeingRendered(rowIndex, column) {
88863
88833
  const rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
88864
- if (!column) {
88834
+ if (!column || !rowCtrl) {
88865
88835
  return !!rowCtrl;
88866
88836
  }
88867
- if (rowCtrl && rowCtrl.isFullWidth()) {
88837
+ if (rowCtrl.isFullWidth()) {
88868
88838
  return true;
88869
88839
  }
88870
88840
  const spannedCell = this.beans.spannedRowRenderer?.getCellByPosition({ rowIndex, column, rowPinned: null });
88871
- if (spannedCell) {
88872
- return true;
88873
- }
88874
- return !!rowCtrl?.getCellCtrl(column);
88841
+ return !!spannedCell || !!rowCtrl.getCellCtrl(column) || !rowCtrl.isRowRendered();
88875
88842
  }
88876
88843
  /**
88877
88844
  * Notifies all row and cell controls of any change in focused cell.
88878
88845
  * @param event cell focused event
88879
88846
  */
88847
+ updateCellFocus(event) {
88848
+ this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellFocused(event));
88849
+ this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
88850
+ }
88851
+ /**
88852
+ * Called when a new cell is focused in the grid
88853
+ * - if the focused cell isn't rendered; re-draw rows to dry to render it
88854
+ * - subsequently updates all cell and row controls with the new focused cell
88855
+ * @param event cell focused event
88856
+ */
88880
88857
  onCellFocusChanged(event) {
88881
88858
  if (event && event.rowIndex != null && !event.rowPinned) {
88882
88859
  const col = this.beans.colModel.getCol(event.column) ?? void 0;
88883
- if (!this.isCellRendered(event.rowIndex, col)) {
88860
+ if (!this.isCellBeingRendered(event.rowIndex, col)) {
88884
88861
  this.redraw();
88885
88862
  }
88886
88863
  }
88887
- this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellFocused(event));
88888
- this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
88864
+ this.updateCellFocus(event);
88889
88865
  }
88890
88866
  onSuppressCellFocusChanged(suppressCellFocus) {
88891
88867
  this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onSuppressCellFocusChanged(suppressCellFocus));
@@ -88896,10 +88872,8 @@ var RowRenderer = class extends BeanStub {
88896
88872
  // all active cells.
88897
88873
  registerCellEventListeners() {
88898
88874
  this.addManagedEventListeners({
88899
- cellFocused: (event) => {
88900
- this.onCellFocusChanged(event);
88901
- },
88902
- cellFocusCleared: () => this.onCellFocusChanged(),
88875
+ cellFocused: (event) => this.onCellFocusChanged(event),
88876
+ cellFocusCleared: () => this.updateCellFocus(),
88903
88877
  flashCells: (event) => {
88904
88878
  const { cellFlashSvc } = this.beans;
88905
88879
  if (cellFlashSvc) {
@@ -89208,7 +89182,7 @@ var RowRenderer = class extends BeanStub {
89208
89182
  return;
89209
89183
  }
89210
89184
  if (!focusSvc.doesRowOrCellHaveBrowserFocus()) {
89211
- this.onCellFocusChanged(
89185
+ this.updateCellFocus(
89212
89186
  _addGridCommonParams(this.gos, {
89213
89187
  ...cellToFocus,
89214
89188
  forceBrowserFocus: true,
@@ -542,7 +542,7 @@ var _LicenseManager = class _LicenseManager {
542
542
  this.watermarkMessage = "License Expired";
543
543
  }
544
544
  };
545
- _LicenseManager.RELEASE_INFORMATION = "MTc0NDEwNDI3Nzc5Nw==";
545
+ _LicenseManager.RELEASE_INFORMATION = "MTc0NDc4ODcwODE2Nw==";
546
546
  var LicenseManager = _LicenseManager;
547
547
 
548
548
  // packages/ag-grid-enterprise/src/license/watermark.ts
@@ -5321,7 +5321,7 @@ var ExcelCreator = class extends import_ag_grid_community10.BaseCreator {
5321
5321
  var import_ag_grid_community39 = require("ag-grid-community");
5322
5322
 
5323
5323
  // packages/ag-grid-enterprise/src/version.ts
5324
- var VERSION = "33.2.2";
5324
+ var VERSION = "33.2.4";
5325
5325
 
5326
5326
  // packages/ag-grid-enterprise/src/agGridEnterpriseModule.ts
5327
5327
  var EnterpriseCoreModule = {