@trops/dash-core 0.1.457 → 0.1.459
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 +28 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -22117,13 +22117,26 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
22117
22117
|
// Listen for AI widget builder placement — modifies layout state directly
|
|
22118
22118
|
useEffect(function () {
|
|
22119
22119
|
var handler = function handler(e) {
|
|
22120
|
+
var _wsRef$current;
|
|
22120
22121
|
var _ref4 = e.detail || {},
|
|
22121
22122
|
widgetComponentName = _ref4.widgetComponentName,
|
|
22122
22123
|
cellNumber = _ref4.cellNumber,
|
|
22123
|
-
gridItemId = _ref4.gridItemId
|
|
22124
|
+
gridItemId = _ref4.gridItemId,
|
|
22125
|
+
workspaceId = _ref4.workspaceId;
|
|
22124
22126
|
if (!widgetComponentName || !cellNumber || !gridItemId) return;
|
|
22125
22127
|
var ws = wsRef.current;
|
|
22126
22128
|
if (!(ws !== null && ws !== void 0 && ws.layout)) return;
|
|
22129
|
+
|
|
22130
|
+
// Workspace-id guard: multiple LayoutBuilders are mounted (one per
|
|
22131
|
+
// open dashboard tab) and all listen to this global event. If the
|
|
22132
|
+
// event carries a workspaceId, only the matching workspace acts —
|
|
22133
|
+
// otherwise gridItemId collisions across workspaces (small ints)
|
|
22134
|
+
// would let the wrong dashboard handle the placement and silently
|
|
22135
|
+
// overwrite a cell. Older dash-electron versions that don't yet
|
|
22136
|
+
// pass workspaceId fall through (opt-in guard, backward-compatible).
|
|
22137
|
+
if (workspaceId && ((_wsRef$current = wsRef.current) === null || _wsRef$current === void 0 ? void 0 : _wsRef$current.id) !== workspaceId) {
|
|
22138
|
+
return;
|
|
22139
|
+
}
|
|
22127
22140
|
var gridItem = ws.layout.find(function (item) {
|
|
22128
22141
|
return item.id === gridItemId;
|
|
22129
22142
|
});
|
|
@@ -22167,12 +22180,21 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
22167
22180
|
// Listen for AI widget remix — swaps existing widget component in-place
|
|
22168
22181
|
useEffect(function () {
|
|
22169
22182
|
var handler = function handler(e) {
|
|
22183
|
+
var _wsRef$current3;
|
|
22170
22184
|
var _ref5 = e.detail || {},
|
|
22171
22185
|
widgetComponentName = _ref5.widgetComponentName,
|
|
22172
|
-
widgetId = _ref5.widgetId
|
|
22186
|
+
widgetId = _ref5.widgetId,
|
|
22187
|
+
workspaceId = _ref5.workspaceId;
|
|
22173
22188
|
if (!widgetComponentName || !widgetId) return;
|
|
22174
22189
|
var ws = wsRef.current;
|
|
22175
22190
|
if (!(ws !== null && ws !== void 0 && ws.layout)) return;
|
|
22191
|
+
|
|
22192
|
+
// Same workspace-id guard as the place-widget handler — keeps
|
|
22193
|
+
// the swap from acting on a different open dashboard's widget
|
|
22194
|
+
// when widgetIds collide across workspaces.
|
|
22195
|
+
if (workspaceId && ((_wsRef$current3 = wsRef.current) === null || _wsRef$current3 === void 0 ? void 0 : _wsRef$current3.id) !== workspaceId) {
|
|
22196
|
+
return;
|
|
22197
|
+
}
|
|
22176
22198
|
var config = ComponentManager.config(widgetComponentName);
|
|
22177
22199
|
if (!config) {
|
|
22178
22200
|
return;
|
|
@@ -47637,12 +47659,11 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47637
47659
|
var listContent = /*#__PURE__*/jsxs(Fragment, {
|
|
47638
47660
|
children: [/*#__PURE__*/jsx("div", {
|
|
47639
47661
|
className: "px-2 pt-2 pb-2",
|
|
47640
|
-
children: /*#__PURE__*/jsx(
|
|
47662
|
+
children: /*#__PURE__*/jsx(SearchInput, {
|
|
47641
47663
|
value: searchQuery,
|
|
47642
|
-
onChange:
|
|
47643
|
-
|
|
47644
|
-
|
|
47645
|
-
placeholder: "Search providers..."
|
|
47664
|
+
onChange: setSearchQuery,
|
|
47665
|
+
placeholder: "Search providers...",
|
|
47666
|
+
inputClassName: "py-1.5 text-xs"
|
|
47646
47667
|
})
|
|
47647
47668
|
}), /*#__PURE__*/jsx("div", {
|
|
47648
47669
|
className: "px-2",
|