@logickernel/bridge 0.11.3 → 0.11.5
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,14 @@ function getIconComponent(icon) {
|
|
|
757
757
|
function NavMain({ items }) {
|
|
758
758
|
const pathname = navigation.usePathname();
|
|
759
759
|
const { isMobile, setOpenMobile } = useSidebar();
|
|
760
|
+
const isCrossAppPath = (url) => {
|
|
761
|
+
return url.startsWith("/core") || url.startsWith("/aura");
|
|
762
|
+
};
|
|
763
|
+
const handleClick = () => {
|
|
764
|
+
if (isMobile) {
|
|
765
|
+
setOpenMobile(false);
|
|
766
|
+
}
|
|
767
|
+
};
|
|
760
768
|
if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
|
|
761
769
|
console.log("[NavMain] Received items:", {
|
|
762
770
|
itemsCount: items.length,
|
|
@@ -856,44 +864,41 @@ function NavMain({ items }) {
|
|
|
856
864
|
]
|
|
857
865
|
}
|
|
858
866
|
) }),
|
|
859
|
-
/* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSub, { children: item.items?.map((subItem) =>
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
href: subItem.url,
|
|
863
|
-
onClick: () => {
|
|
864
|
-
if (isMobile) {
|
|
865
|
-
setOpenMobile(false);
|
|
866
|
-
}
|
|
867
|
-
},
|
|
868
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title })
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSub, { children: item.items?.map((subItem) => {
|
|
868
|
+
if (isCrossAppPath(subItem.url)) {
|
|
869
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: subItem.url, onClick: handleClick, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title }) }) }) }, subItem.title);
|
|
869
870
|
}
|
|
870
|
-
|
|
871
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: subItem.url, onClick: handleClick, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title }) }) }) }, subItem.title);
|
|
872
|
+
}) }) })
|
|
871
873
|
] })
|
|
872
874
|
},
|
|
873
875
|
item.title
|
|
874
876
|
);
|
|
875
877
|
}
|
|
878
|
+
if (isCrossAppPath(item.url)) {
|
|
879
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
880
|
+
SidebarMenuButton,
|
|
881
|
+
{
|
|
882
|
+
asChild: true,
|
|
883
|
+
tooltip: item.title,
|
|
884
|
+
isActive,
|
|
885
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: item.url, onClick: handleClick, children: [
|
|
886
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
|
|
887
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title })
|
|
888
|
+
] })
|
|
889
|
+
}
|
|
890
|
+
) }, item.title);
|
|
891
|
+
}
|
|
876
892
|
return /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
877
893
|
SidebarMenuButton,
|
|
878
894
|
{
|
|
879
895
|
asChild: true,
|
|
880
896
|
tooltip: item.title,
|
|
881
897
|
isActive,
|
|
882
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
883
|
-
|
|
884
|
-
{
|
|
885
|
-
|
|
886
|
-
onClick: () => {
|
|
887
|
-
if (isMobile) {
|
|
888
|
-
setOpenMobile(false);
|
|
889
|
-
}
|
|
890
|
-
},
|
|
891
|
-
children: [
|
|
892
|
-
item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
|
|
893
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title })
|
|
894
|
-
]
|
|
895
|
-
}
|
|
896
|
-
)
|
|
898
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: item.url, onClick: handleClick, children: [
|
|
899
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
|
|
900
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title })
|
|
901
|
+
] })
|
|
897
902
|
}
|
|
898
903
|
) }, item.title);
|
|
899
904
|
}) })
|