@cdmx/wappler_ag_grid 1.6.0 → 1.6.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 CHANGED
@@ -35,52 +35,53 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
35
35
  6. **Floating Filter**: Specifies if the column has a floating filter. (Default: true)
36
36
  7. **Editiable Cells**: Makes cells editable. (Default: false)
37
37
  8. **Editiable Rows**: Makes row data editable. (Default: false)
38
- 9. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true)
39
- 10. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
40
- 11. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
41
- 12. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
42
- 13. **Pagination**: Enables pagination. (Default: true)
43
- 14. **Auto Pagination**: Enables automatic pagination. (Default: false)
44
- 15. **Page Limit Selectors**: Allowed selectors for for page size. Set to false to hide the page size selector. (Default: [20,50,100] ).
45
- 16. **Page Limit**: Number of rows to show per page. (Default: 20)
46
- 17. **Row Selection**: Row Selection (single or multiple).
38
+ 9. **Exclude Hidden Fields**: Specifies if Hidden fields are to be excluded in CSV export. (Default: false)
39
+ 10. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true)
40
+ 11. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
41
+ 12. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
42
+ 13. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
43
+ 14. **Pagination**: Enables pagination. (Default: true)
44
+ 15. **Auto Pagination**: Enables automatic pagination. (Default: false)
45
+ 16. **Page Limit Selectors**: Allowed selectors for for page size. Set to false to hide the page size selector. (Default: [20,50,100] ).
46
+ 17. **Page Limit**: Number of rows to show per page. (Default: 20)
47
+ 18. **Row Selection**: Row Selection (single or multiple).
47
48
  - "Single"
48
49
  - "Multiple" (Default)
49
- 18. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
50
- 19. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
51
- 20. **Filter Field ID**: Specifies the field ID of the search field when using grid quick filter. Applicable when using Quick Filter feature of AG Grid, called from Dynamic Events on change event on the field. (Default: search_field)
52
- 21. **Loading Overlay**: This enables loading overlay. (Default: false)
53
- 22. **Loading Overlay Duration**: This sets loading overlay duration in ms. (Default: 500)
54
- 23. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
50
+ 19. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
51
+ 20. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
52
+ 21. **Filter Field ID**: Specifies the field ID of the search field when using grid quick filter. Applicable when using Quick Filter feature of AG Grid, called from Dynamic Events on change event on the field. (Default: search_field)
53
+ 22. **Loading Overlay**: This enables loading overlay. (Default: false)
54
+ 23. **Loading Overlay Duration**: This sets loading overlay duration in ms. (Default: 500)
55
+ 24. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
55
56
  - Fixed Header: Enables sticky header. (Default: false)
56
57
  - Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
57
58
  - Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
58
59
  - Topbar Offset: Specify topbar offset (Default: 80)
59
60
  - Fixed Horizontal Scroll: Enables Hovering horizontal scrollbar which stays at the bottom all the time. (Default: false)
60
61
  - Fixed Horizontal Scroll Width: Fixed horizontal scroll width percentage. (Default: 80%)
61
- 24. **Row Height**: Height of each row in pixels. (Default: Auto)
62
- 25. **Header Height**: Height of the header row in pixels. (Default: Auto)
63
- 26. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
64
- 27. **Auto Header Height**: The header height is automatically set based on the content of the header. (Default: true)
65
- 28. **Auto Height**: The height is automatically set based on the content of the cells. (Default: false)
66
- 29. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
67
- 30. **Center Align (V)**: Specifies if the cell data should be vertically centered. (Default: false)
68
- 31. **Center Align (H)**: Specifies if the cell data should be vertically centered. (Default: false)
69
- 32. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
70
- 33. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
71
- 34. **Suppress Movable Columns**: Disables moving columns. (Default: false)
72
- 35. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
73
- 36. **Animate Rows**: Enables row animation on data changes. (Default: false)
74
- 37. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
75
- 38. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
76
- 39. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
77
- 40. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
78
- 41. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
79
- 42. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
80
- 43. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
81
- 44. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
82
- 45. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
83
- 46. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
62
+ 25. **Row Height**: Height of each row in pixels. (Default: Auto)
63
+ 26. **Header Height**: Height of the header row in pixels. (Default: Auto)
64
+ 27. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
65
+ 28. **Auto Header Height**: The header height is automatically set based on the content of the header. (Default: true)
66
+ 29. **Auto Height**: The height is automatically set based on the content of the cells. (Default: false)
67
+ 30. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
68
+ 31. **Center Align (V)**: Specifies if the cell data should be vertically centered. (Default: false)
69
+ 32. **Center Align (H)**: Specifies if the cell data should be vertically centered. (Default: false)
70
+ 33. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
71
+ 34. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
72
+ 35. **Suppress Movable Columns**: Disables moving columns. (Default: false)
73
+ 36. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
74
+ 37. **Animate Rows**: Enables row animation on data changes. (Default: false)
75
+ 38. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
76
+ 39. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
77
+ 40. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
78
+ 41. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
79
+ 42. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
80
+ 43. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
81
+ 44. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
82
+ 45. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
83
+ 46. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
84
+ 47. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
84
85
 
