@burdenoff/microfe-store 2026.614.1 → 2026.623.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.
|
@@ -3,9 +3,9 @@ import { useCart as t } from "../hooks/useCart.js";
|
|
|
3
3
|
import { formatNumber as n, formatPrice as r } from "../utils/index.js";
|
|
4
4
|
import { useCreateReview as ee, useDeleteReview as te, useMarkReviewHelpful as ne, useStoreProductDetails as re, useUpdateReview as ie } from "../hooks/useStoreGraphQL.js";
|
|
5
5
|
import { useInstallations as ae } from "../hooks/useInstallations.js";
|
|
6
|
-
import { nativeConfirm as oe, nativeImpact as se, nativeNotify as
|
|
7
|
-
import { InstallAppModal as
|
|
8
|
-
import { useCallback as
|
|
6
|
+
import { nativeConfirm as oe, nativeImpact as se, nativeNotify as i } from "../utils/nativeBridge.js";
|
|
7
|
+
import { InstallAppModal as ce } from "../components/InstallAppModal.js";
|
|
8
|
+
import { useCallback as a, useEffect as le, useMemo as ue, useRef as de, useState as o } from "react";
|
|
9
9
|
import { AlertCircle as s, ArrowLeft as fe, Check as pe, Loader2 as me, Package as he, ShieldCheck as c, ShoppingCart as ge, Star as l, ThumbsUp as u } from "lucide-react";
|
|
10
10
|
import { Fragment as _e, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
11
|
import { useLocation as ve, useNavigate as ye, useParams as be } from "react-router-dom";
|
|
@@ -448,13 +448,13 @@ var Se = (e, t) => ({
|
|
|
448
448
|
]
|
|
449
449
|
})
|
|
450
450
|
}), De = () => {
|
|
451
|
-
let { productId: s } = be(), u = ye(), De = ve(), { basePath: p, workspaceId: m } = e(), { addProduct: h, cartItems: Oe, addingToCart:
|
|
452
|
-
filter:
|
|
451
|
+
let { productId: s } = be(), u = ye(), De = ve(), { basePath: p, workspaceId: m } = e(), { addProduct: h, cartItems: Oe, addingToCart: ke, createOrder: Ae, checkingOut: je } = t(), { installations: Me, refetch: g } = ae({
|
|
452
|
+
filter: ue(() => s && m ? {
|
|
453
453
|
productId: s,
|
|
454
454
|
workspaceId: m
|
|
455
455
|
} : void 0, [s, m]),
|
|
456
456
|
limit: 1
|
|
457
|
-
}),
|
|
457
|
+
}), Ne = Me.some((e) => e.productId === s && e.workspaceId === m && e.status === "ACTIVE"), { createReview: _, loading: v } = ee(), { updateReview: y, loading: Pe } = ie(), { deleteReview: b, loading: Fe } = te(), { markHelpful: Ie, loading: Le } = ne(), x = xe(), [S, Re] = o(!1), [C, ze] = o(!1), [Be, w] = o(!1), [T, E] = o(null), [D, O] = o(null), [Ve, k] = o("success"), [A, j] = o(!1), [M, N] = o(""), [P, F] = o(""), [I, L] = o(5), [He, R] = o(null), [Ue, z] = o(!1), { data: We, loading: Ge, error: B, refetch: V } = re({
|
|
458
458
|
id: s,
|
|
459
459
|
slug: s,
|
|
460
460
|
includeReviews: !0,
|
|
@@ -462,16 +462,16 @@ var Se = (e, t) => ({
|
|
|
462
462
|
includeRelated: !0,
|
|
463
463
|
relatedLimit: 4,
|
|
464
464
|
includeVersions: !0
|
|
465
|
-
}), H =
|
|
465
|
+
}), H = We, U = H?.product, W = H?.publisher, G = Oe.some((e) => e.productId === U?.id), Ke = a(async () => {
|
|
466
466
|
if (U) {
|
|
467
|
-
if (
|
|
467
|
+
if (E(null), G) {
|
|
468
468
|
u(`${p}/cart`);
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
try {
|
|
472
472
|
await h(Se(U, W), void 0, 1);
|
|
473
473
|
} catch (e) {
|
|
474
|
-
console.error("Failed to add product to cart:", e),
|
|
474
|
+
console.error("Failed to add product to cart:", e), E("Failed to add this product to cart. Please try again.");
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
}, [
|
|
@@ -481,11 +481,11 @@ var Se = (e, t) => ({
|
|
|
481
481
|
G,
|
|
482
482
|
u,
|
|
483
483
|
p
|
|
484
|
-
]),
|
|
484
|
+
]), qe = a(async () => {
|
|
485
485
|
if (U) {
|
|
486
|
-
|
|
486
|
+
E(null), w(!0);
|
|
487
487
|
try {
|
|
488
|
-
let e = U.price || 0, t = await
|
|
488
|
+
let e = U.price || 0, t = await Ae({
|
|
489
489
|
total: e,
|
|
490
490
|
lineItems: [{
|
|
491
491
|
productId: U.id,
|
|
@@ -498,95 +498,99 @@ var Se = (e, t) => ({
|
|
|
498
498
|
}],
|
|
499
499
|
billingAccountId: ""
|
|
500
500
|
});
|
|
501
|
-
t?.id ? u(`/billing/checkout/store/${t.id}${De.search}`) : (console.error("Failed to create order"),
|
|
501
|
+
t?.id ? u(`/billing/checkout/store/${t.id}${De.search}`) : (console.error("Failed to create order"), E("Failed to create order. Please try again."), w(!1));
|
|
502
502
|
} catch (e) {
|
|
503
|
-
console.error("Buy Now error:", e),
|
|
503
|
+
console.error("Buy Now error:", e), E(e instanceof Error ? e.message : "Failed to start checkout"), w(!1);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
}, [
|
|
507
507
|
U,
|
|
508
|
-
|
|
508
|
+
Ae,
|
|
509
509
|
u
|
|
510
|
-
]),
|
|
511
|
-
U &&
|
|
512
|
-
}, [U]),
|
|
513
|
-
|
|
514
|
-
let
|
|
515
|
-
|
|
516
|
-
let e =
|
|
517
|
-
e &&
|
|
510
|
+
]), Je = a(() => {
|
|
511
|
+
U && z(!0);
|
|
512
|
+
}, [U]), Ye = de(U);
|
|
513
|
+
Ye.current = U;
|
|
514
|
+
let Xe = de(x);
|
|
515
|
+
Xe.current = x, le(() => {
|
|
516
|
+
let e = Ye.current;
|
|
517
|
+
e && Xe.current.emit("store.product.viewed", {
|
|
518
518
|
productId: e.id,
|
|
519
519
|
productSlug: e.slug,
|
|
520
520
|
productType: e.type,
|
|
521
521
|
pricingModel: e.pricingModel
|
|
522
522
|
});
|
|
523
523
|
}, [U?.id]);
|
|
524
|
-
let
|
|
525
|
-
U && (
|
|
524
|
+
let Ze = a((e, t) => {
|
|
525
|
+
U && (x.emit("store.product.installed", {
|
|
526
526
|
productId: U.id,
|
|
527
527
|
workspaceId: e
|
|
528
|
-
}), console.log(`Successfully installed ${U.name} to workspace ${t} (${e})`));
|
|
529
|
-
}, [
|
|
528
|
+
}), console.log(`Successfully installed ${U.name} to workspace ${t} (${e})`), g());
|
|
529
|
+
}, [
|
|
530
|
+
U,
|
|
531
|
+
x,
|
|
532
|
+
g
|
|
533
|
+
]), Qe = a((e) => {
|
|
530
534
|
console.error("Installation failed:", e.message);
|
|
531
|
-
}, []),
|
|
532
|
-
|
|
533
|
-
}, [H?.userReview]),
|
|
535
|
+
}, []), $e = a(() => {
|
|
536
|
+
N(H?.userReview?.title ?? ""), F(H?.userReview?.comment ?? ""), L(H?.userReview?.rating ?? 5), O(null), k("success"), j(!0);
|
|
537
|
+
}, [H?.userReview]), et = a(async () => {
|
|
534
538
|
if (!U) return;
|
|
535
|
-
if (
|
|
536
|
-
|
|
539
|
+
if (I < 1 || I > 5) {
|
|
540
|
+
k("error"), O("Choose a rating from 1 to 5 stars.");
|
|
537
541
|
return;
|
|
538
542
|
}
|
|
539
543
|
let e = {
|
|
540
544
|
productId: U.id,
|
|
541
|
-
rating:
|
|
542
|
-
title:
|
|
543
|
-
comment:
|
|
545
|
+
rating: I,
|
|
546
|
+
title: M.trim() || void 0,
|
|
547
|
+
comment: P.trim() || void 0
|
|
544
548
|
};
|
|
545
|
-
if (!(H?.userReview ? await
|
|
549
|
+
if (!(H?.userReview ? await y(H.userReview.id, {
|
|
546
550
|
rating: e.rating,
|
|
547
551
|
title: e.title,
|
|
548
552
|
comment: e.comment
|
|
549
|
-
}) : await
|
|
550
|
-
|
|
553
|
+
}) : await _(e))) {
|
|
554
|
+
k("error"), O("We could not save your review. Please try again.");
|
|
551
555
|
return;
|
|
552
556
|
}
|
|
553
|
-
|
|
557
|
+
k("success"), O(H?.userReview ? "Your review was updated." : "Your review was submitted."), j(!1), x.emit("store.review.submitted", {
|
|
554
558
|
productId: U.id,
|
|
555
|
-
rating:
|
|
559
|
+
rating: I
|
|
556
560
|
}), await V();
|
|
557
561
|
}, [
|
|
558
|
-
|
|
559
|
-
|
|
562
|
+
x,
|
|
563
|
+
_,
|
|
560
564
|
U,
|
|
561
565
|
H?.userReview,
|
|
562
566
|
V,
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
]),
|
|
567
|
+
P,
|
|
568
|
+
I,
|
|
569
|
+
M,
|
|
570
|
+
y
|
|
571
|
+
]), tt = a(async () => {
|
|
568
572
|
if (H?.userReview && (se("medium"), await oe({
|
|
569
573
|
title: "Delete review",
|
|
570
574
|
message: "Are you sure you want to remove your review?",
|
|
571
575
|
okButtonTitle: "Delete",
|
|
572
576
|
cancelButtonTitle: "Cancel"
|
|
573
577
|
}) !== !1)) {
|
|
574
|
-
if (!await
|
|
575
|
-
|
|
578
|
+
if (!await b(H.userReview.id)) {
|
|
579
|
+
k("error"), O("We could not remove your review. Please try again."), i("error");
|
|
576
580
|
return;
|
|
577
581
|
}
|
|
578
|
-
|
|
582
|
+
k("success"), O("Your review was removed."), j(!1), N(""), F(""), L(5), i("success"), await V();
|
|
579
583
|
}
|
|
580
584
|
}, [
|
|
581
|
-
|
|
585
|
+
b,
|
|
582
586
|
H?.userReview,
|
|
583
587
|
V
|
|
584
|
-
]),
|
|
585
|
-
|
|
586
|
-
}, [
|
|
587
|
-
if (
|
|
588
|
-
if (
|
|
589
|
-
error:
|
|
588
|
+
]), nt = a(async (e) => {
|
|
589
|
+
R(e), await Ie(e) && await V(), R(null);
|
|
590
|
+
}, [Ie, V]);
|
|
591
|
+
if (Ge) return /* @__PURE__ */ d(Te, {});
|
|
592
|
+
if (B) return /* @__PURE__ */ d(Ee, {
|
|
593
|
+
error: B,
|
|
590
594
|
onRetry: V,
|
|
591
595
|
onBack: () => u(`${p}/marketplace`)
|
|
592
596
|
});
|
|
@@ -612,7 +616,7 @@ var Se = (e, t) => ({
|
|
|
612
616
|
]
|
|
613
617
|
})
|
|
614
618
|
});
|
|
615
|
-
let { reviews: K, reviewsCount:
|
|
619
|
+
let { reviews: K, reviewsCount: rt, relatedProducts: q, ratingDistribution: J, isPurchased: Y, userEntitlement: X } = H, Z = U, Q = J ? J.fiveStars + J.fourStars + J.threeStars + J.twoStars + J.oneStar : 0, it = J ? [
|
|
616
620
|
{
|
|
617
621
|
stars: 5,
|
|
618
622
|
count: J.fiveStars,
|
|
@@ -638,7 +642,7 @@ var Se = (e, t) => ({
|
|
|
638
642
|
count: J.oneStar,
|
|
639
643
|
percentage: Q > 0 ? J.oneStar / Q * 100 : 0
|
|
640
644
|
}
|
|
641
|
-
] : [],
|
|
645
|
+
] : [], at = Z.requiredPermissions || [], ot = Z.integrationDeps || [], st = () => Z.pricingModel === "FREE" ? "Free" : Z.pricingModel === "SUBSCRIPTION" ? `${r(Z.price, Z.currency)}/mo` : r(Z.price, Z.currency), $ = Z.pricingModel === "FREE" || Z.price === 0;
|
|
642
646
|
return /* @__PURE__ */ f("div", {
|
|
643
647
|
className: "h-full overflow-y-auto bg-bg-base",
|
|
644
648
|
children: [
|
|
@@ -707,7 +711,7 @@ var Se = (e, t) => ({
|
|
|
707
711
|
/* @__PURE__ */ d(l, { className: "size-4 fill-current text-status-warning-text" }),
|
|
708
712
|
/* @__PURE__ */ f("span", {
|
|
709
713
|
className: "ml-1 text-xs text-text-muted",
|
|
710
|
-
children: [n(
|
|
714
|
+
children: [n(rt || Z.reviewCount), " reviews"]
|
|
711
715
|
})
|
|
712
716
|
]
|
|
713
717
|
}),
|
|
@@ -733,14 +737,14 @@ var Se = (e, t) => ({
|
|
|
733
737
|
})
|
|
734
738
|
]
|
|
735
739
|
}),
|
|
736
|
-
|
|
740
|
+
T && /* @__PURE__ */ d("div", {
|
|
737
741
|
role: "alert",
|
|
738
742
|
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",
|
|
739
|
-
children:
|
|
743
|
+
children: T
|
|
740
744
|
}),
|
|
741
745
|
/* @__PURE__ */ f("div", {
|
|
742
746
|
className: "mb-6 flex items-center gap-3",
|
|
743
|
-
children: [
|
|
747
|
+
children: [Ne ? /* @__PURE__ */ f("button", {
|
|
744
748
|
type: "button",
|
|
745
749
|
disabled: !0,
|
|
746
750
|
className: "flex items-center gap-2 rounded-full bg-status-success-bg-subtle px-8 py-3 font-medium text-status-success-text cursor-default",
|
|
@@ -757,26 +761,26 @@ var Se = (e, t) => ({
|
|
|
757
761
|
}), "Installed"]
|
|
758
762
|
}) : Y && !$ ? /* @__PURE__ */ d("button", {
|
|
759
763
|
type: "button",
|
|
760
|
-
onClick:
|
|
764
|
+
onClick: Je,
|
|
761
765
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
762
766
|
children: "Install to Workspace"
|
|
763
767
|
}) : $ ? /* @__PURE__ */ d("button", {
|
|
764
768
|
type: "button",
|
|
765
|
-
onClick:
|
|
769
|
+
onClick: Je,
|
|
766
770
|
className: "cursor-pointer rounded-full bg-action-primary-bg px-8 py-3 font-medium text-action-primary-text transition-opacity hover:opacity-90",
|
|
767
771
|
children: "Install"
|
|
768
772
|
}) : /* @__PURE__ */ d("button", {
|
|
769
773
|
type: "button",
|
|
770
|
-
onClick:
|
|
771
|
-
disabled:
|
|
774
|
+
onClick: qe,
|
|
775
|
+
disabled: Be || je,
|
|
772
776
|
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",
|
|
773
|
-
children:
|
|
777
|
+
children: Be || je ? /* @__PURE__ */ f(_e, { children: [/* @__PURE__ */ d(me, { className: "size-4 animate-spin" }), "Processing…"] }) : `Buy ${st()}`
|
|
774
778
|
}), !$ && !Y && /* @__PURE__ */ f("button", {
|
|
775
779
|
type: "button",
|
|
776
|
-
onClick:
|
|
777
|
-
disabled:
|
|
780
|
+
onClick: Ke,
|
|
781
|
+
disabled: ke,
|
|
778
782
|
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",
|
|
779
|
-
children: [
|
|
783
|
+
children: [ke ? /* @__PURE__ */ d(me, { className: "size-4 animate-spin" }) : G ? /* @__PURE__ */ d(pe, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ d(ge, { className: "size-4" }), G ? "In Cart" : "Add to Cart"]
|
|
780
784
|
})]
|
|
781
785
|
}),
|
|
782
786
|
/* @__PURE__ */ f("p", {
|
|
@@ -850,13 +854,13 @@ var Se = (e, t) => ({
|
|
|
850
854
|
/* @__PURE__ */ f("div", {
|
|
851
855
|
className: "text-sm leading-relaxed text-text-secondary",
|
|
852
856
|
children: [/* @__PURE__ */ d("p", {
|
|
853
|
-
className:
|
|
857
|
+
className: S ? "" : "line-clamp-4",
|
|
854
858
|
children: Z.longDescription || Z.description || "No description available."
|
|
855
859
|
}), ((Z.longDescription || Z.description)?.length ?? 0) > 200 && /* @__PURE__ */ d("button", {
|
|
856
860
|
type: "button",
|
|
857
|
-
onClick: () =>
|
|
861
|
+
onClick: () => Re(!S),
|
|
858
862
|
className: "cursor-pointer mt-3 text-sm font-medium text-text-link",
|
|
859
|
-
children:
|
|
863
|
+
children: S ? "Show less" : "Show more"
|
|
860
864
|
})]
|
|
861
865
|
}),
|
|
862
866
|
Z.tags && Z.tags.length > 0 && /* @__PURE__ */ d("div", {
|
|
@@ -901,12 +905,12 @@ var Se = (e, t) => ({
|
|
|
901
905
|
}),
|
|
902
906
|
/* @__PURE__ */ f("p", {
|
|
903
907
|
className: "text-sm text-text-muted",
|
|
904
|
-
children: [n(
|
|
908
|
+
children: [n(rt || Z.reviewCount), " reviews"]
|
|
905
909
|
})
|
|
906
910
|
]
|
|
907
|
-
}),
|
|
911
|
+
}), it.length > 0 && /* @__PURE__ */ d("div", {
|
|
908
912
|
className: "flex-1 space-y-1.5",
|
|
909
|
-
children:
|
|
913
|
+
children: it.map((e) => /* @__PURE__ */ d(Ce, { ...e }, e.stars))
|
|
910
914
|
})]
|
|
911
915
|
}) : /* @__PURE__ */ f("div", {
|
|
912
916
|
className: "flex flex-col items-center justify-center py-6 text-center",
|
|
@@ -932,18 +936,18 @@ var Se = (e, t) => ({
|
|
|
932
936
|
]
|
|
933
937
|
}), /* @__PURE__ */ f("div", {
|
|
934
938
|
className: "mt-6 border-t border-border-default pt-4",
|
|
935
|
-
children: [
|
|
936
|
-
role:
|
|
937
|
-
className: `mb-3 rounded-lg px-3 py-2 text-sm ${
|
|
938
|
-
children:
|
|
939
|
+
children: [D && /* @__PURE__ */ d("p", {
|
|
940
|
+
role: Ve === "success" ? "status" : "alert",
|
|
941
|
+
className: `mb-3 rounded-lg px-3 py-2 text-sm ${Ve === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
942
|
+
children: D
|
|
939
943
|
}), Y || H?.userReview ? /* @__PURE__ */ f("div", {
|
|
940
944
|
className: "space-y-4",
|
|
941
945
|
children: [/* @__PURE__ */ d("button", {
|
|
942
946
|
type: "button",
|
|
943
|
-
onClick: () =>
|
|
947
|
+
onClick: () => A ? j(!1) : $e(),
|
|
944
948
|
className: "w-full cursor-pointer py-2 text-center text-sm font-medium text-text-primary transition-colors hover:text-text-link",
|
|
945
|
-
children: H?.userReview ?
|
|
946
|
-
}),
|
|
949
|
+
children: H?.userReview ? A ? "Cancel review editing" : "Edit your review" : A ? "Cancel review" : "Write a Review"
|
|
950
|
+
}), A && /* @__PURE__ */ f("div", {
|
|
947
951
|
className: "rounded-xl border border-border-default bg-bg-sunken p-4",
|
|
948
952
|
children: [
|
|
949
953
|
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
@@ -959,8 +963,8 @@ var Se = (e, t) => ({
|
|
|
959
963
|
5
|
|
960
964
|
].map((e) => /* @__PURE__ */ f("button", {
|
|
961
965
|
type: "button",
|
|
962
|
-
onClick: () =>
|
|
963
|
-
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${
|
|
966
|
+
onClick: () => L(e),
|
|
967
|
+
className: `cursor-pointer rounded-full border px-3 py-1.5 text-sm transition-colors ${I === e ? "border-action-primary-border bg-action-primary-bg text-action-primary-text" : "border-border-default bg-bg-surface text-text-primary hover:bg-bg-surface"}`,
|
|
964
968
|
children: [e, " ★"]
|
|
965
969
|
}, e))
|
|
966
970
|
})] }),
|
|
@@ -968,8 +972,8 @@ var Se = (e, t) => ({
|
|
|
968
972
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
969
973
|
children: ["Title", /* @__PURE__ */ d("input", {
|
|
970
974
|
"aria-label": "Review title",
|
|
971
|
-
value:
|
|
972
|
-
onChange: (e) =>
|
|
975
|
+
value: M,
|
|
976
|
+
onChange: (e) => N(e.target.value),
|
|
973
977
|
className: "mt-2 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-border",
|
|
974
978
|
placeholder: "Summarize your experience"
|
|
975
979
|
})]
|
|
@@ -978,8 +982,8 @@ var Se = (e, t) => ({
|
|
|
978
982
|
className: "mt-4 block text-sm font-medium text-text-primary",
|
|
979
983
|
children: ["Review", /* @__PURE__ */ d("textarea", {
|
|
980
984
|
"aria-label": "Review body",
|
|
981
|
-
value:
|
|
982
|
-
onChange: (e) =>
|
|
985
|
+
value: P,
|
|
986
|
+
onChange: (e) => F(e.target.value),
|
|
983
987
|
rows: 4,
|
|
984
988
|
required: !0,
|
|
985
989
|
"aria-required": "true",
|
|
@@ -991,16 +995,16 @@ var Se = (e, t) => ({
|
|
|
991
995
|
className: "mt-4 flex flex-wrap gap-3",
|
|
992
996
|
children: [/* @__PURE__ */ d("button", {
|
|
993
997
|
type: "button",
|
|
994
|
-
onClick:
|
|
995
|
-
disabled:
|
|
998
|
+
onClick: et,
|
|
999
|
+
disabled: v || Pe,
|
|
996
1000
|
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",
|
|
997
|
-
children:
|
|
1001
|
+
children: v || Pe ? "Saving..." : H?.userReview ? "Update Review" : "Submit Review"
|
|
998
1002
|
}), H?.userReview && /* @__PURE__ */ d("button", {
|
|
999
1003
|
type: "button",
|
|
1000
|
-
onClick:
|
|
1001
|
-
disabled:
|
|
1004
|
+
onClick: tt,
|
|
1005
|
+
disabled: Fe,
|
|
1002
1006
|
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",
|
|
1003
|
-
children:
|
|
1007
|
+
children: Fe ? "Removing..." : "Delete Review"
|
|
1004
1008
|
})]
|
|
1005
1009
|
})
|
|
1006
1010
|
]
|
|
@@ -1015,16 +1019,16 @@ var Se = (e, t) => ({
|
|
|
1015
1019
|
className: "mt-4 space-y-3",
|
|
1016
1020
|
children: [/* @__PURE__ */ d("ul", {
|
|
1017
1021
|
className: "space-y-3",
|
|
1018
|
-
children: (
|
|
1022
|
+
children: (C ? K : K.slice(0, 2)).map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(we, {
|
|
1019
1023
|
review: e,
|
|
1020
|
-
onMarkHelpful:
|
|
1021
|
-
markingHelpful:
|
|
1024
|
+
onMarkHelpful: nt,
|
|
1025
|
+
markingHelpful: Le && He === e.id
|
|
1022
1026
|
}) }, e.id))
|
|
1023
1027
|
}), K.length > 2 && /* @__PURE__ */ d("button", {
|
|
1024
1028
|
type: "button",
|
|
1025
|
-
onClick: () =>
|
|
1029
|
+
onClick: () => ze(!C),
|
|
1026
1030
|
className: "cursor-pointer text-sm font-medium text-text-link",
|
|
1027
|
-
children:
|
|
1031
|
+
children: C ? "Show less" : `Show all ${K.length} reviews`
|
|
1028
1032
|
})]
|
|
1029
1033
|
}),
|
|
1030
1034
|
(!K || K.length === 0) && /* @__PURE__ */ d("p", {
|
|
@@ -1033,14 +1037,14 @@ var Se = (e, t) => ({
|
|
|
1033
1037
|
})
|
|
1034
1038
|
]
|
|
1035
1039
|
}),
|
|
1036
|
-
|
|
1040
|
+
at.length > 0 && /* @__PURE__ */ f("section", {
|
|
1037
1041
|
className: "mb-8",
|
|
1038
1042
|
children: [/* @__PURE__ */ d("h2", {
|
|
1039
1043
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1040
1044
|
children: "Required Permissions"
|
|
1041
1045
|
}), /* @__PURE__ */ d("div", {
|
|
1042
1046
|
className: "space-y-2",
|
|
1043
|
-
children:
|
|
1047
|
+
children: at.map((e) => /* @__PURE__ */ f("div", {
|
|
1044
1048
|
className: "flex items-center gap-3 rounded-lg bg-bg-surface px-4 py-3",
|
|
1045
1049
|
children: [/* @__PURE__ */ d(c, { className: "size-5 text-status-success-text" }), /* @__PURE__ */ d("span", {
|
|
1046
1050
|
className: "text-sm text-text-primary",
|
|
@@ -1049,14 +1053,14 @@ var Se = (e, t) => ({
|
|
|
1049
1053
|
}, e))
|
|
1050
1054
|
})]
|
|
1051
1055
|
}),
|
|
1052
|
-
|
|
1056
|
+
ot.length > 0 && /* @__PURE__ */ f("section", {
|
|
1053
1057
|
className: "mb-8",
|
|
1054
1058
|
children: [/* @__PURE__ */ d("h2", {
|
|
1055
1059
|
className: "mb-4 text-lg font-medium text-text-primary",
|
|
1056
1060
|
children: "Integrations"
|
|
1057
1061
|
}), /* @__PURE__ */ d("div", {
|
|
1058
1062
|
className: "flex flex-wrap gap-2",
|
|
1059
|
-
children:
|
|
1063
|
+
children: ot.map((e) => /* @__PURE__ */ d("span", {
|
|
1060
1064
|
className: "rounded-lg bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
|
|
1061
1065
|
children: e
|
|
1062
1066
|
}, e))
|
|
@@ -1218,9 +1222,9 @@ var Se = (e, t) => ({
|
|
|
1218
1222
|
})]
|
|
1219
1223
|
})
|
|
1220
1224
|
}),
|
|
1221
|
-
Z && /* @__PURE__ */ d(
|
|
1222
|
-
isOpen:
|
|
1223
|
-
onClose: () =>
|
|
1225
|
+
Z && /* @__PURE__ */ d(ce, {
|
|
1226
|
+
isOpen: Ue,
|
|
1227
|
+
onClose: () => z(!1),
|
|
1224
1228
|
app: {
|
|
1225
1229
|
id: Z.id,
|
|
1226
1230
|
name: Z.name,
|
|
@@ -1230,8 +1234,8 @@ var Se = (e, t) => ({
|
|
|
1230
1234
|
version: Z.manifestVersion
|
|
1231
1235
|
},
|
|
1232
1236
|
purchaseState: Y && !$ ? "purchased" : "free",
|
|
1233
|
-
onInstallSuccess:
|
|
1234
|
-
onInstallError:
|
|
1237
|
+
onInstallSuccess: Ze,
|
|
1238
|
+
onInstallError: Qe
|
|
1235
1239
|
})
|
|
1236
1240
|
]
|
|
1237
1241
|
});
|