@cdmx/wappler_ag_grid 1.2.8 → 1.2.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.
package/README.md CHANGED
@@ -42,8 +42,8 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
42
42
  9. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
43
43
  10. **Pagination**: Enables pagination. (Default: true)
44
44
  11. **Auto Pagination**: Enables automatic pagination. (Default: false)
45
- 12. **Page Size Selectors**: Allowed selectors for for page size. (Default: [20,50,100] ).
46
- 13. **Pagination Page Size**: Number of rows to show per page. (Default: 20)
45
+ 12. **Page Limit Selectors**: Allowed selectors for for page size. (Default: [20,50,100] ).
46
+ 13. **Page Limit**: Number of rows to show per page. (Default: 20)
47
47
  14. **Row Selection**: Row Selection (single or multiple).
48
48
  - "Single"
49
49
  - "Multiple" (Default)
@@ -218,7 +218,7 @@
218
218
  {
219
219
  "name": "paginationPageSizeSelector",
220
220
  "attribute": "dmx-bind:pagination_page_size_selector",
221
- "title": "Pagination Size Selectors",
221
+ "title": "Page Limit Selectors",
222
222
  "type": "text",
223
223
  "defaultValue": "[20,50,100]",
224
224
  "help": "Allowed selectors for for page size."
@@ -226,7 +226,7 @@
226
226
  {
227
227
  "name": "paginationPageSize",
228
228
  "attribute": "pagination_page_size",
229
- "title": "Pagination Page Size",
229
+ "title": "Page Limit",
230
230
  "type": "number",
231
231
  "defaultValue": 20,
232
232
  "help": "Number of rows to show per page"
package/dmx-ag-grid.js CHANGED
@@ -422,6 +422,14 @@ dmx.Component('ag-grid', {
422
422
  this.dispatchEvent('row_double_clicked')
423
423
  }
424
424
 
425
+ function actionsRendererForPinnedBottom(params) {
426
+ if (params.node && params.node.rowPinned === 'bottom') {
427
+ return ''; // Render an empty string for bottom pinned row
428
+ } else {
429
+ return actionsRenderer(params);
430
+ }
431
+ }
432
+
425
433
  function checkboxCellRenderer(params) {
426
434
  const idValue = params.data.id;
427
435
  const columnName = params.colDef.field;
@@ -1145,7 +1153,7 @@ dmx.Component('ag-grid', {
1145
1153
  colId: 'actionsColumn',
1146
1154
  filter: null,
1147
1155
  sortable: false,
1148
- cellRenderer: actionsRenderer,
1156
+ cellRenderer: actionsRendererForPinnedBottom,
1149
1157
  minWidth: options.actions_column_min_width,
1150
1158
  maxWidth: options.actions_column_max_width,
1151
1159
  pinned: (options.pin_actions ? options.actions_column_position: undefined),
@@ -1322,20 +1330,23 @@ dmx.Component('ag-grid', {
1322
1330
  columnsToCount.forEach(function (colObj) {
1323
1331
  const col = colObj.field;
1324
1332
  const uniqueValuesToCount = colObj.unique_values.split(',');
1325
-
1333
+
1326
1334
  result[0][col] = 0;
1327
1335
  let uniqueValues = new Set();
1328
-
1336
+
1329
1337
  rowData.forEach(function (line) {
1330
1338
  if (line.index < rowData.length) {
1331
1339
  const value = line.data[col];
1332
- if (uniqueValuesToCount.includes(value) && !uniqueValues.has(value)) {
1340
+ if (!isNaN(value) && uniqueValuesToCount.includes(value.toString()) && !uniqueValues.has(value)) {
1341
+ uniqueValues.add(value);
1342
+ result[0][col]++;
1343
+ } else if (typeof value === 'string' && uniqueValuesToCount.includes(value) && !uniqueValues.has(value)) {
1333
1344
  uniqueValues.add(value);
1334
1345
  result[0][col]++;
1335
1346
  }
1336
1347
  }
1337
1348
  });
1338
-
1349
+
1339
1350
  result[0][col + '_unique_count'] = uniqueValues.size;
1340
1351
  });
1341
1352
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "dependencies": {
17
17
  "ag-grid-community": "31.0.x",
18
- "exceljs": "4.3.x",
18
+ "exceljs": "4.4.x",
19
19
  "moment": "2.29.x",
20
20
  "papaparse": "5.4.x"
21
21
  },
@@ -24,3 +24,4 @@
24
24
  "publish-dry-run": "npm publish ./dist --access public --dry-run"
25
25
  }
26
26
  }
27
+