@burdenoff/microfe-store 2026.626.1 → 2026.626.2
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/StoreRoot.js +47 -90
- package/dist/StoreRoot.js.map +1 -1
- package/dist/StoreRoutes.js +90 -155
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/hooks/useStoreGraphQL.js +107 -177
- package/dist/hooks/useStoreGraphQL.js.map +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/pages/ProductReviewsPage.js +0 -92
- package/dist/pages/ProductReviewsPage.js.map +0 -1
- package/dist/pages/PublisherDashboardPage.js +0 -195
- package/dist/pages/PublisherDashboardPage.js.map +0 -1
- package/dist/pages/PublisherRevenuePage.js +0 -142
- package/dist/pages/PublisherRevenuePage.js.map +0 -1
- package/dist/pages/PublisherSubmissionsPage.js +0 -188
- package/dist/pages/PublisherSubmissionsPage.js.map +0 -1
- package/dist/pages/PublisherSubmitPage.js +0 -243
- package/dist/pages/PublisherSubmitPage.js.map +0 -1
package/dist/StoreRoot.js
CHANGED
|
@@ -1,139 +1,96 @@
|
|
|
1
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 {
|
|
10
|
-
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { StoreRoutes as t } from "./StoreRoutes.js";
|
|
3
|
+
import { useCart as n } from "./hooks/useCart.js";
|
|
4
|
+
import { useEffect as r, useMemo as i } from "react";
|
|
5
|
+
import { ErrorBoundary as a } from "@burdenoff/fe-libs/shared/components";
|
|
6
|
+
import { FeatureFlagProvider as o } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
7
|
+
import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { Key as c, Package as l, Receipt as u, ShoppingBag as d, ShoppingCart as f } from "lucide-react";
|
|
9
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
11
10
|
//#region src/StoreRoot.tsx
|
|
12
|
-
var
|
|
13
|
-
let { t: n } =
|
|
14
|
-
return /* @__PURE__ */
|
|
11
|
+
var m = (t) => {
|
|
12
|
+
let { t: n } = s();
|
|
13
|
+
return /* @__PURE__ */ p(o, {
|
|
15
14
|
workspaceId: t.workspaceId ?? null,
|
|
16
15
|
gateway: "global",
|
|
17
16
|
defaultEnabled: !0,
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
-
fallback: /* @__PURE__ */
|
|
17
|
+
children: /* @__PURE__ */ p(a, {
|
|
18
|
+
fallback: /* @__PURE__ */ p("div", {
|
|
20
19
|
className: "p-6 text-center text-text-secondary",
|
|
21
20
|
children: n("common.moduleLoadError", { defaultValue: "Something went wrong loading this module. Please refresh the page." })
|
|
22
21
|
}),
|
|
23
|
-
children: /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ p(e, {
|
|
24
23
|
...t,
|
|
25
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ p(h, { ...t })
|
|
26
25
|
})
|
|
27
26
|
})
|
|
28
27
|
});
|
|
29
|
-
},
|
|
30
|
-
let { itemCount:
|
|
31
|
-
|
|
28
|
+
}, h = ({ registerNavItems: e, registerFooterItems: a, basePath: o = "/" }) => {
|
|
29
|
+
let { itemCount: m } = n(), { t: h } = s();
|
|
30
|
+
r(() => {
|
|
32
31
|
if (!e) return;
|
|
33
|
-
let t = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`)
|
|
32
|
+
let t = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
33
|
+
return e([
|
|
34
34
|
{
|
|
35
35
|
id: "store-marketplace",
|
|
36
|
-
label:
|
|
37
|
-
path: t(
|
|
38
|
-
icon: /* @__PURE__ */
|
|
36
|
+
label: h("nav.marketplace", { defaultValue: "Marketplace" }),
|
|
37
|
+
path: t(o, "marketplace"),
|
|
38
|
+
icon: /* @__PURE__ */ p(d, { size: 20 }),
|
|
39
39
|
order: 10,
|
|
40
40
|
group: "store"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: "store-cart",
|
|
44
|
-
label:
|
|
45
|
-
path: t(
|
|
46
|
-
icon: /* @__PURE__ */
|
|
47
|
-
badge:
|
|
44
|
+
label: h("nav.cart", { defaultValue: "Cart" }),
|
|
45
|
+
path: t(o, "cart"),
|
|
46
|
+
icon: /* @__PURE__ */ p(f, { size: 20 }),
|
|
47
|
+
badge: m > 0 ? m : void 0,
|
|
48
48
|
order: 20,
|
|
49
49
|
group: "store"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
id: "store-orders",
|
|
53
|
-
label:
|
|
54
|
-
path: t(
|
|
55
|
-
icon: /* @__PURE__ */
|
|
53
|
+
label: h("nav.orders", { defaultValue: "My Orders" }),
|
|
54
|
+
path: t(o, "orders"),
|
|
55
|
+
icon: /* @__PURE__ */ p(u, { size: 20 }),
|
|
56
56
|
order: 30,
|
|
57
57
|
group: "store"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
id: "store-installed",
|
|
61
|
-
label:
|
|
62
|
-
path: t(
|
|
63
|
-
icon: /* @__PURE__ */
|
|
61
|
+
label: h("nav.installed", { defaultValue: "Installed Apps" }),
|
|
62
|
+
path: t(o, "installed"),
|
|
63
|
+
icon: /* @__PURE__ */ p(l, { size: 20 }),
|
|
64
64
|
order: 40,
|
|
65
65
|
group: "store"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
id: "store-licenses",
|
|
69
|
-
label:
|
|
70
|
-
path: t(
|
|
71
|
-
icon: /* @__PURE__ */
|
|
69
|
+
label: h("nav.licenses", { defaultValue: "Licenses" }),
|
|
70
|
+
path: t(o, "licenses"),
|
|
71
|
+
icon: /* @__PURE__ */ p(c, { size: 20 }),
|
|
72
72
|
order: 50,
|
|
73
73
|
group: "store"
|
|
74
74
|
}
|
|
75
|
-
];
|
|
76
|
-
if (T) {
|
|
77
|
-
let e = [
|
|
78
|
-
{
|
|
79
|
-
id: "store-publisher-dashboard",
|
|
80
|
-
label: w("nav.publisherDashboard", { defaultValue: "Dashboard" }),
|
|
81
|
-
path: t(c, "publisher"),
|
|
82
|
-
icon: /* @__PURE__ */ b(m, { size: 20 }),
|
|
83
|
-
order: 10
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: "store-publisher-submit",
|
|
87
|
-
label: w("nav.submitProduct", { defaultValue: "Submit Product" }),
|
|
88
|
-
path: t(c, "publisher/submit"),
|
|
89
|
-
icon: /* @__PURE__ */ b(y, { size: 20 }),
|
|
90
|
-
order: 20
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: "store-publisher-submissions",
|
|
94
|
-
label: w("nav.submissions", { defaultValue: "Submissions" }),
|
|
95
|
-
path: t(c, "publisher/submissions"),
|
|
96
|
-
icon: /* @__PURE__ */ b(f, { size: 20 }),
|
|
97
|
-
order: 30
|
|
98
|
-
}
|
|
99
|
-
];
|
|
100
|
-
E && e.push({
|
|
101
|
-
id: "store-publisher-revenue",
|
|
102
|
-
label: w("nav.revenue", { defaultValue: "Revenue" }),
|
|
103
|
-
path: t(c, "publisher/revenue"),
|
|
104
|
-
icon: /* @__PURE__ */ b(d, { size: 20 }),
|
|
105
|
-
order: 40
|
|
106
|
-
}), n.push({
|
|
107
|
-
id: "store-publisher",
|
|
108
|
-
label: w("nav.publisher", { defaultValue: "Publisher Portal" }),
|
|
109
|
-
path: t(c, "publisher"),
|
|
110
|
-
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
111
|
-
order: 60,
|
|
112
|
-
group: "store",
|
|
113
|
-
children: e
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
return e(n);
|
|
75
|
+
]);
|
|
117
76
|
}, [
|
|
118
77
|
e,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
E,
|
|
123
|
-
w
|
|
78
|
+
o,
|
|
79
|
+
m,
|
|
80
|
+
h
|
|
124
81
|
]);
|
|
125
|
-
let
|
|
82
|
+
let g = i(() => [{
|
|
126
83
|
id: "store-status",
|
|
127
|
-
label:
|
|
84
|
+
label: h("store.footer.ready", { defaultValue: "Store Ready" }),
|
|
128
85
|
type: "status",
|
|
129
86
|
order: 10,
|
|
130
87
|
section: "left"
|
|
131
|
-
}], [
|
|
132
|
-
return
|
|
133
|
-
if (
|
|
134
|
-
}, [
|
|
88
|
+
}], [h]);
|
|
89
|
+
return r(() => {
|
|
90
|
+
if (a) return a(g);
|
|
91
|
+
}, [a, g]), /* @__PURE__ */ p(t, {});
|
|
135
92
|
};
|
|
136
93
|
//#endregion
|
|
137
|
-
export {
|
|
94
|
+
export { m as StoreRoot };
|
|
138
95
|
|
|
139
96
|
//# 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 } 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 { ShoppingBag, ShoppingCart, Receipt, Package, Key } from 'lucide-react';\nimport { StoreProvider } from './providers/StoreProvider';\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 <StoreNavigationRegistration {...props} />\n </StoreProvider>\n </ErrorBoundary>\n </FeatureFlagProvider>\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 { 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-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, 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, footerItems]);\n\n return <StoreRoutes />;\n};\n"],"mappings":";;;;;;;;;;AAsCA,IAAa,KAAiC,MAAU;CACtD,IAAM,EAAE,SAAM,GAAS;AAEvB,QACE,kBAAC,GAAD;EACE,aAAa,EAAM,eAAe;EAClC,SAAQ;EACR,gBAAgB;YAEhB,kBAAC,GAAD;GACE,UACE,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAE,0BAA0B,EAC3B,cAAc,sEACf,CAAC;IACE,CAAA;aAGR,kBAAC,GAAD;IAAe,GAAI;cACjB,kBAAC,GAAD,EAA6B,GAAI,GAAS,CAAA;IAC5B,CAAA;GACF,CAAA;EACI,CAAA;GAOpB,KAAmD,EACvD,qBACA,wBACA,cAAW,UACP;CACJ,IAAM,EAAE,iBAAc,GAAS,EACzB,EAAE,SAAM,GAAS;AAGvB,SAAgB;AACd,MAAI,CAAC,EAAkB;EAEvB,IAAM,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAiDtD,SADgB,EA5CY;GAC1B;IACE,IAAI;IACJ,OAAO,EAAE,mBAAmB,EAAE,cAAc,eAAe,CAAC;IAC5D,MAAM,EAAS,GAAU,cAAc;IACvC,MAAM,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;IAC/B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,YAAY,EAAE,cAAc,QAAQ,CAAC;IAC9C,MAAM,EAAS,GAAU,OAAO;IAChC,MAAM,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA;IAChC,OAAO,IAAY,IAAI,IAAY,KAAA;IACnC,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,cAAc,EAAE,cAAc,aAAa,CAAC;IACrD,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;IAC3B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,iBAAiB,EAAE,cAAc,kBAAkB,CAAC;IAC7D,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;IAC3B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,gBAAgB,EAAE,cAAc,YAAY,CAAC;IACtD,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;IACvB,OAAO;IACP,OAAO;IACR;GACF,CAEyC;IAEzC;EAAC;EAAkB;EAAU;EAAW;EAAE,CAAC;CAG9C,IAAM,IAAc,QACZ,CACJ;EACE,IAAI;EACJ,OAAO,EAAE,sBAAsB,EAAE,cAAc,eAAe,CAAC;EAC/D,MAAM;EACN,OAAO;EACP,SAAS;EACV,CACF,EACD,CAAC,EAAE,CACJ;AAQD,QANA,QAAgB;AACT,QAEL,QADgB,EAAoB,EAAY;IAE/C,CAAC,GAAqB,EAAY,CAAC,EAE/B,kBAAC,GAAD,EAAe,CAAA"}
|
package/dist/StoreRoutes.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { useStore as e } from "./providers/StoreProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import { AccessDenied as
|
|
4
|
-
import { PageLoadingFallback as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { FeatureGate as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { Navigate as
|
|
2
|
+
import { useStorePermissions as t } from "./hooks/useStorePermissions.js";
|
|
3
|
+
import { AccessDenied as n } from "./components/AccessDenied.js";
|
|
4
|
+
import { PageLoadingFallback as r } from "./components/RouteGuards.js";
|
|
5
|
+
import { Suspense as i, lazy as a } from "react";
|
|
6
|
+
import { FeatureGate as o } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Navigate as l, Route as u, Routes as d } from "react-router-dom";
|
|
9
9
|
//#region src/StoreRoutes.tsx
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
return /* @__PURE__ */
|
|
10
|
+
var f = a(() => import("./pages/MarketplaceHomePage.js").then((e) => ({ default: e.MarketplaceHomePage }))), p = a(() => import("./pages/InstalledAppsPage.js").then((e) => ({ default: e.InstalledAppsPage }))), m = a(() => import("./pages/ProductDetailPage.js").then((e) => ({ default: e.ProductDetailPage }))), h = a(() => import("./pages/CartPage.js").then((e) => ({ default: e.CartPage }))), g = a(() => import("./pages/OrdersPage.js").then((e) => ({ default: e.OrdersPage }))), _ = a(() => import("./pages/MyLicensesPage.js").then((e) => ({ default: e.MyLicensesPage }))), v = a(() => import("./pages/OrderConfirmationPage.js").then((e) => ({ default: e.OrderConfirmationPage }))), y = a(() => import("./pages/AppDetailPage.js").then((e) => ({ default: e.AppDetailPage }))), b = a(() => import("./pages/AppSettingsPage.js").then((e) => ({ default: e.AppSettingsPage })));
|
|
11
|
+
function x({ title: e, featureFlag: t }) {
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
13
13
|
className: "flex min-h-[400px] items-center justify-center p-6",
|
|
14
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ c("div", {
|
|
15
15
|
className: "max-w-md rounded-lg border border-border-subtle bg-bg-surface p-6 text-center shadow-sm",
|
|
16
|
-
children: [/* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
17
17
|
className: "text-lg font-semibold text-text-primary",
|
|
18
18
|
children: [e, " is not enabled"]
|
|
19
|
-
}), /* @__PURE__ */
|
|
19
|
+
}), /* @__PURE__ */ c("p", {
|
|
20
20
|
className: "mt-2 text-sm text-text-secondary",
|
|
21
21
|
children: [
|
|
22
22
|
"Ask an administrator to enable the ",
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ s("span", {
|
|
24
24
|
className: "font-mono",
|
|
25
25
|
children: t
|
|
26
26
|
}),
|
|
@@ -31,219 +31,154 @@ function D({ title: e, featureFlag: t }) {
|
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return a ? /* @__PURE__ */
|
|
34
|
+
function S({ title: e, featureFlag: t, allowed: i, isLoading: a, children: c }) {
|
|
35
|
+
return a ? /* @__PURE__ */ s(r, {}) : /* @__PURE__ */ s(o, {
|
|
36
36
|
flag: t,
|
|
37
37
|
defaultValue: !0,
|
|
38
|
-
fallback: /* @__PURE__ */
|
|
38
|
+
fallback: /* @__PURE__ */ s(x, {
|
|
39
39
|
title: e,
|
|
40
40
|
featureFlag: t
|
|
41
41
|
}),
|
|
42
|
-
children:
|
|
42
|
+
children: i ? c : /* @__PURE__ */ s(n, {})
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
let { basePath:
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
45
|
+
var C = () => {
|
|
46
|
+
let { basePath: n } = e(), { permissions: a, isLoading: o } = t();
|
|
47
|
+
return /* @__PURE__ */ c(d, { children: [
|
|
48
|
+
/* @__PURE__ */ s(u, {
|
|
49
49
|
index: !0,
|
|
50
|
-
element: /* @__PURE__ */
|
|
50
|
+
element: /* @__PURE__ */ s(l, {
|
|
51
51
|
to: "marketplace",
|
|
52
52
|
replace: !0
|
|
53
53
|
})
|
|
54
54
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ s(u, {
|
|
56
56
|
path: "marketplace",
|
|
57
|
-
element: /* @__PURE__ */
|
|
57
|
+
element: /* @__PURE__ */ s(S, {
|
|
58
58
|
title: "Marketplace",
|
|
59
59
|
featureFlag: "store.marketplace",
|
|
60
|
-
allowed:
|
|
61
|
-
isLoading:
|
|
62
|
-
children: /* @__PURE__ */
|
|
63
|
-
fallback: /* @__PURE__ */
|
|
64
|
-
children: /* @__PURE__ */
|
|
60
|
+
allowed: a.canBrowse,
|
|
61
|
+
isLoading: o,
|
|
62
|
+
children: /* @__PURE__ */ s(i, {
|
|
63
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
64
|
+
children: /* @__PURE__ */ s(f, {})
|
|
65
65
|
})
|
|
66
66
|
})
|
|
67
67
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ s(u, {
|
|
69
69
|
path: "marketplace/product/:productId",
|
|
70
|
-
element: /* @__PURE__ */
|
|
70
|
+
element: /* @__PURE__ */ s(S, {
|
|
71
71
|
title: "Marketplace",
|
|
72
72
|
featureFlag: "store.marketplace",
|
|
73
|
-
allowed:
|
|
74
|
-
isLoading:
|
|
75
|
-
children: /* @__PURE__ */
|
|
76
|
-
fallback: /* @__PURE__ */
|
|
77
|
-
children: /* @__PURE__ */
|
|
73
|
+
allowed: a.canBrowse,
|
|
74
|
+
isLoading: o,
|
|
75
|
+
children: /* @__PURE__ */ s(i, {
|
|
76
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
77
|
+
children: /* @__PURE__ */ s(m, {})
|
|
78
78
|
})
|
|
79
79
|
})
|
|
80
80
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ s(u, {
|
|
82
82
|
path: "cart",
|
|
83
|
-
element: /* @__PURE__ */
|
|
83
|
+
element: /* @__PURE__ */ s(S, {
|
|
84
84
|
title: "Cart",
|
|
85
85
|
featureFlag: "store.cart",
|
|
86
|
-
allowed:
|
|
87
|
-
isLoading:
|
|
88
|
-
children: /* @__PURE__ */
|
|
89
|
-
fallback: /* @__PURE__ */
|
|
90
|
-
children: /* @__PURE__ */
|
|
86
|
+
allowed: a.canPurchase,
|
|
87
|
+
isLoading: o,
|
|
88
|
+
children: /* @__PURE__ */ s(i, {
|
|
89
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
90
|
+
children: /* @__PURE__ */ s(h, {})
|
|
91
91
|
})
|
|
92
92
|
})
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ s(u, {
|
|
95
95
|
path: "orders/:orderId/confirmation",
|
|
96
|
-
element: /* @__PURE__ */
|
|
96
|
+
element: /* @__PURE__ */ s(S, {
|
|
97
97
|
title: "Order confirmation",
|
|
98
98
|
featureFlag: "store.orders",
|
|
99
|
-
allowed:
|
|
100
|
-
isLoading:
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
fallback: /* @__PURE__ */
|
|
103
|
-
children: /* @__PURE__ */
|
|
99
|
+
allowed: a.canPurchase,
|
|
100
|
+
isLoading: o,
|
|
101
|
+
children: /* @__PURE__ */ s(i, {
|
|
102
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
103
|
+
children: /* @__PURE__ */ s(v, {})
|
|
104
104
|
})
|
|
105
105
|
})
|
|
106
106
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ s(u, {
|
|
108
108
|
path: "orders",
|
|
109
|
-
element: /* @__PURE__ */
|
|
109
|
+
element: /* @__PURE__ */ s(S, {
|
|
110
110
|
title: "Orders",
|
|
111
111
|
featureFlag: "store.orders",
|
|
112
|
-
allowed:
|
|
113
|
-
isLoading:
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
fallback: /* @__PURE__ */
|
|
116
|
-
children: /* @__PURE__ */
|
|
112
|
+
allowed: a.canPurchase,
|
|
113
|
+
isLoading: o,
|
|
114
|
+
children: /* @__PURE__ */ s(i, {
|
|
115
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
116
|
+
children: /* @__PURE__ */ s(g, {})
|
|
117
117
|
})
|
|
118
118
|
})
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ s(u, {
|
|
121
121
|
path: "installed",
|
|
122
|
-
element: /* @__PURE__ */
|
|
122
|
+
element: /* @__PURE__ */ s(S, {
|
|
123
123
|
title: "Installed apps",
|
|
124
124
|
featureFlag: "store.installed",
|
|
125
|
-
allowed:
|
|
126
|
-
isLoading:
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
-
fallback: /* @__PURE__ */
|
|
129
|
-
children: /* @__PURE__ */
|
|
125
|
+
allowed: a.canInstall,
|
|
126
|
+
isLoading: o,
|
|
127
|
+
children: /* @__PURE__ */ s(i, {
|
|
128
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
129
|
+
children: /* @__PURE__ */ s(p, {})
|
|
130
130
|
})
|
|
131
131
|
})
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ s(u, {
|
|
134
134
|
path: "installed/:installationId",
|
|
135
|
-
element: /* @__PURE__ */
|
|
135
|
+
element: /* @__PURE__ */ s(S, {
|
|
136
136
|
title: "Installed apps",
|
|
137
137
|
featureFlag: "store.installed",
|
|
138
|
-
allowed:
|
|
139
|
-
isLoading:
|
|
140
|
-
children: /* @__PURE__ */
|
|
141
|
-
fallback: /* @__PURE__ */
|
|
142
|
-
children: /* @__PURE__ */
|
|
138
|
+
allowed: a.canInstall,
|
|
139
|
+
isLoading: o,
|
|
140
|
+
children: /* @__PURE__ */ s(i, {
|
|
141
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
142
|
+
children: /* @__PURE__ */ s(y, {})
|
|
143
143
|
})
|
|
144
144
|
})
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ s(u, {
|
|
147
147
|
path: "installed/:installationId/settings",
|
|
148
|
-
element: /* @__PURE__ */
|
|
148
|
+
element: /* @__PURE__ */ s(S, {
|
|
149
149
|
title: "Installed apps",
|
|
150
150
|
featureFlag: "store.installed",
|
|
151
|
-
allowed:
|
|
152
|
-
isLoading:
|
|
153
|
-
children: /* @__PURE__ */
|
|
154
|
-
fallback: /* @__PURE__ */
|
|
155
|
-
children: /* @__PURE__ */
|
|
151
|
+
allowed: a.canInstall,
|
|
152
|
+
isLoading: o,
|
|
153
|
+
children: /* @__PURE__ */ s(i, {
|
|
154
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
155
|
+
children: /* @__PURE__ */ s(b, {})
|
|
156
156
|
})
|
|
157
157
|
})
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ s(u, {
|
|
160
160
|
path: "licenses",
|
|
161
|
-
element: /* @__PURE__ */
|
|
161
|
+
element: /* @__PURE__ */ s(S, {
|
|
162
162
|
title: "Licenses",
|
|
163
163
|
featureFlag: "store.licenses",
|
|
164
|
-
allowed:
|
|
165
|
-
isLoading:
|
|
166
|
-
children: /* @__PURE__ */
|
|
167
|
-
fallback: /* @__PURE__ */
|
|
168
|
-
children: /* @__PURE__ */
|
|
164
|
+
allowed: a.canManageLicenses,
|
|
165
|
+
isLoading: o,
|
|
166
|
+
children: /* @__PURE__ */ s(i, {
|
|
167
|
+
fallback: /* @__PURE__ */ s(r, {}),
|
|
168
|
+
children: /* @__PURE__ */ s(_, {})
|
|
169
169
|
})
|
|
170
170
|
})
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
path: "publisher",
|
|
174
|
-
element: /* @__PURE__ */ c(O, {
|
|
175
|
-
title: "Publisher portal",
|
|
176
|
-
featureFlag: "store.publisher-portal",
|
|
177
|
-
allowed: o.canPublish,
|
|
178
|
-
isLoading: D,
|
|
179
|
-
children: /* @__PURE__ */ c(a, {
|
|
180
|
-
fallback: /* @__PURE__ */ c(i, {}),
|
|
181
|
-
children: /* @__PURE__ */ c(x, {})
|
|
182
|
-
})
|
|
183
|
-
})
|
|
184
|
-
}),
|
|
185
|
-
/* @__PURE__ */ c(d, {
|
|
186
|
-
path: "publisher/submit",
|
|
187
|
-
element: /* @__PURE__ */ c(O, {
|
|
188
|
-
title: "Publisher portal",
|
|
189
|
-
featureFlag: "store.publisher-portal",
|
|
190
|
-
allowed: o.canPublish,
|
|
191
|
-
isLoading: D,
|
|
192
|
-
children: /* @__PURE__ */ c(a, {
|
|
193
|
-
fallback: /* @__PURE__ */ c(i, {}),
|
|
194
|
-
children: /* @__PURE__ */ c(v, {})
|
|
195
|
-
})
|
|
196
|
-
})
|
|
197
|
-
}),
|
|
198
|
-
/* @__PURE__ */ c(d, {
|
|
199
|
-
path: "publisher/submissions",
|
|
200
|
-
element: /* @__PURE__ */ c(O, {
|
|
201
|
-
title: "Publisher portal",
|
|
202
|
-
featureFlag: "store.publisher-portal",
|
|
203
|
-
allowed: o.canPublish,
|
|
204
|
-
isLoading: D,
|
|
205
|
-
children: /* @__PURE__ */ c(a, {
|
|
206
|
-
fallback: /* @__PURE__ */ c(i, {}),
|
|
207
|
-
children: /* @__PURE__ */ c(S, {})
|
|
208
|
-
})
|
|
209
|
-
})
|
|
210
|
-
}),
|
|
211
|
-
/* @__PURE__ */ c(d, {
|
|
212
|
-
path: "publisher/revenue",
|
|
213
|
-
element: /* @__PURE__ */ c(O, {
|
|
214
|
-
title: "Publisher revenue",
|
|
215
|
-
featureFlag: "store.publisher-portal.revenue",
|
|
216
|
-
allowed: s(t.EARNINGS_READ),
|
|
217
|
-
isLoading: D,
|
|
218
|
-
children: /* @__PURE__ */ c(a, {
|
|
219
|
-
fallback: /* @__PURE__ */ c(i, {}),
|
|
220
|
-
children: /* @__PURE__ */ c(C, {})
|
|
221
|
-
})
|
|
222
|
-
})
|
|
223
|
-
}),
|
|
224
|
-
/* @__PURE__ */ c(d, {
|
|
225
|
-
path: "publisher/product/:productId/reviews",
|
|
226
|
-
element: /* @__PURE__ */ c(O, {
|
|
227
|
-
title: "Publisher portal",
|
|
228
|
-
featureFlag: "store.publisher-portal",
|
|
229
|
-
allowed: o.canPublish,
|
|
230
|
-
isLoading: D,
|
|
231
|
-
children: /* @__PURE__ */ c(a, {
|
|
232
|
-
fallback: /* @__PURE__ */ c(i, {}),
|
|
233
|
-
children: /* @__PURE__ */ c(E, {})
|
|
234
|
-
})
|
|
235
|
-
})
|
|
236
|
-
}),
|
|
237
|
-
/* @__PURE__ */ c(d, {
|
|
172
|
+
/* @__PURE__ */ s(u, {
|
|
238
173
|
path: "*",
|
|
239
|
-
element: /* @__PURE__ */
|
|
240
|
-
to: `${
|
|
174
|
+
element: /* @__PURE__ */ s(l, {
|
|
175
|
+
to: `${n}/marketplace`,
|
|
241
176
|
replace: !0
|
|
242
177
|
})
|
|
243
178
|
})
|
|
244
179
|
] });
|
|
245
180
|
};
|
|
246
181
|
//#endregion
|
|
247
|
-
export {
|
|
182
|
+
export { C as StoreRoutes };
|
|
248
183
|
|
|
249
184
|
//# sourceMappingURL=StoreRoutes.js.map
|