@trops/dash-core 0.1.352 → 0.1.353
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 +59 -43
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25346,9 +25346,15 @@ var LayoutGridContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
25346
25346
|
}
|
|
25347
25347
|
var rendered = renderComponent(cellComponent.component, cellComponent.id, cellComponent, null);
|
|
25348
25348
|
if (onWidgetPopout && cellComponent.component) {
|
|
25349
|
+
// Prefer uuid over id — uuid is `${dashboardId}-${component}-${id}`
|
|
25350
|
+
// which is globally unique, while id is only unique within a
|
|
25351
|
+
// single page/container. Passing bare id causes WidgetPopoutStage
|
|
25352
|
+
// to find-first-match across layout/pages and render the wrong
|
|
25353
|
+
// widget when two pages share the same numeric id.
|
|
25354
|
+
var popoutKey = cellComponent.uuid || cellComponent.id;
|
|
25349
25355
|
return /*#__PURE__*/jsxRuntime.jsx(PopoutOverlay, {
|
|
25350
25356
|
onPopout: function onPopout() {
|
|
25351
|
-
return onWidgetPopout(
|
|
25357
|
+
return onWidgetPopout(popoutKey);
|
|
25352
25358
|
},
|
|
25353
25359
|
children: rendered
|
|
25354
25360
|
});
|
|
@@ -53723,10 +53729,15 @@ var WidgetPopoutInner = function WidgetPopoutInner(_ref2) {
|
|
|
53723
53729
|
}
|
|
53724
53730
|
setWorkspace(target);
|
|
53725
53731
|
|
|
53726
|
-
//
|
|
53727
|
-
|
|
53728
|
-
|
|
53729
|
-
|
|
53732
|
+
// `widgetId` carries the layout item's uuid (globally unique
|
|
53733
|
+
// across pages/containers) but older callers may still pass a
|
|
53734
|
+
// bare numeric id. Match uuid first, then fall back to id.
|
|
53735
|
+
// Without the uuid match, widgets on a non-first page get
|
|
53736
|
+
// masked by same-numeric-id widgets in the main layout.
|
|
53737
|
+
var matches = function matches(item) {
|
|
53738
|
+
return item.uuid === widgetId || item.id === widgetId;
|
|
53739
|
+
};
|
|
53740
|
+
var widget = target.layout.find(matches);
|
|
53730
53741
|
if (!widget && target.pages && Array.isArray(target.pages)) {
|
|
53731
53742
|
var _iterator = _createForOfIteratorHelper$2(target.pages),
|
|
53732
53743
|
_step;
|
|
@@ -53734,9 +53745,7 @@ var WidgetPopoutInner = function WidgetPopoutInner(_ref2) {
|
|
|
53734
53745
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
53735
53746
|
var page = _step.value;
|
|
53736
53747
|
if (page.layout && Array.isArray(page.layout)) {
|
|
53737
|
-
widget = page.layout.find(
|
|
53738
|
-
return item.id === widgetId;
|
|
53739
|
-
});
|
|
53748
|
+
widget = page.layout.find(matches);
|
|
53740
53749
|
if (widget) break;
|
|
53741
53750
|
}
|
|
53742
53751
|
}
|
|
@@ -53747,9 +53756,7 @@ var WidgetPopoutInner = function WidgetPopoutInner(_ref2) {
|
|
|
53747
53756
|
}
|
|
53748
53757
|
}
|
|
53749
53758
|
if (!widget && target.sidebarLayout && Array.isArray(target.sidebarLayout)) {
|
|
53750
|
-
widget = target.sidebarLayout.find(
|
|
53751
|
-
return item.id === widgetId;
|
|
53752
|
-
});
|
|
53759
|
+
widget = target.sidebarLayout.find(matches);
|
|
53753
53760
|
}
|
|
53754
53761
|
if (!widget) {
|
|
53755
53762
|
setError("Widget not found in workspace");
|