@cdmx/wappler_ag_grid 1.9.8 → 1.9.10
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 +40 -39
- package/app_connect/components.hjson +62 -54
- package/dmx-ag-grid.js +15 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,53 +35,54 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
35
35
|
4. **Case-Insensitive Sort**: Specifies if the columns are sorted in case-insensitive manner. (Default: false)
|
|
36
36
|
5. **Filter**: Specifies if the column has a filter. (Default: true)
|
|
37
37
|
6. **Floating Filter**: Specifies if the column has a floating filter. (Default: true)
|
|
38
|
-
7. **
|
|
39
|
-
8. **
|
|
40
|
-
9. **
|
|
41
|
-
10. **
|
|
42
|
-
11. **
|
|
43
|
-
12. **
|
|
44
|
-
13. **
|
|
45
|
-
14. **
|
|
46
|
-
15. **
|
|
47
|
-
16. **Page Limit**:
|
|
48
|
-
17. **
|
|
38
|
+
7. **Trim Export Data**: Specifies if data trimming is to be applied for exported data. (Default: false)
|
|
39
|
+
8. **Exclude Hidden Fields**: Specifies if Hidden fields are to be excluded in CSV export. (Default: false)
|
|
40
|
+
9. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true).
|
|
41
|
+
10. **PDF Export**: Specifies if Export to PDF is enabled. (Default: false).
|
|
42
|
+
11. **Exclude Fields CSV**: Specifies fields to be excluded in CSV export. (Default: null)
|
|
43
|
+
12. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
|
|
44
|
+
13. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
|
|
45
|
+
14. **Pagination**: Enables pagination. (Default: true)
|
|
46
|
+
15. **Auto Pagination**: Enables automatic pagination. (Default: false)
|
|
47
|
+
16. **Page Limit Selectors**: Allowed selectors for for page size. Set to false to hide the page size selector. (Default: [20,50,100] ).
|
|
48
|
+
17. **Page Limit**: Number of rows to show per page. (Default: 20)
|
|
49
|
+
18. **Row Selection**: Row Selection (single or multiple).
|
|
49
50
|
- "Single"
|
|
50
51
|
- "Multiple" (Default)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
19. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
|
|
53
|
+
20. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
|
|
54
|
+
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)
|
|
55
|
+
22. **Loading Overlay**: This enables loading overlay. (Default: false)
|
|
56
|
+
23. **Loading Overlay Duration**: This sets loading overlay duration in ms. (Default: 500)
|
|
57
|
+
24. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
|
|
57
58
|
- Fixed Header: Enables sticky header. (Default: false)
|
|
58
59
|
- Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
|
|
59
60
|
- Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
|
|
60
61
|
- Topbar Offset: Specify topbar offset (Default: 80)
|
|
61
62
|
- Fixed Horizontal Scroll: Enables Hovering horizontal scrollbar which stays at the bottom all the time. (Default: false)
|
|
62
63
|
- Fixed Horizontal Scroll Width: Fixed horizontal scroll width percentage. (Default: 80%)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
64
|
+
25. **Row Height**: Height of each row in pixels. (Default: Auto)
|
|
65
|
+
26. **Header Height**: Height of the header row in pixels. (Default: Auto)
|
|
66
|
+
27. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
|
|
67
|
+
28. **Auto Header Height**: The header height is automatically set based on the content of the header. (Default: true)
|
|
68
|
+
29. **Auto Height**: The height is automatically set based on the content of the cells. (Default: false)
|
|
69
|
+
30. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
|
|
70
|
+
31. **Center Align (V)**: Specifies if the cell data should be vertically centered. (Default: false)
|
|
71
|
+
32. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
|
|
72
|
+
33. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
|
|
73
|
+
34. **Suppress Movable Columns**: Disables moving columns. (Default: false)
|
|
74
|
+
35. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
|
|
75
|
+
36. **Animate Rows**: Enables row animation on data changes. (Default: false)
|
|
76
|
+
37. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
|
|
77
|
+
38. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
|
|
78
|
+
39. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
|
|
79
|
+
40. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
|
|
80
|
+
41. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
|
|
81
|
+
42. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
|
|
82
|
+
43. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
|
|
83
|
+
44. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
|
|
84
|
+
45. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
85
|
+
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)
|
|
85
86
|
|
|
86
87
|
# Data Type Overrides
|
|
87
88
|
|
|
@@ -209,6 +209,14 @@
|
|
|
209
209
|
"defaultValue": false,
|
|
210
210
|
"help": "Built-in pagination size as per page size."
|
|
211
211
|
},
|
|
212
|
+
{
|
|
213
|
+
"name": "exportTrimData",
|
|
214
|
+
"attribute": "dmx-bind:export_trim_data",
|
|
215
|
+
"title": "Trim Export Data",
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"defaultValue": false,
|
|
218
|
+
"help": "Specifies if exported data should be trimmed"
|
|
219
|
+
},
|
|
212
220
|
{
|
|
213
221
|
"name": "exportToCSV",
|
|
214
222
|
"attribute": "dmx-bind:export_to_csv",
|
|
@@ -1673,12 +1681,12 @@
|
|
|
1673
1681
|
"editable": {
|
|
1674
1682
|
"type": "list",
|
|
1675
1683
|
"items": [
|
|
1676
|
-
{"id": "startsWith", "text": "
|
|
1677
|
-
{"id": "lessThan", "text": "
|
|
1678
|
-
{"id": "dateFrom", "text": "
|
|
1679
|
-
{"id": "greaterThan", "text": "
|
|
1680
|
-
{"id": "equals", "text": "
|
|
1681
|
-
{"id": "contains", "text": "
|
|
1684
|
+
{"id": "startsWith", "text": "startsWith"},
|
|
1685
|
+
{"id": "lessThan", "text": "lessThan"},
|
|
1686
|
+
{"id": "dateFrom", "text": "dateFrom"},
|
|
1687
|
+
{"id": "greaterThan", "text": "greaterThan"},
|
|
1688
|
+
{"id": "equals", "text": "equals"},
|
|
1689
|
+
{"id": "contains", "text": "contains"}
|
|
1682
1690
|
]
|
|
1683
1691
|
}
|
|
1684
1692
|
"help": "Filter type: startsWith, lessThan, dateFrom, etc."
|
|
@@ -1737,8 +1745,8 @@
|
|
|
1737
1745
|
"editable": {
|
|
1738
1746
|
"type": "list",
|
|
1739
1747
|
"items": [
|
|
1740
|
-
{"id": "asc", "text": "
|
|
1741
|
-
{"id": "desc", "text": "
|
|
1748
|
+
{"id": "asc", "text": "asc"},
|
|
1749
|
+
{"id": "desc", "text": "desc"}
|
|
1742
1750
|
]
|
|
1743
1751
|
}
|
|
1744
1752
|
"help": "Sort Order for the fields."
|
|
@@ -2951,29 +2959,29 @@
|
|
|
2951
2959
|
"editable": {
|
|
2952
2960
|
"type": "list",
|
|
2953
2961
|
"items": [
|
|
2954
|
-
{"id": "edit", "text": "
|
|
2955
|
-
{"id": "view", "text": "
|
|
2956
|
-
{"id": "delete", "text": "
|
|
2957
|
-
{"id": "button1", "text": "
|
|
2958
|
-
{"id": "button2", "text": "
|
|
2959
|
-
{"id": "button3", "text": "
|
|
2960
|
-
{"id": "button4", "text": "
|
|
2961
|
-
{"id": "button5", "text": "
|
|
2962
|
-
{"id": "button6", "text": "
|
|
2963
|
-
{"id": "button7", "text": "
|
|
2964
|
-
{"id": "button8", "text": "
|
|
2965
|
-
{"id": "button9", "text": "
|
|
2966
|
-
{"id": "button10", "text": "
|
|
2967
|
-
{"id": "button11", "text": "
|
|
2968
|
-
{"id": "button12", "text": "
|
|
2969
|
-
{"id": "button13", "text": "
|
|
2970
|
-
{"id": "button14", "text": "
|
|
2971
|
-
{"id": "button15", "text": "
|
|
2972
|
-
{"id": "button16", "text": "
|
|
2973
|
-
{"id": "button17", "text": "
|
|
2974
|
-
{"id": "button18", "text": "
|
|
2975
|
-
{"id": "button19", "text": "
|
|
2976
|
-
{"id": "button20", "text": "
|
|
2962
|
+
{"id": "edit", "text": "edit"},
|
|
2963
|
+
{"id": "view", "text": "view"},
|
|
2964
|
+
{"id": "delete", "text": "delete"},
|
|
2965
|
+
{"id": "button1", "text": "button1"},
|
|
2966
|
+
{"id": "button2", "text": "button2"},
|
|
2967
|
+
{"id": "button3", "text": "button3"},
|
|
2968
|
+
{"id": "button4", "text": "button4"},
|
|
2969
|
+
{"id": "button5", "text": "button5"},
|
|
2970
|
+
{"id": "button6", "text": "button6"},
|
|
2971
|
+
{"id": "button7", "text": "button7"},
|
|
2972
|
+
{"id": "button8", "text": "button8"},
|
|
2973
|
+
{"id": "button9", "text": "button9"},
|
|
2974
|
+
{"id": "button10", "text": "button10"},
|
|
2975
|
+
{"id": "button11", "text": "button11"},
|
|
2976
|
+
{"id": "button12", "text": "button12"},
|
|
2977
|
+
{"id": "button13", "text": "button13"},
|
|
2978
|
+
{"id": "button14", "text": "button14"},
|
|
2979
|
+
{"id": "button15", "text": "button15"},
|
|
2980
|
+
{"id": "button16", "text": "button16"},
|
|
2981
|
+
{"id": "button17", "text": "button17"},
|
|
2982
|
+
{"id": "button18", "text": "button18"},
|
|
2983
|
+
{"id": "button19", "text": "button19"},
|
|
2984
|
+
{"id": "button20", "text": "button20"}
|
|
2977
2985
|
]
|
|
2978
2986
|
}
|
|
2979
2987
|
},
|
|
@@ -3015,29 +3023,29 @@
|
|
|
3015
3023
|
"editable": {
|
|
3016
3024
|
"type": "list",
|
|
3017
3025
|
"items": [
|
|
3018
|
-
{"id": "edit", "text": "
|
|
3019
|
-
{"id": "view", "text": "
|
|
3020
|
-
{"id": "delete", "text": "
|
|
3021
|
-
{"id": "button1", "text": "
|
|
3022
|
-
{"id": "button2", "text": "
|
|
3023
|
-
{"id": "button3", "text": "
|
|
3024
|
-
{"id": "button4", "text": "
|
|
3025
|
-
{"id": "button5", "text": "
|
|
3026
|
-
{"id": "button6", "text": "
|
|
3027
|
-
{"id": "button7", "text": "
|
|
3028
|
-
{"id": "button8", "text": "
|
|
3029
|
-
{"id": "button9", "text": "
|
|
3030
|
-
{"id": "button10", "text": "
|
|
3031
|
-
{"id": "button11", "text": "
|
|
3032
|
-
{"id": "button12", "text": "
|
|
3033
|
-
{"id": "button13", "text": "
|
|
3034
|
-
{"id": "button14", "text": "
|
|
3035
|
-
{"id": "button15", "text": "
|
|
3036
|
-
{"id": "button16", "text": "
|
|
3037
|
-
{"id": "button17", "text": "
|
|
3038
|
-
{"id": "button18", "text": "
|
|
3039
|
-
{"id": "button19", "text": "
|
|
3040
|
-
{"id": "button20", "text": "
|
|
3026
|
+
{"id": "edit", "text": "edit"},
|
|
3027
|
+
{"id": "view", "text": "view"},
|
|
3028
|
+
{"id": "delete", "text": "delete"},
|
|
3029
|
+
{"id": "button1", "text": "button1"},
|
|
3030
|
+
{"id": "button2", "text": "button2"},
|
|
3031
|
+
{"id": "button3", "text": "button3"},
|
|
3032
|
+
{"id": "button4", "text": "button4"},
|
|
3033
|
+
{"id": "button5", "text": "button5"},
|
|
3034
|
+
{"id": "button6", "text": "button6"},
|
|
3035
|
+
{"id": "button7", "text": "button7"},
|
|
3036
|
+
{"id": "button8", "text": "button8"},
|
|
3037
|
+
{"id": "button9", "text": "button9"},
|
|
3038
|
+
{"id": "button10", "text": "button10"},
|
|
3039
|
+
{"id": "button11", "text": "button11"},
|
|
3040
|
+
{"id": "button12", "text": "button12"},
|
|
3041
|
+
{"id": "button13", "text": "button13"},
|
|
3042
|
+
{"id": "button14", "text": "button14"},
|
|
3043
|
+
{"id": "button15", "text": "button15"},
|
|
3044
|
+
{"id": "button16", "text": "button16"},
|
|
3045
|
+
{"id": "button17", "text": "button17"},
|
|
3046
|
+
{"id": "button18", "text": "button18"},
|
|
3047
|
+
{"id": "button19", "text": "button19"},
|
|
3048
|
+
{"id": "button20", "text": "button20"}
|
|
3041
3049
|
]
|
|
3042
3050
|
}
|
|
3043
3051
|
},
|
package/dmx-ag-grid.js
CHANGED
|
@@ -81,6 +81,7 @@ dmx.Component('ag-grid', {
|
|
|
81
81
|
floating_filter: { type: Boolean, default: true },
|
|
82
82
|
column_hover_highlight: { type: Boolean, default: true },
|
|
83
83
|
quick_filter_field: { type: String, default: 'search_field' },
|
|
84
|
+
export_trim_data: { type: Boolean, default: false },
|
|
84
85
|
export_exclude_hidden_fields: { type: Boolean, default: false },
|
|
85
86
|
export_exclude_fields: { type: String, default: null },
|
|
86
87
|
export_to_csv: { type: Boolean, default: true },
|
|
@@ -1950,7 +1951,7 @@ dmx.Component('ag-grid', {
|
|
|
1950
1951
|
|
|
1951
1952
|
//CSV Export Function
|
|
1952
1953
|
exportGridData = () => {
|
|
1953
|
-
const excludedColumnIds = ['checkboxColumn', 'actionsColumn'];
|
|
1954
|
+
const excludedColumnIds = ['checkboxColumn', 'actionsColumn'];
|
|
1954
1955
|
const exportExcludeFieldsArray = options.export_exclude_fields ? options.export_exclude_fields.split(',') : [];
|
|
1955
1956
|
// Extracting fields and colIds from columnDefs
|
|
1956
1957
|
let fieldsAndColIds;
|
|
@@ -1985,7 +1986,7 @@ dmx.Component('ag-grid', {
|
|
|
1985
1986
|
(!options.export_exclude_hidden_fields || !column.hide) &&
|
|
1986
1987
|
!exportExcludeFieldsArray.includes(column.field);
|
|
1987
1988
|
}).map((column) => column.field);
|
|
1988
|
-
|
|
1989
|
+
|
|
1989
1990
|
const params = {
|
|
1990
1991
|
fileName: options.export_csv_filename,
|
|
1991
1992
|
allColumns: true,
|
|
@@ -1994,6 +1995,8 @@ dmx.Component('ag-grid', {
|
|
|
1994
1995
|
const columnDef = params.column.getColDef();
|
|
1995
1996
|
const valueFormatter = columnDef.valueFormatter;
|
|
1996
1997
|
const cellRenderer = columnDef.cellRenderer;
|
|
1998
|
+
let value = params.value || "-";
|
|
1999
|
+
|
|
1997
2000
|
// Apply cellRenderer if it exists
|
|
1998
2001
|
if (cellRenderer && typeof cellRenderer === "function") {
|
|
1999
2002
|
const cellRendererParams = {
|
|
@@ -2005,16 +2008,22 @@ dmx.Component('ag-grid', {
|
|
|
2005
2008
|
api: params.api,
|
|
2006
2009
|
context: params.context,
|
|
2007
2010
|
};
|
|
2008
|
-
|
|
2009
|
-
return cellRendererValue;
|
|
2011
|
+
value = cellRenderer(cellRendererParams);
|
|
2010
2012
|
}
|
|
2013
|
+
// Apply valueFormatter if it exists
|
|
2011
2014
|
else if (valueFormatter && typeof valueFormatter === "function") {
|
|
2012
2015
|
const formattedValue = valueFormatter(params);
|
|
2013
2016
|
if (formattedValue !== null && formattedValue !== undefined) {
|
|
2014
|
-
|
|
2017
|
+
value = formattedValue;
|
|
2015
2018
|
}
|
|
2016
2019
|
}
|
|
2017
|
-
|
|
2020
|
+
|
|
2021
|
+
// Trim value if export_trim is true
|
|
2022
|
+
if (options.export_trim_data && typeof value === 'string') {
|
|
2023
|
+
return value.trim();
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
return value;
|
|
2018
2027
|
},
|
|
2019
2028
|
};
|
|
2020
2029
|
gridInstance.exportDataAsCsv(params);
|