@burdenoff/microfe-billing 2026.1113.1 → 2026.1113.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/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 +144 -144
- 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/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 +102 -102
- 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 +107 -107
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- 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 +143 -143
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
- package/dist/billing/modules/plans/utils/planAction.d.ts +9 -0
- package/dist/billing/modules/plans/utils/planAction.js +4 -1
- package/dist/billing/modules/plans/utils/planAction.js.map +1 -1
- 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
|
@@ -11,19 +11,19 @@ import { useQuotas as s } from "../../plans/hooks/useQuotas.js";
|
|
|
11
11
|
import "../../../shared/components/index.js";
|
|
12
12
|
import { PlanDuration as c } from "../../../shared/types/graphql.js";
|
|
13
13
|
import { useState as l } from "react";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { PagePurpose as u } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
16
|
+
import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
17
|
// src/billing/modules/addons/pages/AddonCreatePage.tsx
|
|
18
18
|
var h = () => {
|
|
19
|
-
let { t: h } =
|
|
19
|
+
let { t: h } = m(), g = (e, t) => {
|
|
20
20
|
let n = h(e);
|
|
21
21
|
return n === e ? t : n;
|
|
22
22
|
}, _ = r(), v = i(), { quotas: y, isLoading: b } = s({ onlyActive: !0 }), { products: x, isLoading: S } = o(), { createAddon: C, isCreating: w } = a(), [T, E] = l(""), [D, O] = l(""), [k, A] = l("USD"), [j, M] = l(c.MONTHLY), [N, P] = l(""), [F, I] = l([]), [L, R] = l([]), [z, B] = l(null), [V, H] = l(!1);
|
|
23
|
-
if (!v.canManageAddons) return /* @__PURE__ */
|
|
24
|
-
if (b || S) return /* @__PURE__ */
|
|
23
|
+
if (!v.canManageAddons) return /* @__PURE__ */ f(e, { message: g("billing.addons.noCreatePermission", "You don't have permission to create addons.") });
|
|
24
|
+
if (b || S) return /* @__PURE__ */ p("div", {
|
|
25
25
|
className: "space-y-6 p-6",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ f("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ f("div", {
|
|
27
27
|
className: "max-w-2xl space-y-4",
|
|
28
28
|
children: [
|
|
29
29
|
1,
|
|
@@ -31,7 +31,7 @@ var h = () => {
|
|
|
31
31
|
3,
|
|
32
32
|
4,
|
|
33
33
|
5
|
|
34
|
-
].map((e) => /* @__PURE__ */
|
|
34
|
+
].map((e) => /* @__PURE__ */ f("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
|
|
35
35
|
})]
|
|
36
36
|
});
|
|
37
37
|
let U = () => {
|
|
@@ -45,15 +45,15 @@ var h = () => {
|
|
|
45
45
|
let r = [...F];
|
|
46
46
|
t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), I(r);
|
|
47
47
|
};
|
|
48
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ p("div", {
|
|
49
49
|
className: "space-y-6 p-6",
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ f(t, {
|
|
52
52
|
title: g("billing.addons.createNewAddon", "Create New Addon"),
|
|
53
53
|
description: g("billing.addons.createNewAddonDesc", "Set up a new addon with quotas")
|
|
54
54
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ f(u, { children: g("billing.addons.createPurpose", "Create an add-on that customers can buy on top of a subscription — extra seats, storage, usage credits and so on. Set its price (with optional per-currency overrides) and the quotas it grants, then make it available to purchase.") }),
|
|
56
|
+
/* @__PURE__ */ p("form", {
|
|
57
57
|
onSubmit: async (e) => {
|
|
58
58
|
if (e.preventDefault(), B(null), H(!1), !T.trim()) {
|
|
59
59
|
B("Addon name is required");
|
|
@@ -95,38 +95,38 @@ var h = () => {
|
|
|
95
95
|
},
|
|
96
96
|
className: "space-y-6",
|
|
97
97
|
children: [
|
|
98
|
-
z && /* @__PURE__ */
|
|
98
|
+
z && /* @__PURE__ */ f("div", {
|
|
99
99
|
className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ f("p", {
|
|
101
101
|
className: "text-sm text-status-error-text",
|
|
102
102
|
children: z
|
|
103
103
|
})
|
|
104
104
|
}),
|
|
105
|
-
V && /* @__PURE__ */
|
|
105
|
+
V && /* @__PURE__ */ f("div", {
|
|
106
106
|
className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ f("p", {
|
|
108
108
|
className: "text-sm text-status-success-text",
|
|
109
109
|
children: g("billing.addons.createSuccess", "Addon created successfully! Redirecting...")
|
|
110
110
|
})
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ p("div", {
|
|
113
113
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ p("div", {
|
|
115
115
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ f("div", {
|
|
117
117
|
className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
|
|
118
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ f("h2", {
|
|
119
119
|
className: "font-semibold text-text-primary",
|
|
120
120
|
children: g("billing.addons.basicInfo", "Basic Information")
|
|
121
121
|
})
|
|
122
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ p("div", {
|
|
123
123
|
className: "p-4 space-y-4",
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
126
126
|
htmlFor: "name",
|
|
127
127
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
128
128
|
children: [g("billing.addons.addonNameLabel", "Addon Name"), " *"]
|
|
129
|
-
}), /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ f("input", {
|
|
130
130
|
id: "name",
|
|
131
131
|
type: "text",
|
|
132
132
|
value: T,
|
|
@@ -135,40 +135,40 @@ var h = () => {
|
|
|
135
135
|
placeholder: g("billing.addons.addonNamePlaceholder", "e.g., Extra Storage"),
|
|
136
136
|
required: !0
|
|
137
137
|
})] }),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ p("div", { children: [
|
|
139
|
+
/* @__PURE__ */ p("label", {
|
|
140
140
|
htmlFor: "productId",
|
|
141
141
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
142
142
|
children: [g("billing.addons.product", "Product"), " *"]
|
|
143
143
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ p("select", {
|
|
145
145
|
id: "productId",
|
|
146
146
|
value: N,
|
|
147
147
|
onChange: (e) => P(e.target.value),
|
|
148
148
|
disabled: x.length === 0,
|
|
149
149
|
className: `w-full 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)] disabled:opacity-50 ${N === "" ? "text-text-muted" : "text-text-primary"}`,
|
|
150
150
|
required: !0,
|
|
151
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ f("option", {
|
|
152
152
|
value: "",
|
|
153
153
|
disabled: !0,
|
|
154
154
|
children: g("billing.addons.selectProduct", "Select a product...")
|
|
155
|
-
}), x.map((e) => /* @__PURE__ */
|
|
155
|
+
}), x.map((e) => /* @__PURE__ */ f("option", {
|
|
156
156
|
value: e.slug,
|
|
157
157
|
children: e.name
|
|
158
158
|
}, e.id))]
|
|
159
159
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ f("p", {
|
|
161
161
|
className: "text-xs text-text-muted mt-1",
|
|
162
162
|
children: x.length === 0 ? g("billing.addons.noProductsAvailable", "No active products found.") : g("billing.addons.productIdDesc", "The product this addon belongs to")
|
|
163
163
|
})
|
|
164
164
|
] }),
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ p("div", {
|
|
166
166
|
className: "grid grid-cols-2 gap-4",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
168
168
|
htmlFor: "price",
|
|
169
169
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
170
170
|
children: [g("billing.addons.priceLabel", "Price"), " *"]
|
|
171
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ f("input", {
|
|
172
172
|
id: "price",
|
|
173
173
|
type: "number",
|
|
174
174
|
step: "0.01",
|
|
@@ -178,121 +178,121 @@ var h = () => {
|
|
|
178
178
|
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)]",
|
|
179
179
|
placeholder: "9.99",
|
|
180
180
|
required: !0
|
|
181
|
-
})] }), /* @__PURE__ */
|
|
181
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
182
182
|
htmlFor: "currency",
|
|
183
183
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
184
184
|
children: [g("billing.addons.currencyLabel", "Currency"), " *"]
|
|
185
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ p("select", {
|
|
186
186
|
id: "currency",
|
|
187
187
|
value: k,
|
|
188
188
|
onChange: (e) => A(e.target.value),
|
|
189
189
|
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",
|
|
190
190
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ f("option", {
|
|
192
192
|
value: "USD",
|
|
193
193
|
children: "USD ($)"
|
|
194
194
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ f("option", {
|
|
196
196
|
value: "EUR",
|
|
197
197
|
children: "EUR"
|
|
198
198
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ f("option", {
|
|
200
200
|
value: "GBP",
|
|
201
201
|
children: "GBP"
|
|
202
202
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ f("option", {
|
|
204
204
|
value: "INR",
|
|
205
205
|
children: "INR"
|
|
206
206
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ f("option", {
|
|
208
208
|
value: "AUD",
|
|
209
209
|
children: "AUD"
|
|
210
210
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ f("option", {
|
|
212
212
|
value: "CAD",
|
|
213
213
|
children: "CAD"
|
|
214
214
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ f("option", {
|
|
216
216
|
value: "JPY",
|
|
217
217
|
children: "JPY"
|
|
218
218
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ f("option", {
|
|
220
220
|
value: "SGD",
|
|
221
221
|
children: "SGD"
|
|
222
222
|
})
|
|
223
223
|
]
|
|
224
224
|
})] })]
|
|
225
225
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
227
227
|
htmlFor: "duration",
|
|
228
228
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
229
229
|
children: [g("billing.addons.billingPeriodLabel", "Billing Period"), " *"]
|
|
230
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ p("select", {
|
|
231
231
|
id: "duration",
|
|
232
232
|
value: j,
|
|
233
233
|
onChange: (e) => M(e.target.value),
|
|
234
234
|
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",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ f("option", {
|
|
236
236
|
value: c.MONTHLY,
|
|
237
237
|
children: "Monthly"
|
|
238
|
-
}), /* @__PURE__ */
|
|
238
|
+
}), /* @__PURE__ */ f("option", {
|
|
239
239
|
value: c.YEARLY,
|
|
240
240
|
children: "Yearly"
|
|
241
241
|
})]
|
|
242
242
|
})] })
|
|
243
243
|
]
|
|
244
244
|
})]
|
|
245
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ p("div", {
|
|
246
246
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ p("div", {
|
|
248
248
|
className: "p-4 border-b border-border-subtle bg-bg-sunken/30 flex items-center justify-between",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
250
250
|
className: "font-semibold text-text-primary",
|
|
251
251
|
children: [g("billing.addons.quotaAllocations", "Quota Allocations"), " *"]
|
|
252
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ f("button", {
|
|
253
253
|
type: "button",
|
|
254
254
|
onClick: U,
|
|
255
255
|
disabled: y.length === 0,
|
|
256
256
|
className: "px-3 py-1 text-sm font-medium text-text-link hover:bg-[var(--color-accent-soft)] rounded-md transition-colors disabled:opacity-50",
|
|
257
257
|
children: "+ Add Quota"
|
|
258
258
|
})]
|
|
259
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ f("div", {
|
|
260
260
|
className: "p-4 space-y-3",
|
|
261
|
-
children: y.length === 0 ? /* @__PURE__ */
|
|
261
|
+
children: y.length === 0 ? /* @__PURE__ */ f("p", {
|
|
262
262
|
className: "text-sm text-text-muted",
|
|
263
263
|
children: g("billing.addons.noQuotasAvailable", "No quotas available. Please create quotas first.")
|
|
264
|
-
}) : F.length === 0 ? /* @__PURE__ */
|
|
264
|
+
}) : F.length === 0 ? /* @__PURE__ */ f("p", {
|
|
265
265
|
className: "text-sm text-text-muted",
|
|
266
266
|
children: g("billing.addons.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
|
|
267
267
|
}) : F.map((e, t) => {
|
|
268
268
|
let n = y.find((t) => t.id === e.quotaId), r = n?.limits?.type ?? "unknown";
|
|
269
|
-
return /* @__PURE__ */
|
|
269
|
+
return /* @__PURE__ */ p("div", {
|
|
270
270
|
className: "p-3 border border-border-subtle rounded-lg bg-bg-sunken/20 space-y-3",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ p("div", {
|
|
272
272
|
className: "flex items-center gap-3",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ p("select", {
|
|
274
274
|
value: e.quotaId,
|
|
275
275
|
onChange: (e) => G(t, "quotaId", e.target.value),
|
|
276
276
|
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"}`,
|
|
277
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ f("option", {
|
|
278
278
|
value: "",
|
|
279
279
|
disabled: !0,
|
|
280
280
|
children: g("billing.addons.selectQuota", "Select a quota...")
|
|
281
|
-
}), y.map((e) => /* @__PURE__ */
|
|
281
|
+
}), y.map((e) => /* @__PURE__ */ f("option", {
|
|
282
282
|
value: e.id,
|
|
283
283
|
children: e.name
|
|
284
284
|
}, e.id))]
|
|
285
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ f("button", {
|
|
286
286
|
type: "button",
|
|
287
287
|
onClick: () => W(t),
|
|
288
288
|
className: "p-2 text-status-error-text hover:bg-status-error-bg-subtle rounded-md transition-colors",
|
|
289
289
|
title: "Remove quota",
|
|
290
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ f("svg", {
|
|
291
291
|
className: "size-5",
|
|
292
292
|
fill: "none",
|
|
293
293
|
viewBox: "0 0 24 24",
|
|
294
294
|
stroke: "currentColor",
|
|
295
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ f("path", {
|
|
296
296
|
strokeLinecap: "round",
|
|
297
297
|
strokeLinejoin: "round",
|
|
298
298
|
strokeWidth: 2,
|
|
@@ -300,18 +300,18 @@ var h = () => {
|
|
|
300
300
|
})
|
|
301
301
|
})
|
|
302
302
|
})]
|
|
303
|
-
}), n && /* @__PURE__ */
|
|
303
|
+
}), n && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
304
304
|
className: "flex items-center justify-between text-sm",
|
|
305
|
-
children: /* @__PURE__ */
|
|
305
|
+
children: /* @__PURE__ */ p("span", {
|
|
306
306
|
className: "capitalize text-text-muted",
|
|
307
307
|
children: ["Type: ", r]
|
|
308
308
|
})
|
|
309
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ p("div", {
|
|
310
310
|
className: "flex items-center gap-2",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ p("label", {
|
|
312
312
|
className: "text-sm text-text-muted",
|
|
313
313
|
children: [g("billing.addons.limit", "Limit"), ":"]
|
|
314
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ f("input", {
|
|
315
315
|
type: "number",
|
|
316
316
|
min: "1",
|
|
317
317
|
value: e.quantity,
|
|
@@ -324,18 +324,18 @@ var h = () => {
|
|
|
324
324
|
})]
|
|
325
325
|
})]
|
|
326
326
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ f(n, {
|
|
328
328
|
overrides: L,
|
|
329
329
|
onChange: R
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ p("div", {
|
|
332
332
|
className: "flex items-center gap-3 pt-4",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ f("button", {
|
|
334
334
|
type: "submit",
|
|
335
335
|
disabled: w || y.length === 0,
|
|
336
336
|
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",
|
|
337
337
|
children: w ? g("billing.addons.creating", "Creating...") : g("billing.addons.createAddonBtn", "Create Addon")
|
|
338
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ f("button", {
|
|
339
339
|
type: "button",
|
|
340
340
|
onClick: () => _("/addons"),
|
|
341
341
|
className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|