@trops/dash-core 0.1.716 → 0.1.718
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 +7 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3335,12 +3335,16 @@ function useWidgetUpdates() {
|
|
|
3335
3335
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
3336
3336
|
updateError = _useState0[0],
|
|
3337
3337
|
setUpdateError = _useState0[1];
|
|
3338
|
+
// AppWrapper calls this hook (via useAppUpdates) from the component that
|
|
3339
|
+
// PROVIDES AppContext, so useContext comes back empty there. Fall back to
|
|
3340
|
+
// the context AppWrapper broadcasts on window when the check runs
|
|
3341
|
+
// (see computeBatchPreflight).
|
|
3342
|
+
var appProviders = ((_useContext = useContext(AppContext)) === null || _useContext === void 0 ? void 0 : _useContext.providers) || null;
|
|
3338
3343
|
// batchStatus tracks the per-package progress during an updatePackages
|
|
3339
3344
|
// run so the "Update all" modal can show pending/in-progress/done/failed
|
|
3340
3345
|
// pips next to each row. Cleared (Map -> empty) when isBatchUpdating
|
|
3341
3346
|
// flips back to false; consumers that want to keep showing a per-package
|
|
3342
3347
|
// result after the batch finished should snapshot it themselves.
|
|
3343
|
-
var appProviders = ((_useContext = useContext(AppContext)) === null || _useContext === void 0 ? void 0 : _useContext.providers) || null;
|
|
3344
3348
|
var _useState1 = useState(new Map()),
|
|
3345
3349
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
3346
3350
|
batchStatus = _useState10[0],
|
|
@@ -3974,7 +3978,7 @@ function useWidgetUpdates() {
|
|
|
3974
3978
|
_context5.prev = 8;
|
|
3975
3979
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
3976
3980
|
var _manifest$permissions, _manifest$permissions2;
|
|
3977
|
-
var _step5$value, packageId, manifest, declaredMcp, byComponent, pkgWidgets, _iterator6, _step6, _normalizeGrantsByPro, _byComponent$w$name, w, matchingRow, widgetId, grantedMcp, declaredForWidget, missingServers, _t6;
|
|
3981
|
+
var _step5$value, packageId, manifest, declaredMcp, byComponent, pkgWidgets, _iterator6, _step6, _normalizeGrantsByPro, _window$__dashAppCont, _byComponent$w$name, w, matchingRow, widgetId, grantedMcp, declaredForWidget, missingServers, _t6;
|
|
3978
3982
|
return _regeneratorRuntime.wrap(function (_context4) {
|
|
3979
3983
|
while (1) switch (_context4.prev = _context4.next) {
|
|
3980
3984
|
case 0:
|
|
@@ -4009,7 +4013,7 @@ function useWidgetUpdates() {
|
|
|
4009
4013
|
// declared permissions by provider type ("algolia"). Compare
|
|
4010
4014
|
// against a type-keyed copy; the original is what gets merged
|
|
4011
4015
|
// and saved back.
|
|
4012
|
-
grantedMcp = matchingRow ? ((_normalizeGrantsByPro = normalizeGrantsByProviderType([matchingRow], appProviders)[0]) === null || _normalizeGrantsByPro === void 0 || (_normalizeGrantsByPro = _normalizeGrantsByPro.granted) === null || _normalizeGrantsByPro === void 0 ? void 0 : _normalizeGrantsByPro.servers) || {} : {};
|
|
4016
|
+
grantedMcp = matchingRow ? ((_normalizeGrantsByPro = normalizeGrantsByProviderType([matchingRow], appProviders || ((_window$__dashAppCont = window.__dashAppContext) === null || _window$__dashAppCont === void 0 ? void 0 : _window$__dashAppCont.providers) || null)[0]) === null || _normalizeGrantsByPro === void 0 || (_normalizeGrantsByPro = _normalizeGrantsByPro.granted) === null || _normalizeGrantsByPro === void 0 ? void 0 : _normalizeGrantsByPro.servers) || {} : {};
|
|
4013
4017
|
declaredForWidget = byComponent ? ((_byComponent$w$name = byComponent[w.name]) === null || _byComponent$w$name === void 0 ? void 0 : _byComponent$w$name.servers) || {} : declaredMcp;
|
|
4014
4018
|
missingServers = diffMcpServers(declaredForWidget, grantedMcp);
|
|
4015
4019
|
if (!(Object.keys(missingServers).length === 0)) {
|
|
@@ -64038,14 +64042,6 @@ var DashboardsPage = function DashboardsPage(_ref5) {
|
|
|
64038
64042
|
}],
|
|
64039
64043
|
value: view,
|
|
64040
64044
|
onChange: setView
|
|
64041
|
-
}), /*#__PURE__*/jsx("span", {
|
|
64042
|
-
className: "flex-1"
|
|
64043
|
-
}), /*#__PURE__*/jsx(Button3, {
|
|
64044
|
-
title: "Browse marketplace",
|
|
64045
|
-
size: "sm",
|
|
64046
|
-
onClick: function onClick() {
|
|
64047
|
-
return setMode("marketplace");
|
|
64048
|
-
}
|
|
64049
64045
|
})]
|
|
64050
64046
|
}), /*#__PURE__*/jsxs("div", {
|
|
64051
64047
|
className: "flex-1 min-h-0 grid grid-cols-3 gap-4",
|