@cdmx/wappler_ag_grid 1.2.1 → 1.2.2
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 +3 -2
- package/app_connect/components.hjson +45 -3
- package/dmx-ag-grid.js +25 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,8 +65,9 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
65
65
|
31. **Hide ID Field**: Hides the ID Field in the Grid. (Default: false)
|
|
66
66
|
33. **Numeric Column Align**: Align numeric columns to the right. (Default: false)
|
|
67
67
|
34. **Row Click Events**: Enables row click events. This can be used in Dynamic events => Grid Events => Row Clicked. (Default: false)
|
|
68
|
-
35. **
|
|
69
|
-
36. **Enable Row
|
|
68
|
+
35. **Row Double Click Events**: Enables row double click events. This can be used in Dynamic events => Grid Events => Row Double Clicked. (Default: false)
|
|
69
|
+
36. **Enable Row Selection**: Enables row selection. This can be used in Dynamic events => Grid Events => Checkbox Checked || Checkbox Unchecked. (Default: false)
|
|
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)
|
|
70
71
|
|
|
71
72
|
# Data Type Overrides
|
|
72
73
|
|
|
@@ -488,7 +488,15 @@
|
|
|
488
488
|
"title": "Row Click Events",
|
|
489
489
|
"type": "boolean",
|
|
490
490
|
"defaultValue": false,
|
|
491
|
-
"help": "This
|
|
491
|
+
"help": "This enables row click events which can then be used in Dynamic Events => Grid Events => Row Clicked"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "rowDoubleClickEvent",
|
|
495
|
+
"attribute": "dmx-bind:row_double_click_event",
|
|
496
|
+
"title": "Row Double Click Events",
|
|
497
|
+
"type": "boolean",
|
|
498
|
+
"defaultValue": false,
|
|
499
|
+
"help": "This enables row double click events which can then be used in Dynamic Events => Grid Events => Row Double Clicked"
|
|
492
500
|
},
|
|
493
501
|
{
|
|
494
502
|
"name": "rowCheckboxEvent",
|
|
@@ -496,7 +504,7 @@
|
|
|
496
504
|
"title": "Enable Row Selection",
|
|
497
505
|
"type": "boolean",
|
|
498
506
|
"defaultValue": false,
|
|
499
|
-
"help": "This enables row selection which can then be used in Dynamic
|
|
507
|
+
"help": "This enables row selection which can then be used in Dynamic Events => Grid Events => Checkbox Checked || Checkbox Unchecked"
|
|
500
508
|
},
|
|
501
509
|
{
|
|
502
510
|
"name": "rowStatusEvent",
|
|
@@ -504,7 +512,7 @@
|
|
|
504
512
|
"title": "Enable Row Status Toggle",
|
|
505
513
|
"type": "boolean",
|
|
506
514
|
"defaultValue": false,
|
|
507
|
-
"help": "This
|
|
515
|
+
"help": "This enables row status events which can then be used in Dynamic Events => Grid Events => Checkbox Checked || Checkbox Unchecked"
|
|
508
516
|
}
|
|
509
517
|
]
|
|
510
518
|
},
|
|
@@ -2607,6 +2615,40 @@
|
|
|
2607
2615
|
"dmx-ag-grid": true
|
|
2608
2616
|
}
|
|
2609
2617
|
},
|
|
2618
|
+
{
|
|
2619
|
+
"name": "dmx-ag-grid-row-double-clicked",
|
|
2620
|
+
"attributeStartsWith": "dmx-on",
|
|
2621
|
+
"attribute": "row_double_clicked",
|
|
2622
|
+
"display": "fieldset",
|
|
2623
|
+
"title": "Row Double Clicked",
|
|
2624
|
+
"icon": "fa fa-lg fa-chevron-right",
|
|
2625
|
+
"groupTitle": "Grid Events",
|
|
2626
|
+
"groupIcon": "fa fa-lg fa-cubes",
|
|
2627
|
+
"defaultValue": false,
|
|
2628
|
+
"show": [
|
|
2629
|
+
"rowDoubleClicked"
|
|
2630
|
+
],
|
|
2631
|
+
"noChangeOnHide": true,
|
|
2632
|
+
"type": "boolean",
|
|
2633
|
+
"groupEnabler": true,
|
|
2634
|
+
"children": [
|
|
2635
|
+
{
|
|
2636
|
+
"name": "rowDoubleClicked",
|
|
2637
|
+
"attributeStartsWith": "dmx-on",
|
|
2638
|
+
"attribute": "row_double_clicked",
|
|
2639
|
+
"isValue": true,
|
|
2640
|
+
"actionsPicker": true,
|
|
2641
|
+
"title": "Action:",
|
|
2642
|
+
"type": "text",
|
|
2643
|
+
"help": "Choose the action to execute.",
|
|
2644
|
+
"defaultValue": "",
|
|
2645
|
+
"initDisplay": "none"
|
|
2646
|
+
}
|
|
2647
|
+
],
|
|
2648
|
+
"allowedOn": {
|
|
2649
|
+
"dmx-ag-grid": true
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2610
2652
|
{
|
|
2611
2653
|
"name": "dmx-ag-grid-checkbox-checked",
|
|
2612
2654
|
"attributeStartsWith": "dmx-on",
|
package/dmx-ag-grid.js
CHANGED
|
@@ -73,6 +73,7 @@ dmx.Component('ag-grid', {
|
|
|
73
73
|
timezone: {type: String, default: '' },
|
|
74
74
|
cell_click_event: {type: Boolean, default: false },
|
|
75
75
|
row_click_event: {type: Boolean, default: false },
|
|
76
|
+
row_double_click_event: {type: Boolean, default: false },
|
|
76
77
|
row_checkbox_event: {type: Boolean, default: false },
|
|
77
78
|
row_status_event: {type: Boolean, default: false },
|
|
78
79
|
enable_actions: {type: Boolean, default: false },
|
|
@@ -349,7 +350,9 @@ dmx.Component('ag-grid', {
|
|
|
349
350
|
const cwidths = this.props.cwidths
|
|
350
351
|
const ctypes = this.props.ctypes
|
|
351
352
|
const enableRowClickEvent = this.props.row_click_event && !this.props.enable_actions && !this.props.row_checkbox_event;
|
|
352
|
-
const
|
|
353
|
+
const enableRowDoubleClickEvent = this.props.row_double_click_event && !this.props.enable_actions && !this.props.row_checkbox_event;
|
|
354
|
+
const enableCellClickEvent = this.props.row_click_event && (this.props.enable_actions || this.props.row_checkbox_event);
|
|
355
|
+
const enableCellDoubleClickEvent = this.props.row_double_click_event && (this.props.enable_actions || this.props.row_checkbox_event);
|
|
353
356
|
let localeText;
|
|
354
357
|
let columnDefs = [];
|
|
355
358
|
let groupedColumnDefs = [];
|
|
@@ -397,6 +400,17 @@ dmx.Component('ag-grid', {
|
|
|
397
400
|
this.set('id', rowData.id);
|
|
398
401
|
this.dispatchEvent('row_clicked')
|
|
399
402
|
}
|
|
403
|
+
onCellDoubleClicked = (event) => {
|
|
404
|
+
const rowData = event.data;
|
|
405
|
+
const columnId = event.column.colId
|
|
406
|
+
const excludedColIds = ['checkboxColumn', 'actionsColumn', 'statusColumn'];
|
|
407
|
+
if (excludedColIds.includes(columnId)) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
this.set('data', rowData);
|
|
411
|
+
this.set('id', rowData.id);
|
|
412
|
+
this.dispatchEvent('row_double_clicked')
|
|
413
|
+
}
|
|
400
414
|
|
|
401
415
|
function checkboxCellRenderer(params) {
|
|
402
416
|
const idValue = params.data.id;
|
|
@@ -1060,6 +1074,12 @@ dmx.Component('ag-grid', {
|
|
|
1060
1074
|
this.set('id', rowData.id);
|
|
1061
1075
|
this.dispatchEvent('row_clicked')
|
|
1062
1076
|
}
|
|
1077
|
+
window.onRowDoubleClicked = (event) => {
|
|
1078
|
+
const rowData = event.data;
|
|
1079
|
+
this.set('data', rowData);
|
|
1080
|
+
this.set('id', rowData.id);
|
|
1081
|
+
this.dispatchEvent('row_double_clicked')
|
|
1082
|
+
}
|
|
1063
1083
|
let checkboxColumn;
|
|
1064
1084
|
if (options.row_checkbox_event) {
|
|
1065
1085
|
checkboxColumn = {
|
|
@@ -1178,8 +1198,10 @@ dmx.Component('ag-grid', {
|
|
|
1178
1198
|
enableRtl: options.enable_rtl,
|
|
1179
1199
|
noRowsOverlayComponent: '<div>No Records Found.</div>',
|
|
1180
1200
|
onRowClicked: enableRowClickEvent ? onRowClicked : undefined,
|
|
1201
|
+
onRowDoubleClicked: enableRowDoubleClickEvent ? onRowDoubleClicked : undefined,
|
|
1181
1202
|
onCellClicked: enableCellClickEvent ? onCellClicked : undefined,
|
|
1182
|
-
|
|
1203
|
+
onCellDoubleClicked: enableCellDoubleClickEvent ? onCellDoubleClicked : undefined,
|
|
1204
|
+
rowStyle: enableRowClickEvent || enableCellClickEvent || enableRowDoubleClickEvent || enableCellDoubleClickEvent ? { cursor: 'pointer' } : undefined,
|
|
1183
1205
|
defaultColDef: {
|
|
1184
1206
|
flex: 1,
|
|
1185
1207
|
minWidth: options.min_width,
|
|
@@ -1567,6 +1589,7 @@ dmx.Component('ag-grid', {
|
|
|
1567
1589
|
|
|
1568
1590
|
events: {
|
|
1569
1591
|
row_clicked: Event,
|
|
1592
|
+
row_double_clicked: Event,
|
|
1570
1593
|
cell_clicked: Event,
|
|
1571
1594
|
row_checkbox_checked: Event,
|
|
1572
1595
|
row_checkbox_unchecked: Event,
|