@cdmx/wappler_ag_grid 1.2.5 → 1.2.6
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 +29 -27
- package/app_connect/components.hjson +60 -9
- package/dmx-ag-grid.js +18 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,8 @@ The AG Grid module allows you to create a flexible and customizable data grid wi
|
|
|
13
13
|
- "Balham"
|
|
14
14
|
- "Material"
|
|
15
15
|
- "Custom"
|
|
16
|
-
5. **
|
|
16
|
+
5. **Dark Mode** (Default: false)
|
|
17
|
+
6. **Locale**: Select the locale for the grid. Currently supported locales: English (EN), Russian (RU) and Hebrew (HE). (Default: EN)
|
|
17
18
|
|
|
18
19
|
**Note for Custom Theme:**
|
|
19
20
|
When you select the "Custom" theme option, you have the flexibility to define your own unique styling for the ag-Grid components.
|
|
@@ -34,40 +35,41 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
34
35
|
8. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
|
|
35
36
|
9. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
|
|
36
37
|
10. **Pagination**: Enables pagination. (Default: true)
|
|
37
|
-
11. **Pagination
|
|
38
|
-
12. **
|
|
38
|
+
11. **Auto Pagination**: Enables automatic pagination. (Default: false)
|
|
39
|
+
12. **Pagination Size Selectors**: Allowed selectors for for page size. (Default: [20,50,100] ).
|
|
40
|
+
13. **Pagination Page Size**: Number of rows to show per page. (Default: 20)
|
|
41
|
+
14. **Row Selection**: Row Selection (single or multiple).
|
|
39
42
|
- "Single"
|
|
40
43
|
- "Multiple" (Default)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
15. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
|
|
45
|
+
16. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
|
|
46
|
+
17. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
|
|
44
47
|
- Fixed Header: Enables sticky header. (Default: false)
|
|
45
48
|
- Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
|
|
46
49
|
- Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
|
|
47
50
|
- Topbar Offset: Specify topbar offset (Default: 80)
|
|
48
51
|
- Fixed Horizontal Scroll: Enables Hovering horizontal scrollbar which stays at the bottom all the time. (Default: false)
|
|
49
52
|
- Fixed Horizontal Scroll Width: Fixed horizontal scroll width percentage. (Default: 80%)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
37. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
53
|
+
18. **Row Height**: Height of each row in pixels. (Default: 25)
|
|
54
|
+
19. **Header Height**: Height of the header row in pixels. (Default: 30)
|
|
55
|
+
20. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
|
|
56
|
+
21. **Auto Header Height**: The column header height is automatically set based on the content of the header cells. (Default: true)
|
|
57
|
+
23. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
|
|
58
|
+
24. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
|
|
59
|
+
25. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
|
|
60
|
+
26. **Suppress Movable Columns**: Disables moving columns. (Default: false)
|
|
61
|
+
27. **Enable Cell Expressions**: Enables expressions in cell values. (Default: false)
|
|
62
|
+
28. **Animate Rows**: Enables row animation on data changes. (Default: false)
|
|
63
|
+
29. **Suppress Aggregation Function in Header**: Hides the aggregation function in column headers. (Default: false)
|
|
64
|
+
30. **Suppress Clipboard Paste**: Disables pasting data from the clipboard. (Default: false)
|
|
65
|
+
31. **Suppress Scroll on New Data**: Prevents scrolling to newly added data. (Default: false)
|
|
66
|
+
32. **Suppress Property Names Check**: Disables checking for duplicate property names. (Default: false)
|
|
67
|
+
33. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
|
|
68
|
+
34. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
|
|
69
|
+
35. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
|
|
70
|
+
36. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
|
|
71
|
+
37. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
72
|
+
38. **Enable Row Status Toggle**: Enables row status toggle events. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
71
73
|
|
|
72
74
|
# Data Type Overrides
|
|
73
75
|
|
|
@@ -23,6 +23,16 @@
|
|
|
23
23
|
"title": "Data",
|
|
24
24
|
"type": "object"
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"name": "state",
|
|
28
|
+
"title": "state",
|
|
29
|
+
"type": "object",
|
|
30
|
+
sub: [
|
|
31
|
+
{name: "gridReady", type: "boolean"},
|
|
32
|
+
{name: "firstDataRendered", type: "boolean"},
|
|
33
|
+
{name: "rowDataUpdated", type: "boolean"}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
26
36
|
{
|
|
27
37
|
"name": "count",
|
|
28
38
|
"title": "Count",
|
|
@@ -96,7 +106,7 @@
|
|
|
96
106
|
"attribute": "dmx-bind:dark_mode",
|
|
97
107
|
"title": "Dark Mode",
|
|
98
108
|
"type": "boolean",
|
|
99
|
-
"defaultValue":
|
|
109
|
+
"defaultValue": false,
|
|
100
110
|
"help": "Enables dark mode"
|
|
101
111
|
},
|
|
102
112
|
{
|
|
@@ -197,6 +207,22 @@
|
|
|
197
207
|
"defaultValue": true,
|
|
198
208
|
"help": "Enables pagination"
|
|
199
209
|
},
|
|
210
|
+
{
|
|
211
|
+
"name": "paginationAutoPageSize",
|
|
212
|
+
"attribute": "pagination_auto_page_size",
|
|
213
|
+
"title": "Auto Pagination",
|
|
214
|
+
"type": "boolean",
|
|
215
|
+
"defaultValue": false,
|
|
216
|
+
"help": "Built-in pagination size as per page size."
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "paginationPageSizeSelector",
|
|
220
|
+
"attribute": "dmx-bind:pagination_page_size_selector",
|
|
221
|
+
"title": "Pagination Size Selectors",
|
|
222
|
+
"type": "text",
|
|
223
|
+
"defaultValue": "[20,50,100]",
|
|
224
|
+
"help": "Allowed selectors for for page size."
|
|
225
|
+
},
|
|
200
226
|
{
|
|
201
227
|
"name": "paginationPageSize",
|
|
202
228
|
"attribute": "pagination_page_size",
|
|
@@ -443,14 +469,6 @@
|
|
|
443
469
|
"defaultValue": false,
|
|
444
470
|
"help": "Hides the aggregation function in column headers"
|
|
445
471
|
},
|
|
446
|
-
{
|
|
447
|
-
"name": "suppressAggAtRootLevel",
|
|
448
|
-
"attribute": "dmx-bind:suppress_agg_at_root_level",
|
|
449
|
-
"title": "Suppress Aggregation at Root Level",
|
|
450
|
-
"type": "boolean",
|
|
451
|
-
"defaultValue": false,
|
|
452
|
-
"help": "Disables aggregation at the root level"
|
|
453
|
-
},
|
|
454
472
|
{
|
|
455
473
|
"name": "suppressClipboardPaste",
|
|
456
474
|
"attribute": "dmx-bind:suppress_clipboard_paste",
|
|
@@ -2595,6 +2613,39 @@
|
|
|
2595
2613
|
"allowedOn": {
|
|
2596
2614
|
"dmx-ag-grid": true
|
|
2597
2615
|
}
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
"name": "dmx-ag-grid-dark-mode",
|
|
2619
|
+
"attributeStartsWith": "dmx-bind",
|
|
2620
|
+
"attribute": "dark_mode",
|
|
2621
|
+
"title": "Dark Mode",
|
|
2622
|
+
"type": "boolean",
|
|
2623
|
+
"display": "fieldset",
|
|
2624
|
+
"icon": "fa fa-lg fa-chevron-right",
|
|
2625
|
+
"groupTitle": "Grid Config",
|
|
2626
|
+
"groupIcon": "fa fa-lg fa-cubes",
|
|
2627
|
+
"defaultValue": false,
|
|
2628
|
+
"show": [
|
|
2629
|
+
"darkMode"
|
|
2630
|
+
],
|
|
2631
|
+
"noChangeOnHide": true,
|
|
2632
|
+
"groupEnabler": true,
|
|
2633
|
+
"children": [
|
|
2634
|
+
{
|
|
2635
|
+
"name": "darkMode",
|
|
2636
|
+
"attributeStartsWith": "dmx-bind",
|
|
2637
|
+
"attribute": "dark_mode",
|
|
2638
|
+
"isValue": true,
|
|
2639
|
+
"dataBindings": true,
|
|
2640
|
+
"title": "Dark Mode",
|
|
2641
|
+
"type": "text",
|
|
2642
|
+
"help": "Enables dark mode.",
|
|
2643
|
+
"initDisplay": "none"
|
|
2644
|
+
}
|
|
2645
|
+
],
|
|
2646
|
+
"allowedOn": {
|
|
2647
|
+
"dmx-ag-grid": true
|
|
2648
|
+
}
|
|
2598
2649
|
}
|
|
2599
2650
|
],
|
|
2600
2651
|
"events": [
|
package/dmx-ag-grid.js
CHANGED
|
@@ -38,6 +38,8 @@ dmx.Component('ag-grid', {
|
|
|
38
38
|
row_selection: { type: String, default: 'multiple' },
|
|
39
39
|
suppress_row_deselection: { type: Boolean, default: false },
|
|
40
40
|
pagination: { type: Boolean, default: true },
|
|
41
|
+
pagination_auto_page_size: { type: Boolean, default: false },
|
|
42
|
+
pagination_page_size_selector: { type: Array, default: [20,50,100] },
|
|
41
43
|
pagination_page_size: { type: Number, default: 20 },
|
|
42
44
|
row_height: { type: Number, default: null },
|
|
43
45
|
header_height: { type: Number, default: null },
|
|
@@ -1255,7 +1257,9 @@ dmx.Component('ag-grid', {
|
|
|
1255
1257
|
rowSelection: this.props.row_selection,
|
|
1256
1258
|
suppressRowDeselection: this.props.suppress_row_deselection,
|
|
1257
1259
|
pagination: this.props.pagination,
|
|
1260
|
+
paginationAutoPageSize: this.props.pagination_auto_page_size,
|
|
1258
1261
|
paginationPageSize: this.props.pagination_page_size,
|
|
1262
|
+
paginationPageSizeSelector: options.pagination_page_size_selector,
|
|
1259
1263
|
rowHeight: this.props.row_height,
|
|
1260
1264
|
headerHeight: this.props.header_height,
|
|
1261
1265
|
suppressRowClickSelection: this.props.suppress_row_click_selection,
|
|
@@ -1264,12 +1268,20 @@ dmx.Component('ag-grid', {
|
|
|
1264
1268
|
enableCellExpressions: this.props.enable_cell_expressions,
|
|
1265
1269
|
animateRows: this.props.animate_rows,
|
|
1266
1270
|
suppressAggFuncInHeader: this.props.suppress_agg_func_in_header,
|
|
1267
|
-
suppressAggAtRootLevel: this.props.suppress_agg_at_root_level,
|
|
1268
1271
|
suppressClipboardPaste: this.props.suppress_clipboard_paste,
|
|
1269
1272
|
suppressScrollOnNewData: this.props.suppress_scroll_on_new_data,
|
|
1270
1273
|
suppressPropertyNamesCheck: this.props.suppress_property_names_check,
|
|
1271
1274
|
suppressRowDeselection: this.props.suppress_row_deselection,
|
|
1272
1275
|
columnHoverHighlight: this.props.column_hover_highlight,
|
|
1276
|
+
onGridReady: () => {
|
|
1277
|
+
this.set("state", { gridReady: true });
|
|
1278
|
+
},
|
|
1279
|
+
onFirstDataRendered: () => {
|
|
1280
|
+
this.set("state", { firstDataRendered: true });
|
|
1281
|
+
},
|
|
1282
|
+
onRowDataUpdated: (event) => {
|
|
1283
|
+
this.set("state", { rowDataUpdated: true });
|
|
1284
|
+
},
|
|
1273
1285
|
onGridSizeChanged: function(params) {
|
|
1274
1286
|
// This function is called whenever the grid's size changes
|
|
1275
1287
|
adjustHeaderWidth();
|
|
@@ -1401,7 +1413,7 @@ dmx.Component('ag-grid', {
|
|
|
1401
1413
|
};
|
|
1402
1414
|
}
|
|
1403
1415
|
// Create ag-Grid instance
|
|
1404
|
-
gridInstance =
|
|
1416
|
+
gridInstance = agGrid.createGrid(gridDiv, gridConfig);
|
|
1405
1417
|
|
|
1406
1418
|
if (options.cfilters && options.cfilters.length > 0) {
|
|
1407
1419
|
var filterModel = {};
|
|
@@ -1659,5 +1671,9 @@ dmx.Component('ag-grid', {
|
|
|
1659
1671
|
let gridInstance = this.refreshGrid();
|
|
1660
1672
|
this.set('gridInstance', gridInstance);
|
|
1661
1673
|
}
|
|
1674
|
+
if (!dmx.equal(this.props.dark_mode, props.dark_mode)) {
|
|
1675
|
+
let gridInstance = this.refreshGrid();
|
|
1676
|
+
this.set('gridInstance', gridInstance);
|
|
1677
|
+
}
|
|
1662
1678
|
},
|
|
1663
1679
|
});
|