@logickernel/bridge 0.9.5 → 0.9.7
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/next/components.cjs
CHANGED
|
@@ -757,6 +757,17 @@ function getIconComponent(icon) {
|
|
|
757
757
|
}
|
|
758
758
|
function NavMain({ items }) {
|
|
759
759
|
const pathname = navigation.usePathname();
|
|
760
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
761
|
+
console.log("[NavMain] Received items:", {
|
|
762
|
+
itemsCount: items.length,
|
|
763
|
+
items: items.map((item) => ({
|
|
764
|
+
title: item.title,
|
|
765
|
+
url: item.url,
|
|
766
|
+
icon: item.icon,
|
|
767
|
+
hasSubItems: !!(item.items && item.items.length > 0)
|
|
768
|
+
}))
|
|
769
|
+
});
|
|
770
|
+
}
|
|
760
771
|
const groups = [];
|
|
761
772
|
let currentGroup = {
|
|
762
773
|
items: []
|
|
@@ -784,6 +795,16 @@ function NavMain({ items }) {
|
|
|
784
795
|
if (currentGroup.items.length > 0 || currentGroup.label) {
|
|
785
796
|
groups.push(currentGroup);
|
|
786
797
|
}
|
|
798
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
799
|
+
console.log("[NavMain] Groups:", {
|
|
800
|
+
groupsCount: groups.length,
|
|
801
|
+
groups: groups.map((group) => ({
|
|
802
|
+
hasLabel: !!group.label,
|
|
803
|
+
itemsCount: group.items.length,
|
|
804
|
+
items: group.items.map((item) => item.title)
|
|
805
|
+
}))
|
|
806
|
+
});
|
|
807
|
+
}
|
|
787
808
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroup, { children: [
|
|
788
809
|
group.label && /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroupLabel, { children: [
|
|
789
810
|
group.label.icon && /* @__PURE__ */ jsxRuntime.jsx(group.label.icon, { className: "mr-2" }),
|
|
@@ -1372,18 +1393,6 @@ function AppSidebar({
|
|
|
1372
1393
|
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems, apiOrganizations, navigationLoading, navigationError]);
|
|
1373
1394
|
const user = navigationUser || userProp;
|
|
1374
1395
|
const currentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1375
|
-
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1376
|
-
console.log("[AppSidebar] currentOrgId calculation:", {
|
|
1377
|
-
"organizationId prop": organizationId,
|
|
1378
|
-
"pathOrgId": pathOrgId,
|
|
1379
|
-
"detectedOrgId": detectedOrgId,
|
|
1380
|
-
"apiOrganizations.length": apiOrganizations.length,
|
|
1381
|
-
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1382
|
-
"pathOrgIdInList": pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false,
|
|
1383
|
-
"FINAL currentOrgId": currentOrgId,
|
|
1384
|
-
"willDisplayItems": !!currentOrgId && apiNavigationItems.length > 0
|
|
1385
|
-
});
|
|
1386
|
-
}
|
|
1387
1396
|
let navigationItems = apiNavigationItems;
|
|
1388
1397
|
if (currentOrgId && navigationItems.length > 0) {
|
|
1389
1398
|
navigationItems = navigationItems.map((item) => ({
|
|
@@ -1396,6 +1405,22 @@ function AppSidebar({
|
|
|
1396
1405
|
}));
|
|
1397
1406
|
}
|
|
1398
1407
|
const displayNavigationItems = currentOrgId ? navigationItems : [];
|
|
1408
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1409
|
+
console.log("[AppSidebar] currentOrgId calculation:", {
|
|
1410
|
+
"organizationId prop": organizationId,
|
|
1411
|
+
"pathOrgId": pathOrgId,
|
|
1412
|
+
"detectedOrgId": detectedOrgId,
|
|
1413
|
+
"apiOrganizations.length": apiOrganizations.length,
|
|
1414
|
+
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1415
|
+
"pathOrgIdInList": pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false,
|
|
1416
|
+
"FINAL currentOrgId": currentOrgId,
|
|
1417
|
+
"navigationItems.length": navigationItems.length,
|
|
1418
|
+
"displayNavigationItems.length": displayNavigationItems.length,
|
|
1419
|
+
"willDisplayItems": displayNavigationItems.length > 0
|
|
1420
|
+
});
|
|
1421
|
+
console.log("[AppSidebar] FINAL currentOrgId:", currentOrgId);
|
|
1422
|
+
console.log("[AppSidebar] displayNavigationItems.length:", displayNavigationItems.length);
|
|
1423
|
+
}
|
|
1399
1424
|
return /* @__PURE__ */ jsxRuntime.jsxs(Sidebar, { collapsible: "icon", ...props, children: [
|
|
1400
1425
|
/* @__PURE__ */ jsxRuntime.jsx(SidebarHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1401
1426
|
TeamSwitcher,
|