@trops/dash-core 0.1.662 → 0.1.664
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 +598 -383
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +598 -383
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -47204,6 +47204,14 @@ function _arrayLikeToArray$n(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
47204
47204
|
* Pure: no React, no IPC.
|
|
47205
47205
|
*/
|
|
47206
47206
|
|
|
47207
|
+
/** Status dot colours shared by the Bots view and Dashboard Config › Bots. */
|
|
47208
|
+
var STATUS_DOT$2 = {
|
|
47209
|
+
Idle: "bg-gray-500",
|
|
47210
|
+
Running: "bg-indigo-400",
|
|
47211
|
+
Paused: "bg-gray-400",
|
|
47212
|
+
"Needs approval": "bg-amber-400",
|
|
47213
|
+
Failed: "bg-red-400"
|
|
47214
|
+
};
|
|
47207
47215
|
var norm = function norm(id) {
|
|
47208
47216
|
return id === undefined || id === null || id === "" ? null : String(id);
|
|
47209
47217
|
};
|
|
@@ -55526,6 +55534,68 @@ var PrivacySecurityList = function PrivacySecurityList(_ref) {
|
|
|
55526
55534
|
});
|
|
55527
55535
|
};
|
|
55528
55536
|
|
|
55537
|
+
function useConfigTokens() {
|
|
55538
|
+
var _ref = useContext(ThemeContext) || {},
|
|
55539
|
+
_ref$currentTheme = _ref.currentTheme,
|
|
55540
|
+
currentTheme = _ref$currentTheme === void 0 ? {} : _ref$currentTheme;
|
|
55541
|
+
return {
|
|
55542
|
+
muted: currentTheme["text-neutral-medium"] || "text-gray-400",
|
|
55543
|
+
strong: currentTheme["text-neutral-light"] || "text-gray-200",
|
|
55544
|
+
hairline: currentTheme["border-neutral-dark"] || "border-gray-700",
|
|
55545
|
+
selectedBg: currentTheme["bg-neutral-very-dark"] || "bg-gray-800",
|
|
55546
|
+
selectedBorder: currentTheme["border-primary-dark"] || "border-gray-600",
|
|
55547
|
+
fieldBg: currentTheme["bg-neutral-very-dark"] || "bg-gray-900"
|
|
55548
|
+
};
|
|
55549
|
+
}
|
|
55550
|
+
|
|
55551
|
+
/**
|
|
55552
|
+
* A row in one of the modal's left-hand lists (provider types, widgets,
|
|
55553
|
+
* event handlers) — styled like the Bots view's team list.
|
|
55554
|
+
*
|
|
55555
|
+
* @param {{ title: React.ReactNode, subtitle?: React.ReactNode,
|
|
55556
|
+
* meta?: React.ReactNode, badge?: React.ReactNode,
|
|
55557
|
+
* active?: boolean, mono?: boolean, onClick: () => void }} props
|
|
55558
|
+
* `subtitle` is a registry id (monospace); `meta` a muted count line.
|
|
55559
|
+
*/
|
|
55560
|
+
var ConfigListRow = function ConfigListRow(_ref2) {
|
|
55561
|
+
var title = _ref2.title,
|
|
55562
|
+
_ref2$subtitle = _ref2.subtitle,
|
|
55563
|
+
subtitle = _ref2$subtitle === void 0 ? null : _ref2$subtitle,
|
|
55564
|
+
_ref2$meta = _ref2.meta,
|
|
55565
|
+
meta = _ref2$meta === void 0 ? null : _ref2$meta,
|
|
55566
|
+
_ref2$badge = _ref2.badge,
|
|
55567
|
+
badge = _ref2$badge === void 0 ? null : _ref2$badge,
|
|
55568
|
+
_ref2$active = _ref2.active,
|
|
55569
|
+
active = _ref2$active === void 0 ? false : _ref2$active,
|
|
55570
|
+
_ref2$mono = _ref2.mono,
|
|
55571
|
+
mono = _ref2$mono === void 0 ? false : _ref2$mono,
|
|
55572
|
+
onClick = _ref2.onClick;
|
|
55573
|
+
var _useConfigTokens = useConfigTokens(),
|
|
55574
|
+
muted = _useConfigTokens.muted,
|
|
55575
|
+
selectedBg = _useConfigTokens.selectedBg,
|
|
55576
|
+
selectedBorder = _useConfigTokens.selectedBorder;
|
|
55577
|
+
return /*#__PURE__*/jsxs("button", {
|
|
55578
|
+
type: "button",
|
|
55579
|
+
onClick: onClick,
|
|
55580
|
+
"aria-current": active ? "true" : undefined,
|
|
55581
|
+
className: "w-full text-left rounded-lg px-3 py-2 border ".concat(active ? "".concat(selectedBg, " ").concat(selectedBorder) : "border-transparent"),
|
|
55582
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
55583
|
+
className: "flex flex-row items-center justify-between gap-2 min-w-0",
|
|
55584
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
55585
|
+
className: "text-sm font-medium truncate ".concat(mono ? "font-mono" : ""),
|
|
55586
|
+
children: title
|
|
55587
|
+
}), badge]
|
|
55588
|
+
}), subtitle ? /*#__PURE__*/jsx("div", {
|
|
55589
|
+
className: "text-xs font-mono truncate mt-0.5 ".concat(muted),
|
|
55590
|
+
title: typeof subtitle === "string" ? subtitle : undefined,
|
|
55591
|
+
children: subtitle
|
|
55592
|
+
}) : null, meta ? /*#__PURE__*/jsx("div", {
|
|
55593
|
+
className: "text-xs mt-0.5 ".concat(muted),
|
|
55594
|
+
children: meta
|
|
55595
|
+
}) : null]
|
|
55596
|
+
});
|
|
55597
|
+
};
|
|
55598
|
+
|
|
55529
55599
|
/**
|
|
55530
55600
|
* grantStaleness
|
|
55531
55601
|
*
|
|
@@ -55696,6 +55766,8 @@ var ToolToggleList = function ToolToggleList(_ref2) {
|
|
|
55696
55766
|
serverName = _ref2.serverName,
|
|
55697
55767
|
onToggleTool = _ref2.onToggleTool,
|
|
55698
55768
|
hasAnyGrantOnServer = _ref2.hasAnyGrantOnServer;
|
|
55769
|
+
var _useConfigTokens = useConfigTokens(),
|
|
55770
|
+
muted = _useConfigTokens.muted;
|
|
55699
55771
|
if (declaredTools.length === 0 && grantedTools.length === 0) return null;
|
|
55700
55772
|
var grantedSet = new Set(grantedTools);
|
|
55701
55773
|
var staleSet = computeStaleItems(declaredTools, grantedTools, true);
|
|
@@ -55703,7 +55775,7 @@ var ToolToggleList = function ToolToggleList(_ref2) {
|
|
|
55703
55775
|
return /*#__PURE__*/jsxs("div", {
|
|
55704
55776
|
className: "flex flex-col space-y-1",
|
|
55705
55777
|
children: [/*#__PURE__*/jsx("span", {
|
|
55706
|
-
className: "text-xs
|
|
55778
|
+
className: "text-xs ".concat(muted),
|
|
55707
55779
|
children: "Tools"
|
|
55708
55780
|
}), all.map(function (tool) {
|
|
55709
55781
|
var isGranted = grantedSet.has(tool);
|
|
@@ -55714,7 +55786,7 @@ var ToolToggleList = function ToolToggleList(_ref2) {
|
|
|
55714
55786
|
// always allowed when the tool IS granted.
|
|
55715
55787
|
var disabled = !isGranted && !hasAnyGrantOnServer;
|
|
55716
55788
|
return /*#__PURE__*/jsxs("div", {
|
|
55717
|
-
className: "flex flex-row items-center justify-between gap-2 py-1 px-2 -mx-2 rounded
|
|
55789
|
+
className: "flex flex-row items-center justify-between gap-2 py-1 px-2 -mx-2 rounded-lg",
|
|
55718
55790
|
children: [/*#__PURE__*/jsxs("span", {
|
|
55719
55791
|
className: "text-xs font-mono break-all ".concat(isStale ? "text-amber-400" : isGranted ? "opacity-100" : "opacity-50"),
|
|
55720
55792
|
children: [tool, isStale && /*#__PURE__*/jsx("span", {
|
|
@@ -55738,6 +55810,8 @@ var PermsList = function PermsList(_ref3) {
|
|
|
55738
55810
|
grantedItems = _ref3.grantedItems,
|
|
55739
55811
|
validatesStale = _ref3.validatesStale,
|
|
55740
55812
|
onDeleteItem = _ref3.onDeleteItem;
|
|
55813
|
+
var _useConfigTokens2 = useConfigTokens(),
|
|
55814
|
+
muted = _useConfigTokens2.muted;
|
|
55741
55815
|
if (declaredItems.length === 0 && grantedItems.length === 0) return null;
|
|
55742
55816
|
var grantedSet = new Set(grantedItems);
|
|
55743
55817
|
var staleSet = computeStaleItems(declaredItems, grantedItems, validatesStale);
|
|
@@ -55745,14 +55819,14 @@ var PermsList = function PermsList(_ref3) {
|
|
|
55745
55819
|
return /*#__PURE__*/jsxs("div", {
|
|
55746
55820
|
className: "flex flex-col space-y-1",
|
|
55747
55821
|
children: [/*#__PURE__*/jsx("span", {
|
|
55748
|
-
className: "text-xs
|
|
55822
|
+
className: "text-xs ".concat(muted),
|
|
55749
55823
|
children: label
|
|
55750
55824
|
}), all.map(function (item) {
|
|
55751
55825
|
var isGranted = grantedSet.has(item);
|
|
55752
55826
|
var isStale = staleSet.has(item);
|
|
55753
55827
|
var showTrash = isGranted && typeof onDeleteItem === "function";
|
|
55754
55828
|
return /*#__PURE__*/jsxs("div", {
|
|
55755
|
-
className: "flex flex-row items-start justify-between gap-2 py-1 px-2 -mx-2 rounded
|
|
55829
|
+
className: "flex flex-row items-start justify-between gap-2 py-1 px-2 -mx-2 rounded-lg",
|
|
55756
55830
|
children: [/*#__PURE__*/jsxs("span", {
|
|
55757
55831
|
className: "text-xs font-mono break-all ".concat(isStale ? "text-amber-400" : isGranted ? "opacity-100" : "opacity-50 line-through"),
|
|
55758
55832
|
children: [item, isStale && /*#__PURE__*/jsx("span", {
|
|
@@ -55788,23 +55862,26 @@ var RevokeConfirmInline = function RevokeConfirmInline(_ref4) {
|
|
|
55788
55862
|
body = _ref4.body,
|
|
55789
55863
|
onCancel = _ref4.onCancel,
|
|
55790
55864
|
onConfirm = _ref4.onConfirm;
|
|
55865
|
+
var _useConfigTokens3 = useConfigTokens(),
|
|
55866
|
+
muted = _useConfigTokens3.muted,
|
|
55867
|
+
strong = _useConfigTokens3.strong;
|
|
55791
55868
|
return /*#__PURE__*/jsxs("div", {
|
|
55792
|
-
className: "flex flex-col gap-2 border border-amber-500 rounded p-2 mt-1",
|
|
55869
|
+
className: "flex flex-col gap-2 border border-amber-500 rounded-lg p-2 mt-1",
|
|
55793
55870
|
children: [/*#__PURE__*/jsxs("div", {
|
|
55794
55871
|
className: "flex flex-row items-center gap-2",
|
|
55795
55872
|
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
55796
55873
|
icon: "triangle-exclamation",
|
|
55797
55874
|
className: "h-3 w-3 text-amber-500"
|
|
55798
55875
|
}), /*#__PURE__*/jsx("span", {
|
|
55799
|
-
className: "text-xs font-semibold
|
|
55876
|
+
className: "text-xs font-semibold ".concat(strong),
|
|
55800
55877
|
children: title
|
|
55801
55878
|
})]
|
|
55802
55879
|
}), /*#__PURE__*/jsx("div", {
|
|
55803
|
-
className: "text-xs
|
|
55880
|
+
className: "text-xs leading-relaxed ".concat(muted),
|
|
55804
55881
|
children: body
|
|
55805
55882
|
}), /*#__PURE__*/jsxs("div", {
|
|
55806
55883
|
className: "flex justify-end gap-2",
|
|
55807
|
-
children: [/*#__PURE__*/jsx(
|
|
55884
|
+
children: [/*#__PURE__*/jsx(Button3, {
|
|
55808
55885
|
title: "Cancel",
|
|
55809
55886
|
onClick: onCancel,
|
|
55810
55887
|
size: "sm"
|
|
@@ -55839,8 +55916,12 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55839
55916
|
pendingRevoke = _useState2[0],
|
|
55840
55917
|
setPendingRevoke = _useState2[1];
|
|
55841
55918
|
var widgetSummary = describeWidgetGrant(grantedServers);
|
|
55919
|
+
var _useConfigTokens4 = useConfigTokens(),
|
|
55920
|
+
muted = _useConfigTokens4.muted,
|
|
55921
|
+
hairline = _useConfigTokens4.hairline;
|
|
55842
55922
|
return /*#__PURE__*/jsxs("div", {
|
|
55843
|
-
|
|
55923
|
+
"data-testid": "widget-grant-row",
|
|
55924
|
+
className: "flex flex-col space-y-3 rounded-lg border px-3 py-2 ".concat(hairline),
|
|
55844
55925
|
children: [/*#__PURE__*/jsxs("div", {
|
|
55845
55926
|
className: "flex flex-row items-center justify-between gap-2",
|
|
55846
55927
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -55856,11 +55937,11 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55856
55937
|
})]
|
|
55857
55938
|
}), /*#__PURE__*/jsxs("div", {
|
|
55858
55939
|
className: "flex flex-row gap-2",
|
|
55859
|
-
children: [!hasManifest && !granted && /*#__PURE__*/jsx(
|
|
55940
|
+
children: [!hasManifest && !granted && /*#__PURE__*/jsx(Button3, {
|
|
55860
55941
|
title: "Grant manually",
|
|
55861
55942
|
onClick: onGrantManually,
|
|
55862
55943
|
size: "sm"
|
|
55863
|
-
}), Object.keys(grantedServers).length > 0 && /*#__PURE__*/jsx(
|
|
55944
|
+
}), Object.keys(grantedServers).length > 0 && /*#__PURE__*/jsx(Button3, {
|
|
55864
55945
|
title: "Revoke all",
|
|
55865
55946
|
onClick: function onClick() {
|
|
55866
55947
|
return setPendingRevoke("widget");
|
|
@@ -55879,18 +55960,19 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55879
55960
|
onRevokeWidget && onRevokeWidget();
|
|
55880
55961
|
}
|
|
55881
55962
|
}), !declared && !granted && /*#__PURE__*/jsx("span", {
|
|
55882
|
-
className: "text-xs
|
|
55963
|
+
className: "text-xs ".concat(muted),
|
|
55883
55964
|
children: "This widget did not declare MCP permissions and the install-time scanner found nothing. Use Grant manually if you trust it."
|
|
55884
55965
|
}), allServerNames.map(function (serverName) {
|
|
55885
55966
|
var decl = declaredServers[serverName] || {};
|
|
55886
55967
|
var grant = grantedServers[serverName];
|
|
55887
55968
|
var allStale = isServerEntirelyStale(decl, grant);
|
|
55888
55969
|
return /*#__PURE__*/jsxs("div", {
|
|
55889
|
-
|
|
55970
|
+
"data-testid": "grant-server-".concat(serverName),
|
|
55971
|
+
className: "flex flex-col space-y-2 border-t pt-2 ".concat(hairline),
|
|
55890
55972
|
children: [/*#__PURE__*/jsxs("div", {
|
|
55891
55973
|
className: "flex flex-row items-center justify-between gap-2",
|
|
55892
55974
|
children: [/*#__PURE__*/jsxs("span", {
|
|
55893
|
-
className: "text-xs uppercase tracking-wider
|
|
55975
|
+
className: "text-xs uppercase tracking-wider ".concat(muted),
|
|
55894
55976
|
children: [serverName, (grant === null || grant === void 0 ? void 0 : grant._labels) && grant._labels.length > 0 && /*#__PURE__*/jsxs("span", {
|
|
55895
55977
|
className: "ml-2 normal-case tracking-normal opacity-60",
|
|
55896
55978
|
children: ["(", grant._labels.join(", "), ")"]
|
|
@@ -55903,7 +55985,7 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55903
55985
|
children: [(decl.tools || []).length > 0 && onToggleAllForServer && /*#__PURE__*/jsxs("div", {
|
|
55904
55986
|
className: "flex flex-row items-center gap-2",
|
|
55905
55987
|
children: [/*#__PURE__*/jsx("span", {
|
|
55906
|
-
className: "text-xs
|
|
55988
|
+
className: "text-xs normal-case tracking-normal ".concat(muted),
|
|
55907
55989
|
children: "Allow all"
|
|
55908
55990
|
}), /*#__PURE__*/jsx(Switch, {
|
|
55909
55991
|
checked: (decl.tools || []).length > 0 && (decl.tools || []).every(function (t) {
|
|
@@ -55913,7 +55995,7 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55913
55995
|
return onToggleAllForServer(widgetId, serverName, next);
|
|
55914
55996
|
}
|
|
55915
55997
|
})]
|
|
55916
|
-
}), grant && /*#__PURE__*/jsx(
|
|
55998
|
+
}), grant && /*#__PURE__*/jsx(Button3, {
|
|
55917
55999
|
title: "Revoke server",
|
|
55918
56000
|
onClick: function onClick() {
|
|
55919
56001
|
return setPendingRevoke({
|
|
@@ -55935,7 +56017,7 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55935
56017
|
onRevokeServer && onRevokeServer(serverName);
|
|
55936
56018
|
}
|
|
55937
56019
|
}), allStale && /*#__PURE__*/jsx("div", {
|
|
55938
|
-
className: "text-xs text-amber-400
|
|
56020
|
+
className: "text-xs text-amber-400 border border-amber-400 rounded-lg px-2 py-1.5",
|
|
55939
56021
|
children: "All grants on this server are no longer in the manifest \u2014 the widget likely no longer uses this server. Consider revoking."
|
|
55940
56022
|
}), /*#__PURE__*/jsx(ToolToggleList, {
|
|
55941
56023
|
declaredTools: decl.tools || [],
|
|
@@ -55964,9 +56046,9 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55964
56046
|
})]
|
|
55965
56047
|
}, serverName);
|
|
55966
56048
|
}), (granted === null || granted === void 0 || (_granted$domains = granted.domains) === null || _granted$domains === void 0 ? void 0 : _granted$domains.fs) && ((granted.domains.fs.readPaths || []).length > 0 || (granted.domains.fs.writePaths || []).length > 0) && /*#__PURE__*/jsxs("div", {
|
|
55967
|
-
className: "flex flex-col space-y-2 border-t
|
|
56049
|
+
className: "flex flex-col space-y-2 border-t pt-2 ".concat(hairline),
|
|
55968
56050
|
children: [/*#__PURE__*/jsx("span", {
|
|
55969
|
-
className: "text-xs uppercase tracking-wider
|
|
56051
|
+
className: "text-xs uppercase tracking-wider ".concat(muted),
|
|
55970
56052
|
children: "filesystem"
|
|
55971
56053
|
}), Array.isArray(granted.domains.fs.actions) && granted.domains.fs.actions.length > 0 && /*#__PURE__*/jsx(PermsList, {
|
|
55972
56054
|
label: "Actions",
|
|
@@ -55994,9 +56076,9 @@ var WidgetGrantRow = function WidgetGrantRow(_ref5) {
|
|
|
55994
56076
|
} : undefined
|
|
55995
56077
|
})]
|
|
55996
56078
|
}), (granted === null || granted === void 0 || (_granted$domains2 = granted.domains) === null || _granted$domains2 === void 0 ? void 0 : _granted$domains2.network) && (granted.domains.network.hosts || []).length > 0 && /*#__PURE__*/jsxs("div", {
|
|
55997
|
-
className: "flex flex-col space-y-2 border-t
|
|
56079
|
+
className: "flex flex-col space-y-2 border-t pt-2 ".concat(hairline),
|
|
55998
56080
|
children: [/*#__PURE__*/jsx("span", {
|
|
55999
|
-
className: "text-xs uppercase tracking-wider
|
|
56081
|
+
className: "text-xs uppercase tracking-wider ".concat(muted),
|
|
56000
56082
|
children: "network"
|
|
56001
56083
|
}), Array.isArray(granted.domains.network.actions) && granted.domains.network.actions.length > 0 && /*#__PURE__*/jsx(PermsList, {
|
|
56002
56084
|
label: "Actions",
|
|
@@ -61223,6 +61305,9 @@ var WidgetsTab = function WidgetsTab(_ref) {
|
|
|
61223
61305
|
stagedPrefs = _ref.stagedPrefs,
|
|
61224
61306
|
stagePrefField = _ref.stagePrefField,
|
|
61225
61307
|
stagePrefFieldForAll = _ref.stagePrefFieldForAll;
|
|
61308
|
+
var _useConfigTokens = useConfigTokens(),
|
|
61309
|
+
muted = _useConfigTokens.muted,
|
|
61310
|
+
hairline = _useConfigTokens.hairline;
|
|
61226
61311
|
// Flatten every widget on the workspace, preserving which layout
|
|
61227
61312
|
// section each came from (Main / Page N / Sidebar) so the left
|
|
61228
61313
|
// column can group them cleanly. forEachWidget already dedupes.
|
|
@@ -61343,67 +61428,55 @@ var WidgetsTab = function WidgetsTab(_ref) {
|
|
|
61343
61428
|
return /*#__PURE__*/jsxs("div", {
|
|
61344
61429
|
className: "flex h-full min-h-0",
|
|
61345
61430
|
children: [/*#__PURE__*/jsxs("div", {
|
|
61346
|
-
className: "w-64 border-r
|
|
61347
|
-
children: [sharedFields.length > 0 && /*#__PURE__*/
|
|
61348
|
-
|
|
61349
|
-
|
|
61350
|
-
},
|
|
61351
|
-
className: "w-full text-left px-4 py-3 border-b border-white/10 transition-colors ".concat(isAllMode ? "bg-indigo-600/20 text-indigo-200" : "hover:bg-white/5 text-gray-300"),
|
|
61352
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
61353
|
-
className: "flex items-center gap-2",
|
|
61431
|
+
className: "w-64 border-r overflow-y-auto flex-shrink-0 p-3 flex flex-col gap-1 ".concat(hairline),
|
|
61432
|
+
children: [sharedFields.length > 0 && /*#__PURE__*/jsx(ConfigListRow, {
|
|
61433
|
+
title: /*#__PURE__*/jsxs("span", {
|
|
61434
|
+
className: "flex flex-row items-center gap-2",
|
|
61354
61435
|
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
61355
61436
|
icon: "layer-group",
|
|
61356
61437
|
className: "h-3.5 w-3.5"
|
|
61357
|
-
}),
|
|
61358
|
-
|
|
61359
|
-
|
|
61360
|
-
|
|
61361
|
-
|
|
61362
|
-
|
|
61363
|
-
|
|
61364
|
-
})]
|
|
61438
|
+
}), "All Widgets"]
|
|
61439
|
+
}),
|
|
61440
|
+
meta: "".concat(sharedFields.length, " shared field").concat(sharedFields.length === 1 ? "" : "s", " \xB7 bulk edit"),
|
|
61441
|
+
active: isAllMode,
|
|
61442
|
+
onClick: function onClick() {
|
|
61443
|
+
return setSelectedId(ALL_WIDGETS_ID);
|
|
61444
|
+
}
|
|
61365
61445
|
}), groupedWidgets.map(function (_ref2) {
|
|
61366
61446
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
61367
61447
|
section = _ref3[0],
|
|
61368
61448
|
sectionWidgets = _ref3[1];
|
|
61369
61449
|
return /*#__PURE__*/jsxs("div", {
|
|
61370
|
-
|
|
61371
|
-
|
|
61450
|
+
className: "flex flex-col gap-1",
|
|
61451
|
+
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
61452
|
+
className: "px-3 pt-3 pb-1",
|
|
61372
61453
|
children: section
|
|
61373
61454
|
}), sectionWidgets.map(function (w) {
|
|
61374
61455
|
var fieldCount = Object.keys(w.userConfig).length;
|
|
61375
61456
|
var stagedForWidget = stagedPrefs !== null && stagedPrefs !== void 0 && stagedPrefs[w.id] ? Object.keys(stagedPrefs[w.id]).length : 0;
|
|
61376
|
-
|
|
61377
|
-
|
|
61457
|
+
return /*#__PURE__*/jsx(ConfigListRow, {
|
|
61458
|
+
title: w.displayName,
|
|
61459
|
+
subtitle: w.widgetRef || null,
|
|
61460
|
+
meta: fieldCount === 0 ? "No configurable fields" : "".concat(fieldCount, " field").concat(fieldCount === 1 ? "" : "s"),
|
|
61461
|
+
badge: stagedForWidget > 0 ? /*#__PURE__*/jsxs("span", {
|
|
61462
|
+
className: "flex flex-row items-center gap-1.5 text-xs text-amber-400 flex-shrink-0",
|
|
61463
|
+
title: "Unsaved changes",
|
|
61464
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
61465
|
+
className: "inline-block h-1.5 w-1.5 rounded-full bg-amber-400"
|
|
61466
|
+
}), stagedForWidget]
|
|
61467
|
+
}) : null,
|
|
61468
|
+
active: selectedId === w.id,
|
|
61378
61469
|
onClick: function onClick() {
|
|
61379
61470
|
return setSelectedId(w.id);
|
|
61380
|
-
}
|
|
61381
|
-
className: "w-full text-left px-4 py-2 transition-colors ".concat(isSel ? "bg-indigo-600/20 text-indigo-200" : "hover:bg-white/5 text-gray-300"),
|
|
61382
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
61383
|
-
className: "flex items-center justify-between",
|
|
61384
|
-
children: [/*#__PURE__*/jsx("span", {
|
|
61385
|
-
className: "text-sm truncate",
|
|
61386
|
-
children: w.displayName
|
|
61387
|
-
}), stagedForWidget > 0 && /*#__PURE__*/jsx("span", {
|
|
61388
|
-
className: "text-[10px] bg-amber-500/20 text-amber-300 px-1.5 rounded",
|
|
61389
|
-
children: stagedForWidget
|
|
61390
|
-
})]
|
|
61391
|
-
}), w.widgetRef && /*#__PURE__*/jsx("div", {
|
|
61392
|
-
className: "text-[10px] text-gray-500 font-mono truncate mt-0.5",
|
|
61393
|
-
title: w.widgetRef,
|
|
61394
|
-
children: w.widgetRef
|
|
61395
|
-
}), /*#__PURE__*/jsx("div", {
|
|
61396
|
-
className: "text-[10px] text-gray-600 mt-0.5",
|
|
61397
|
-
children: fieldCount === 0 ? "No configurable fields" : "".concat(fieldCount, " field").concat(fieldCount === 1 ? "" : "s")
|
|
61398
|
-
})]
|
|
61471
|
+
}
|
|
61399
61472
|
}, w.id);
|
|
61400
61473
|
})]
|
|
61401
61474
|
}, section);
|
|
61402
61475
|
})]
|
|
61403
61476
|
}), /*#__PURE__*/jsxs("div", {
|
|
61404
|
-
className: "flex-1 overflow-y-auto p-
|
|
61477
|
+
className: "flex-1 overflow-y-auto p-5 min-w-0",
|
|
61405
61478
|
children: [!selectedId && /*#__PURE__*/jsx("div", {
|
|
61406
|
-
className: "text-sm
|
|
61479
|
+
className: "text-sm italic ".concat(muted),
|
|
61407
61480
|
children: "Select a widget from the list."
|
|
61408
61481
|
}), isAllMode && /*#__PURE__*/jsx(BulkEditPane, {
|
|
61409
61482
|
sharedFields: sharedFields,
|
|
@@ -61423,19 +61496,22 @@ function SingleWidgetPane(_ref4) {
|
|
|
61423
61496
|
var widget = _ref4.widget,
|
|
61424
61497
|
effectivePrefs = _ref4.effectivePrefs,
|
|
61425
61498
|
onFieldChange = _ref4.onFieldChange;
|
|
61499
|
+
var _useConfigTokens2 = useConfigTokens(),
|
|
61500
|
+
muted = _useConfigTokens2.muted,
|
|
61501
|
+
strong = _useConfigTokens2.strong;
|
|
61426
61502
|
var hasFields = Object.keys(widget.userConfig).length > 0;
|
|
61427
61503
|
return /*#__PURE__*/jsxs("div", {
|
|
61428
61504
|
children: [/*#__PURE__*/jsxs("div", {
|
|
61429
61505
|
className: "mb-3",
|
|
61430
61506
|
children: [/*#__PURE__*/jsx("div", {
|
|
61431
|
-
className: "
|
|
61507
|
+
className: "font-semibold ".concat(strong),
|
|
61432
61508
|
children: widget.displayName
|
|
61433
61509
|
}), widget.widgetRef && /*#__PURE__*/jsx("div", {
|
|
61434
|
-
className: "text-xs
|
|
61510
|
+
className: "text-xs font-mono truncate mt-0.5 ".concat(muted),
|
|
61435
61511
|
title: widget.widgetRef,
|
|
61436
61512
|
children: widget.widgetRef
|
|
61437
61513
|
}), /*#__PURE__*/jsx("div", {
|
|
61438
|
-
className: "text-xs
|
|
61514
|
+
className: "text-xs mt-0.5 ".concat(muted),
|
|
61439
61515
|
children: widget.section
|
|
61440
61516
|
})]
|
|
61441
61517
|
}), hasFields ? /*#__PURE__*/jsx(PanelEditForm, {
|
|
@@ -61443,7 +61519,7 @@ function SingleWidgetPane(_ref4) {
|
|
|
61443
61519
|
userPrefs: effectivePrefs,
|
|
61444
61520
|
onFieldChange: onFieldChange
|
|
61445
61521
|
}) : /*#__PURE__*/jsx("div", {
|
|
61446
|
-
className: "text-sm
|
|
61522
|
+
className: "text-sm italic ".concat(muted),
|
|
61447
61523
|
children: "This widget has no configurable fields. It may be event-driven \u2014 pair it with a widget that publishes the events it listens for."
|
|
61448
61524
|
})]
|
|
61449
61525
|
});
|
|
@@ -61452,14 +61528,17 @@ function BulkEditPane(_ref5) {
|
|
|
61452
61528
|
var sharedFields = _ref5.sharedFields,
|
|
61453
61529
|
stagedPrefs = _ref5.stagedPrefs,
|
|
61454
61530
|
onApplyAll = _ref5.onApplyAll;
|
|
61531
|
+
var _useConfigTokens3 = useConfigTokens(),
|
|
61532
|
+
muted = _useConfigTokens3.muted,
|
|
61533
|
+
strong = _useConfigTokens3.strong;
|
|
61455
61534
|
return /*#__PURE__*/jsxs("div", {
|
|
61456
61535
|
children: [/*#__PURE__*/jsxs("div", {
|
|
61457
61536
|
className: "mb-3",
|
|
61458
61537
|
children: [/*#__PURE__*/jsx("div", {
|
|
61459
|
-
className: "
|
|
61538
|
+
className: "font-semibold ".concat(strong),
|
|
61460
61539
|
children: "All Widgets"
|
|
61461
61540
|
}), /*#__PURE__*/jsx("div", {
|
|
61462
|
-
className: "text-xs
|
|
61541
|
+
className: "text-xs ".concat(muted),
|
|
61463
61542
|
children: "Fields declared by 2+ widgets on this dashboard. Apply once to update every matching widget."
|
|
61464
61543
|
})]
|
|
61465
61544
|
}), /*#__PURE__*/jsxs("div", {
|
|
@@ -61471,7 +61550,7 @@ function BulkEditPane(_ref5) {
|
|
|
61471
61550
|
onApplyAll: onApplyAll
|
|
61472
61551
|
}, "".concat(field.key, "::").concat(field.schema.type));
|
|
61473
61552
|
}), sharedFields.length === 0 && /*#__PURE__*/jsx("div", {
|
|
61474
|
-
className: "text-sm
|
|
61553
|
+
className: "text-sm italic ".concat(muted),
|
|
61475
61554
|
children: "No shared fields across widgets on this dashboard."
|
|
61476
61555
|
})]
|
|
61477
61556
|
})]
|
|
@@ -61498,32 +61577,38 @@ function SharedFieldRow(_ref6) {
|
|
|
61498
61577
|
if (allSame) setDraft(distinctValues[0]);
|
|
61499
61578
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61500
61579
|
}, [allSame, distinctValues[0]]);
|
|
61580
|
+
var _useConfigTokens4 = useConfigTokens(),
|
|
61581
|
+
muted = _useConfigTokens4.muted,
|
|
61582
|
+
strong = _useConfigTokens4.strong,
|
|
61583
|
+
hairline = _useConfigTokens4.hairline,
|
|
61584
|
+
fieldBg = _useConfigTokens4.fieldBg;
|
|
61585
|
+
var fieldClass = "w-full px-2 py-1.5 rounded-lg border text-sm ".concat(fieldBg, " ").concat(hairline, " ").concat(strong);
|
|
61501
61586
|
return /*#__PURE__*/jsxs("div", {
|
|
61502
|
-
className: "
|
|
61587
|
+
className: "rounded-lg border p-3 ".concat(hairline),
|
|
61503
61588
|
children: [/*#__PURE__*/jsxs("div", {
|
|
61504
61589
|
className: "flex items-start justify-between gap-3 mb-2",
|
|
61505
61590
|
children: [/*#__PURE__*/jsxs("div", {
|
|
61506
61591
|
className: "flex-1 min-w-0",
|
|
61507
61592
|
children: [/*#__PURE__*/jsx("div", {
|
|
61508
|
-
className: "text-sm
|
|
61593
|
+
className: "text-sm font-semibold ".concat(strong),
|
|
61509
61594
|
children: field.schema.displayName || field.key
|
|
61510
61595
|
}), /*#__PURE__*/jsxs("div", {
|
|
61511
|
-
className: "text-
|
|
61596
|
+
className: "text-xs ".concat(muted),
|
|
61512
61597
|
children: ["Applies to ", field.widgets.length, " widgets", allSame ? "" : " \xB7 ".concat(distinctValues.length, " distinct values in use")]
|
|
61513
61598
|
})]
|
|
61514
|
-
}), /*#__PURE__*/jsx(
|
|
61599
|
+
}), /*#__PURE__*/jsx(Button3, {
|
|
61600
|
+
title: "Apply to all",
|
|
61601
|
+
size: "sm",
|
|
61515
61602
|
onClick: function onClick() {
|
|
61516
61603
|
return onApplyAll(field.widgets, field.key, draft);
|
|
61517
|
-
}
|
|
61518
|
-
className: "px-3 py-1 text-xs bg-indigo-600 hover:bg-indigo-500 text-white rounded transition-colors",
|
|
61519
|
-
children: "Apply to all"
|
|
61604
|
+
}
|
|
61520
61605
|
})]
|
|
61521
61606
|
}), field.schema.type === "select" ? /*#__PURE__*/jsx("select", {
|
|
61522
61607
|
value: draft,
|
|
61523
61608
|
onChange: function onChange(e) {
|
|
61524
61609
|
return setDraft(e.target.value);
|
|
61525
61610
|
},
|
|
61526
|
-
className:
|
|
61611
|
+
className: fieldClass,
|
|
61527
61612
|
children: (field.schema.options || []).map(function (opt) {
|
|
61528
61613
|
return /*#__PURE__*/jsx("option", {
|
|
61529
61614
|
value: opt.value,
|
|
@@ -61537,7 +61622,7 @@ function SharedFieldRow(_ref6) {
|
|
|
61537
61622
|
return setDraft(e.target.value);
|
|
61538
61623
|
},
|
|
61539
61624
|
placeholder: allSame ? "" : "(multiple values — set one for all)",
|
|
61540
|
-
className:
|
|
61625
|
+
className: fieldClass
|
|
61541
61626
|
})]
|
|
61542
61627
|
});
|
|
61543
61628
|
}
|
|
@@ -61565,6 +61650,13 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
61565
61650
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
61566
61651
|
busy = _useState8[0],
|
|
61567
61652
|
setBusy = _useState8[1];
|
|
61653
|
+
var _useState9 = useState(false),
|
|
61654
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
61655
|
+
confirmRevokeAll = _useState0[0],
|
|
61656
|
+
setConfirmRevokeAll = _useState0[1];
|
|
61657
|
+
var _useConfigTokens = useConfigTokens(),
|
|
61658
|
+
muted = _useConfigTokens.muted,
|
|
61659
|
+
hairline = _useConfigTokens.hairline;
|
|
61568
61660
|
|
|
61569
61661
|
// Build the set of widget identifiers in this workspace. Walk every
|
|
61570
61662
|
// layout location (main, pages, sidebar). `pickWidgetRef` returns
|
|
@@ -62093,7 +62185,7 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
62093
62185
|
}).length;
|
|
62094
62186
|
if (loading) {
|
|
62095
62187
|
return /*#__PURE__*/jsx("div", {
|
|
62096
|
-
className: "text-sm
|
|
62188
|
+
className: "text-sm p-4 ".concat(muted),
|
|
62097
62189
|
children: "Loading permissions\u2026"
|
|
62098
62190
|
});
|
|
62099
62191
|
}
|
|
@@ -62101,10 +62193,10 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
62101
62193
|
return /*#__PURE__*/jsxs("div", {
|
|
62102
62194
|
className: "flex flex-col gap-3 p-4",
|
|
62103
62195
|
children: [/*#__PURE__*/jsx("div", {
|
|
62104
|
-
className: "text-sm
|
|
62196
|
+
className: "text-sm",
|
|
62105
62197
|
children: "No widgets in this dashboard request any MCP permissions."
|
|
62106
62198
|
}), /*#__PURE__*/jsx("div", {
|
|
62107
|
-
className: "text-xs
|
|
62199
|
+
className: "text-xs ".concat(muted),
|
|
62108
62200
|
children: "Permissions only show up here when a widget's published manifest (or local source) declares MCP tool usage."
|
|
62109
62201
|
})]
|
|
62110
62202
|
});
|
|
@@ -62112,32 +62204,66 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
62112
62204
|
return /*#__PURE__*/jsxs("div", {
|
|
62113
62205
|
className: "flex flex-col h-full min-h-0",
|
|
62114
62206
|
children: [/*#__PURE__*/jsxs("div", {
|
|
62115
|
-
className: "flex-shrink-0 flex flex-row items-center justify-between gap-2 pb-3",
|
|
62207
|
+
className: "flex-shrink-0 flex flex-row items-center justify-between gap-2 pb-3 border-b ".concat(hairline),
|
|
62116
62208
|
children: [/*#__PURE__*/jsxs("div", {
|
|
62117
62209
|
className: "flex flex-col",
|
|
62118
62210
|
children: [/*#__PURE__*/jsxs("span", {
|
|
62119
62211
|
className: "text-sm font-medium",
|
|
62120
62212
|
children: [filteredRows.length, " widget", filteredRows.length === 1 ? "" : "s", " with permissions in this dashboard"]
|
|
62121
62213
|
}), /*#__PURE__*/jsxs("span", {
|
|
62122
|
-
className: "text-xs
|
|
62214
|
+
className: "text-xs mt-0.5 ".concat(muted),
|
|
62123
62215
|
children: [totalGranted, " currently granted across ", totalDeclared, " declared server", totalDeclared === 1 ? "" : "s"]
|
|
62124
62216
|
})]
|
|
62125
62217
|
}), /*#__PURE__*/jsxs("div", {
|
|
62126
62218
|
className: "flex flex-row gap-2",
|
|
62127
|
-
children: [/*#__PURE__*/jsx(
|
|
62219
|
+
children: [/*#__PURE__*/jsx(Button3, {
|
|
62128
62220
|
title: "Allow all declared",
|
|
62129
62221
|
onClick: approveAllInDashboard,
|
|
62130
62222
|
disabled: busy,
|
|
62131
62223
|
size: "sm"
|
|
62224
|
+
}), /*#__PURE__*/jsx("span", {
|
|
62225
|
+
"data-testid": "permissions-revoke-all",
|
|
62226
|
+
children: /*#__PURE__*/jsx(Button3, {
|
|
62227
|
+
title: "Revoke all",
|
|
62228
|
+
onClick: function onClick() {
|
|
62229
|
+
return setConfirmRevokeAll(true);
|
|
62230
|
+
},
|
|
62231
|
+
disabled: busy || totalGranted === 0,
|
|
62232
|
+
size: "sm"
|
|
62233
|
+
})
|
|
62234
|
+
})]
|
|
62235
|
+
})]
|
|
62236
|
+
}), confirmRevokeAll && /*#__PURE__*/jsxs("div", {
|
|
62237
|
+
"data-testid": "permissions-revoke-all-confirm",
|
|
62238
|
+
className: "flex-shrink-0 flex flex-row items-center justify-between gap-3 rounded-lg border border-amber-400 px-3 py-2 mt-3",
|
|
62239
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
62240
|
+
className: "flex flex-col gap-0.5 min-w-0",
|
|
62241
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
62242
|
+
className: "text-sm font-medium",
|
|
62243
|
+
children: "Revoke all permissions for this dashboard?"
|
|
62244
|
+
}), /*#__PURE__*/jsx("span", {
|
|
62245
|
+
className: "text-xs ".concat(muted),
|
|
62246
|
+
children: "Every widget here will ask for consent again the next time it uses a tool."
|
|
62247
|
+
})]
|
|
62248
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
62249
|
+
className: "flex flex-row gap-2 flex-shrink-0",
|
|
62250
|
+
children: [/*#__PURE__*/jsx(Button3, {
|
|
62251
|
+
title: "Cancel",
|
|
62252
|
+
size: "sm",
|
|
62253
|
+
onClick: function onClick() {
|
|
62254
|
+
return setConfirmRevokeAll(false);
|
|
62255
|
+
}
|
|
62132
62256
|
}), /*#__PURE__*/jsx(Button, {
|
|
62133
|
-
title: "Revoke
|
|
62134
|
-
|
|
62135
|
-
|
|
62136
|
-
|
|
62257
|
+
title: "Revoke",
|
|
62258
|
+
size: "sm",
|
|
62259
|
+
onClick: function onClick() {
|
|
62260
|
+
setConfirmRevokeAll(false);
|
|
62261
|
+
revokeAllInDashboard();
|
|
62262
|
+
}
|
|
62137
62263
|
})]
|
|
62138
62264
|
})]
|
|
62139
|
-
}),
|
|
62140
|
-
className: "flex-shrink-0 text-xs text-red-400
|
|
62265
|
+
}), error && /*#__PURE__*/jsx("div", {
|
|
62266
|
+
className: "flex-shrink-0 text-xs text-red-400 mt-3",
|
|
62141
62267
|
children: error
|
|
62142
62268
|
}), /*#__PURE__*/jsx("div", {
|
|
62143
62269
|
className: "flex-1 min-h-0 overflow-y-auto pt-3 space-y-3",
|
|
@@ -62727,15 +62853,38 @@ function useTeamBots(workspaceId) {
|
|
|
62727
62853
|
}, [bots, running, paused, approvals, lastRunByBot, loading, approve, refresh, loadLastRun, drafts, dismissDraft]);
|
|
62728
62854
|
}
|
|
62729
62855
|
|
|
62730
|
-
var
|
|
62731
|
-
var
|
|
62732
|
-
|
|
62733
|
-
|
|
62856
|
+
var StatusDot = function StatusDot(_ref) {
|
|
62857
|
+
var status = _ref.status,
|
|
62858
|
+
muted = _ref.muted;
|
|
62859
|
+
var dot = STATUS_DOT$2[status] || STATUS_DOT$2.Idle;
|
|
62860
|
+
return /*#__PURE__*/jsxs("span", {
|
|
62861
|
+
"data-testid": "bot-status",
|
|
62862
|
+
className: "flex flex-row items-center gap-1.5 text-xs flex-shrink-0 ".concat(muted),
|
|
62863
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
62864
|
+
"data-testid": "bot-status-dot",
|
|
62865
|
+
className: "inline-block h-2 w-2 rounded-full ".concat(dot)
|
|
62866
|
+
}), status]
|
|
62867
|
+
});
|
|
62868
|
+
};
|
|
62869
|
+
|
|
62870
|
+
/**
|
|
62871
|
+
* BotsTab — Dashboard Config › Bots: a read-only summary of this dashboard's
|
|
62872
|
+
* team (bot-teams PRD TEAM-011). Managing bots — adding, editing, talking to
|
|
62873
|
+
* them — happens in the Bots view; "Open in Bots view" goes there.
|
|
62874
|
+
*/
|
|
62875
|
+
var BotsTab = function BotsTab(_ref2) {
|
|
62876
|
+
var workspace = _ref2.workspace,
|
|
62877
|
+
_ref2$onOpenBotsView = _ref2.onOpenBotsView,
|
|
62878
|
+
onOpenBotsView = _ref2$onOpenBotsView === void 0 ? null : _ref2$onOpenBotsView;
|
|
62734
62879
|
var team = useTeamBots(workspace ? workspace.id : null);
|
|
62735
62880
|
var lead = team.lead,
|
|
62736
62881
|
members = team.members,
|
|
62737
62882
|
attention = team.attention,
|
|
62738
62883
|
loading = team.loading;
|
|
62884
|
+
var _useConfigTokens = useConfigTokens(),
|
|
62885
|
+
muted = _useConfigTokens.muted,
|
|
62886
|
+
hairline = _useConfigTokens.hairline;
|
|
62887
|
+
var card = "rounded-lg border px-3 py-2 flex flex-row items-center justify-between gap-3 ".concat(hairline);
|
|
62739
62888
|
return /*#__PURE__*/jsxs("div", {
|
|
62740
62889
|
className: "flex flex-col gap-4 h-full min-h-0",
|
|
62741
62890
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -62745,7 +62894,7 @@ var BotsTab = function BotsTab(_ref) {
|
|
|
62745
62894
|
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
62746
62895
|
text: "This dashboard's team"
|
|
62747
62896
|
}), /*#__PURE__*/jsx("span", {
|
|
62748
|
-
className: "text-xs
|
|
62897
|
+
className: "text-xs ".concat(muted),
|
|
62749
62898
|
children: ["".concat(members.length, " bot").concat(members.length === 1 ? "" : "s"), lead ? "led by ".concat(lead.name) : "no team lead", attention > 0 ? "".concat(attention, " need").concat(attention === 1 ? "s" : "", " attention") : null].filter(Boolean).join(" · ")
|
|
62750
62899
|
})]
|
|
62751
62900
|
}), onOpenBotsView ? /*#__PURE__*/jsx(Button, {
|
|
@@ -62754,12 +62903,25 @@ var BotsTab = function BotsTab(_ref) {
|
|
|
62754
62903
|
onClick: onOpenBotsView
|
|
62755
62904
|
}) : null]
|
|
62756
62905
|
}), lead ? /*#__PURE__*/jsxs("div", {
|
|
62757
|
-
className:
|
|
62758
|
-
children: [/*#__PURE__*/
|
|
62759
|
-
className: "
|
|
62760
|
-
children:
|
|
62761
|
-
|
|
62762
|
-
|
|
62906
|
+
className: card,
|
|
62907
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
62908
|
+
className: "flex flex-col gap-0.5 min-w-0",
|
|
62909
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
62910
|
+
className: "flex flex-row items-center gap-2 text-sm",
|
|
62911
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
62912
|
+
className: "font-medium truncate",
|
|
62913
|
+
children: lead.name
|
|
62914
|
+
}), /*#__PURE__*/jsx("span", {
|
|
62915
|
+
className: "text-xs uppercase tracking-wider font-semibold ".concat(muted),
|
|
62916
|
+
children: "Lead"
|
|
62917
|
+
})]
|
|
62918
|
+
}), /*#__PURE__*/jsx("span", {
|
|
62919
|
+
className: "text-xs truncate ".concat(muted),
|
|
62920
|
+
children: "Answers questions about this team"
|
|
62921
|
+
})]
|
|
62922
|
+
}), /*#__PURE__*/jsx(StatusDot, {
|
|
62923
|
+
status: team.statusOf(lead.id),
|
|
62924
|
+
muted: muted
|
|
62763
62925
|
})]
|
|
62764
62926
|
}) : null, !loading && !members.length ? /*#__PURE__*/jsx(EmptyState, {
|
|
62765
62927
|
icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
@@ -62769,21 +62931,22 @@ var BotsTab = function BotsTab(_ref) {
|
|
|
62769
62931
|
title: "No bots on this dashboard yet",
|
|
62770
62932
|
description: "Add bots, talk to them and change their settings in the Bots view."
|
|
62771
62933
|
}) : /*#__PURE__*/jsx("div", {
|
|
62772
|
-
className: "flex flex-col gap-
|
|
62934
|
+
className: "flex flex-col gap-2 overflow-y-auto min-h-0",
|
|
62773
62935
|
children: members.map(function (bot) {
|
|
62774
62936
|
return /*#__PURE__*/jsxs("div", {
|
|
62775
|
-
className:
|
|
62937
|
+
className: card,
|
|
62776
62938
|
children: [/*#__PURE__*/jsxs("div", {
|
|
62777
|
-
className: "flex flex-col gap-
|
|
62939
|
+
className: "flex flex-col gap-0.5 min-w-0",
|
|
62778
62940
|
children: [/*#__PURE__*/jsx("span", {
|
|
62779
62941
|
className: "text-sm font-medium truncate",
|
|
62780
62942
|
children: bot.name
|
|
62781
62943
|
}), /*#__PURE__*/jsx("span", {
|
|
62782
|
-
className: "text-xs
|
|
62944
|
+
className: "text-xs truncate ".concat(muted),
|
|
62783
62945
|
children: triggerSummary(bot)
|
|
62784
62946
|
})]
|
|
62785
|
-
}), /*#__PURE__*/jsx(
|
|
62786
|
-
|
|
62947
|
+
}), /*#__PURE__*/jsx(StatusDot, {
|
|
62948
|
+
status: team.statusOf(bot.id),
|
|
62949
|
+
muted: muted
|
|
62787
62950
|
})]
|
|
62788
62951
|
}, bot.id);
|
|
62789
62952
|
})
|
|
@@ -62796,30 +62959,88 @@ function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r
|
|
|
62796
62959
|
function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
62797
62960
|
function ownKeys$e(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; }
|
|
62798
62961
|
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
62799
|
-
var
|
|
62800
|
-
var
|
|
62801
|
-
|
|
62802
|
-
|
|
62803
|
-
|
|
62804
|
-
|
|
62805
|
-
|
|
62806
|
-
|
|
62807
|
-
|
|
62808
|
-
|
|
62809
|
-
|
|
62810
|
-
|
|
62811
|
-
|
|
62812
|
-
|
|
62813
|
-
|
|
62814
|
-
|
|
62815
|
-
|
|
62816
|
-
|
|
62817
|
-
|
|
62962
|
+
var ConfigTab = function ConfigTab(_ref) {
|
|
62963
|
+
var active = _ref.active,
|
|
62964
|
+
onClick = _ref.onClick,
|
|
62965
|
+
children = _ref.children;
|
|
62966
|
+
var _useConfigTokens = useConfigTokens(),
|
|
62967
|
+
muted = _useConfigTokens.muted;
|
|
62968
|
+
return /*#__PURE__*/jsx("button", {
|
|
62969
|
+
type: "button",
|
|
62970
|
+
role: "tab",
|
|
62971
|
+
"aria-selected": active,
|
|
62972
|
+
onClick: onClick,
|
|
62973
|
+
className: "py-2.5 text-sm font-medium -mb-px border-b-2 ".concat(active ? "border-indigo-400" : "border-transparent ".concat(muted)),
|
|
62974
|
+
children: children
|
|
62975
|
+
});
|
|
62976
|
+
};
|
|
62977
|
+
|
|
62978
|
+
/**
|
|
62979
|
+
* DashboardConfigModal
|
|
62980
|
+
*
|
|
62981
|
+
* Workspace-scoped wiring panel. Lets a user assign providers to every
|
|
62982
|
+
* widget in the current workspace from one place instead of opening each
|
|
62983
|
+
* widget's settings individually. v1 ships the Providers tab; Listeners
|
|
62984
|
+
* tab lands in a follow-up PR (data model needs more exploration).
|
|
62985
|
+
*
|
|
62986
|
+
* Auto-opens on dashboard install when any required provider is still
|
|
62987
|
+
* unresolved after applying app-wide defaults. Also openable manually
|
|
62988
|
+
* via the dashboard toolbar's config button.
|
|
62989
|
+
*
|
|
62990
|
+
* @param {boolean} isOpen
|
|
62991
|
+
* @param {(open: boolean) => void} setIsOpen
|
|
62992
|
+
* @param {object} workspace Current workspace (layout/pages/sidebarLayout/selectedProviders).
|
|
62993
|
+
* @param {object|Array} appProviders Either a map keyed by provider name, or an array. Each entry has
|
|
62994
|
+
* at least { name?, type, providerClass, isDefaultForType }.
|
|
62995
|
+
* @param {(componentName: string) => Array} getWidgetRequirements
|
|
62996
|
+
* Called per widget instance. Should return the `providers: [...]`
|
|
62997
|
+
* array from the component's .dash.js. Usually backed by
|
|
62998
|
+
* ComponentManager.componentMap().
|
|
62999
|
+
* @param {(componentName: string) => object | null} getWidgetConfig
|
|
63000
|
+
* Called per widget instance. Returns the full ComponentManager
|
|
63001
|
+
* entry (events, eventHandlers, displayName, …). Used by the
|
|
63002
|
+
* Listeners tab to discover what each widget emits/handles.
|
|
63003
|
+
* @param {(changes: Array<{widgetId, providerType, providerName}>) => void} onSaveBindings
|
|
63004
|
+
* Called with the staged provider changes on Save. The parent persists
|
|
63005
|
+
* by forwarding to its existing `handleProviderSelect` /
|
|
63006
|
+
* `saveWorkspace` plumbing.
|
|
63007
|
+
* @param {(changes: {adds: Array, removes: Array}) => void} onSaveListeners
|
|
63008
|
+
* Called with the staged listener changes on Save. Each entry is
|
|
63009
|
+
* `{ receiverItemId, handlerName, sourceComponent, sourceItemId, eventName }`.
|
|
63010
|
+
* Parent uses `applyWiringChanges` + saveWorkspace.
|
|
63011
|
+
* @param {(changes: Array<{widgetId, key, value}>) => void} onSaveUserPrefs
|
|
63012
|
+
* Called with the staged widget userPrefs changes on Save. Parent
|
|
63013
|
+
* applies them to workspace + persists via saveWorkspace. Enables
|
|
63014
|
+
* bulk-edit of fields shared across widgets (e.g. basePath).
|
|
63015
|
+
* @param {"providers"|"listeners"|"widgets"} initialTab Which tab to focus when the modal opens.
|
|
63016
|
+
*/
|
|
63017
|
+
var DashboardConfigModal = function DashboardConfigModal(_ref2) {
|
|
63018
|
+
var isOpen = _ref2.isOpen,
|
|
63019
|
+
setIsOpen = _ref2.setIsOpen,
|
|
63020
|
+
workspace = _ref2.workspace;
|
|
63021
|
+
_ref2.workspaces;
|
|
63022
|
+
var appProviders = _ref2.appProviders,
|
|
63023
|
+
getWidgetRequirements = _ref2.getWidgetRequirements,
|
|
63024
|
+
_ref2$getWidgetConfig = _ref2.getWidgetConfig,
|
|
63025
|
+
getWidgetConfig = _ref2$getWidgetConfig === void 0 ? null : _ref2$getWidgetConfig,
|
|
63026
|
+
onSaveBindings = _ref2.onSaveBindings,
|
|
63027
|
+
onSaveListeners = _ref2.onSaveListeners,
|
|
63028
|
+
_ref2$onSaveUserPrefs = _ref2.onSaveUserPrefs,
|
|
63029
|
+
onSaveUserPrefs = _ref2$onSaveUserPrefs === void 0 ? null : _ref2$onSaveUserPrefs,
|
|
63030
|
+
_ref2$onSkip = _ref2.onSkip,
|
|
63031
|
+
onSkip = _ref2$onSkip === void 0 ? null : _ref2$onSkip,
|
|
63032
|
+
_ref2$initialTab = _ref2.initialTab,
|
|
63033
|
+
initialTab = _ref2$initialTab === void 0 ? "providers" : _ref2$initialTab,
|
|
63034
|
+
_ref2$onOpenBotsView = _ref2.onOpenBotsView,
|
|
63035
|
+
onOpenBotsView = _ref2$onOpenBotsView === void 0 ? null : _ref2$onOpenBotsView;
|
|
62818
63036
|
var _useContext = useContext(ThemeContext),
|
|
62819
63037
|
currentTheme = _useContext.currentTheme;
|
|
62820
63038
|
var panelStyles = getStylesForItem(themeObjects.PANEL, currentTheme, {
|
|
62821
63039
|
grow: false
|
|
62822
63040
|
});
|
|
63041
|
+
var _useConfigTokens2 = useConfigTokens(),
|
|
63042
|
+
muted = _useConfigTokens2.muted,
|
|
63043
|
+
hairline = _useConfigTokens2.hairline;
|
|
62823
63044
|
|
|
62824
63045
|
// Active tab. Defaults to whatever the parent requested via
|
|
62825
63046
|
// `initialTab`. Resets on each open via the modal's mount cycle.
|
|
@@ -63028,10 +63249,10 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
63028
63249
|
}
|
|
63029
63250
|
return Array.from(byPackage.values()).map(function (e) {
|
|
63030
63251
|
return _objectSpread$e(_objectSpread$e({}, e), {}, {
|
|
63031
|
-
components: Array.from(e.components.entries()).map(function (
|
|
63032
|
-
var
|
|
63033
|
-
component =
|
|
63034
|
-
count =
|
|
63252
|
+
components: Array.from(e.components.entries()).map(function (_ref3) {
|
|
63253
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
63254
|
+
component = _ref4[0],
|
|
63255
|
+
count = _ref4[1];
|
|
63035
63256
|
return {
|
|
63036
63257
|
component: component,
|
|
63037
63258
|
count: count
|
|
@@ -63352,80 +63573,84 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
63352
63573
|
children: /*#__PURE__*/jsxs("div", {
|
|
63353
63574
|
className: "flex flex-col h-full w-full rounded-lg overflow-clip border ".concat(panelStyles.backgroundColor || "", " ").concat(panelStyles.borderColor || "", " ").concat(panelStyles.textColor || ""),
|
|
63354
63575
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63355
|
-
className: "flex-shrink-0 flex flex-row items-
|
|
63576
|
+
className: "flex-shrink-0 flex flex-row items-start justify-between px-5 pt-4",
|
|
63356
63577
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63357
|
-
className: "flex
|
|
63358
|
-
children: [/*#__PURE__*/
|
|
63359
|
-
|
|
63360
|
-
|
|
63361
|
-
|
|
63362
|
-
|
|
63363
|
-
|
|
63364
|
-
|
|
63365
|
-
|
|
63366
|
-
|
|
63367
|
-
|
|
63578
|
+
className: "flex flex-col gap-0.5 min-w-0",
|
|
63579
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
63580
|
+
className: "flex flex-row items-center gap-3",
|
|
63581
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
63582
|
+
icon: "sliders",
|
|
63583
|
+
className: "h-4 w-4 opacity-70"
|
|
63584
|
+
}), /*#__PURE__*/jsx("span", {
|
|
63585
|
+
className: "text-lg font-semibold",
|
|
63586
|
+
children: "Dashboard Config"
|
|
63587
|
+
}), unresolvedCount > 0 && /*#__PURE__*/jsxs("span", {
|
|
63588
|
+
"data-testid": "config-unresolved",
|
|
63589
|
+
className: "flex flex-row items-center gap-1.5 text-sm text-amber-400",
|
|
63590
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
63591
|
+
className: "inline-block h-1.5 w-1.5 rounded-full bg-amber-400"
|
|
63592
|
+
}), unresolvedCount, " unresolved"]
|
|
63593
|
+
})]
|
|
63594
|
+
}), workspace !== null && workspace !== void 0 && workspace.name ? /*#__PURE__*/jsx("span", {
|
|
63595
|
+
className: "text-sm truncate ".concat(muted),
|
|
63596
|
+
children: workspace.name
|
|
63597
|
+
}) : null]
|
|
63368
63598
|
}), /*#__PURE__*/jsx("button", {
|
|
63369
63599
|
type: "button",
|
|
63370
63600
|
onClick: handleCancel,
|
|
63601
|
+
"aria-label": "Close",
|
|
63371
63602
|
className: "opacity-50 hover:opacity-100 transition-opacity cursor-pointer",
|
|
63372
63603
|
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
63373
63604
|
icon: "xmark",
|
|
63374
63605
|
className: "h-5 w-5"
|
|
63375
63606
|
})
|
|
63376
63607
|
})]
|
|
63377
|
-
}), /*#__PURE__*/
|
|
63378
|
-
|
|
63379
|
-
|
|
63380
|
-
|
|
63608
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
63609
|
+
role: "tablist",
|
|
63610
|
+
className: "flex-shrink-0 flex flex-row gap-6 px-5 mt-3 border-b ".concat(hairline),
|
|
63611
|
+
children: [/*#__PURE__*/jsxs(ConfigTab, {
|
|
63612
|
+
active: activeTab === "providers",
|
|
63381
63613
|
onClick: function onClick() {
|
|
63382
63614
|
return setActiveTab("providers");
|
|
63383
63615
|
},
|
|
63384
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "providers" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63385
63616
|
children: ["Providers", unresolvedCount > 0 && /*#__PURE__*/jsx("span", {
|
|
63386
63617
|
className: "ml-2 inline-block h-1.5 w-1.5 rounded-full bg-amber-400 align-middle"
|
|
63387
63618
|
})]
|
|
63388
|
-
}), /*#__PURE__*/jsx(
|
|
63389
|
-
|
|
63619
|
+
}), /*#__PURE__*/jsx(ConfigTab, {
|
|
63620
|
+
active: activeTab === "listeners",
|
|
63390
63621
|
onClick: function onClick() {
|
|
63391
63622
|
return setActiveTab("listeners");
|
|
63392
63623
|
},
|
|
63393
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "listeners" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63394
63624
|
children: "Listeners"
|
|
63395
|
-
}), /*#__PURE__*/jsx(
|
|
63396
|
-
|
|
63625
|
+
}), /*#__PURE__*/jsx(ConfigTab, {
|
|
63626
|
+
active: activeTab === "notifications",
|
|
63397
63627
|
onClick: function onClick() {
|
|
63398
63628
|
return setActiveTab("notifications");
|
|
63399
63629
|
},
|
|
63400
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "notifications" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63401
63630
|
children: "Notifications"
|
|
63402
|
-
}), /*#__PURE__*/jsx(
|
|
63403
|
-
|
|
63631
|
+
}), /*#__PURE__*/jsx(ConfigTab, {
|
|
63632
|
+
active: activeTab === "widgets",
|
|
63404
63633
|
onClick: function onClick() {
|
|
63405
63634
|
return setActiveTab("widgets");
|
|
63406
63635
|
},
|
|
63407
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "widgets" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63408
63636
|
children: "Widgets"
|
|
63409
|
-
}), /*#__PURE__*/jsx(
|
|
63410
|
-
|
|
63637
|
+
}), /*#__PURE__*/jsx(ConfigTab, {
|
|
63638
|
+
active: activeTab === "permissions",
|
|
63411
63639
|
onClick: function onClick() {
|
|
63412
63640
|
return setActiveTab("permissions");
|
|
63413
63641
|
},
|
|
63414
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "permissions" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63415
63642
|
children: "Permissions"
|
|
63416
|
-
}), /*#__PURE__*/jsx(
|
|
63417
|
-
|
|
63643
|
+
}), /*#__PURE__*/jsx(ConfigTab, {
|
|
63644
|
+
active: activeTab === "bots",
|
|
63418
63645
|
onClick: function onClick() {
|
|
63419
63646
|
return setActiveTab("bots");
|
|
63420
63647
|
},
|
|
63421
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "bots" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63422
63648
|
children: "Bots"
|
|
63423
|
-
}), /*#__PURE__*/jsxs(
|
|
63424
|
-
|
|
63649
|
+
}), /*#__PURE__*/jsxs(ConfigTab, {
|
|
63650
|
+
active: activeTab === "dependencies",
|
|
63425
63651
|
onClick: function onClick() {
|
|
63426
63652
|
return setActiveTab("dependencies");
|
|
63427
63653
|
},
|
|
63428
|
-
className: "px-3 py-1.5 text-sm font-medium -mb-px border-b-2 ".concat(activeTab === "dependencies" ? "border-indigo-400" : "border-transparent opacity-60 hover:opacity-100"),
|
|
63429
63654
|
children: ["Dependencies", dependencyCount > 0 && /*#__PURE__*/jsxs(Caption2, {
|
|
63430
63655
|
className: "ml-2",
|
|
63431
63656
|
children: ["(", dependencyCount, ")"]
|
|
@@ -63433,7 +63658,7 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
63433
63658
|
className: "ml-1 inline-block h-1.5 w-1.5 rounded-full bg-amber-400 align-middle"
|
|
63434
63659
|
})]
|
|
63435
63660
|
})]
|
|
63436
|
-
}), /*#__PURE__*/
|
|
63661
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
63437
63662
|
className: "flex-1 min-h-0 ".concat(activeTab === "widgets" ? "" : "p-5"),
|
|
63438
63663
|
children: [activeTab === "listeners" && /*#__PURE__*/jsx(ListenersTab, {
|
|
63439
63664
|
emitters: emitters,
|
|
@@ -63493,8 +63718,11 @@ var DashboardConfigModal = function DashboardConfigModal(_ref) {
|
|
|
63493
63718
|
* write fails the user can re-toggle. No staging — the bulk modal
|
|
63494
63719
|
* doesn't gate the user behind a Save button for boolean prefs.
|
|
63495
63720
|
*/
|
|
63496
|
-
function NotificationsTab(
|
|
63497
|
-
var workspace =
|
|
63721
|
+
function NotificationsTab(_ref5) {
|
|
63722
|
+
var workspace = _ref5.workspace;
|
|
63723
|
+
var _useConfigTokens3 = useConfigTokens(),
|
|
63724
|
+
muted = _useConfigTokens3.muted,
|
|
63725
|
+
hairline = _useConfigTokens3.hairline;
|
|
63498
63726
|
var _useState9 = useState(""),
|
|
63499
63727
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
63500
63728
|
searchQuery = _useState0[0],
|
|
@@ -63636,13 +63864,13 @@ function NotificationsTab(_ref4) {
|
|
|
63636
63864
|
};
|
|
63637
63865
|
if (!loaded) {
|
|
63638
63866
|
return /*#__PURE__*/jsx("div", {
|
|
63639
|
-
className: "p-4 text-sm
|
|
63867
|
+
className: "p-4 text-sm ".concat(muted),
|
|
63640
63868
|
children: "Loading\u2026"
|
|
63641
63869
|
});
|
|
63642
63870
|
}
|
|
63643
63871
|
if (widgetInstances.length === 0) {
|
|
63644
63872
|
return /*#__PURE__*/jsx("div", {
|
|
63645
|
-
className: "p-4 text-sm
|
|
63873
|
+
className: "p-4 text-sm ".concat(muted),
|
|
63646
63874
|
children: "No widgets in this dashboard declare notifications. Add widgets that declare notifications to see per-type controls here."
|
|
63647
63875
|
});
|
|
63648
63876
|
}
|
|
@@ -63658,71 +63886,70 @@ function NotificationsTab(_ref4) {
|
|
|
63658
63886
|
}), /*#__PURE__*/jsxs("div", {
|
|
63659
63887
|
className: "flex flex-row items-center justify-between text-xs",
|
|
63660
63888
|
children: [/*#__PURE__*/jsxs("span", {
|
|
63661
|
-
className:
|
|
63889
|
+
className: muted,
|
|
63662
63890
|
children: [filtered.length, " of ", widgetInstances.length, " widget", widgetInstances.length === 1 ? "" : "s"]
|
|
63663
63891
|
}), /*#__PURE__*/jsxs("div", {
|
|
63664
63892
|
className: "flex flex-row items-center gap-2",
|
|
63665
|
-
children: [/*#__PURE__*/jsx("
|
|
63666
|
-
type: "button",
|
|
63667
|
-
onClick: function onClick() {
|
|
63668
|
-
return setAllVisible(true);
|
|
63669
|
-
},
|
|
63670
|
-
className: "px-2 py-1 rounded bg-green-700 hover:bg-green-600 text-white text-xs font-medium transition-colors",
|
|
63893
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
63671
63894
|
"data-testid": "bulk-notifications-enable-all",
|
|
63672
|
-
children:
|
|
63673
|
-
|
|
63674
|
-
|
|
63675
|
-
|
|
63676
|
-
|
|
63677
|
-
|
|
63678
|
-
|
|
63895
|
+
children: /*#__PURE__*/jsx(Button3, {
|
|
63896
|
+
title: "Enable all",
|
|
63897
|
+
size: "sm",
|
|
63898
|
+
onClick: function onClick() {
|
|
63899
|
+
return setAllVisible(true);
|
|
63900
|
+
}
|
|
63901
|
+
})
|
|
63902
|
+
}), /*#__PURE__*/jsx("span", {
|
|
63679
63903
|
"data-testid": "bulk-notifications-disable-all",
|
|
63680
|
-
children:
|
|
63904
|
+
children: /*#__PURE__*/jsx(Button3, {
|
|
63905
|
+
title: "Disable all",
|
|
63906
|
+
size: "sm",
|
|
63907
|
+
onClick: function onClick() {
|
|
63908
|
+
return setAllVisible(false);
|
|
63909
|
+
}
|
|
63910
|
+
})
|
|
63681
63911
|
})]
|
|
63682
63912
|
})]
|
|
63683
63913
|
})]
|
|
63684
|
-
}), /*#__PURE__*/jsx(
|
|
63685
|
-
className: "flex-1 overflow-y-auto px-2 py-
|
|
63914
|
+
}), /*#__PURE__*/jsx("div", {
|
|
63915
|
+
className: "flex-1 overflow-y-auto px-2 py-3 flex flex-col gap-3 border-t ".concat(hairline),
|
|
63686
63916
|
children: filtered.map(function (wi) {
|
|
63687
63917
|
return /*#__PURE__*/jsxs("div", {
|
|
63688
|
-
className: "border
|
|
63918
|
+
className: "rounded-lg border px-3 py-2 flex flex-col gap-2 ".concat(hairline),
|
|
63689
63919
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63690
|
-
className: "flex flex-col",
|
|
63920
|
+
className: "flex flex-col gap-0.5",
|
|
63691
63921
|
children: [/*#__PURE__*/jsx("span", {
|
|
63692
63922
|
className: "text-sm font-medium",
|
|
63693
63923
|
children: wi.title
|
|
63694
|
-
}), /*#__PURE__*/jsxs(
|
|
63695
|
-
className: "font-mono",
|
|
63924
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
63925
|
+
className: "text-xs font-mono truncate ".concat(muted),
|
|
63696
63926
|
children: [wi.component, wi.itemId != null ? " \xB7 #".concat(wi.itemId) : ""]
|
|
63697
|
-
}), /*#__PURE__*/jsx(
|
|
63927
|
+
}), /*#__PURE__*/jsx("span", {
|
|
63928
|
+
className: "text-xs ".concat(muted),
|
|
63698
63929
|
children: wi["package"]
|
|
63699
63930
|
})]
|
|
63700
|
-
}), /*#__PURE__*/
|
|
63701
|
-
className: "flex flex-
|
|
63702
|
-
children:
|
|
63703
|
-
|
|
63704
|
-
|
|
63705
|
-
|
|
63706
|
-
|
|
63707
|
-
|
|
63708
|
-
|
|
63709
|
-
|
|
63710
|
-
|
|
63711
|
-
|
|
63712
|
-
|
|
63713
|
-
children: notif.displayName
|
|
63714
|
-
}), notif.description && /*#__PURE__*/jsx(Caption, {
|
|
63715
|
-
children: notif.description
|
|
63716
|
-
})]
|
|
63717
|
-
}), /*#__PURE__*/jsx(Switch, {
|
|
63718
|
-
checked: isEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
63719
|
-
onChange: function onChange(value) {
|
|
63720
|
-
return setOne(wi.uuid, notif.key, value);
|
|
63721
|
-
}
|
|
63931
|
+
}), /*#__PURE__*/jsx("div", {
|
|
63932
|
+
className: "flex flex-col border-t ".concat(hairline),
|
|
63933
|
+
children: wi.notifications.map(function (notif) {
|
|
63934
|
+
return /*#__PURE__*/jsxs("div", {
|
|
63935
|
+
className: "flex flex-row items-center justify-between gap-3 py-2",
|
|
63936
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
63937
|
+
className: "flex flex-col gap-0.5",
|
|
63938
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
63939
|
+
className: "text-sm",
|
|
63940
|
+
children: notif.displayName
|
|
63941
|
+
}), notif.description && /*#__PURE__*/jsx("span", {
|
|
63942
|
+
className: "text-xs ".concat(muted),
|
|
63943
|
+
children: notif.description
|
|
63722
63944
|
})]
|
|
63723
|
-
},
|
|
63724
|
-
|
|
63725
|
-
|
|
63945
|
+
}), /*#__PURE__*/jsx(Switch, {
|
|
63946
|
+
checked: isEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
63947
|
+
onChange: function onChange(value) {
|
|
63948
|
+
return setOne(wi.uuid, notif.key, value);
|
|
63949
|
+
}
|
|
63950
|
+
})]
|
|
63951
|
+
}, notif.key);
|
|
63952
|
+
})
|
|
63726
63953
|
})]
|
|
63727
63954
|
}, wi.uuid);
|
|
63728
63955
|
})
|
|
@@ -63736,12 +63963,16 @@ function NotificationsTab(_ref4) {
|
|
|
63736
63963
|
* dot per-type when any widget of that type is unresolved). Column 2
|
|
63737
63964
|
* shows the selected type's bulk dropdown + per-widget dropdowns.
|
|
63738
63965
|
*/
|
|
63739
|
-
function ProvidersTab(
|
|
63966
|
+
function ProvidersTab(_ref6) {
|
|
63740
63967
|
var _typeEntries$, _selectedRows$;
|
|
63741
|
-
var grouped =
|
|
63742
|
-
providersByType =
|
|
63743
|
-
onBulk =
|
|
63744
|
-
onPerWidget =
|
|
63968
|
+
var grouped = _ref6.grouped,
|
|
63969
|
+
providersByType = _ref6.providersByType,
|
|
63970
|
+
onBulk = _ref6.onBulk,
|
|
63971
|
+
onPerWidget = _ref6.onPerWidget;
|
|
63972
|
+
var _useConfigTokens4 = useConfigTokens(),
|
|
63973
|
+
muted = _useConfigTokens4.muted,
|
|
63974
|
+
hairline = _useConfigTokens4.hairline,
|
|
63975
|
+
fieldBg = _useConfigTokens4.fieldBg;
|
|
63745
63976
|
var typeEntries = useMemo(function () {
|
|
63746
63977
|
return Array.from(grouped.entries());
|
|
63747
63978
|
}, [grouped]);
|
|
@@ -63772,73 +64003,66 @@ function ProvidersTab(_ref5) {
|
|
|
63772
64003
|
return /*#__PURE__*/jsxs("div", {
|
|
63773
64004
|
className: "flex flex-row gap-3 h-full min-h-0",
|
|
63774
64005
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63775
|
-
className: "w-56 flex-shrink-0 overflow-hidden flex flex-col
|
|
63776
|
-
children: [/*#__PURE__*/jsx(
|
|
63777
|
-
className: "px-3
|
|
64006
|
+
className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
|
|
64007
|
+
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
64008
|
+
className: "px-3 mb-2",
|
|
63778
64009
|
children: "Provider Types"
|
|
63779
|
-
}), /*#__PURE__*/jsx(
|
|
63780
|
-
className: "overflow-y-auto flex-1",
|
|
63781
|
-
children: typeEntries.map(function (
|
|
63782
|
-
var
|
|
63783
|
-
providerType =
|
|
63784
|
-
rows =
|
|
63785
|
-
var isActive = selectedType === providerType;
|
|
64010
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64011
|
+
className: "overflow-y-auto flex-1 flex flex-col gap-1",
|
|
64012
|
+
children: typeEntries.map(function (_ref7) {
|
|
64013
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
64014
|
+
providerType = _ref8[0],
|
|
64015
|
+
rows = _ref8[1];
|
|
63786
64016
|
var unresolvedHere = rows.filter(function (r) {
|
|
63787
64017
|
return r.required && !r.resolvedProviderName;
|
|
63788
64018
|
}).length;
|
|
63789
|
-
return /*#__PURE__*/
|
|
63790
|
-
|
|
64019
|
+
return /*#__PURE__*/jsx(ConfigListRow, {
|
|
64020
|
+
title: providerType,
|
|
64021
|
+
active: selectedType === providerType,
|
|
63791
64022
|
onClick: function onClick() {
|
|
63792
64023
|
return setSelectedType(providerType);
|
|
63793
64024
|
},
|
|
63794
|
-
|
|
63795
|
-
|
|
63796
|
-
className: "flex items-center gap-
|
|
64025
|
+
meta: "".concat(rows.length, " widget").concat(rows.length === 1 ? "" : "s"),
|
|
64026
|
+
badge: unresolvedHere > 0 ? /*#__PURE__*/jsxs("span", {
|
|
64027
|
+
className: "flex flex-row items-center gap-1.5 text-xs text-amber-400 flex-shrink-0",
|
|
63797
64028
|
children: [/*#__PURE__*/jsx("span", {
|
|
63798
|
-
className: "
|
|
63799
|
-
|
|
63800
|
-
|
|
63801
|
-
className: "text-[10px] text-amber-300 flex items-center gap-1",
|
|
63802
|
-
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
63803
|
-
icon: "triangle-exclamation",
|
|
63804
|
-
className: "h-2.5 w-2.5"
|
|
63805
|
-
}), unresolvedHere]
|
|
63806
|
-
})]
|
|
63807
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
63808
|
-
className: "text-xs opacity-50 mt-0.5",
|
|
63809
|
-
children: [rows.length, " widget", rows.length === 1 ? "" : "s"]
|
|
63810
|
-
})]
|
|
64029
|
+
className: "inline-block h-1.5 w-1.5 rounded-full bg-amber-400"
|
|
64030
|
+
}), unresolvedHere]
|
|
64031
|
+
}) : null
|
|
63811
64032
|
}, providerType);
|
|
63812
64033
|
})
|
|
63813
64034
|
})]
|
|
64035
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64036
|
+
"aria-hidden": true,
|
|
64037
|
+
className: "flex-shrink-0 border-r ".concat(hairline)
|
|
63814
64038
|
}), /*#__PURE__*/jsx("div", {
|
|
63815
64039
|
className: "flex-1 min-w-0 overflow-hidden flex flex-col",
|
|
63816
64040
|
children: selectedType ? /*#__PURE__*/jsxs(Fragment, {
|
|
63817
64041
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63818
|
-
className: "px-4
|
|
64042
|
+
className: "px-4 pb-3 flex-shrink-0 border-b ".concat(hairline),
|
|
63819
64043
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63820
64044
|
className: "text-sm font-semibold",
|
|
63821
64045
|
children: [selectedType, " ", /*#__PURE__*/jsx("span", {
|
|
63822
|
-
className: "
|
|
64046
|
+
className: "font-normal ".concat(muted),
|
|
63823
64047
|
children: "provider"
|
|
63824
64048
|
})]
|
|
63825
64049
|
}), /*#__PURE__*/jsx("div", {
|
|
63826
|
-
className: "text-xs
|
|
64050
|
+
className: "text-xs mt-1 ".concat(muted),
|
|
63827
64051
|
children: "Apply one provider to every widget of this type, or adjust per-widget below."
|
|
63828
64052
|
})]
|
|
63829
|
-
}), /*#__PURE__*/
|
|
64053
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
63830
64054
|
className: "flex-1 overflow-y-auto p-4 space-y-4",
|
|
63831
64055
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63832
64056
|
className: "flex items-center gap-3",
|
|
63833
64057
|
children: [/*#__PURE__*/jsx("span", {
|
|
63834
|
-
className: "text-xs
|
|
64058
|
+
className: "text-xs flex-shrink-0 w-20 ".concat(muted),
|
|
63835
64059
|
children: "Bulk assign"
|
|
63836
64060
|
}), /*#__PURE__*/jsxs("select", {
|
|
63837
64061
|
value: topValue,
|
|
63838
64062
|
onChange: function onChange(e) {
|
|
63839
64063
|
return onBulk(selectedType, e.target.value);
|
|
63840
64064
|
},
|
|
63841
|
-
className: "flex-1
|
|
64065
|
+
className: "flex-1 rounded-lg border px-3 py-1.5 text-sm ".concat(fieldBg, " ").concat(hairline),
|
|
63842
64066
|
children: [/*#__PURE__*/jsx("option", {
|
|
63843
64067
|
value: "",
|
|
63844
64068
|
children: "\u2014 Select provider \u2014"
|
|
@@ -63850,10 +64074,11 @@ function ProvidersTab(_ref5) {
|
|
|
63850
64074
|
})]
|
|
63851
64075
|
})]
|
|
63852
64076
|
}), /*#__PURE__*/jsxs("div", {
|
|
63853
|
-
|
|
63854
|
-
|
|
64077
|
+
className: "flex flex-col gap-2",
|
|
64078
|
+
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
63855
64079
|
children: "Per-widget"
|
|
63856
64080
|
}), /*#__PURE__*/jsx("div", {
|
|
64081
|
+
className: "flex flex-col gap-2",
|
|
63857
64082
|
children: selectedRows.map(function (row) {
|
|
63858
64083
|
var _row$layoutItem;
|
|
63859
64084
|
var hasExplicitOverride = !!((_row$layoutItem = row.layoutItem) !== null && _row$layoutItem !== void 0 && (_row$layoutItem = _row$layoutItem.selectedProviders) !== null && _row$layoutItem !== void 0 && _row$layoutItem[selectedType]);
|
|
@@ -63861,35 +64086,29 @@ function ProvidersTab(_ref5) {
|
|
|
63861
64086
|
var isMissing = !row.resolvedProviderName;
|
|
63862
64087
|
var needsAttention = isRequired && isMissing;
|
|
63863
64088
|
return /*#__PURE__*/jsxs("div", {
|
|
63864
|
-
|
|
64089
|
+
"data-testid": "provider-row",
|
|
64090
|
+
className: "flex flex-row items-center gap-3 rounded-lg border px-3 py-2 ".concat(hairline),
|
|
63865
64091
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63866
64092
|
className: "flex-1 min-w-0",
|
|
63867
|
-
children: [/*#__PURE__*/
|
|
63868
|
-
className: "text-sm
|
|
63869
|
-
children:
|
|
63870
|
-
|
|
63871
|
-
|
|
63872
|
-
}), isRequired && /*#__PURE__*/jsx("span", {
|
|
63873
|
-
className: needsAttention ? "text-red-300" : "text-indigo-300",
|
|
63874
|
-
title: "Required provider",
|
|
63875
|
-
"aria-label": "required",
|
|
63876
|
-
children: "*"
|
|
63877
|
-
})]
|
|
63878
|
-
}), (row.widgetRef || row.component) && /*#__PURE__*/jsx(Caption, {
|
|
63879
|
-
block: true,
|
|
63880
|
-
className: "font-mono truncate mt-0.5",
|
|
64093
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
64094
|
+
className: "text-sm font-medium truncate",
|
|
64095
|
+
children: row.label || row.component || "widget"
|
|
64096
|
+
}), (row.widgetRef || row.component) && /*#__PURE__*/jsx("div", {
|
|
64097
|
+
className: "text-xs font-mono truncate mt-0.5 ".concat(muted),
|
|
63881
64098
|
title: row.widgetRef || row.component,
|
|
63882
64099
|
children: row.widgetRef || row.component
|
|
63883
64100
|
}), /*#__PURE__*/jsxs("div", {
|
|
63884
|
-
className: "flex items-center gap-
|
|
63885
|
-
children: [/*#__PURE__*/
|
|
63886
|
-
className: "
|
|
63887
|
-
children:
|
|
64101
|
+
className: "flex flex-row items-center gap-3 mt-1 text-xs",
|
|
64102
|
+
children: [/*#__PURE__*/jsxs("span", {
|
|
64103
|
+
className: "flex flex-row items-center gap-1.5 uppercase tracking-wider font-semibold ".concat(needsAttention ? "text-amber-400" : muted),
|
|
64104
|
+
children: [needsAttention && /*#__PURE__*/jsx("span", {
|
|
64105
|
+
className: "inline-block h-1.5 w-1.5 rounded-full bg-amber-400"
|
|
64106
|
+
}), isRequired ? "Required" : "Optional"]
|
|
63888
64107
|
}), hasExplicitOverride && /*#__PURE__*/jsx("span", {
|
|
63889
|
-
className: "uppercase tracking-
|
|
63890
|
-
children: "
|
|
64108
|
+
className: "uppercase tracking-wider font-semibold ".concat(muted),
|
|
64109
|
+
children: "Override"
|
|
63891
64110
|
}), /*#__PURE__*/jsx("span", {
|
|
63892
|
-
className: "
|
|
64111
|
+
className: "font-mono truncate ".concat(muted),
|
|
63893
64112
|
children: (row.widgetId || "").slice(0, 8)
|
|
63894
64113
|
})]
|
|
63895
64114
|
})]
|
|
@@ -63898,7 +64117,7 @@ function ProvidersTab(_ref5) {
|
|
|
63898
64117
|
onChange: function onChange(e) {
|
|
63899
64118
|
return onPerWidget(row.widgetId, selectedType, e.target.value);
|
|
63900
64119
|
},
|
|
63901
|
-
className: "
|
|
64120
|
+
className: "w-48 flex-shrink-0 rounded-lg border px-2 py-1 text-xs ".concat(fieldBg, " ").concat(needsAttention ? "border-amber-400" : hairline),
|
|
63902
64121
|
children: [/*#__PURE__*/jsx("option", {
|
|
63903
64122
|
value: "",
|
|
63904
64123
|
children: "\u2014 none \u2014"
|
|
@@ -63915,7 +64134,7 @@ function ProvidersTab(_ref5) {
|
|
|
63915
64134
|
})]
|
|
63916
64135
|
})]
|
|
63917
64136
|
}) : /*#__PURE__*/jsx("div", {
|
|
63918
|
-
className: "flex-1 flex items-center justify-center text-sm
|
|
64137
|
+
className: "flex-1 flex items-center justify-center text-sm ".concat(muted),
|
|
63919
64138
|
children: "Pick a provider type to bulk-assign or adjust per widget."
|
|
63920
64139
|
})
|
|
63921
64140
|
})]
|
|
@@ -63936,11 +64155,14 @@ function ProvidersTab(_ref5) {
|
|
|
63936
64155
|
* package (no `config.id` / `config.package` / item.workspace hint).
|
|
63937
64156
|
* Usually this is a stale layout item whose widget got uninstalled.
|
|
63938
64157
|
*/
|
|
63939
|
-
function DependenciesTab(
|
|
63940
|
-
var dependencies =
|
|
64158
|
+
function DependenciesTab(_ref0) {
|
|
64159
|
+
var dependencies = _ref0.dependencies;
|
|
64160
|
+
var _useConfigTokens5 = useConfigTokens(),
|
|
64161
|
+
muted = _useConfigTokens5.muted,
|
|
64162
|
+
hairline = _useConfigTokens5.hairline;
|
|
63941
64163
|
if (!dependencies || dependencies.length === 0) {
|
|
63942
64164
|
return /*#__PURE__*/jsx("div", {
|
|
63943
|
-
className: "flex items-center justify-center h-full text-sm
|
|
64165
|
+
className: "flex items-center justify-center h-full text-sm text-center ".concat(muted),
|
|
63944
64166
|
children: /*#__PURE__*/jsx("div", {
|
|
63945
64167
|
children: "No widget packages referenced by this dashboard."
|
|
63946
64168
|
})
|
|
@@ -63949,37 +64171,38 @@ function DependenciesTab(_ref9) {
|
|
|
63949
64171
|
return /*#__PURE__*/jsxs("div", {
|
|
63950
64172
|
className: "flex flex-col h-full min-h-0 overflow-y-auto gap-3",
|
|
63951
64173
|
children: [/*#__PURE__*/jsx("div", {
|
|
63952
|
-
className: "text-xs
|
|
64174
|
+
className: "text-xs ".concat(muted),
|
|
63953
64175
|
children: "Every widget instance in this workspace, grouped by the package it belongs to. Locations show where each package is referenced."
|
|
63954
64176
|
}), dependencies.map(function (dep) {
|
|
63955
64177
|
var isUnknown = dep.packageLabel === "(unknown)";
|
|
63956
64178
|
return /*#__PURE__*/jsxs("div", {
|
|
63957
|
-
className: "border rounded-lg px-
|
|
64179
|
+
className: "border rounded-lg px-3 py-2 ".concat(isUnknown ? "border-amber-400" : hairline),
|
|
63958
64180
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63959
64181
|
className: "flex items-center gap-2 flex-wrap",
|
|
63960
64182
|
children: [/*#__PURE__*/jsx("code", {
|
|
63961
|
-
className: "text-sm font-semibold
|
|
64183
|
+
className: "text-sm font-semibold",
|
|
63962
64184
|
children: dep.packageLabel
|
|
63963
64185
|
}), /*#__PURE__*/jsxs("span", {
|
|
63964
|
-
className: "text-xs
|
|
64186
|
+
className: "text-xs ".concat(muted),
|
|
63965
64187
|
children: [dep.total, " instance", dep.total === 1 ? "" : "s"]
|
|
63966
|
-
}), isUnknown && /*#__PURE__*/
|
|
63967
|
-
className: "text-
|
|
63968
|
-
children: "
|
|
64188
|
+
}), isUnknown && /*#__PURE__*/jsxs("span", {
|
|
64189
|
+
className: "flex flex-row items-center gap-1.5 text-xs text-amber-400 uppercase tracking-wider font-semibold",
|
|
64190
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
64191
|
+
className: "inline-block h-1.5 w-1.5 rounded-full bg-amber-400"
|
|
64192
|
+
}), "No package mapping"]
|
|
63969
64193
|
})]
|
|
63970
64194
|
}), /*#__PURE__*/jsxs("div", {
|
|
63971
|
-
className: "mt-2 text-xs
|
|
64195
|
+
className: "mt-2 text-xs flex flex-col gap-1",
|
|
63972
64196
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63973
64197
|
children: [/*#__PURE__*/jsx("span", {
|
|
63974
|
-
className: "
|
|
64198
|
+
className: "mr-1 ".concat(muted),
|
|
63975
64199
|
children: "Widgets:"
|
|
63976
64200
|
}), dep.components.map(function (c) {
|
|
63977
64201
|
return "".concat(c.component).concat(c.count > 1 ? " \xD7".concat(c.count) : "");
|
|
63978
64202
|
}).join(", ")]
|
|
63979
64203
|
}), /*#__PURE__*/jsxs("div", {
|
|
63980
|
-
className: "mt-1",
|
|
63981
64204
|
children: [/*#__PURE__*/jsx("span", {
|
|
63982
|
-
className: "
|
|
64205
|
+
className: "mr-1 ".concat(muted),
|
|
63983
64206
|
children: "Locations:"
|
|
63984
64207
|
}), dep.locations.join(", ")]
|
|
63985
64208
|
})]
|
|
@@ -64010,13 +64233,16 @@ function sameWiringEntry(a, b) {
|
|
|
64010
64233
|
* adjusts wiring per handler from a single dropdown of all emitters'
|
|
64011
64234
|
* (widget × event) pairs.
|
|
64012
64235
|
*/
|
|
64013
|
-
function ListenersTab(
|
|
64236
|
+
function ListenersTab(_ref1) {
|
|
64014
64237
|
var _receivers$;
|
|
64015
|
-
var emitters =
|
|
64016
|
-
receivers =
|
|
64017
|
-
wiring =
|
|
64018
|
-
onAdd =
|
|
64019
|
-
onRemove =
|
|
64238
|
+
var emitters = _ref1.emitters,
|
|
64239
|
+
receivers = _ref1.receivers,
|
|
64240
|
+
wiring = _ref1.wiring,
|
|
64241
|
+
onAdd = _ref1.onAdd,
|
|
64242
|
+
onRemove = _ref1.onRemove;
|
|
64243
|
+
var _useConfigTokens6 = useConfigTokens(),
|
|
64244
|
+
muted = _useConfigTokens6.muted,
|
|
64245
|
+
hairline = _useConfigTokens6.hairline;
|
|
64020
64246
|
var _useState17 = useState(((_receivers$ = receivers[0]) === null || _receivers$ === void 0 ? void 0 : _receivers$.key) || null),
|
|
64021
64247
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
64022
64248
|
selectedReceiverKey = _useState18[0],
|
|
@@ -64072,31 +64298,25 @@ function ListenersTab(_ref0) {
|
|
|
64072
64298
|
className: "flex flex-row gap-3 flex-1 min-h-0",
|
|
64073
64299
|
children: [/*#__PURE__*/jsxs("div", {
|
|
64074
64300
|
className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
|
|
64075
|
-
children: [/*#__PURE__*/jsx(
|
|
64076
|
-
className: "px-3
|
|
64301
|
+
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
64302
|
+
className: "px-3 mb-2",
|
|
64077
64303
|
children: "Widgets"
|
|
64078
|
-
}), /*#__PURE__*/jsx(
|
|
64079
|
-
className: "overflow-y-auto flex-1",
|
|
64304
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64305
|
+
className: "overflow-y-auto flex-1 flex flex-col gap-1",
|
|
64080
64306
|
children: receivers.map(function (r) {
|
|
64081
|
-
|
|
64082
|
-
|
|
64083
|
-
|
|
64307
|
+
return /*#__PURE__*/jsx(ConfigListRow, {
|
|
64308
|
+
title: r.label,
|
|
64309
|
+
subtitle: r.widgetRef || null,
|
|
64310
|
+
active: r.key === selectedReceiverKey,
|
|
64084
64311
|
onClick: function onClick() {
|
|
64085
64312
|
return setSelectedReceiverKey(r.key);
|
|
64086
|
-
}
|
|
64087
|
-
className: "w-full text-left px-3 py-2 border-l-2 ".concat(isActive ? "bg-indigo-900/30 border-indigo-400" : "border-transparent hover:bg-white/5"),
|
|
64088
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
64089
|
-
className: "text-sm font-medium truncate",
|
|
64090
|
-
children: r.label
|
|
64091
|
-
}), r.widgetRef && /*#__PURE__*/jsx(Caption, {
|
|
64092
|
-
block: true,
|
|
64093
|
-
className: "font-mono truncate mt-0.5",
|
|
64094
|
-
title: r.widgetRef,
|
|
64095
|
-
children: r.widgetRef
|
|
64096
|
-
})]
|
|
64313
|
+
}
|
|
64097
64314
|
}, r.key);
|
|
64098
64315
|
})
|
|
64099
64316
|
})]
|
|
64317
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64318
|
+
"aria-hidden": true,
|
|
64319
|
+
className: "flex-shrink-0 border-r ".concat(hairline)
|
|
64100
64320
|
}), selectedReceiver ? /*#__PURE__*/jsxs(Fragment, {
|
|
64101
64321
|
children: [/*#__PURE__*/jsx(HandlersColumn, {
|
|
64102
64322
|
receiver: selectedReceiver,
|
|
@@ -64116,7 +64336,7 @@ function ListenersTab(_ref0) {
|
|
|
64116
64336
|
onRemove: onRemove
|
|
64117
64337
|
})]
|
|
64118
64338
|
}) : /*#__PURE__*/jsx("div", {
|
|
64119
|
-
className: "flex-1 min-w-0 flex items-center justify-center text-sm
|
|
64339
|
+
className: "flex-1 min-w-0 flex items-center justify-center text-sm ".concat(muted),
|
|
64120
64340
|
children: "Pick a widget on the left to wire its handlers."
|
|
64121
64341
|
})]
|
|
64122
64342
|
})
|
|
@@ -64129,11 +64349,11 @@ function ListenersTab(_ref0) {
|
|
|
64129
64349
|
* third column. Matches the left-column look from
|
|
64130
64350
|
* PanelEditItemHandlers.
|
|
64131
64351
|
*/
|
|
64132
|
-
function HandlersColumn(
|
|
64133
|
-
var receiver =
|
|
64134
|
-
myWiring =
|
|
64135
|
-
selectedHandler =
|
|
64136
|
-
onSelectHandler =
|
|
64352
|
+
function HandlersColumn(_ref11) {
|
|
64353
|
+
var receiver = _ref11.receiver,
|
|
64354
|
+
myWiring = _ref11.myWiring,
|
|
64355
|
+
selectedHandler = _ref11.selectedHandler,
|
|
64356
|
+
onSelectHandler = _ref11.onSelectHandler;
|
|
64137
64357
|
var countsByHandler = useMemo(function () {
|
|
64138
64358
|
var m = new Map();
|
|
64139
64359
|
var _iterator9 = _createForOfIteratorHelper$9(myWiring),
|
|
@@ -64150,44 +64370,43 @@ function HandlersColumn(_ref10) {
|
|
|
64150
64370
|
}
|
|
64151
64371
|
return m;
|
|
64152
64372
|
}, [myWiring]);
|
|
64373
|
+
var _useConfigTokens7 = useConfigTokens(),
|
|
64374
|
+
muted = _useConfigTokens7.muted,
|
|
64375
|
+
hairline = _useConfigTokens7.hairline;
|
|
64153
64376
|
return (
|
|
64154
64377
|
/*#__PURE__*/
|
|
64155
64378
|
// Plain <div> wrapper — Card2 reads as washed-out against the
|
|
64156
64379
|
// modal's dark chrome. See ListenersTab + ProvidersTab fix.
|
|
64157
|
-
jsxs(
|
|
64158
|
-
|
|
64159
|
-
|
|
64160
|
-
|
|
64161
|
-
|
|
64162
|
-
|
|
64163
|
-
|
|
64164
|
-
|
|
64165
|
-
|
|
64166
|
-
|
|
64167
|
-
|
|
64168
|
-
|
|
64169
|
-
|
|
64170
|
-
|
|
64171
|
-
|
|
64172
|
-
|
|
64173
|
-
|
|
64174
|
-
|
|
64175
|
-
|
|
64176
|
-
|
|
64177
|
-
|
|
64178
|
-
|
|
64179
|
-
|
|
64180
|
-
|
|
64181
|
-
|
|
64182
|
-
|
|
64183
|
-
|
|
64184
|
-
|
|
64185
|
-
|
|
64186
|
-
|
|
64187
|
-
children: count
|
|
64188
|
-
})]
|
|
64189
|
-
}, h);
|
|
64190
|
-
})
|
|
64380
|
+
jsxs(Fragment, {
|
|
64381
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
64382
|
+
className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
|
|
64383
|
+
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
64384
|
+
className: "px-3 mb-2",
|
|
64385
|
+
children: "Event Handlers"
|
|
64386
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64387
|
+
className: "overflow-y-auto flex-1 flex flex-col gap-1",
|
|
64388
|
+
children: receiver.eventHandlers.length === 0 ? /*#__PURE__*/jsx("div", {
|
|
64389
|
+
className: "text-xs text-center py-6 px-3 ".concat(muted),
|
|
64390
|
+
children: "This widget declares no event handlers."
|
|
64391
|
+
}) : receiver.eventHandlers.map(function (h) {
|
|
64392
|
+
var count = countsByHandler.get(h) || 0;
|
|
64393
|
+
return /*#__PURE__*/jsx(ConfigListRow, {
|
|
64394
|
+
title: h,
|
|
64395
|
+
mono: true,
|
|
64396
|
+
active: h === selectedHandler,
|
|
64397
|
+
onClick: function onClick() {
|
|
64398
|
+
return onSelectHandler(h);
|
|
64399
|
+
},
|
|
64400
|
+
badge: /*#__PURE__*/jsx("span", {
|
|
64401
|
+
className: "text-xs flex-shrink-0 ".concat(muted),
|
|
64402
|
+
children: count
|
|
64403
|
+
})
|
|
64404
|
+
}, h);
|
|
64405
|
+
})
|
|
64406
|
+
})]
|
|
64407
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64408
|
+
"aria-hidden": true,
|
|
64409
|
+
className: "flex-shrink-0 border-r ".concat(hairline)
|
|
64191
64410
|
})]
|
|
64192
64411
|
})
|
|
64193
64412
|
);
|
|
@@ -64199,13 +64418,16 @@ function HandlersColumn(_ref10) {
|
|
|
64199
64418
|
* Checked = wired; toggling commits an add/remove. Mirrors the
|
|
64200
64419
|
* right-column UX of PanelEditItemHandlers.
|
|
64201
64420
|
*/
|
|
64202
|
-
function EventsColumn(
|
|
64203
|
-
var receiver =
|
|
64204
|
-
handlerName =
|
|
64205
|
-
myWiring =
|
|
64206
|
-
emitters =
|
|
64207
|
-
onAdd =
|
|
64208
|
-
onRemove =
|
|
64421
|
+
function EventsColumn(_ref12) {
|
|
64422
|
+
var receiver = _ref12.receiver,
|
|
64423
|
+
handlerName = _ref12.handlerName,
|
|
64424
|
+
myWiring = _ref12.myWiring,
|
|
64425
|
+
emitters = _ref12.emitters,
|
|
64426
|
+
onAdd = _ref12.onAdd,
|
|
64427
|
+
onRemove = _ref12.onRemove;
|
|
64428
|
+
var _useConfigTokens8 = useConfigTokens(),
|
|
64429
|
+
muted = _useConfigTokens8.muted,
|
|
64430
|
+
hairline = _useConfigTokens8.hairline;
|
|
64209
64431
|
// Wired-for-this-handler: dedupe defensively (legacy workspaces
|
|
64210
64432
|
// occasionally contain duplicate entries under the same handler).
|
|
64211
64433
|
var wiredHere = useMemo(function () {
|
|
@@ -64242,7 +64464,7 @@ function EventsColumn(_ref11) {
|
|
|
64242
64464
|
});
|
|
64243
64465
|
if (!handlerName) {
|
|
64244
64466
|
return /*#__PURE__*/jsx("div", {
|
|
64245
|
-
className: "flex-1 min-w-0 flex items-center justify-center text-sm
|
|
64467
|
+
className: "flex-1 min-w-0 flex items-center justify-center text-sm ".concat(muted),
|
|
64246
64468
|
children: "Select a handler to view available events."
|
|
64247
64469
|
});
|
|
64248
64470
|
}
|
|
@@ -64276,7 +64498,7 @@ function EventsColumn(_ref11) {
|
|
|
64276
64498
|
jsxs("div", {
|
|
64277
64499
|
className: "flex-1 min-w-0 overflow-hidden flex flex-col",
|
|
64278
64500
|
children: [/*#__PURE__*/jsxs("div", {
|
|
64279
|
-
className: "flex-shrink-0 px-4
|
|
64501
|
+
className: "flex-shrink-0 px-4 pb-3 text-xs border-b ".concat(muted, " ").concat(hairline),
|
|
64280
64502
|
children: ["Check an event to fire ", /*#__PURE__*/jsx("code", {
|
|
64281
64503
|
className: "text-xs",
|
|
64282
64504
|
children: handlerName
|
|
@@ -64284,22 +64506,21 @@ function EventsColumn(_ref11) {
|
|
|
64284
64506
|
className: "font-medium",
|
|
64285
64507
|
children: receiver.label
|
|
64286
64508
|
}), "."]
|
|
64287
|
-
}), /*#__PURE__*/jsx(
|
|
64288
|
-
className: "flex-1 overflow-y-auto p-4
|
|
64509
|
+
}), /*#__PURE__*/jsx("div", {
|
|
64510
|
+
className: "flex-1 overflow-y-auto p-4 flex flex-col gap-3",
|
|
64289
64511
|
children: emittersForList.length === 0 ? /*#__PURE__*/jsx("div", {
|
|
64290
|
-
className: "text-sm
|
|
64512
|
+
className: "text-sm ".concat(muted),
|
|
64291
64513
|
children: "No other widgets in this dashboard emit events."
|
|
64292
64514
|
}) : emittersForList.map(function (e) {
|
|
64293
64515
|
return /*#__PURE__*/jsxs("div", {
|
|
64294
|
-
className: "
|
|
64516
|
+
className: "rounded-lg border px-3 py-2 flex flex-col gap-1 ".concat(hairline),
|
|
64295
64517
|
children: [/*#__PURE__*/jsxs("div", {
|
|
64296
64518
|
className: "flex flex-col gap-0.5 mb-1",
|
|
64297
64519
|
children: [/*#__PURE__*/jsx("div", {
|
|
64298
64520
|
className: "text-sm font-semibold",
|
|
64299
64521
|
children: e.label
|
|
64300
|
-
}), (e.widgetRef || e.component) && /*#__PURE__*/jsx(
|
|
64301
|
-
|
|
64302
|
-
className: "font-mono truncate",
|
|
64522
|
+
}), (e.widgetRef || e.component) && /*#__PURE__*/jsx("div", {
|
|
64523
|
+
className: "text-xs font-mono truncate ".concat(muted),
|
|
64303
64524
|
children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
|
|
64304
64525
|
})]
|
|
64305
64526
|
}), e.events.map(function (eventName) {
|
|
@@ -65147,13 +65368,7 @@ var isDraftId = function isDraftId(id) {
|
|
|
65147
65368
|
return typeof id === "string" && id.startsWith(DRAFT_PREFIX);
|
|
65148
65369
|
};
|
|
65149
65370
|
var NARROW_PX = 900;
|
|
65150
|
-
var DOT =
|
|
65151
|
-
Idle: "bg-gray-500",
|
|
65152
|
-
Running: "bg-indigo-400",
|
|
65153
|
-
Paused: "bg-gray-400",
|
|
65154
|
-
"Needs approval": "bg-amber-400",
|
|
65155
|
-
Failed: "bg-red-400"
|
|
65156
|
-
};
|
|
65371
|
+
var DOT = STATUS_DOT$2;
|
|
65157
65372
|
var getWidgetConfig$1 = function getWidgetConfig(name) {
|
|
65158
65373
|
return name && ComponentManager.config(name) || null;
|
|
65159
65374
|
};
|