@trops/dash-core 0.1.565 → 0.1.567

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);
@@ -60019,10 +60015,7 @@ function ListenersTab(_ref0) {
60019
60015
  className: "flex flex-col gap-3 h-full min-h-0",
60020
60016
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
60021
60017
  className: "flex flex-row gap-3 flex-1 min-h-0",
60022
- children: [/*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
60023
- padding: "",
60024
- shadow: "",
60025
- rounded: "rounded-lg",
60018
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60026
60019
  className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
60027
60020
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60028
60021
  className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
@@ -60067,10 +60060,7 @@ function ListenersTab(_ref0) {
60067
60060
  onAdd: onAdd,
60068
60061
  onRemove: onRemove
60069
60062
  })]
60070
- }) : /*#__PURE__*/jsxRuntime.jsx(DashReact.Card2, {
60071
- padding: "",
60072
- shadow: "",
60073
- rounded: "rounded-lg",
60063
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
60074
60064
  className: "flex-1 min-w-0 flex items-center justify-center text-sm opacity-60",
60075
60065
  children: "Pick a widget on the left to wire its handlers."
60076
60066
  })]
@@ -60105,45 +60095,47 @@ function HandlersColumn(_ref10) {
60105
60095
  }
60106
60096
  return m;
60107
60097
  }, [myWiring]);
60108
- return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
60109
- padding: "",
60110
- shadow: "",
60111
- rounded: "rounded-lg",
60112
- className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
60113
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60114
- className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
60115
- children: "Event Handlers"
60116
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60117
- className: "overflow-y-auto flex-1",
60118
- children: receiver.eventHandlers.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60119
- className: "text-xs opacity-50 text-center py-6 px-3",
60120
- children: "This widget declares no event handlers."
60121
- }) : receiver.eventHandlers.map(function (h) {
60122
- var isActive = h === selectedHandler;
60123
- var count = countsByHandler.get(h) || 0;
60124
- return /*#__PURE__*/jsxRuntime.jsxs("button", {
60125
- type: "button",
60126
- onClick: function onClick() {
60127
- return onSelectHandler(h);
60128
- },
60129
- className: "w-full text-left px-3 py-2 text-sm flex items-center justify-between gap-2 border-l-2 ".concat(isActive ? "bg-indigo-900/30 border-indigo-400" : "border-transparent hover:bg-white/5"),
60130
- children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
60131
- className: "flex items-center gap-2 min-w-0",
60132
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60133
- icon: "bolt",
60134
- className: "h-3 w-3 opacity-60 flex-shrink-0"
60135
- }), /*#__PURE__*/jsxRuntime.jsx("code", {
60136
- className: "truncate",
60137
- children: h
60098
+ return (
60099
+ /*#__PURE__*/
60100
+ // Plain <div> wrapper — Card2 reads as washed-out against the
60101
+ // modal's dark chrome. See ListenersTab + ProvidersTab fix.
60102
+ jsxRuntime.jsxs("div", {
60103
+ className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
60104
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60105
+ className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
60106
+ children: "Event Handlers"
60107
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60108
+ className: "overflow-y-auto flex-1",
60109
+ children: receiver.eventHandlers.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60110
+ className: "text-xs opacity-50 text-center py-6 px-3",
60111
+ children: "This widget declares no event handlers."
60112
+ }) : receiver.eventHandlers.map(function (h) {
60113
+ var isActive = h === selectedHandler;
60114
+ var count = countsByHandler.get(h) || 0;
60115
+ return /*#__PURE__*/jsxRuntime.jsxs("button", {
60116
+ type: "button",
60117
+ onClick: function onClick() {
60118
+ return onSelectHandler(h);
60119
+ },
60120
+ className: "w-full text-left px-3 py-2 text-sm flex items-center justify-between gap-2 border-l-2 ".concat(isActive ? "bg-indigo-900/30 border-indigo-400" : "border-transparent hover:bg-white/5"),
60121
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
60122
+ className: "flex items-center gap-2 min-w-0",
60123
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60124
+ icon: "bolt",
60125
+ className: "h-3 w-3 opacity-60 flex-shrink-0"
60126
+ }), /*#__PURE__*/jsxRuntime.jsx("code", {
60127
+ className: "truncate",
60128
+ children: h
60129
+ })]
60130
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
60131
+ className: "text-xs opacity-60 flex-shrink-0",
60132
+ children: count
60138
60133
  })]
60139
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
60140
- className: "text-xs opacity-60 flex-shrink-0",
60141
- children: count
60142
- })]
60143
- }, h);
60144
- })
60145
- })]
60146
- });
60134
+ }, h);
60135
+ })
60136
+ })]
60137
+ })
60138
+ );
60147
60139
  }
60148
60140
 
