@trops/dash-core 0.1.663 → 0.1.665
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 +291 -193
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +291 -193
- 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",
|
|
@@ -61188,68 +61270,6 @@ function renderFormItem(displayName, key, instructions, required, value, _onChan
|
|
|
61188
61270
|
}, "config-item-".concat(key));
|
|
61189
61271
|
}
|
|
61190
61272
|
|
|
61191
|
-
function useConfigTokens() {
|
|
61192
|
-
var _ref = useContext(ThemeContext) || {},
|
|
61193
|
-
_ref$currentTheme = _ref.currentTheme,
|
|
61194
|
-
currentTheme = _ref$currentTheme === void 0 ? {} : _ref$currentTheme;
|
|
61195
|
-
return {
|
|
61196
|
-
muted: currentTheme["text-neutral-medium"] || "text-gray-400",
|
|
61197
|
-
strong: currentTheme["text-neutral-light"] || "text-gray-200",
|
|
61198
|
-
hairline: currentTheme["border-neutral-dark"] || "border-gray-700",
|
|
61199
|
-
selectedBg: currentTheme["bg-neutral-very-dark"] || "bg-gray-800",
|
|
61200
|
-
selectedBorder: currentTheme["border-primary-dark"] || "border-gray-600",
|
|
61201
|
-
fieldBg: currentTheme["bg-neutral-very-dark"] || "bg-gray-900"
|
|
61202
|
-
};
|
|
61203
|
-
}
|
|
61204
|
-
|
|
61205
|
-
/**
|
|
61206
|
-
* A row in one of the modal's left-hand lists (provider types, widgets,
|
|
61207
|
-
* event handlers) — styled like the Bots view's team list.
|
|
61208
|
-
*
|
|
61209
|
-
* @param {{ title: React.ReactNode, subtitle?: React.ReactNode,
|
|
61210
|
-
* meta?: React.ReactNode, badge?: React.ReactNode,
|
|
61211
|
-
* active?: boolean, mono?: boolean, onClick: () => void }} props
|
|
61212
|
-
* `subtitle` is a registry id (monospace); `meta` a muted count line.
|
|
61213
|
-
*/
|
|
61214
|
-
var ConfigListRow = function ConfigListRow(_ref2) {
|
|
61215
|
-
var title = _ref2.title,
|
|
61216
|
-
_ref2$subtitle = _ref2.subtitle,
|
|
61217
|
-
subtitle = _ref2$subtitle === void 0 ? null : _ref2$subtitle,
|
|
61218
|
-
_ref2$meta = _ref2.meta,
|
|
61219
|
-
meta = _ref2$meta === void 0 ? null : _ref2$meta,
|
|
61220
|
-
_ref2$badge = _ref2.badge,
|
|
61221
|
-
badge = _ref2$badge === void 0 ? null : _ref2$badge,
|
|
61222
|
-
_ref2$active = _ref2.active,
|
|
61223
|
-
active = _ref2$active === void 0 ? false : _ref2$active,
|
|
61224
|
-
_ref2$mono = _ref2.mono,
|
|
61225
|
-
mono = _ref2$mono === void 0 ? false : _ref2$mono,
|
|
61226
|
-
onClick = _ref2.onClick;
|
|
61227
|
-
var _useConfigTokens = useConfigTokens(),
|
|
61228
|
-
muted = _useConfigTokens.muted,
|
|
61229
|
-
selectedBg = _useConfigTokens.selectedBg,
|
|
61230
|
-
selectedBorder = _useConfigTokens.selectedBorder;
|
|
61231
|
-
return /*#__PURE__*/jsxs("button", {
|
|
61232
|
-
type: "button",
|
|
61233
|
-
onClick: onClick,
|
|
61234
|
-
"aria-current": active ? "true" : undefined,
|
|
61235
|
-
className: "w-full text-left rounded-lg px-3 py-2 border ".concat(active ? "".concat(selectedBg, " ").concat(selectedBorder) : "border-transparent"),
|
|
61236
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
61237
|
-
className: "flex flex-row items-center justify-between gap-2 min-w-0",
|
|
61238
|
-
children: [/*#__PURE__*/jsx("span", {
|
|
61239
|
-
className: "text-sm font-medium truncate ".concat(mono ? "font-mono" : ""),
|
|
61240
|
-
children: title
|
|
61241
|
-
}), badge]
|
|
61242
|
-
}), subtitle ? /*#__PURE__*/jsx("div", {
|
|
61243
|
-
className: "text-xs font-mono truncate mt-0.5 ".concat(muted),
|
|
61244
|
-
title: typeof subtitle === "string" ? subtitle : undefined,
|
|
61245
|
-
children: subtitle
|
|
61246
|
-
}) : null, meta ? /*#__PURE__*/jsx("div", {
|
|
61247
|
-
className: "text-xs mt-0.5 ".concat(muted),
|
|
61248
|
-
children: meta
|
|
61249
|
-
}) : null]
|
|
61250
|
-
});
|
|
61251
|
-
};
|
|
61252
|
-
|
|
61253
61273
|
function ownKeys$g(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; }
|
|
61254
61274
|
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
61255
61275
|
function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -61630,6 +61650,13 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
61630
61650
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
61631
61651
|
busy = _useState8[0],
|
|
61632
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;
|
|
61633
61660
|
|
|
61634
61661
|
// Build the set of widget identifiers in this workspace. Walk every
|
|
61635
61662
|
// layout location (main, pages, sidebar). `pickWidgetRef` returns
|
|
@@ -62158,7 +62185,7 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
62158
62185
|
}).length;
|
|
62159
62186
|
if (loading) {
|
|
62160
62187
|
return /*#__PURE__*/jsx("div", {
|
|
62161
|
-
className: "text-sm
|
|
62188
|
+
className: "text-sm p-4 ".concat(muted),
|
|
62162
62189
|
children: "Loading permissions\u2026"
|
|
62163
62190
|
});
|
|
62164
62191
|
}
|
|
@@ -62166,10 +62193,10 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
62166
62193
|
return /*#__PURE__*/jsxs("div", {
|
|
62167
62194
|
className: "flex flex-col gap-3 p-4",
|
|
62168
62195
|
children: [/*#__PURE__*/jsx("div", {
|
|
62169
|
-
className: "text-sm
|
|
62196
|
+
className: "text-sm",
|
|
62170
62197
|
children: "No widgets in this dashboard request any MCP permissions."
|
|
62171
62198
|
}), /*#__PURE__*/jsx("div", {
|
|
62172
|
-
className: "text-xs
|
|
62199
|
+
className: "text-xs ".concat(muted),
|
|
62173
62200
|
children: "Permissions only show up here when a widget's published manifest (or local source) declares MCP tool usage."
|
|
62174
62201
|
})]
|
|
62175
62202
|
});
|
|
@@ -62177,32 +62204,66 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
62177
62204
|
return /*#__PURE__*/jsxs("div", {
|
|
62178
62205
|
className: "flex flex-col h-full min-h-0",
|
|
62179
62206
|
children: [/*#__PURE__*/jsxs("div", {
|
|
62180
|
-
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),
|
|
62181
62208
|
children: [/*#__PURE__*/jsxs("div", {
|
|
62182
62209
|
className: "flex flex-col",
|
|
62183
62210
|
children: [/*#__PURE__*/jsxs("span", {
|
|
62184
62211
|
className: "text-sm font-medium",
|
|
62185
62212
|
children: [filteredRows.length, " widget", filteredRows.length === 1 ? "" : "s", " with permissions in this dashboard"]
|
|
62186
62213
|
}), /*#__PURE__*/jsxs("span", {
|
|
62187
|
-
className: "text-xs
|
|
62214
|
+
className: "text-xs mt-0.5 ".concat(muted),
|
|
62188
62215
|
children: [totalGranted, " currently granted across ", totalDeclared, " declared server", totalDeclared === 1 ? "" : "s"]
|
|
62189
62216
|
})]
|
|
62190
62217
|
}), /*#__PURE__*/jsxs("div", {
|
|
62191
62218
|
className: "flex flex-row gap-2",
|
|
62192
|
-
children: [/*#__PURE__*/jsx(
|
|
62219
|
+
children: [/*#__PURE__*/jsx(Button3, {
|
|
62193
62220
|
title: "Allow all declared",
|
|
62194
62221
|
onClick: approveAllInDashboard,
|
|
62195
62222
|
disabled: busy,
|
|
62196
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
|
+
}
|
|
62197
62256
|
}), /*#__PURE__*/jsx(Button, {
|
|
62198
|
-
title: "Revoke
|
|
62199
|
-
|
|
62200
|
-
|
|
62201
|
-
|
|
62257
|
+
title: "Revoke",
|
|
62258
|
+
size: "sm",
|
|
62259
|
+
onClick: function onClick() {
|
|
62260
|
+
setConfirmRevokeAll(false);
|
|
62261
|
+
revokeAllInDashboard();
|
|
62262
|
+
}
|
|
62202
62263
|
})]
|
|
62203
62264
|
})]
|
|
62204
|
-
}),
|
|
62205
|
-
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",
|
|
62206
62267
|
children: error
|
|
62207
62268
|
}), /*#__PURE__*/jsx("div", {
|
|
62208
62269
|
className: "flex-1 min-h-0 overflow-y-auto pt-3 space-y-3",
|
|
@@ -62792,15 +62853,38 @@ function useTeamBots(workspaceId) {
|
|
|
62792
62853
|
}, [bots, running, paused, approvals, lastRunByBot, loading, approve, refresh, loadLastRun, drafts, dismissDraft]);
|
|
62793
62854
|
}
|
|
62794
62855
|
|
|
62795
|
-
var
|
|
62796
|
-
var
|
|
62797
|
-
|
|
62798
|
-
|
|
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;
|
|
62799
62879
|
var team = useTeamBots(workspace ? workspace.id : null);
|
|
62800
62880
|
var lead = team.lead,
|
|
62801
62881
|
members = team.members,
|
|
62802
62882
|
attention = team.attention,
|
|
62803
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);
|
|
62804
62888
|
return /*#__PURE__*/jsxs("div", {
|
|
62805
62889
|
className: "flex flex-col gap-4 h-full min-h-0",
|
|
62806
62890
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -62810,7 +62894,7 @@ var BotsTab = function BotsTab(_ref) {
|
|
|
62810
62894
|
children: [/*#__PURE__*/jsx(SectionLabel, {
|
|
62811
62895
|
text: "This dashboard's team"
|
|
62812
62896
|
}), /*#__PURE__*/jsx("span", {
|
|
62813
|
-
className: "text-xs
|
|
62897
|
+
className: "text-xs ".concat(muted),
|
|
62814
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(" · ")
|
|
62815
62899
|
})]
|
|
62816
62900
|
}), onOpenBotsView ? /*#__PURE__*/jsx(Button, {
|
|
@@ -62819,12 +62903,25 @@ var BotsTab = function BotsTab(_ref) {
|
|
|
62819
62903
|
onClick: onOpenBotsView
|
|
62820
62904
|
}) : null]
|
|
62821
62905
|
}), lead ? /*#__PURE__*/jsxs("div", {
|
|
62822
|
-
className:
|
|
62823
|
-
children: [/*#__PURE__*/
|
|
62824
|
-
className: "
|
|
62825
|
-
children:
|
|
62826
|
-
|
|
62827
|
-
|
|
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
|
|
62828
62925
|
})]
|
|
62829
62926
|
}) : null, !loading && !members.length ? /*#__PURE__*/jsx(EmptyState, {
|
|
62830
62927
|
icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
@@ -62834,21 +62931,22 @@ var BotsTab = function BotsTab(_ref) {
|
|
|
62834
62931
|
title: "No bots on this dashboard yet",
|
|
62835
62932
|
description: "Add bots, talk to them and change their settings in the Bots view."
|
|
62836
62933
|
}) : /*#__PURE__*/jsx("div", {
|
|
62837
|
-
className: "flex flex-col gap-
|
|
62934
|
+
className: "flex flex-col gap-2 overflow-y-auto min-h-0",
|
|
62838
62935
|
children: members.map(function (bot) {
|
|
62839
62936
|
return /*#__PURE__*/jsxs("div", {
|
|
62840
|
-
className:
|
|
62937
|
+
className: card,
|
|
62841
62938
|
children: [/*#__PURE__*/jsxs("div", {
|
|
62842
|
-
className: "flex flex-col gap-
|
|
62939
|
+
className: "flex flex-col gap-0.5 min-w-0",
|
|
62843
62940
|
children: [/*#__PURE__*/jsx("span", {
|
|
62844
62941
|
className: "text-sm font-medium truncate",
|
|
62845
62942
|
children: bot.name
|
|
62846
62943
|
}), /*#__PURE__*/jsx("span", {
|
|
62847
|
-
className: "text-xs
|
|
62944
|
+
className: "text-xs truncate ".concat(muted),
|
|
62848
62945
|
children: triggerSummary(bot)
|
|
62849
62946
|
})]
|
|
62850
|
-
}), /*#__PURE__*/jsx(
|
|
62851
|
-
|
|
62947
|
+
}), /*#__PURE__*/jsx(StatusDot, {
|
|
62948
|
+
status: team.statusOf(bot.id),
|
|
62949
|
+
muted: muted
|
|
62852
62950
|
})]
|
|
62853
62951
|
}, bot.id);
|
|
62854
62952
|
})
|
|
@@ -63622,6 +63720,9 @@ var DashboardConfigModal = function DashboardConfigModal(_ref2) {
|
|
|
63622
63720
|
*/
|
|
63623
63721
|
function NotificationsTab(_ref5) {
|
|
63624
63722
|
var workspace = _ref5.workspace;
|
|
63723
|
+
var _useConfigTokens3 = useConfigTokens(),
|
|
63724
|
+
muted = _useConfigTokens3.muted,
|
|
63725
|
+
hairline = _useConfigTokens3.hairline;
|
|
63625
63726
|
var _useState9 = useState(""),
|
|
63626
63727
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
63627
63728
|
searchQuery = _useState0[0],
|
|
@@ -63763,13 +63864,13 @@ function NotificationsTab(_ref5) {
|
|
|
63763
63864
|
};
|
|
63764
63865
|
if (!loaded) {
|
|
63765
63866
|
return /*#__PURE__*/jsx("div", {
|
|
63766
|
-
className: "p-4 text-sm
|
|
63867
|
+
className: "p-4 text-sm ".concat(muted),
|
|
63767
63868
|
children: "Loading\u2026"
|
|
63768
63869
|
});
|
|
63769
63870
|
}
|
|
63770
63871
|
if (widgetInstances.length === 0) {
|
|
63771
63872
|
return /*#__PURE__*/jsx("div", {
|
|
63772
|
-
className: "p-4 text-sm
|
|
63873
|
+
className: "p-4 text-sm ".concat(muted),
|
|
63773
63874
|
children: "No widgets in this dashboard declare notifications. Add widgets that declare notifications to see per-type controls here."
|
|
63774
63875
|
});
|
|
63775
63876
|
}
|
|
@@ -63785,71 +63886,70 @@ function NotificationsTab(_ref5) {
|
|
|
63785
63886
|
}), /*#__PURE__*/jsxs("div", {
|
|
63786
63887
|
className: "flex flex-row items-center justify-between text-xs",
|
|
63787
63888
|
children: [/*#__PURE__*/jsxs("span", {
|
|
63788
|
-
className:
|
|
63889
|
+
className: muted,
|
|
63789
63890
|
children: [filtered.length, " of ", widgetInstances.length, " widget", widgetInstances.length === 1 ? "" : "s"]
|
|
63790
63891
|
}), /*#__PURE__*/jsxs("div", {
|
|
63791
63892
|
className: "flex flex-row items-center gap-2",
|
|
63792
|
-
children: [/*#__PURE__*/jsx("
|
|
63793
|
-
type: "button",
|
|
63794
|
-
onClick: function onClick() {
|
|
63795
|
-
return setAllVisible(true);
|
|
63796
|
-
},
|
|
63797
|
-
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", {
|
|
63798
63894
|
"data-testid": "bulk-notifications-enable-all",
|
|
63799
|
-
children:
|
|
63800
|
-
|
|
63801
|
-
|
|
63802
|
-
|
|
63803
|
-
|
|
63804
|
-
|
|
63805
|
-
|
|
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", {
|
|
63806
63903
|
"data-testid": "bulk-notifications-disable-all",
|
|
63807
|
-
children:
|
|
63904
|
+
children: /*#__PURE__*/jsx(Button3, {
|
|
63905
|
+
title: "Disable all",
|
|
63906
|
+
size: "sm",
|
|
63907
|
+
onClick: function onClick() {
|
|
63908
|
+
return setAllVisible(false);
|
|
63909
|
+
}
|
|
63910
|
+
})
|
|
63808
63911
|
})]
|
|
63809
63912
|
})]
|
|
63810
63913
|
})]
|
|
63811
|
-
}), /*#__PURE__*/jsx(
|
|
63812
|
-
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),
|
|
63813
63916
|
children: filtered.map(function (wi) {
|
|
63814
63917
|
return /*#__PURE__*/jsxs("div", {
|
|
63815
|
-
className: "border
|
|
63918
|
+
className: "rounded-lg border px-3 py-2 flex flex-col gap-2 ".concat(hairline),
|
|
63816
63919
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63817
|
-
className: "flex flex-col",
|
|
63920
|
+
className: "flex flex-col gap-0.5",
|
|
63818
63921
|
children: [/*#__PURE__*/jsx("span", {
|
|
63819
63922
|
className: "text-sm font-medium",
|
|
63820
63923
|
children: wi.title
|
|
63821
|
-
}), /*#__PURE__*/jsxs(
|
|
63822
|
-
className: "font-mono",
|
|
63924
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
63925
|
+
className: "text-xs font-mono truncate ".concat(muted),
|
|
63823
63926
|
children: [wi.component, wi.itemId != null ? " \xB7 #".concat(wi.itemId) : ""]
|
|
63824
|
-
}), /*#__PURE__*/jsx(
|
|
63927
|
+
}), /*#__PURE__*/jsx("span", {
|
|
63928
|
+
className: "text-xs ".concat(muted),
|
|
63825
63929
|
children: wi["package"]
|
|
63826
63930
|
})]
|
|
63827
|
-
}), /*#__PURE__*/
|
|
63828
|
-
className: "flex flex-
|
|
63829
|
-
children:
|
|
63830
|
-
|
|
63831
|
-
|
|
63832
|
-
|
|
63833
|
-
|
|
63834
|
-
|
|
63835
|
-
|
|
63836
|
-
|
|
63837
|
-
|
|
63838
|
-
|
|
63839
|
-
|
|
63840
|
-
children: notif.displayName
|
|
63841
|
-
}), notif.description && /*#__PURE__*/jsx(Caption, {
|
|
63842
|
-
children: notif.description
|
|
63843
|
-
})]
|
|
63844
|
-
}), /*#__PURE__*/jsx(Switch, {
|
|
63845
|
-
checked: isEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
63846
|
-
onChange: function onChange(value) {
|
|
63847
|
-
return setOne(wi.uuid, notif.key, value);
|
|
63848
|
-
}
|
|
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
|
|
63849
63944
|
})]
|
|
63850
|
-
},
|
|
63851
|
-
|
|
63852
|
-
|
|
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
|
+
})
|
|
63853
63953
|
})]
|
|
63854
63954
|
}, wi.uuid);
|
|
63855
63955
|
})
|
|
@@ -63869,10 +63969,10 @@ function ProvidersTab(_ref6) {
|
|
|
63869
63969
|
providersByType = _ref6.providersByType,
|
|
63870
63970
|
onBulk = _ref6.onBulk,
|
|
63871
63971
|
onPerWidget = _ref6.onPerWidget;
|
|
63872
|
-
var
|
|
63873
|
-
muted =
|
|
63874
|
-
hairline =
|
|
63875
|
-
fieldBg =
|
|
63972
|
+
var _useConfigTokens4 = useConfigTokens(),
|
|
63973
|
+
muted = _useConfigTokens4.muted,
|
|
63974
|
+
hairline = _useConfigTokens4.hairline,
|
|
63975
|
+
fieldBg = _useConfigTokens4.fieldBg;
|
|
63876
63976
|
var typeEntries = useMemo(function () {
|
|
63877
63977
|
return Array.from(grouped.entries());
|
|
63878
63978
|
}, [grouped]);
|
|
@@ -64057,9 +64157,12 @@ function ProvidersTab(_ref6) {
|
|
|
64057
64157
|
*/
|
|
64058
64158
|
function DependenciesTab(_ref0) {
|
|
64059
64159
|
var dependencies = _ref0.dependencies;
|
|
64160
|
+
var _useConfigTokens5 = useConfigTokens(),
|
|
64161
|
+
muted = _useConfigTokens5.muted,
|
|
64162
|
+
hairline = _useConfigTokens5.hairline;
|
|
64060
64163
|
if (!dependencies || dependencies.length === 0) {
|
|
64061
64164
|
return /*#__PURE__*/jsx("div", {
|
|
64062
|
-
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),
|
|
64063
64166
|
children: /*#__PURE__*/jsx("div", {
|
|
64064
64167
|
children: "No widget packages referenced by this dashboard."
|
|
64065
64168
|
})
|
|
@@ -64068,37 +64171,38 @@ function DependenciesTab(_ref0) {
|
|
|
64068
64171
|
return /*#__PURE__*/jsxs("div", {
|
|
64069
64172
|
className: "flex flex-col h-full min-h-0 overflow-y-auto gap-3",
|
|
64070
64173
|
children: [/*#__PURE__*/jsx("div", {
|
|
64071
|
-
className: "text-xs
|
|
64174
|
+
className: "text-xs ".concat(muted),
|
|
64072
64175
|
children: "Every widget instance in this workspace, grouped by the package it belongs to. Locations show where each package is referenced."
|
|
64073
64176
|
}), dependencies.map(function (dep) {
|
|
64074
64177
|
var isUnknown = dep.packageLabel === "(unknown)";
|
|
64075
64178
|
return /*#__PURE__*/jsxs("div", {
|
|
64076
|
-
className: "border rounded-lg px-
|
|
64179
|
+
className: "border rounded-lg px-3 py-2 ".concat(isUnknown ? "border-amber-400" : hairline),
|
|
64077
64180
|
children: [/*#__PURE__*/jsxs("div", {
|
|
64078
64181
|
className: "flex items-center gap-2 flex-wrap",
|
|
64079
64182
|
children: [/*#__PURE__*/jsx("code", {
|
|
64080
|
-
className: "text-sm font-semibold
|
|
64183
|
+
className: "text-sm font-semibold",
|
|
64081
64184
|
children: dep.packageLabel
|
|
64082
64185
|
}), /*#__PURE__*/jsxs("span", {
|
|
64083
|
-
className: "text-xs
|
|
64186
|
+
className: "text-xs ".concat(muted),
|
|
64084
64187
|
children: [dep.total, " instance", dep.total === 1 ? "" : "s"]
|
|
64085
|
-
}), isUnknown && /*#__PURE__*/
|
|
64086
|
-
className: "text-
|
|
64087
|
-
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"]
|
|
64088
64193
|
})]
|
|
64089
64194
|
}), /*#__PURE__*/jsxs("div", {
|
|
64090
|
-
className: "mt-2 text-xs
|
|
64195
|
+
className: "mt-2 text-xs flex flex-col gap-1",
|
|
64091
64196
|
children: [/*#__PURE__*/jsxs("div", {
|
|
64092
64197
|
children: [/*#__PURE__*/jsx("span", {
|
|
64093
|
-
className: "
|
|
64198
|
+
className: "mr-1 ".concat(muted),
|
|
64094
64199
|
children: "Widgets:"
|
|
64095
64200
|
}), dep.components.map(function (c) {
|
|
64096
64201
|
return "".concat(c.component).concat(c.count > 1 ? " \xD7".concat(c.count) : "");
|
|
64097
64202
|
}).join(", ")]
|
|
64098
64203
|
}), /*#__PURE__*/jsxs("div", {
|
|
64099
|
-
className: "mt-1",
|
|
64100
64204
|
children: [/*#__PURE__*/jsx("span", {
|
|
64101
|
-
className: "
|
|
64205
|
+
className: "mr-1 ".concat(muted),
|
|
64102
64206
|
children: "Locations:"
|
|
64103
64207
|
}), dep.locations.join(", ")]
|
|
64104
64208
|
})]
|
|
@@ -64136,9 +64240,9 @@ function ListenersTab(_ref1) {
|
|
|
64136
64240
|
wiring = _ref1.wiring,
|
|
64137
64241
|
onAdd = _ref1.onAdd,
|
|
64138
64242
|
onRemove = _ref1.onRemove;
|
|
64139
|
-
var
|
|
64140
|
-
muted =
|
|
64141
|
-
hairline =
|
|
64243
|
+
var _useConfigTokens6 = useConfigTokens(),
|
|
64244
|
+
muted = _useConfigTokens6.muted,
|
|
64245
|
+
hairline = _useConfigTokens6.hairline;
|
|
64142
64246
|
var _useState17 = useState(((_receivers$ = receivers[0]) === null || _receivers$ === void 0 ? void 0 : _receivers$.key) || null),
|
|
64143
64247
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
64144
64248
|
selectedReceiverKey = _useState18[0],
|
|
@@ -64266,9 +64370,9 @@ function HandlersColumn(_ref11) {
|
|
|
64266
64370
|
}
|
|
64267
64371
|
return m;
|
|
64268
64372
|
}, [myWiring]);
|
|
64269
|
-
var
|
|
64270
|
-
muted =
|
|
64271
|
-
hairline =
|
|
64373
|
+
var _useConfigTokens7 = useConfigTokens(),
|
|
64374
|
+
muted = _useConfigTokens7.muted,
|
|
64375
|
+
hairline = _useConfigTokens7.hairline;
|
|
64272
64376
|
return (
|
|
64273
64377
|
/*#__PURE__*/
|
|
64274
64378
|
// Plain <div> wrapper — Card2 reads as washed-out against the
|
|
@@ -64321,9 +64425,9 @@ function EventsColumn(_ref12) {
|
|
|
64321
64425
|
emitters = _ref12.emitters,
|
|
64322
64426
|
onAdd = _ref12.onAdd,
|
|
64323
64427
|
onRemove = _ref12.onRemove;
|
|
64324
|
-
var
|
|
64325
|
-
muted =
|
|
64326
|
-
hairline =
|
|
64428
|
+
var _useConfigTokens8 = useConfigTokens(),
|
|
64429
|
+
muted = _useConfigTokens8.muted,
|
|
64430
|
+
hairline = _useConfigTokens8.hairline;
|
|
64327
64431
|
// Wired-for-this-handler: dedupe defensively (legacy workspaces
|
|
64328
64432
|
// occasionally contain duplicate entries under the same handler).
|
|
64329
64433
|
var wiredHere = useMemo(function () {
|
|
@@ -65264,13 +65368,7 @@ var isDraftId = function isDraftId(id) {
|
|
|
65264
65368
|
return typeof id === "string" && id.startsWith(DRAFT_PREFIX);
|
|
65265
65369
|
};
|
|
65266
65370
|
var NARROW_PX = 900;
|
|
65267
|
-
var DOT =
|
|
65268
|
-
Idle: "bg-gray-500",
|
|
65269
|
-
Running: "bg-indigo-400",
|
|
65270
|
-
Paused: "bg-gray-400",
|
|
65271
|
-
"Needs approval": "bg-amber-400",
|
|
65272
|
-
Failed: "bg-red-400"
|
|
65273
|
-
};
|
|
65371
|
+
var DOT = STATUS_DOT$2;
|
|
65274
65372
|
var getWidgetConfig$1 = function getWidgetConfig(name) {
|
|
65275
65373
|
return name && ComponentManager.config(name) || null;
|
|
65276
65374
|
};
|