@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
|
@@ -14,16 +14,16 @@ import { getPlanFeatureQuantity as c } from "../../../shared/utils/planFeatureQu
|
|
|
14
14
|
import { useQuotas as l } from "../../plans/hooks/useQuotas.js";
|
|
15
15
|
import { PlanDuration as u } from "../../../shared/types/graphql.js";
|
|
16
16
|
import { useEffect as d, useState as f } from "react";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
17
|
+
import { PagePurpose as p } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { useParams as m } from "react-router";
|
|
19
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
20
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
21
|
// src/billing/modules/addons/pages/AddonEditPage.tsx
|
|
22
22
|
var y = () => {
|
|
23
|
-
let { t: y } =
|
|
23
|
+
let { t: y } = v(), b = (e, t) => {
|
|
24
24
|
let n = y(e);
|
|
25
25
|
return n === e ? t : n;
|
|
26
|
-
}, { addonId: x } =
|
|
26
|
+
}, { addonId: x } = m(), S = ee(), C = a(), { addon: w, isLoading: T, error: E, refetch: D } = o(x), { quotas: O, isLoading: k } = l({ onlyActive: !0 }), { updateAddon: A, isUpdating: j } = s(), [M, N] = f(""), [P, F] = f(""), [I, L] = f("USD"), [R, z] = f(u.MONTHLY), [B, V] = f(!0), [H, U] = f(!0), [W, G] = f([]), [K, q] = f([]), [J, Y] = f(null), [X, Z] = f(!1);
|
|
27
27
|
if (d(() => {
|
|
28
28
|
if (w) {
|
|
29
29
|
if (N(w.name ?? ""), F(String(w.price ?? "")), L(w.currency ?? "USD"), z(w.duration ?? u.MONTHLY), V(w.isActive ?? !0), U(w.requiresPaidSubscription ?? !0), w.currencyPrices && typeof w.currencyPrices == "object") {
|
|
@@ -46,10 +46,10 @@ var y = () => {
|
|
|
46
46
|
G(e);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
}, [w]), !C.canManageAddons) return /* @__PURE__ */
|
|
50
|
-
if (T || k) return /* @__PURE__ */
|
|
49
|
+
}, [w]), !C.canManageAddons) return /* @__PURE__ */ g(e, { message: b("billing.addons.noEditPermission", "You don't have permission to edit addons.") });
|
|
50
|
+
if (T || k) return /* @__PURE__ */ _("div", {
|
|
51
51
|
className: "space-y-6 p-6",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ g("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ g("div", {
|
|
53
53
|
className: "max-w-2xl space-y-4",
|
|
54
54
|
children: [
|
|
55
55
|
1,
|
|
@@ -57,26 +57,26 @@ var y = () => {
|
|
|
57
57
|
3,
|
|
58
58
|
4,
|
|
59
59
|
5
|
|
60
|
-
].map((e) => /* @__PURE__ */
|
|
60
|
+
].map((e) => /* @__PURE__ */ g("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
|
|
61
61
|
})]
|
|
62
62
|
});
|
|
63
|
-
if (E && i(E)) return /* @__PURE__ */
|
|
63
|
+
if (E && i(E)) return /* @__PURE__ */ g("div", {
|
|
64
64
|
className: "p-6",
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ g(n, {
|
|
66
66
|
title: b("billing.addons.serverUnavailable", "Server Unavailable"),
|
|
67
67
|
message: b("billing.addons.serverUnavailableLoadAddon", "Unable to load addon. The server might be down or experiencing issues."),
|
|
68
68
|
onRetry: () => D(),
|
|
69
69
|
showRetry: !0
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
|
-
if (!w) return /* @__PURE__ */
|
|
72
|
+
if (!w) return /* @__PURE__ */ g("div", {
|
|
73
73
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ _("div", {
|
|
75
75
|
className: "text-center space-y-4",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
77
77
|
className: "text-lg font-semibold text-text-primary",
|
|
78
78
|
children: b("billing.addons.addonNotFound", "Addon not found")
|
|
79
|
-
}), /* @__PURE__ */
|
|
79
|
+
}), /* @__PURE__ */ g("button", {
|
|
80
80
|
type: "button",
|
|
81
81
|
onClick: () => S("/addons"),
|
|
82
82
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover",
|
|
@@ -95,15 +95,15 @@ var y = () => {
|
|
|
95
95
|
let r = [...W];
|
|
96
96
|
t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), G(r);
|
|
97
97
|
};
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ _("div", {
|
|
99
99
|
className: "space-y-6 p-6",
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ g(t, {
|
|
102
102
|
title: `Edit Addon: ${w.name}`,
|
|
103
103
|
description: b("billing.addons.editAddonDesc", "Update the addon details and quota allocations")
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ g(p, { children: b("billing.addons.editPurpose", "Update this add-on's price, currency overrides and the quotas it grants. Changes affect new purchases; existing add-on subscriptions keep what they already bought.") }),
|
|
106
|
+
/* @__PURE__ */ _("form", {
|
|
107
107
|
onSubmit: async (e) => {
|
|
108
108
|
if (e.preventDefault(), Y(null), Z(!1), !M.trim()) {
|
|
109
109
|
Y("Addon name is required");
|
|
@@ -143,38 +143,38 @@ var y = () => {
|
|
|
143
143
|
},
|
|
144
144
|
className: "space-y-6",
|
|
145
145
|
children: [
|
|
146
|
-
J && /* @__PURE__ */
|
|
146
|
+
J && /* @__PURE__ */ g("div", {
|
|
147
147
|
className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
|
|
148
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ g("p", {
|
|
149
149
|
className: "text-sm text-status-error-text",
|
|
150
150
|
children: J
|
|
151
151
|
})
|
|
152
152
|
}),
|
|
153
|
-
X && /* @__PURE__ */
|
|
153
|
+
X && /* @__PURE__ */ g("div", {
|
|
154
154
|
className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
|
|
155
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ g("p", {
|
|
156
156
|
className: "text-sm text-status-success-text",
|
|
157
157
|
children: b("billing.addons.updateSuccess", "Addon updated successfully! Redirecting...")
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ _("div", {
|
|
161
161
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ _("div", {
|
|
163
163
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ g("div", {
|
|
165
165
|
className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ g("h2", {
|
|
167
167
|
className: "font-semibold text-text-primary",
|
|
168
168
|
children: b("billing.addons.basicInfo", "Basic Information")
|
|
169
169
|
})
|
|
170
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ _("div", {
|
|
171
171
|
className: "p-4 space-y-4",
|
|
172
172
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
174
174
|
htmlFor: "name",
|
|
175
175
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
176
176
|
children: [b("billing.addons.addonNameLabel", "Addon Name"), " *"]
|
|
177
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ g("input", {
|
|
178
178
|
id: "name",
|
|
179
179
|
type: "text",
|
|
180
180
|
value: M,
|
|
@@ -183,13 +183,13 @@ var y = () => {
|
|
|
183
183
|
placeholder: b("billing.addons.addonNamePlaceholder", "e.g., Extra Storage"),
|
|
184
184
|
required: !0
|
|
185
185
|
})] }),
|
|
186
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ _("div", {
|
|
187
187
|
className: "grid grid-cols-2 gap-4",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
189
189
|
htmlFor: "price",
|
|
190
190
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
191
191
|
children: [b("billing.addons.priceLabel", "Price"), " *"]
|
|
192
|
-
}), /* @__PURE__ */
|
|
192
|
+
}), /* @__PURE__ */ g("input", {
|
|
193
193
|
id: "price",
|
|
194
194
|
type: "number",
|
|
195
195
|
step: "0.01",
|
|
@@ -199,97 +199,97 @@ var y = () => {
|
|
|
199
199
|
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
200
200
|
placeholder: "9.99",
|
|
201
201
|
required: !0
|
|
202
|
-
})] }), /* @__PURE__ */
|
|
202
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
203
203
|
htmlFor: "currency",
|
|
204
204
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
205
205
|
children: [b("billing.addons.currencyLabel", "Currency"), " *"]
|
|
206
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ _("select", {
|
|
207
207
|
id: "currency",
|
|
208
208
|
value: I,
|
|
209
209
|
onChange: (e) => L(e.target.value),
|
|
210
210
|
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
211
211
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ g("option", {
|
|
213
213
|
value: "USD",
|
|
214
214
|
children: "USD ($)"
|
|
215
215
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ g("option", {
|
|
217
217
|
value: "EUR",
|
|
218
218
|
children: "EUR"
|
|
219
219
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ g("option", {
|
|
221
221
|
value: "GBP",
|
|
222
222
|
children: "GBP"
|
|
223
223
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ g("option", {
|
|
225
225
|
value: "INR",
|
|
226
226
|
children: "INR"
|
|
227
227
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ g("option", {
|
|
229
229
|
value: "AUD",
|
|
230
230
|
children: "AUD"
|
|
231
231
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ g("option", {
|
|
233
233
|
value: "CAD",
|
|
234
234
|
children: "CAD"
|
|
235
235
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ g("option", {
|
|
237
237
|
value: "JPY",
|
|
238
238
|
children: "JPY"
|
|
239
239
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ g("option", {
|
|
241
241
|
value: "SGD",
|
|
242
242
|
children: "SGD"
|
|
243
243
|
})
|
|
244
244
|
]
|
|
245
245
|
})] })]
|
|
246
246
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
248
248
|
htmlFor: "duration",
|
|
249
249
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
250
250
|
children: [b("billing.addons.billingPeriodLabel", "Billing Period"), " *"]
|
|
251
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ _("select", {
|
|
252
252
|
id: "duration",
|
|
253
253
|
value: R,
|
|
254
254
|
onChange: (e) => z(e.target.value),
|
|
255
255
|
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ g("option", {
|
|
257
257
|
value: u.MONTHLY,
|
|
258
258
|
children: "Monthly"
|
|
259
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ g("option", {
|
|
260
260
|
value: u.YEARLY,
|
|
261
261
|
children: "Yearly"
|
|
262
262
|
})]
|
|
263
263
|
})] }),
|
|
264
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ _("div", {
|
|
265
265
|
className: "flex items-center gap-3",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ g("input", {
|
|
267
267
|
id: "isActive",
|
|
268
268
|
type: "checkbox",
|
|
269
269
|
checked: B,
|
|
270
270
|
onChange: (e) => V(e.target.checked),
|
|
271
271
|
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
272
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ g("label", {
|
|
273
273
|
htmlFor: "isActive",
|
|
274
274
|
className: "text-sm font-medium text-text-primary",
|
|
275
275
|
children: b("billing.addons.addonIsActive", "Addon is active")
|
|
276
276
|
})]
|
|
277
277
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ _("div", {
|
|
279
279
|
className: "flex items-start gap-3",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ g("input", {
|
|
281
281
|
id: "requiresPaidSubscription",
|
|
282
282
|
type: "checkbox",
|
|
283
283
|
checked: H,
|
|
284
284
|
onChange: (e) => U(e.target.checked),
|
|
285
285
|
className: "mt-0.5 size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
286
|
-
}), /* @__PURE__ */
|
|
286
|
+
}), /* @__PURE__ */ _("label", {
|
|
287
287
|
htmlFor: "requiresPaidSubscription",
|
|
288
288
|
className: "text-sm text-text-primary",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ g("span", {
|
|
290
290
|
className: "font-medium",
|
|
291
291
|
children: b("billing.addons.requiresPaidSubscription", "Requires a paid subscription")
|
|
292
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ g("span", {
|
|
293
293
|
className: "block text-text-secondary",
|
|
294
294
|
children: b("billing.addons.requiresPaidSubscriptionDesc", "Free-plan workspaces cannot buy this add-on. Clear it only for items sold to Free users on purpose, such as credit packs or fees.")
|
|
295
295
|
})]
|
|
@@ -297,53 +297,53 @@ var y = () => {
|
|
|
297
297
|
})
|
|
298
298
|
]
|
|
299
299
|
})]
|
|
300
|
-
}), /* @__PURE__ */
|
|
300
|
+
}), /* @__PURE__ */ _("div", {
|
|
301
301
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ _("div", {
|
|
303
303
|
className: "p-4 border-b border-border-subtle bg-bg-sunken/30 flex items-center justify-between",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
305
305
|
className: "font-semibold text-text-primary",
|
|
306
306
|
children: b("billing.addons.quotaAllocations", "Quota Allocations")
|
|
307
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ g("button", {
|
|
308
308
|
type: "button",
|
|
309
309
|
onClick: Q,
|
|
310
310
|
className: "px-3 py-1 text-sm font-medium text-text-link hover:bg-[var(--color-accent-soft)] rounded-md transition-colors",
|
|
311
311
|
children: "+ Add Quota"
|
|
312
312
|
})]
|
|
313
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ g("div", {
|
|
314
314
|
className: "p-4 space-y-3",
|
|
315
|
-
children: W.length === 0 ? /* @__PURE__ */
|
|
315
|
+
children: W.length === 0 ? /* @__PURE__ */ g("p", {
|
|
316
316
|
className: "text-sm text-text-muted",
|
|
317
317
|
children: b("billing.addons.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
|
|
318
318
|
}) : W.map((e, t) => {
|
|
319
319
|
let n = O.find((t) => t.id === e.quotaId), r = n?.limits?.type ?? "unknown";
|
|
320
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ _("div", {
|
|
321
321
|
className: "p-3 border border-border-subtle rounded-lg bg-bg-sunken/20 space-y-3",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ _("div", {
|
|
323
323
|
className: "flex items-center gap-3",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ _("select", {
|
|
325
325
|
value: e.quotaId,
|
|
326
326
|
onChange: (e) => $(t, "quotaId", e.target.value),
|
|
327
327
|
className: `flex-1 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${e.quotaId === "" ? "text-text-muted" : "text-text-primary"}`,
|
|
328
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ g("option", {
|
|
329
329
|
value: "",
|
|
330
330
|
disabled: !0,
|
|
331
331
|
children: b("billing.addons.selectQuota", "Select a quota...")
|
|
332
|
-
}), O.map((e) => /* @__PURE__ */
|
|
332
|
+
}), O.map((e) => /* @__PURE__ */ g("option", {
|
|
333
333
|
value: e.id,
|
|
334
334
|
children: e.name
|
|
335
335
|
}, e.id))]
|
|
336
|
-
}), /* @__PURE__ */
|
|
336
|
+
}), /* @__PURE__ */ g("button", {
|
|
337
337
|
type: "button",
|
|
338
338
|
onClick: () => te(t),
|
|
339
339
|
className: "p-2 text-status-error-text hover:bg-status-error-bg-subtle rounded-md transition-colors",
|
|
340
340
|
title: "Remove quota",
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ g("svg", {
|
|
342
342
|
className: "size-5",
|
|
343
343
|
fill: "none",
|
|
344
344
|
viewBox: "0 0 24 24",
|
|
345
345
|
stroke: "currentColor",
|
|
346
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ g("path", {
|
|
347
347
|
strokeLinecap: "round",
|
|
348
348
|
strokeLinejoin: "round",
|
|
349
349
|
strokeWidth: 2,
|
|
@@ -351,18 +351,18 @@ var y = () => {
|
|
|
351
351
|
})
|
|
352
352
|
})
|
|
353
353
|
})]
|
|
354
|
-
}), n && /* @__PURE__ */
|
|
354
|
+
}), n && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
|
|
355
355
|
className: "flex items-center justify-between text-sm",
|
|
356
|
-
children: /* @__PURE__ */
|
|
356
|
+
children: /* @__PURE__ */ _("span", {
|
|
357
357
|
className: "capitalize text-text-muted",
|
|
358
358
|
children: ["Type: ", r]
|
|
359
359
|
})
|
|
360
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ _("div", {
|
|
361
361
|
className: "flex items-center gap-2",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ _("label", {
|
|
363
363
|
className: "text-sm text-text-muted",
|
|
364
364
|
children: [b("billing.addons.limit", "Limit"), ":"]
|
|
365
|
-
}), /* @__PURE__ */
|
|
365
|
+
}), /* @__PURE__ */ g("input", {
|
|
366
366
|
type: "number",
|
|
367
367
|
min: "1",
|
|
368
368
|
value: e.quantity,
|
|
@@ -375,18 +375,18 @@ var y = () => {
|
|
|
375
375
|
})]
|
|
376
376
|
})]
|
|
377
377
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ g(r, {
|
|
379
379
|
overrides: K,
|
|
380
380
|
onChange: q
|
|
381
381
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ _("div", {
|
|
383
383
|
className: "flex items-center gap-3 pt-4",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ g("button", {
|
|
385
385
|
type: "submit",
|
|
386
386
|
disabled: j,
|
|
387
387
|
className: "px-6 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",
|
|
388
388
|
children: j ? b("billing.addons.saving", "Saving...") : b("billing.addons.saveChanges", "Save Changes")
|
|
389
|
-
}), /* @__PURE__ */
|
|
389
|
+
}), /* @__PURE__ */ g("button", {
|
|
390
390
|
type: "button",
|
|
391
391
|
onClick: () => S(`/addons/${x}`),
|
|
392
392
|
className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|