@trops/dash-core 0.1.517 → 0.1.519
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 +83 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +83 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -49329,6 +49329,12 @@ var PrivacySecurityList = function PrivacySecurityList(_ref) {
|
|
|
49329
49329
|
var keyFor = function keyFor(group) {
|
|
49330
49330
|
return group.packageId == null ? "__ungrouped__" : group.packageId;
|
|
49331
49331
|
};
|
|
49332
|
+
|
|
49333
|
+
// Special selection keys for the two non-package items at the top
|
|
49334
|
+
// of the list. Keep them in the same selection state as packages so
|
|
49335
|
+
// the right panel knows what to render via a single key.
|
|
49336
|
+
var SETTINGS_KEY = "__settings__";
|
|
49337
|
+
var HELP_KEY = "__help__";
|
|
49332
49338
|
function renderPackageItem(group) {
|
|
49333
49339
|
var key = keyFor(group);
|
|
49334
49340
|
var isSelected = selectedPackageKey === key;
|
|
@@ -49377,7 +49383,32 @@ var PrivacySecurityList = function PrivacySecurityList(_ref) {
|
|
|
49377
49383
|
}), /*#__PURE__*/jsx("div", {
|
|
49378
49384
|
className: "flex-1 overflow-y-auto min-h-0",
|
|
49379
49385
|
children: /*#__PURE__*/jsxs(Sidebar.Content, {
|
|
49380
|
-
children: [
|
|
49386
|
+
children: [/*#__PURE__*/jsxs(Sidebar.Group, {
|
|
49387
|
+
label: "Configuration",
|
|
49388
|
+
children: [/*#__PURE__*/jsx(Sidebar.Item, {
|
|
49389
|
+
icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
49390
|
+
icon: "gear",
|
|
49391
|
+
className: "h-3.5 w-3.5"
|
|
49392
|
+
}),
|
|
49393
|
+
active: selectedPackageKey === SETTINGS_KEY,
|
|
49394
|
+
onClick: function onClick() {
|
|
49395
|
+
return onSelectPackage(SETTINGS_KEY);
|
|
49396
|
+
},
|
|
49397
|
+
className: selectedPackageKey === SETTINGS_KEY ? "bg-white/10 opacity-100" : "",
|
|
49398
|
+
children: "Settings"
|
|
49399
|
+
}, SETTINGS_KEY), /*#__PURE__*/jsx(Sidebar.Item, {
|
|
49400
|
+
icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
49401
|
+
icon: "circle-question",
|
|
49402
|
+
className: "h-3.5 w-3.5"
|
|
49403
|
+
}),
|
|
49404
|
+
active: selectedPackageKey === HELP_KEY,
|
|
49405
|
+
onClick: function onClick() {
|
|
49406
|
+
return onSelectPackage(HELP_KEY);
|
|
49407
|
+
},
|
|
49408
|
+
className: selectedPackageKey === HELP_KEY ? "bg-white/10 opacity-100" : "",
|
|
49409
|
+
children: "Help"
|
|
49410
|
+
}, HELP_KEY)]
|
|
49411
|
+
}), viewMode === "grouped" ? /*#__PURE__*/jsxs(Fragment, {
|
|
49381
49412
|
children: [withGrants.length > 0 && /*#__PURE__*/jsx(Sidebar.Group, {
|
|
49382
49413
|
label: "Has grants",
|
|
49383
49414
|
children: withGrants.map(renderPackageItem)
|
|
@@ -49385,7 +49416,10 @@ var PrivacySecurityList = function PrivacySecurityList(_ref) {
|
|
|
49385
49416
|
label: "No grants",
|
|
49386
49417
|
children: withoutGrants.map(renderPackageItem)
|
|
49387
49418
|
})]
|
|
49388
|
-
}) :
|
|
49419
|
+
}) : /*#__PURE__*/jsx(Sidebar.Group, {
|
|
49420
|
+
label: "Packages",
|
|
49421
|
+
children: filtered.map(renderPackageItem)
|
|
49422
|
+
}), filtered.length === 0 && /*#__PURE__*/jsx("span", {
|
|
49389
49423
|
className: "text-sm opacity-40 py-8 text-center block",
|
|
49390
49424
|
children: searchQuery ? "No packages match your search" : "No widgets installed"
|
|
49391
49425
|
})]
|
|
@@ -49719,7 +49753,12 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
|
|
|
49719
49753
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
49720
49754
|
viewMode = _useState12[0],
|
|
49721
49755
|
setViewMode = _useState12[1];
|
|
49722
|
-
|
|
49756
|
+
// Default to the Settings sidebar item so first-time visitors land
|
|
49757
|
+
// on something useful rather than the empty-detail placeholder.
|
|
49758
|
+
// "__settings__"/"__help__" are special selection keys (see
|
|
49759
|
+
// PrivacySecurityList); a string starting without "__" is a
|
|
49760
|
+
// packageId.
|
|
49761
|
+
var _useState13 = useState("__settings__"),
|
|
49723
49762
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
49724
49763
|
selectedPackageKey = _useState14[0],
|
|
49725
49764
|
setSelectedPackageKey = _useState14[1];
|
|
@@ -49920,7 +49959,9 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
|
|
|
49920
49959
|
});
|
|
49921
49960
|
}
|
|
49922
49961
|
var packageGroups = groupRowsByPackage(rows);
|
|
49923
|
-
var
|
|
49962
|
+
var isSettingsSelected = selectedPackageKey === "__settings__";
|
|
49963
|
+
var isHelpSelected = selectedPackageKey === "__help__";
|
|
49964
|
+
var selectedGroup = selectedPackageKey == null || isSettingsSelected || isHelpSelected ? null : packageGroups.find(function (g) {
|
|
49924
49965
|
return g.packageId == null ? selectedPackageKey === "__ungrouped__" : g.packageId === selectedPackageKey;
|
|
49925
49966
|
}) || null;
|
|
49926
49967
|
var listContent = /*#__PURE__*/jsx(PrivacySecurityList, {
|
|
@@ -49932,36 +49973,53 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
|
|
|
49932
49973
|
viewMode: viewMode,
|
|
49933
49974
|
onViewModeChange: setViewMode
|
|
49934
49975
|
});
|
|
49935
|
-
|
|
49936
|
-
|
|
49937
|
-
|
|
49938
|
-
|
|
49939
|
-
|
|
49940
|
-
|
|
49941
|
-
|
|
49942
|
-
|
|
49943
|
-
|
|
49976
|
+
|
|
49977
|
+
// Detail panel content varies by what the user picked in the
|
|
49978
|
+
// sidebar — Settings shows the toggles, Help shows the how-it-
|
|
49979
|
+
// works panel, a package shows its widgets. Wrapping each non-
|
|
49980
|
+
// package case in a scrollable container so long content (like
|
|
49981
|
+
// the help fixtures) stays inside the panel and doesn't push the
|
|
49982
|
+
// sidebar around.
|
|
49983
|
+
var detailContent = null;
|
|
49984
|
+
if (isSettingsSelected) {
|
|
49985
|
+
detailContent = /*#__PURE__*/jsx("div", {
|
|
49986
|
+
className: "flex flex-col flex-1 min-h-0 overflow-y-auto p-6",
|
|
49987
|
+
children: /*#__PURE__*/jsx(EnforcementToggles, {})
|
|
49988
|
+
});
|
|
49989
|
+
} else if (isHelpSelected) {
|
|
49990
|
+
detailContent = /*#__PURE__*/jsx("div", {
|
|
49991
|
+
className: "flex flex-col flex-1 min-h-0 overflow-y-auto p-6",
|
|
49992
|
+
children: /*#__PURE__*/jsx(HowThisWorksPanel, {})
|
|
49993
|
+
});
|
|
49994
|
+
} else if (selectedGroup) {
|
|
49995
|
+
detailContent = /*#__PURE__*/jsx(WidgetPackageDetail, {
|
|
49996
|
+
packageGroup: selectedGroup,
|
|
49997
|
+
onRevokeWidget: revokeWidget,
|
|
49998
|
+
onRevokeServer: revokeServer,
|
|
49999
|
+
onGrantManually: function onGrantManually(widgetId) {
|
|
50000
|
+
return setManualGrantWidgetId(widgetId);
|
|
50001
|
+
},
|
|
50002
|
+
onRevokePackage: revokePackage
|
|
50003
|
+
});
|
|
50004
|
+
}
|
|
49944
50005
|
return /*#__PURE__*/jsxs("div", {
|
|
49945
50006
|
className: "flex flex-col flex-1 min-h-0",
|
|
49946
50007
|
children: [/*#__PURE__*/jsxs("div", {
|
|
49947
|
-
className: "flex-shrink-0 flex flex-col space-y-
|
|
49948
|
-
children: [/*#__PURE__*/
|
|
49949
|
-
|
|
49950
|
-
|
|
49951
|
-
|
|
49952
|
-
|
|
49953
|
-
|
|
49954
|
-
|
|
49955
|
-
children: "Granting access here is a trust signal about the widget \u2014 not a per-dashboard switch."
|
|
49956
|
-
})]
|
|
49957
|
-
}), /*#__PURE__*/jsx(EnforcementToggles, {}), /*#__PURE__*/jsx(HowThisWorksPanel, {}), error && /*#__PURE__*/jsx("div", {
|
|
50008
|
+
className: "flex-shrink-0 flex flex-col space-y-2 px-6 pt-6 pb-3 border-b border-gray-800",
|
|
50009
|
+
children: [/*#__PURE__*/jsx(SubHeading3, {
|
|
50010
|
+
title: "Widget MCP permissions",
|
|
50011
|
+
padding: false
|
|
50012
|
+
}), /*#__PURE__*/jsx("span", {
|
|
50013
|
+
className: "text-xs opacity-60",
|
|
50014
|
+
children: "Granting access here is a trust signal about the widget \u2014 not a per-dashboard switch."
|
|
50015
|
+
}), error && /*#__PURE__*/jsx("div", {
|
|
49958
50016
|
className: "text-xs text-red-400 bg-red-900 bg-opacity-20 border border-red-700 rounded p-3",
|
|
49959
50017
|
children: error
|
|
49960
50018
|
})]
|
|
49961
50019
|
}), /*#__PURE__*/jsx(SectionLayout, {
|
|
49962
50020
|
listContent: listContent,
|
|
49963
50021
|
detailContent: detailContent,
|
|
49964
|
-
emptyDetailMessage: "Select
|
|
50022
|
+
emptyDetailMessage: "Select an item from the sidebar"
|
|
49965
50023
|
}), /*#__PURE__*/jsx(GrantManuallyModal, {
|
|
49966
50024
|
isOpen: !!manualGrantWidgetId,
|
|
49967
50025
|
setIsOpen: function setIsOpen(open) {
|