@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
|
@@ -1,130 +1,130 @@
|
|
|
1
1
|
import { useStore as e } from "../providers/StoreProvider.js";
|
|
2
2
|
import { useMyEntitlements as t } from "../hooks/useStoreGraphQL.js";
|
|
3
3
|
import { useMemo as n } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { useNavigate as r } from "react-router";
|
|
5
|
+
import { QuotaMeter as i } from "@burdenoff/fe-libs/shared/components";
|
|
6
|
+
import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
|
+
import { AlertCircle as o, ArrowLeft as s, Loader2 as c, ShieldCheck as l } from "lucide-react";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
import { EmphasisPanel as p, IllustratedEmptyState as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/pages/MyLicensesPage.tsx
|
|
11
11
|
var g = (e) => e === "ACTIVE" ? "bg-status-success-bg-subtle text-status-success-text" : e === "SUSPENDED" || e === "PENDING" ? "bg-status-warning-bg-subtle text-status-warning-text" : e === "EXPIRED" || e === "REVOKED" ? "bg-status-error-bg-subtle text-status-error-text" : "bg-bg-sunken text-text-muted", _ = () => {
|
|
12
|
-
let _ =
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
let _ = r(), { basePath: v } = e(), { t: y } = a(), { entitlements: b, hasMore: x, loading: S, error: C, refetch: w, loadMore: T } = t(), E = n(() => b.slice().sort((e, t) => e.id.localeCompare(t.id)), [b]);
|
|
13
|
+
return /* @__PURE__ */ f("div", {
|
|
14
14
|
className: "flex h-full flex-col",
|
|
15
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ d("header", {
|
|
16
16
|
className: "sticky top-0 z-10 border-b border-border-seam bg-bg-surface px-6 py-4",
|
|
17
|
-
children: /* @__PURE__ */
|
|
17
|
+
children: /* @__PURE__ */ f("div", {
|
|
18
18
|
className: "mx-auto flex max-w-5xl items-center gap-4",
|
|
19
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ d("button", {
|
|
20
20
|
type: "button",
|
|
21
21
|
onClick: () => _(-1),
|
|
22
22
|
"aria-label": "Go back",
|
|
23
23
|
className: "cursor-pointer rounded-lg p-2 text-text-muted transition-colors hover:bg-bg-sunken hover:text-text-primary",
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
}), /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ d(s, { className: "size-5" })
|
|
25
|
+
}), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
26
26
|
className: "text-2xl font-bold text-text-primary",
|
|
27
27
|
children: y("pages.licenses.title", { defaultValue: "My Licenses" })
|
|
28
|
-
}), /* @__PURE__ */
|
|
28
|
+
}), /* @__PURE__ */ d("p", {
|
|
29
29
|
className: "text-sm text-text-muted",
|
|
30
30
|
children: y("pages.licenses.subtitle", { defaultValue: "Review and manage your product entitlements" })
|
|
31
31
|
})] })]
|
|
32
32
|
})
|
|
33
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ d("main", {
|
|
34
34
|
className: "flex-1 overflow-y-auto p-6",
|
|
35
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ f("div", {
|
|
36
36
|
className: "mx-auto max-w-5xl",
|
|
37
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ d(h, {
|
|
38
38
|
className: "mb-6",
|
|
39
39
|
children: "Every paid app you own grants a license (entitlement) that proves your right to use it. Check here to confirm a license is active, find a license key to enter into a product, and see when paid access expires — so you're never caught out by a lapsed or suspended entitlement."
|
|
40
|
-
}), S ? /* @__PURE__ */
|
|
40
|
+
}), S ? /* @__PURE__ */ d("output", {
|
|
41
41
|
"aria-label": "Loading licenses",
|
|
42
42
|
className: "flex items-center justify-center py-16",
|
|
43
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ d(c, {
|
|
44
44
|
className: "size-8 animate-spin text-text-muted",
|
|
45
45
|
"aria-hidden": "true"
|
|
46
46
|
})
|
|
47
|
-
}) : C ? /* @__PURE__ */
|
|
47
|
+
}) : C ? /* @__PURE__ */ f("div", {
|
|
48
48
|
role: "alert",
|
|
49
49
|
className: "rounded-xl border border-status-error-border bg-status-error-bg-subtle p-8 text-center",
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ d(o, { className: "mx-auto mb-3 size-10 text-status-error-text" }),
|
|
52
|
+
/* @__PURE__ */ d("h3", {
|
|
53
53
|
className: "text-lg font-semibold text-status-error-text",
|
|
54
54
|
children: y("pages.licenses.failedToLoad", { defaultValue: "Failed to load licenses" })
|
|
55
55
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ d("p", {
|
|
57
57
|
className: "mt-2 text-sm text-text-muted",
|
|
58
58
|
children: C.message
|
|
59
59
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ d("button", {
|
|
61
61
|
type: "button",
|
|
62
62
|
onClick: () => w(),
|
|
63
63
|
className: "mt-4 cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
64
64
|
children: y("common.tryAgain", { defaultValue: "Try Again" })
|
|
65
65
|
})
|
|
66
66
|
]
|
|
67
|
-
}) : E.length === 0 ? /* @__PURE__ */
|
|
67
|
+
}) : E.length === 0 ? /* @__PURE__ */ d(m, {
|
|
68
68
|
illustration: "empty-data",
|
|
69
69
|
title: y("pages.licenses.emptyTitle", { defaultValue: "No licenses yet" }),
|
|
70
70
|
description: y("pages.licenses.emptyDescription", { defaultValue: "Purchase apps from the marketplace to see your licenses here." }),
|
|
71
|
-
action: /* @__PURE__ */
|
|
71
|
+
action: /* @__PURE__ */ d("button", {
|
|
72
72
|
type: "button",
|
|
73
73
|
onClick: () => _(`${v}/marketplace`),
|
|
74
74
|
className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
75
75
|
children: y("pages.licenses.browseMarketplace", { defaultValue: "Browse Marketplace" })
|
|
76
76
|
})
|
|
77
|
-
}) : /* @__PURE__ */
|
|
77
|
+
}) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(p, {
|
|
78
78
|
className: "mb-6",
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ d(i, {
|
|
80
80
|
label: y("pages.licenses.activeLicenses", { defaultValue: "Active licenses" }),
|
|
81
81
|
used: E.filter((e) => e.status === "ACTIVE").length,
|
|
82
82
|
limit: null,
|
|
83
83
|
unit: y("pages.licenses.licensesUnit", { defaultValue: "licenses" })
|
|
84
84
|
})
|
|
85
|
-
}), /* @__PURE__ */
|
|
85
|
+
}), /* @__PURE__ */ f("ul", {
|
|
86
86
|
className: "flex flex-col gap-y-4",
|
|
87
|
-
children: [E.map((e) => /* @__PURE__ */
|
|
87
|
+
children: [E.map((e) => /* @__PURE__ */ d("li", {
|
|
88
88
|
className: "rounded-xl border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
89
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ f("div", {
|
|
90
90
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ f("div", { children: [
|
|
92
|
+
/* @__PURE__ */ f("div", {
|
|
93
93
|
className: "flex items-center gap-2",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ d(l, { className: "size-4 text-status-success-text" }), /* @__PURE__ */ f("h3", {
|
|
95
95
|
className: "font-semibold text-text-primary",
|
|
96
96
|
children: ["Product ", e.productId]
|
|
97
97
|
})]
|
|
98
98
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ d("p", {
|
|
100
100
|
className: "mt-1 text-sm text-text-muted",
|
|
101
101
|
children: y("pages.licenses.entitlementId", {
|
|
102
102
|
defaultValue: `Entitlement ID: ${e.id}`,
|
|
103
103
|
id: e.id
|
|
104
104
|
})
|
|
105
105
|
}),
|
|
106
|
-
e.licenseKey && /* @__PURE__ */
|
|
106
|
+
e.licenseKey && /* @__PURE__ */ d("p", {
|
|
107
107
|
className: "mt-1 text-sm text-text-muted",
|
|
108
108
|
children: y("pages.licenses.licenseKey", {
|
|
109
109
|
defaultValue: `License key: ${e.licenseKey}`,
|
|
110
110
|
key: e.licenseKey
|
|
111
111
|
})
|
|
112
112
|
}),
|
|
113
|
-
e.expiresAt && /* @__PURE__ */
|
|
113
|
+
e.expiresAt && /* @__PURE__ */ d("p", {
|
|
114
114
|
className: "mt-1 text-sm text-text-muted",
|
|
115
115
|
children: y("pages.licenses.expiresOn", {
|
|
116
116
|
defaultValue: `Expires on ${new Date(e.expiresAt).toLocaleDateString()}`,
|
|
117
117
|
date: new Date(e.expiresAt).toLocaleDateString()
|
|
118
118
|
})
|
|
119
119
|
})
|
|
120
|
-
] }), /* @__PURE__ */
|
|
120
|
+
] }), /* @__PURE__ */ d("span", {
|
|
121
121
|
className: `rounded-full px-3 py-1 text-xs font-semibold ${g(e.status)} ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
|
|
122
122
|
children: e.status
|
|
123
123
|
})]
|
|
124
124
|
})
|
|
125
|
-
}, e.id)), x && /* @__PURE__ */
|
|
125
|
+
}, e.id)), x && /* @__PURE__ */ d("li", {
|
|
126
126
|
className: "flex justify-center pt-4 list-none",
|
|
127
|
-
children: /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ d("button", {
|
|
128
128
|
type: "button",
|
|
129
129
|
onClick: T,
|
|
130
130
|
disabled: S,
|
|
@@ -2,21 +2,21 @@ import { useStore as e } from "../providers/StoreProvider.js";
|
|
|
2
2
|
import { formatPrice as t } from "../utils/index.js";
|
|
3
3
|
import { nativeCopyText as n, nativeImpact as r, nativeNotify as i } from "../utils/nativeBridge.js";
|
|
4
4
|
import { useEffect as a, useState as o } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { useNavigate as s, useParams as c } from "react-router";
|
|
6
|
+
import { ArrowRight as l, CheckCircle2 as u, Copy as d, Download as f, KeyRound as p, Package as m, Receipt as h, Truck as g } from "lucide-react";
|
|
7
|
+
import { graphqlFetch as _ } from "@burdenoff/fe-libs/shared/graphql";
|
|
8
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
9
|
import { EmphasisPanel as x, NextSteps as S } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/pages/OrderConfirmationPage.tsx
|
|
11
11
|
var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n id\n status\n total\n currency\n purchasedAt\n lineItems\n context\n fulfillment {\n status\n trackingNumber\n trackingUrl\n carrier\n estimatedDeliveryDate\n }\n }\n myEntitlements {\n id\n productId\n licenseKey\n expiresAt\n features\n product {\n id\n name\n slug\n icon\n manifest\n }\n }\n }\n", w = () => {
|
|
12
|
-
let w =
|
|
12
|
+
let w = s(), { basePath: T, authToken: E } = e(), { orderId: D } = c(), [O, k] = o(null), [A, j] = o([]), [M, N] = o(!0), [P, F] = o(null), [I, L] = o(null);
|
|
13
13
|
a(() => {
|
|
14
14
|
if (!D) return;
|
|
15
15
|
let e = !1;
|
|
16
16
|
return (async () => {
|
|
17
17
|
N(!0), F(null);
|
|
18
18
|
try {
|
|
19
|
-
let t = await
|
|
19
|
+
let t = await _({
|
|
20
20
|
gateway: "global",
|
|
21
21
|
query: C,
|
|
22
22
|
variables: { id: D },
|
|
@@ -48,18 +48,18 @@ var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
|
|
|
48
48
|
let n = new URLSearchParams();
|
|
49
49
|
n.set("install", e), t && n.set("licenseKey", t), window.location.href = `/vibecontrols/agents?${n.toString()}`;
|
|
50
50
|
}, B = (e, n) => t(e, n || "USD"), V = O?.lineItems ?? [], H = V.some((e) => String(e.itemType ?? "").toLowerCase() === "physical"), U = V.some((e) => String(e.itemType ?? "").toLowerCase() !== "physical");
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ b("main", {
|
|
52
52
|
className: "mx-auto max-w-3xl p-6",
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ b(x, {
|
|
55
55
|
className: "rounded-2xl p-6 text-center",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ y(u, { className: "mx-auto size-12 text-status-success-text" }),
|
|
58
|
+
/* @__PURE__ */ y("h1", {
|
|
59
59
|
className: "mt-3 text-2xl font-bold text-text-primary",
|
|
60
60
|
children: "Order placed successfully"
|
|
61
61
|
}),
|
|
62
|
-
O && /* @__PURE__ */
|
|
62
|
+
O && /* @__PURE__ */ b("p", {
|
|
63
63
|
className: "mt-1 text-sm tabular-nums text-text-secondary",
|
|
64
64
|
children: [
|
|
65
65
|
"Total: ",
|
|
@@ -67,43 +67,43 @@ var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
|
|
|
67
67
|
O.purchasedAt && ` • ${new Date(O.purchasedAt).toLocaleString()}`
|
|
68
68
|
]
|
|
69
69
|
}),
|
|
70
|
-
D && /* @__PURE__ */
|
|
70
|
+
D && /* @__PURE__ */ b("div", {
|
|
71
71
|
className: "mx-auto mt-4 max-w-sm rounded-lg border border-border-seam bg-surface-default px-4 py-2 text-left",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ y("p", {
|
|
73
73
|
className: "text-xs uppercase tracking-wide text-text-tertiary",
|
|
74
74
|
children: "Order ID"
|
|
75
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ y("p", {
|
|
76
76
|
className: "mt-0.5 break-all font-mono text-xs text-text-primary",
|
|
77
77
|
children: D
|
|
78
78
|
})]
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
81
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ y("p", {
|
|
83
83
|
className: "mt-3 text-center text-xs text-text-tertiary",
|
|
84
84
|
children: H ? "You'll receive shipping and tracking updates as your order is prepared and dispatched." : "This purchase is final and non-refundable. Digital app orders cannot be cancelled once completed."
|
|
85
85
|
}),
|
|
86
|
-
P && /* @__PURE__ */
|
|
86
|
+
P && /* @__PURE__ */ y("div", {
|
|
87
87
|
role: "alert",
|
|
88
88
|
className: "mt-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
|
|
89
89
|
children: P
|
|
90
90
|
}),
|
|
91
|
-
M ? /* @__PURE__ */
|
|
91
|
+
M ? /* @__PURE__ */ y("output", {
|
|
92
92
|
className: "mt-6 block py-12 text-center text-text-secondary",
|
|
93
93
|
children: "Loading your order…"
|
|
94
|
-
}) : /* @__PURE__ */ v
|
|
94
|
+
}) : /* @__PURE__ */ b(v, { children: [H && /* @__PURE__ */ b("section", {
|
|
95
95
|
className: "mt-6",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
96
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
97
97
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
99
|
-
}), /* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ y(g, { className: "size-4" }), "Shipping"]
|
|
99
|
+
}), /* @__PURE__ */ b("div", {
|
|
100
100
|
className: "rounded-lg border border-border-seam bg-surface-raised p-4",
|
|
101
101
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ y("p", {
|
|
103
103
|
className: "text-sm text-text-secondary",
|
|
104
104
|
children: O?.fulfillment?.status && O.fulfillment.status !== "PENDING" ? `Status: ${((e) => e.replace(/_/g, " ").toLowerCase().replace(/^./, (e) => e.toUpperCase()))(O.fulfillment.status)}` : "Your order is being prepared for shipment. We'll share tracking details once it ships."
|
|
105
105
|
}),
|
|
106
|
-
O?.fulfillment?.estimatedDeliveryDate && /* @__PURE__ */
|
|
106
|
+
O?.fulfillment?.estimatedDeliveryDate && /* @__PURE__ */ b("p", {
|
|
107
107
|
className: "mt-1 text-xs text-text-tertiary",
|
|
108
108
|
children: [
|
|
109
109
|
"Estimated delivery:",
|
|
@@ -111,29 +111,29 @@ var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
|
|
|
111
111
|
new Date(O.fulfillment.estimatedDeliveryDate).toLocaleDateString()
|
|
112
112
|
]
|
|
113
113
|
}),
|
|
114
|
-
O?.fulfillment?.trackingUrl && /* @__PURE__ */
|
|
114
|
+
O?.fulfillment?.trackingUrl && /* @__PURE__ */ b("a", {
|
|
115
115
|
href: O.fulfillment.trackingUrl,
|
|
116
116
|
target: "_blank",
|
|
117
117
|
rel: "noreferrer",
|
|
118
118
|
className: "mt-3 inline-flex items-center gap-1.5 rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-xs font-semibold text-text-primary hover:bg-surface-hover",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ y(m, { className: "size-3.5" }),
|
|
121
121
|
"Track package",
|
|
122
122
|
O.fulfillment.trackingNumber ? ` (${O.fulfillment.trackingNumber})` : ""
|
|
123
123
|
]
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ y("ul", {
|
|
126
126
|
className: "mt-4 space-y-2 border-t border-border-seam pt-3",
|
|
127
|
-
children: V.filter((e) => String(e.itemType ?? "").toLowerCase() === "physical").map((e, t) => /* @__PURE__ */
|
|
127
|
+
children: V.filter((e) => String(e.itemType ?? "").toLowerCase() === "physical").map((e, t) => /* @__PURE__ */ b("li", {
|
|
128
128
|
className: "flex items-center justify-between gap-3 text-sm",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ b("span", {
|
|
130
130
|
className: "min-w-0 truncate text-text-primary",
|
|
131
131
|
children: [
|
|
132
132
|
e.name,
|
|
133
133
|
" × ",
|
|
134
134
|
e.quantity
|
|
135
135
|
]
|
|
136
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ y("span", {
|
|
137
137
|
className: "tabular-nums text-text-secondary",
|
|
138
138
|
children: B(e.subtotal, O?.currency ?? "USD")
|
|
139
139
|
})]
|
|
@@ -141,73 +141,73 @@ var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
|
|
|
141
141
|
})
|
|
142
142
|
]
|
|
143
143
|
})]
|
|
144
|
-
}), A.length > 0 && /* @__PURE__ */
|
|
144
|
+
}), A.length > 0 && /* @__PURE__ */ b("div", {
|
|
145
145
|
className: "mt-6",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
147
147
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
148
148
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ y(p, { className: "size-4" }),
|
|
150
150
|
"Your licenses (",
|
|
151
151
|
A.length,
|
|
152
152
|
")"
|
|
153
153
|
]
|
|
154
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ y("ul", {
|
|
155
155
|
className: "space-y-3",
|
|
156
|
-
children: A.map((e) => /* @__PURE__ */
|
|
156
|
+
children: A.map((e) => /* @__PURE__ */ y("li", {
|
|
157
157
|
className: "rounded-lg border border-border-seam bg-surface-raised p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
158
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ b("div", {
|
|
159
159
|
className: "flex items-start gap-3",
|
|
160
160
|
children: [
|
|
161
|
-
e.product?.icon ? /* @__PURE__ */
|
|
161
|
+
e.product?.icon ? /* @__PURE__ */ y("img", {
|
|
162
162
|
src: e.product.icon,
|
|
163
163
|
alt: "",
|
|
164
164
|
className: "size-12 flex-shrink-0 rounded-md object-cover"
|
|
165
|
-
}) : /* @__PURE__ */
|
|
165
|
+
}) : /* @__PURE__ */ y("div", {
|
|
166
166
|
className: "flex size-12 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
|
|
167
167
|
children: e.product?.name.slice(0, 2).toUpperCase() ?? "?"
|
|
168
168
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ b("div", {
|
|
170
170
|
className: "min-w-0 flex-1",
|
|
171
171
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ y("h3", {
|
|
173
173
|
className: "text-base font-semibold text-text-primary",
|
|
174
174
|
children: e.product?.name ?? "Unknown product"
|
|
175
175
|
}),
|
|
176
|
-
e.expiresAt && /* @__PURE__ */
|
|
176
|
+
e.expiresAt && /* @__PURE__ */ b("p", {
|
|
177
177
|
className: "text-xs text-text-secondary",
|
|
178
178
|
children: ["Expires: ", new Date(e.expiresAt).toLocaleDateString()]
|
|
179
179
|
}),
|
|
180
|
-
e.licenseKey && /* @__PURE__ */
|
|
180
|
+
e.licenseKey && /* @__PURE__ */ b("div", {
|
|
181
181
|
className: "mt-2 flex items-center gap-2",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ y("code", {
|
|
183
183
|
className: "flex-1 truncate rounded bg-surface-muted px-2 py-1 font-mono text-[11px] text-text-primary",
|
|
184
184
|
children: e.licenseKey
|
|
185
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ y("button", {
|
|
186
186
|
type: "button",
|
|
187
187
|
onClick: () => void R(e.licenseKey),
|
|
188
188
|
className: "rounded-md border border-border-default bg-surface-default p-1 text-text-primary hover:bg-surface-hover",
|
|
189
189
|
title: "Copy license key",
|
|
190
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ y(d, { className: "size-3.5" })
|
|
191
191
|
})]
|
|
192
192
|
}),
|
|
193
|
-
I === e.licenseKey && /* @__PURE__ */
|
|
193
|
+
I === e.licenseKey && /* @__PURE__ */ y("p", {
|
|
194
194
|
className: "mt-1 text-xs text-status-success-text",
|
|
195
195
|
children: "Copied to clipboard"
|
|
196
196
|
})
|
|
197
197
|
]
|
|
198
198
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ b("button", {
|
|
200
200
|
type: "button",
|
|
201
201
|
onClick: () => z(e.productId, e.licenseKey),
|
|
202
202
|
className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-semibold text-action-primary-text hover:opacity-90",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ y(f, { className: "size-3.5" }), "Install to workspace"]
|
|
204
204
|
})
|
|
205
205
|
]
|
|
206
206
|
})
|
|
207
207
|
}, e.id))
|
|
208
208
|
})]
|
|
209
209
|
})] }),
|
|
210
|
-
!M && /* @__PURE__ */
|
|
210
|
+
!M && /* @__PURE__ */ y(S, {
|
|
211
211
|
className: "mt-6",
|
|
212
212
|
storageKey: "store-order-confirmation",
|
|
213
213
|
title: "What's next?",
|
|
@@ -216,7 +216,7 @@ var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
|
|
|
216
216
|
id: "install",
|
|
217
217
|
label: "Install what you bought",
|
|
218
218
|
description: "Add each purchased app to a workspace using its license.",
|
|
219
|
-
icon: /* @__PURE__ */
|
|
219
|
+
icon: /* @__PURE__ */ y(f, { className: "size-4" }),
|
|
220
220
|
onClick: () => {
|
|
221
221
|
let e = A[0];
|
|
222
222
|
e && z(e.productId, e.licenseKey);
|
|
@@ -227,37 +227,37 @@ var C = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
|
|
|
227
227
|
id: "track",
|
|
228
228
|
label: "Track your order",
|
|
229
229
|
description: "Follow delivery status under My Orders.",
|
|
230
|
-
icon: /* @__PURE__ */
|
|
230
|
+
icon: /* @__PURE__ */ y(g, { className: "size-4" }),
|
|
231
231
|
onClick: () => w(`${T}/orders`)
|
|
232
232
|
}] : [],
|
|
233
233
|
{
|
|
234
234
|
id: "orders",
|
|
235
235
|
label: "Keep this receipt",
|
|
236
236
|
description: "Find this order any time under My Orders.",
|
|
237
|
-
icon: /* @__PURE__ */
|
|
237
|
+
icon: /* @__PURE__ */ y(h, { className: "size-4" }),
|
|
238
238
|
onClick: () => w(`${T}/orders`)
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
id: "shop",
|
|
242
242
|
label: "Discover more",
|
|
243
243
|
description: "Browse the marketplace for more apps and tools.",
|
|
244
|
-
icon: /* @__PURE__ */
|
|
244
|
+
icon: /* @__PURE__ */ y(l, { className: "size-4" }),
|
|
245
245
|
onClick: () => w(`${T}/marketplace`)
|
|
246
246
|
}
|
|
247
247
|
]
|
|
248
248
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ b("div", {
|
|
250
250
|
className: "mt-6 flex flex-col gap-2 sm:flex-row sm:justify-center",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ b("button", {
|
|
252
252
|
type: "button",
|
|
253
253
|
onClick: () => w(`${T}/orders`),
|
|
254
254
|
className: "cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
256
|
-
}), /* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ y(h, { className: "size-4" }), "View My Orders"]
|
|
256
|
+
}), /* @__PURE__ */ b("button", {
|
|
257
257
|
type: "button",
|
|
258
258
|
onClick: () => w(`${T}/marketplace`),
|
|
259
259
|
className: "cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg border border-border-default px-4 py-2 text-sm font-semibold text-text-primary hover:bg-surface-hover",
|
|
260
|
-
children: ["Continue Shopping", /* @__PURE__ */
|
|
260
|
+
children: ["Continue Shopping", /* @__PURE__ */ y(l, { className: "size-4" })]
|
|
261
261
|
})]
|
|
262
262
|
})
|
|
263
263
|
]
|
package/dist/pages/OrdersPage.js
CHANGED
|
@@ -5,10 +5,10 @@ import { InstallAppModal as r } from "../components/InstallAppModal.js";
|
|
|
5
5
|
import { useInstallations as i } from "../hooks/useInstallations.js";
|
|
6
6
|
import { useOrders as a } from "../hooks/useOrders.js";
|
|
7
7
|
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
8
|
-
import {
|
|
8
|
+
import { useNavigate as l } from "react-router";
|
|
9
|
+
import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
10
|
import { ArrowLeft as u, CheckCircle as d, ChevronRight as f, Clock as p, Download as m, Loader2 as h, Package as g, RefreshCw as _, ShoppingBag as v, XCircle as y } from "lucide-react";
|
|
10
11
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
-
import { useNavigate as ee } from "react-router";
|
|
12
12
|
import { GlassCard as S, IllustratedEmptyState as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/pages/OrdersPage.tsx
|
|
14
14
|
var T = [
|
|
@@ -62,7 +62,7 @@ var T = [
|
|
|
62
62
|
children: [/* @__PURE__ */ b(n, { className: "size-3.5" }), t.label]
|
|
63
63
|
});
|
|
64
64
|
}, O = () => {
|
|
65
|
-
let p =
|
|
65
|
+
let p = l(), { basePath: _ } = e(), { t: E } = ee(), { orders: O, loading: k, error: A, refetchOrders: j, hasMore: M, loadMore: N } = a(), { installations: P, refetch: te } = i();
|
|
66
66
|
t({
|
|
67
67
|
onData: () => {
|
|
68
68
|
j();
|