@trops/dash-core 0.1.474 → 0.1.476

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/dist/index.esm.js CHANGED
@@ -57714,6 +57714,12 @@ function NotificationsTab(_ref4) {
57714
57714
  // Notifications collection logic but scoped to one workspace.
57715
57715
  var widgetInstances = useMemo(function () {
57716
57716
  var out = [];
57717
+ // Dedup by stable id. WorkspaceModel auto-migrates legacy
57718
+ // non-paged workspaces by aliasing pages[0].layout = workspace.layout
57719
+ // (same reference), so visiting both yields duplicate pushes for
57720
+ // every widget. Same stableId formula as providerResolution.js
57721
+ // forEachWidget so the two stay consistent.
57722
+ var seen = new Set();
57717
57723
  var _visit = function visit(item) {
57718
57724
  if (!item) return;
57719
57725
  if (Array.isArray(item)) {
@@ -57721,16 +57727,31 @@ function NotificationsTab(_ref4) {
57721
57727
  return;
57722
57728
  }
57723
57729
  if (item.component) {
57724
- var _config$notifications;
57725
- var config = ComponentManager.resolve(item.component, item);
57726
- if ((config === null || config === void 0 || (_config$notifications = config.notifications) === null || _config$notifications === void 0 ? void 0 : _config$notifications.length) > 0) {
57727
- var _item$userPrefs;
57728
- out.push({
57729
- uuid: item.uuid || item.uuidString,
57730
- title: ((_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title) || config.displayName || item.component,
57731
- "package": config["package"] || "Other",
57732
- notifications: config.notifications
57733
- });
57730
+ var idPart = item.uuidString || item.uuid || item.id;
57731
+ var stableId = idPart != null ? "".concat(item.component, "|").concat(idPart) : null;
57732
+ if (stableId && seen.has(stableId)) ; else {
57733
+ var _config$notifications;
57734
+ if (stableId) seen.add(stableId);
57735
+ var config = ComponentManager.resolve(item.component, item);
57736
+ if ((config === null || config === void 0 || (_config$notifications = config.notifications) === null || _config$notifications === void 0 ? void 0 : _config$notifications.length) > 0) {
57737
+ var _item$userPrefs;
57738
+ out.push({
57739
+ uuid: item.uuid || item.uuidString,
57740
+ title: ((_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title) || config.displayName || item.component,
57741
+ "package": config["package"] || "Other",
57742
+ // Scoped component id (e.g. "trops.google.GoogleWidget")
57743
+ // — disambiguates rows when several widgets share a
57744
+ // title or display the same package label. Mirrors the
57745
+ // Listeners tab convention so the user only learns one
57746
+ // identification scheme.
57747
+ component: item.component,
57748
+ // Layout instance id — disambiguates two widgets of the
57749
+ // SAME component on the dashboard (e.g. two GitHub
57750
+ // widgets in the same workspace).
57751
+ itemId: item.id,
57752
+ notifications: config.notifications
57753
+ });
57754
+ }
57734
57755
  }
57735
57756
  }
57736
57757
  if (Array.isArray(item.children)) item.children.forEach(_visit);
@@ -57754,7 +57775,7 @@ function NotificationsTab(_ref4) {
57754
57775
  var q = searchQuery.trim().toLowerCase();
57755
57776
  if (!q) return widgetInstances;
57756
57777
  return widgetInstances.filter(function (wi) {
57757
- var hay = [wi.title, wi["package"]].concat(_toConsumableArray(wi.notifications.map(function (n) {
57778
+ var hay = [wi.title, wi["package"], wi.component, wi.itemId != null ? "#".concat(wi.itemId) : ""].concat(_toConsumableArray(wi.notifications.map(function (n) {
57758
57779
  return "".concat(n.key, " ").concat(n.displayName || "");
57759
57780
  }))).join(" ").toLowerCase();
57760
57781
  return hay.includes(q);
@@ -57851,8 +57872,11 @@ function NotificationsTab(_ref4) {
57851
57872
  children: [/*#__PURE__*/jsx("span", {
57852
57873
  className: "text-sm font-medium",
57853
57874
  children: wi.title
57875
+ }), /*#__PURE__*/jsxs("span", {
57876
+ className: "text-[10px] opacity-50 font-mono",
57877
+ children: [wi.component, wi.itemId != null ? " \xB7 #".concat(wi.itemId) : ""]
57854
57878
  }), /*#__PURE__*/jsx("span", {
57855
- className: "text-[10px] opacity-50",
57879
+ className: "text-[10px] opacity-40",
57856
57880
  children: wi["package"]
57857
57881
  })]
57858
57882
  }), /*#__PURE__*/jsx("div", {