@cdmx/wappler_ag_grid 1.2.6 → 1.2.7
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 -1
- package/app_connect/components.hjson +12 -1
- package/dmx-ag-grid.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
The AG Grid module allows you to create a flexible and customizable data grid with various options and properties. Below, you'll find the list of properties and options available for configuring the AG Grid module:
|
|
5
5
|
|
|
6
|
+
**Important Changes in v1.2.5:**
|
|
7
|
+
With the update to AG Grid v31, a built-in page limit dropdown feature has been introduced. Consequently, when utilizing external page limit selectors, it is necessary to configure the page selector settings accordingly. The defaults are 20, 50, and 100. If you wish to use values other than these defaults, kindly utilize the Page Size Selectors settings to define your preferred selections.
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
## AG Grid Properties
|
|
7
11
|
|
|
8
12
|
1. **ID**: Unique ID for the grid. (Required)
|
|
@@ -12,6 +16,7 @@ The AG Grid module allows you to create a flexible and customizable data grid wi
|
|
|
12
16
|
- "Alpine" (Default)
|
|
13
17
|
- "Balham"
|
|
14
18
|
- "Material"
|
|
19
|
+
- "Quartz"
|
|
15
20
|
- "Custom"
|
|
16
21
|
5. **Dark Mode** (Default: false)
|
|
17
22
|
6. **Locale**: Select the locale for the grid. Currently supported locales: English (EN), Russian (RU) and Hebrew (HE). (Default: EN)
|
|
@@ -24,6 +29,7 @@ The overrides for the "Custom" theme can be applied in the ag-theme-custom.css f
|
|
|
24
29
|
|
|
25
30
|
To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-custom.css and include it in your layout file.
|
|
26
31
|
|
|
32
|
+
|
|
27
33
|
## AG Grid Options
|
|
28
34
|
1. **Minimum Width**: The minimum width of the column. (Default: 150)
|
|
29
35
|
2. **Resizable**: Specifies if the column can be resized. (Default: true)
|
|
@@ -36,7 +42,7 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
36
42
|
9. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
|
|
37
43
|
10. **Pagination**: Enables pagination. (Default: true)
|
|
38
44
|
11. **Auto Pagination**: Enables automatic pagination. (Default: false)
|
|
39
|
-
12. **
|
|
45
|
+
12. **Page Size Selectors**: Allowed selectors for for page size. (Default: [20,50,100] ).
|
|
40
46
|
13. **Pagination Page Size**: Number of rows to show per page. (Default: 20)
|
|
41
47
|
14. **Row Selection**: Row Selection (single or multiple).
|
|
42
48
|
- "Single"
|
|
@@ -858,7 +858,8 @@
|
|
|
858
858
|
"display": "fieldset",
|
|
859
859
|
"show": [
|
|
860
860
|
"dataChanges",
|
|
861
|
-
"amountFields"
|
|
861
|
+
"amountFields",
|
|
862
|
+
"amountFieldsPrecision"
|
|
862
863
|
],
|
|
863
864
|
"noChangeOnHide": true,
|
|
864
865
|
"groupEnabler": true,
|
|
@@ -920,7 +921,17 @@
|
|
|
920
921
|
"attribute": "amount_fields",
|
|
921
922
|
"title": "Amount Fields",
|
|
922
923
|
"type": "text",
|
|
924
|
+
"initDisplay": "none",
|
|
925
|
+
"help": "Fields (numeric/float data fields) where you desire currency formatting to be applied."
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "amountFieldsPrecision",
|
|
929
|
+
"attribute": "amount_field_precision",
|
|
930
|
+
"title": "Amount Field Precision",
|
|
931
|
+
"type": "number",
|
|
932
|
+
"defaultValue": 2,
|
|
923
933
|
"initDisplay": "none"
|
|
934
|
+
"help": "Setting precision digits after the decimal"
|
|
924
935
|
}
|
|
925
936
|
]
|
|
926
937
|
}
|
package/dmx-ag-grid.js
CHANGED
|
@@ -62,6 +62,7 @@ dmx.Component('ag-grid', {
|
|
|
62
62
|
date_locale: { type: String, default: 'en-US' },
|
|
63
63
|
date_format: { type: String, default: 'dd/MM/yyyy hh:mm A' },
|
|
64
64
|
amount_fields: { type: String, default: null },
|
|
65
|
+
amount_field_precision: { type: Number, default: 2 },
|
|
65
66
|
min_width: { type: Number, default: 150 },
|
|
66
67
|
sortable: { type: Boolean, default: true },
|
|
67
68
|
resizable: { type: Boolean, default: true },
|
|
@@ -935,8 +936,8 @@ dmx.Component('ag-grid', {
|
|
|
935
936
|
valueFormatter = function (params) {
|
|
936
937
|
if (params.value != null) {
|
|
937
938
|
return Number(params.value).toLocaleString(options.date_locale, {
|
|
938
|
-
minimumFractionDigits:
|
|
939
|
-
maximumFractionDigits:
|
|
939
|
+
minimumFractionDigits: options.amount_field_precision,
|
|
940
|
+
maximumFractionDigits: options.amount_field_precision
|
|
940
941
|
});
|
|
941
942
|
}
|
|
942
943
|
return '-';
|