@trops/dash-core 0.1.465 → 0.1.467
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 +25 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22686,6 +22686,14 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
22686
22686
|
newWorkspace.selectedProviders[uuid] = _objectSpread$J(_objectSpread$J({}, newWorkspace.selectedProviders[uuid] || {}), {}, _defineProperty({}, providerType, providerId));
|
|
22687
22687
|
}
|
|
22688
22688
|
setCurrentWorkspace(newWorkspace);
|
|
22689
|
+
// Propagate to the parent (DashboardStage) so workspaceSelected
|
|
22690
|
+
// — what the dashboard config bulk-edit modal reads from —
|
|
22691
|
+
// stays in sync with per-widget provider edits. Mirrors the
|
|
22692
|
+
// pattern in the AI placement / remix handlers above. Without
|
|
22693
|
+
// this, the bulk modal opens with stale provider bindings.
|
|
22694
|
+
if (typeof onWorkspaceChangeRef.current === "function") {
|
|
22695
|
+
onWorkspaceChangeRef.current(newWorkspace);
|
|
22696
|
+
}
|
|
22689
22697
|
}
|
|
22690
22698
|
}
|
|
22691
22699
|
function handleCreateProvider(providerName, credentials) {
|
|
@@ -57190,10 +57198,25 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
57190
57198
|
|
|
57191
57199
|
// Bulk-apply: write this provider as the binding for every widget of
|
|
57192
57200
|
// this type that doesn't already have an explicit widget-level override.
|
|
57201
|
+
//
|
|
57202
|
+
// Override-detection consults the staged state first so a freshly
|
|
57203
|
+
// staged unset is recognised as "no override" and gets bulked. A
|
|
57204
|
+
// non-empty staged value is treated as an explicit pick and is
|
|
57205
|
+
// preserved (bulk skips). Without this, the user could stage an
|
|
57206
|
+
// unset and then click Bulk and the widget they just unset would
|
|
57207
|
+
// be skipped because the *original* layer-1 value still lived on
|
|
57208
|
+
// `b.layoutItem.selectedProviders`.
|
|
57193
57209
|
function stageBulk(providerType, providerName) {
|
|
57194
57210
|
var affected = effectiveBindings.filter(function (b) {
|
|
57195
|
-
var _b$layoutItem;
|
|
57196
|
-
|
|
57211
|
+
var _staged$b$widgetId2, _b$layoutItem;
|
|
57212
|
+
if (b.providerType !== providerType) return false;
|
|
57213
|
+
var stagedValue = (_staged$b$widgetId2 = staged[b.widgetId]) === null || _staged$b$widgetId2 === void 0 ? void 0 : _staged$b$widgetId2[providerType];
|
|
57214
|
+
if (stagedValue !== undefined) {
|
|
57215
|
+
// Empty/null staged value → user staged an unset → include
|
|
57216
|
+
// in bulk. Non-empty → explicit pick, preserve it.
|
|
57217
|
+
return !stagedValue;
|
|
57218
|
+
}
|
|
57219
|
+
return !((_b$layoutItem = b.layoutItem) !== null && _b$layoutItem !== void 0 && (_b$layoutItem = _b$layoutItem.selectedProviders) !== null && _b$layoutItem !== void 0 && _b$layoutItem[providerType]);
|
|
57197
57220
|
});
|
|
57198
57221
|
setStaged(function (prev) {
|
|
57199
57222
|
var next = _objectSpread$a({}, prev);
|