subos-frontend 1.0.31 → 1.0.33

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/index.js CHANGED
@@ -349,7 +349,7 @@ var filterPlansByTier = (plans, tierFilter) => {
349
349
  };
350
350
  var isPlanPopular = (plan) => {
351
351
  const planName = plan.name.toLowerCase();
352
- return planName.includes("growth");
352
+ return planName.includes("scale");
353
353
  };
354
354
  var getPlanDescription = (plan) => {
355
355
  const planName = plan.name.toLowerCase();
@@ -1470,7 +1470,15 @@ var PaymentCancelView = ({ details }) => {
1470
1470
  ] });
1471
1471
  };
1472
1472
  var PaymentCancelView_default = PaymentCancelView;
1473
- var PaymentSuccessView = ({ details }) => {
1473
+ var PaymentSuccessView = ({
1474
+ details,
1475
+ planName,
1476
+ planAmount,
1477
+ planCurrency = "USD",
1478
+ invoiceDownloadUrl,
1479
+ dashboardUrl = "/dashboard",
1480
+ supportUrl = "/support"
1481
+ }) => {
1474
1482
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden", children: [
1475
1483
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gradient-to-r from-green-500 to-green-600 text-white p-6 text-center", children: [
1476
1484
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl mb-2", children: "\u2705" }),
@@ -1485,9 +1493,18 @@ var PaymentSuccessView = ({ details }) => {
1485
1493
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600", children: "Payment Gateway" }),
1486
1494
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium capitalize", children: details.gateway })
1487
1495
  ] }),
1488
- details.sessionId && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1489
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600", children: "Session ID" }),
1490
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium font-mono text-sm", children: details.sessionId })
1496
+ planName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1497
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600", children: "Plan" }),
1498
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: planName })
1499
+ ] }),
1500
+ planAmount && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1501
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600", children: "Amount" }),
1502
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
1503
+ "$",
1504
+ planAmount,
1505
+ " ",
1506
+ planCurrency
1507
+ ] })
1491
1508
  ] }),
1492
1509
  details.paymentId && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
1493
1510
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-600", children: "Payment ID" }),
@@ -1507,32 +1524,40 @@ var PaymentSuccessView = ({ details }) => {
1507
1524
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-blue-900 mb-2", children: "What's Next?" }),
1508
1525
  /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "text-sm text-blue-800 space-y-1", children: [
1509
1526
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 You'll receive a confirmation email shortly" }),
1510
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Your subscription/purchase is now active" }),
1527
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Your subscription is now active" }),
1511
1528
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Access your dashboard to manage your account" })
1512
1529
  ] })
1513
1530
  ] }),
1514
1531
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
1515
- /* @__PURE__ */ jsxRuntime.jsx(
1532
+ invoiceDownloadUrl ? /* @__PURE__ */ jsxRuntime.jsx(
1533
+ "a",
1534
+ {
1535
+ href: invoiceDownloadUrl,
1536
+ download: true,
1537
+ className: "w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-md transition-colors block text-center",
1538
+ children: "Download Invoice"
1539
+ }
1540
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1516
1541
  "button",
1517
1542
  {
1518
- onClick: () => window.location.href = "/dashboard",
1543
+ onClick: () => window.location.href = dashboardUrl,
1519
1544
  className: "w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-md transition-colors",
1520
- children: "Go to Dashboard"
1545
+ children: "Download Invoice"
1521
1546
  }
1522
1547
  ),
1523
1548
  /* @__PURE__ */ jsxRuntime.jsx(
1524
1549
  "button",
1525
1550
  {
1526
- onClick: () => window.location.href = "/",
1551
+ onClick: () => window.location.href = dashboardUrl,
1527
1552
  className: "w-full bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium py-3 px-4 rounded-md transition-colors",
1528
- children: "Return Home"
1553
+ children: "Go to Dashboard"
1529
1554
  }
1530
1555
  )
1531
1556
  ] }),
1532
1557
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-gray-500", children: [
1533
1558
  "Need help?",
1534
1559
  " ",
1535
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "/support", className: "text-blue-600 hover:text-blue-700", children: "Contact Support" })
1560
+ /* @__PURE__ */ jsxRuntime.jsx("a", { href: supportUrl, className: "text-blue-600 hover:text-blue-700", children: "Contact Support" })
1536
1561
  ] }) })
1537
1562
  ] })
1538
1563
  ] });
@@ -2770,7 +2795,7 @@ var UpgradeSummary = ({
2770
2795
  e.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.3)";
2771
2796
  } : void 0,
2772
2797
  title: isShowingCurrentPlan ? "This is your current active plan" : void 0,
2773
- children: loading ? "Loading..." : isShowingCurrentPlan ? "Current Plan" : "Upgrade Now"
2798
+ children: loading ? "Loading..." : isShowingCurrentPlan ? "Current Plan" : (checkoutInfo == null ? void 0 : checkoutInfo.proration) === 0 ? "Confirm Changes" : "Upgrade Now"
2774
2799
  }
2775
2800
  )
2776
2801
  ] })