@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 +36 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +36 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -57732,6 +57732,12 @@ function NotificationsTab(_ref4) {
|
|
|
57732
57732
|
// Notifications collection logic but scoped to one workspace.
|
|
57733
57733
|
var widgetInstances = React.useMemo(function () {
|
|
57734
57734
|
var out = [];
|
|
57735
|
+
// Dedup by stable id. WorkspaceModel auto-migrates legacy
|
|
57736
|
+
// non-paged workspaces by aliasing pages[0].layout = workspace.layout
|
|
57737
|
+
// (same reference), so visiting both yields duplicate pushes for
|
|
57738
|
+
// every widget. Same stableId formula as providerResolution.js
|
|
57739
|
+
// forEachWidget so the two stay consistent.
|
|
57740
|
+
var seen = new Set();
|
|
57735
57741
|
var _visit = function visit(item) {
|
|
57736
57742
|
if (!item) return;
|
|
57737
57743
|
if (Array.isArray(item)) {
|
|
@@ -57739,16 +57745,31 @@ function NotificationsTab(_ref4) {
|
|
|
57739
57745
|
return;
|
|
57740
57746
|
}
|
|
57741
57747
|
if (item.component) {
|
|
57742
|
-
var
|
|
57743
|
-
var
|
|
57744
|
-
if (
|
|
57745
|
-
var
|
|
57746
|
-
|
|
57747
|
-
|
|
57748
|
-
|
|
57749
|
-
|
|
57750
|
-
|
|
57751
|
-
|
|
57748
|
+
var idPart = item.uuidString || item.uuid || item.id;
|
|
57749
|
+
var stableId = idPart != null ? "".concat(item.component, "|").concat(idPart) : null;
|
|
57750
|
+
if (stableId && seen.has(stableId)) ; else {
|
|
57751
|
+
var _config$notifications;
|
|
57752
|
+
if (stableId) seen.add(stableId);
|
|
57753
|
+
var config = ComponentManager.resolve(item.component, item);
|
|
57754
|
+
if ((config === null || config === void 0 || (_config$notifications = config.notifications) === null || _config$notifications === void 0 ? void 0 : _config$notifications.length) > 0) {
|
|
57755
|
+
var _item$userPrefs;
|
|
57756
|
+
out.push({
|
|
57757
|
+
uuid: item.uuid || item.uuidString,
|
|
57758
|
+
title: ((_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title) || config.displayName || item.component,
|
|
57759
|
+
"package": config["package"] || "Other",
|
|
57760
|
+
// Scoped component id (e.g. "trops.google.GoogleWidget")
|
|
57761
|
+
// — disambiguates rows when several widgets share a
|
|
57762
|
+
// title or display the same package label. Mirrors the
|
|
57763
|
+
// Listeners tab convention so the user only learns one
|
|
57764
|
+
// identification scheme.
|
|
57765
|
+
component: item.component,
|
|
57766
|
+
// Layout instance id — disambiguates two widgets of the
|
|
57767
|
+
// SAME component on the dashboard (e.g. two GitHub
|
|
57768
|
+
// widgets in the same workspace).
|
|
57769
|
+
itemId: item.id,
|
|
57770
|
+
notifications: config.notifications
|
|
57771
|
+
});
|
|
57772
|
+
}
|
|
57752
57773
|
}
|
|
57753
57774
|
}
|
|
57754
57775
|
if (Array.isArray(item.children)) item.children.forEach(_visit);
|
|
@@ -57772,7 +57793,7 @@ function NotificationsTab(_ref4) {
|
|
|
57772
57793
|
var q = searchQuery.trim().toLowerCase();
|
|
57773
57794
|
if (!q) return widgetInstances;
|
|
57774
57795
|
return widgetInstances.filter(function (wi) {
|
|
57775
|
-
var hay = [wi.title, wi["package"]].concat(_toConsumableArray(wi.notifications.map(function (n) {
|
|
57796
|
+
var hay = [wi.title, wi["package"], wi.component, wi.itemId != null ? "#".concat(wi.itemId) : ""].concat(_toConsumableArray(wi.notifications.map(function (n) {
|
|
57776
57797
|
return "".concat(n.key, " ").concat(n.displayName || "");
|
|
57777
57798
|
}))).join(" ").toLowerCase();
|
|
57778
57799
|
return hay.includes(q);
|
|
@@ -57869,8 +57890,11 @@ function NotificationsTab(_ref4) {
|
|
|
57869
57890
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
57870
57891
|
className: "text-sm font-medium",
|
|
57871
57892
|
children: wi.title
|
|
57893
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
57894
|
+
className: "text-[10px] opacity-50 font-mono",
|
|
57895
|
+
children: [wi.component, wi.itemId != null ? " \xB7 #".concat(wi.itemId) : ""]
|
|
57872
57896
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
57873
|
-
className: "text-[10px] opacity-
|
|
57897
|
+
className: "text-[10px] opacity-40",
|
|
57874
57898
|
children: wi["package"]
|
|
57875
57899
|
})]
|
|
57876
57900
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|