ag-grid-community 32.3.2 → 32.3.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.
@@ -7169,16 +7169,16 @@ function _ensureDomOrder(eContainer, eChild, eChildBefore) {
7169
7169
  if (eChildBefore && eChildBefore.nextSibling === eChild) {
7170
7170
  return;
7171
7171
  }
7172
- if (eChildBefore) {
7172
+ if (!eContainer.firstChild) {
7173
+ eContainer.appendChild(eChild);
7174
+ } else if (eChildBefore) {
7173
7175
  if (eChildBefore.nextSibling) {
7174
7176
  eContainer.insertBefore(eChild, eChildBefore.nextSibling);
7175
7177
  } else {
7176
7178
  eContainer.appendChild(eChild);
7177
7179
  }
7178
- } else {
7179
- if (eContainer.firstChild && eContainer.firstChild !== eChild) {
7180
- eContainer.insertAdjacentElement("afterbegin", eChild);
7181
- }
7180
+ } else if (eContainer.firstChild && eContainer.firstChild !== eChild) {
7181
+ eContainer.insertAdjacentElement("afterbegin", eChild);
7182
7182
  }
7183
7183
  }
7184
7184
  function _setDomChildOrder(eContainer, orderedChildren) {
@@ -7190,17 +7190,6 @@ function _setDomChildOrder(eContainer, orderedChildren) {
7190
7190
  }
7191
7191
  }
7192
7192
  }