60149
60141
  /**
@@ -60194,10 +60186,7 @@ function EventsColumn(_ref11) {
60194
60186
  return w.isOrphan;
60195
60187
  });
60196
60188
  if (!handlerName) {
60197
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.Card2, {
60198
- padding: "",
60199
- shadow: "",
60200
- rounded: "rounded-lg",
60189
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
60201
60190
  className: "flex-1 min-w-0 flex items-center justify-center text-sm opacity-60",
60202
60191
  children: "Select a handler to view available events."
60203
60192
  });
@@ -60226,63 +60215,64 @@ function EventsColumn(_ref11) {
60226
60215
  var emittersForList = emitters.filter(function (e) {
60227
60216
  return !(e.component === receiver.component && String(e.itemId) === String(receiver.itemId));
60228
60217
  });
60229
- return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
60230
- padding: "",
60231
- shadow: "",
60232
- rounded: "rounded-lg",
60233
- className: "flex-1 min-w-0 overflow-hidden flex flex-col",
60234
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60235
- className: "flex-shrink-0 px-4 py-2 text-xs opacity-60",
60236
- children: ["Check an event to fire ", /*#__PURE__*/jsxRuntime.jsx("code", {
60237
- className: "text-xs",
60238
- children: handlerName
60239
- }), " on", " ", /*#__PURE__*/jsxRuntime.jsx("span", {
60240
- className: "font-medium",
60241
- children: receiver.label
60242
- }), "."]
60243
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60244
- className: "flex-1 overflow-y-auto p-4 space-y-5",
60245
- children: emittersForList.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60246
- className: "text-sm opacity-60",
60247
- children: "No other widgets in this dashboard emit events."
60248
- }) : emittersForList.map(function (e) {
60249
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
60250
- className: "space-y-1",
60251
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60252
- className: "flex flex-col gap-0.5 mb-1",
60253
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60254
- className: "text-sm font-semibold",
60255
- children: e.label
60256
- }), (e.widgetRef || e.component) && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption, {
60257
- block: true,
60258
- className: "font-mono truncate",
60259
- children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
60260
- })]
60261
- }), e.events.map(function (eventName) {
60262
- var key = "".concat(e.component, "|").concat(e.itemId, "|").concat(eventName);
60263
- var selected = wiredKeys.has(key);
60264
- return /*#__PURE__*/jsxRuntime.jsxs("label", {
60265
- className: "flex items-center gap-3 px-3 py-1.5 rounded-md cursor-pointer text-sm ".concat(selected ? "opacity-100" : "opacity-70 hover:opacity-100"),
60266
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60267
- icon: selected ? "square-check" : "square",
60268
- className: "h-4 w-4 flex-shrink-0",
60269
- onClick: function onClick(ev) {
60270
- ev.preventDefault();
60271
- toggle({
60272
- sourceComponent: e.component,
60273
- sourceItemId: e.itemId,
60274
- eventName: eventName
60275
- });
60276
- }
60277
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
60278
- children: eventName
60218
+ return (
60219
+ /*#__PURE__*/
60220
+ // Plain <div> — Card2's washed-out fill clashes with the modal chrome.
60221
+ jsxRuntime.jsxs("div", {
60222
+ className: "flex-1 min-w-0 overflow-hidden flex flex-col",
60223
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60224
+ className: "flex-shrink-0 px-4 py-2 text-xs opacity-60",
60225
+ children: ["Check an event to fire ", /*#__PURE__*/jsxRuntime.jsx("code", {
60226
+ className: "text-xs",
60227
+ children: handlerName
60228
+ }), " on", " ", /*#__PURE__*/jsxRuntime.jsx("span", {
60229
+ className: "font-medium",
60230
+ children: receiver.label
60231
+ }), "."]
60232
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60233
+ className: "flex-1 overflow-y-auto p-4 space-y-5",
60234
+ children: emittersForList.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60235
+ className: "text-sm opacity-60",
60236
+ children: "No other widgets in this dashboard emit events."
60237
+ }) : emittersForList.map(function (e) {
60238
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
60239
+ className: "space-y-1",
60240
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60241
+ className: "flex flex-col gap-0.5 mb-1",
60242
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60243
+ className: "text-sm font-semibold",
60244
+ children: e.label
60245
+ }), (e.widgetRef || e.component) && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption, {
60246
+ block: true,
60247
+ className: "font-mono truncate",
60248
+ children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
60279
60249
  })]
60280
- }, key);
60281
- })]
60282
- }, e.key || "".concat(e.component, "|").concat(e.itemId));
60283
- })
60284
- })]
60285
- });
60250
+ }), e.events.map(function (eventName) {
60251
+ var key = "".concat(e.component, "|").concat(e.itemId, "|").concat(eventName);
60252
+ var selected = wiredKeys.has(key);
60253
+ return /*#__PURE__*/jsxRuntime.jsxs("label", {
60254
+ className: "flex items-center gap-3 px-3 py-1.5 rounded-md cursor-pointer text-sm ".concat(selected ? "opacity-100" : "opacity-70 hover:opacity-100"),
60255
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60256
+ icon: selected ? "square-check" : "square",
60257
+ className: "h-4 w-4 flex-shrink-0",
60258
+ onClick: function onClick(ev) {
60259
+ ev.preventDefault();
60260
+ toggle({
60261
+ sourceComponent: e.component,
60262
+ sourceItemId: e.itemId,
60263
+ eventName: eventName
60264
+ });
60265
+ }
60266
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
60267
+ children: eventName
60268
+ })]
60269
+ }, key);
60270
+ })]
60271
+ }, e.key || "".concat(e.component, "|").concat(e.itemId));
60272
+ })
60273
+ })]
60274
+ })
60275
+ );
60286
60276
  }
60287
60277
 
60288
60278
  function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }