@cdmx/wappler_ag_grid 0.5.3 → 0.5.5

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
@@ -15,42 +15,45 @@ The AG Grid module allows you to create a flexible and customizable data grid wi
15
15
  5. **Locale**: Select the locale for the grid. Currently supported locales: English (EN) and Hebrew (HE). (Default: EN)
16
16
 
17
17
  ## AG Grid Options
18
- 6. **Minimum Width**: The minimum width of the column. (Default: 150)
19
- 7. **Resizable**: Specifies if the column can be resized. (Default: true)
20
- 8. **Sortable**: Specifies if the columns are sortable. (Default: true)
21
- 9. **Filter**: Specifies if the column has a filter. (Default: true)
22
- 10. **Floating Filter**: Specifies if the column has a floating filter. (Default: true)
23
- 11. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true)
24
- 12. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
25
- 13. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
26
- 14. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
27
- 15. **Pagination**: Enables pagination. (Default: true)
28
- 16. **Pagination Page Size**: Number of rows to show per page. (Default: 20)
29
- 17. **Row Selection**: Row Selection (single or multiple).
18
+ 1. **Minimum Width**: The minimum width of the column. (Default: 150)
19
+ 2. **Resizable**: Specifies if the column can be resized. (Default: true)
20
+ 3. **Sortable**: Specifies if the columns are sortable. (Default: true)
21
+ 4. **Filter**: Specifies if the column has a filter. (Default: true)
22
+ 5. **Floating Filter**: Specifies if the column has a floating filter. (Default: true)
23
+ 6. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true)
24
+ 7. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
25
+ 8. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
26
+ 9. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
27
+ 10. **Pagination**: Enables pagination. (Default: true)
28
+ 11. **Pagination Page Size**: Number of rows to show per page. (Default: 20)
29
+ 12. **Row Selection**: Row Selection (single or multiple).
30
30
  - "Single"
31
31
  - "Multiple" (Default)
32
- 18. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
33
- 19. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
34
- 20. **Sticky Header**: Enable sticky header. Optionally specify the header offset and topbar class.
32
+ 13. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
33
+ 14. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
34
+ 15. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
35
+ - Fixed Header: Enables sticky header. (Default: false)
35
36
  - Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
36
37
  - Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
37
38
  - Topbar Offset: Specify topbar offset (Default: 80)
38
- 21. **Row Height**: Height of each row in pixels. (Default: 25)
39
- 22. **Header Height**: Height of the header row in pixels. (Default: 30)
40
- 23. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
41
- 24. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
42
- 25. **Suppress Movable Columns**: Disables moving columns. (Default: false)
43
- 26. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
44
- 27. **Animate Rows**: Enables row animation on data changes. (Default: false)
45
- 28. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
46
- 29. **Suppress Aggregation at Root Level**: Disables aggregation at the root level. (Default: false)
47
- 30. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
48
- 31. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
49
- 32. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
50
- 33. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
51
- 34. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
52
- 35. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
53
- 36. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
39
+ - Fixed Horizontal Scroll: Enables Hovering horizontal scrollbar which stays at the bottom all the time. (Default: false)
40
+ - Fixed Horizontal Scroll Width: Fixed horizontal scroll width percentage. (Default: 80%)
41
+ 16. **Row Height**: Height of each row in pixels. (Default: 25)
42
+ 17. **Header Height**: Height of the header row in pixels. (Default: 30)
43
+ 18. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
44
+ 19. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
45
+ 20. **Suppress Movable Columns**: Disables moving columns. (Default: false)
46
+ 21. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
47
+ 22. **Animate Rows**: Enables row animation on data changes. (Default: false)
48
+ 23. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
49
+ 24. **Suppress Aggregation at Root Level**: Disables aggregation at the root level. (Default: false)
50
+ 25. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
51
+ 26. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
52
+ 27. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
53
+ 28. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
54
+ 29. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
55
+ 30. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
56
+ 31. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
54
57
 
55
58
  # Data Type Overrides
56
59
 
@@ -263,7 +263,7 @@
263
263
  },
264
264
  {
265
265
  "name": "fixedHeader",
266
- "title": "Sticky Header and Horizonal Scrollbar",
266
+ "title": "Sticky Header and Horizontal Scrollbar",
267
267
  "type": "boolean",
268
268
  "display": "fieldset",
269
269
  "noChangeOnHide": true,
@@ -315,18 +315,18 @@
315
315
  "help": "Specify topbar offset, Default: 80"
316
316
  },
317
317
  {
318
- "name": "fixedHorizonalScroll",
319
- "attribute": "dmx-bind:fixed_horizonatal_scroll",
320
- "title": "Fixed Horizonal Scroll",
318
+ "name": "fixedHorizontalScroll",
319
+ "attribute": "dmx-bind:fixed_horizontal_scroll",
320
+ "title": "Fixed Horizontal Scroll",
321
321
  "type": "boolean",
322
322
  "initDisplay": "none",
323
323
  "defaultValue": false,
324
324
  "help": "Enables bottom fixed horizontal scroll"
325
325
  },