7193
- function _insertWithDomOrder(eContainer, eToInsert, eChildBefore) {
7194
- if (eChildBefore) {
7195
- eChildBefore.insertAdjacentElement("afterend", eToInsert);
7196
- } else {
7197
- if (eContainer.firstChild) {
7198
- eContainer.insertAdjacentElement("afterbegin", eToInsert);
7199
- } else {
7200
- eContainer.appendChild(eToInsert);
7201
- }
7202
- }
7203
- }
7204
7193
  function _addStylesToElement(eElement, styles) {
7205
7194
  if (!styles) {
7206
7195
  return;
@@ -17557,7 +17546,7 @@ function _defineModule(definition) {
17557
17546
  }
17558
17547
 
17559
17548
  // community-modules/core/src/version.ts
17560
- var VERSION = "32.3.2";
17549
+ var VERSION = "32.3.4";
17561
17550
 
17562
17551
  // community-modules/core/src/filter/columnFilterApi.ts
17563
17552
  function isColumnFilterPresent(beans) {
@@ -26200,31 +26189,45 @@ var _RowCtrl = class _RowCtrl extends BeanStub {
26200
26189
  list: [],
26201
26190
  map: {}
26202
26191
  };
26203
- const addCell = (colInstanceId, cellCtrl) => {
26204
- res.list.push(cellCtrl);
26192
+ const addCell = (colInstanceId, cellCtrl, index) => {
26193
+ if (index != null) {
26194
+ res.list.splice(index, 0, cellCtrl);
26195
+ } else {
26196
+ res.list.push(cellCtrl);
26197
+ }
26205
26198
  res.map[colInstanceId] = cellCtrl;
26206
26199
  };
26207
- cols.forEach((col) => {
26200
+ const colsFromPrev = [];
26201
+ for (const col of cols) {
26208
26202
  const colInstanceId = col.getInstanceId();
26209
26203
  let cellCtrl = prev.map[colInstanceId];
26210
26204
  if (!cellCtrl) {
26211
26205
  cellCtrl = new CellCtrl(col, this.rowNode, this.beans, this);
26212
26206
  }
26213
26207
  addCell(colInstanceId, cellCtrl);
26214
- });
26215
- prev.list.forEach((prevCellCtrl) => {
26208
+ }
26209
+ for (const prevCellCtrl of prev.list) {
26216
26210
  const colInstanceId = prevCellCtrl.getColumn().getInstanceId();
26217
26211
  const cellInResult = res.map[colInstanceId] != null;
26218
26212
  if (cellInResult) {
26219
- return;
26213
+ continue;
26220
26214
  }
26221
26215
  const keepCell = !this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);
26222
26216
  if (keepCell) {
26223
- addCell(colInstanceId, prevCellCtrl);
26224
- return;
26217
+ colsFromPrev.push([colInstanceId, prevCellCtrl]);
26218
+ } else {
26219
+ prevCellCtrl.destroy();
26225
26220
  }
26226
- prevCellCtrl.destroy();
26227
- });
26221
+ }
26222
+ if (colsFromPrev.length) {
26223
+ for (const [colInstanceId, cellCtrl] of colsFromPrev) {
26224
+ const index = res.list.findIndex(
26225
+ (ctrl) => ctrl.getColumn().getLeft() > cellCtrl.getColumn().getLeft()
26226
+ );
26227
+ const normalisedIndex = index === -1 ? void 0 : Math.max(index - 1, 0);
26228
+ addCell(colInstanceId, cellCtrl, normalisedIndex);
26229
+ }
26230
+ }
26228
26231
  return res;
26229
26232
  }
26230
26233
  updateColumnListsImpl(useFlushSync) {
@@ -28663,7 +28666,7 @@ var RowComp = class extends Component {
28663
28666
  this.rowCtrl = ctrl;
28664
28667
  const rowDiv = document.createElement("div");
28665
28668
  rowDiv.setAttribute("comp-id", `${this.getCompId()}`);
28666
- rowDiv.setAttribute("style", this.getInitialStyle(containerType));
28669
+ this.setInitialStyle(rowDiv, containerType);
28667
28670
  this.setTemplateFromElement(rowDiv);
28668
28671
  const eGui = this.getGui();
28669
28672
  const style = eGui.style;
@@ -28688,9 +28691,16 @@ var RowComp = class extends Component {
28688
28691
  ctrl.unsetComp(containerType);
28689
28692
  });
28690
28693
  }
28691
- getInitialStyle(containerType) {
28694
+ setInitialStyle(container, containerType) {
28692
28695
  const transform = this.rowCtrl.getInitialTransform(containerType);
28693
- return transform ? `transform: ${transform}` : `top: ${this.rowCtrl.getInitialRowTop(containerType)}`;
28696
+ if (transform) {
28697
+ container.style.setProperty("transform", transform);
28698
+ } else {
28699
+ const top = this.rowCtrl.getInitialRowTop(containerType);
28700
+ if (top) {
28701
+ container.style.setProperty("top", top);
28702
+ }
28703
+ }
28694
28704
  }
28695
28705
  showFullWidth(compDetails) {
28696
28706
  const callback = (cellRenderer) => {
@@ -28787,11 +28797,11 @@ function templateFactory(options) {
28787
28797
  if (options.type === "center") {
28788
28798
  res = /* html */
28789
28799
  `<div class="${options.viewport}" data-ref="eViewport" role="presentation">
28790
- <div class="${options.container}" data-ref="eContainer"></div>
28800
+ <div class="${options.container}" data-ref="eContainer" role="rowgroup"></div>
28791
28801
  </div>`;
28792
28802
  } else {
28793
28803
  res = /* html */
28794
- `<div class="${options.container}" data-ref="eContainer"></div>`;
28804
+ `<div class="${options.container}" data-ref="eContainer" role="rowgroup"></div>`;
28795
28805
  }
28796
28806
  return res;
28797
28807
  }
@@ -28825,47 +28835,59 @@ var RowContainerComp = class extends Component {
28825
28835
  destroy() {
28826
28836
  this.setRowCtrls([]);
28827
28837
  super.destroy();
28838
+ this.lastPlacedElement = null;
28828
28839
  }
28829
28840
  setRowCtrls(rowCtrls) {
28830
- const oldRows = { ...this.rowComps };
28841
+ const { rowComps, beans, options } = this;
28842
+ const oldRows = { ...rowComps };
28831
28843
  this.rowComps = {};
28832
28844
  this.lastPlacedElement = null;
28833
- const processRow = (rowCon) => {
28834
- const instanceId = rowCon.instanceId;
28845
+ const orderedRows = [];
28846
+ for (const rowCtrl of rowCtrls) {
28847
+ const instanceId = rowCtrl.instanceId;
28835
28848
  const existingRowComp = oldRows[instanceId];
28849
+ let rowComp;
28836
28850
  if (existingRowComp) {
28837
- this.rowComps[instanceId] = existingRowComp;
28851
+ rowComp = existingRowComp;
28838
28852
  delete oldRows[instanceId];
28839
- this.ensureDomOrder(existingRowComp.getGui());
28840
28853
  } else {
28841
- if (!rowCon.getRowNode().displayed) {
28842
- return;
28854
+ if (!rowCtrl.getRowNode().displayed) {
28855
+ continue;
28843
28856
  }
28844
- const rowComp = new RowComp(rowCon, this.beans, this.options.type);
28845
- this.rowComps[instanceId] = rowComp;
28846
- this.appendRow(rowComp.getGui());
28857
+ rowComp = new RowComp(rowCtrl, beans, options.type);
28847
28858
  }
28848
- };
28849
- rowCtrls.forEach(processRow);
28850
- _getAllValuesInObject(oldRows).forEach((oldRowComp) => {
28851
- this.eContainer.removeChild(oldRowComp.getGui());
28852
- oldRowComp.destroy();
28853
- });
28854
- _setAriaRole(this.eContainer, "rowgroup");
28859
+ this.rowComps[instanceId] = rowComp;
28860
+ orderedRows.push([rowComp, !existingRowComp]);
28861
+ }
28862
+ this.removeOldRows(Object.values(oldRows));
28863
+ this.addRowNodes(orderedRows);
28855
28864
  }
28856
- appendRow(element) {
28857
- if (this.domOrder) {
28858
- _insertWithDomOrder(this.eContainer, element, this.lastPlacedElement);
28859
- } else {
28860
- this.eContainer.appendChild(element);
28865
+ addRowNodes(rows) {
28866
+ const { domOrder, eContainer } = this;
28867
+ for (const [rowComp, isNew] of rows) {
28868
+ const eGui = rowComp.getGui();
28869
+ if (!domOrder) {
28870
+ if (isNew) {
28871
+ eContainer.appendChild(eGui);
28872
+ }
28873
+ } else {
28874
+ this.ensureDomOrder(eGui);
28875
+ }
28876
+ }
28877
+ }
28878
+ removeOldRows(rowComps) {
28879
+ const { eContainer } = this;
28880
+ for (const oldRowComp of rowComps) {
28881
+ eContainer.removeChild(oldRowComp.getGui());
28882
+ oldRowComp.destroy();
28861
28883
  }
28862
- this.lastPlacedElement = element;
28863
28884
  }
28864
28885
  ensureDomOrder(eRow) {
28865
- if (this.domOrder) {
28866
- _ensureDomOrder(this.eContainer, eRow, this.lastPlacedElement);
28867
- this.lastPlacedElement = eRow;
28886
+ if (!this.domOrder) {
28887
+ return;
28868
28888
  }
28889
+ _ensureDomOrder(this.eContainer, eRow, this.lastPlacedElement);
28890
+ this.lastPlacedElement = eRow;
28869
28891
  }
28870
28892
  };
28871
28893
  var RowContainerSelector = {
@@ -46838,7 +46860,7 @@ var SortStage = class extends BeanStub {
46838
46860
  };
46839
46861
 
46840
46862
  // community-modules/client-side-row-model/src/version.ts
46841
- var VERSION2 = "32.3.2";
46863
+ var VERSION2 = "32.3.4";
46842
46864
 
46843
46865
  // community-modules/client-side-row-model/src/clientSideRowModelModule.ts
46844
46866
  var ClientSideRowModelCoreModule = _defineModule({
@@ -47465,7 +47487,7 @@ var GridSerializer = class extends BeanStub {
47465
47487
  }
47466
47488
  if (skipRowGroups && !isTreeData) {
47467
47489
  columnsToExport = columnsToExport.filter(
47468
- (column) => isColumnGroupAutoCol(column) || isColumnControlsCol(column)
47490
+ (column) => !isColumnGroupAutoCol(column) && !isColumnControlsCol(column)
47469
47491
  );
47470
47492
  }
47471
47493
  return columnsToExport;
@@ -47531,7 +47553,7 @@ var GridSerializer = class extends BeanStub {
47531
47553
  });
47532
47554
  }
47533
47555
  };
47534
- var VERSION3 = "32.3.2";
47556
+ var VERSION3 = "32.3.4";
47535
47557
  var CsvExportCoreModule = _defineModule({
47536
47558
  version: VERSION3,
47537
47559
  moduleName: `${"@ag-grid-community/csv-export" /* CsvExportModule */}-core`,
@@ -48722,7 +48744,7 @@ function purgeInfiniteCache(beans) {
48722
48744
  function getInfiniteRowCount(beans) {
48723
48745
  return beans.rowModelHelperService?.getInfiniteRowModel()?.getRowCount();
48724
48746
  }
48725
- var VERSION4 = "32.3.2";
48747
+ var VERSION4 = "32.3.4";
48726
48748
  var InfiniteRowModelCoreModule = _defineModule({
48727
48749
  version: VERSION4,
48728
48750
  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.2",
3
+ "version": "32.3.4",
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.1"
91
+ "ag-charts-types": "10.3.4"
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.2",
99
- "@ag-grid-community/core": "32.3.2",
100
- "@ag-grid-community/csv-export": "32.3.2",
101
- "@ag-grid-community/infinite-row-model": "32.3.2",
102
- "@ag-grid-community/styles": "32.3.2",
103
- "@ag-grid-community/theming": "32.3.2",
98
+ "@ag-grid-community/client-side-row-model": "32.3.4",
99
+ "@ag-grid-community/core": "32.3.4",
100
+ "@ag-grid-community/csv-export": "32.3.4",
101
+ "@ag-grid-community/infinite-row-model": "32.3.4",
102
+ "@ag-grid-community/styles": "32.3.4",
103
+ "@ag-grid-community/theming": "32.3.4",
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.2";
1
+ export declare const VERSION = "32.3.4";
@@ -15,7 +15,8 @@ export declare class RowContainerComp extends Component {
15
15
  postConstruct(): void;
16
16
  destroy(): void;
17
17
  private setRowCtrls;
18
- appendRow(element: HTMLElement): void;
18
+ private addRowNodes;
19
+ private removeOldRows;
19
20
  private ensureDomOrder;
20
21
  }
21
22
  export declare const RowContainerSelector: ComponentSelector;
@@ -9,7 +9,7 @@ export declare class RowComp extends Component {
9
9
  private domOrder;
10
10
  private cellComps;
11
11
  constructor(ctrl: RowCtrl, beans: BeanCollection, containerType: RowContainerType);
12
- private getInitialStyle;
12
+ private setInitialStyle;
13
13
  private showFullWidth;
14
14
  private setCellCtrls;
15
15
  private ensureDomOrder;
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.2";
1
+ export declare const VERSION = "32.3.4";
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.2";
1
+ export declare const VERSION = "32.3.4";
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.2";
1
+ export declare const VERSION = "32.3.4";
@@ -1 +1 @@
1
- export declare const VERSION = "32.3.2";
1
+ export declare const VERSION = "32.3.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-grid-community",
3
- "version": "32.3.2",
3
+ "version": "32.3.4",
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.1"
91
+ "ag-charts-types": "10.3.4"
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.2",
99
- "@ag-grid-community/core": "32.3.2",
100
- "@ag-grid-community/csv-export": "32.3.2",
101
- "@ag-grid-community/infinite-row-model": "32.3.2",
102
- "@ag-grid-community/styles": "32.3.2",
103
- "@ag-grid-community/theming": "32.3.2",
98
+ "@ag-grid-community/client-side-row-model": "32.3.4",
99
+ "@ag-grid-community/core": "32.3.4",
100
+ "@ag-grid-community/csv-export": "32.3.4",
101
+ "@ag-grid-community/infinite-row-model": "32.3.4",
102
+ "@ag-grid-community/styles": "32.3.4",
103
+ "@ag-grid-community/theming": "32.3.4",
104
104
  "ts-loader": "^9.5.1",
105
105
  "style-loader": "^3.3.4",
106
106
  "css-loader": "^6.10.0",