@cdmx/wappler_ag_grid 0.9.4 → 0.9.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 +1 -0
- package/app_connect/components.hjson +47 -3
- package/dmx-ag-grid.js +32 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,6 +200,7 @@ The "Total Row Footer" feature allows you to define and display a footer row in
|
|
|
200
200
|
Configuration includes:
|
|
201
201
|
- **Columns To Count**: Specify the columns you want to count in the footer row. Separate column names with commas.
|
|
202
202
|
- **Columns To Sum**: Specify the columns you want to calculate the sum of in the footer row. Separate column names with commas.
|
|
203
|
+
- **Fixed Footer**: Enables fixed footer totals row. (Default: false)
|
|
203
204
|
|
|
204
205
|
---
|
|
205
206
|
|
|
@@ -1163,7 +1163,8 @@
|
|
|
1163
1163
|
"display": "fieldset",
|
|
1164
1164
|
"show": [
|
|
1165
1165
|
"columnsToCount",
|
|
1166
|
-
"columnsToSum"
|
|
1166
|
+
"columnsToSum",
|
|
1167
|
+
"enableFixedFooter"
|
|
1167
1168
|
],
|
|
1168
1169
|
"noChangeOnHide": true,
|
|
1169
1170
|
"groupEnabler": true,
|
|
@@ -1205,7 +1206,16 @@
|
|
|
1205
1206
|
"title": "Columns To Sum",
|
|
1206
1207
|
"type": "text",
|
|
1207
1208
|
"initDisplay": "none"
|
|
1208
|
-
}
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"name": "enableFixedFooter",
|
|
1212
|
+
"attribute": "dmx-bind:fixed_footer",
|
|
1213
|
+
"title": "Fixed Footer",
|
|
1214
|
+
"type": "boolean",
|
|
1215
|
+
"initDisplay": "none",
|
|
1216
|
+
"defaultValue": false,
|
|
1217
|
+
"help": "Enables Fixed Total Row Footer"
|
|
1218
|
+
},
|
|
1209
1219
|
]
|
|
1210
1220
|
}
|
|
1211
1221
|
]
|
|
@@ -2057,7 +2067,7 @@
|
|
|
2057
2067
|
"attribute": "pagination_page_size",
|
|
2058
2068
|
"isValue": true,
|
|
2059
2069
|
"dataBindings": true,
|
|
2060
|
-
"title": "Pagination Page Size
|
|
2070
|
+
"title": "Pagination Page Size",
|
|
2061
2071
|
"type": "text",
|
|
2062
2072
|
"help": "Pagination Page Size.",
|
|
2063
2073
|
"defaultValue": "",
|
|
@@ -2068,6 +2078,40 @@
|
|
|
2068
2078
|
"dmx-ag-grid": true
|
|
2069
2079
|
}
|
|
2070
2080
|
},
|
|
2081
|
+
{
|
|
2082
|
+
"name": "dmx-ag-grid-floating-filter",
|
|
2083
|
+
"attributeStartsWith": "dmx-bind",
|
|
2084
|
+
"attribute": "floating_filter",
|
|
2085
|
+
"title": "Floating Filter",
|
|
2086
|
+
"type": "boolean",
|
|
2087
|
+
"display": "fieldset",
|
|
2088
|
+
"icon": "fa fa-lg fa-chevron-right",
|
|
2089
|
+
"groupTitle": "Grid Config",
|
|
2090
|
+
"groupIcon": "fa fa-lg fa-cubes",
|
|
2091
|
+
"defaultValue": false,
|
|
2092
|
+
"show": [
|
|
2093
|
+
"floatingFilters"
|
|
2094
|
+
],
|
|
2095
|
+
"noChangeOnHide": true,
|
|
2096
|
+
"groupEnabler": true,
|
|
2097
|
+
"children": [
|
|
2098
|
+
{
|
|
2099
|
+
"name": "floatingFilters",
|
|
2100
|
+
"attributeStartsWith": "dmx-bind",
|
|
2101
|
+
"attribute": "floating_filter",
|
|
2102
|
+
"isValue": true,
|
|
2103
|
+
"dataBindings": true,
|
|
2104
|
+
"title": "Floating Filter",
|
|
2105
|
+
"type": "text",
|
|
2106
|
+
"help": "Show/Hide FLoating Filters",
|
|
2107
|
+
"defaultValue": "",
|
|
2108
|
+
"initDisplay": "none"
|
|
2109
|
+
}
|
|
2110
|
+
],
|
|
2111
|
+
"allowedOn": {
|
|
2112
|
+
"dmx-ag-grid": true
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2071
2115
|
{
|
|
2072
2116
|
"name": "dmx-ag-grid-locale",
|
|
2073
2117
|
"attributeStartsWith": "dmx-bind",
|
package/dmx-ag-grid.js
CHANGED
|
@@ -61,6 +61,7 @@ dmx.Component('ag-grid', {
|
|
|
61
61
|
fixed_top_offset: { type: Number, default: 80 },
|
|
62
62
|
fixed_horizontal_scroll: { type: Boolean, default: false },
|
|
63
63
|
fixed_horizontal_scroll_width: { type: Number, default: 80 },
|
|
64
|
+
fixed_footer: { type: Boolean, default: false },
|
|
64
65
|
timezone: {type: String, default: '' },
|
|
65
66
|
cell_click_event: {type: Boolean, default: false },
|
|
66
67
|
row_click_event: {type: Boolean, default: false },
|
|
@@ -1081,11 +1082,11 @@ dmx.Component('ag-grid', {
|
|
|
1081
1082
|
rowStyle: enableRowClickEvent || enableCellClickEvent ? { cursor: 'pointer' } : undefined,
|
|
1082
1083
|
defaultColDef: {
|
|
1083
1084
|
flex: 1,
|
|
1084
|
-
minWidth:
|
|
1085
|
-
resizable:
|
|
1086
|
-
filter:
|
|
1087
|
-
sortable:
|
|
1088
|
-
floatingFilter:
|
|
1085
|
+
minWidth: options.min_width,
|
|
1086
|
+
resizable: options.resizable,
|
|
1087
|
+
filter: options.filter,
|
|
1088
|
+
sortable: options.sortable,
|
|
1089
|
+
floatingFilter: options.floating_filter
|
|
1089
1090
|
},
|
|
1090
1091
|
domLayout: this.props.dom_layout,
|
|
1091
1092
|
enableCellTextSelection: true,
|
|
@@ -1216,7 +1217,7 @@ dmx.Component('ag-grid', {
|
|
|
1216
1217
|
if ((options.columns_to_sum && options.columns_to_sum.split(',').length > 0) || (options.columns_to_count.length > 0)) {
|
|
1217
1218
|
let columnsToSum = options.columns_to_sum ? options.columns_to_sum.split(',') : [];
|
|
1218
1219
|
let columnsToCount = options.columns_to_count;
|
|
1219
|
-
|
|
1220
|
+
|
|
1220
1221
|
gridConfig.onFilterChanged = function (e) {
|
|
1221
1222
|
totalRow(e.api, columnsToSum, columnsToCount);
|
|
1222
1223
|
};
|
|
@@ -1261,7 +1262,7 @@ dmx.Component('ag-grid', {
|
|
|
1261
1262
|
const topbar = document.querySelector('.' + options.topbar_class);
|
|
1262
1263
|
const topbarHeight = (topbar ? topbar.getBoundingClientRect().height : 0) + options.fixed_top_offset;
|
|
1263
1264
|
const headerPos = (topbar ? topbar.getBoundingClientRect().bottom : 0) + options.fixed_header_offset;
|
|
1264
|
-
if (window.
|
|
1265
|
+
if (window.scrollY > headerPos) {
|
|
1265
1266
|
header.style.position = 'fixed';
|
|
1266
1267
|
header.style.top = `${topbarHeight}px`;
|
|
1267
1268
|
header.style.zIndex = '1';
|
|
@@ -1272,6 +1273,30 @@ dmx.Component('ag-grid', {
|
|
|
1272
1273
|
}
|
|
1273
1274
|
});
|
|
1274
1275
|
}
|
|
1276
|
+
if (options.fixed_footer) {
|
|
1277
|
+
window.addEventListener('scroll', function () {
|
|
1278
|
+
if (gridDiv.scrollTop >= (gridDiv.scrollHeight - gridDiv.clientHeight)) {
|
|
1279
|
+
const footerRow = document.querySelector('.ag-row-pinned');
|
|
1280
|
+
if (footerRow) {
|
|
1281
|
+
footerRow.classList.remove('ag-row-pinned');
|
|
1282
|
+
footerRow.classList.add('ag-row-even');
|
|
1283
|
+
footerRow.style.position = 'fixed';
|
|
1284
|
+
footerRow.style.bottom = '10px';
|
|
1285
|
+
footerRow.style.paddingBottom = '27px'
|
|
1286
|
+
}
|
|
1287
|
+
const bottomViewport = document.querySelector('.ag-floating-bottom-viewport');
|
|
1288
|
+
if (bottomViewport) {
|
|
1289
|
+
bottomViewport.style.position = 'fixed';
|
|
1290
|
+
bottomViewport.style.bottom = '0';
|
|
1291
|
+
}
|
|
1292
|
+
} else {
|
|
1293
|
+
const footerRow = document.querySelector('.fixed-footer-row');
|
|
1294
|
+
if (footerRow) {
|
|
1295
|
+
footerRow.classList.add('ag-row-pinned');
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1275
1300
|
exportSelectedRows = () => {
|
|
1276
1301
|
const selectedRows = gridConfig.api.getSelectedRows();
|
|
1277
1302
|
this.set('selectedRows', selectedRows);
|