@trops/dash-core 0.1.537 → 0.1.538
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 +6 -21
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55429,17 +55429,17 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
55429
55429
|
setBusy = _useState8[1];
|
|
55430
55430
|
|
|
55431
55431
|
// Build the set of widget identifiers in this workspace. Walk every
|
|
55432
|
-
// layout location (main, pages, sidebar)
|
|
55433
|
-
//
|
|
55434
|
-
//
|
|
55432
|
+
// layout location (main, pages, sidebar). `pickWidgetRef` returns
|
|
55433
|
+
// the dotted scoped id string (`scope.package.component`) — exactly
|
|
55434
|
+
// what the runtime grant store keys grants under, so we can join
|
|
55435
|
+
// directly against `widgetMcp.listAll` without further translation.
|
|
55435
55436
|
var dashboardWidgetIds = React.useMemo(function () {
|
|
55436
55437
|
var ids = new Set();
|
|
55437
55438
|
if (!workspace) return ids;
|
|
55438
55439
|
forEachWidget(workspace, function (w) {
|
|
55439
55440
|
if (!isUserWidget(w)) return;
|
|
55440
|
-
var
|
|
55441
|
-
|
|
55442
|
-
if (dottedId) ids.add(dottedId);
|
|
55441
|
+
var dottedId = pickWidgetRef(w);
|
|
55442
|
+
if (typeof dottedId === "string" && dottedId) ids.add(dottedId);
|
|
55443
55443
|
});
|
|
55444
55444
|
return ids;
|
|
55445
55445
|
}, [workspace]);
|
|
@@ -55989,21 +55989,6 @@ var PermissionsTab = function PermissionsTab(_ref) {
|
|
|
55989
55989
|
});
|
|
55990
55990
|
};
|
|
55991
55991
|
|
|
55992
|
-
/**
|
|
55993
|
-
* Construct the dotted scoped widget id used by the grant store
|
|
55994
|
-
* (`<scope>.<package>.<component>`). Mirrors WidgetsTab's buildScopedId
|
|
55995
|
-
* so this tab joins against the same key the runtime gate writes
|
|
55996
|
-
* grants under.
|
|
55997
|
-
*/
|
|
55998
|
-
function buildDottedId(ref) {
|
|
55999
|
-
if (!(ref !== null && ref !== void 0 && ref.component)) return null;
|
|
56000
|
-
var scope = ref.scope ? String(ref.scope).replace(/^@/, "") : null;
|
|
56001
|
-
var pkg = ref.packageName ? scope ? String(ref.packageName).replace(new RegExp("^@?".concat(scope, "/")), "") : String(ref.packageName).replace(/^@/, "") : null;
|
|
56002
|
-
if (scope && pkg) return "".concat(scope, ".").concat(pkg, ".").concat(ref.component);
|
|
56003
|
-
if (pkg) return "".concat(pkg, ".").concat(ref.component);
|
|
56004
|
-
return ref.component;
|
|
56005
|
-
}
|
|
56006
|
-
|
|
56007
55992
|
function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(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; } } }; }
|
|
56008
55993
|
function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
|
|
56009
55994
|
function _arrayLikeToArray$6(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; }
|