@burdenoff/microfe-store 2026.805.1 → 2026.819.1
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/StoreAdminRoutes.js +27 -27
- package/dist/StoreRoot.js +78 -45
- package/dist/StoreRoot.js.map +1 -1
- package/dist/StoreRoutes.js +163 -85
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/components/sourcing/SourcingConfirmationDialog.d.ts +15 -0
- package/dist/components/sourcing/SourcingConfirmationDialog.js +61 -0
- package/dist/components/sourcing/SourcingConfirmationDialog.js.map +1 -0
- package/dist/components/sourcing/SourcingUi.d.ts +51 -0
- package/dist/components/sourcing/SourcingUi.js +176 -0
- package/dist/components/sourcing/SourcingUi.js.map +1 -0
- package/dist/generated/global-operations.d.ts +713 -0
- package/dist/generated/global-operations.js +557 -175
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +2152 -2159
- package/dist/generated/global-types.js +8 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/hooks/useBackendCart.js +17 -17
- package/dist/hooks/useInstallations.js +32 -32
- package/dist/hooks/useOrders.js +7 -7
- package/dist/hooks/useSourcing.d.ts +319 -0
- package/dist/hooks/useSourcing.js +87 -0
- package/dist/hooks/useSourcing.js.map +1 -0
- package/dist/hooks/useStoreGraphQL.js +163 -163
- package/dist/index.js +12 -12
- package/dist/pages/AdminDashboardPage.js +132 -132
- package/dist/pages/AdminReviewModerationPage.js +55 -55
- package/dist/pages/AdminStoresPage.js +95 -95
- package/dist/pages/AdminSubmissionsQueuePage.js +297 -297
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/AppDetailPage.js +65 -65
- package/dist/pages/AppSettingsPage.js +32 -32
- package/dist/pages/CartPage.js +66 -66
- package/dist/pages/CreateSourcingRequestPage.d.ts +3 -0
- package/dist/pages/CreateSourcingRequestPage.js +439 -0
- package/dist/pages/CreateSourcingRequestPage.js.map +1 -0
- package/dist/pages/InstalledAppsPage.js +15 -15
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/MarketplaceHomePage.js +384 -384
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/MyLicensesPage.js +39 -39
- package/dist/pages/OrderConfirmationPage.js +57 -57
- package/dist/pages/OrdersPage.js +3 -3
- package/dist/pages/OrdersPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +6 -6
- package/dist/pages/SellerSourcingOffersPage.d.ts +3 -0
- package/dist/pages/SellerSourcingOffersPage.js +284 -0
- package/dist/pages/SellerSourcingOffersPage.js.map +1 -0
- package/dist/pages/SellerSourcingOpportunitiesPage.d.ts +3 -0
- package/dist/pages/SellerSourcingOpportunitiesPage.js +272 -0
- package/dist/pages/SellerSourcingOpportunitiesPage.js.map +1 -0
- package/dist/pages/SellerSourcingOpportunityDetailPage.d.ts +3 -0
- package/dist/pages/SellerSourcingOpportunityDetailPage.js +465 -0
- package/dist/pages/SellerSourcingOpportunityDetailPage.js.map +1 -0
- package/dist/pages/SourcingRequestDetailPage.d.ts +3 -0
- package/dist/pages/SourcingRequestDetailPage.js +447 -0
- package/dist/pages/SourcingRequestDetailPage.js.map +1 -0
- package/dist/pages/SourcingRequestsPage.d.ts +3 -0
- package/dist/pages/SourcingRequestsPage.js +272 -0
- package/dist/pages/SourcingRequestsPage.js.map +1 -0
- package/dist/providers/SourcingAccessProvider.d.ts +21 -0
- package/dist/providers/SourcingAccessProvider.js +95 -0
- package/dist/providers/SourcingAccessProvider.js.map +1 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +3 -0
- package/dist/translations/en.js.map +1 -1
- package/package.json +1 -1
package/dist/StoreAdminRoutes.js
CHANGED
|
@@ -2,62 +2,62 @@ import { STORE_PERMISSIONS as e, useStorePermissions as t } from "./hooks/useSto
|
|
|
2
2
|
import { PermissionGuard as n } from "./components/PermissionGuard.js";
|
|
3
3
|
import { PageLoadingFallback as r } from "./components/RouteGuards.js";
|
|
4
4
|
import { Suspense as i, lazy as a } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Navigate as o, Route as s, Routes as c } from "react-router";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
//#region src/StoreAdminRoutes.tsx
|
|
8
8
|
var d = a(() => import("./pages/AdminDashboardPage.js").then((e) => ({ default: e.AdminDashboardPage }))), f = a(() => import("./pages/AdminSubmissionsQueuePage.js").then((e) => ({ default: e.AdminSubmissionsQueuePage }))), p = a(() => import("./pages/AdminStoresPage.js").then((e) => ({ default: e.AdminStoresPage }))), m = a(() => import("./pages/AdminReviewModerationPage.js").then((e) => ({ default: e.AdminReviewModerationPage }))), h = () => {
|
|
9
9
|
let { hasPermission: a } = t(), h = a(e.REVIEW_ADMIN) || a(e.PRODUCT_ADMIN);
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ u(c, { children: [
|
|
11
|
+
/* @__PURE__ */ l(s, {
|
|
12
12
|
index: !0,
|
|
13
|
-
element: /* @__PURE__ */ o
|
|
13
|
+
element: /* @__PURE__ */ l(o, {
|
|
14
14
|
to: "dashboard",
|
|
15
15
|
replace: !0
|
|
16
16
|
})
|
|
17
17
|
}),
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ l(s, {
|
|
19
19
|
path: "dashboard",
|
|
20
|
-
element: /* @__PURE__ */
|
|
20
|
+
element: /* @__PURE__ */ l(n, {
|
|
21
21
|
allowed: h,
|
|
22
|
-
children: /* @__PURE__ */
|
|
23
|
-
fallback: /* @__PURE__ */
|
|
24
|
-
children: /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ l(i, {
|
|
23
|
+
fallback: /* @__PURE__ */ l(r, {}),
|
|
24
|
+
children: /* @__PURE__ */ l(d, {})
|
|
25
25
|
})
|
|
26
26
|
})
|
|
27
27
|
}),
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ l(s, {
|
|
29
29
|
path: "submissions",
|
|
30
|
-
element: /* @__PURE__ */
|
|
30
|
+
element: /* @__PURE__ */ l(n, {
|
|
31
31
|
allowed: h,
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
fallback: /* @__PURE__ */
|
|
34
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ l(i, {
|
|
33
|
+
fallback: /* @__PURE__ */ l(r, {}),
|
|
34
|
+
children: /* @__PURE__ */ l(f, {})
|
|
35
35
|
})
|
|
36
36
|
})
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ l(s, {
|
|
39
39
|
path: "stores",
|
|
40
|
-
element: /* @__PURE__ */
|
|
40
|
+
element: /* @__PURE__ */ l(n, {
|
|
41
41
|
allowed: h,
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
fallback: /* @__PURE__ */
|
|
44
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ l(i, {
|
|
43
|
+
fallback: /* @__PURE__ */ l(r, {}),
|
|
44
|
+
children: /* @__PURE__ */ l(p, {})
|
|
45
45
|
})
|
|
46
46
|
})
|
|
47
47
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ l(s, {
|
|
49
49
|
path: "reviews",
|
|
50
|
-
element: /* @__PURE__ */
|
|
50
|
+
element: /* @__PURE__ */ l(n, {
|
|
51
51
|
allowed: a(e.REVIEW_ADMIN),
|
|
52
|
-
children: /* @__PURE__ */
|
|
53
|
-
fallback: /* @__PURE__ */
|
|
54
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ l(i, {
|
|
53
|
+
fallback: /* @__PURE__ */ l(r, {}),
|
|
54
|
+
children: /* @__PURE__ */ l(m, {})
|
|
55
55
|
})
|
|
56
56
|
})
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ l(s, {
|
|
59
59
|
path: "*",
|
|
60
|
-
element: /* @__PURE__ */ o
|
|
60
|
+
element: /* @__PURE__ */ l(o, {
|
|
61
61
|
to: "dashboard",
|
|
62
62
|
replace: !0
|
|
63
63
|
})
|
package/dist/StoreRoot.js
CHANGED
|
@@ -1,96 +1,129 @@
|
|
|
1
|
-
import { StoreProvider as e } from "./providers/StoreProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { StoreProvider as e, useStore as t } from "./providers/StoreProvider.js";
|
|
2
|
+
import { PublisherSourcingAccessProvider as n, usePublisherSourcingAccess as r } from "./providers/SourcingAccessProvider.js";
|
|
3
|
+
import { StoreRoutes as i } from "./StoreRoutes.js";
|
|
4
|
+
import { useCart as a } from "./hooks/useCart.js";
|
|
5
|
+
import { useEffect as o, useMemo as s } from "react";
|
|
6
|
+
import { useLocation as c } from "react-router";
|
|
7
|
+
import { ErrorBoundary as l } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { FeatureFlagProvider as u } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
9
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { Key as f, Package as p, PackageSearch as m, Receipt as h, ShoppingBag as g, ShoppingCart as _, TicketCheck as v } from "lucide-react";
|
|
11
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
10
12
|
//#region src/StoreRoot.tsx
|
|
11
|
-
var
|
|
12
|
-
let { t: n } =
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
var b = (t) => {
|
|
14
|
+
let { t: n } = d();
|
|
15
|
+
return /* @__PURE__ */ y(u, {
|
|
14
16
|
workspaceId: t.workspaceId ?? null,
|
|
15
17
|
gateway: "global",
|
|
16
18
|
defaultEnabled: !0,
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
fallback: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ y(l, {
|
|
20
|
+
fallback: /* @__PURE__ */ y("div", {
|
|
19
21
|
className: "p-6 text-center text-text-secondary",
|
|
20
22
|
children: n("common.moduleLoadError", { defaultValue: "Something went wrong loading this module. Please refresh the page." })
|
|
21
23
|
}),
|
|
22
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ y(e, {
|
|
23
25
|
...t,
|
|
24
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ y(x, { children: /* @__PURE__ */ y(S, { ...t }) })
|
|
25
27
|
})
|
|
26
28
|
})
|
|
27
29
|
});
|
|
28
|
-
},
|
|
29
|
-
let {
|
|
30
|
-
|
|
30
|
+
}, x = ({ children: e }) => {
|
|
31
|
+
let { user: r, authToken: i } = t(), { pathname: a } = c(), o = a.includes("/publisher/sourcing/opportunities/");
|
|
32
|
+
return /* @__PURE__ */ y(n, {
|
|
33
|
+
enabled: !!(r?.id || i),
|
|
34
|
+
includeProducts: o,
|
|
35
|
+
children: e
|
|
36
|
+
});
|
|
37
|
+
}, S = ({ registerNavItems: e, registerFooterItems: t, basePath: n = "/" }) => {
|
|
38
|
+
let { itemCount: c } = a(), { profile: l } = r(), { t: u } = d();
|
|
39
|
+
o(() => {
|
|
31
40
|
if (!e) return;
|
|
32
41
|
let t = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
33
42
|
return e([
|
|
34
43
|
{
|
|
35
44
|
id: "store-marketplace",
|
|
36
|
-
label:
|
|
37
|
-
path: t(
|
|
38
|
-
icon: /* @__PURE__ */
|
|
45
|
+
label: u("nav.marketplace", { defaultValue: "Marketplace" }),
|
|
46
|
+
path: t(n, "marketplace"),
|
|
47
|
+
icon: /* @__PURE__ */ y(g, { size: 20 }),
|
|
39
48
|
order: 10,
|
|
40
49
|
group: "store"
|
|
41
50
|
},
|
|
42
51
|
{
|
|
43
52
|
id: "store-cart",
|
|
44
|
-
label:
|
|
45
|
-
path: t(
|
|
46
|
-
icon: /* @__PURE__ */
|
|
47
|
-
badge:
|
|
53
|
+
label: u("nav.cart", { defaultValue: "Cart" }),
|
|
54
|
+
path: t(n, "cart"),
|
|
55
|
+
icon: /* @__PURE__ */ y(_, { size: 20 }),
|
|
56
|
+
badge: c > 0 ? c : void 0,
|
|
48
57
|
order: 20,
|
|
49
58
|
group: "store"
|
|
50
59
|
},
|
|
51
60
|
{
|
|
52
61
|
id: "store-orders",
|
|
53
|
-
label:
|
|
54
|
-
path: t(
|
|
55
|
-
icon: /* @__PURE__ */
|
|
62
|
+
label: u("nav.orders", { defaultValue: "My Orders" }),
|
|
63
|
+
path: t(n, "orders"),
|
|
64
|
+
icon: /* @__PURE__ */ y(h, { size: 20 }),
|
|
56
65
|
order: 30,
|
|
57
66
|
group: "store"
|
|
58
67
|
},
|
|
68
|
+
{
|
|
69
|
+
id: "store-sourcing-requests",
|
|
70
|
+
label: u("nav.sourcingRequests", { defaultValue: "Sourcing requests" }),
|
|
71
|
+
path: t(n, "sourcing/requests"),
|
|
72
|
+
icon: /* @__PURE__ */ y(m, { size: 20 }),
|
|
73
|
+
order: 35,
|
|
74
|
+
group: "store"
|
|
75
|
+
},
|
|
76
|
+
...l ? [{
|
|
77
|
+
id: "store-sourcing-opportunities",
|
|
78
|
+
label: u("nav.sourcingOpportunities", { defaultValue: "Sourcing opportunities" }),
|
|
79
|
+
path: t(n, "publisher/sourcing/opportunities"),
|
|
80
|
+
icon: /* @__PURE__ */ y(m, { size: 20 }),
|
|
81
|
+
order: 36,
|
|
82
|
+
group: "store"
|
|
83
|
+
}, {
|
|
84
|
+
id: "store-sourcing-offers",
|
|
85
|
+
label: u("nav.sourcingOffers", { defaultValue: "My sourcing offers" }),
|
|
86
|
+
path: t(n, "publisher/sourcing/offers"),
|
|
87
|
+
icon: /* @__PURE__ */ y(v, { size: 20 }),
|
|
88
|
+
order: 37,
|
|
89
|
+
group: "store"
|
|
90
|
+
}] : [],
|
|
59
91
|
{
|
|
60
92
|
id: "store-installed",
|
|
61
|
-
label:
|
|
62
|
-
path: t(
|
|
63
|
-
icon: /* @__PURE__ */ p
|
|
93
|
+
label: u("nav.installed", { defaultValue: "Installed Apps" }),
|
|
94
|
+
path: t(n, "installed"),
|
|
95
|
+
icon: /* @__PURE__ */ y(p, { size: 20 }),
|
|
64
96
|
order: 40,
|
|
65
97
|
group: "store"
|
|
66
98
|
},
|
|
67
99
|
{
|
|
68
100
|
id: "store-licenses",
|
|
69
|
-
label:
|
|
70
|
-
path: t(
|
|
71
|
-
icon: /* @__PURE__ */
|
|
101
|
+
label: u("nav.licenses", { defaultValue: "Licenses" }),
|
|
102
|
+
path: t(n, "licenses"),
|
|
103
|
+
icon: /* @__PURE__ */ y(f, { size: 20 }),
|
|
72
104
|
order: 50,
|
|
73
105
|
group: "store"
|
|
74
106
|
}
|
|
75
107
|
]);
|
|
76
108
|
}, [
|
|
77
109
|
e,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
110
|
+
n,
|
|
111
|
+
c,
|
|
112
|
+
l,
|
|
113
|
+
u
|
|
81
114
|
]);
|
|
82
|
-
let
|
|
115
|
+
let b = s(() => [{
|
|
83
116
|
id: "store-status",
|
|
84
|
-
label:
|
|
117
|
+
label: u("store.footer.ready", { defaultValue: "Store Ready" }),
|
|
85
118
|
type: "status",
|
|
86
119
|
order: 10,
|
|
87
120
|
section: "left"
|
|
88
|
-
}], [
|
|
89
|
-
return
|
|
90
|
-
if (
|
|
91
|
-
}, [
|
|
121
|
+
}], [u]);
|
|
122
|
+
return o(() => {
|
|
123
|
+
if (t) return t(b);
|
|
124
|
+
}, [t, b]), /* @__PURE__ */ y(i, {});
|
|
92
125
|
};
|
|
93
126
|
//#endregion
|
|
94
|
-
export {
|
|
127
|
+
export { b as StoreRoot };
|
|
95
128
|
|
|
96
129
|
//# sourceMappingURL=StoreRoot.js.map
|
package/dist/StoreRoot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreRoot.js","names":[],"sources":["../src/StoreRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {
|
|
1
|
+
{"version":3,"file":"StoreRoot.js","names":[],"sources":["../src/StoreRoot.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useLocation } from 'react-router';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n ShoppingBag,\n ShoppingCart,\n Receipt,\n Package,\n Key,\n PackageSearch,\n TicketCheck,\n} from 'lucide-react';\nimport { StoreProvider, useStore } from './providers/StoreProvider';\nimport {\n PublisherSourcingAccessProvider,\n usePublisherSourcingAccess,\n} from './providers/SourcingAccessProvider';\nimport type { NavItem, StoreRootProps } from './types';\nimport { StoreRoutes } from './StoreRoutes';\nimport { useCart } from './hooks/useCart';\n\n/**\n * Root component for the Store microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { StoreRoot, type StoreRootProps } from '@burdenoff/micro-fe/store';\n *\n * function App() {\n * const props: StoreRootProps = {\n * basePath: '/store',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * organizationId: 'org-123',\n * apiGatewayUrl: 'https://api.example.com/tenant/graphql',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <StoreRoot {...props} />;\n * }\n * ```\n */\nexport const StoreRoot: FC<StoreRootProps> = (props) => {\n const { t } = useI18n();\n\n return (\n <FeatureFlagProvider\n workspaceId={props.workspaceId ?? null}\n gateway=\"global\"\n defaultEnabled={true}\n >\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {t('common.moduleLoadError', {\n defaultValue: 'Something went wrong loading this module. Please refresh the page.',\n })}\n </div>\n }\n >\n <StoreProvider {...props}>\n <StoreSourcingAccessBoundary>\n <StoreNavigationRegistration {...props} />\n </StoreSourcingAccessBoundary>\n </StoreProvider>\n </ErrorBoundary>\n </FeatureFlagProvider>\n );\n};\n\nconst StoreSourcingAccessBoundary: FC<{ children: ReactNode }> = ({ children }) => {\n const { user, authToken } = useStore();\n const { pathname } = useLocation();\n const includeProducts = pathname.includes('/publisher/sourcing/opportunities/');\n return (\n <PublisherSourcingAccessProvider\n enabled={Boolean(user?.id || authToken)}\n includeProducts={includeProducts}\n >\n {children}\n </PublisherSourcingAccessProvider>\n );\n};\n\n/**\n * Internal component that handles navigation registration\n */\nconst StoreNavigationRegistration: FC<StoreRootProps> = ({\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n}) => {\n const { itemCount } = useCart();\n const { profile: sellerProfile } = usePublisherSourcingAccess();\n const { t } = useI18n();\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n const navItems: NavItem[] = [\n {\n id: 'store-marketplace',\n label: t('nav.marketplace', { defaultValue: 'Marketplace' }),\n path: joinPath(basePath, 'marketplace'),\n icon: <ShoppingBag size={20} />,\n order: 10,\n group: 'store',\n },\n {\n id: 'store-cart',\n label: t('nav.cart', { defaultValue: 'Cart' }),\n path: joinPath(basePath, 'cart'),\n icon: <ShoppingCart size={20} />,\n badge: itemCount > 0 ? itemCount : undefined,\n order: 20,\n group: 'store',\n },\n {\n id: 'store-orders',\n label: t('nav.orders', { defaultValue: 'My Orders' }),\n path: joinPath(basePath, 'orders'),\n icon: <Receipt size={20} />,\n order: 30,\n group: 'store',\n },\n {\n id: 'store-sourcing-requests',\n label: t('nav.sourcingRequests', { defaultValue: 'Sourcing requests' }),\n path: joinPath(basePath, 'sourcing/requests'),\n icon: <PackageSearch size={20} />,\n order: 35,\n group: 'store',\n },\n ...(sellerProfile\n ? [\n {\n id: 'store-sourcing-opportunities',\n label: t('nav.sourcingOpportunities', { defaultValue: 'Sourcing opportunities' }),\n path: joinPath(basePath, 'publisher/sourcing/opportunities'),\n icon: <PackageSearch size={20} />,\n order: 36,\n group: 'store',\n },\n {\n id: 'store-sourcing-offers',\n label: t('nav.sourcingOffers', { defaultValue: 'My sourcing offers' }),\n path: joinPath(basePath, 'publisher/sourcing/offers'),\n icon: <TicketCheck size={20} />,\n order: 37,\n group: 'store',\n },\n ]\n : []),\n {\n id: 'store-installed',\n label: t('nav.installed', { defaultValue: 'Installed Apps' }),\n path: joinPath(basePath, 'installed'),\n icon: <Package size={20} />,\n order: 40,\n group: 'store',\n },\n {\n id: 'store-licenses',\n label: t('nav.licenses', { defaultValue: 'Licenses' }),\n path: joinPath(basePath, 'licenses'),\n icon: <Key size={20} />,\n order: 50,\n group: 'store',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, itemCount, sellerProfile, t]);\n\n // Register footer items — memoized to avoid re-registering on every render.\n const footerItems = useMemo(\n () => [\n {\n id: 'store-status',\n label: t('store.footer.ready', { defaultValue: 'Store Ready' }),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ],\n [t]\n );\n\n useEffect(() => {\n if (!registerFooterItems) return;\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, foot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