@trops/dash-core 0.1.566 → 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.esm.js +100 -106
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +100 -106
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60015,10 +60015,7 @@ function ListenersTab(_ref0) {
|
|
|
60015
60015
|
className: "flex flex-col gap-3 h-full min-h-0",
|
|
60016
60016
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
60017
60017
|
className: "flex flex-row gap-3 flex-1 min-h-0",
|
|
60018
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(
|
|
60019
|
-
padding: "",
|
|
60020
|
-
shadow: "",
|
|
60021
|
-
rounded: "rounded-lg",
|
|
60018
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
60022
60019
|
className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
|
|
60023
60020
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
60024
60021
|
className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
|
|
@@ -60063,10 +60060,7 @@ function ListenersTab(_ref0) {
|
|
|
60063
60060
|
onAdd: onAdd,
|
|
60064
60061
|
onRemove: onRemove
|
|
60065
60062
|
})]
|
|
60066
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(
|
|
60067
|
-
padding: "",
|
|
60068
|
-
shadow: "",
|
|
60069
|
-
rounded: "rounded-lg",
|
|
60063
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
60070
60064
|
className: "flex-1 min-w-0 flex items-center justify-center text-sm opacity-60",
|
|
60071
60065
|
children: "Pick a widget on the left to wire its handlers."
|
|
60072
60066
|
})]
|
|
@@ -60101,45 +60095,47 @@ function HandlersColumn(_ref10) {
|
|
|
60101
60095
|
}
|
|
60102
60096
|
return m;
|
|
60103
60097
|
}, [myWiring]);
|
|
60104
|
-
return
|
|
60105
|
-
|
|
60106
|
-
|
|
60107
|
-
|
|
60108
|
-
|
|
60109
|
-
|
|
60110
|
-
|
|
60111
|
-
|
|
60112
|
-
|
|
60113
|
-
|
|
60114
|
-
|
|
60115
|
-
|
|
60116
|
-
|
|
60117
|
-
|
|
60118
|
-
|
|
60119
|
-
|
|
60120
|
-
|
|
60121
|
-
|
|
60122
|
-
|
|
60123
|
-
|
|
60124
|
-
|
|
60125
|
-
|
|
60126
|
-
|
|
60127
|
-
|
|
60128
|
-
|
|
60129
|
-
|
|
60130
|
-
|
|
60131
|
-
|
|
60132
|
-
|
|
60133
|
-
|
|
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
|
|
60134
60133
|
})]
|
|
60135
|
-
}
|
|
60136
|
-
|
|
60137
|
-
|
|
60138
|
-
|
|
60139
|
-
|
|
60140
|
-
})
|
|
60141
|
-
})]
|
|
60142
|
-
});
|
|
60134
|
+
}, h);
|
|
60135
|
+
})
|
|
60136
|
+
})]
|
|
60137
|
+
})
|
|
60138
|
+
);
|
|
60143
60139
|
}
|
|
60144
60140
|
|
|
60145
60141
|
/**
|
|
@@ -60190,10 +60186,7 @@ function EventsColumn(_ref11) {
|
|
|
60190
60186
|
return w.isOrphan;
|
|
60191
60187
|
});
|
|
60192
60188
|
if (!handlerName) {
|
|
60193
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
60194
|
-
padding: "",
|
|
60195
|
-
shadow: "",
|
|
60196
|
-
rounded: "rounded-lg",
|
|
60189
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
60197
60190
|
className: "flex-1 min-w-0 flex items-center justify-center text-sm opacity-60",
|
|
60198
60191
|
children: "Select a handler to view available events."
|
|
60199
60192
|
});
|
|
@@ -60222,63 +60215,64 @@ function EventsColumn(_ref11) {
|
|
|
60222
60215
|
var emittersForList = emitters.filter(function (e) {
|
|
60223
60216
|
return !(e.component === receiver.component && String(e.itemId) === String(receiver.itemId));
|
|
60224
60217
|
});
|
|
60225
|
-
return
|
|
60226
|
-
|
|
60227
|
-
|
|
60228
|
-
|
|
60229
|
-
|
|
60230
|
-
|
|
60231
|
-
|
|
60232
|
-
|
|
60233
|
-
|
|
60234
|
-
|
|
60235
|
-
|
|
60236
|
-
|
|
60237
|
-
|
|
60238
|
-
|
|
60239
|
-
|
|
60240
|
-
|
|
60241
|
-
|
|
60242
|
-
|
|
60243
|
-
|
|
60244
|
-
|
|
60245
|
-
|
|
60246
|
-
|
|
60247
|
-
|
|
60248
|
-
|
|
60249
|
-
|
|
60250
|
-
|
|
60251
|
-
|
|
60252
|
-
|
|
60253
|
-
|
|
60254
|
-
|
|
60255
|
-
|
|
60256
|
-
})]
|
|
60257
|
-
}), e.events.map(function (eventName) {
|
|
60258
|
-
var key = "".concat(e.component, "|").concat(e.itemId, "|").concat(eventName);
|
|
60259
|
-
var selected = wiredKeys.has(key);
|
|
60260
|
-
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
60261
|
-
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"),
|
|
60262
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
60263
|
-
icon: selected ? "square-check" : "square",
|
|
60264
|
-
className: "h-4 w-4 flex-shrink-0",
|
|
60265
|
-
onClick: function onClick(ev) {
|
|
60266
|
-
ev.preventDefault();
|
|
60267
|
-
toggle({
|
|
60268
|
-
sourceComponent: e.component,
|
|
60269
|
-
sourceItemId: e.itemId,
|
|
60270
|
-
eventName: eventName
|
|
60271
|
-
});
|
|
60272
|
-
}
|
|
60273
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
60274
|
-
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, "]") : "")
|
|
60275
60249
|
})]
|
|
60276
|
-
},
|
|
60277
|
-
|
|
60278
|
-
|
|
60279
|
-
|
|
60280
|
-
|
|
60281
|
-
|
|
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
|
+
);
|
|
60282
60276
|
}
|
|
60283
60277
|
|
|
60284
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; }
|