@cdmx/wappler_ag_grid 1.2.8 → 1.3.0
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 +2 -2
- package/app_connect/components.hjson +2 -11
- package/dmx-ag-grid.js +16 -6
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -42,8 +42,8 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
|
|
|
42
42
|
9. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
|
|
43
43
|
10. **Pagination**: Enables pagination. (Default: true)
|
|
44
44
|
11. **Auto Pagination**: Enables automatic pagination. (Default: false)
|
|
45
|
-
12. **Page
|
|
46
|
-
13. **
|
|
45
|
+
12. **Page Limit Selectors**: Allowed selectors for for page size. (Default: [20,50,100] ).
|
|
46
|
+
13. **Page Limit**: Number of rows to show per page. (Default: 20)
|
|
47
47
|
14. **Row Selection**: Row Selection (single or multiple).
|
|
48
48
|
- "Single"
|
|
49
49
|
- "Multiple" (Default)
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
{
|
|
219
219
|
"name": "paginationPageSizeSelector",
|
|
220
220
|
"attribute": "dmx-bind:pagination_page_size_selector",
|
|
221
|
-
"title": "
|
|
221
|
+
"title": "Page Limit Selectors",
|
|
222
222
|
"type": "text",
|
|
223
223
|
"defaultValue": "[20,50,100]",
|
|
224
224
|
"help": "Allowed selectors for for page size."
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
{
|
|
227
227
|
"name": "paginationPageSize",
|
|
228
228
|
"attribute": "pagination_page_size",
|
|
229
|
-
"title": "
|
|
229
|
+
"title": "Page Limit",
|
|
230
230
|
"type": "number",
|
|
231
231
|
"defaultValue": 20,
|
|
232
232
|
"help": "Number of rows to show per page"
|
|
@@ -369,15 +369,6 @@
|
|
|
369
369
|
"initDisplay": "none",
|
|
370
370
|
"defaultValue": 80,
|
|
371
371
|
"help": "Specify topbar offset, Default: 80"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"name": "fixedHorizontalScrollWidth",
|
|
375
|
-
"attribute": "dmx-bind:fixed_horizontal_scroll_width",
|
|
376
|
-
"title": "Fixed Horizontal Scroll Width",
|
|
377
|
-
"type": "number",
|
|
378
|
-
"initDisplay": "none",
|
|
379
|
-
"defaultValue": 80,
|
|
380
|
-
"help": "Fixed horizontal scroll width percentage (Default: 80%)"
|
|
381
372
|
}
|
|
382
373
|
]
|
|
383
374
|
},
|
package/dmx-ag-grid.js
CHANGED
|
@@ -76,7 +76,6 @@ dmx.Component('ag-grid', {
|
|
|
76
76
|
fixed_header_offset: { type: Number, default: 100 },
|
|
77
77
|
fixed_top_offset: { type: Number, default: 80 },
|
|
78
78
|
fixed_horizontal_scroll: { type: Boolean, default: false },
|
|
79
|
-
fixed_horizontal_scroll_width: { type: Number, default: 80 },
|
|
80
79
|
fixed_footer: { type: Boolean, default: false },
|
|
81
80
|
fixed_footer_bottom_padding: { type: Number, default: 10 },
|
|
82
81
|
timezone: {type: String, default: '' },
|
|
@@ -422,6 +421,14 @@ dmx.Component('ag-grid', {
|
|
|
422
421
|
this.dispatchEvent('row_double_clicked')
|
|
423
422
|
}
|
|
424
423
|
|
|
424
|
+
function actionsRendererForPinnedBottom(params) {
|
|
425
|
+
if (params.node && params.node.rowPinned === 'bottom') {
|
|
426
|
+
return ''; // Render an empty string for bottom pinned row
|
|
427
|
+
} else {
|
|
428
|
+
return actionsRenderer(params);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
425
432
|
function checkboxCellRenderer(params) {
|
|
426
433
|
const idValue = params.data.id;
|
|
427
434
|
const columnName = params.colDef.field;
|
|
@@ -1145,7 +1152,7 @@ dmx.Component('ag-grid', {
|
|
|
1145
1152
|
colId: 'actionsColumn',
|
|
1146
1153
|
filter: null,
|
|
1147
1154
|
sortable: false,
|
|
1148
|
-
cellRenderer:
|
|
1155
|
+
cellRenderer: actionsRendererForPinnedBottom,
|
|
1149
1156
|
minWidth: options.actions_column_min_width,
|
|
1150
1157
|
maxWidth: options.actions_column_max_width,
|
|
1151
1158
|
pinned: (options.pin_actions ? options.actions_column_position: undefined),
|
|
@@ -1322,20 +1329,23 @@ dmx.Component('ag-grid', {
|
|
|
1322
1329
|
columnsToCount.forEach(function (colObj) {
|
|
1323
1330
|
const col = colObj.field;
|
|
1324
1331
|
const uniqueValuesToCount = colObj.unique_values.split(',');
|
|
1325
|
-
|
|
1332
|
+
|
|
1326
1333
|
result[0][col] = 0;
|
|
1327
1334
|
let uniqueValues = new Set();
|
|
1328
|
-
|
|
1335
|
+
|
|
1329
1336
|
rowData.forEach(function (line) {
|
|
1330
1337
|
if (line.index < rowData.length) {
|
|
1331
1338
|
const value = line.data[col];
|
|
1332
|
-
if (uniqueValuesToCount.includes(value) && !uniqueValues.has(value)) {
|
|
1339
|
+
if (!isNaN(value) && uniqueValuesToCount.includes(value.toString()) && !uniqueValues.has(value)) {
|
|
1340
|
+
uniqueValues.add(value);
|
|
1341
|
+
result[0][col]++;
|
|
1342
|
+
} else if (typeof value === 'string' && uniqueValuesToCount.includes(value) && !uniqueValues.has(value)) {
|
|
1333
1343
|
uniqueValues.add(value);
|
|
1334
1344
|
result[0][col]++;
|
|
1335
1345
|
}
|
|
1336
1346
|
}
|
|
1337
1347
|
});
|
|
1338
|
-
|
|
1348
|
+
|
|
1339
1349
|
result[0][col + '_unique_count'] = uniqueValues.size;
|
|
1340
1350
|
});
|
|
1341
1351
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdmx/wappler_ag_grid",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "App Connect module for AG Grid Table Generation.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"ag-grid-community": "31.0.x",
|
|
18
|
-
"exceljs": "4.
|
|
18
|
+
"exceljs": "4.4.x",
|
|
19
19
|
"moment": "2.29.x",
|
|
20
20
|
"papaparse": "5.4.x"
|
|
21
21
|
},
|
|
@@ -24,3 +24,4 @@
|
|
|
24
24
|
"publish-dry-run": "npm publish ./dist --access public --dry-run"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|