@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.esm.js +17 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -57172,10 +57172,25 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
57172
57172
|
|
|
57173
57173
|
// Bulk-apply: write this provider as the binding for every widget of
|
|
57174
57174
|
// this type that doesn't already have an explicit widget-level override.
|
|
57175
|
+
//
|
|
57176
|
+
// Override-detection consults the staged state first so a freshly
|
|
57177
|
+
// staged unset is recognised as "no override" and gets bulked. A
|
|
57178
|
+
// non-empty staged value is treated as an explicit pick and is
|
|
57179
|
+
// preserved (bulk skips). Without this, the user could stage an
|
|
57180
|
+
// unset and then click Bulk and the widget they just unset would
|
|
57181
|
+
// be skipped because the *original* layer-1 value still lived on
|
|
57182
|
+
// `b.layoutItem.selectedProviders`.
|
|
57175
57183
|
function stageBulk(providerType, providerName) {
|
|
57176
57184
|
var affected = effectiveBindings.filter(function (b) {
|
|
57177
|
-
var _b$layoutItem;
|
|
57178
|
-
|
|
57185
|
+
var _staged$b$widgetId2, _b$layoutItem;
|
|
57186
|
+
if (b.providerType !== providerType) return false;
|
|
57187
|
+
var stagedValue = (_staged$b$widgetId2 = staged[b.widgetId]) === null || _staged$b$widgetId2 === void 0 ? void 0 : _staged$b$widgetId2[providerType];
|
|
57188
|
+
if (stagedValue !== undefined) {
|
|
57189
|
+
// Empty/null staged value → user staged an unset → include
|
|
57190
|
+
// in bulk. Non-empty → explicit pick, preserve it.
|
|
57191
|
+
return !stagedValue;
|
|
57192
|
+
}
|
|
57193
|
+
return !((_b$layoutItem = b.layoutItem) !== null && _b$layoutItem !== void 0 && (_b$layoutItem = _b$layoutItem.selectedProviders) !== null && _b$layoutItem !== void 0 && _b$layoutItem[providerType]);
|
|
57179
57194
|
});
|
|
57180
57195
|
setStaged(function (prev) {
|
|
57181
57196
|
var next = _objectSpread$a({}, prev);
|