@trops/dash-core 0.1.465 → 0.1.466

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.js CHANGED
@@ -57190,10 +57190,25 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
57190
57190
 
57191
57191
  // Bulk-apply: write this provider as the binding for every widget of
57192
57192
  // this type that doesn't already have an explicit widget-level override.
57193
+ //
57194
+ // Override-detection consults the staged state first so a freshly
57195
+ // staged unset is recognised as "no override" and gets bulked. A
57196
+ // non-empty staged value is treated as an explicit pick and is
57197
+ // preserved (bulk skips). Without this, the user could stage an
57198
+ // unset and then click Bulk and the widget they just unset would
57199
+ // be skipped because the *original* layer-1 value still lived on
57200
+ // `b.layoutItem.selectedProviders`.
57193
57201
  function stageBulk(providerType, providerName) {
57194
57202
  var affected = effectiveBindings.filter(function (b) {
57195
- var _b$layoutItem;
57196
- return b.providerType === providerType && !((_b$layoutItem = b.layoutItem) !== null && _b$layoutItem !== void 0 && (_b$layoutItem = _b$layoutItem.selectedProviders) !== null && _b$layoutItem !== void 0 && _b$layoutItem[providerType]);
57203
+ var _staged$b$widgetId2, _b$layoutItem;
57204
+ if (b.providerType !== providerType) return false;
57205
+ var stagedValue = (_staged$b$widgetId2 = staged[b.widgetId]) === null || _staged$b$widgetId2 === void 0 ? void 0 : _staged$b$widgetId2[providerType];
57206
+ if (stagedValue !== undefined) {
57207
+ // Empty/null staged value → user staged an unset → include
57208
+ // in bulk. Non-empty → explicit pick, preserve it.
57209
+ return !stagedValue;
57210
+ }
57211
+ return !((_b$layoutItem = b.layoutItem) !== null && _b$layoutItem !== void 0 && (_b$layoutItem = _b$layoutItem.selectedProviders) !== null && _b$layoutItem !== void 0 && _b$layoutItem[providerType]);
57197
57212
  });
57198
57213
  setStaged(function (prev) {
57199
57214
  var next = _objectSpread$a({}, prev);