ag-grid-community 32.3.7 → 32.3.9

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.
@@ -1929,7 +1929,7 @@ var SortStage = class extends import_core8.BeanStub {
1929
1929
  };
1930
1930
 
1931
1931
  // community-modules/client-side-row-model/src/version.ts
1932
- var VERSION = "32.3.7";
1932
+ var VERSION = "32.3.9";
1933
1933
 
1934
1934
  // community-modules/client-side-row-model/src/clientSideRowModelModule.ts
1935
1935
  var ClientSideRowModelCoreModule = (0, import_core9._defineModule)({
@@ -3527,42 +3527,46 @@ var ControlsColService = class extends BeanStub {
3527
3527
  super(...arguments);
3528
3528
  this.beanName = "controlsColService";
3529
3529
  }
3530
- createControlsCols() {
3530
+ isControlsColEnabled() {
3531
3531
  const { gos } = this;
3532
3532
  const so = gos.get("rowSelection");
3533
3533
  if (!so || typeof so !== "object") {
3534
- return [];
3534
+ return false;
3535
3535
  }
3536
3536
  const checkboxes = _getCheckboxes(so);
3537
3537
  const headerCheckbox = _getHeaderCheckbox(so);
3538
- if (checkboxes || headerCheckbox) {
3539
- const selectionColumnDef = gos.get("selectionColumnDef");
3540
- const enableRTL = gos.get("enableRtl");
3541
- const colDef = {
3542
- // overridable properties
3543
- maxWidth: 50,
3544
- resizable: false,
3545
- suppressHeaderMenuButton: true,
3546
- sortable: false,
3547
- suppressMovable: true,
3548
- lockPosition: enableRTL ? "right" : "left",
3549
- comparator(valueA, valueB, nodeA, nodeB) {
3550
- const aSelected = nodeA.isSelected();
3551
- const bSelected = nodeB.isSelected();
3552
- return aSelected && bSelected ? 0 : aSelected ? 1 : -1;
3553
- },
3554
- editable: false,
3555
- suppressFillHandle: true,
3556
- // overrides
3557
- ...selectionColumnDef,
3558
- // non-overridable properties
3559
- colId: `${CONTROLS_COLUMN_ID_PREFIX}`
3560
- };
3561
- const col = new AgColumn(colDef, null, colDef.colId, false);
3562
- this.createBean(col);
3563
- return [col];
3538
+ return !!(checkboxes || headerCheckbox);
3539
+ }
3540
+ createControlsCols() {
3541
+ if (!this.isControlsColEnabled()) {
3542
+ return [];
3564
3543
  }
3565
- return [];
3544
+ const { gos } = this;
3545
+ const selectionColumnDef = gos.get("selectionColumnDef");
3546
+ const enableRTL = gos.get("enableRtl");
3547
+ const colDef = {
3548
+ // overridable properties
3549
+ maxWidth: 50,
3550
+ resizable: false,
3551
+ suppressHeaderMenuButton: true,
3552
+ sortable: false,
3553
+ suppressMovable: true,
3554
+ lockPosition: enableRTL ? "right" : "left",
3555
+ comparator(valueA, valueB, nodeA, nodeB) {
3556
+ const aSelected = nodeA.isSelected();
3557
+ const bSelected = nodeB.isSelected();
3558
+ return aSelected && bSelected ? 0 : aSelected ? 1 : -1;
3559
+ },
3560
+ editable: false,
3561
+ suppressFillHandle: true,
3562
+ // overrides
3563
+ ...selectionColumnDef,
3564
+ // non-overridable properties
3565
+ colId: `${CONTROLS_COLUMN_ID_PREFIX}`
3566
+ };
3567
+ const col = new AgColumn(colDef, null, colDef.colId, false);
3568
+ this.createBean(col);
3569
+ return [col];
3566
3570
  }
3567
3571
  };
3568
3572
 
@@ -3700,6 +3704,9 @@ function _iterateObject(object, callback) {
3700
3704
  return;
3701
3705
  }
3702
3706
  for (const [key, value] of Object.entries(object)) {
3707
+ if (SKIP_JS_BUILTINS.has(key)) {
3708
+ continue;
3709
+ }
3703
3710
  callback(key, value);
3704
3711
  }
3705
3712
  }
@@ -4977,11 +4984,12 @@ var ColumnModel = class extends BeanStub {
4977
4984
  getColsToShow() {
4978
4985
  const showAutoGroupAndValuesOnly = this.isPivotMode() && !this.isShowingPivotResult();
4979
4986
  const valueColumns = this.funcColsService.getValueColumns();
4987
+ const showSelectionCol = this.controlsColService?.isControlsColEnabled();
4980
4988
  const res = this.cols.list.filter((col) => {
4981
4989
  const isAutoGroupCol = isColumnGroupAutoCol(col);
4982
4990
  if (showAutoGroupAndValuesOnly) {
4983
4991
  const isValueCol = valueColumns && _includes(valueColumns, col);
4984
- return isAutoGroupCol || isValueCol;
4992
+ return isAutoGroupCol || isValueCol || showSelectionCol && isColumnControlsCol(col);
4985
4993
  } else {
4986
4994
  return isAutoGroupCol || col.isVisible();
4987
4995
  }
@@ -19847,7 +19855,7 @@ function _defineModule(definition) {
19847
19855
  }
19848
19856
 
19849
19857
  // community-modules/core/src/version.ts
19850
- var VERSION = "32.3.7";
19858
+ var VERSION = "32.3.9";
19851
19859
 
19852
19860
  // community-modules/core/src/filter/columnFilterApi.ts
19853
19861
  function isColumnFilterPresent(beans) {
@@ -44168,6 +44176,10 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
44168
44176
  constructor() {
44169
44177
  super(...arguments);
44170
44178
  this.beanName = "gos";
44179
+ // Used to hold user events until the grid is ready
44180
+ // Required to support React 19 StrictMode. See IFrameworkOverrides.runWhenReadyAsync but also is likely a good idea that onGridReady is the first event fired.
44181
+ this.gridReadyFired = false;
44182
+ this.queueEvents = [];
44171
44183
  this.domDataKey = "__AG_" + Math.random().toString();
44172
44184
  this.propertyEventService = new LocalEventService();
44173
44185
  // responsible for calling the onXXX functions on gridOptions
@@ -44183,12 +44195,25 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
44183
44195
  if (alwaysSync && !restrictToSyncOnly || !alwaysSync && restrictToSyncOnly) {
44184
44196
  return;
44185
44197
  }
44186
- const eventHandlerName = ComponentUtil.getCallbackForEvent(eventName);
44187
- const eventHandler = this.gridOptions[eventHandlerName];
44188
- if (typeof eventHandler === "function") {
44189
- this.frameworkOverrides.wrapOutgoing(() => {
44190
- eventHandler(event);
44191
- });
44198
+ const fireEvent = (name, e) => {
44199
+ const eventHandler = this.gridOptions[ComponentUtil.getCallbackForEvent(name)];
44200
+ if (typeof eventHandler === "function") {
44201
+ this.frameworkOverrides.wrapOutgoing(() => eventHandler(e));
44202
+ }
44203
+ };
44204
+ if (this.gridReadyFired) {
44205
+ fireEvent(eventName, event);
44206
+ } else {
44207
+ if (eventName === "gridReady") {
44208
+ fireEvent(eventName, event);
44209
+ this.gridReadyFired = true;
44210
+ for (const q of this.queueEvents) {
44211
+ fireEvent(q.eventName, q.event);
44212
+ }
44213
+ this.queueEvents = [];
44214
+ } else {
44215
+ this.queueEvents.push({ eventName, event });
44216
+ }
44192
44217
  }
44193
44218
  };
44194
44219
  };
@@ -44216,6 +44241,10 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
44216
44241
  }
44217
44242
  });
44218
44243
  }
44244
+ destroy() {
44245
+ super.destroy();
44246
+ this.queueEvents = [];
44247
+ }
44219
44248
  /**
44220
44249
  * Get the raw value of the GridOptions property provided.
44221
44250
  * @param property
@@ -48009,7 +48038,7 @@ var GridSerializer = class extends import_core6.BeanStub {
48009
48038
  };
48010
48039
 
48011
48040
  // community-modules/csv-export/src/version.ts
48012
- var VERSION = "32.3.7";
48041
+ var VERSION = "32.3.9";
48013
48042
 
48014
48043
  // community-modules/csv-export/src/csvExportModule.ts
48015
48044
  var CsvExportCoreModule = (0, import_core7._defineModule)({
@@ -49266,7 +49295,7 @@ function getInfiniteRowCount(beans) {
49266
49295
  }
49267
49296
 
49268
49297
  // community-modules/infinite-row-model/src/version.ts
49269
- var VERSION = "32.3.7";
49298
+ var VERSION = "32.3.9";
49270
49299
 
49271
49300
  // community-modules/infinite-row-model/src/infiniteRowModelModule.ts
49272
49301
  var InfiniteRowModelCoreModule = (0, import_core4._defineModule)({