85
86
  # Data Type Overrides
86
87
 
@@ -192,6 +192,14 @@
192
192
  "defaultValue": false,
193
193
  "help": "Makes entire row editable."
194
194
  },
195
+ {
196
+ "name": "exportExcludeHidden",
197
+ "attribute": "dmx-bind:export_exclude_hidden_fields",
198
+ "title": "Exclude Hidden Fields",
199
+ "type": "boolean",
200
+ "defaultValue": false,
201
+ "help": "Specifies if Hidden fields are to be excluded in CSV export."
202
+ },
195
203
  {
196
204
  "name": "exportToCSV",
197
205
  "attribute": "dmx-bind:export_to_csv",
@@ -475,14 +483,6 @@
475
483
  "defaultValue": false,
476
484
  "help": "Specifies if the cell data should be vertically centered."
477
485
  },
478
- {
479
- "name": "hCenterCellData",
480
- "attribute": "dmx-bind:horz_center_cell_data",
481
- "title": "Center Align (H)",
482
- "type": "boolean",
483
- "defaultValue": false,
484
- "help": "Specifies if the cell data should be horizontally centered."
485
- },
486
486
  {
487
487
  "name": "autoHeight",
488
488
  "attribute": "dmx-bind:auto_height",
package/dmx-ag-grid.js CHANGED
@@ -76,6 +76,7 @@ dmx.Component('ag-grid', {
76
76
  floating_filter: { type: Boolean, default: true },
77
77
  column_hover_highlight: { type: Boolean, default: true },
78
78
  quick_filter_field: { type: String, default: 'search_field' },
79
+ export_exclude_hidden_fields: { type: Boolean, default: false },
79
80
  export_to_csv: { type: Boolean, default: true },
80
81
  export_csv_filename: { type: String, default: 'export.csv' },
81
82
  fixed_header: { type: Boolean, default: false },
@@ -1532,25 +1533,18 @@ dmx.Component('ag-grid', {
1532
1533
  }
1533
1534
 
1534
1535
  const gridElement = document.getElementById(options.id+'-grid');
1535
- if (options.vert_center_cell_data || options.horz_center_cell_data) {
1536
+ if (options.vert_center_cell_data) {
1536
1537
  const styleElement = document.createElement('style');
1537
1538
  if (options.vert_center_cell_data) {
1538
1539
  styleElement.textContent += `
1539
- .ag-cell {
1540
- display: flex;
1541
- align-items: center;
1542
- }
1543
- `;
1544
- }
1545
- if (options.horz_center_cell_data) {
1546
- styleElement.textContent += `
1547
- .ag-cell {
1548
- display: flex;
1549
- justify-content: center;
1550
- }
1551
- .ag-header-cell-label {
1552
- justify-content: center;
1553
- }
1540
+ .ag-cell {
1541
+ display: flex;
1542
+ flex-direction: column;
1543
+ justify-content: center;
1544
+ overflow: hidden;
1545
+ text-overflow: ellipsis;
1546
+ white-space: nowrap;
1547
+ }
1554
1548
  `;
1555
1549
  }
1556
1550
  gridElement.appendChild(styleElement);
@@ -1693,25 +1687,26 @@ dmx.Component('ag-grid', {
1693
1687
  fieldsAndColIds.push({
1694
1688
  field: column.field,
1695
1689
  colId: column.colId,
1690
+ hide: column.hide,
1696
1691
  });
1697
1692
  }
1698
1693
  });
1699
1694
  return fieldsAndColIds;
1700
1695
  };
1701
-
1702
1696
  // Traverse columnDefs to gather fields and colIds
1703
1697
  fieldsAndColIds = traverseColumns(gridConfig.columnDefs);
1704
-
1705
- } else {
1706
- fieldsAndColIds = gridConfig.columnDefs.map((column) => ({
1707
- field: column.field,
1708
- colId: column.colId,
1709
- }));
1710
- }
1711
- // Filtering out fields based on excludedColumnIds
1712
- const fieldsToExport = fieldsAndColIds.filter(
1713
- (column) => !excludedColumnIds.includes(column.colId)
1714
- ).map((column) => column.field);
1698
+ } else {
1699
+ fieldsAndColIds = gridConfig.columnDefs.map((column) => ({
1700
+ field: column.field,
1701
+ colId: column.colId,
1702
+ hide: column.hide,
1703
+ }));
1704
+ }
1705
+ const fieldsToExport = fieldsAndColIds.filter((column) => {
1706
+ return !excludedColumnIds.includes(column.colId) &&
1707
+ (!options.export_exclude_hidden_fields || !column.hide);
1708
+ }).map((column) => column.field);
1709
+
1715
1710
  const params = {
1716
1711
  fileName: options.export_csv_filename,
1717
1712
  allColumns: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",