@cdmx/wappler_ag_grid 1.3.5 → 1.3.7
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 +20 -19
- package/app_connect/components.hjson +8 -0
- package/dmx-ag-grid.js +10 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ With the update to AG Grid v31, a built-in page limit dropdown feature has been
|
|
|
19
19
|
- "Quartz"
|
|
20
20
|
- "Custom"
|
|
21
21
|
5. **Dark Mode** (Default: false)
|
|
22
|
-
6. **Locale**: Select the locale for the grid. Currently supported locales: English (EN), Russian (RU)
|
|
22
|
+
6. **Locale**: Select the locale for the grid. Currently supported locales: English (EN), Russian (RU), Hebrew (HE) and Portuguese (PT). (Default: EN)
|
|
23
23
|
|
|
24
24
|
**Note for Custom Theme:**
|
|
25
25
|
When you select the "Custom" theme option, you have the flexibility to define your own unique styling for the ag-Grid components.
|
|
@@ -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. **
|
|
38
|
-
5. **
|
|
39
|
-
6. **
|
|
40
|
-
7. **
|
|
41
|
-
8. **
|
|
42
|
-
9. **
|
|
43
|
-
10. **
|
|
44
|
-
11. **
|
|
45
|
-
12. **
|
|
46
|
-
13. **Page Limit**:
|
|
47
|
-
14. **
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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 },
|
|
@@ -593,7 +594,7 @@ dmx.Component('ag-grid', {
|
|
|
593
594
|
operators.push(part);
|
|
594
595
|
} else {
|
|
595
596
|
const [left, operator, right] = extractConditionParts(part);
|
|
596
|
-
const result = evaluateCondition(params.data[left], operator, right);
|
|
597
|
+
const result = params.data[left] !== null ? evaluateCondition(params.data[left], operator, right) : false;
|
|
597
598
|
results.push(result);
|
|
598
599
|
}
|
|
599
600
|
}
|
|
@@ -714,6 +715,12 @@ dmx.Component('ag-grid', {
|
|
|
714
715
|
return '-'
|
|
715
716
|
}
|
|
716
717
|
}
|
|
718
|
+
// comparator for case-insensitive sorting
|
|
719
|
+
caseInsensitiveComparator = {
|
|
720
|
+
comparator: function (valueA, valueB) {
|
|
721
|
+
return valueA.toLowerCase().localeCompare(valueB.toLowerCase())
|
|
722
|
+
}
|
|
723
|
+
};
|
|
717
724
|
dateFilterParams = {
|
|
718
725
|
comparator: function (filterLocalDateAtMidnight, cellValue) {
|
|
719
726
|
var cellDate = new Date(cellValue);
|
|
@@ -967,7 +974,7 @@ dmx.Component('ag-grid', {
|
|
|
967
974
|
} else {
|
|
968
975
|
filter = 'agTextColumnFilter';
|
|
969
976
|
valueFormatter = blankOrNullValueFormatter;
|
|
970
|
-
filterParams = undefined;
|
|
977
|
+
filterParams = options.ci_sort ? caseInsensitiveComparator : undefined;
|
|
971
978
|
minWidth = undefined;
|
|
972
979
|
}
|
|
973
980
|
// Check if custom definition exists for the current field
|
|
@@ -1001,7 +1008,7 @@ dmx.Component('ag-grid', {
|
|
|
1001
1008
|
const [left, operator, right] = extractConditionParts(condition);
|
|
1002
1009
|
if (
|
|
1003
1010
|
params.data.hasOwnProperty(left) &&
|
|
1004
|
-
evaluateCondition(params.data[left], operator, right)
|
|
1011
|
+
(params.data[left] !== null ? evaluateCondition(params.data[left], operator, right) : false)
|
|
1005
1012
|
) {
|
|
1006
1013
|
if (area === 'text') {
|
|
1007
1014
|
return { color: customColor, fontStyle: font, fontWeight: (font==='bold'?'bold':null) };
|