@trops/dash-core 0.1.565 → 0.1.566

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
@@ -59151,27 +59151,23 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
59151
59151
  });
59152
59152
  }
59153
59153
 
59154
- // Bulk-apply: write this provider as the binding for every widget of
59155
- // this type that doesn't already have an explicit widget-level override.
59154
+ // Bulk-apply: retarget every widget of this provider type to the
59155
+ // newly-chosen provider name. The header text above the dropdown
59156
+ // says "Apply one provider to every widget of this type, or adjust
59157
+ // per-widget below" — bulk is the retarget-everything action;
59158
+ // per-row overrides happen AFTER bulk if the user wants exceptions.
59156
59159
  //
59157
- // Override-detection consults the staged state first so a freshly
59158
- // staged unset is recognised as "no override" and gets bulked. A
59159
- // non-empty staged value is treated as an explicit pick and is
59160
- // preserved (bulk skips). Without this, the user could stage an
59161
- // unset and then click Bulk and the widget they just unset would
59162
- // be skipped because the *original* layer-1 value still lived on
59163
- // `b.layoutItem.selectedProviders`.
59160
+ // Previous behavior skipped rows that already had an explicit pick,
59161
+ // which meant the dropdown was a no-op when every row already had a
59162
+ // value (the common case: every Slack widget on a dashboard inherits
59163
+ // the same Slack provider). The user changing bulk from "Slack" to
59164
+ // "Slack Dash Comms" would see zero rows update and Save stay
59165
+ // disabled. The fill-blanks-only semantics fought the UI text and
59166
+ // the user's mental model — every spreadsheet-style bulk operation
59167
+ // overrides everything, with per-row tweaks happening afterward.
59164
59168
  function stageBulk(providerType, providerName) {
59165
59169
  var affected = effectiveBindings.filter(function (b) {
59166
- var _staged$b$widgetId2, _b$layoutItem;
59167
- if (b.providerType !== providerType) return false;
59168
- var stagedValue = (_staged$b$widgetId2 = staged[b.widgetId]) === null || _staged$b$widgetId2 === void 0 ? void 0 : _staged$b$widgetId2[providerType];
59169
- if (stagedValue !== undefined) {
59170
- // Empty/null staged value → user staged an unset → include
59171
- // in bulk. Non-empty → explicit pick, preserve it.
59172
- return !stagedValue;
59173
- }
59174
- return !((_b$layoutItem = b.layoutItem) !== null && _b$layoutItem !== void 0 && (_b$layoutItem = _b$layoutItem.selectedProviders) !== null && _b$layoutItem !== void 0 && _b$layoutItem[providerType]);
59170
+ return b.providerType === providerType;
59175
59171
  });
59176
59172
  setStaged(function (prev) {
59177
59173
  var next = _objectSpread$a({}, prev);