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.
@@ -1220,42 +1220,46 @@ var ControlsColService = class extends BeanStub {
1220
1220
  super(...arguments);
1221
1221
  this.beanName = "controlsColService";
1222
1222
  }
1223
- createControlsCols() {
1223
+ isControlsColEnabled() {
1224
1224
  const { gos } = this;
1225
1225
  const so = gos.get("rowSelection");
1226
1226
  if (!so || typeof so !== "object") {
1227
- return [];
1227
+ return false;
1228
1228
  }
1229
1229
  const checkboxes = _getCheckboxes(so);
1230
1230
  const headerCheckbox = _getHeaderCheckbox(so);
1231
- if (checkboxes || headerCheckbox) {
1232
- const selectionColumnDef = gos.get("selectionColumnDef");
1233
- const enableRTL = gos.get("enableRtl");
1234
- const colDef = {
1235
- // overridable properties
1236
- maxWidth: 50,
1237
- resizable: false,
1238
- suppressHeaderMenuButton: true,
1239
- sortable: false,
1240
- suppressMovable: true,
1241
- lockPosition: enableRTL ? "right" : "left",
1242
- comparator(valueA, valueB, nodeA, nodeB) {
1243
- const aSelected = nodeA.isSelected();
1244
- const bSelected = nodeB.isSelected();
1245
- return aSelected && bSelected ? 0 : aSelected ? 1 : -1;
1246
- },
1247
- editable: false,
1248
- suppressFillHandle: true,
1249
- // overrides
1250
- ...selectionColumnDef,
1251
- // non-overridable properties
1252
- colId: `${CONTROLS_COLUMN_ID_PREFIX}`
1253
- };
1254
- const col = new AgColumn(colDef, null, colDef.colId, false);
1255
- this.createBean(col);
1256
- return [col];
1231
+ return !!(checkboxes || headerCheckbox);
1232
+ }
1233
+ createControlsCols() {
1234
+ if (!this.isControlsColEnabled()) {
1235
+ return [];
1257
1236
  }
1258
- return [];
1237
+ const { gos } = this;
1238
+ const selectionColumnDef = gos.get("selectionColumnDef");
1239
+ const enableRTL = gos.get("enableRtl");
1240
+ const colDef = {
1241
+ // overridable properties
1242
+ maxWidth: 50,
1243
+ resizable: false,
1244
+ suppressHeaderMenuButton: true,
1245
+ sortable: false,
1246
+ suppressMovable: true,
1247
+ lockPosition: enableRTL ? "right" : "left",
1248
+ comparator(valueA, valueB, nodeA, nodeB) {
1249
+ const aSelected = nodeA.isSelected();
1250
+ const bSelected = nodeB.isSelected();
1251
+ return aSelected && bSelected ? 0 : aSelected ? 1 : -1;
1252
+ },
1253
+ editable: false,
1254
+ suppressFillHandle: true,
1255
+ // overrides
1256
+ ...selectionColumnDef,
1257
+ // non-overridable properties
1258
+ colId: `${CONTROLS_COLUMN_ID_PREFIX}`
1259
+ };
1260
+ const col = new AgColumn(colDef, null, colDef.colId, false);
1261
+ this.createBean(col);
1262
+ return [col];
1259
1263
  }
1260
1264
  };
1261
1265
 
@@ -1393,6 +1397,9 @@ function _iterateObject(object, callback) {
1393
1397
  return;
1394
1398
  }
1395
1399
  for (const [key, value] of Object.entries(object)) {
1400
+ if (SKIP_JS_BUILTINS.has(key)) {
1401
+ continue;
1402
+ }
1396
1403
  callback(key, value);
1397
1404
  }
1398
1405
  }
