@cdmx/wappler_ag_grid 1.3.6 → 1.3.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.
package/README.md CHANGED
@@ -34,32 +34,33 @@ To use the "Custom" theme, copy "ag-theme-custom.css" to public/css/ag-theme-cus
34
34
  1. **Minimum Width**: The minimum width of the column. (Default: 150)
35
35
  2. **Resizable**: Specifies if the column can be resized. (Default: true)
36
36
  3. **Sortable**: Specifies if the columns are sortable. (Default: true)
37
- 4. **Filter**: Specifies if the column has a filter. (Default: true)
38
- 5. **Floating Filter**: Specifies if the column has a floating filter. (Default: true)
39
- 6. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true)
40
- 7. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
41
- 8. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
42
- 9. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
43
- 10. **Pagination**: Enables pagination. (Default: true)
44
- 11. **Auto Pagination**: Enables automatic pagination. (Default: false)
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
- 14. **Row Selection**: Row Selection (single or multiple).
37
+ 4. **Case-Insensitive Sort**: Specifies if the columns are sorted in case-insensitive manner. (Default: false)
38
+ 5. **Filter**: Specifies if the column has a filter. (Default: true)
39
+ 6. **Floating Filter**: Specifies if the column has a floating filter. (Default: true)
40
+ 7. **CSV Export**: Specifies if Export to CSV is enabled. (Default: true)
41
+ 8. **Enable RTL**: Enabled Right to Left, used for Hebrew and Arabic. (Default: false)
42
+ 9. **Column Hover Highlight**: Specifies column hover highlighting. (Default: true)
43
+ 10. **Suppress Row Deselection**: Specifies if rows can be deselected. (Default: false)
44
+ 11. **Pagination**: Enables pagination. (Default: true)
45
+ 12. **Auto Pagination**: Enables automatic pagination. (Default: false)
46
+ 13. **Page Limit Selectors**: Allowed selectors for for page size. (Default: [20,50,100] ).
47
+ 14. **Page Limit**: Number of rows to show per page. (Default: 20)
48
+ 15. **Row Selection**: Row Selection (single or multiple).
48
49
  - "Single"
49
50
  - "Multiple" (Default)
50
- 15. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
51
- 16. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
52
- 17. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
51
+ 16. **Timezone**: Timezone for Date Fields. Select the appropriate timezone from the dropdown list. (Default: Local)
52
+ 17. **Date Format**: Date Format for displaying date values. (Default: "dd/MM/yyyy hh:mm A")
53
+ 18. **Sticky Header and Horizontal Scrollbar**: Optionally specify the header offset and topbar class.
53
54
  - Fixed Header: Enables sticky header. (Default: false)
54
55
  - Header Offset: Specifies offset from the top of the viewport area (Optional). (Default: 100)
55
56
  - Topbar Class: Specify class, e.g., "topbar", to measure the offset from (Optional). (Default: "topbar")
56
57
  - Topbar Offset: Specify topbar offset (Default: 80)
57
58
  - Fixed Horizontal Scroll: Enables Hovering horizontal scrollbar which stays at the bottom all the time. (Default: false)
58
59
  - Fixed Horizontal Scroll Width: Fixed horizontal scroll width percentage. (Default: 80%)
59
- 18. **Row Height**: Height of each row in pixels. (Default: 25)
60
- 19. **Header Height**: Height of the header row in pixels. (Default: 30)
61
- 20. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
62
- 21. **Auto Header Height**: The column header height is automatically set based on the content of the header cells. (Default: true)
60
+ 19. **Row Height**: Height of each row in pixels. (Default: Auto)
61
+ 20. **Header Height**: Height of the header row in pixels. (Default: Auto)
62
+ 21. **Wrap Header Text**: This will cause long headers to wrap. (Default: true)
63
+ 22. **Auto Header Height**: The column header height is automatically set based on the content of the header cells. (Default: true)
63
64
  23. **Wrap Text**: This will cause long texts to wrap in the cells. (Default: false)
64
65
  24. **Suppress Row Click Selection**: Disables row selection on row click. (Default: false)
65
66
  25. **Suppress Menu Hide**: Prevents hiding the column menu. (Default: false)
@@ -152,6 +152,14 @@
152
152
  "defaultValue": true,
153
153
  "help": "Specifies if the column are sortable"
154
154
  },
155
+ {
156
+ "name": "ci_sort",
157
+ "attribute": "dmx-bind:ci_sort",
158
+ "title": "Case-Insensitive Sort",
159
+ "type": "boolean",
160
+ "defaultValue": false,
161
+ "help": "Specifies if the columns are sorted in case-insensitive manner"
162
+ },
155
163
  {
156
164
  "name": "filter",
157
165
  "attribute": "dmx-bind:filter",
package/dmx-ag-grid.js CHANGED
@@ -65,6 +65,7 @@ dmx.Component('ag-grid', {
65
65
  amount_field_precision: { type: Number, default: 2 },
66
66
  min_width: { type: Number, default: 150 },
67
67
  sortable: { type: Boolean, default: true },
68
+ ci_sort: { type: Boolean, default: false },
68
69
  resizable: { type: Boolean, default: true },
69
70
  filter: { type: Boolean, default: true },
70
71
  floating_filter: { type: Boolean, default: true },
@@ -714,6 +715,10 @@ dmx.Component('ag-grid', {
714
715
  return '-'
715
716
  }
716
717
  }
718
+ // comparator for case-insensitive sorting
719
+ const caseInsensitiveComparator = (valueA, valueB) => {
720
+ return valueA.toLowerCase().localeCompare(valueB.toLowerCase())
721
+ }
717
722
  dateFilterParams = {
718
723
  comparator: function (filterLocalDateAtMidnight, cellValue) {
719
724
  var cellDate = new Date(cellValue);
@@ -932,6 +937,7 @@ dmx.Component('ag-grid', {
932
937
  let filterValueGetter;
933
938
  let valueFormatter;
934
939
  let filterParams;
940
+ let comparator;
935
941
  let minWidth;
936
942
  let hide;
937
943
  let type;
@@ -968,6 +974,7 @@ dmx.Component('ag-grid', {
968
974
  filter = 'agTextColumnFilter';
969
975
  valueFormatter = blankOrNullValueFormatter;
970
976
  filterParams = undefined;
977
+ comparator = options.ci_sort ? caseInsensitiveComparator : undefined;
971
978
  minWidth = undefined;
972
979
  }
973
980
  // Check if custom definition exists for the current field
@@ -1090,6 +1097,7 @@ dmx.Component('ag-grid', {
1090
1097
  sortable: sortable,
1091
1098
  filterValueGetter: filterValueGetter,
1092
1099
  filterParams: filterParams,
1100
+ comparator: comparator,
1093
1101
  tooltipValueGetter: tooltipValueGetter,
1094
1102
  cellStyle: applyCellStyle,
1095
1103
  ...(cwidths.hasOwnProperty(key) && {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "type": "module",
5
5
  "description": "App Connect module for AG Grid Table Generation.",
6
6
  "license": "MIT",