create-bw-app 0.17.0 → 0.18.0
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/package.json
CHANGED
package/src/constants.mjs
CHANGED
|
@@ -166,14 +166,14 @@ export const PLATFORM_STARTER_FILES = [
|
|
|
166
166
|
];
|
|
167
167
|
|
|
168
168
|
export const APP_DEPENDENCY_DEFAULTS = {
|
|
169
|
-
"@brightweblabs/app-shell": "^0.
|
|
169
|
+
"@brightweblabs/app-shell": "^0.7.0",
|
|
170
170
|
"@brightweblabs/core-auth": "^0.7.0",
|
|
171
171
|
"@brightweblabs/infra": "^0.4.0",
|
|
172
|
-
"@brightweblabs/module-admin": "^0.5.
|
|
173
|
-
"@brightweblabs/module-crm": "^0.9.
|
|
174
|
-
"@brightweblabs/module-marketing": "^0.2.
|
|
175
|
-
"@brightweblabs/module-orgs": "^0.3.
|
|
176
|
-
"@brightweblabs/module-projects": "^0.7.
|
|
172
|
+
"@brightweblabs/module-admin": "^0.5.6",
|
|
173
|
+
"@brightweblabs/module-crm": "^0.9.1",
|
|
174
|
+
"@brightweblabs/module-marketing": "^0.2.5",
|
|
175
|
+
"@brightweblabs/module-orgs": "^0.3.6",
|
|
176
|
+
"@brightweblabs/module-projects": "^0.7.1",
|
|
177
177
|
"@brightweblabs/theme": "^0.5.0",
|
|
178
178
|
"@brightweblabs/ui": "^1.1.1",
|
|
179
179
|
"geist": "1.7.2",
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { useMemo, type ReactNode } from "react";
|
|
4
4
|
import { usePathname, useRouter } from "next/navigation";
|
|
5
|
-
import { Users } from "lucide-react";
|
|
6
5
|
import {
|
|
7
6
|
AppHeader,
|
|
8
7
|
AppShellFrame,
|
|
9
8
|
DesktopSidebar,
|
|
10
9
|
MobileNav,
|
|
11
10
|
computeInitials,
|
|
12
|
-
getShellNavGroup,
|
|
13
11
|
useShellNavState,
|
|
14
|
-
type NavGroupConfig,
|
|
15
12
|
type ShellNavStateGroup,
|
|
16
13
|
} from "@brightweblabs/app-shell";
|
|
17
14
|
import { createAuthUiClient } from "@brightweblabs/core-auth/ui";
|
|
@@ -48,13 +45,6 @@ export function ShellLayoutClient({
|
|
|
48
45
|
);
|
|
49
46
|
const { isSidebarCollapsed, isGroupOpen, toggleGroup, toggleSidebar } =
|
|
50
47
|
useShellNavState({ pathname, groups: shellGroups });
|
|
51
|
-
const registeredCrmNavGroup = getShellNavGroup(config, "crm");
|
|
52
|
-
const crmNavGroup = registeredCrmNavGroup ?? ({
|
|
53
|
-
label: "CRM",
|
|
54
|
-
icon: Users,
|
|
55
|
-
children: [],
|
|
56
|
-
} satisfies NavGroupConfig);
|
|
57
|
-
const crmGroupKey = registeredCrmNavGroup?.key ?? "crm";
|
|
58
48
|
const isAdminSurface = pathname === "/admin" || pathname.startsWith("/admin/");
|
|
59
49
|
const isActive = (href: string) =>
|
|
60
50
|
pathname === href || (isAdminSurface && pathname.startsWith(`${href}/`));
|
|
@@ -75,17 +65,16 @@ export function ShellLayoutClient({
|
|
|
75
65
|
visiblePrimaryNav={config.primaryNav}
|
|
76
66
|
adminNavItem={viewer.isAdmin ? config.adminNavItem : null}
|
|
77
67
|
visibleToolNav={config.toolsSection.items}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
navGroups={config.moduleGroups}
|
|
69
|
+
isNavGroupExpanded={isGroupOpen}
|
|
70
|
+
isNavGroupActive={(group) => group.children.some(
|
|
81
71
|
(item) => pathname === item.href || pathname.startsWith(`${item.href}/`),
|
|
82
72
|
)}
|
|
83
73
|
isNavItemActive={isActive}
|
|
84
74
|
isToolLinkActive={isActive}
|
|
85
|
-
isCrmChildActive={isActive}
|
|
86
75
|
onToggleSidebar={toggleSidebar}
|
|
87
76
|
onToggleTools={() => toggleGroup(config.toolsSection.key)}
|
|
88
|
-
|
|
77
|
+
onToggleNavGroup={toggleGroup}
|
|
89
78
|
account={{
|
|
90
79
|
displayName,
|
|
91
80
|
isStaff: viewer.isStaff,
|