@cdmx/wappler_ag_grid 1.3.9 → 1.4.1

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
@@ -60,23 +60,24 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
60
60
  19. **Row Height**: Height of each row in pixels. (Default: Auto)
61
61
  20. **Header Height**: Height of the header row in pixels. (Default: Auto)
62
62
  21. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
63
- 22. **Auto Header Height**: The column header height is automatically set based on the content of the header cells. (Default: true)
64
- 23. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
65
- 24. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
66
- 25. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
67
- 26. **Suppress Movable Columns**: Disables moving columns. (Default: false)
68
- 27. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
69
- 28. **Animate Rows**: Enables row animation on data changes. (Default: false)
70
- 29. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
71
- 30. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
72
- 31. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
73
- 32. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
74
- 33. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
75
- 34. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
76
- 35. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
77
- 36. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
78
- 37. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
79
- 38. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
63
+ 22. **Auto Header Height**: The header height is automatically set based on the content of the header. (Default: true)
64
+ 23. **Auto Height**: The height is automatically set based on the content of the cells. (Default: false)
65
+ 24. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
66
+ 25. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
67
+ 26. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
68
+ 27. **Suppress Movable Columns**: Disables moving columns. (Default: false)
69
+ 28. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
70
+ 29. **Animate Rows**: Enables row animation on data changes. (Default: false)
71
+ 30. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
72
+ 31. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
73
+ 32. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
74
+ 33. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
75
+ 34. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
76
+ 35. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
77
+ 36. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
78
+ 37. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
79
+ 38. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
80
+ 39. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
80
81
 
81
82
  # Data Type Overrides
82
83
 
@@ -411,7 +411,7 @@
411
411
  "title": "Auto Header Height",
412
412
  "type": "boolean",
413
413
  "defaultValue": true,
414
- "help": "The column header height is automatically set based on the content of the header cells."
414
+ "help": "The header row height is automatically set based on the content of the header."
415
415
  },
416
416
  {
417
417
  "name": "wrapText",
@@ -421,6 +421,14 @@
421
421
  "defaultValue": false,
422
422
  "help": "This will cause long texts to wrap in the cells."
423
423
  },
424
+ {
425
+ "name": "autoHeight",
426
+ "attribute": "dmx-bind:auto_height",
427
+ "title": "Auto Height",
428
+ "type": "boolean",
429
+ "defaultValue": false,
430
+ "help": "The height is automatically set based on the content of the cells."
431
+ },
424
432
  {
425
433
  "name": "suppressRowClickSelection",
426
434
  "attribute": "dmx-bind:suppress_row_click_selection",
package/dmx-ag-grid.js CHANGED
@@ -29,6 +29,7 @@ dmx.Component('ag-grid', {
29
29
  wrap_header_text: { type: Boolean, default: true },
30
30
  auto_header_height: { type: Boolean, default: true },
31
31
  wrap_text: { type: Boolean, default: false },
32
+ auto_height: { type: Boolean, default: false },
32
33
  data_changes: { type: Array, default: [] },
33
34
  display_data_changes: { type: Array, default: [] },
34
35
  js_data_changes: { type: Array, default: [] },
@@ -705,7 +706,10 @@ dmx.Component('ag-grid', {
705
706
  };
706
707
 
707
708
  const convertedTimestamp = date.toLocaleString(options.date_locale, options);
708
- dateTimezone = new Date(convertedTimestamp).getTime();
709
+ const [datePart, timePart] = convertedTimestamp.split(', ');
710
+ const [day, month, year] = datePart.split('/');
711
+ const [hours, minutes, seconds] = timePart.split(':');
712
+ const dateTimezone = new Date(`${year}-${month}-${day}T${hours}:${minutes}:${seconds}`).getTime();
709
713
  return formatDate(dateTimezone)
710
714
  } else {
711
715
  return formatDate(date);
@@ -999,6 +1003,7 @@ dmx.Component('ag-grid', {
999
1003
  function applyCellStyle(params) {
1000
1004
  const field = params.colDef.field.toString();
1001
1005
  const styles = cstyles.filter((cs) => cs.field === field);
1006
+ const whiteSpace = options.wrap_text ? 'normal' : 'nowrap'
1002
1007
 
1003
1008
  for (const style of styles) {
1004
1009
  const condition = style.condition;
@@ -1011,13 +1016,15 @@ dmx.Component('ag-grid', {
1011
1016
  (params.data[left] !== null ? evaluateCondition(params.data[left], operator, right) : false)
1012
1017
  ) {
1013
1018
  if (area === 'text') {
1014
- return { color: customColor, fontStyle: font, fontWeight: (font==='bold'?'bold':null) };
1019
+ return { color: customColor, fontStyle: font, fontWeight: (font==='bold'?'bold':null), whiteSpace: whiteSpace };
1015
1020
  } else if (area === 'cell') {
1016
- return { backgroundColor: customColor, fontStyle: font };
1021
+ return { backgroundColor: customColor, fontStyle: font, whiteSpace: whiteSpace };
1017
1022
  }
1018
1023
  }
1019
1024
  }
1020
-
1025
+ if (options.wrap_text) {
1026
+ return { whiteSpace: 'normal' };
1027
+ }
1021
1028
  return null;
1022
1029
  }
1023
1030
 
@@ -1272,7 +1279,7 @@ dmx.Component('ag-grid', {
1272
1279
  resizable: options.resizable,
1273
1280
  wrapHeaderText: options.wrap_header_text,
1274
1281
  autoHeaderHeight: options.auto_header_height,
1275
- wrapText: options.wrap_text,
1282
+ autoHeight: options.auto_height,
1276
1283
  filter: options.filter,
1277
1284
  sortable: options.sortable,
1278
1285
  floatingFilter: options.floating_filter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.3.9",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",