@cdmx/wappler_ag_grid 2.0.7 → 2.0.8

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.
Files changed (3) hide show
  1. package/README.md +11 -0
  2. package/dmx-ag-grid.js +40 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -86,6 +86,17 @@ The overrides for the "Custom" theme can be applied in the ag-theme-custom.css f
86
86
 
87
87
  To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-custom.css and include it in your layout file.
88
88
 
89
+ **Important CSS Fix for Custom Theme:**
90
+ When using the custom theme, you may notice that the magnification lens icon on filter search overlaps with the text while typing. To fix this issue, add the following CSS to your custom theme file:
91
+
92
+ ```css
93
+ .ag-input-wrapper:before {
94
+ content: unset !important;
95
+ }
96
+ ```
97
+
98
+ This CSS rule removes the pseudo-element that creates the overlapping magnification lens icon, ensuring proper text visibility during filter input.
99
+
89
100
 
90
101
  ## AG Grid Options
91
102
  1. **Minimum Width**: The minimum width of the column. (Default: 150)
package/dmx-ag-grid.js CHANGED
@@ -1109,7 +1109,7 @@ dmx.Component('ag-grid', {
1109
1109
  else if (Array.isArray(options.tooltip_config)) {
1110
1110
  for (const config of options.tooltip_config) {
1111
1111
  if (config.field === key && config.tooltip === "yes") {
1112
- return value;
1112
+ return value;
1113
1113
  }
1114
1114
  }
1115
1115
  }
@@ -1204,6 +1204,35 @@ dmx.Component('ag-grid', {
1204
1204
 
1205
1205
  if (dataType === 'number') {
1206
1206
  filter = 'agNumberColumnFilter';
1207
+ const baseFilterOptions = [
1208
+ 'equals',
1209
+ 'notEqual',
1210
+ 'lessThan',
1211
+ 'lessThanOrEqual',
1212
+ 'greaterThan',
1213
+ 'greaterThanOrEqual',
1214
+ 'inRange'
1215
+ ];
1216
+
1217
+ filterParams = {
1218
+ filterOptions: [
1219
+ ...baseFilterOptions,
1220
+ {
1221
+ displayKey: 'contains',
1222
+ displayName: 'Contains',
1223
+ predicate: (filterValue, cellValue) => {
1224
+ return cellValue.toString().includes(filterValue.toString());
1225
+ }
1226
+ },
1227
+ {
1228
+ displayKey: 'doesNotContain',
1229
+ displayName: 'Does not Contain',
1230
+ predicate: (filterValue, cellValue) => {
1231
+ return !cellValue.toString().includes(filterValue.toString());
1232
+ }
1233
+ }
1234
+ ]
1235
+ };
1207
1236
  if (options.numeric_column_align){
1208
1237
  type = 'numericColumn';
1209
1238
  }
@@ -1314,14 +1343,14 @@ dmx.Component('ag-grid', {
1314
1343
  // Check if there's a matching change in jsDataChanges
1315
1344
  const matchingJsChange = options.js_data_changes.find(change => change.field === key);
1316
1345
  if (matchingJsChange) {
1317
- cellRenderer = function (params) {
1318
- // Don't apply custom renderer to pinned bottom rows (totals)
1319
- if (params.node && params.node.rowPinned === 'bottom') {
1320
- return "-";
1321
- }
1322
- if (typeof window[matchingJsChange.function] === 'function') {
1323
- const cellValue = window[matchingJsChange.function](params.data);
1324
- return cellValue;
1346
+ cellRenderer = function (params) {
1347
+ // Don't apply custom renderer to pinned bottom rows (totals)
1348
+ if (params.node && params.node.rowPinned === 'bottom') {
1349
+ return "-";
1350
+ }
1351
+ if (typeof window[matchingJsChange.function] === 'function') {
1352
+ const cellValue = window[matchingJsChange.function](params.data);
1353
+ return cellValue;
1325
1354
  }
1326
1355
  }
1327
1356
  }
@@ -1917,8 +1946,8 @@ dmx.Component('ag-grid', {
1917
1946
  filter: customFilter.filter
1918
1947
  };
1919
1948
  });
1920
- gridInstance.setFilterModel(filterModel);
1921
- gridInstance.onFilterChanged();
1949
+ gridInstance.setFilterModel(filterModel);
1950
+ gridInstance.onFilterChanged();
1922
1951
  }
1923
1952
 
1924
1953
  const gridElement = document.getElementById(options.id+'-grid');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid v34 - Advanced data grid with enhanced editing, filtering, and tree data capabilities.",
6
6
  "license": "MIT",