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)({
@@ -1596,42 +1596,46 @@ var ControlsColService = class extends BeanStub {
1596
1596
  super(...arguments);
1597
1597
  this.beanName = "controlsColService";
1598
1598
  }
1599
- createControlsCols() {
1599
+ isControlsColEnabled() {
1600
1600
  const { gos } = this;
1601
1601
  const so = gos.get("rowSelection");
1602
1602
  if (!so || typeof so !== "object") {
1603
- return [];
1603
+ return false;
1604
1604
  }
1605
1605
  const checkboxes = _getCheckboxes(so);
1606
1606
  const headerCheckbox = _getHeaderCheckbox(so);
1607
- if (checkboxes || headerCheckbox) {
1608
- const selectionColumnDef = gos.get("selectionColumnDef");
1609
- const enableRTL = gos.get("enableRtl");
1610
- const colDef = {
1611
- // overridable properties
1612
- maxWidth: 50,
1613
- resizable: false,
1614
- suppressHeaderMenuButton: true,
1615
- sortable: false,
1616
- suppressMovable: true,
1617
- lockPosition: enableRTL ? "right" : "left",
1618
- comparator(valueA, valueB, nodeA, nodeB) {
1619
- const aSelected = nodeA.isSelected();
1620
- const bSelected = nodeB.isSelected();
1621
- return aSelected && bSelected ? 0 : aSelected ? 1 : -1;
1622
- },
1623
- editable: false,
1624
- suppressFillHandle: true,
1625
- // overrides
1626
- ...selectionColumnDef,
1627
- // non-overridable properties
1628
- colId: `${CONTROLS_COLUMN_ID_PREFIX}`
1629
- };
1630
- const col = new AgColumn(colDef, null, colDef.colId, false);
1631
- this.createBean(col);
1632
- return [col];
1607
+ return !!(checkboxes || headerCheckbox);
1608
+ }
1609
+ createControlsCols() {
1610
+ if (!this.isControlsColEnabled()) {
1611
+ return [];
1633
1612
  }
1634
- return [];
1613
+ const { gos } = this;
1614
+ const selectionColumnDef = gos.get("selectionColumnDef");
1615
+ const enableRTL = gos.get("enableRtl");
1616
+ const colDef = {
1617
+ // overridable properties
1618
+ maxWidth: 50,
1619
+ resizable: false,
1620
+ suppressHeaderMenuButton: true,
1621
+ sortable: false,
1622
+ suppressMovable: true,
1623
+ lockPosition: enableRTL ? "right" : "left",
1624
+ comparator(valueA, valueB, nodeA, nodeB) {
1625
+ const aSelected = nodeA.isSelected();
1626
+ const bSelected = nodeB.isSelected();
1627
+ return aSelected && bSelected ? 0 : aSelected ? 1 : -1;
1628
+ },
1629
+ editable: false,
1630
+ suppressFillHandle: true,
1631
+ // overrides
1632
+ ...selectionColumnDef,
1633
+ // non-overridable properties
1634
+ colId: `${CONTROLS_COLUMN_ID_PREFIX}`
1635
+ };
1636
+ const col = new AgColumn(colDef, null, colDef.colId, false);
1637
+ this.createBean(col);
1638
+ return [col];
1635
1639
  }
1636
1640
  };
1637
1641
 
@@ -1769,6 +1773,9 @@ function _iterateObject(object, callback) {
1769
1773
  return;
1770
1774
  }
1771
1775
  for (const [key, value] of Object.entries(object)) {
1776
+ if (SKIP_JS_BUILTINS.has(key)) {
1777
+ continue;
1778
+ }
1772
1779
  callback(key, value);
1773
1780
  }
1774
1781
  }
@@ -3046,11 +3053,12 @@ var ColumnModel = class extends BeanStub {
3046
3053
  getColsToShow() {
3047
3054
  const showAutoGroupAndValuesOnly = this.isPivotMode() && !this.isShowingPivotResult();
3048
3055
  const valueColumns = this.funcColsService.getValueColumns();
3056
+ const showSelectionCol = this.controlsColService?.isControlsColEnabled();
3049
3057
  const res = this.cols.list.filter((col) => {
3050
3058
  const isAutoGroupCol = isColumnGroupAutoCol(col);
3051
3059
  if (showAutoGroupAndValuesOnly) {
3052
3060
  const isValueCol = valueColumns && _includes(valueColumns, col);
3053
- return isAutoGroupCol || isValueCol;
3061
+ return isAutoGroupCol || isValueCol || showSelectionCol && isColumnControlsCol(col);
3054
3062
  } else {
3055
3063
  return isAutoGroupCol || col.isVisible();
3056
3064
  }
@@ -17916,7 +17924,7 @@ function _defineModule(definition) {
17916
17924
  }
17917
17925
 
17918
17926
  // community-modules/core/src/version.ts
17919
- var VERSION = "32.3.7";
17927
+ var VERSION = "32.3.9";
17920
17928
 
17921
17929
  // community-modules/core/src/filter/columnFilterApi.ts
17922
17930
  function isColumnFilterPresent(beans) {
@@ -42237,6 +42245,10 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
42237
42245
  constructor() {
42238
42246
  super(...arguments);
42239
42247
  this.beanName = "gos";
42248
+ // Used to hold user events until the grid is ready
42249
+ // Required to support React 19 StrictMode. See IFrameworkOverrides.runWhenReadyAsync but also is likely a good idea that onGridReady is the first event fired.
42250
+ this.gridReadyFired = false;
42251
+ this.queueEvents = [];
42240
42252
  this.domDataKey = "__AG_" + Math.random().toString();
42241
42253
  this.propertyEventService = new LocalEventService();
42242
42254
  // responsible for calling the onXXX functions on gridOptions
@@ -42252,12 +42264,25 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
42252
42264
  if (alwaysSync && !restrictToSyncOnly || !alwaysSync && restrictToSyncOnly) {
42253
42265
  return;
42254
42266
  }
42255
- const eventHandlerName = ComponentUtil.getCallbackForEvent(eventName);
42256
- const eventHandler = this.gridOptions[eventHandlerName];
42257
- if (typeof eventHandler === "function") {
42258
- this.frameworkOverrides.wrapOutgoing(() => {
42259
- eventHandler(event);
42260
- });
42267
+ const fireEvent = (name, e) => {
42268
+ const eventHandler = this.gridOptions[ComponentUtil.getCallbackForEvent(name)];
42269
+ if (typeof eventHandler === "function") {
42270
+ this.frameworkOverrides.wrapOutgoing(() => eventHandler(e));
42271
+ }
42272
+ };
42273
+ if (this.gridReadyFired) {
42274
+ fireEvent(eventName, event);
42275
+ } else {
42276
+ if (eventName === "gridReady") {
42277
+ fireEvent(eventName, event);
42278
+ this.gridReadyFired = true;
42279
+ for (const q of this.queueEvents) {
42280
+ fireEvent(q.eventName, q.event);
42281
+ }
42282
+ this.queueEvents = [];
42283
+ } else {
42284
+ this.queueEvents.push({ eventName, event });
42285
+ }
42261
42286
  }
42262
42287
  };
42263
42288
  };
@@ -42285,6 +42310,10 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
42285
42310
  }
42286
42311
  });
42287
42312
  }
42313
+ destroy() {
42314
+ super.destroy();
42315
+ this.queueEvents = [];
42316
+ }
42288
42317
  /**
42289
42318
  * Get the raw value of the GridOptions property provided.
42290
42319
  * @param property
@@ -47230,7 +47259,7 @@ var SortStage = class extends BeanStub {
47230
47259
  };
47231
47260
 
47232
47261
  // community-modules/client-side-row-model/src/version.ts
47233
- var VERSION2 = "32.3.7";
47262
+ var VERSION2 = "32.3.9";
47234
47263
 
47235
47264
  // community-modules/client-side-row-model/src/clientSideRowModelModule.ts
47236
47265
  var ClientSideRowModelCoreModule = _defineModule({
@@ -47923,7 +47952,7 @@ var GridSerializer = class extends BeanStub {
47923
47952
  });
47924
47953
  }
47925
47954
  };
47926
- var VERSION3 = "32.3.7";
47955
+ var VERSION3 = "32.3.9";
47927
47956
  var CsvExportCoreModule = _defineModule({
47928
47957
  version: VERSION3,
47929
47958
  moduleName: `${"@ag-grid-community/csv-export" /* CsvExportModule */}-core`,
@@ -49114,7 +49143,7 @@ function purgeInfiniteCache(beans) {
49114
49143
  function getInfiniteRowCount(beans) {
49115
49144
  return beans.rowModelHelperService?.getInfiniteRowModel()?.getRowCount();
49116
49145
  }
49117
- var VERSION4 = "32.3.7";
49146
+ var VERSION4 = "32.3.9";
49118
49147
  var InfiniteRowModelCoreModule = _defineModule({
49119
49148
  version: VERSION4,
49120
49149
  moduleName: `${"@ag-grid-community/infinite-row-model" /* InfiniteRowModelModule */}-core`,