@trops/dash-core 0.1.466 → 0.1.468

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
@@ -15758,6 +15758,32 @@ var PanelEditItemProviders = function PanelEditItemProviders(_ref) {
15758
15758
  updatedItem.selectedProviders = nextProviders;
15759
15759
  var updatedWorkspace = deepCopy(workspaceSelected);
15760
15760
  updatedWorkspace.layout = replaceItemInLayout(updatedWorkspace.layout, updatedItem.id, updatedItem);
15761
+
15762
+ // Write through to layer 2 (workspace.selectedProviders[widgetId])
15763
+ // so the bulk-edit modal — which reads via resolveProviderName,
15764
+ // which falls back from layer 1 to layer 2 — sees the change. If
15765
+ // we only write layer 1, an unset here clears layer 1 but leaves
15766
+ // a stale layer-2 value, and the bulk modal renders the OLD
15767
+ // provider as still set (resolveProviderName falls through empty
15768
+ // layer 1 to find layer 2). Matches the canonical-key chain
15769
+ // `applyBulkProviderBindings` uses on the bulk path.
15770
+ var widgetId = updatedItem.uuidString || updatedItem.uuid || updatedItem.id;
15771
+ if (widgetId != null) {
15772
+ var wsKey = String(widgetId);
15773
+ var nextSelectedProviders = _objectSpread$P({}, updatedWorkspace.selectedProviders || {});
15774
+ var prevForWidget = nextSelectedProviders[wsKey] ? _objectSpread$P({}, nextSelectedProviders[wsKey]) : {};
15775
+ if (providerName) {
15776
+ prevForWidget[providerType] = providerName;
15777
+ } else {
15778
+ delete prevForWidget[providerType];
15779
+ }
15780
+ if (Object.keys(prevForWidget).length === 0) {
15781
+ delete nextSelectedProviders[wsKey];
15782
+ } else {
15783
+ nextSelectedProviders[wsKey] = prevForWidget;
15784
+ }
15785
+ updatedWorkspace.selectedProviders = nextSelectedProviders;
15786
+ }
15761
15787
  setItemSelected(function () {
15762
15788
  return updatedItem;
15763
15789
  });
@@ -22668,6 +22694,14 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
22668
22694
  newWorkspace.selectedProviders[uuid] = _objectSpread$J(_objectSpread$J({}, newWorkspace.selectedProviders[uuid] || {}), {}, _defineProperty({}, providerType, providerId));
22669
22695
  }
22670
22696
  setCurrentWorkspace(newWorkspace);
22697
+ // Propagate to the parent (DashboardStage) so workspaceSelected
22698
+ // — what the dashboard config bulk-edit modal reads from —
22699
+ // stays in sync with per-widget provider edits. Mirrors the
22700
+ // pattern in the AI placement / remix handlers above. Without
22701
+ // this, the bulk modal opens with stale provider bindings.
22702
+ if (typeof onWorkspaceChangeRef.current === "function") {
22703
+ onWorkspaceChangeRef.current(newWorkspace);
22704
+ }
22671
22705
  }
22672
22706
  }
22673
22707
  function handleCreateProvider(providerName, credentials) {