@cdmx/wappler_ag_grid 1.0.1 → 1.0.3

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.
@@ -2040,6 +2040,10 @@
2040
2040
  "src": "../../../node_modules/ag-grid-community/styles/ag-theme-material.css",
2041
2041
  "dst": "css/ag-theme-material.css"
2042
2042
  },
2043
+ {
2044
+ "src": "../../../node_modules/moment/min/moment.min.js",
2045
+ "dst": "js/moment.min.js"
2046
+ },
2043
2047
  {
2044
2048
  "src": "ag-theme-custom.css",
2045
2049
  "dst": "css/ag-theme-custom.css"
@@ -2078,6 +2082,11 @@
2078
2082
  "type": "js",
2079
2083
  "defer": true
2080
2084
  },
2085
+ {
2086
+ "src": "js/moment.min.js",
2087
+ "type": "js",
2088
+ "defer": true
2089
+ },
2081
2090
  {
2082
2091
  "src": "js/locale/he.js",
2083
2092
  "type": "js",
package/dmx-ag-grid.js CHANGED
@@ -1287,12 +1287,25 @@ dmx.Component('ag-grid', {
1287
1287
  header.style.position = 'fixed';
1288
1288
  header.style.top = `${topbarHeight}px`;
1289
1289
  header.style.zIndex = '1';
1290
- document.body.style.marginBottom = `${header.offsetHeight}px`; // Add margin to the bottom of the page
1290
+ document.body.style.marginBottom = `${header.offsetHeight}px`;
1291
1291
  } else {
1292
1292
  header.style.position = 'static';
1293
1293
  document.body.style.marginBottom = '0'; // Reset the margin
1294
1294
  }
1295
1295
  });
1296
+ const agHeader = document.querySelector('.ag-header');
1297
+ const agRootWrapper = document.querySelector('.ag-root-wrapper');
1298
+
1299
+ // Function to adjust the header width
1300
+ function adjustHeaderWidth() {
1301
+ if (agHeader && agRootWrapper) {
1302
+ const rootWrapperWidth = agRootWrapper.clientWidth;
1303
+ const newHeaderWidth = rootWrapperWidth * 1.0;
1304
+ agHeader.style.width = `${newHeaderWidth}px`;
1305
+ }
1306
+ }
1307
+ window.addEventListener('resize', adjustHeaderWidth);
1308
+ adjustHeaderWidth();
1296
1309
  }
1297
1310
  if (options.fixed_footer) {
1298
1311
  window.addEventListener('scroll', function () {
@@ -1408,7 +1421,6 @@ dmx.Component('ag-grid', {
1408
1421
  };
1409
1422
  gridConfig.api.exportDataAsCsv(params);
1410
1423
  };
1411
-
1412
1424
  // Create the export button
1413
1425
  if (exportToCSV) {
1414
1426
  const existingExportButton = document.getElementById('exportButton');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",
@@ -16,6 +16,7 @@
16
16
  "dependencies": {
17
17
  "ag-grid-community": "30.1.x",
18
18
  "exceljs": "4.3.x",
19
+ "moment": "2.29.x",
19
20
  "papaparse": "5.4.x"
20
21
  },
21
22
  "scripts": {