@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.4
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/billing/BillingRoot.js +83 -77
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
- package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
- package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
- package/dist/billing/modules/billing/hooks/index.js +5 -5
- package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/index.js +14 -14
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
- package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +187 -164
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/components/PayoutDestinationList.d.ts +15 -0
- package/dist/billing/modules/earnings/components/PayoutDestinationList.js +66 -0
- package/dist/billing/modules/earnings/components/PayoutDestinationList.js.map +1 -0
- package/dist/billing/modules/earnings/components/PayoutErrorNotice.d.ts +7 -0
- package/dist/billing/modules/earnings/components/PayoutErrorNotice.js +19 -0
- package/dist/billing/modules/earnings/components/PayoutErrorNotice.js.map +1 -0
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +123 -110
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +215 -157
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/earnings/utils/payoutDestination.d.ts +20 -0
- package/dist/billing/modules/earnings/utils/payoutDestination.js +27 -0
- package/dist/billing/modules/earnings/utils/payoutDestination.js.map +1 -0
- package/dist/billing/modules/earnings/utils/plainPayoutError.d.ts +10 -0
- package/dist/billing/modules/earnings/utils/plainPayoutError.js +50 -0
- package/dist/billing/modules/earnings/utils/plainPayoutError.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
- package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
- package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
- package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
- package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
- package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
- package/dist/billing/shared/components/EmptyState.js +3 -3
- package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
- package/dist/billing/shared/ui/MetricCard.js +13 -13
- package/dist/billing/shared/utils/format.js +16 -4
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/index.js +8 -8
- package/dist/generated/global-operations.js +294 -286
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,17 +8,17 @@ import { usePlans as a } from "../hooks/usePlans.js";
|
|
|
8
8
|
import "../hooks/index.js";
|
|
9
9
|
import { filterPlans as o } from "../utils/planSelector.js";
|
|
10
10
|
import { useMemo as s, useState as c } from "react";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { Command as l, CommandEmpty as u, CommandInput as d, CommandItem as f, CommandList as p, PagePurpose as m, Popover as h, PopoverContent as g, PopoverTrigger as _ } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { Check as v, ChevronsUpDown as y } from "lucide-react";
|
|
13
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
14
|
+
import { useI18n as S } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
15
|
// src/billing/modules/plans/pages/PlanAssignFreePage.tsx
|
|
16
16
|
var C = () => {
|
|
17
|
-
let { t: C } =
|
|
17
|
+
let { t: C } = S(), w = (e, t) => {
|
|
18
18
|
let n = C(e);
|
|
19
19
|
return n === e ? t : n;
|
|
20
20
|
}, T = r(), E = i(), [D, O] = c(""), [k, A] = c(""), [j, M] = c(""), [N, P] = c(!1), [F, I] = c(""), [L, R] = c(""), [z, B] = c(null), { plans: V, isLoading: H } = a({ includeFree: !0 }), U = s(() => o(V, F), [V, F]), [W, { loading: G }] = n();
|
|
21
|
-
if (!E.canManagePlans) return /* @__PURE__ */
|
|
21
|
+
if (!E.canManagePlans) return /* @__PURE__ */ b(e, { message: w("billing.assignFree.noPermission", "You don't have permission to access this page.") });
|
|
22
22
|
let K = async (e) => {
|
|
23
23
|
if (e.preventDefault(), B(null), !D.trim() || !k.trim() || !j) B({
|
|
24
24
|
success: !1,
|
|
@@ -48,65 +48,65 @@ var C = () => {
|
|
|
48
48
|
}, q = V.find((e) => e.id === j), J = (e) => {
|
|
49
49
|
M(e), P(!1), I("");
|
|
50
50
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ x("div", {
|
|
52
52
|
className: "space-y-6 p-6 max-w-2xl",
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ b(t, {
|
|
55
55
|
title: w("billing.assignFree.title", "Assign Plan for Free"),
|
|
56
56
|
description: w("billing.assignFree.description", "Internally assign any plan to a billing account at no charge. Requires the team secret."),
|
|
57
|
-
actions: /* @__PURE__ */
|
|
57
|
+
actions: /* @__PURE__ */ b("button", {
|
|
58
58
|
type: "button",
|
|
59
59
|
onClick: () => T("/plans"),
|
|
60
60
|
className: "px-3 py-2 text-sm border border-border-subtle rounded-md text-text-primary hover:bg-bg-sunken transition-colors",
|
|
61
61
|
children: "← Back to Plans"
|
|
62
62
|
})
|
|
63
63
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ b(m, { children: w("billing.assignFree.purpose", "An internal tool to grant any plan to a billing account at no charge — useful for partners, internal teams or comped accounts. It bypasses payment, so it requires the team secret and should be used deliberately.") }),
|
|
65
|
+
/* @__PURE__ */ x("div", {
|
|
66
66
|
className: "flex items-start gap-3 p-4 rounded-lg border border-status-warning-border bg-status-warning-bg/10",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ b("svg", {
|
|
68
68
|
className: "size-5 text-status-warning-text shrink-0 mt-0.5",
|
|
69
69
|
fill: "none",
|
|
70
70
|
viewBox: "0 0 24 24",
|
|
71
71
|
stroke: "currentColor",
|
|
72
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ b("path", {
|
|
73
73
|
strokeLinecap: "round",
|
|
74
74
|
strokeLinejoin: "round",
|
|
75
75
|
strokeWidth: 2,
|
|
76
76
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.962-.833-2.732 0L3.072 16.5c-.77.833.192 2.5 1.732 2.5z"
|
|
77
77
|
})
|
|
78
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
79
79
|
className: "text-sm font-medium text-status-warning-text",
|
|
80
80
|
children: "Internal admin tool"
|
|
81
|
-
}), /* @__PURE__ */
|
|
81
|
+
}), /* @__PURE__ */ b("p", {
|
|
82
82
|
className: "text-xs text-status-warning-text/80 mt-0.5",
|
|
83
83
|
children: "This bypasses all payment flows. The plan is assigned immediately with no charge. Use only for enterprise deals or internal accounts."
|
|
84
84
|
})] })]
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ x("form", {
|
|
87
87
|
onSubmit: K,
|
|
88
88
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ b("div", {
|
|
91
91
|
className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
|
|
92
|
-
children: /* @__PURE__ */
|
|
92
|
+
children: /* @__PURE__ */ b("h2", {
|
|
93
93
|
className: "font-semibold text-text-primary",
|
|
94
94
|
children: "Assignment Details"
|
|
95
95
|
})
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ x("div", {
|
|
98
98
|
className: "p-4 space-y-4",
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ x("div", { children: [
|
|
101
|
+
/* @__PURE__ */ x("label", {
|
|
102
102
|
htmlFor: "secret",
|
|
103
103
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
104
|
-
children: ["Team Secret ", /* @__PURE__ */
|
|
104
|
+
children: ["Team Secret ", /* @__PURE__ */ b("span", {
|
|
105
105
|
className: "text-status-error-text",
|
|
106
106
|
children: "*"
|
|
107
107
|
})]
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ b("input", {
|
|
110
110
|
id: "secret",
|
|
111
111
|
type: "password",
|
|
112
112
|
value: D,
|
|
@@ -116,21 +116,21 @@ var C = () => {
|
|
|
116
116
|
placeholder: "Enter PLAN_ASSIGN_SECRET",
|
|
117
117
|
required: !0
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ b("p", {
|
|
120
120
|
className: "text-xs text-text-muted mt-1",
|
|
121
121
|
children: "The secret key shared within the team. Never expose this to users."
|
|
122
122
|
})
|
|
123
123
|
] }),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ x("div", { children: [
|
|
125
|
+
/* @__PURE__ */ x("label", {
|
|
126
126
|
htmlFor: "billingAccountId",
|
|
127
127
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
128
|
-
children: ["Billing Account ID ", /* @__PURE__ */
|
|
128
|
+
children: ["Billing Account ID ", /* @__PURE__ */ b("span", {
|
|
129
129
|
className: "text-status-error-text",
|
|
130
130
|
children: "*"
|
|
131
131
|
})]
|
|
132
132
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ b("input", {
|
|
134
134
|
id: "billingAccountId",
|
|
135
135
|
type: "text",
|
|
136
136
|
value: k,
|
|
@@ -139,21 +139,21 @@ var C = () => {
|
|
|
139
139
|
placeholder: "e.g. ba_01jk3n2...",
|
|
140
140
|
required: !0
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ b("p", {
|
|
143
143
|
className: "text-xs text-text-muted mt-1",
|
|
144
144
|
children: "Find this in the user's billing account settings or via the billing accounts list."
|
|
145
145
|
})
|
|
146
146
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ x("div", { children: [
|
|
148
|
+
/* @__PURE__ */ x("label", {
|
|
149
149
|
htmlFor: "workspaceId",
|
|
150
150
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
151
|
-
children: ["Workspace ID ", /* @__PURE__ */
|
|
151
|
+
children: ["Workspace ID ", /* @__PURE__ */ b("span", {
|
|
152
152
|
className: "text-text-secondary font-normal",
|
|
153
153
|
children: "(optional)"
|
|
154
154
|
})]
|
|
155
155
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ b("input", {
|
|
157
157
|
id: "workspaceId",
|
|
158
158
|
type: "text",
|
|
159
159
|
value: L,
|
|
@@ -161,64 +161,64 @@ var C = () => {
|
|
|
161
161
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary font-mono text-sm",
|
|
162
162
|
placeholder: "e.g. ws_01jk3n2… (leave blank to auto-resolve)"
|
|
163
163
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ b("p", {
|
|
165
165
|
className: "text-xs text-text-secondary mt-1",
|
|
166
166
|
children: "If blank, the first active workspace for this org is used automatically. Set explicitly when the org has multiple workspaces."
|
|
167
167
|
})
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ x("div", { children: [
|
|
170
|
+
/* @__PURE__ */ x("label", {
|
|
171
171
|
htmlFor: "planId",
|
|
172
172
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
173
|
-
children: ["Plan ", /* @__PURE__ */
|
|
173
|
+
children: ["Plan ", /* @__PURE__ */ b("span", {
|
|
174
174
|
className: "text-status-error-text",
|
|
175
175
|
children: "*"
|
|
176
176
|
})]
|
|
177
177
|
}),
|
|
178
|
-
H ? /* @__PURE__ */
|
|
178
|
+
H ? /* @__PURE__ */ b("div", { className: "h-10 bg-bg-sunken animate-pulse rounded-md" }) : /* @__PURE__ */ x(h, {
|
|
179
179
|
open: N,
|
|
180
180
|
onOpenChange: (e) => {
|
|
181
181
|
P(e), e || I("");
|
|
182
182
|
},
|
|
183
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ b(_, {
|
|
184
184
|
asChild: !0,
|
|
185
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ x("button", {
|
|
186
186
|
id: "planId",
|
|
187
187
|
type: "button",
|
|
188
188
|
role: "combobox",
|
|
189
189
|
"aria-expanded": N,
|
|
190
190
|
"aria-required": "true",
|
|
191
191
|
className: "w-full flex items-center justify-between gap-2 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-left text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ b("span", {
|
|
193
193
|
className: q ? "truncate" : "truncate text-text-muted",
|
|
194
194
|
children: q ? `${q.name}${q.productID ? ` · ${q.productID}` : ""}` : "Select a plan…"
|
|
195
|
-
}), /* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ b(y, {
|
|
196
196
|
className: "size-4 shrink-0 text-text-muted",
|
|
197
197
|
"aria-hidden": "true"
|
|
198
198
|
})]
|
|
199
199
|
})
|
|
200
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ b(g, {
|
|
201
201
|
align: "start",
|
|
202
202
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
203
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ x(l, {
|
|
204
204
|
shouldFilter: !1,
|
|
205
|
-
children: [/* @__PURE__ */ d
|
|
205
|
+
children: [/* @__PURE__ */ b(d, {
|
|
206
206
|
value: F,
|
|
207
207
|
onValueChange: I,
|
|
208
208
|
placeholder: "Search plans by name, product, or ID…"
|
|
209
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ x(p, { children: [/* @__PURE__ */ b(u, { children: "No matching plans found." }), U.map((e) => /* @__PURE__ */ x(f, {
|
|
210
210
|
value: e.id,
|
|
211
211
|
onSelect: () => J(e.id),
|
|
212
212
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ b(v, {
|
|
214
214
|
className: `size-4 shrink-0 ${e.id === j ? "opacity-100" : "opacity-0"}`,
|
|
215
215
|
"aria-hidden": "true"
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ x("span", {
|
|
218
218
|
className: "truncate",
|
|
219
219
|
children: [e.name, e.isPurchasable ? "" : " (internal)"]
|
|
220
220
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ x("span", {
|
|
222
222
|
className: "ml-auto text-xs text-text-muted",
|
|
223
223
|
children: [
|
|
224
224
|
e.productID,
|
|
@@ -231,25 +231,25 @@ var C = () => {
|
|
|
231
231
|
})
|
|
232
232
|
})]
|
|
233
233
|
}),
|
|
234
|
-
q && /* @__PURE__ */
|
|
234
|
+
q && /* @__PURE__ */ x("p", {
|
|
235
235
|
className: "text-xs text-text-muted mt-1",
|
|
236
236
|
children: [q.isPurchasable ? "Public plan" : "Internal / non-purchasable plan", q.productID ? ` · Product: ${q.productID}` : ""]
|
|
237
237
|
})
|
|
238
238
|
] })
|
|
239
239
|
]
|
|
240
240
|
}),
|
|
241
|
-
z && /* @__PURE__ */
|
|
241
|
+
z && /* @__PURE__ */ b("div", {
|
|
242
242
|
className: `mx-4 mb-4 p-3 rounded-lg border text-sm ${z.success ? "border-status-success-border bg-status-success-bg/10 text-status-success-text" : "border-status-error-border bg-status-error-bg/10 text-status-error-text"}`,
|
|
243
243
|
children: z.message
|
|
244
244
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ x("div", {
|
|
246
246
|
className: "px-4 pb-4 flex items-center gap-3",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ b("button", {
|
|
248
248
|
type: "submit",
|
|
249
249
|
disabled: G || !D || !k || !j,
|
|
250
250
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
251
251
|
children: G ? "Assigning…" : "Assign Plan for Free"
|
|
252
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ b("button", {
|
|
253
253
|
type: "button",
|
|
254
254
|
onClick: () => {
|
|
255
255
|
O(""), A(""), M(""), P(!1), I(""), R(""), B(null);
|