@cdmx/wappler_ag_grid 2.1.1 → 2.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/README.md +7 -2
- package/app_connect/components.hjson +8 -13
- package/dmx-ag-grid.js +17 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**Major Update:** This release upgrades AG Grid to v35.1.0, bringing continued performance improvements and new features.
|
|
4
4
|
|
|
5
|
-
## 🚀 What's New in v2.
|
|
5
|
+
## 🚀 What's New in v2.1.1
|
|
6
6
|
|
|
7
7
|
1. **🔥 AG Grid v35.1.0** - Latest version with all community features
|
|
8
8
|
2. **⚡ Smooth Upgrade** - Non-breaking upgrade from v34, all existing configurations continue to work
|
|
9
9
|
3. **🎨 HTML Tooltips** - Rich HTML tooltip support with JavaScript functions
|
|
10
10
|
4. **🔧 Enhanced Tooltip System** - Custom tooltip components with automatic HTML detection
|
|
11
11
|
5. **🚫 Suppress Model Update** - Option to prevent automatic reprocessing after update transactions
|
|
12
|
+
6. **📤 Simplified Export Action** - Export format now uses a single dropdown selector (CSV, PDF, XLS) instead of separate checkboxes
|
|
12
13
|
|
|
13
14
|
## 🔄 Migration from v34 to v35
|
|
14
15
|
|
|
@@ -566,7 +567,11 @@ You can also specify left-only conditions, where only the field name is provided
|
|
|
566
567
|
|
|
567
568
|
**Export**
|
|
568
569
|
- To be used if you wish to use a separate Export button instead of using the inbuilt top left-cornered Export button.
|
|
569
|
-
- Trigger this action to
|
|
570
|
+
- Trigger this action to export grid data in your chosen format.
|
|
571
|
+
- **Format**: Select the export format from the dropdown:
|
|
572
|
+
- `csv` - Export as CSV file (default)
|
|
573
|
+
- `pdf` - Export as PDF file
|
|
574
|
+
- `xls` - Export as Excel (.xlsx) file
|
|
570
575
|
- **Column State Integration**: When exporting data, the grid automatically respects the saved column state from localStorage. This means:
|
|
571
576
|
- Columns are exported in the same order as they appear in the grid (based on user's saved column arrangement)
|
|
572
577
|
- Hidden columns are automatically excluded from export
|
|
@@ -3700,19 +3700,14 @@
|
|
|
3700
3700
|
group: 'Properties',
|
|
3701
3701
|
variables: [
|
|
3702
3702
|
{
|
|
3703
|
-
name: '1', optionName: '1', title: '
|
|
3704
|
-
dataBindings: true, defaultValue:
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
help: 'Export Grid data as PDF file.'
|
|
3711
|
-
},
|
|
3712
|
-
{
|
|
3713
|
-
name: '3', optionName: '3', title: 'XLS', type: 'boolean',
|
|
3714
|
-
dataBindings: true, defaultValue: false, required: false,
|
|
3715
|
-
help: 'Export Grid data as Excel (.xlsx) file.'
|
|
3703
|
+
name: '1', optionName: '1', title: 'Format', type: 'droplist',
|
|
3704
|
+
dataBindings: true, defaultValue: 'csv', required: false,
|
|
3705
|
+
"values": [
|
|
3706
|
+
{title: 'CSV', value: 'csv'},
|
|
3707
|
+
{title: 'PDF', value: 'pdf'},
|
|
3708
|
+
{title: 'XLS', value: 'xls'}
|
|
3709
|
+
],
|
|
3710
|
+
help: 'Export Grid data as CSV, PDF, or XLS file.'
|
|
3716
3711
|
}
|
|
3717
3712
|
]
|
|
3718
3713
|
}
|
package/dmx-ag-grid.js
CHANGED
|
@@ -355,22 +355,27 @@ dmx.Component('ag-grid', {
|
|
|
355
355
|
if (gridInstance) gridInstance.destroy();
|
|
356
356
|
}, this);
|
|
357
357
|
},
|
|
358
|
-
exportGrid: function (
|
|
359
|
-
// Default
|
|
360
|
-
|
|
361
|
-
Csv = true;
|
|
362
|
-
}
|
|
358
|
+
exportGrid: function (format) {
|
|
359
|
+
// Default to csv if no format specified
|
|
360
|
+
format = (format || 'csv')
|
|
363
361
|
dmx.nextTick(() => {
|
|
364
362
|
const gridInst = this.get('gridInstance');
|
|
365
363
|
const gridCfg = this.get('gridConfig');
|
|
366
|
-
if (
|
|
367
|
-
exportGridData(gridInst, gridCfg);
|
|
368
|
-
} else if (Pdf) {
|
|
369
|
-
exportGridDataToPDF(gridInst, gridCfg);
|
|
370
|
-
} else if (Xls) {
|
|
371
|
-
exportGridDataToXLS(gridInst, gridCfg);
|
|
372
|
-
} else {
|
|
364
|
+
if (!gridInst || !gridCfg) {
|
|
373
365
|
console.error('Grid not loaded to perform the requested export');
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
switch (format) {
|
|
369
|
+
case 'pdf':
|
|
370
|
+
exportGridDataToPDF(gridInst, gridCfg);
|
|
371
|
+
break;
|
|
372
|
+
case 'xls':
|
|
373
|
+
exportGridDataToXLS(gridInst, gridCfg);
|
|
374
|
+
break;
|
|
375
|
+
case 'csv':
|
|
376
|
+
default:
|
|
377
|
+
exportGridData(gridInst, gridCfg);
|
|
378
|
+
break;
|
|
374
379
|
}
|
|
375
380
|
}, this);
|
|
376
381
|
},
|
package/package.json
CHANGED