326
326
  {
327
- "name": "fixedHorizonalScrollWidth",
328
- "attribute": "dmx-bind:fixed_horizonatal_scroll_width",
329
- "title": "Fixed Horizonal Scroll Width",
327
+ "name": "fixedHorizontalScrollWidth",
328
+ "attribute": "dmx-bind:fixed_horizontal_scroll_width",
329
+ "title": "Fixed Horizontal Scroll Width",
330
330
  "type": "number",
331
331
  "initDisplay": "none",
332
332
  "defaultValue": 80,
@@ -1017,6 +1017,33 @@
1017
1017
  }
1018
1018
  ]
1019
1019
  },
1020
+ {
1021
+ "group": "📒 Amount Fields",
1022
+ "variables": [
1023
+ {
1024
+ "name": "amount_fields",
1025
+ "title": "Amount Fields Config",
1026
+ "type": "boolean",
1027
+ "defaultValue": false,
1028
+ "display": "fieldset",
1029
+ "show": [
1030
+ "amountFields"
1031
+ ],
1032
+ "noChangeOnHide": true,
1033
+ "groupEnabler": true,
1034
+ "help": "Configure amount fields to have comma-seperation implemented"
1035
+ "children": [
1036
+ {
1037
+ "name": "amountFields",
1038
+ "attribute": "amount_fields",
1039
+ "title": "Amount Fields",
1040
+ "type": "text",
1041
+ "initDisplay": "none"
1042
+ }
1043
+ ]
1044
+ }
1045
+ ]
1046
+ },
1020
1047
  {
1021
1048
  "group": "📒 Configure Actions Column",
1022
1049
  "variables": [
@@ -1029,6 +1056,7 @@
1029
1056
  "display": "fieldset",
1030
1057
  "show": [
1031
1058
  "enableActions",
1059
+ "pinActions",
1032
1060
  "editActionBtn",
1033
1061
  "editActionTitle",
1034
1062
  "editActionTooltip",
@@ -1058,7 +1086,7 @@
1058
1086
  "help": "Enable Actions"
1059
1087
  },
1060
1088
  {
1061
- "name": "pingActions",
1089
+ "name": "pinActions",
1062
1090
  "attribute": "dmx-bind:pin_actions",
1063
1091
  "title": "Pin Actions Column",
1064
1092
  "type": "boolean",
package/dmx-ag-grid.js CHANGED
@@ -42,6 +42,7 @@ dmx.Component('ag-grid', {
42
42
  locale_text: { type: String, default: null },
43
43
  date_locale: { type: String, default: 'en-IN' },
44
44
  date_format: { type: String, default: 'dd/MM/yyyy hh:mm A' },
45
+ amount_fields: { type: Array, default: [] },
45
46
  min_width: { type: Number, default: 150 },
46
47
  sortable: { type: Boolean, default: true },
47
48
  resizable: { type: Boolean, default: true },
@@ -50,12 +51,12 @@ dmx.Component('ag-grid', {
50
51
  column_hover_highlight: { type: Boolean, default: true },
51
52
  export_to_csv: { type: Boolean, default: true },
52
53
  fixed_header: { type: Boolean, default: false },
53
- topbar_class: { type: Text, default: 'topbar' },
54
+ topbar_class: { type: String, default: 'topbar' },
54
55
  fixed_header_offset: { type: Number, default: 100 },
55
56
  fixed_top_offset: { type: Number, default: 80 },
56
- fixed_horizonatal_scroll: { type: Boolean, default: false },
57
- fixed_horizonatal_scroll_width: { type: Number, default: 80 },
58
- timezone: {type: Text, default: '' },
57
+ fixed_horizontal_scroll: { type: Boolean, default: false },
58
+ fixed_horizontal_scroll_width: { type: Number, default: 80 },
59
+ timezone: {type: String, default: '' },
59
60
  cell_click_event: {type: Boolean, default: false },
60
61
  row_click_event: {type: Boolean, default: false },
61
62
  row_checkbox_event: {type: Boolean, default: false },
@@ -533,7 +534,7 @@ dmx.Component('ag-grid', {
533
534
 
534
535
  if (dataType === 'number') {
535
536
  filter = 'agNumberColumnFilter';
536
- if (/(amount|amt)$/.test(key)) {
537
+ if (options.amount_fields && options.amount_fields.includes(key)) {
537
538
  valueFormatter = function (params) {
538
539
  if (params.value != null) {
539
540
  return Number(params.value).toLocaleString("en-US", {
@@ -889,11 +890,11 @@ dmx.Component('ag-grid', {
889
890
  const agGridElement = document.getElementById(gridId);
890
891
  function updateHoveringBarStyles() {
891
892
  const existingStyle = document.getElementById('hovering-bar-style');
892
- if (options.fixed_horizonatal_scroll) {
893
+ if (options.fixed_horizontal_scroll) {
893
894
  // Create a new style element
894
895
  const styleElement = document.createElement('style');
895
896
  styleElement.id = 'hovering-bar-style';
896
- const barWidthPercentage = options.fixed_horizonatal_scroll_width;
897
+ const barWidthPercentage = options.fixed_horizontal_scroll_width;
897
898
  const barWidth = `calc(${barWidthPercentage}vw - 10px)`;
898
899
  // Add the styles for the hovering horizontal bottom bar
899
900
  styleElement.innerHTML = `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation",
6
6
  "license": "MIT",