@cdmx/wappler_ag_grid 2.0.3 → 2.0.4

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
@@ -226,6 +226,11 @@ This grid allows you to configure custom tooltips for specific fields. The grid
226
226
  **Custom Tooltip Text** (Type: textbox)
227
227
  - Set a global custom tooltip text that will be applied to all fields that don't have specific tooltip configurations.
228
228
 
229
+ ## Tooltip Show Delay
230
+
231
+ **Tooltip Show Delay** (Type: number, Default: 2000)
232
+ - Set the delay in milliseconds before tooltips appear when hovering over cells. This helps prevent tooltips from showing immediately and can improve user experience by avoiding accidental tooltip displays.
233
+
229
234
  ## Advanced Tooltips with JavaScript Functions
230
235
 
231
236
  The **Using JS Function** feature allows you to create rich HTML tooltips using JavaScript functions. This provides full control over tooltip content and styling.
@@ -6,7 +6,7 @@
6
6
  "groupTitle": "Components",
7
7
  "groupIcon": "fa fa-lg fa-cube",
8
8
  "title": "AG Grid: @@id@@",
9
- "icon": "fa fa-lg fa-table",
9
+ "icon": "fas fa-lg fa-table",
10
10
  "state": "opened",
11
11
  "anyParent": true,
12
12
  "template": "<dmx-ag-grid id=\"@@id@@\"></dmx-ag-grid>",
@@ -836,6 +836,14 @@
836
836
  "type": "text",
837
837
  "help": "Specify custom tooltip text"
838
838
  },
839
+ {
840
+ "name": "tooltipShowDelay",
841
+ "attribute": "tooltip_show_delay",
842
+ "title": "Tooltip Show Delay (ms)",
843
+ "type": "number",
844
+ "defaultValue": 2000,
845
+ "help": "Delay in milliseconds before showing tooltips (default: 2000ms)"
846
+ },
839
847
  {
840
848
  "name": "tooltipConfig",
841
849
  "title": "Configure Field Tooltips",
package/dmx-ag-grid.js CHANGED
@@ -42,6 +42,7 @@ dmx.Component('ag-grid', {
42
42
  display_data_changes: { type: Array, default: [] },
43
43
  js_data_changes: { type: Array, default: [] },
44
44
  js_tooltip_changes: { type: Array, default: [] },
45
+ tooltip_show_delay: { type: Number, default: 2000 },
45
46
  data: { type: Array, default: [] },
46
47
  dom_layout: { type: String, default: 'autoHeight' },
47
48
  enable_cell_text_selection: { type: Boolean, default: true },
@@ -1054,8 +1055,21 @@ dmx.Component('ag-grid', {
1054
1055
  CustomTooltipComponent.prototype.init = function(params) {
1055
1056
  const eGui = this.eGui = document.createElement('div');
1056
1057
  eGui.classList.add('custom-tooltip');
1057
- eGui.style.backgroundColor = 'white';
1058
- eGui.style.border = '1px solid #ccc';
1058
+
1059
+ // Use the dark_mode option from grid configuration
1060
+ const isDarkMode = params.context && params.context.dark_mode ? params.context.dark_mode : false;
1061
+
1062
+ // Apply theme-aware styling
1063
+ if (isDarkMode) {
1064
+ eGui.style.backgroundColor = '#2d3748';
1065
+ eGui.style.border = '1px solid #4a5568';
1066
+ eGui.style.color = '#e2e8f0';
1067
+ } else {
1068
+ eGui.style.backgroundColor = 'white';
1069
+ eGui.style.border = '1px solid #ccc';
1070
+ eGui.style.color = '#333';
1071
+ }
1072
+
1059
1073
  eGui.style.borderRadius = '4px';
1060
1074
  eGui.style.padding = '8px';
1061
1075
  eGui.style.boxShadow = '0 2px 8px rgba(0,0,0,0.15)';
@@ -1340,6 +1354,7 @@ dmx.Component('ag-grid', {
1340
1354
  colId = undefined;
1341
1355
  }
1342
1356
 
1357
+ // Handle JS tooltip changes
1343
1358
  if (options.js_tooltip_changes && Array.isArray(options.js_tooltip_changes) && options.js_tooltip_changes.length > 0) {
1344
1359
  const tooltipChange = options.js_tooltip_changes.find(change => change.field === key);
1345
1360
  if (tooltipChange) {
@@ -1644,6 +1659,9 @@ dmx.Component('ag-grid', {
1644
1659
  getRowStyle: options.rstyles ? createRowStyleFunction(options.rstyles): undefined,
1645
1660
  localeText: localeText,
1646
1661
  enableRtl: options.enable_rtl,
1662
+ context: {
1663
+ dark_mode: options.dark_mode
1664
+ },
1647
1665
  onRowClicked: enableRowClickEvent ? onRowClicked : undefined,
1648
1666
  onRowDoubleClicked: enableRowDoubleClickEvent ? onRowDoubleClicked : undefined,
1649
1667
  onCellClicked: enableCellClickEvent ? onCellClicked : undefined,
@@ -1686,6 +1704,7 @@ dmx.Component('ag-grid', {
1686
1704
  suppressClipboardPaste: this.props.suppress_clipboard_paste,
1687
1705
  suppressScrollOnNewData: this.props.suppress_scroll_on_new_data,
1688
1706
  columnHoverHighlight: this.props.column_hover_highlight,
1707
+ tooltipShowDelay: options.tooltip_show_delay,
1689
1708
  onFilterModified: function (params) {
1690
1709
  const columnApi = params.api;
1691
1710
  const rowCount = columnApi.getDisplayedRowCount();
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@cdmx/wappler_ag_grid",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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",
7
7
  "author": {
8
- "name": "cdmx1",
9
- "url": "https://github.com/cdmx1"
8
+ "name": "cdmx-in",
9
+ "url": "https://github.com/cdmx-in"
10
10
  },
11
11
  "keywords": [
12
12
  "wappler-extension",