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.
@@ -32479,7 +32479,7 @@ class LicenseManager {
32479
32479
  }
32480
32480
  }
32481
32481
  exports.LicenseManager = LicenseManager;
32482
- LicenseManager.RELEASE_INFORMATION = 'MTc0NDEwNDI3Nzc5Nw==';
32482
+ LicenseManager.RELEASE_INFORMATION = 'MTc0NDc4ODcwODE2Nw==';
32483
32483
 
32484
32484
 
32485
32485
  /***/ }),
@@ -54540,7 +54540,7 @@ exports.clearTreeRowFlags = clearTreeRowFlags;
54540
54540
  Object.defineProperty(exports, "__esModule", ({ value: true }));
54541
54541
  exports.VERSION = void 0;
54542
54542
  // DO NOT UPDATE MANUALLY: Generated from script during build time
54543
- exports.VERSION = '33.2.2';
54543
+ exports.VERSION = '33.2.4';
54544
54544
 
54545
54545
 
54546
54546
  /***/ }),
@@ -59708,7 +59708,6 @@ function _getAriaCheckboxStateName(translate, state) {
59708
59708
 
59709
59709
  // packages/ag-grid-community/src/utils/browser.ts
59710
59710
  var isSafari;
59711
- var isChrome;
59712
59711
  var isFirefox;
59713
59712
  var isMacOs;
59714
59713
  var isIOS;
@@ -59721,13 +59720,6 @@ function _isBrowserSafari() {
59721
59720
  }
59722
59721
  return isSafari;
59723
59722
  }
