@cdmx/wappler_ag_grid 1.4.3 → 1.4.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 +24 -22
- package/app_connect/components.hjson +22 -0
- package/dmx-ag-grid.js +26 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,34 +50,36 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
50
50
|
- "Multiple" (Default)
|
|
51
51
|
16. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
|
|
52
52
|
17. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
|
|
53
|
-
18. **
|
|
53
|
+
18. **Loading Overlay**: This enables loading overlay. (Default: false)
|
|
54
|
+
19. **Loading Overlay Duration**: This sets loading overlay duration in ms. (Default: 500)
|
|
55
|
+
20. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
|
|
54
56
|
- Fixed Header: Enables sticky header. (Default: false)
|
|
55
57
|
- Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
|
|
56
58
|
- Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
|
|
57
59
|
- Topbar Offset: Specify topbar offset (Default: 80)
|
|
58
60
|
- Fixed Horizontal Scroll: Enables Hovering horizontal scrollbar which stays at the bottom all the time. (Default: false)
|
|
59
61
|
- Fixed Horizontal Scroll Width: Fixed horizontal scroll width percentage. (Default: 80%)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
62
|
+
21. **Row Height**: Height of each row in pixels. (Default: Auto)
|
|
63
|
+
22. **Header Height**: Height of the header row in pixels. (Default: Auto)
|
|
64
|
+
23. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
|
|
65
|
+
24. **Auto Header Height**: The header height is automatically set based on the content of the header. (Default: true)
|
|
66
|
+
25. **Auto Height**: The height is automatically set based on the content of the cells. (Default: false)
|
|
67
|
+
26. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
|
|
68
|
+
27. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
|
|
69
|
+
28. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
|
|
70
|
+
29. **Suppress Movable Columns**: Disables moving columns. (Default: false)
|
|
71
|
+
30. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
|
|
72
|
+
31. **Animate Rows**: Enables row animation on data changes. (Default: false)
|
|
73
|
+
32. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
|
|
74
|
+
32. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
|
|
75
|
+
33. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
|
|
76
|
+
34. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
|
|
77
|
+
35. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
|
|
78
|
+
36. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
|
|
79
|
+
37. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
|
|
80
|
+
38. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
|
|
81
|
+
39. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
82
|
+
40. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
81
83
|
|
|
82
84
|
# Data Type Overrides
|
|
83
85
|
|
|
@@ -316,6 +316,28 @@
|
|
|
316
316
|
"defaultValue": "dd/MM/yyyy hh:mm A",
|
|
317
317
|
"help": "Date Format"
|
|
318
318
|
},
|
|
319
|
+
{
|
|
320
|
+
"name": "loadingOverlay",
|
|
321
|
+
"attribute": "dmx-bind:loading_overlay",
|
|
322
|
+
"title": "Enable Loading Overlay",
|
|
323
|
+
"type": "boolean",
|
|
324
|
+
"defaultValue": false,
|
|
325
|
+
"help": "This enables loading overlay",
|
|
326
|
+
"display": "fieldset",
|
|
327
|
+
"show": [
|
|
328
|
+
"loadingOverlayDuration"
|
|
329
|
+
],
|
|
330
|
+
"children": [
|
|
331
|
+
{
|
|
332
|
+
"name": "loadingOverlayDuration",
|
|
333
|
+
"attribute": "loading_overlay_duration",
|
|
334
|
+
"title": "Loading Overlay Duration",
|
|
335
|
+
"type": "number",
|
|
336
|
+
"defaultValue": 500,
|
|
337
|
+
"help": "Loading Overlay Duration in ms"
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
},
|
|
319
341
|
{
|
|
320
342
|
"name": "fixedHeader",
|
|
321
343
|
"title": "Sticky Header and Horizontal Scrollbar",
|
package/dmx-ag-grid.js
CHANGED
|
@@ -86,6 +86,8 @@ dmx.Component('ag-grid', {
|
|
|
86
86
|
row_double_click_event: {type: Boolean, default: false },
|
|
87
87
|
row_checkbox_event: {type: Boolean, default: false },
|
|
88
88
|
row_status_event: {type: Boolean, default: false },
|
|
89
|
+
loading_overlay: { type: Boolean, default: false },
|
|
90
|
+
loading_overlay_duration: { type: Number, default: 500 },
|
|
89
91
|
enable_actions: {type: Boolean, default: false },
|
|
90
92
|
actions_column_position: {type: String, default: 'right' },
|
|
91
93
|
actions_column_min_width: {type: Number, default: null },
|
|
@@ -722,11 +724,16 @@ dmx.Component('ag-grid', {
|
|
|
722
724
|
}
|
|
723
725
|
// comparator for case-insensitive sorting
|
|
724
726
|
const caseInsensitiveComparator = (valueA, valueB) => {
|
|
725
|
-
if (
|
|
726
|
-
return valueB ?
|
|
727
|
+
if (valueA === null || valueA === undefined) {
|
|
728
|
+
return valueB === null || valueB === undefined ? 0 : -1;
|
|
727
729
|
}
|
|
728
|
-
|
|
730
|
+
|
|
731
|
+
if (valueB === null || valueB === undefined) {
|
|
732
|
+
return 1;
|
|
729
733
|
}
|
|
734
|
+
|
|
735
|
+
return valueA.toLowerCase().localeCompare(valueB.toLowerCase());
|
|
736
|
+
};
|
|
730
737
|
dateFilterParams = {
|
|
731
738
|
comparator: function (filterLocalDateAtMidnight, cellValue) {
|
|
732
739
|
var cellDate = new Date(cellValue);
|
|
@@ -1271,7 +1278,6 @@ dmx.Component('ag-grid', {
|
|
|
1271
1278
|
columnDefs: (groupedColumnDefs && groupedColumnDefs.length > 0) ? groupedColumnDefs : columnDefs,
|
|
1272
1279
|
localeText: localeText,
|
|
1273
1280
|
enableRtl: options.enable_rtl,
|
|
1274
|
-
noRowsOverlayComponent: '<div>No Records Found.</div>',
|
|
1275
1281
|
onRowClicked: enableRowClickEvent ? onRowClicked : undefined,
|
|
1276
1282
|
onRowDoubleClicked: enableRowDoubleClickEvent ? onRowDoubleClicked : undefined,
|
|
1277
1283
|
onCellClicked: enableCellClickEvent ? onCellClicked : undefined,
|
|
@@ -1309,6 +1315,15 @@ dmx.Component('ag-grid', {
|
|
|
1309
1315
|
suppressPropertyNamesCheck: this.props.suppress_property_names_check,
|
|
1310
1316
|
suppressRowDeselection: this.props.suppress_row_deselection,
|
|
1311
1317
|
columnHoverHighlight: this.props.column_hover_highlight,
|
|
1318
|
+
onFilterChanged: function (params) {
|
|
1319
|
+
const columnApi = params.columnApi.api;
|
|
1320
|
+
columnApi.hideOverlay();
|
|
1321
|
+
if (!params.api.filterManager.rowModel.rowsToDisplay.length) {
|
|
1322
|
+
columnApi.showNoRowsOverlay();
|
|
1323
|
+
} else {
|
|
1324
|
+
columnApi.hideOverlay();
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1312
1327
|
onGridReady: (params) => {
|
|
1313
1328
|
const columnApi = params.columnApi.api;
|
|
1314
1329
|
hideColumn = (fieldToHide) => {
|
|
@@ -1434,7 +1449,6 @@ dmx.Component('ag-grid', {
|
|
|
1434
1449
|
};
|
|
1435
1450
|
const gridConfig = {
|
|
1436
1451
|
columnDefs: columnDefs,
|
|
1437
|
-
rowData: rowData,
|
|
1438
1452
|
...gridOptions
|
|
1439
1453
|
};
|
|
1440
1454
|
// Conditionally add event listeners based on whether columnsToSum or columnsToCount are defined
|
|
@@ -1454,6 +1468,13 @@ dmx.Component('ag-grid', {
|
|
|
1454
1468
|
}
|
|
1455
1469
|
// Create ag-Grid instance
|
|
1456
1470
|
gridInstance = agGrid.createGrid(gridDiv, gridConfig);
|
|
1471
|
+
gridInstance.setGridOption('rowData', rowData)
|
|
1472
|
+
if (options.loading_overlay) {
|
|
1473
|
+
gridInstance.showLoadingOverlay()
|
|
1474
|
+
setTimeout(() => {
|
|
1475
|
+
gridInstance.hideOverlay()
|
|
1476
|
+
}, options.loading_overlay_duration);
|
|
1477
|
+
}
|
|
1457
1478
|
|
|
1458
1479
|
if (options.cfilters && options.cfilters.length > 0) {
|
|
1459
1480
|
var filterModel = {};
|