gamma-app-controller 1.1.8 → 1.1.9

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.
@@ -10041,10 +10041,22 @@ class PageConfigComponent {
10041
10041
  }
10042
10042
  getWidgetTitleDiv(item, div) {
10043
10043
  const widgetDiv = document.createElement('div');
10044
- widgetDiv.classList.add('flex', 'items-center', 'justify-between', 'font-bold', 'text-md', 'text-gray-900', 'dark:text-white', 'border-b', 'p-3', 'bg-gray-800', 'mx-2', 'rounded-t-lg');
10044
+ widgetDiv.classList.add('flex', 'items-center', 'justify-between', 'font-bold', 'text-md', 'text-gray-900', 'dark:text-white', 'border-b', 'p-3', 'bg-gray-800', 'mx-2', 'rounded-t-lg', 'relative');
10045
10045
  const titleDiv = document.createElement('div');
10046
- titleDiv.innerText = (item.nodeProperties) ? item.nodeProperties.widgetTitle : "";
10047
- widgetDiv.append(titleDiv);
10046
+ titleDiv.classList.add('relative', 'group');
10047
+ const params = item.nodeProperties.widgetParams || "";
10048
+ const widgetTitle = item.nodeProperties.widgetTitle;
10049
+ const tooltipMatch = widgetTitle.match(/\$t\{([\s\S]*?)\}/);
10050
+ const displayTitle = widgetTitle.replace(/\$t\{[\s\S]*?\}/g, '').trim();
10051
+ titleDiv.innerText = displayTitle + params;
10052
+ if (tooltipMatch) {
10053
+ const tooltipContent = tooltipMatch[1].trim();
10054
+ const tooltipDiv = document.createElement('div');
10055
+ tooltipDiv.classList.add('absolute', 'left-0', 'bottom-full', 'mb-2', 'w-max', 'max-w-xs', 'bg-black', 'text-white', 'text-sm', 'p-2', 'rounded-lg', 'shadow-lg', 'opacity-0', 'group-hover:opacity-100', 'transition-opacity', 'duration-300', 'z-50');
10056
+ tooltipDiv.innerHTML = tooltipContent;
10057
+ titleDiv.appendChild(tooltipDiv);
10058
+ }
10059
+ widgetDiv.appendChild(titleDiv);
10048
10060
  const editIcon = document.createElement('i');
10049
10061
  editIcon.classList.add('fa', 'fa-pencil', 'ml-2', 'cursor-pointer', 'text-blue-400', 'hover:text-blue-700');
10050
10062
  widgetDiv.append(editIcon);