@cdmx/wappler_ag_grid 1.1.0 → 1.1.2
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.
- package/app_connect/components.hjson +2 -3
- package/dmx-ag-grid.js +16 -11
- package/package.json +2 -2
|
@@ -1251,8 +1251,7 @@
|
|
|
1251
1251
|
"children": [
|
|
1252
1252
|
{
|
|
1253
1253
|
"name": "columnsToCount",
|
|
1254
|
-
"
|
|
1255
|
-
"attribute": "columns_to_count",
|
|
1254
|
+
"attribute": "dmx-bind:columns_to_count",
|
|
1256
1255
|
"title": "Columns to Count",
|
|
1257
1256
|
"type": "grid",
|
|
1258
1257
|
"jsonFormat": true,
|
|
@@ -1298,7 +1297,7 @@
|
|
|
1298
1297
|
},
|
|
1299
1298
|
{
|
|
1300
1299
|
"name": "fixedFooterBottomPadding",
|
|
1301
|
-
"attribute": "
|
|
1300
|
+
"attribute": "fixed_footer_bottom_padding",
|
|
1302
1301
|
"title": "Fixed Footer Bottom Padding",
|
|
1303
1302
|
"type": "number",
|
|
1304
1303
|
"initDisplay": "none",
|
package/dmx-ag-grid.js
CHANGED
|
@@ -50,7 +50,7 @@ dmx.Component('ag-grid', {
|
|
|
50
50
|
numeric_column_align: { type: Boolean, default: false },
|
|
51
51
|
enable_rtl: { type: Boolean, default: false },
|
|
52
52
|
locale_text: { type: String, default: null },
|
|
53
|
-
date_locale: { type: String, default: 'en-
|
|
53
|
+
date_locale: { type: String, default: 'en-US' },
|
|
54
54
|
date_format: { type: String, default: 'dd/MM/yyyy hh:mm A' },
|
|
55
55
|
amount_fields: { type: String, default: null },
|
|
56
56
|
min_width: { type: Number, default: 150 },
|
|
@@ -385,6 +385,11 @@ dmx.Component('ag-grid', {
|
|
|
385
385
|
const idValue = params.data.id;
|
|
386
386
|
const columnName = params.colDef.field;
|
|
387
387
|
const value = params.value;
|
|
388
|
+
|
|
389
|
+
if (params.node.rowPinned == 'bottom') {
|
|
390
|
+
// Render an empty cell for the footer row
|
|
391
|
+
return '-';
|
|
392
|
+
}
|
|
388
393
|
// Assuming `value` is a boolean representing the status
|
|
389
394
|
const checked = value==true ? "checked" : "";
|
|
390
395
|
return `
|
|
@@ -559,7 +564,7 @@ dmx.Component('ag-grid', {
|
|
|
559
564
|
timeZone: timezone,
|
|
560
565
|
};
|
|
561
566
|
|
|
562
|
-
const convertedTimestamp = date.toLocaleString(
|
|
567
|
+
const convertedTimestamp = date.toLocaleString(options.date_locale, options);
|
|
563
568
|
dateTimezone = new Date(convertedTimestamp).getTime();
|
|
564
569
|
return formatDate(dateTimezone)
|
|
565
570
|
} else {
|
|
@@ -804,7 +809,7 @@ dmx.Component('ag-grid', {
|
|
|
804
809
|
if (amountFieldsArray.includes(key)) {
|
|
805
810
|
valueFormatter = function (params) {
|
|
806
811
|
if (params.value != null) {
|
|
807
|
-
return Number(params.value).toLocaleString(
|
|
812
|
+
return Number(params.value).toLocaleString(options.date_locale, {
|
|
808
813
|
minimumFractionDigits: 2,
|
|
809
814
|
maximumFractionDigits: 2,
|
|
810
815
|
});
|
|
@@ -1319,8 +1324,8 @@ dmx.Component('ag-grid', {
|
|
|
1319
1324
|
}
|
|
1320
1325
|
if (options.fixed_header) {
|
|
1321
1326
|
window.addEventListener('scroll', function () {
|
|
1322
|
-
const header =
|
|
1323
|
-
const topbar =
|
|
1327
|
+
const header = gridElement.querySelector('.ag-header');
|
|
1328
|
+
const topbar = gridElement.querySelector('.' + options.topbar_class);
|
|
1324
1329
|
const topbarHeight = (topbar ? topbar.getBoundingClientRect().height : 0) + options.fixed_top_offset;
|
|
1325
1330
|
const headerPos = (topbar ? topbar.getBoundingClientRect().bottom : 0) + options.fixed_header_offset;
|
|
1326
1331
|
if (window.scrollY > headerPos) {
|
|
@@ -1333,8 +1338,8 @@ dmx.Component('ag-grid', {
|
|
|
1333
1338
|
document.body.style.marginBottom = '0'; // Reset the margin
|
|
1334
1339
|
}
|
|
1335
1340
|
});
|
|
1336
|
-
const agHeader =
|
|
1337
|
-
const agRootWrapper =
|
|
1341
|
+
const agHeader = gridElement.querySelector('.ag-header');
|
|
1342
|
+
const agRootWrapper = gridElement.querySelector('.ag-root-wrapper');
|
|
1338
1343
|
|
|
1339
1344
|
// Function to adjust the header width
|
|
1340
1345
|
function adjustHeaderWidth() {
|
|
@@ -1350,8 +1355,8 @@ dmx.Component('ag-grid', {
|
|
|
1350
1355
|
if (options.fixed_footer) {
|
|
1351
1356
|
window.addEventListener('scroll', function () {
|
|
1352
1357
|
if (gridDiv.scrollTop >= (gridDiv.scrollHeight - gridDiv.clientHeight)) {
|
|
1353
|
-
const footerRow =
|
|
1354
|
-
const footerRowDiv =
|
|
1358
|
+
const footerRow = gridElement.querySelector('.ag-row-pinned');
|
|
1359
|
+
const footerRowDiv = gridElement.querySelector('.ag-floating-bottom.ag-selectable');
|
|
1355
1360
|
if (footerRow) {
|
|
1356
1361
|
footerRow.classList.remove('ag-row-pinned');
|
|
1357
1362
|
footerRow.classList.add('ag-row-even');
|
|
@@ -1362,13 +1367,13 @@ dmx.Component('ag-grid', {
|
|
|
1362
1367
|
footerRowDiv.style.height = '0px';
|
|
1363
1368
|
footerRowDiv.style.minHeight = '0px';
|
|
1364
1369
|
}
|
|
1365
|
-
const bottomViewport =
|
|
1370
|
+
const bottomViewport = gridElement.querySelector('.ag-floating-bottom-viewport');
|
|
1366
1371
|
if (bottomViewport) {
|
|
1367
1372
|
bottomViewport.style.position = 'fixed';
|
|
1368
1373
|
bottomViewport.style.bottom = '0';
|
|
1369
1374
|
}
|
|
1370
1375
|
} else {
|
|
1371
|
-
const footerRow =
|
|
1376
|
+
const footerRow = gridElement.querySelector('.fixed-footer-row');
|
|
1372
1377
|
if (footerRow) {
|
|
1373
1378
|
footerRow.classList.add('ag-row-pinned');
|
|
1374
1379
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdmx/wappler_ag_grid",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "App Connect module for AG Grid Table Generation.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"ag-grid"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"ag-grid-community": "30.
|
|
17
|
+
"ag-grid-community": "30.2.x",
|
|
18
18
|
"exceljs": "4.3.x",
|
|
19
19
|
"moment": "2.29.x",
|
|
20
20
|
"papaparse": "5.4.x"
|