@burdenoff/microfe-billing 2026.625.4 → 2026.625.5
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/AddonBrowseDetailPage.js +192 -187
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +322 -317
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +190 -185
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +297 -292
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +60 -75
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +86 -101
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +124 -121
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +103 -111
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +196 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +58 -73
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +65 -75
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +399 -399
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +49 -48
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +144 -151
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +430 -425
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +121 -93
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +154 -152
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +467 -462
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +294 -286
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +123 -117
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +43 -42
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +192 -207
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +40 -56
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +128 -121
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +165 -180
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +103 -100
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +175 -175
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +96 -96
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +42 -40
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +45 -38
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +339 -334
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +80 -74
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +342 -337
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +38 -53
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +60 -75
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +242 -237
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +29 -39
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +299 -294
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +191 -186
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +308 -303
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +57 -78
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +79 -78
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +15 -13
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +338 -299
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +82 -103
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +59 -54
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +172 -215
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,14 +8,15 @@ import { useCallback as f, useDeferredValue as p, useMemo as m, useState as h }
|
|
|
8
8
|
import { AlertCircle as g, AlertTriangle as _, CheckCircle as v, ChevronDown as y, ChevronLeft as b, ChevronRight as x, Clock as S, Info as C, Layers as w, Package as T, RefreshCw as E, Search as ee, X as D, XCircle as O } from "lucide-react";
|
|
9
9
|
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
10
10
|
import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { IllustratedEmptyState as M, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/billing/modules/usage/pages/UsagePage.tsx
|
|
12
|
-
function
|
|
13
|
+
function N(e, t) {
|
|
13
14
|
if (t?.displayName && typeof t.displayName == "string") return t.displayName;
|
|
14
15
|
if (t?.label && typeof t.label == "string") return t.label;
|
|
15
16
|
let n = e.split(".");
|
|
16
17
|
return (n.length > 1 ? n.slice(1) : n).map((e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())).join(" ");
|
|
17
18
|
}
|
|
18
|
-
var
|
|
19
|
+
var P = ({ status: e, className: n = "size-4" }) => {
|
|
19
20
|
switch (e) {
|
|
20
21
|
case "EXHAUSTED": return /* @__PURE__ */ A(O, { className: `${n} ${t.error.icon}` });
|
|
21
22
|
case "CRITICAL": return /* @__PURE__ */ A(_, { className: `${n} ${t.error.icon}` });
|
|
@@ -23,7 +24,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
23
24
|
case "HEALTHY": return /* @__PURE__ */ A(v, { className: `${n} ${t.success.icon}` });
|
|
24
25
|
default: return /* @__PURE__ */ A(C, { className: `${n} ${t.neutral.icon}` });
|
|
25
26
|
}
|
|
26
|
-
},
|
|
27
|
+
}, F = ({ status: e }) => /* @__PURE__ */ A("span", {
|
|
27
28
|
className: `px-2 py-0.5 text-xs font-medium rounded-full ${{
|
|
28
29
|
EXHAUSTED: `${t.error.bg} ${t.error.text}`,
|
|
29
30
|
CRITICAL: `${t.error.bg} ${t.error.text}`,
|
|
@@ -32,7 +33,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
32
33
|
INACTIVE: `${t.neutral.bg} ${t.neutral.text}`
|
|
33
34
|
}[e]}`,
|
|
34
35
|
children: e
|
|
35
|
-
}),
|
|
36
|
+
}), I = ({ percentage: e, status: n }) => {
|
|
36
37
|
let r = Math.min(100, Math.max(0, e));
|
|
37
38
|
return /* @__PURE__ */ A("div", {
|
|
38
39
|
className: "w-full bg-bg-sunken rounded-full h-2.5 overflow-hidden",
|
|
@@ -47,7 +48,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
47
48
|
style: { width: `${r}%` }
|
|
48
49
|
})
|
|
49
50
|
});
|
|
50
|
-
},
|
|
51
|
+
}, L = ({ label: e, value: n, icon: r, color: i, isActive: a, onClick: o }) => {
|
|
51
52
|
let s = {
|
|
52
53
|
blue: t.info,
|
|
53
54
|
emerald: t.success,
|
|
@@ -83,7 +84,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
83
84
|
children: n
|
|
84
85
|
})]
|
|
85
86
|
});
|
|
86
|
-
},
|
|
87
|
+
}, R = ({ quota: e, planLabel: t, onClick: n }) => {
|
|
87
88
|
let r = e.totalLimit != null && e.totalLimit > 0 && !e.noLimit;
|
|
88
89
|
return /* @__PURE__ */ j("tr", {
|
|
89
90
|
onClick: n,
|
|
@@ -126,7 +127,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
126
127
|
r ? i(e.totalLimit) : "∞",
|
|
127
128
|
e.unit ? ` ${e.unit}` : ""
|
|
128
129
|
]
|
|
129
|
-
}), /* @__PURE__ */ A(
|
|
130
|
+
}), /* @__PURE__ */ A(I, {
|
|
130
131
|
percentage: r ? e.usagePercentage : 0,
|
|
131
132
|
status: e.status
|
|
132
133
|
})]
|
|
@@ -138,7 +139,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
138
139
|
}),
|
|
139
140
|
/* @__PURE__ */ A("td", {
|
|
140
141
|
className: "px-4 py-3",
|
|
141
|
-
children: /* @__PURE__ */ A(
|
|
142
|
+
children: /* @__PURE__ */ A(F, { status: e.status })
|
|
142
143
|
})
|
|
143
144
|
]
|
|
144
145
|
});
|
|
@@ -170,7 +171,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
170
171
|
children: "Status"
|
|
171
172
|
})
|
|
172
173
|
]
|
|
173
|
-
}) }), /* @__PURE__ */ A("tbody", { children: e.map((e) => /* @__PURE__ */ A(
|
|
174
|
+
}) }), /* @__PURE__ */ A("tbody", { children: e.map((e) => /* @__PURE__ */ A(R, {
|
|
174
175
|
quota: e,
|
|
175
176
|
planLabel: n ? t : void 0,
|
|
176
177
|
onClick: () => r(e)
|
|
@@ -259,7 +260,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
259
260
|
className: "sticky top-0 bg-bg-elevated border-b border-border-subtle p-4 flex items-center justify-between",
|
|
260
261
|
children: [/* @__PURE__ */ j("div", {
|
|
261
262
|
className: "flex items-center gap-3",
|
|
262
|
-
children: [/* @__PURE__ */ A(
|
|
263
|
+
children: [/* @__PURE__ */ A(P, {
|
|
263
264
|
status: n.status,
|
|
264
265
|
className: "size-5"
|
|
265
266
|
}), /* @__PURE__ */ j("div", { children: [
|
|
@@ -303,9 +304,9 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
303
304
|
children: [/* @__PURE__ */ A("span", {
|
|
304
305
|
className: "text-sm text-text-secondary",
|
|
305
306
|
children: "Usage"
|
|
306
|
-
}), /* @__PURE__ */ A(
|
|
307
|
+
}), /* @__PURE__ */ A(F, { status: n.status })]
|
|
307
308
|
}),
|
|
308
|
-
/* @__PURE__ */ A(
|
|
309
|
+
/* @__PURE__ */ A(I, {
|
|
309
310
|
percentage: n.usagePercentage,
|
|
310
311
|
status: n.status
|
|
311
312
|
}),
|
|
@@ -491,7 +492,7 @@ var ne = ({ status: e, className: n = "size-4" }) => {
|
|
|
491
492
|
})]
|
|
492
493
|
});
|
|
493
494
|
};
|
|
494
|
-
function
|
|
495
|
+
function z(e, t) {
|
|
495
496
|
return t ? n.HEALTHY : e >= 100 ? n.EXHAUSTED : e >= 90 ? n.CRITICAL : e >= 75 ? n.WARNING : n.HEALTHY;
|
|
496
497
|
}
|
|
497
498
|
var oe = ({ workspaceId: e }) => {
|
|
@@ -511,7 +512,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
511
512
|
totalUsed: i,
|
|
512
513
|
totalRemaining: a,
|
|
513
514
|
usagePercentage: o,
|
|
514
|
-
status:
|
|
515
|
+
status: z(o, n),
|
|
515
516
|
hasLive: t.some((e) => e.liveStatus !== null),
|
|
516
517
|
hasMultiple: t.length > 1
|
|
517
518
|
};
|
|
@@ -546,22 +547,10 @@ var oe = ({ workspaceId: e }) => {
|
|
|
546
547
|
})
|
|
547
548
|
]
|
|
548
549
|
});
|
|
549
|
-
if (r.length === 0) return /* @__PURE__ */
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
className: "size-12 mx-auto rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center mb-2",
|
|
554
|
-
children: /* @__PURE__ */ A(w, { className: "size-6 text-text-link" })
|
|
555
|
-
}),
|
|
556
|
-
/* @__PURE__ */ A("h3", {
|
|
557
|
-
className: "text-base font-semibold text-text-primary",
|
|
558
|
-
children: "No workspace quotas assigned"
|
|
559
|
-
}),
|
|
560
|
-
/* @__PURE__ */ A("p", {
|
|
561
|
-
className: "text-sm text-text-secondary max-w-sm mx-auto",
|
|
562
|
-
children: "Quotas are assigned to this workspace after a successful purchase. If you have an active subscription, contact support."
|
|
563
|
-
})
|
|
564
|
-
]
|
|
550
|
+
if (r.length === 0) return /* @__PURE__ */ A(M, {
|
|
551
|
+
illustration: "empty-data",
|
|
552
|
+
title: "No workspace quotas assigned",
|
|
553
|
+
description: "Quotas are assigned to this workspace after a successful purchase. If you have an active subscription, contact support."
|
|
565
554
|
});
|
|
566
555
|
let y = u.filter((e) => e.status === n.HEALTHY).length, b = u.filter((e) => e.status === n.WARNING).length, S = u.filter((e) => e.status === n.CRITICAL || e.status === n.EXHAUSTED).length;
|
|
567
556
|
return /* @__PURE__ */ j("div", {
|
|
@@ -663,7 +652,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
663
652
|
children: [e.hasMultiple && /* @__PURE__ */ A(x, { className: `size-4 text-text-muted shrink-0 transition-transform duration-150 ${t ? "rotate-90" : ""}` }), /* @__PURE__ */ j("div", { children: [
|
|
664
653
|
/* @__PURE__ */ A("div", {
|
|
665
654
|
className: "font-medium text-text-primary",
|
|
666
|
-
children:
|
|
655
|
+
children: N(e.quotaName)
|
|
667
656
|
}),
|
|
668
657
|
/* @__PURE__ */ A("div", {
|
|
669
658
|
className: "text-xs font-mono text-text-muted mt-0.5",
|
|
@@ -706,7 +695,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
706
695
|
i(e.totalLimit)
|
|
707
696
|
]
|
|
708
697
|
})]
|
|
709
|
-
}), !e.noLimit && /* @__PURE__ */ A(
|
|
698
|
+
}), !e.noLimit && /* @__PURE__ */ A(I, {
|
|
710
699
|
percentage: e.usagePercentage,
|
|
711
700
|
status: e.status
|
|
712
701
|
})]
|
|
@@ -721,11 +710,11 @@ var oe = ({ workspaceId: e }) => {
|
|
|
721
710
|
}),
|
|
722
711
|
/* @__PURE__ */ A("td", {
|
|
723
712
|
className: "px-4 py-3",
|
|
724
|
-
children: /* @__PURE__ */ A(
|
|
713
|
+
children: /* @__PURE__ */ A(F, { status: e.status })
|
|
725
714
|
})
|
|
726
715
|
]
|
|
727
716
|
}, e.quotaName), t && e.items.map((e) => {
|
|
728
|
-
let t =
|
|
717
|
+
let t = z(e.usagePercentage, e.assignment.noLimit);
|
|
729
718
|
return /* @__PURE__ */ j("tr", {
|
|
730
719
|
className: "bg-bg-sunken/50 border-t border-dashed border-border-subtle",
|
|
731
720
|
children: [
|
|
@@ -760,7 +749,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
760
749
|
}),
|
|
761
750
|
/* @__PURE__ */ A("td", {
|
|
762
751
|
className: "px-4 py-2.5",
|
|
763
|
-
children: /* @__PURE__ */ A(
|
|
752
|
+
children: /* @__PURE__ */ A(F, { status: t })
|
|
764
753
|
})
|
|
765
754
|
]
|
|
766
755
|
}, e.assignment.id);
|
|
@@ -775,48 +764,48 @@ var oe = ({ workspaceId: e }) => {
|
|
|
775
764
|
})
|
|
776
765
|
]
|
|
777
766
|
});
|
|
778
|
-
},
|
|
767
|
+
}, se = () => {
|
|
779
768
|
let { t: n } = te(), r = (e, t) => {
|
|
780
769
|
let r = n(e);
|
|
781
770
|
return r === e ? t : r;
|
|
782
771
|
}, i = o(), [a, l] = h(() => {
|
|
783
772
|
if (!(typeof window > "u")) return new URLSearchParams(window.location.search).get("billingAccountId") || void 0;
|
|
784
|
-
}), [u, d] = h(null), [b, x] = h(""), [C,
|
|
785
|
-
billingAccountId:
|
|
786
|
-
workspaceId:
|
|
773
|
+
}), [u, d] = h(null), [b, x] = h(""), [C, N] = h("all"), [P, F] = h("active"), I = p(b), { billingAccounts: R, isLoading: z } = s(), se = (R.find((e) => e.isDefault) ?? R[0])?.id, B = a ?? se, { workspaceId: V, navigate: ce } = e(), [H, le] = h("workspace"), { dashboard: U, pooledQuotas: W, activeSubscriptions: G, pastSubscriptions: K, isLoading: ue, isPastSubscriptionsLoading: q, error: de, refetch: fe, loadMorePastSubscriptions: pe, hasMorePastSubscriptions: me, isLoadingMorePast: he, pastSubscriptionsCount: ge } = c({
|
|
774
|
+
billingAccountId: B,
|
|
775
|
+
workspaceId: V,
|
|
787
776
|
searchQuery: I || void 0,
|
|
788
|
-
viewMode:
|
|
789
|
-
}),
|
|
777
|
+
viewMode: P
|
|
778
|
+
}), J = f((e) => C === "all" ? !0 : C === "healthy" ? e.status === "HEALTHY" : C === "warning" ? e.status === "WARNING" : C === "critical" ? e.status === "CRITICAL" || e.status === "EXHAUSTED" : !0, [C]), Y = m(() => W.filter(J), [W, J]), X = m(() => C === "all" ? G : G.map((e) => ({
|
|
790
779
|
...e,
|
|
791
|
-
aggregatedQuotas: e.aggregatedQuotas.filter(
|
|
780
|
+
aggregatedQuotas: e.aggregatedQuotas.filter(J)
|
|
792
781
|
})).filter((e) => e.aggregatedQuotas.length > 0), [
|
|
793
|
-
|
|
782
|
+
G,
|
|
794
783
|
C,
|
|
795
|
-
|
|
796
|
-
]),
|
|
784
|
+
J
|
|
785
|
+
]), Z = m(() => C === "all" ? K : K.map((e) => ({
|
|
797
786
|
...e,
|
|
798
|
-
aggregatedQuotas: e.aggregatedQuotas.filter(
|
|
787
|
+
aggregatedQuotas: e.aggregatedQuotas.filter(J)
|
|
799
788
|
})).filter((e) => e.aggregatedQuotas.length > 0), [
|
|
800
|
-
|
|
789
|
+
K,
|
|
801
790
|
C,
|
|
802
|
-
|
|
803
|
-
]),
|
|
804
|
-
active:
|
|
791
|
+
J
|
|
792
|
+
]), Q = m(() => P === "active" ? {
|
|
793
|
+
active: X,
|
|
805
794
|
past: []
|
|
806
|
-
} :
|
|
795
|
+
} : P === "past" ? {
|
|
807
796
|
active: [],
|
|
808
|
-
past:
|
|
797
|
+
past: Z
|
|
809
798
|
} : {
|
|
810
|
-
active:
|
|
811
|
-
past:
|
|
799
|
+
active: X,
|
|
800
|
+
past: Z
|
|
812
801
|
}, [
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
]),
|
|
817
|
-
x(""),
|
|
818
|
-
},
|
|
819
|
-
|
|
802
|
+
P,
|
|
803
|
+
X,
|
|
804
|
+
Z
|
|
805
|
+
]), $ = b !== "" || C !== "all", _e = I !== b, ve = () => {
|
|
806
|
+
x(""), N("all");
|
|
807
|
+
}, ye = (e) => {
|
|
808
|
+
N((t) => t === e ? "all" : e);
|
|
820
809
|
};
|
|
821
810
|
if (!i.canViewUsage) return /* @__PURE__ */ A("div", {
|
|
822
811
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
@@ -838,7 +827,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
838
827
|
]
|
|
839
828
|
})
|
|
840
829
|
});
|
|
841
|
-
if ((
|
|
830
|
+
if ((z || ue) && !U) return /* @__PURE__ */ j("div", {
|
|
842
831
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
843
832
|
children: [
|
|
844
833
|
/* @__PURE__ */ A("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
|
|
@@ -880,19 +869,26 @@ var oe = ({ workspaceId: e }) => {
|
|
|
880
869
|
]
|
|
881
870
|
})
|
|
882
871
|
});
|
|
883
|
-
let
|
|
872
|
+
let be = R.find((e) => e.id === B);
|
|
884
873
|
return /* @__PURE__ */ j("div", {
|
|
885
874
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
886
875
|
children: [
|
|
887
876
|
/* @__PURE__ */ j("div", {
|
|
888
877
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
889
|
-
children: [/* @__PURE__ */ j("div", { children: [
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
878
|
+
children: [/* @__PURE__ */ j("div", { children: [
|
|
879
|
+
/* @__PURE__ */ A("h1", {
|
|
880
|
+
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
881
|
+
children: r("billing.usage.title", "Usage")
|
|
882
|
+
}),
|
|
883
|
+
/* @__PURE__ */ A("p", {
|
|
884
|
+
className: "text-sm text-text-secondary mt-1",
|
|
885
|
+
children: "Monitor your resource consumption and quota usage"
|
|
886
|
+
}),
|
|
887
|
+
/* @__PURE__ */ A(ne, {
|
|
888
|
+
className: "mt-3",
|
|
889
|
+
children: r("billing.usage.purpose", "See how much of each quota you have consumed so you can avoid running out and know when to upgrade. Switch between workspace-level usage and your global per-account quotas, drill into any quota for its history, and request more capacity when something is running low.")
|
|
890
|
+
})
|
|
891
|
+
] }), /* @__PURE__ */ j("div", {
|
|
896
892
|
className: "flex items-center gap-3",
|
|
897
893
|
children: [
|
|
898
894
|
/* @__PURE__ */ j("div", {
|
|
@@ -900,27 +896,27 @@ var oe = ({ workspaceId: e }) => {
|
|
|
900
896
|
children: [/* @__PURE__ */ j("button", {
|
|
901
897
|
type: "button",
|
|
902
898
|
onClick: () => le("workspace"),
|
|
903
|
-
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${
|
|
899
|
+
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${H === "workspace" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"}`,
|
|
904
900
|
children: [/* @__PURE__ */ A(w, { className: "size-3.5" }), "Workspace"]
|
|
905
901
|
}), /* @__PURE__ */ j("button", {
|
|
906
902
|
type: "button",
|
|
907
903
|
onClick: () => le("global"),
|
|
908
|
-
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${
|
|
904
|
+
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${H === "global" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"}`,
|
|
909
905
|
children: [/* @__PURE__ */ A(T, { className: "size-3.5" }), "Global"]
|
|
910
906
|
})]
|
|
911
907
|
}),
|
|
912
|
-
|
|
913
|
-
value:
|
|
908
|
+
H === "global" && R.length > 1 && /* @__PURE__ */ A("select", {
|
|
909
|
+
value: B || "",
|
|
914
910
|
onChange: (e) => l(e.target.value),
|
|
915
911
|
className: "px-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] w-full sm:min-w-[200px]",
|
|
916
|
-
children:
|
|
912
|
+
children: R.map((e) => /* @__PURE__ */ A("option", {
|
|
917
913
|
value: e.id,
|
|
918
914
|
children: e.name
|
|
919
915
|
}, e.id))
|
|
920
916
|
}),
|
|
921
917
|
/* @__PURE__ */ A("button", {
|
|
922
918
|
type: "button",
|
|
923
|
-
onClick: () =>
|
|
919
|
+
onClick: () => H === "workspace" ? void 0 : fe(),
|
|
924
920
|
className: "p-2 border border-border-subtle rounded-button text-text-secondary hover:text-text-primary hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
|
|
925
921
|
"aria-label": "Refresh",
|
|
926
922
|
title: "Refresh",
|
|
@@ -929,12 +925,12 @@ var oe = ({ workspaceId: e }) => {
|
|
|
929
925
|
]
|
|
930
926
|
})]
|
|
931
927
|
}),
|
|
932
|
-
|
|
933
|
-
|
|
928
|
+
H === "workspace" && V && /* @__PURE__ */ A(oe, { workspaceId: V }),
|
|
929
|
+
H === "workspace" && !V && /* @__PURE__ */ A("div", {
|
|
934
930
|
className: "text-center py-12 text-text-secondary text-sm",
|
|
935
931
|
children: "No workspace context available."
|
|
936
932
|
}),
|
|
937
|
-
|
|
933
|
+
H === "global" && /* @__PURE__ */ j(k, { children: [
|
|
938
934
|
/* @__PURE__ */ j("div", {
|
|
939
935
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
940
936
|
children: [
|
|
@@ -946,7 +942,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
946
942
|
type: "text",
|
|
947
943
|
value: b,
|
|
948
944
|
onChange: (e) => x(e.target.value),
|
|
949
|
-
placeholder: `Search ${
|
|
945
|
+
placeholder: `Search ${P === "past" ? "past" : P === "all" ? "all" : "active"} quotas...`,
|
|
950
946
|
className: "w-full pl-9 pr-3 py-2 text-sm border border-border-subtle rounded-input bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
951
947
|
}),
|
|
952
948
|
(b || _e) && /* @__PURE__ */ A("button", {
|
|
@@ -962,18 +958,18 @@ var oe = ({ workspaceId: e }) => {
|
|
|
962
958
|
className: "flex items-center bg-bg-sunken rounded-lg p-1 border border-border-subtle",
|
|
963
959
|
children: [/* @__PURE__ */ j("button", {
|
|
964
960
|
type: "button",
|
|
965
|
-
onClick: () =>
|
|
966
|
-
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${
|
|
961
|
+
onClick: () => F("active"),
|
|
962
|
+
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${P === "active" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"}`,
|
|
967
963
|
children: [/* @__PURE__ */ A(T, { className: "size-3.5" }), "Active"]
|
|
968
964
|
}), /* @__PURE__ */ j("button", {
|
|
969
965
|
type: "button",
|
|
970
|
-
onClick: () =>
|
|
971
|
-
disabled:
|
|
972
|
-
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${
|
|
973
|
-
children: [
|
|
966
|
+
onClick: () => F("past"),
|
|
967
|
+
disabled: q && P !== "past",
|
|
968
|
+
className: `flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-button transition-all duration-200 ${P === "past" ? "bg-bg-surface text-text-primary shadow-elevation-1 font-medium" : "text-text-secondary hover:text-text-primary"} ${q && P !== "past" ? "opacity-70" : ""}`,
|
|
969
|
+
children: [q && P === "past" ? /* @__PURE__ */ A(E, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ A(S, { className: "size-3.5" }), "Past"]
|
|
974
970
|
})]
|
|
975
971
|
}),
|
|
976
|
-
|
|
972
|
+
$ && /* @__PURE__ */ j("button", {
|
|
977
973
|
type: "button",
|
|
978
974
|
onClick: ve,
|
|
979
975
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary border border-border-subtle rounded-button hover:bg-bg-sunken transition-colors",
|
|
@@ -981,61 +977,61 @@ var oe = ({ workspaceId: e }) => {
|
|
|
981
977
|
})
|
|
982
978
|
]
|
|
983
979
|
}),
|
|
984
|
-
|
|
980
|
+
be && /* @__PURE__ */ j("div", {
|
|
985
981
|
className: "text-sm text-text-secondary",
|
|
986
982
|
children: [
|
|
987
983
|
"Viewing usage for",
|
|
988
984
|
" ",
|
|
989
985
|
/* @__PURE__ */ A("span", {
|
|
990
986
|
className: "font-medium text-text-primary",
|
|
991
|
-
children:
|
|
987
|
+
children: be.name
|
|
992
988
|
})
|
|
993
989
|
]
|
|
994
990
|
}),
|
|
995
|
-
|
|
991
|
+
U && /* @__PURE__ */ j("div", {
|
|
996
992
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
|
|
997
993
|
children: [
|
|
998
|
-
/* @__PURE__ */ A(
|
|
994
|
+
/* @__PURE__ */ A(L, {
|
|
999
995
|
label: "Total Quotas",
|
|
1000
|
-
value:
|
|
996
|
+
value: U.totalQuotas,
|
|
1001
997
|
icon: /* @__PURE__ */ A(w, { className: "size-5" }),
|
|
1002
998
|
color: "blue",
|
|
1003
999
|
isActive: C === "all",
|
|
1004
|
-
onClick: () =>
|
|
1000
|
+
onClick: () => N("all")
|
|
1005
1001
|
}),
|
|
1006
|
-
/* @__PURE__ */ A(
|
|
1002
|
+
/* @__PURE__ */ A(L, {
|
|
1007
1003
|
label: "Healthy",
|
|
1008
|
-
value:
|
|
1004
|
+
value: U.healthyQuotas,
|
|
1009
1005
|
icon: /* @__PURE__ */ A(v, { className: "size-5" }),
|
|
1010
1006
|
color: "emerald",
|
|
1011
1007
|
isActive: C === "healthy",
|
|
1012
|
-
onClick: () =>
|
|
1008
|
+
onClick: () => ye("healthy")
|
|
1013
1009
|
}),
|
|
1014
|
-
/* @__PURE__ */ A(
|
|
1010
|
+
/* @__PURE__ */ A(L, {
|
|
1015
1011
|
label: "Warning",
|
|
1016
|
-
value:
|
|
1012
|
+
value: U.warningQuotas,
|
|
1017
1013
|
icon: /* @__PURE__ */ A(g, { className: "size-5" }),
|
|
1018
1014
|
color: "amber",
|
|
1019
1015
|
isActive: C === "warning",
|
|
1020
|
-
onClick: () =>
|
|
1016
|
+
onClick: () => ye("warning")
|
|
1021
1017
|
}),
|
|
1022
|
-
/* @__PURE__ */ A(
|
|
1018
|
+
/* @__PURE__ */ A(L, {
|
|
1023
1019
|
label: "Critical / Exhausted",
|
|
1024
|
-
value:
|
|
1020
|
+
value: U.criticalQuotas + U.exhaustedQuotas,
|
|
1025
1021
|
icon: /* @__PURE__ */ A(_, { className: "size-5" }),
|
|
1026
1022
|
color: "red",
|
|
1027
1023
|
isActive: C === "critical",
|
|
1028
|
-
onClick: () =>
|
|
1024
|
+
onClick: () => ye("critical")
|
|
1029
1025
|
})
|
|
1030
1026
|
]
|
|
1031
1027
|
}),
|
|
1032
|
-
|
|
1033
|
-
className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between p-4 rounded-lg border ${
|
|
1028
|
+
U && (U.warningQuotas > 0 || U.criticalQuotas > 0 || U.exhaustedQuotas > 0) && /* @__PURE__ */ j("div", {
|
|
1029
|
+
className: `flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between p-4 rounded-lg border ${U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? `${t.error.bg} ${t.error.border}` : `${t.warning.bg} ${t.warning.border}`}`,
|
|
1034
1030
|
children: [/* @__PURE__ */ j("div", {
|
|
1035
1031
|
className: "flex items-center gap-3",
|
|
1036
|
-
children: [
|
|
1037
|
-
className: `text-sm font-medium ${
|
|
1038
|
-
children:
|
|
1032
|
+
children: [U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? /* @__PURE__ */ A(O, { className: `size-5 shrink-0 ${t.error.icon}` }) : /* @__PURE__ */ A(g, { className: `size-5 shrink-0 ${t.warning.icon}` }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
1033
|
+
className: `text-sm font-medium ${U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? t.error.text : t.warning.text}`,
|
|
1034
|
+
children: U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? `${U.criticalQuotas + U.exhaustedQuotas} quota${U.criticalQuotas + U.exhaustedQuotas === 1 ? "" : "s"} exhausted or critical` : `${U.warningQuotas} quota${U.warningQuotas === 1 ? "" : "s"} approaching the limit`
|
|
1039
1035
|
}), /* @__PURE__ */ A("p", {
|
|
1040
1036
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1041
1037
|
children: "Contact support to request a quota increase for your plan."
|
|
@@ -1043,24 +1039,24 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1043
1039
|
}), /* @__PURE__ */ A("button", {
|
|
1044
1040
|
type: "button",
|
|
1045
1041
|
onClick: () => ce("/support/tickets"),
|
|
1046
|
-
className: `shrink-0 px-4 py-2 text-sm font-medium rounded-button border transition-colors duration-200 ${
|
|
1042
|
+
className: `shrink-0 px-4 py-2 text-sm font-medium rounded-button border transition-colors duration-200 ${U.criticalQuotas > 0 || U.exhaustedQuotas > 0 ? "bg-action-danger-bg text-action-danger-text border-action-danger-bg hover:bg-action-danger-bgHover" : "border-status-warning-border text-status-warning-text hover:bg-status-warning-bg-subtle"}`,
|
|
1047
1043
|
children: "Request more quota"
|
|
1048
1044
|
})]
|
|
1049
1045
|
}),
|
|
1050
|
-
(
|
|
1046
|
+
($ || P !== "active") && /* @__PURE__ */ j("div", {
|
|
1051
1047
|
className: "flex items-center gap-2 text-sm text-text-secondary flex-wrap",
|
|
1052
1048
|
children: [
|
|
1053
1049
|
/* @__PURE__ */ j("span", { children: [
|
|
1054
1050
|
"Showing",
|
|
1055
1051
|
" ",
|
|
1056
|
-
|
|
1052
|
+
Q.active.reduce((e, t) => e + t.aggregatedQuotas.length, 0) + Q.past.reduce((e, t) => e + t.aggregatedQuotas.length, 0) + (P === "past" ? 0 : Y.length),
|
|
1057
1053
|
" ",
|
|
1058
1054
|
"quotas"
|
|
1059
1055
|
] }),
|
|
1060
1056
|
/* @__PURE__ */ j("span", {
|
|
1061
1057
|
className: "px-2 py-0.5 bg-[var(--color-accent-soft)] text-text-link rounded text-xs capitalize",
|
|
1062
1058
|
children: [
|
|
1063
|
-
|
|
1059
|
+
P === "active" ? "Active" : P === "past" ? "Past" : "All",
|
|
1064
1060
|
" ",
|
|
1065
1061
|
"subscriptions"
|
|
1066
1062
|
]
|
|
@@ -1079,18 +1075,18 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1079
1075
|
})
|
|
1080
1076
|
]
|
|
1081
1077
|
}),
|
|
1082
|
-
|
|
1078
|
+
Q.active.length > 0 && /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h2", {
|
|
1083
1079
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
1084
|
-
children: [/* @__PURE__ */ A(T, { className: "size-5 text-text-link" }),
|
|
1080
|
+
children: [/* @__PURE__ */ A(T, { className: "size-5 text-text-link" }), P === "all" ? "Active Subscription Quotas" : "Subscription Quotas"]
|
|
1085
1081
|
}), /* @__PURE__ */ A("div", {
|
|
1086
1082
|
className: "space-y-4",
|
|
1087
|
-
children:
|
|
1083
|
+
children: Q.active.map((e) => /* @__PURE__ */ A(ie, {
|
|
1088
1084
|
subscription: e,
|
|
1089
1085
|
onQuotaClick: d,
|
|
1090
1086
|
defaultExpanded: !0
|
|
1091
1087
|
}, e.id))
|
|
1092
1088
|
})] }),
|
|
1093
|
-
|
|
1089
|
+
Q.past.length > 0 && /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h2", {
|
|
1094
1090
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
1095
1091
|
children: [
|
|
1096
1092
|
/* @__PURE__ */ A(S, { className: "size-5 text-text-muted" }),
|
|
@@ -1102,7 +1098,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1102
1098
|
ge > 0 && /* @__PURE__ */ j("span", {
|
|
1103
1099
|
className: "text-xs font-normal px-2 py-0.5 bg-bg-sunken text-text-secondary rounded-full tabular-nums",
|
|
1104
1100
|
children: [
|
|
1105
|
-
|
|
1101
|
+
Q.past.length,
|
|
1106
1102
|
me ? "+" : "",
|
|
1107
1103
|
" of ",
|
|
1108
1104
|
ge
|
|
@@ -1111,10 +1107,10 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1111
1107
|
]
|
|
1112
1108
|
}), /* @__PURE__ */ j("div", {
|
|
1113
1109
|
className: "space-y-4",
|
|
1114
|
-
children: [
|
|
1110
|
+
children: [Q.past.map((e) => /* @__PURE__ */ A(ie, {
|
|
1115
1111
|
subscription: e,
|
|
1116
1112
|
onQuotaClick: d,
|
|
1117
|
-
defaultExpanded:
|
|
1113
|
+
defaultExpanded: P === "past"
|
|
1118
1114
|
}, e.id)), me && /* @__PURE__ */ A("div", {
|
|
1119
1115
|
className: "flex justify-center pt-2",
|
|
1120
1116
|
children: /* @__PURE__ */ A("button", {
|
|
@@ -1126,7 +1122,7 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1126
1122
|
})
|
|
1127
1123
|
})]
|
|
1128
1124
|
})] }),
|
|
1129
|
-
|
|
1125
|
+
P !== "past" && Y.length > 0 && /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h2", {
|
|
1130
1126
|
className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
|
|
1131
1127
|
children: [
|
|
1132
1128
|
/* @__PURE__ */ A(w, { className: `size-5 ${t.info.icon}` }),
|
|
@@ -1137,51 +1133,27 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1137
1133
|
})
|
|
1138
1134
|
]
|
|
1139
1135
|
}), /* @__PURE__ */ A(re, {
|
|
1140
|
-
quotas:
|
|
1136
|
+
quotas: Y,
|
|
1141
1137
|
showPlanColumn: !1,
|
|
1142
1138
|
onQuotaClick: d
|
|
1143
1139
|
})] }),
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
className: "size-12 rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center mb-4",
|
|
1149
|
-
children: /* @__PURE__ */ A(w, { className: "size-6 text-text-link" })
|
|
1150
|
-
}),
|
|
1151
|
-
/* @__PURE__ */ A("h3", {
|
|
1152
|
-
className: "text-base font-semibold text-text-primary",
|
|
1153
|
-
children: "No active quotas found"
|
|
1154
|
-
}),
|
|
1155
|
-
/* @__PURE__ */ A("p", {
|
|
1156
|
-
className: "text-sm text-text-secondary mt-1 text-center max-w-sm",
|
|
1157
|
-
children: "Quotas will appear here once you have active subscriptions or pooled allocations."
|
|
1158
|
-
})
|
|
1159
|
-
]
|
|
1140
|
+
P === "active" && G.length === 0 && W.length === 0 && !$ && /* @__PURE__ */ A(M, {
|
|
1141
|
+
illustration: "empty-data",
|
|
1142
|
+
title: "No active quotas found",
|
|
1143
|
+
description: "Quotas will appear here once you have active subscriptions or pooled allocations."
|
|
1160
1144
|
}),
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}),
|
|
1172
|
-
/* @__PURE__ */ A("p", {
|
|
1173
|
-
className: "text-sm text-text-secondary mt-1 text-center max-w-sm",
|
|
1174
|
-
children: "You don't have any canceled, expired, or upgraded subscriptions yet."
|
|
1175
|
-
}),
|
|
1176
|
-
/* @__PURE__ */ A("button", {
|
|
1177
|
-
type: "button",
|
|
1178
|
-
onClick: () => P("active"),
|
|
1179
|
-
className: "mt-4 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 duration-200",
|
|
1180
|
-
children: "View active subscriptions"
|
|
1181
|
-
})
|
|
1182
|
-
]
|
|
1145
|
+
P === "past" && K.length === 0 && !$ && !q && /* @__PURE__ */ A(M, {
|
|
1146
|
+
illustration: "empty-data",
|
|
1147
|
+
title: "No past subscriptions",
|
|
1148
|
+
description: "You don't have any canceled, expired, or upgraded subscriptions yet.",
|
|
1149
|
+
action: /* @__PURE__ */ A("button", {
|
|
1150
|
+
type: "button",
|
|
1151
|
+
onClick: () => F("active"),
|
|
1152
|
+
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 duration-200",
|
|
1153
|
+
children: "View active subscriptions"
|
|
1154
|
+
})
|
|
1183
1155
|
}),
|
|
1184
|
-
|
|
1156
|
+
P === "past" && q && /* @__PURE__ */ A("div", {
|
|
1185
1157
|
className: "space-y-4",
|
|
1186
1158
|
children: [
|
|
1187
1159
|
1,
|
|
@@ -1189,62 +1161,47 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1189
1161
|
3
|
|
1190
1162
|
].map((e) => /* @__PURE__ */ A("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-card" }, e))
|
|
1191
1163
|
}),
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
H.criticalQuotas + H.exhaustedQuotas,
|
|
1218
|
-
" ",
|
|
1219
|
-
"critical quotas."
|
|
1220
|
-
]
|
|
1221
|
-
})] }) : /* @__PURE__ */ j(k, { children: [
|
|
1222
|
-
"No quotas match your current search or filter criteria in",
|
|
1223
|
-
" ",
|
|
1224
|
-
N === "past" ? "past" : N === "all" ? "any" : "active",
|
|
1225
|
-
" ",
|
|
1226
|
-
"subscriptions.",
|
|
1227
|
-
N === "active" && !C.includes("all") && /* @__PURE__ */ A("span", {
|
|
1228
|
-
className: "block mt-1",
|
|
1229
|
-
children: "Try switching to “Past” or “All” to search across more subscriptions."
|
|
1230
|
-
})
|
|
1231
|
-
] })
|
|
1232
|
-
}),
|
|
1233
|
-
/* @__PURE__ */ j("div", {
|
|
1234
|
-
className: "flex gap-2 mt-4",
|
|
1235
|
-
children: [/* @__PURE__ */ A("button", {
|
|
1236
|
-
type: "button",
|
|
1237
|
-
onClick: ve,
|
|
1238
|
-
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
1239
|
-
children: C === "all" ? "Clear filters" : "Show all quotas"
|
|
1240
|
-
}), N === "active" && b && /* @__PURE__ */ A("button", {
|
|
1241
|
-
type: "button",
|
|
1242
|
-
onClick: () => P("all"),
|
|
1243
|
-
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 duration-200",
|
|
1244
|
-
children: "Search all"
|
|
1245
|
-
})]
|
|
1164
|
+
$ && Q.active.length === 0 && Q.past.length === 0 && (P === "past" || Y.length === 0) && /* @__PURE__ */ A(M, {
|
|
1165
|
+
illustration: "empty-search",
|
|
1166
|
+
title: C !== "all" && !b ? `No ${C === "critical" ? "critical or exhausted" : C} quotas` : "No matching quotas",
|
|
1167
|
+
description: C !== "all" && !b ? /* @__PURE__ */ j(k, { children: ["All your quotas are in a different status.", U && /* @__PURE__ */ j("span", {
|
|
1168
|
+
className: "block mt-1",
|
|
1169
|
+
children: [
|
|
1170
|
+
"You have ",
|
|
1171
|
+
U.healthyQuotas,
|
|
1172
|
+
" healthy, ",
|
|
1173
|
+
U.warningQuotas,
|
|
1174
|
+
" ",
|
|
1175
|
+
"warning, and ",
|
|
1176
|
+
U.criticalQuotas + U.exhaustedQuotas,
|
|
1177
|
+
" ",
|
|
1178
|
+
"critical quotas."
|
|
1179
|
+
]
|
|
1180
|
+
})] }) : /* @__PURE__ */ j(k, { children: [
|
|
1181
|
+
"No quotas match your current search or filter criteria in",
|
|
1182
|
+
" ",
|
|
1183
|
+
P === "past" ? "past" : P === "all" ? "any" : "active",
|
|
1184
|
+
" ",
|
|
1185
|
+
"subscriptions.",
|
|
1186
|
+
P === "active" && !C.includes("all") && /* @__PURE__ */ A("span", {
|
|
1187
|
+
className: "block mt-1",
|
|
1188
|
+
children: "Try switching to “Past” or “All” to search across more subscriptions."
|
|
1246
1189
|
})
|
|
1247
|
-
]
|
|
1190
|
+
] }),
|
|
1191
|
+
action: /* @__PURE__ */ j("div", {
|
|
1192
|
+
className: "flex gap-2",
|
|
1193
|
+
children: [/* @__PURE__ */ A("button", {
|
|
1194
|
+
type: "button",
|
|
1195
|
+
onClick: ve,
|
|
1196
|
+
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
1197
|
+
children: C === "all" ? "Clear filters" : "Show all quotas"
|
|
1198
|
+
}), P === "active" && b && /* @__PURE__ */ A("button", {
|
|
1199
|
+
type: "button",
|
|
1200
|
+
onClick: () => F("all"),
|
|
1201
|
+
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 duration-200",
|
|
1202
|
+
children: "Search all"
|
|
1203
|
+
})]
|
|
1204
|
+
})
|
|
1248
1205
|
})
|
|
1249
1206
|
] }),
|
|
1250
1207
|
u && /* @__PURE__ */ A(ae, {
|
|
@@ -1255,6 +1212,6 @@ var oe = ({ workspaceId: e }) => {
|
|
|
1255
1212
|
});
|
|
1256
1213
|
};
|
|
1257
1214
|
//#endregion
|
|
1258
|
-
export {
|
|
1215
|
+
export { se as UsagePage };
|
|
1259
1216
|
|
|
1260
1217
|
//# sourceMappingURL=UsagePage.js.map
|