@cdmx/wappler_ag_grid 1.9.15 → 1.9.17

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.
Files changed (2) hide show
  1. package/dmx-ag-grid.js +17 -6
  2. package/package.json +1 -1
package/dmx-ag-grid.js CHANGED
@@ -1741,13 +1741,17 @@ dmx.Component('ag-grid', {
1741
1741
  columnsToSum.forEach(function (col) {
1742
1742
  result[0][col] = 0;
1743
1743
  rowData.forEach(function (line) {
1744
- if (line.index < rowData.length) {
1745
- result[0][col] += parseFloat(line.data[col]) || line.data[col];
1744
+ if (line.index < rowData.length && line.data[col] !== null && line.data[col] !== undefined) {
1745
+ // Convert to number and handle NaN
1746
+ const value = Number(line.data[col]);
1747
+ if (!isNaN(value)) {
1748
+ result[0][col] += value;
1749
+ }
1746
1750
  }
1747
1751
  });
1748
1752
  // Apply footer sum precision if specified
1749
- if (options.footer_sum_precision) {
1750
- result[0][col] = parseFloat(result[0][col].toFixed(options.footer_sum_precision) );
1753
+ if (options.footer_sum_precision !== null && !isNaN(result[0][col])) {
1754
+ result[0][col] = Number(result[0][col].toFixed(options.footer_sum_precision));
1751
1755
  }
1752
1756
  });
1753
1757
  }
@@ -1942,17 +1946,24 @@ dmx.Component('ag-grid', {
1942
1946
  const bodyHorizontalScrollElement = gridElement.querySelector('.ag-body-horizontal-scroll');
1943
1947
  const rootWrapperWidth = agRootWrapper.clientWidth;
1944
1948
  bodyHorizontalScrollElement.style.width = rootWrapperWidth + 'px';
1945
- // Add the styles for the hovering horizontal bottom bar
1949
+
1950
+ // Get the height of the horizontal scrollbar
1951
+ const scrollbarHeight = bodyHorizontalScrollElement.offsetHeight || 17;
1952
+
1946
1953
  styleElement.innerHTML = `
1947
1954
  .ag-body-horizontal-scroll {
1948
1955
  position: fixed;
1949
1956
  bottom: 0;
1957
+ z-index: 1000;
1950
1958
  }
1951
1959
  .ag-sticky-bottom {
1952
1960
  display: none;
1953
1961
  }
1954
1962
  .ag-paging-panel {
1955
1963
  border-top: none;
1964
+ margin-bottom: ${scrollbarHeight}px !important;
1965
+ position: relative;
1966
+ z-index: 999;
1956
1967
  }
1957
1968
  `;
1958
1969
  if (existingStyle) {
@@ -1961,7 +1972,6 @@ dmx.Component('ag-grid', {
1961
1972
  gridElement.appendChild(styleElement);
1962
1973
  }
1963
1974
  } else if (existingStyle) {
1964
- // Remove the style element if it exists
1965
1975
  existingStyle.parentNode.removeChild(existingStyle);
1966
1976
  }
1967
1977
  }
@@ -2175,6 +2185,7 @@ dmx.Component('ag-grid', {
2175
2185
  colDef,
2176
2186
  column,
2177
2187
  api: gridInstance,
2188
+ context: params.context,
2178
2189
  };
2179
2190
  const cellStyle = applyCellStyle(params);
2180
2191
  // Determine the header name using cnames and humanize function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.9.15",
3
+ "version": "1.9.17",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",