@burdenoff/microfe-store 2026.720.1 → 2026.720.3
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/components/MarkdownEditor.d.ts +12 -0
- package/dist/components/MarkdownEditor.js +117 -0
- package/dist/components/MarkdownEditor.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/generated/global-operations.d.ts +3 -0
- package/dist/generated/global-operations.js +3 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +1 -0
- package/dist/generated/global-types.js.map +1 -1
- package/dist/hooks/useInstallations.d.ts +3 -0
- package/dist/hooks/useInstallations.js.map +1 -1
- package/dist/pages/AdminStoresPage.js +203 -207
- package/dist/pages/AdminStoresPage.js.map +1 -1
- package/dist/pages/AdminSubmissionsQueuePage.js +85 -84
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/InstalledAppsPage.js +11 -3
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +94 -93
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,13 +6,14 @@ import { InstallAppModal as ae } from "../components/InstallAppModal.js";
|
|
|
6
6
|
import { useInstallations as oe } from "../hooks/useInstallations.js";
|
|
7
7
|
import { nativeConfirm as se, nativeImpact as ce, nativeNotify as le } from "../utils/nativeBridge.js";
|
|
8
8
|
import { useCallback as i, useEffect as ue, useMemo as de, useRef as fe, useState as a } from "react";
|
|
9
|
-
import {
|
|
9
|
+
import { Markdown as pe } from "@burdenoff/fe-libs/shared/components";
|
|
10
|
+
import { AlertCircle as o, ArrowLeft as me, Check as he, Loader2 as ge, Package as s, ShieldCheck as c, ShoppingCart as _e, Star as l, ThumbsUp as u } from "lucide-react";
|
|
10
11
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
-
import { useLocation as
|
|
12
|
-
import { EmphasisPanel as
|
|
13
|
-
import { useEventBus as
|
|
12
|
+
import { useLocation as ve, useNavigate as ye, useParams as be } from "react-router-dom";
|
|
13
|
+
import { EmphasisPanel as xe, GlassCard as m, IllustratedEmptyState as Se, NextSteps as Ce, PagePurpose as we } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { useEventBus as Te } from "@burdenoff/fe-libs/shared/events";
|
|
14
15
|
//#region src/pages/ProductDetailPage.tsx
|
|
15
|
-
var
|
|
16
|
+
var Ee = (e, t) => ({
|
|
16
17
|
id: e.id,
|
|
17
18
|
publisherId: t?.id || "",
|
|
18
19
|
publisher: {
|
|
@@ -84,7 +85,7 @@ var Te = (e, t) => ({
|
|
|
84
85
|
createdAt: e.createdAt,
|
|
85
86
|
updatedAt: e.updatedAt,
|
|
86
87
|
publishedAt: e.publishedAt
|
|
87
|
-
}),
|
|
88
|
+
}), De = ({ stars: e, percentage: t, count: r }) => /* @__PURE__ */ p("div", {
|
|
88
89
|
className: "flex items-center gap-2",
|
|
89
90
|
children: [
|
|
90
91
|
/* @__PURE__ */ f("span", {
|
|
@@ -103,7 +104,7 @@ var Te = (e, t) => ({
|
|
|
103
104
|
children: n(r)
|
|
104
105
|
})
|
|
105
106
|
]
|
|
106
|
-
}),
|
|
107
|
+
}), Oe = ({ review: e, onMarkHelpful: t, markingHelpful: n }) => /* @__PURE__ */ p("div", {
|
|
107
108
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
|
|
108
109
|
children: [
|
|
109
110
|
/* @__PURE__ */ f("div", {
|
|
@@ -164,7 +165,7 @@ var Te = (e, t) => ({
|
|
|
164
165
|
})
|
|
165
166
|
})
|
|
166
167
|
]
|
|
167
|
-
}),
|
|
168
|
+
}), ke = () => /* @__PURE__ */ p("div", {
|
|
168
169
|
className: "h-full overflow-y-auto",
|
|
169
170
|
children: [/* @__PURE__ */ f("div", {
|
|
170
171
|
className: "sticky top-0 z-10 border-b border-border-default bg-bg-surface px-6 py-4",
|
|
@@ -418,7 +419,7 @@ var Te = (e, t) => ({
|
|
|
418
419
|
})
|
|
419
420
|
]
|
|
420
421
|
})]
|
|
421
|
-
}),
|
|
422
|
+
}), Ae = ({ error: e, onRetry: t, onBack: n }) => /* @__PURE__ */ f("div", {
|
|
422
423
|
className: "flex h-full items-center justify-center",
|
|
423
424
|
children: /* @__PURE__ */ p("div", {
|
|
424
425
|
className: "text-center",
|
|
@@ -448,14 +449,14 @@ var Te = (e, t) => ({
|
|
|
448
449
|
})
|
|
449
450
|
]
|
|
450
451
|
})
|
|
451
|
-
}),
|
|
452
|
-
let { productId: o } =
|
|
452
|
+
}), je = () => {
|
|
453
|
+
let { productId: o } = be(), u = ye(), je = ve(), { basePath: h, workspaceId: g } = e(), { addProduct: Me, cartItems: Ne, addingToCart: Pe, createOrder: Fe, checkingOut: Ie } = t(), { installations: Le, refetch: Re } = oe({
|
|
453
454
|
filter: de(() => o && g ? {
|
|
454
455
|
productId: o,
|
|
455
456
|
workspaceId: g
|
|
456
457
|
} : void 0, [o, g]),
|
|
457
458
|
limit: 1
|
|
458
|
-
}),
|
|
459
|
+
}), ze = Le.find((e) => e.productId === o && e.workspaceId === g && e.status === "ACTIVE"), _ = !!ze, v = ze?.version ?? null, { createReview: Be, loading: Ve } = ee(), { updateReview: He, loading: Ue } = ie(), { deleteReview: We, loading: Ge } = te(), { markHelpful: Ke, loading: qe } = ne(), y = Te(), [b, Je] = a(!1), [x, Ye] = a(!1), [Xe, S] = a(!1), [C, Ze] = a(1), [Qe, w] = a(null), [$e, T] = a(null), [et, E] = a("success"), [D, O] = a(!1), [k, A] = a(""), [j, M] = a(""), [N, P] = a(5), [tt, nt] = a(null), [rt, it] = a(!1), { data: at, loading: ot, error: st, refetch: F } = re({
|
|
459
460
|
id: o,
|
|
460
461
|
slug: o,
|
|
461
462
|
includeReviews: !0,
|
|
@@ -463,18 +464,18 @@ var Te = (e, t) => ({
|
|
|
463
464
|
includeRelated: !0,
|
|
464
465
|
relatedLimit: 4,
|
|
465
466
|
includeVersions: !0
|
|
466
|
-
}), I =
|
|
467
|
+
}), I = at, L = I?.product, R = I?.publisher, z = Ne.some((e) => e.productId === L?.id), ct = (e) => {
|
|
467
468
|
let t = e.split(".");
|
|
468
469
|
for (; t.length < 3;) t.push("0");
|
|
469
470
|
return t.join(".");
|
|
470
|
-
},
|
|
471
|
+
}, lt = L?.manifestVersion ?? null, ut = !!(_ && v && lt && ct(v) !== ct(lt)), dt = i(async () => {
|
|
471
472
|
if (L) {
|
|
472
473
|
if (w(null), z) {
|
|
473
474
|
u(`${h}/cart`);
|
|
474
475
|
return;
|
|
475
476
|
}
|
|
476
477
|
try {
|
|
477
|
-
await
|
|
478
|
+
await Me(Ee(L, R), void 0, C);
|
|
478
479
|
} catch (e) {
|
|
479
480
|
console.error("Failed to add product to cart:", e), w("Failed to add this product to cart. Please try again.");
|
|
480
481
|
}
|
|
@@ -482,12 +483,12 @@ var Te = (e, t) => ({
|
|
|
482
483
|
}, [
|
|
483
484
|
L,
|
|
484
485
|
R,
|
|
485
|
-
|
|
486
|
+
Me,
|
|
486
487
|
z,
|
|
487
488
|
u,
|
|
488
489
|
h,
|
|
489
490
|
C
|
|
490
|
-
]),
|
|
491
|
+
]), ft = i(async () => {
|
|
491
492
|
if (L) {
|
|
492
493
|
w(null), S(!0);
|
|
493
494
|
try {
|
|
@@ -499,12 +500,12 @@ var Te = (e, t) => ({
|
|
|
499
500
|
subtotal: e * C,
|
|
500
501
|
itemType: L.nature?.toLowerCase() || "digital",
|
|
501
502
|
pricingModel: L.pricingModel || "PAID_ONETIME"
|
|
502
|
-
}, n = await
|
|
503
|
+
}, n = await Fe({
|
|
503
504
|
total: e * C,
|
|
504
505
|
lineItems: [t],
|
|
505
506
|
billingAccountId: ""
|
|
506
507
|
});
|
|
507
|
-
n?.id ? u(`/billing/checkout/store/${n.id}${
|
|
508
|
+
n?.id ? u(`/billing/checkout/store/${n.id}${je.search}`) : (console.error("Failed to create order"), w("Failed to create order. Please try again."), S(!1));
|
|
508
509
|
} catch (e) {
|
|
509
510
|
console.error("Buy Now error:", e), w(e instanceof Error ? e.message : "Failed to start checkout"), S(!1);
|
|
510
511
|
}
|
|
@@ -512,36 +513,36 @@ var Te = (e, t) => ({
|
|
|
512
513
|
}, [
|
|
513
514
|
L,
|
|
514
515
|
C,
|
|
515
|
-
|
|
516
|
+
Fe,
|
|
516
517
|
u
|
|
517
518
|
]), B = i(() => {
|
|
518
|
-
L &&
|
|
519
|
-
}, [L]),
|
|
520
|
-
|
|
521
|
-
let
|
|
522
|
-
|
|
523
|
-
let e =
|
|
524
|
-
e &&
|
|
519
|
+
L && it(!0);
|
|
520
|
+
}, [L]), pt = fe(L);
|
|
521
|
+
pt.current = L;
|
|
522
|
+
let mt = fe(y);
|
|
523
|
+
mt.current = y, ue(() => {
|
|
524
|
+
let e = pt.current;
|
|
525
|
+
e && mt.current.emit("store.product.viewed", {
|
|
525
526
|
productId: e.id,
|
|
526
527
|
productSlug: e.slug,
|
|
527
528
|
productType: e.type,
|
|
528
529
|
pricingModel: e.pricingModel
|
|
529
530
|
});
|
|
530
531
|
}, [L?.id]);
|
|
531
|
-
let
|
|
532
|
+
let ht = i((e, t) => {
|
|
532
533
|
L && (y.emit("store.product.installed", {
|
|
533
534
|
productId: L.id,
|
|
534
535
|
workspaceId: e
|
|
535
|
-
}), console.log(`Successfully installed ${L.name} to workspace ${t} (${e})`),
|
|
536
|
+
}), console.log(`Successfully installed ${L.name} to workspace ${t} (${e})`), Re());
|
|
536
537
|
}, [
|
|
537
538
|
L,
|
|
538
539
|
y,
|
|
539
|
-
|
|
540
|
-
]),
|
|
540
|
+
Re
|
|
541
|
+
]), gt = i((e) => {
|
|
541
542
|
console.error("Installation failed:", e.message);
|
|
542
|
-
}, []),
|
|
543
|
+
}, []), _t = i(() => {
|
|
543
544
|
A(I?.userReview?.title ?? ""), M(I?.userReview?.comment ?? ""), P(I?.userReview?.rating ?? 5), T(null), E("success"), O(!0);
|
|
544
|
-
}, [I?.userReview]),
|
|
545
|
+
}, [I?.userReview]), vt = i(async () => {
|
|
545
546
|
if (!L) return;
|
|
546
547
|
if (N < 1 || N > 5) {
|
|
547
548
|
E("error"), T("Choose a rating from 1 to 5 stars.");
|
|
@@ -553,13 +554,13 @@ var Te = (e, t) => ({
|
|
|
553
554
|
title: k.trim() || void 0,
|
|
554
555
|
comment: j.trim() || void 0
|
|
555
556
|
}, t = I?.userReview ? {
|
|
556
|
-
data: await
|
|
557
|
+
data: await He(I.userReview.id, {
|
|
557
558
|
rating: e.rating,
|
|
558
559
|
title: e.title,
|
|
559
560
|
comment: e.comment
|
|
560
561
|
}),
|
|
561
562
|
errorMessage: null
|
|
562
|
-
} : await
|
|
563
|
+
} : await Be(e);
|
|
563
564
|
if (!t?.data) {
|
|
564
565
|
E("error"), T(t?.errorMessage ?? "We could not save your review. Please try again.");
|
|
565
566
|
return;
|
|
@@ -570,43 +571,43 @@ var Te = (e, t) => ({
|
|
|
570
571
|
}), await F();
|
|
571
572
|
}, [
|
|
572
573
|
y,
|
|
573
|
-
|
|
574
|
+
Be,
|
|
574
575
|
L,
|
|
575
576
|
I?.userReview,
|
|
576
577
|
F,
|
|
577
578
|
j,
|
|
578
579
|
N,
|
|
579
580
|
k,
|
|
580
|
-
|
|
581
|
-
]),
|
|
581
|
+
He
|
|
582
|
+
]), yt = i(async () => {
|
|
582
583
|
if (I?.userReview && (ce("medium"), await se({
|
|
583
584
|
title: "Delete review",
|
|
584
585
|
message: "Are you sure you want to remove your review?",
|
|
585
586
|
okButtonTitle: "Delete",
|
|
586
587
|
cancelButtonTitle: "Cancel"
|
|
587
588
|
}) !== !1)) {
|
|
588
|
-
if (!await
|
|
589
|
+
if (!await We(I.userReview.id)) {
|
|
589
590
|
E("error"), T("We could not remove your review. Please try again."), le("error");
|
|
590
591
|
return;
|
|
591
592
|
}
|
|
592
593
|
E("success"), T("Your review was removed."), O(!1), A(""), M(""), P(5), le("success"), await F();
|
|
593
594
|
}
|
|
594
595
|
}, [
|
|
595
|
-
|
|
596
|
+
We,
|
|
596
597
|
I?.userReview,
|
|
597
598
|
F
|
|
598
|
-
]),
|
|
599
|
-
|
|
600
|
-
}, [
|
|
601
|
-
if (
|
|
602
|
-
if (
|
|
603
|
-
error:
|
|
599
|
+
]), bt = i(async (e) => {
|
|
600
|
+
nt(e), await Ke(e) && await F(), nt(null);
|
|
601
|
+
}, [Ke, F]);
|
|
602
|
+
if (ot) return /* @__PURE__ */ f(ke, {});
|
|
603
|
+
if (st) return /* @__PURE__ */ f(Ae, {
|
|
604
|
+
error: st,
|
|
604
605
|
onRetry: F,
|
|
605
606
|
onBack: () => u(`${h}/marketplace`)
|
|
606
607
|
});
|
|
607
608
|
if (!I?.product) return /* @__PURE__ */ f("div", {
|
|
608
609
|
className: "flex h-full items-center justify-center p-6",
|
|
609
|
-
children: /* @__PURE__ */ f(
|
|
610
|
+
children: /* @__PURE__ */ f(Se, {
|
|
610
611
|
illustration: "empty-search",
|
|
611
612
|
title: "Product not found",
|
|
612
613
|
description: "The product you are looking for does not exist or has been removed.",
|
|
@@ -618,7 +619,7 @@ var Te = (e, t) => ({
|
|
|
618
619
|
})
|
|
619
620
|
})
|
|
620
621
|
});
|
|
621
|
-
let { reviews: V, reviewsCount:
|
|
622
|
+
let { reviews: V, reviewsCount: xt, relatedProducts: H, ratingDistribution: U, isPurchased: W, userEntitlement: G } = I, K = L, q = U ? U.fiveStars + U.fourStars + U.threeStars + U.twoStars + U.oneStar : 0, St = U ? [
|
|
622
623
|
{
|
|
623
624
|
stars: 5,
|
|
624
625
|
count: U.fiveStars,
|
|
@@ -644,7 +645,7 @@ var Te = (e, t) => ({
|
|
|
644
645
|
count: U.oneStar,
|
|
645
646
|
percentage: q > 0 ? U.oneStar / q * 100 : 0
|
|
646
647
|
}
|
|
647
|
-
] : [], J = K.requiredPermissions || [],
|
|
648
|
+
] : [], J = K.requiredPermissions || [], Ct = K.integrationDeps || [], wt = () => K.pricingModel === "FREE" ? "Free" : K.pricingModel === "SUBSCRIPTION" ? `${r(K.price, K.currency)}/mo` : r(K.price, K.currency), Y = K.pricingModel === "FREE" || K.price === 0, X = K.nature === "PHYSICAL", Z = X && K.trackInventory === !0, Q = K.stockQuantity ?? 0, $ = Z && Q <= 0;
|
|
648
649
|
return /* @__PURE__ */ p("div", {
|
|
649
650
|
className: "h-full overflow-y-auto bg-bg-base",
|
|
650
651
|
children: [
|
|
@@ -661,7 +662,7 @@ var Te = (e, t) => ({
|
|
|
661
662
|
type: "button",
|
|
662
663
|
onClick: () => u(-1),
|
|
663
664
|
className: "mb-6 cursor-pointer inline-flex items-center gap-2 text-sm text-text-muted transition-colors hover:text-text-primary",
|
|
664
|
-
children: [/* @__PURE__ */ f(
|
|
665
|
+
children: [/* @__PURE__ */ f(me, { className: "size-4" }), "Back"]
|
|
665
666
|
}),
|
|
666
667
|
/* @__PURE__ */ f("h1", {
|
|
667
668
|
className: "mb-3 text-4xl font-normal leading-tight text-text-primary lg:text-5xl",
|
|
@@ -707,7 +708,7 @@ var Te = (e, t) => ({
|
|
|
707
708
|
"+ downloads"
|
|
708
709
|
]
|
|
709
710
|
}),
|
|
710
|
-
/* @__PURE__ */ p(
|
|
711
|
+
/* @__PURE__ */ p(xe, {
|
|
711
712
|
className: "mb-6 p-5",
|
|
712
713
|
children: [
|
|
713
714
|
/* @__PURE__ */ p("div", {
|
|
@@ -734,7 +735,7 @@ var Te = (e, t) => ({
|
|
|
734
735
|
/* @__PURE__ */ f(l, { className: "size-4 fill-current text-status-warning-text" }),
|
|
735
736
|
/* @__PURE__ */ p("span", {
|
|
736
737
|
className: "ml-1 text-xs text-text-muted",
|
|
737
|
-
children: [n(
|
|
738
|
+
children: [n(xt || K.reviewCount), " reviews"]
|
|
738
739
|
})
|
|
739
740
|
]
|
|
740
741
|
}),
|
|
@@ -760,10 +761,10 @@ var Te = (e, t) => ({
|
|
|
760
761
|
})
|
|
761
762
|
]
|
|
762
763
|
}),
|
|
763
|
-
|
|
764
|
+
Qe && /* @__PURE__ */ f("div", {
|
|
764
765
|
role: "alert",
|
|
765
766
|
className: "mb-4 rounded-lg border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
766
|
-
children:
|
|
767
|
+
children: Qe
|
|
767
768
|
}),
|
|
768
769
|
X && /* @__PURE__ */ p("div", {
|
|
769
770
|
className: "mb-4 flex flex-wrap items-center gap-4",
|
|
@@ -787,7 +788,7 @@ var Te = (e, t) => ({
|
|
|
787
788
|
children: [
|
|
788
789
|
/* @__PURE__ */ f("button", {
|
|
789
790
|
type: "button",
|
|
790
|
-
onClick: () =>
|
|
791
|
+
onClick: () => Ze((e) => Math.max(1, e - 1)),
|
|
791
792
|
disabled: C <= 1,
|
|
792
793
|
"aria-label": "Decrease quantity",
|
|
793
794
|
className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
|
|
@@ -799,7 +800,7 @@ var Te = (e, t) => ({
|
|
|
799
800
|
}),
|
|
800
801
|
/* @__PURE__ */ f("button", {
|
|
801
802
|
type: "button",
|
|
802
|
-
onClick: () =>
|
|
803
|
+
onClick: () => Ze((e) => Z ? Math.min(Q, e + 1) : e + 1),
|
|
803
804
|
disabled: Z && C >= Q,
|
|
804
805
|
"aria-label": "Increase quantity",
|
|
805
806
|
className: "cursor-pointer px-3 py-1.5 text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-40",
|
|
@@ -826,7 +827,7 @@ var Te = (e, t) => ({
|
|
|
826
827
|
"aria-hidden": "true",
|
|
827
828
|
children: /* @__PURE__ */ f("polyline", { points: "2,8 6,12 14,4" })
|
|
828
829
|
}), "Installed"]
|
|
829
|
-
}),
|
|
830
|
+
}), ut && /* @__PURE__ */ p("button", {
|
|
830
831
|
type: "button",
|
|
831
832
|
onClick: B,
|
|
832
833
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
@@ -843,16 +844,16 @@ var Te = (e, t) => ({
|
|
|
843
844
|
children: "Install"
|
|
844
845
|
}) : /* @__PURE__ */ f("button", {
|
|
845
846
|
type: "button",
|
|
846
|
-
onClick:
|
|
847
|
-
disabled:
|
|
847
|
+
onClick: ft,
|
|
848
|
+
disabled: Xe || Ie || $,
|
|
848
849
|
className: "cursor-pointer flex items-center gap-2 rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-70",
|
|
849
|
-
children:
|
|
850
|
+
children: Xe || Ie ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ge, { className: "size-4 animate-spin" }), "Processing…"] }) : $ ? "Out of stock" : `Buy ${wt()}`
|
|
850
851
|
}), !Y && (!W || X) && /* @__PURE__ */ p("button", {
|
|
851
852
|
type: "button",
|
|
852
|
-
onClick:
|
|
853
|
-
disabled:
|
|
853
|
+
onClick: dt,
|
|
854
|
+
disabled: Pe || $,
|
|
854
855
|
className: "cursor-pointer flex items-center gap-2 rounded-full border border-border-default px-4 py-3 text-sm text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
|
|
855
|
-
children: [
|
|
856
|
+
children: [Pe ? /* @__PURE__ */ f(ge, { className: "size-4 animate-spin" }) : z ? /* @__PURE__ */ f(he, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ f(_e, { className: "size-4" }), z ? "In Cart" : "Add to Cart"]
|
|
856
857
|
})]
|
|
857
858
|
}),
|
|
858
859
|
X ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("p", {
|
|
@@ -954,7 +955,7 @@ var Te = (e, t) => ({
|
|
|
954
955
|
/* @__PURE__ */ p("main", {
|
|
955
956
|
className: "mx-auto max-w-7xl px-6 py-8",
|
|
956
957
|
children: [
|
|
957
|
-
/* @__PURE__ */ p(
|
|
958
|
+
/* @__PURE__ */ p(we, {
|
|
958
959
|
className: "mb-6",
|
|
959
960
|
children: [
|
|
960
961
|
"Everything you need to decide whether to install ",
|
|
@@ -962,7 +963,7 @@ var Te = (e, t) => ({
|
|
|
962
963
|
": what it does, screenshots, pricing, the permissions and integrations it needs, and real customer reviews. When you're ready, install it (free apps) or buy it, then add it to a workspace — and leave a review once you've used it."
|
|
963
964
|
]
|
|
964
965
|
}),
|
|
965
|
-
/* @__PURE__ */ f(
|
|
966
|
+
/* @__PURE__ */ f(Ce, {
|
|
966
967
|
className: "mb-8",
|
|
967
968
|
storageKey: "store-product-detail",
|
|
968
969
|
steps: [
|
|
@@ -976,7 +977,7 @@ var Te = (e, t) => ({
|
|
|
976
977
|
id: "buy",
|
|
977
978
|
label: W ? "Install to a workspace" : "Buy or add to cart",
|
|
978
979
|
description: W ? "You already own this — install it where you need it." : "Purchase now, or add it to your cart to check out later.",
|
|
979
|
-
onClick: W ? B :
|
|
980
|
+
onClick: W ? B : ft,
|
|
980
981
|
done: _
|
|
981
982
|
},
|
|
982
983
|
...J.length > 0 ? [{
|
|
@@ -1010,12 +1011,12 @@ var Te = (e, t) => ({
|
|
|
1010
1011
|
}),
|
|
1011
1012
|
/* @__PURE__ */ p("div", {
|
|
1012
1013
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
1013
|
-
children: [/* @__PURE__ */ f(
|
|
1014
|
+
children: [/* @__PURE__ */ f(pe, {
|
|
1014
1015
|
className: b ? "" : "line-clamp-4",
|
|
1015
1016
|
children: K.longDescription || K.description || "No description available."
|
|
1016
1017
|
}), ((K.longDescription || K.description)?.length ?? 0) > 200 && /* @__PURE__ */ f("button", {
|
|
1017
1018
|
type: "button",
|
|
1018
|
-
onClick: () =>
|
|
1019
|
+
onClick: () => Je(!b),
|
|
1019
1020
|
className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
|
|
1020
1021
|
children: b ? "Show less" : "Show more"
|
|
1021
1022
|
})]
|
|
@@ -1064,12 +1065,12 @@ var Te = (e, t) => ({
|
|
|
1064
1065
|
}),
|
|
1065
1066
|
/* @__PURE__ */ p("p", {
|
|
1066
1067
|
className: "text-sm text-text-muted",
|
|
1067
|
-
children: [n(
|
|
1068
|
+
children: [n(xt || K.reviewCount), " reviews"]
|
|
1068
1069
|
})
|
|
1069
1070
|
]
|
|
1070
|
-
}),
|
|
1071
|
+
}), St.length > 0 && /* @__PURE__ */ f("div", {
|
|
1071
1072
|
className: "flex-1 space-y-1.5",
|
|
1072
|
-
children:
|
|
1073
|
+
children: St.map((e) => /* @__PURE__ */ f(De, { ...e }, e.stars))
|
|
1073
1074
|
})]
|
|
1074
1075
|
}) : /* @__PURE__ */ p("div", {
|
|
1075
1076
|
className: "flex flex-col items-center justify-center py-6 text-center",
|
|
@@ -1095,15 +1096,15 @@ var Te = (e, t) => ({
|
|
|
1095
1096
|
]
|
|
1096
1097
|
}), /* @__PURE__ */ p("div", {
|
|
1097
1098
|
className: "mt-6 border-t border-border-seam pt-4",
|
|
1098
|
-
children: [
|
|
1099
|
-
role:
|
|
1100
|
-
className: `mb-3 rounded-lg px-3 py-2 text-sm ${
|
|
1101
|
-
children:
|
|
1099
|
+
children: [$e && /* @__PURE__ */ f("p", {
|
|
1100
|
+
role: et === "success" ? "status" : "alert",
|
|
1101
|
+
className: `mb-3 rounded-lg px-3 py-2 text-sm ${et === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
1102
|
+
children: $e
|
|
1102
1103
|
}), _ || I?.userReview ? /* @__PURE__ */ p("div", {
|
|
1103
1104
|
className: "space-y-4",
|
|
1104
1105
|
children: [/* @__PURE__ */ f("button", {
|
|
1105
1106
|
type: "button",
|
|
1106
|
-
onClick: () => D ? O(!1) :
|
|
1107
|
+
onClick: () => D ? O(!1) : _t(),
|
|
1107
1108
|
className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
|
|
1108
1109
|
children: I?.userReview ? D ? "Cancel review editing" : "Edit your review" : D ? "Cancel review" : "Write a Review"
|
|
1109
1110
|
}), D && /* @__PURE__ */ p("div", {
|
|
@@ -1154,16 +1155,16 @@ var Te = (e, t) => ({
|
|
|
1154
1155
|
className: "mt-4 flex flex-wrap gap-3",
|
|
1155
1156
|
children: [/* @__PURE__ */ f("button", {
|
|
1156
1157
|
type: "button",
|
|
1157
|
-
onClick:
|
|
1158
|
-
disabled:
|
|
1158
|
+
onClick: vt,
|
|
1159
|
+
disabled: Ve || Ue,
|
|
1159
1160
|
className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1160
|
-
children:
|
|
1161
|
+
children: Ve || Ue ? "Saving..." : I?.userReview ? "Update Review" : "Submit Review"
|
|
1161
1162
|
}), I?.userReview && /* @__PURE__ */ f("button", {
|
|
1162
1163
|
type: "button",
|
|
1163
|
-
onClick:
|
|
1164
|
-
disabled:
|
|
1164
|
+
onClick: yt,
|
|
1165
|
+
disabled: Ge,
|
|
1165
1166
|
className: "cursor-pointer rounded-lg border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-60",
|
|
1166
|
-
children:
|
|
1167
|
+
children: Ge ? "Removing..." : "Delete Review"
|
|
1167
1168
|
})]
|
|
1168
1169
|
})
|
|
1169
1170
|
]
|
|
@@ -1178,14 +1179,14 @@ var Te = (e, t) => ({
|
|
|
1178
1179
|
className: "mt-4 space-y-3",
|
|
1179
1180
|
children: [/* @__PURE__ */ f("ul", {
|
|
1180
1181
|
className: "space-y-3",
|
|
1181
|
-
children: (x ? V : V.slice(0, 2)).map((e) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(
|
|
1182
|
+
children: (x ? V : V.slice(0, 2)).map((e) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(Oe, {
|
|
1182
1183
|
review: e,
|
|
1183
|
-
onMarkHelpful:
|
|
1184
|
-
markingHelpful:
|
|
1184
|
+
onMarkHelpful: bt,
|
|
1185
|
+
markingHelpful: qe && tt === e.id
|
|
1185
1186
|
}) }, e.id))
|
|
1186
1187
|
}), V.length > 2 && /* @__PURE__ */ f("button", {
|
|
1187
1188
|
type: "button",
|
|
1188
|
-
onClick: () =>
|
|
1189
|
+
onClick: () => Ye(!x),
|
|
1189
1190
|
className: "cursor-pointer text-sm font-medium text-text-link",
|
|
1190
1191
|
children: x ? "Show less" : `Show all ${V.length} reviews`
|
|
1191
1192
|
})]
|
|
@@ -1213,14 +1214,14 @@ var Te = (e, t) => ({
|
|
|
1213
1214
|
}, e))
|
|
1214
1215
|
})]
|
|
1215
1216
|
}),
|
|
1216
|
-
|
|
1217
|
+
Ct.length > 0 && /* @__PURE__ */ p("section", {
|
|
1217
1218
|
className: "mb-8",
|
|
1218
1219
|
children: [/* @__PURE__ */ f("h2", {
|
|
1219
1220
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1220
1221
|
children: "Integrations"
|
|
1221
1222
|
}), /* @__PURE__ */ f("div", {
|
|
1222
1223
|
className: "flex flex-wrap gap-2",
|
|
1223
|
-
children:
|
|
1224
|
+
children: Ct.map((e) => /* @__PURE__ */ f("span", {
|
|
1224
1225
|
className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
|
|
1225
1226
|
children: e
|
|
1226
1227
|
}, e))
|
|
@@ -1385,8 +1386,8 @@ var Te = (e, t) => ({
|
|
|
1385
1386
|
]
|
|
1386
1387
|
}),
|
|
1387
1388
|
K && /* @__PURE__ */ f(ae, {
|
|
1388
|
-
isOpen:
|
|
1389
|
-
onClose: () =>
|
|
1389
|
+
isOpen: rt,
|
|
1390
|
+
onClose: () => it(!1),
|
|
1390
1391
|
app: {
|
|
1391
1392
|
id: K.id,
|
|
1392
1393
|
applicationId: K.productId,
|
|
@@ -1398,13 +1399,13 @@ var Te = (e, t) => ({
|
|
|
1398
1399
|
permissions: J.length > 0 ? J : void 0
|
|
1399
1400
|
},
|
|
1400
1401
|
purchaseState: W && !Y ? "purchased" : "free",
|
|
1401
|
-
onInstallSuccess:
|
|
1402
|
-
onInstallError:
|
|
1402
|
+
onInstallSuccess: ht,
|
|
1403
|
+
onInstallError: gt
|
|
1403
1404
|
})
|
|
1404
1405
|
]
|
|
1405
1406
|
});
|
|
1406
1407
|
};
|
|
1407
1408
|
//#endregion
|
|
1408
|
-
export {
|
|
1409
|
+
export { je as ProductDetailPage };
|
|
1409
1410
|
|
|
1410
1411
|
//# sourceMappingURL=ProductDetailPage.js.map
|