@cdmx/wappler_ag_grid 1.8.6 → 1.8.8

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
@@ -402,7 +402,7 @@ Specify the condition to Show the Delete Action button, eg: code==TEST, or statu
402
402
 
403
403
  # Custom Action Buttons
404
404
 
405
- **Buttons 1-10**
405
+ **Buttons 1-20**
406
406
 
407
407
  **Button[i] Action Button**
408
408
  This will display the "Button[i] Action Button" options.
@@ -422,6 +422,10 @@ Specify the CSS class for styling the icon of the Button[i] Action button.
422
422
  **Button[i] Action Button Condition**
423
423
  Specify the condition to Show the Button[i] Action button, eg: code==TEST, or status==COMPLETED||status==FINISHED or status==COMPLETED&&user_status==true
424
424
 
425
+ # Button Class Toggles
426
+ The Button Class Toggles feature provides a way to define and manage classes for action buttons within a grid, based on certain data conditions. This can be useful for dynamically updating button styles based on the state of the row data.
427
+ Specify the condition to apply the defined class on the Action button, eg: code==TEST, or status==COMPLETED||status==FINISHED or status==COMPLETED&&user_status==true
428
+
425
429
  # Action Attributes
426
430
 
427
431
  **Load**
@@ -3000,7 +3000,7 @@
3000
3000
  }
3001
3001
  ],
3002
3002
  "newRecord": {
3003
- "button": "",
3003
+ "btn_id": "",
3004
3004
  "class": "",
3005
3005
  "condition": ""
3006
3006
  }
@@ -3505,6 +3505,40 @@
3505
3505
  "dmx-ag-grid": true
3506
3506
  }
3507
3507
  },
3508
+ {
3509
+ "name": "dmx-ag-grid-export-exclude-fields",
3510
+ "attributeStartsWith": "dmx-bind",
3511
+ "attribute": "export_exclude_fields",
3512
+ "title": "Export Exclude Fields",
3513
+ "type": "boolean",
3514
+ "display": "fieldset",
3515
+ "icon": "fa fa-lg fa-chevron-right",
3516
+ "groupTitle": "Grid Config",
3517
+ "groupIcon": "fa fa-lg fa-cubes",
3518
+ "defaultValue": false,
3519
+ "show": [
3520
+ "exportExcludeFields"
3521
+ ],
3522
+ "noChangeOnHide": true,
3523
+ "groupEnabler": true,
3524
+ "children": [
3525
+ {
3526
+ "name": "exportExcludeFields",
3527
+ "attributeStartsWith": "dmx-bind",
3528
+ "attribute": "export_exclude_fields",
3529
+ "isValue": true,
3530
+ "dataBindings": true,
3531
+ "title": "Exclude Fields",
3532
+ "type": "text",
3533
+ "help": "Export Exclude Fields.",
3534
+ "defaultValue": "",
3535
+ "initDisplay": "none"
3536
+ }
3537
+ ],
3538
+ "allowedOn": {
3539
+ "dmx-ag-grid": true
3540
+ }
3541
+ },
3508
3542
  {
3509
3543
  "name": "dmx-ag-grid-export-filename",
3510
3544
  "attributeStartsWith": "dmx-bind",
package/dmx-ag-grid.js CHANGED
@@ -279,7 +279,10 @@ dmx.Component('ag-grid', {
279
279
  }, this);
280
280
  },
281
281
  exportGrid: function (Csv, Pdf) {
282
- if (!Csv && !Pdf) return;
282
+ // Default Csv to true if both Csv and Pdf are false
283
+ if (!Csv && !Pdf) {
284
+ Csv = true;
285
+ }
283
286
  dmx.nextTick(() => {
284
287
  const exportFunction = Csv ? exportGridData : (Pdf ? exportGridDataToPDF : null);
285
288
  if (typeof exportFunction === 'function') {
@@ -1727,11 +1730,10 @@ dmx.Component('ag-grid', {
1727
1730
  console.error(`Grid container element with ID '${options.id}'-grid not found.`);
1728
1731
  return;
1729
1732
  }
1730
-
1731
- // if (gridInstance) {
1732
- // gridInstance.destroy();
1733
- // gridInstance = null;
1734
- // }
1733
+ if (gridInstance) {
1734
+ gridInstance.destroy();
1735
+ gridInstance = null;
1736
+ }
1735
1737
  const getPageId = () => {
1736
1738
  const currentPageUrl = window.location.origin + window.location.pathname;
1737
1739
  const optionsId = options.id+'-grid';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
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": "~32.0.0",
17
+ "ag-grid-community": "~32.0.2",
18
18
  "exceljs": "4.4.x",
19
19
  "papaparse": "5.4.x"
20
20
  },