@trops/dash-core 0.1.517 → 0.1.518
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 +50 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +50 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49741,6 +49741,14 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
|
|
|
49741
49741
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
49742
49742
|
selectedPackageKey = _useState14[0],
|
|
49743
49743
|
setSelectedPackageKey = _useState14[1];
|
|
49744
|
+
// Two top-level tabs so the inline `HowThisWorksPanel` (which carries
|
|
49745
|
+
// example fixtures and is intentionally tall) doesn't push the
|
|
49746
|
+
// package list/detail below the viewport. "permissions" is the
|
|
49747
|
+
// default and contains the actual UI users came here to use.
|
|
49748
|
+
var _useState15 = React.useState("permissions"),
|
|
49749
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
49750
|
+
activeTab = _useState16[0],
|
|
49751
|
+
setActiveTab = _useState16[1];
|
|
49744
49752
|
var reload = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
49745
49753
|
var _api$widgetMcp, api, result, _t;
|
|
49746
49754
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
@@ -49962,7 +49970,7 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
|
|
|
49962
49970
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49963
49971
|
className: "flex flex-col flex-1 min-h-0",
|
|
49964
49972
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49965
|
-
className: "flex-shrink-0 flex flex-col space-y-
|
|
49973
|
+
className: "flex-shrink-0 flex flex-col space-y-3 px-6 pt-6 pb-3 border-b border-gray-800",
|
|
49966
49974
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49967
49975
|
className: "flex flex-col space-y-2",
|
|
49968
49976
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
|
|
@@ -49972,14 +49980,38 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
|
|
|
49972
49980
|
className: "text-xs opacity-60",
|
|
49973
49981
|
children: "Granting access here is a trust signal about the widget \u2014 not a per-dashboard switch."
|
|
49974
49982
|
})]
|
|
49975
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
49983
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Tabs3, {
|
|
49984
|
+
value: activeTab,
|
|
49985
|
+
onValueChange: setActiveTab,
|
|
49986
|
+
backgroundColor: "bg-transparent",
|
|
49987
|
+
spacing: "p-0",
|
|
49988
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(DashReact.Tabs3.List, {
|
|
49989
|
+
spacing: "p-0.5",
|
|
49990
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Tabs3.Trigger, {
|
|
49991
|
+
value: "permissions",
|
|
49992
|
+
children: "Permissions"
|
|
49993
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Tabs3.Trigger, {
|
|
49994
|
+
value: "help",
|
|
49995
|
+
children: "Help"
|
|
49996
|
+
})]
|
|
49997
|
+
})
|
|
49998
|
+
}), error && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49976
49999
|
className: "text-xs text-red-400 bg-red-900 bg-opacity-20 border border-red-700 rounded p-3",
|
|
49977
50000
|
children: error
|
|
49978
50001
|
})]
|
|
49979
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
49980
|
-
|
|
49981
|
-
|
|
49982
|
-
|
|
50002
|
+
}), activeTab === "permissions" ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
50003
|
+
className: "flex flex-col flex-1 min-h-0",
|
|
50004
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
50005
|
+
className: "flex-shrink-0 px-6 py-4 border-b border-gray-800",
|
|
50006
|
+
children: /*#__PURE__*/jsxRuntime.jsx(EnforcementToggles, {})
|
|
50007
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SectionLayout, {
|
|
50008
|
+
listContent: listContent,
|
|
50009
|
+
detailContent: detailContent,
|
|
50010
|
+
emptyDetailMessage: "Select a package to view its grants"
|
|
50011
|
+
})]
|
|
50012
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
50013
|
+
className: "flex-1 overflow-y-auto p-6",
|
|
50014
|
+
children: /*#__PURE__*/jsxRuntime.jsx(HowThisWorksPanel, {})
|
|
49983
50015
|
}), /*#__PURE__*/jsxRuntime.jsx(GrantManuallyModal, {
|
|
49984
50016
|
isOpen: !!manualGrantWidgetId,
|
|
49985
50017
|
setIsOpen: function setIsOpen(open) {
|
|
@@ -50016,19 +50048,19 @@ var EnforcementToggles = function EnforcementToggles() {
|
|
|
50016
50048
|
// pendingDisable: { flag: 'enforce' | 'jit' } | null
|
|
50017
50049
|
// When the user toggles a flag from ON → OFF, we open a confirm modal
|
|
50018
50050
|
// before persisting. ON → ON or OFF → ON go through immediately.
|
|
50019
|
-
var
|
|
50020
|
-
|
|
50021
|
-
pendingDisable =
|
|
50022
|
-
setPendingDisable =
|
|
50051
|
+
var _useState17 = React.useState(null),
|
|
50052
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
50053
|
+
pendingDisable = _useState18[0],
|
|
50054
|
+
setPendingDisable = _useState18[1];
|
|
50023
50055
|
|
|
50024
50056
|
// lastTestResult: feedback for the "Test prompt" button. Tells the
|
|
50025
50057
|
// user whether their JIT response was actually persisted, so they
|
|
50026
50058
|
// don't have to interpret the post-grant "server not connected"
|
|
50027
50059
|
// error as failure.
|
|
50028
|
-
var
|
|
50029
|
-
|
|
50030
|
-
lastTestResult =
|
|
50031
|
-
setLastTestResult =
|
|
50060
|
+
var _useState19 = React.useState(null),
|
|
50061
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
50062
|
+
lastTestResult = _useState20[0],
|
|
50063
|
+
setLastTestResult = _useState20[1];
|
|
50032
50064
|
|
|
50033
50065
|
// Auto-clear the test result after 30 seconds so it doesn't linger
|
|
50034
50066
|
// forever after a successful test.
|
|
@@ -50429,10 +50461,10 @@ var noop = function noop() {};
|
|
|
50429
50461
|
* users who don't want the wall of text collapse manually.
|
|
50430
50462
|
*/
|
|
50431
50463
|
var HowThisWorksPanel = function HowThisWorksPanel() {
|
|
50432
|
-
var
|
|
50433
|
-
|
|
50434
|
-
open =
|
|
50435
|
-
setOpen =
|
|
50464
|
+
var _useState21 = React.useState(true),
|
|
50465
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
50466
|
+
open = _useState22[0],
|
|
50467
|
+
setOpen = _useState22[1];
|
|
50436
50468
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
50437
50469
|
className: "border border-gray-700 rounded",
|
|
50438
50470
|
children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
|