59724
- function _isBrowserChrome() {
59725
- if (isChrome === void 0) {
59726
- const win = window;
59727
- isChrome = !!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime) || /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
59728
- }
59729
- return isChrome;
59730
- }
59731
59723
  function _isBrowserFirefox() {
59732
59724
  if (isFirefox === void 0) {
59733
59725
  isFirefox = /(firefox)/i.test(navigator.userAgent);
@@ -59816,7 +59808,6 @@ function _isInvisibleScrollbar() {
59816
59808
  }
59817
59809
 
59818
59810
  // packages/ag-grid-community/src/utils/dom.ts
59819
- var rtlNegativeScroll;
59820
59811
  function _radioCssClass(element, elementClass, otherElementClass) {
59821
59812
  const parent = element.parentElement;
59822
59813
  let sibling = parent && parent.firstChild;
@@ -59949,46 +59940,16 @@ function _getElementRectWithOffset(el) {
59949
59940
  bottom: offsetElementRect.bottom + (borderBottomWidth || 0)
59950
59941
  };
59951
59942
  }
59952
- function _isRtlNegativeScroll() {
59953
- if (typeof rtlNegativeScroll === "boolean") {
59954
- return rtlNegativeScroll;
59955
- }
59956
- const template = document.createElement("div");
59957
- template.style.direction = "rtl";
59958
- template.style.width = "10px";
59959
- template.style.height = "5px";
59960
- template.style.position = "fixed";
59961
- template.style.top = "0px";
59962
- template.style.overflow = "hidden";
59963
- template.dir = "rtl";
59964
- template.innerHTML = /* html */
59965
- `<div style="width: 20px">
59966
- <span style="display: inline-block; width: 1px"></span>
59967
- <span style="display: inline-block; width: 1px"></span>
59968
- </div>`;
59969
- document.body.appendChild(template);
59970
- template.scrollLeft = 1;
59971
- rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;
59972
- document.body.removeChild(template);
59973
- return rtlNegativeScroll;
59974
- }
59975
59943
  function _getScrollLeft(element, rtl) {
59976
59944
  let scrollLeft = element.scrollLeft;
59977
59945
  if (rtl) {
59978
59946
  scrollLeft = Math.abs(scrollLeft);
59979
- if (_isBrowserChrome() && !_isRtlNegativeScroll()) {
59980
- scrollLeft = element.scrollWidth - element.getBoundingClientRect().width - scrollLeft;
59981
- }
59982
59947
  }
59983
59948
  return scrollLeft;
59984
59949
  }
59985
59950
  function _setScrollLeft(element, value, rtl) {
59986
59951
  if (rtl) {
59987
- if (_isRtlNegativeScroll()) {
59988
- value *= -1;
59989
- } else if (_isBrowserSafari() || _isBrowserChrome()) {
59990
- value = element.scrollWidth - element.getBoundingClientRect().width - value;
59991
- }
59952
+ value *= -1;
59992
59953
  }
59993
59954
  element.scrollLeft = value;
59994
59955
  }
@@ -60349,7 +60310,7 @@ function _waitUntil(condition, callback, timeout = 100, timeoutMessage) {
60349
60310
  }
60350
60311
 
60351
60312
  // packages/ag-grid-community/src/version.ts
60352
- var VERSION = "33.2.2";
60313
+ var VERSION = "33.2.4";
60353
60314
 
60354
60315
  // packages/ag-grid-community/src/validation/logging.ts
60355
60316
  var MAX_URL_LENGTH = 2e3;
@@ -69137,7 +69098,7 @@ var GridBodyScrollFeature = class extends BeanStub {
69137
69098
  shouldBlockHorizontalScroll(scrollTo) {
69138
69099
  const clientWidth = this.centerRowsCtrl.getCenterWidth();
69139
69100
  const { scrollWidth } = this.centerRowsCtrl.eViewport;
69140
- if (this.enableRtl && _isRtlNegativeScroll()) {
69101
+ if (this.enableRtl) {
69141
69102
  if (scrollTo > 0) {
69142
69103
  return true;
69143
69104
  }
@@ -69179,7 +69140,7 @@ var GridBodyScrollFeature = class extends BeanStub {
69179
69140
  const minScrollLeft = 0;
69180
69141
  const maxScrollLeft = this.centerRowsCtrl.eViewport.scrollWidth - this.centerRowsCtrl.getCenterWidth();
69181
69142
  if (!fromAlignedGridsService && this.shouldBlockScrollUpdate(1 /* Horizontal */, hScrollPosition)) {
69182
- if (this.enableRtl && _isRtlNegativeScroll()) {
69143
+ if (this.enableRtl) {
69183
69144
  hScrollPosition = hScrollPosition > 0 ? 0 : maxScrollLeft;
69184
69145
  } else {
69185
69146
  hScrollPosition = Math.min(Math.max(hScrollPosition, minScrollLeft), maxScrollLeft);
@@ -70762,6 +70723,9 @@ var RowCtrl = class extends BeanStub {
70762
70723
  this.allRowGuis.forEach(callback);
70763
70724
  }
70764
70725
  }
70726
+ isRowRendered() {
70727
+ return this.allRowGuis.length > 0;
70728
+ }
70765
70729
  onRowHeightChanged(gui) {
70766
70730
  if (this.rowNode.rowHeight == null) {
70767
70731
  return;
@@ -86897,13 +86861,14 @@ var FocusService = class extends BeanStub {
86897
86861
  // grid cell will still be focused as far as the grid is concerned,
86898
86862
  // however the browser focus will have moved somewhere else.
86899
86863
  getFocusCellToUseAfterRefresh() {
86900
- if (this.gos.get("suppressFocusAfterRefresh") || !this.focusedCell) {
86864
+ const { gos, focusedCell } = this;
86865
+ if (gos.get("suppressFocusAfterRefresh") || gos.get("suppressCellFocus") || !focusedCell) {
86901
86866
  return null;
86902
86867
  }
86903
86868
  if (!this.doesRowOrCellHaveBrowserFocus()) {
86904
86869
  return null;
86905
86870
  }
86906
- return this.focusedCell;
86871
+ return focusedCell;
86907
86872
  }
86908
86873
  getFocusHeaderToUseAfterRefresh() {
86909
86874
  if (this.gos.get("suppressFocusAfterRefresh") || !this.focusedHeader) {
@@ -90293,33 +90258,44 @@ var RowRenderer = class extends BeanStub {
90293
90258
  this.allRowCtrls = liveList;
90294
90259
  }
90295
90260
  }
90296
- isCellRendered(rowIndex, column) {
90261
+ /**
90262
+ * Checks if the cell is rendered or not. Also returns true if row ctrl is present but has not rendered
90263
+ * cells yet.
90264
+ * @returns true if cellCtrl is present, or if the row is present but has not rendered rows yet
90265
+ */
90266
+ isCellBeingRendered(rowIndex, column) {
90297
90267
  const rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
90298
- if (!column) {
90268
+ if (!column || !rowCtrl) {
90299
90269
  return !!rowCtrl;
90300
90270
  }
90301
- if (rowCtrl && rowCtrl.isFullWidth()) {
90271
+ if (rowCtrl.isFullWidth()) {
90302
90272
  return true;
90303
90273
  }
90304
90274
  const spannedCell = this.beans.spannedRowRenderer?.getCellByPosition({ rowIndex, column, rowPinned: null });
90305
- if (spannedCell) {
90306
- return true;
90307
- }
90308
- return !!rowCtrl?.getCellCtrl(column);
90275
+ return !!spannedCell || !!rowCtrl.getCellCtrl(column) || !rowCtrl.isRowRendered();
90309
90276
  }
90310
90277
  /**
90311
90278
  * Notifies all row and cell controls of any change in focused cell.
90312
90279
  * @param event cell focused event
90313
90280
  */
90281
+ updateCellFocus(event) {
90282
+ this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellFocused(event));
90283
+ this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
90284
+ }
90285
+ /**
90286
+ * Called when a new cell is focused in the grid
90287
+ * - if the focused cell isn't rendered; re-draw rows to dry to render it
90288
+ * - subsequently updates all cell and row controls with the new focused cell
90289
+ * @param event cell focused event
90290
+ */
90314
90291
  onCellFocusChanged(event) {
90315
90292
  if (event && event.rowIndex != null && !event.rowPinned) {
90316
90293
  const col = this.beans.colModel.getCol(event.column) ?? void 0;
90317
- if (!this.isCellRendered(event.rowIndex, col)) {
90294
+ if (!this.isCellBeingRendered(event.rowIndex, col)) {
90318
90295
  this.redraw();
90319
90296
  }
90320
90297
  }
90321
- this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellFocused(event));
90322
- this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
90298
+ this.updateCellFocus(event);
90323
90299
  }
90324
90300
  onSuppressCellFocusChanged(suppressCellFocus) {
90325
90301
  this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onSuppressCellFocusChanged(suppressCellFocus));
@@ -90330,10 +90306,8 @@ var RowRenderer = class extends BeanStub {
90330
90306
  // all active cells.
90331
90307
  registerCellEventListeners() {
90332
90308
  this.addManagedEventListeners({
90333
- cellFocused: (event) => {
90334
- this.onCellFocusChanged(event);
90335
- },
90336
- cellFocusCleared: () => this.onCellFocusChanged(),
90309
+ cellFocused: (event) => this.onCellFocusChanged(event),
90310
+ cellFocusCleared: () => this.updateCellFocus(),
90337
90311
  flashCells: (event) => {
90338
90312
  const { cellFlashSvc } = this.beans;
90339
90313
  if (cellFlashSvc) {
@@ -90642,7 +90616,7 @@ var RowRenderer = class extends BeanStub {
90642
90616
  return;
90643
90617
  }
90644
90618
  if (!focusSvc.doesRowOrCellHaveBrowserFocus()) {
90645
- this.onCellFocusChanged(
90619
+ this.updateCellFocus(
90646
90620
  _addGridCommonParams(this.gos, {
90647
90621
  ...cellToFocus,
90648
90622
  forceBrowserFocus: true,