@burdenoff/microfe-billing 2026.1113.4 → 2026.1114.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.
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +293 -291
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +25 -24
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +25 -24
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/hooks/index.js +5 -5
- package/dist/billing/modules/billing/hooks/useInvoices.js +20 -39
- 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/InvoicesListPage.js +92 -89
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +2 -2
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +140 -140
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +16 -15
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +164 -137
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +444 -594
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +20 -20
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +32 -32
- package/dist/billing/modules/settings/pages/SettingsPage.js +4 -4
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +577 -640
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/shared/components/HeaderActions.d.ts +10 -0
- package/dist/billing/shared/components/HeaderActions.js +33 -0
- package/dist/billing/shared/components/HeaderActions.js.map +1 -0
- package/dist/billing/shared/components/index.d.ts +1 -0
- package/dist/billing/shared/components/index.js +2 -1
- package/dist/billing/shared/utils/format.js +4 -16
- 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 +286 -294
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
- package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +0 -46
- package/dist/billing/modules/dashboard/utils/overviewSummary.js +0 -37
- package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +0 -1
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +0 -30
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +0 -20
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +0 -1
|
@@ -2,10 +2,10 @@ import { useBillingNavigate as e } from "../../../hooks/useBillingNavigate.js";
|
|
|
2
2
|
import { ServerError as t } from "../../../shared/components/ServerError.js";
|
|
3
3
|
import { useBilling as n } from "../../../providers/BillingProvider.js";
|
|
4
4
|
import "../hooks/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { useDefaultBillingAccount as r } from "../../subscriptions/hooks/useSubscriptions.js";
|
|
6
|
+
import { formatCurrency as i, formatPlanDuration as a, formatPlanDurationLabel as o } from "../../../shared/utils/format.js";
|
|
7
|
+
import { isServerError as s } from "../../../shared/utils/error.js";
|
|
8
|
+
import { getPlanFeatureQuantity as c } from "../../../shared/utils/planFeatureQuantity.js";
|
|
9
9
|
import { useIsFluidgridsVariant as l } from "../../../hooks/useBillingVariant.js";
|
|
10
10
|
import { activeProductSubscriptions as u, resolvePlanAction as d } from "../utils/planAction.js";
|
|
11
11
|
import "../../../shared/components/index.js";
|
|
@@ -25,7 +25,7 @@ function A(e) {
|
|
|
25
25
|
let t = /* @__PURE__ */ new Map();
|
|
26
26
|
for (let n of e) {
|
|
27
27
|
if (!n.quota) continue;
|
|
28
|
-
let e = n.quota.id, r =
|
|
28
|
+
let e = n.quota.id, r = c(n), i = t.get(e);
|
|
29
29
|
i ? i.totalValue += r : t.set(e, {
|
|
30
30
|
quotaId: e,
|
|
31
31
|
name: n.quota.name ?? "Unknown Quota",
|
|
@@ -42,15 +42,15 @@ function j(e) {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
var M = () => {
|
|
45
|
-
let { t:
|
|
46
|
-
let n =
|
|
45
|
+
let { t: i } = k(), a = (e, t) => {
|
|
46
|
+
let n = i(e);
|
|
47
47
|
return n === e ? t : n;
|
|
48
|
-
},
|
|
48
|
+
}, o = e(), { productId: c, plansDocsUrl: m } = n(), h = b(c), { plans: g, isLoading: _, error: v, refetch: y } = f({
|
|
49
49
|
includeFree: !1,
|
|
50
|
-
productId:
|
|
51
|
-
}), w = l(), { subscriptions: T } =
|
|
50
|
+
productId: c ?? void 0
|
|
51
|
+
}), w = l(), { subscriptions: T } = r(), E = u(T, new Set(g.map((e) => e.id))), A = (e) => w ? d(e, E) : null, j = (e) => {
|
|
52
52
|
let t = A(e);
|
|
53
|
-
t?.kind === "change" ?
|
|
53
|
+
t?.kind === "change" ? o(`/subscriptions/${t.subscriptionId}/upgrade`) : o(`/checkout/${e}`);
|
|
54
54
|
}, [M, F] = x("grid"), [R, z] = x(p.MONTHLY), B = g.filter((e) => e.isActive && e.isPurchasable !== !1 && e.duration === R), V = B.length >= 2 ? 1 : -1;
|
|
55
55
|
return _ && g.length === 0 ? /* @__PURE__ */ O("div", {
|
|
56
56
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
@@ -76,11 +76,11 @@ var M = () => {
|
|
|
76
76
|
]
|
|
77
77
|
}, e))
|
|
78
78
|
})]
|
|
79
|
-
}) : v &&
|
|
79
|
+
}) : v && s(v) ? /* @__PURE__ */ D("div", {
|
|
80
80
|
className: "p-6",
|
|
81
81
|
children: /* @__PURE__ */ D(t, {
|
|
82
|
-
title:
|
|
83
|
-
message:
|
|
82
|
+
title: a("billing.plans.serverUnavailable", "Server Unavailable"),
|
|
83
|
+
message: a("billing.plans.unableToLoadPlans", "Unable to load plans."),
|
|
84
84
|
onRetry: () => y(),
|
|
85
85
|
showRetry: !0
|
|
86
86
|
})
|
|
@@ -90,17 +90,17 @@ var M = () => {
|
|
|
90
90
|
/* @__PURE__ */ O("div", { children: [
|
|
91
91
|
/* @__PURE__ */ D("h1", {
|
|
92
92
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
93
|
-
children:
|
|
93
|
+
children: a("billing.plans.browsePlansTitle", "Plans")
|
|
94
94
|
}),
|
|
95
95
|
/* @__PURE__ */ D("p", {
|
|
96
96
|
className: "text-sm text-text-secondary mt-1",
|
|
97
|
-
children:
|
|
97
|
+
children: a("billing.plans.browsePlansSubtitle", "Choose a plan that fits your needs")
|
|
98
98
|
}),
|
|
99
99
|
/* @__PURE__ */ D(C, {
|
|
100
100
|
className: "mt-3",
|
|
101
101
|
learnMoreHref: m,
|
|
102
|
-
learnMoreLabel:
|
|
103
|
-
children:
|
|
102
|
+
learnMoreLabel: a("billing.plans.learnMore", "Learn more"),
|
|
103
|
+
children: a("billing.plans.browsePurpose", "Compare what each plan includes — quotas, features and price — and subscribe to the one that fits your team. Switch between monthly and yearly billing to see the difference, or contact us for a custom Enterprise contract.")
|
|
104
104
|
})
|
|
105
105
|
] }),
|
|
106
106
|
/* @__PURE__ */ O("div", {
|
|
@@ -154,14 +154,14 @@ var M = () => {
|
|
|
154
154
|
}),
|
|
155
155
|
B.length === 0 ? /* @__PURE__ */ D(S, {
|
|
156
156
|
illustration: "empty-data",
|
|
157
|
-
title:
|
|
158
|
-
description:
|
|
157
|
+
title: a("billing.plans.noPlansAvailable", "No plans available"),
|
|
158
|
+
description: a("billing.plans.checkBackLater", "Check back later for new plans.")
|
|
159
159
|
}) : M === "grid" ? /* @__PURE__ */ O("div", {
|
|
160
160
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 items-stretch",
|
|
161
161
|
children: [B.map((e, t) => /* @__PURE__ */ D(I, {
|
|
162
162
|
plan: e,
|
|
163
163
|
highlighted: t === V,
|
|
164
|
-
onView: () =>
|
|
164
|
+
onView: () => o(`/plans/${e.id}`),
|
|
165
165
|
onSubscribe: () => j(e.id),
|
|
166
166
|
action: A(e.id)
|
|
167
167
|
}, e.id)), /* @__PURE__ */ D(N, { offer: h })]
|
|
@@ -169,7 +169,7 @@ var M = () => {
|
|
|
169
169
|
className: "space-y-3",
|
|
170
170
|
children: [B.map((e) => /* @__PURE__ */ D(L, {
|
|
171
171
|
plan: e,
|
|
172
|
-
onView: () =>
|
|
172
|
+
onView: () => o(`/plans/${e.id}`),
|
|
173
173
|
onSubscribe: () => j(e.id),
|
|
174
174
|
action: A(e.id)
|
|
175
175
|
}, e.id)), /* @__PURE__ */ D(P, { offer: h })]
|
|
@@ -286,7 +286,7 @@ var M = () => {
|
|
|
286
286
|
function F(e) {
|
|
287
287
|
return e?.kind === "current" ? "Current plan" : e?.kind === "change" ? "Change to this plan" : "Subscribe";
|
|
288
288
|
}
|
|
289
|
-
var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe:
|
|
289
|
+
var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: s }) => {
|
|
290
290
|
let c = j(e.features || []), l = A(e.features || []).length - c.length, u = h(), { price: d, currency: f } = m(e.price, e.currency, e.currencyPrices, u);
|
|
291
291
|
return /* @__PURE__ */ O("div", {
|
|
292
292
|
className: `relative flex flex-col h-full rounded-card bg-bg-surface p-6 transition-[border-color,box-shadow] duration-200 ${t ? "border-2 border-action-primary-bg shadow-[var(--shadow-glow)]" : "border border-border-subtle shadow-elevation-1 hover:border-border-strong hover:shadow-elevation-2"}`,
|
|
@@ -309,17 +309,17 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
|
|
|
309
309
|
children: e.name
|
|
310
310
|
}), /* @__PURE__ */ D("span", {
|
|
311
311
|
className: "text-sm text-text-secondary",
|
|
312
|
-
children:
|
|
312
|
+
children: o(e.duration)
|
|
313
313
|
})]
|
|
314
314
|
}),
|
|
315
315
|
/* @__PURE__ */ O("div", {
|
|
316
316
|
className: "flex items-baseline gap-1.5 mb-5",
|
|
317
317
|
children: [/* @__PURE__ */ D("span", {
|
|
318
318
|
className: "text-4xl font-bold tabular-nums tracking-tight text-text-primary",
|
|
319
|
-
children:
|
|
319
|
+
children: i(d, f)
|
|
320
320
|
}), /* @__PURE__ */ O("span", {
|
|
321
321
|
className: "text-text-secondary text-sm",
|
|
322
|
-
children: ["/ ",
|
|
322
|
+
children: ["/ ", a(e.duration)]
|
|
323
323
|
})]
|
|
324
324
|
}),
|
|
325
325
|
c.length > 0 && /* @__PURE__ */ O("ul", {
|
|
@@ -355,7 +355,7 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
|
|
|
355
355
|
className: "space-y-2 pt-4 border-t border-border-subtle mt-auto",
|
|
356
356
|
children: [/* @__PURE__ */ O("button", {
|
|
357
357
|
type: "button",
|
|
358
|
-
onClick:
|
|
358
|
+
onClick: r,
|
|
359
359
|
disabled: s?.kind === "current",
|
|
360
360
|
"aria-disabled": s?.kind === "current",
|
|
361
361
|
className: "group disabled:cursor-not-allowed disabled:opacity-60 inline-flex w-full items-center justify-center gap-2 rounded-button bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text shadow-elevation-1 transition-colors duration-200 hover:bg-action-primary-bgHover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
@@ -372,7 +372,7 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
|
|
|
372
372
|
})
|
|
373
373
|
]
|
|
374
374
|
});
|
|
375
|
-
}, L = ({ plan: e, onView: t, onSubscribe: n, action:
|
|
375
|
+
}, L = ({ plan: e, onView: t, onSubscribe: n, action: r }) => {
|
|
376
376
|
let o = j(e.features || []), s = h();
|
|
377
377
|
return /* @__PURE__ */ O("div", {
|
|
378
378
|
className: "flex items-center gap-4 p-5 border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 transition-all duration-200 hover:border-border-strong hover:shadow-elevation-2",
|
|
@@ -413,11 +413,11 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
|
|
|
413
413
|
className: "font-semibold text-text-primary",
|
|
414
414
|
children: (() => {
|
|
415
415
|
let { price: t, currency: n } = m(e.price, e.currency, e.currencyPrices, s);
|
|
416
|
-
return
|
|
416
|
+
return i(t, n);
|
|
417
417
|
})()
|
|
418
418
|
}), /* @__PURE__ */ O("div", {
|
|
419
419
|
className: "text-sm text-text-secondary",
|
|
420
|
-
children: ["per ",
|
|
420
|
+
children: ["per ", a(e.duration)]
|
|
421
421
|
})]
|
|
422
422
|
}),
|
|
423
423
|
/* @__PURE__ */ O("div", {
|
|
@@ -425,9 +425,9 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
|
|
|
425
425
|
children: [/* @__PURE__ */ D("button", {
|
|
426
426
|
type: "button",
|
|
427
427
|
onClick: n,
|
|
428
|
-
disabled:
|
|
428
|
+
disabled: r?.kind === "current",
|
|
429
429
|
className: "disabled:cursor-not-allowed disabled:opacity-60 px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
|
|
430
|
-
children: F(
|
|
430
|
+
children: F(r)
|
|
431
431
|
}), /* @__PURE__ */ D("button", {
|
|
432
432
|
type: "button",
|
|
433
433
|
onClick: t,
|
|
@@ -4,8 +4,8 @@ import { AccessDenied as r } from "../../../shared/components/AccessDenied.js";
|
|
|
4
4
|
import { PageHeader as i } from "../../../shared/components/PageHeader.js";
|
|
5
5
|
import { useBillingEventEmitter as ne } from "../../../hooks/useBillingEventEmitter.js";
|
|
6
6
|
import { useBillingPermissions as re } from "../../../hooks/useBillingPermissions.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useBilling as ie } from "../../../providers/BillingProvider.js";
|
|
8
|
+
import { directBillingGraphqlRequest as ae } from "../../../shared/utils/directBillingGraphql.js";
|
|
9
9
|
import "../../../shared/components/index.js";
|
|
10
10
|
import "../../../shared/utils/index.js";
|
|
11
11
|
import { ArchiveBillingAccountSettingsDocument as oe, useGetBillingAccountSettingsQuery as se, useGetBillingAccountsSettingsQuery as a, useGetDefaultBillingAccountSettingsQuery as ce, useSetDefaultBillingAccountSettingsMutation as le, useUpdateBillingAccountSettingsMutation as ue } from "../../../../generated/global-operations.js";
|
|
@@ -17,7 +17,7 @@ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
|
17
17
|
var f = () => {
|
|
18
18
|
if (typeof window < "u") return new URLSearchParams(window.location.search).get("billingAccountId") || void 0;
|
|
19
19
|
}, p = () => {
|
|
20
|
-
let p = de(), m = re(), h = te(), { apiGatewayUrl: g, authToken: _, orgId: v } =
|
|
20
|
+
let p = de(), m = re(), h = te(), { apiGatewayUrl: g, authToken: _, orgId: v } = ie(), { emit: y } = ne(), [b, x] = c(f), [S, C] = c(!1), [w, T] = c(!1), [E, D] = c(!1), [O, k] = c(!1), [A, j] = c(null), [we, M] = c(!1), [Te, N] = c(!1), [Ee, P] = c(!1), [F, I] = c(e), { data: L, loading: De, refetch: R } = a({}), z = s(() => L?.getBillingAccountsByOrg || [], [L?.getBillingAccountsByOrg]), { data: Oe, loading: ke, refetch: B } = ce({}), V = Oe?.getDefaultBillingAccount || null, { data: Ae, loading: H, refetch: U } = se({
|
|
21
21
|
variables: { id: b },
|
|
22
22
|
skip: !b
|
|
23
23
|
}), W = Ae?.getBillingAccount || null, [G] = ue(), [K] = le(), q = s(() => {
|
|
@@ -90,7 +90,7 @@ var f = () => {
|
|
|
90
90
|
if (q?.id && q.isActive) {
|
|
91
91
|
D(!0), j(null), M(!1);
|
|
92
92
|
try {
|
|
93
|
-
await
|
|
93
|
+
await ae({
|
|
94
94
|
apiGatewayUrl: g,
|
|
95
95
|
authToken: _,
|
|
96
96
|
orgId: v,
|