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.
@@ -10030,10 +10030,22 @@ class PageConfigComponent {
10030
10030
  }
10031
10031
  getWidgetTitleDiv(item, div) {
10032
10032
  const widgetDiv = document.createElement('div');
10033
- 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');
10033
+ 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');
10034
10034
  const titleDiv = document.createElement('div');
10035
- titleDiv.innerText = (item.nodeProperties) ? item.nodeProperties.widgetTitle : "";
10036
- widgetDiv.append(titleDiv);
10035
+ titleDiv.classList.add('relative', 'group');
10036
+ const params = item.nodeProperties.widgetParams || "";
10037
+ const widgetTitle = item.nodeProperties.widgetTitle;
10038
+ const tooltipMatch = widgetTitle.match(/\$t\{([\s\S]*?)\}/);
10039
+ const displayTitle = widgetTitle.replace(/\$t\{[\s\S]*?\}/g, '').trim();
10040
+ titleDiv.innerText = displayTitle + params;
10041
+ if (tooltipMatch) {
10042
+ const tooltipContent = tooltipMatch[1].trim();
10043
+ const tooltipDiv = document.createElement('div');
10044
+ 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');
10045
+ tooltipDiv.innerHTML = tooltipContent;
10046
+ titleDiv.appendChild(tooltipDiv);
10047
+ }
10048
+ widgetDiv.appendChild(titleDiv);
10037
10049
  const editIcon = document.createElement('i');
10038
10050
  editIcon.classList.add('fa', 'fa-pencil', 'ml-2', 'cursor-pointer', 'text-blue-400', 'hover:text-blue-700');
10039
10051
  widgetDiv.append(editIcon);