@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.js
CHANGED
|
@@ -728,6 +728,17 @@ function getIconComponent(icon) {
|
|
|
728
728
|
}
|
|
729
729
|
function NavMain({ items }) {
|
|
730
730
|
const pathname = usePathname();
|
|
731
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
732
|
+
console.log("[NavMain] Received items:", {
|
|
733
|
+
itemsCount: items.length,
|
|
734
|
+
items: items.map((item) => ({
|
|
735
|
+
title: item.title,
|
|
736
|
+
url: item.url,
|
|
737
|
+
icon: item.icon,
|
|
738
|
+
hasSubItems: !!(item.items && item.items.length > 0)
|
|
739
|
+
}))
|
|
740
|
+
});
|
|
741
|
+
}
|
|
731
742
|
const groups = [];
|
|
732
743
|
let currentGroup = {
|
|
733
744
|
items: []
|
|
@@ -755,6 +766,16 @@ function NavMain({ items }) {
|
|
|
755
766
|
if (currentGroup.items.length > 0 || currentGroup.label) {
|
|
756
767
|
groups.push(currentGroup);
|
|
757
768
|
}
|
|
769
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
770
|
+
console.log("[NavMain] Groups:", {
|
|
771
|
+
groupsCount: groups.length,
|
|
772
|
+
groups: groups.map((group) => ({
|
|
773
|
+
hasLabel: !!group.label,
|
|
774
|
+
itemsCount: group.items.length,
|
|
775
|
+
items: group.items.map((item) => item.title)
|
|
776
|
+
}))
|
|
777
|
+
});
|
|
778
|
+
}
|
|
758
779
|
return /* @__PURE__ */ jsx(Fragment, { children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(SidebarGroup, { children: [
|
|
759
780
|
group.label && /* @__PURE__ */ jsxs(SidebarGroupLabel, { children: [
|
|
760
781
|
group.label.icon && /* @__PURE__ */ jsx(group.label.icon, { className: "mr-2" }),
|
|
@@ -1343,18 +1364,6 @@ function AppSidebar({
|
|
|
1343
1364
|
}, [currentPathname, pathOrgId, organizationId, detectedOrgId, apiBaseUrl, apiNavigationItems, apiOrganizations, navigationLoading, navigationError]);
|
|
1344
1365
|
const user = navigationUser || userProp;
|
|
1345
1366
|
const currentOrgId = organizationId || (pathOrgId && (apiOrganizations.length === 0 || apiOrganizations.some((org) => org.id === pathOrgId)) ? pathOrgId : void 0) || (detectedOrgId && apiNavigationItems.length > 0 ? detectedOrgId : void 0);
|
|
1346
|
-
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1347
|
-
console.log("[AppSidebar] currentOrgId calculation:", {
|
|
1348
|
-
"organizationId prop": organizationId,
|
|
1349
|
-
"pathOrgId": pathOrgId,
|
|
1350
|
-
"detectedOrgId": detectedOrgId,
|
|
1351
|
-
"apiOrganizations.length": apiOrganizations.length,
|
|
1352
|
-
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1353
|
-
"pathOrgIdInList": pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false,
|
|
1354
|
-
"FINAL currentOrgId": currentOrgId,
|
|
1355
|
-
"willDisplayItems": !!currentOrgId && apiNavigationItems.length > 0
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
1367
|
let navigationItems = apiNavigationItems;
|
|
1359
1368
|
if (currentOrgId && navigationItems.length > 0) {
|
|
1360
1369
|
navigationItems = navigationItems.map((item) => ({
|
|
@@ -1367,6 +1376,22 @@ function AppSidebar({
|
|
|
1367
1376
|
}));
|
|
1368
1377
|
}
|
|
1369
1378
|
const displayNavigationItems = currentOrgId ? navigationItems : [];
|
|
1379
|
+
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
1380
|
+
console.log("[AppSidebar] currentOrgId calculation:", {
|
|
1381
|
+
"organizationId prop": organizationId,
|
|
1382
|
+
"pathOrgId": pathOrgId,
|
|
1383
|
+
"detectedOrgId": detectedOrgId,
|
|
1384
|
+
"apiOrganizations.length": apiOrganizations.length,
|
|
1385
|
+
"apiNavigationItems.length": apiNavigationItems.length,
|
|
1386
|
+
"pathOrgIdInList": pathOrgId ? apiOrganizations.some((org) => org.id === pathOrgId) : false,
|
|
1387
|
+
"FINAL currentOrgId": currentOrgId,
|
|
1388
|
+
"navigationItems.length": navigationItems.length,
|
|
1389
|
+
"displayNavigationItems.length": displayNavigationItems.length,
|
|
1390
|
+
"willDisplayItems": displayNavigationItems.length > 0
|
|
1391
|
+
});
|
|
1392
|
+
console.log("[AppSidebar] FINAL currentOrgId:", currentOrgId);
|
|
1393
|
+
console.log("[AppSidebar] displayNavigationItems.length:", displayNavigationItems.length);
|
|
1394
|
+
}
|
|
1370
1395
|
return /* @__PURE__ */ jsxs(Sidebar, { collapsible: "icon", ...props, children: [
|
|
1371
1396
|
/* @__PURE__ */ jsx(SidebarHeader, { children: /* @__PURE__ */ jsx(
|
|
1372
1397
|
TeamSwitcher,
|