@cdmx/wappler_ag_grid 0.5.8 → 0.5.9
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/app_connect/components.hjson +46 -0
- package/dmx-ag-grid.js +8 -1
- package/package.json +1 -1
|
@@ -1052,6 +1052,52 @@
|
|
|
1052
1052
|
}
|
|
1053
1053
|
]
|
|
1054
1054
|
},
|
|
1055
|
+
{
|
|
1056
|
+
"group": "📒 Compact View",
|
|
1057
|
+
"variables": [
|
|
1058
|
+
{
|
|
1059
|
+
"name": "compact_view",
|
|
1060
|
+
"title": "Compact View Config",
|
|
1061
|
+
"type": "boolean",
|
|
1062
|
+
"defaultValue": false,
|
|
1063
|
+
"display": "fieldset",
|
|
1064
|
+
"show": [
|
|
1065
|
+
"compactView",
|
|
1066
|
+
"compactViewGridSize",
|
|
1067
|
+
"compactViewItemHeight"
|
|
1068
|
+
],
|
|
1069
|
+
"noChangeOnHide": true,
|
|
1070
|
+
"groupEnabler": true,
|
|
1071
|
+
"help": "Configure amount fields to have comma-seperation implemented"
|
|
1072
|
+
"children": [
|
|
1073
|
+
{
|
|
1074
|
+
"name": "compactView",
|
|
1075
|
+
"attribute": "dmx-bind:compact_view",
|
|
1076
|
+
"title": "Compact View",
|
|
1077
|
+
"type": "boolean",
|
|
1078
|
+
"defaultValue": false,
|
|
1079
|
+
"initDisplay": "none"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"name": "compactViewGridSize",
|
|
1083
|
+
"attribute": "compact_view_grid_size",
|
|
1084
|
+
"title": "Grid Size",
|
|
1085
|
+
"type": "number",
|
|
1086
|
+
"defaultValue": 3,
|
|
1087
|
+
"initDisplay": "none"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "compactViewItemHeight",
|
|
1091
|
+
"attribute": "compact_view_item_height",
|
|
1092
|
+
"title": "Grid Item Height",
|
|
1093
|
+
"type": "number",
|
|
1094
|
+
"defaultValue": 20,
|
|
1095
|
+
"initDisplay": "none"
|
|
1096
|
+
}
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
1055
1101
|
{
|
|
1056
1102
|
"group": "📒 Configure Actions Column",
|
|
1057
1103
|
"variables": [
|
package/dmx-ag-grid.js
CHANGED
|
@@ -82,7 +82,10 @@ dmx.Component('ag-grid', {
|
|
|
82
82
|
data_binded_changes: {type: Array, default: [] },
|
|
83
83
|
hide_fields: {type: Array, default: [] },
|
|
84
84
|
hide_filters: {type: Array, default: [] },
|
|
85
|
-
hide_sort: {type: Array, default: [] }
|
|
85
|
+
hide_sort: {type: Array, default: [] },
|
|
86
|
+
compact_view: { type: Boolean, default: false },
|
|
87
|
+
compact_view_grid_size: { type: Number, default: 3 },
|
|
88
|
+
compact_view_item_height: { type: Number, default: 20 }
|
|
86
89
|
},
|
|
87
90
|
|
|
88
91
|
methods: {
|
|
@@ -859,6 +862,10 @@ dmx.Component('ag-grid', {
|
|
|
859
862
|
// Create ag-Grid instance
|
|
860
863
|
gridInstance = new agGrid.Grid(gridDiv, gridConfig);
|
|
861
864
|
const gridElement = document.getElementById(options.id+'-grid');
|
|
865
|
+
if (options.compact_view) {
|
|
866
|
+
gridElement.style.setProperty('--ag-grid-size', `${options.compact_view_grid_size}`+'px');
|
|
867
|
+
gridElement.style.setProperty('--ag-list-item-height', `${options.compact_view_item_height}`+'px');
|
|
868
|
+
}
|
|
862
869
|
const gridContainer = gridElement.parentNode;
|
|
863
870
|
// Add an event listener to the grid
|
|
864
871
|
if (options.row_checkbox_event) {
|