@@ -2670,11 +2677,12 @@ var ColumnModel = class extends BeanStub {
2670
2677
  getColsToShow() {
2671
2678
  const showAutoGroupAndValuesOnly = this.isPivotMode() && !this.isShowingPivotResult();
2672
2679
  const valueColumns = this.funcColsService.getValueColumns();
2680
+ const showSelectionCol = this.controlsColService?.isControlsColEnabled();
2673
2681
  const res = this.cols.list.filter((col) => {
2674
2682
  const isAutoGroupCol = isColumnGroupAutoCol(col);
2675
2683
  if (showAutoGroupAndValuesOnly) {
2676
2684
  const isValueCol = valueColumns && _includes(valueColumns, col);
2677
- return isAutoGroupCol || isValueCol;
2685
+ return isAutoGroupCol || isValueCol || showSelectionCol && isColumnControlsCol(col);
2678
2686
  } else {
2679
2687
  return isAutoGroupCol || col.isVisible();
2680
2688
  }
@@ -17540,7 +17548,7 @@ function _defineModule(definition) {
17540
17548
  }
17541
17549
 
17542
17550
  // community-modules/core/src/version.ts
17543
- var VERSION = "32.3.7";
17551
+ var VERSION = "32.3.9";
17544
17552
 
17545
17553
  // community-modules/core/src/filter/columnFilterApi.ts
17546
17554
  function isColumnFilterPresent(beans) {
@@ -41861,6 +41869,10 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
41861
41869
  constructor() {
41862
41870
  super(...arguments);
41863
41871
  this.beanName = "gos";
41872
+ // Used to hold user events until the grid is ready
41873
+ // Required to support React 19 StrictMode. See IFrameworkOverrides.runWhenReadyAsync but also is likely a good idea that onGridReady is the first event fired.
41874
+ this.gridReadyFired = false;
41875
+ this.queueEvents = [];
41864
41876
  this.domDataKey = "__AG_" + Math.random().toString();
41865
41877
  this.propertyEventService = new LocalEventService();
41866
41878
  // responsible for calling the onXXX functions on gridOptions
@@ -41876,12 +41888,25 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
41876
41888
  if (alwaysSync && !restrictToSyncOnly || !alwaysSync && restrictToSyncOnly) {
41877
41889
  return;
41878
41890
  }
41879
- const eventHandlerName = ComponentUtil.getCallbackForEvent(eventName);
41880
- const eventHandler = this.gridOptions[eventHandlerName];
41881
- if (typeof eventHandler === "function") {
41882
- this.frameworkOverrides.wrapOutgoing(() => {
41883
- eventHandler(event);
41884
- });
41891
+ const fireEvent = (name, e) => {
41892
+ const eventHandler = this.gridOptions[ComponentUtil.getCallbackForEvent(name)];
41893
+ if (typeof eventHandler === "function") {
41894
+ this.frameworkOverrides.wrapOutgoing(() => eventHandler(e));
41895
+ }
41896
+ };
41897
+ if (this.gridReadyFired) {
41898
+ fireEvent(eventName, event);
41899
+ } else {
41900
+ if (eventName === "gridReady") {
41901
+ fireEvent(eventName, event);
41902
+ this.gridReadyFired = true;
41903
+ for (const q of this.queueEvents) {
41904
+ fireEvent(q.eventName, q.event);
41905
+ }
41906
+ this.queueEvents = [];
41907
+ } else {
41908
+ this.queueEvents.push({ eventName, event });
41909
+ }
41885
41910
  }
41886
41911
  };
41887
41912
  };
@@ -41909,6 +41934,10 @@ var _GridOptionsService = class _GridOptionsService extends BeanStub {
41909
41934
  }
41910
41935
  });
41911
41936
  }
41937
+ destroy() {
41938
+ super.destroy();
41939
+ this.queueEvents = [];
41940
+ }
41912
41941
  /**
41913
41942
  * Get the raw value of the GridOptions property provided.
41914
41943
  * @param property
@@ -46854,7 +46883,7 @@ var SortStage = class extends BeanStub {
46854
46883
  };
46855
46884
 
46856
46885
  // community-modules/client-side-row-model/src/version.ts
46857
- var VERSION2 = "32.3.7";
46886
+ var VERSION2 = "32.3.9";
46858
46887
 
46859
46888
  // community-modules/client-side-row-model/src/clientSideRowModelModule.ts
46860
46889
  var ClientSideRowModelCoreModule = _defineModule({
@@ -47547,7 +47576,7 @@ var GridSerializer = class extends BeanStub {
47547
47576
  });
47548
47577
  }
47549
47578
  };
47550
- var VERSION3 = "32.3.7";
47579
+ var VERSION3 = "32.3.9";
47551
47580
  var CsvExportCoreModule = _defineModule({
47552
47581
  version: VERSION3,
47553
47582
  moduleName: `${"@ag-grid-community/csv-export" /* CsvExportModule */}-core`,
@@ -48738,7 +48767,7 @@ function purgeInfiniteCache(beans) {
48738
48767
  function getInfiniteRowCount(beans) {
48739
48768
  return beans.rowModelHelperService?.getInfiniteRowModel()?.getRowCount();
48740
48769
  }
48741
- var VERSION4 = "32.3.7";
48770
+ var VERSION4 = "32.3.9";
48742
48771
  var InfiniteRowModelCoreModule = _defineModule({
48743
48772
  version: VERSION4,
48744
48773
  moduleName: `${"@ag-grid-community/infinite-row-model" /* InfiniteRowModelModule */}-core`,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-grid-community",
3
- "version": "32.3.7",
3
+ "version": "32.3.9",
4
4
  "description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
5
5
  "main": "./dist/package/main.cjs.js",
6
6
  "types": "./dist/types/main.d.ts",
@@ -88,19 +88,19 @@
88
88
  ],
89
89
  "homepage": "https://www.ag-grid.com/",
90
90
  "dependencies": {
91
- "ag-charts-types": "10.3.7"
91
+ "ag-charts-types": "10.3.9"
92
92
  },
93
93
  "devDependencies": {
94
94
  "source-map-loader": "^5.0.0",
95
95
  "gulp": "^4.0.0",
96
96
  "gulp-replace": "^1.0.0",
97
97
  "gulp-rename": "^2.0.0",
98
- "@ag-grid-community/client-side-row-model": "32.3.7",
99
- "@ag-grid-community/core": "32.3.7",
100
- "@ag-grid-community/csv-export": "32.3.7",
101
- "@ag-grid-community/infinite-row-model": "32.3.7",
102
- "@ag-grid-community/styles": "32.3.7",
103
- "@ag-grid-community/theming": "32.3.7",
98
+ "@ag-grid-community/client-side-row-model": "32.3.9",
99
+ "@ag-grid-community/core": "32.3.9",
100
+ "@ag-grid-community/csv-export": "32.3.9",
101
+ "@ag-grid-community/infinite-row-model": "32.3.9",
102
+ "@ag-grid-community/styles": "32.3.9",
103
+ "@ag-grid-community/theming": "32.3.9",
104
104
  "ts-loader": "^9.5.1",
105
105
  "style-loader": "^3.3.4",
106
106
  "css-loader": "^6.10.0",
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.7";
1
+ export declare const VERSION = "32.3.9";
@@ -3,9 +3,11 @@ import { BeanStub } from '../context/beanStub';
3
3
  import { AgColumn } from '../entities/agColumn';
4
4
  export interface IControlsColService {
5
5
  createControlsCols(): AgColumn[];
6
+ isControlsColEnabled(): boolean;
6
7
  }
7
8
  export declare const CONTROLS_COLUMN_ID_PREFIX: "ag-Grid-ControlsColumn";
8
9
  export declare class ControlsColService extends BeanStub implements NamedBean, IControlsColService {
9
10
  beanName: "controlsColService";
11
+ isControlsColEnabled(): boolean;
10
12
  createControlsCols(): AgColumn[];
11
13
  }
@@ -60,11 +60,14 @@ export declare class GridOptionsService extends BeanStub implements NamedBean {
60
60
  environment: Environment;
61
61
  private api;
62
62
  private gridId;
63
+ private gridReadyFired;
64
+ private queueEvents;
63
65
  wireBeans(beans: BeanCollection): void;
64
66
  private domDataKey;
65
67
  private get gridOptionsContext();
66
68
  private propertyEventService;
67
69
  postConstruct(): void;
70
+ destroy(): void;
68
71
  /**
69
72
  * Get the raw value of the GridOptions property provided.
70
73
  * @param property
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.7";
1
+ export declare const VERSION = "32.3.9";
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.7";
1
+ export declare const VERSION = "32.3.9";
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.7";
1
+ export declare const VERSION = "32.3.9";
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.7";
1
+ export declare const VERSION = "32.3.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-grid-community",
3
- "version": "32.3.7",
3
+ "version": "32.3.9",
4
4
  "description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
5
5
  "main": "./dist/package/main.cjs.js",
6
6
  "types": "./dist/types/main.d.ts",
@@ -88,19 +88,19 @@
88
88
  ],
89
89
  "homepage": "https://www.ag-grid.com/",
90
90
  "dependencies": {
91
- "ag-charts-types": "10.3.7"
91
+ "ag-charts-types": "10.3.9"
92
92
  },
93
93
  "devDependencies": {
94
94
  "source-map-loader": "^5.0.0",
95
95
  "gulp": "^4.0.0",
96
96
  "gulp-replace": "^1.0.0",
97
97
  "gulp-rename": "^2.0.0",
98
- "@ag-grid-community/client-side-row-model": "32.3.7",
99
- "@ag-grid-community/core": "32.3.7",
100
- "@ag-grid-community/csv-export": "32.3.7",
101
- "@ag-grid-community/infinite-row-model": "32.3.7",
102
- "@ag-grid-community/styles": "32.3.7",
103
- "@ag-grid-community/theming": "32.3.7",
98
+ "@ag-grid-community/client-side-row-model": "32.3.9",
99
+ "@ag-grid-community/core": "32.3.9",
100
+ "@ag-grid-community/csv-export": "32.3.9",
101
+ "@ag-grid-community/infinite-row-model": "32.3.9",
102
+ "@ag-grid-community/styles": "32.3.9",
103
+ "@ag-grid-community/theming": "32.3.9",
104
104
  "ts-loader": "^9.5.1",
105
105
  "style-loader": "^3.3.4",
106
106
  "css-loader": "^6.10.0",