@cdmx/wappler_ag_grid 0.5.4 → 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
@@ -31,7 +31,7 @@ The AG Grid module allows you to create a flexible and customizable data grid wi
31
31
  - "Multiple" (Default)
32
32
  13. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
33
33
  14. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
34
- 15. **Sticky Header and Horizonal Scrollbar**: Optionally specify the header offset and topbar class.
34
+ 15. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
35
35
  - Fixed Header: Enables sticky header. (Default: false)
36
36
  - Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
37
37
  - Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
@@ -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,
@@ -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 },
@@ -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", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation",
6
6
  "license": "MIT",