@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
|
@@ -7,16 +7,16 @@ import "../../../shared/components/index.js";
|
|
|
7
7
|
import { useQuotaTemplateMutations as i, useQuotaTemplates as a } from "../hooks/useQuotaTemplates.js";
|
|
8
8
|
import { formatDate as o } from "../../../shared/utils/format.js";
|
|
9
9
|
import { useState as s } from "react";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { IllustratedEmptyState as c, PagePurpose as l } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
13
|
// src/billing/modules/quota/pages/QuotaTemplatesListPage.tsx
|
|
14
14
|
var m = () => {
|
|
15
|
-
let { t: o } =
|
|
15
|
+
let { t: o } = p(), u = (e, t) => {
|
|
16
16
|
let n = o(e);
|
|
17
17
|
return n === e ? t : n;
|
|
18
18
|
}, m = n(), _ = r(), { quotas: v, isLoading: y, error: b, refetch: x } = a(), { toggleQuota: S, isToggling: C } = i(), [w, T] = s("grid"), [E, D] = s(!1), [O, k] = s("all");
|
|
19
|
-
if (!_.canViewQuotas) return /* @__PURE__ */
|
|
19
|
+
if (!_.canViewQuotas) return /* @__PURE__ */ d(e, { message: "You don't have permission to view quotas." });
|
|
20
20
|
let A = v.filter((e) => !(!E && !e.isActive || O !== "all" && e.quotaType !== O)), j = async (e) => {
|
|
21
21
|
if (_.canManageQuotas) try {
|
|
22
22
|
await S(e.id, !e.isActive), await x();
|
|
@@ -28,39 +28,39 @@ var m = () => {
|
|
|
28
28
|
}, N = (e) => {
|
|
29
29
|
m(`/quotas/${e.id}/edit`);
|
|
30
30
|
};
|
|
31
|
-
return y && v.length === 0 ? /* @__PURE__ */
|
|
31
|
+
return y && v.length === 0 ? /* @__PURE__ */ f("div", {
|
|
32
32
|
className: "space-y-6 p-6",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ d("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ d("div", {
|
|
34
34
|
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
35
35
|
children: [
|
|
36
36
|
1,
|
|
37
37
|
2,
|
|
38
38
|
3
|
|
39
|
-
].map((e) => /* @__PURE__ */
|
|
39
|
+
].map((e) => /* @__PURE__ */ f("div", {
|
|
40
40
|
className: "border border-border-subtle rounded-lg p-6 space-y-4",
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ d("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
|
|
43
|
+
/* @__PURE__ */ d("div", { className: "h-4 w-32 bg-bg-sunken animate-pulse rounded" }),
|
|
44
|
+
/* @__PURE__ */ d("div", {
|
|
45
45
|
className: "space-y-2",
|
|
46
|
-
children: [1, 2].map((e) => /* @__PURE__ */
|
|
46
|
+
children: [1, 2].map((e) => /* @__PURE__ */ d("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
49
|
}, e))
|
|
50
50
|
})]
|
|
51
|
-
}) : b ? /* @__PURE__ */
|
|
51
|
+
}) : b ? /* @__PURE__ */ d("div", {
|
|
52
52
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ f("div", {
|
|
54
54
|
className: "text-center space-y-4",
|
|
55
55
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ d("div", {
|
|
57
57
|
className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
58
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ d("svg", {
|
|
59
59
|
className: "size-6 text-status-error-text",
|
|
60
60
|
fill: "none",
|
|
61
61
|
viewBox: "0 0 24 24",
|
|
62
62
|
stroke: "currentColor",
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ d("path", {
|
|
64
64
|
strokeLinecap: "round",
|
|
65
65
|
strokeLinejoin: "round",
|
|
66
66
|
strokeWidth: 2,
|
|
@@ -68,15 +68,15 @@ var m = () => {
|
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
70
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ d("h2", {
|
|
72
72
|
className: "text-lg font-semibold text-text-primary",
|
|
73
|
-
children:
|
|
73
|
+
children: u("billing.quota.failedToLoad", "Failed to load quotas")
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ d("p", {
|
|
76
76
|
className: "text-sm text-text-muted",
|
|
77
77
|
children: b.message
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ d("button", {
|
|
80
80
|
type: "button",
|
|
81
81
|
onClick: () => x(),
|
|
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 transition-colors",
|
|
@@ -84,24 +84,24 @@ var m = () => {
|
|
|
84
84
|
})
|
|
85
85
|
]
|
|
86
86
|
})
|
|
87
|
-
}) : /* @__PURE__ */
|
|
87
|
+
}) : /* @__PURE__ */ f("div", {
|
|
88
88
|
className: "space-y-6 p-6",
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ f("div", {
|
|
91
91
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
title:
|
|
92
|
+
children: [/* @__PURE__ */ d(t, {
|
|
93
|
+
title: u("billing.quota.quotaTemplatesTitle", "Quota Templates"),
|
|
94
94
|
description: "Manage quota templates that can be assigned to plans and addons"
|
|
95
|
-
}), _.canManageQuotas && /* @__PURE__ */
|
|
95
|
+
}), _.canManageQuotas && /* @__PURE__ */ f("button", {
|
|
96
96
|
type: "button",
|
|
97
97
|
onClick: () => m("/quotas/new"),
|
|
98
98
|
className: "inline-flex items-center gap-2 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",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ d("svg", {
|
|
100
100
|
className: "size-4",
|
|
101
101
|
fill: "none",
|
|
102
102
|
viewBox: "0 0 24 24",
|
|
103
103
|
stroke: "currentColor",
|
|
104
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ d("path", {
|
|
105
105
|
strokeLinecap: "round",
|
|
106
106
|
strokeLinejoin: "round",
|
|
107
107
|
strokeWidth: 2,
|
|
@@ -110,26 +110,26 @@ var m = () => {
|
|
|
110
110
|
}), "Create Quota"]
|
|
111
111
|
})]
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */ l
|
|
114
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ d(l, { children: u("billing.quota.templatesPurpose", "Quota templates are the reusable limit definitions you attach to plans and add-ons — like \"API calls per month\" or \"storage\". Create and manage them here once, then reference them across multiple plans instead of redefining the same limit each time.") }),
|
|
114
|
+
/* @__PURE__ */ f("div", {
|
|
115
115
|
className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border-subtle",
|
|
116
116
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ f("div", {
|
|
118
118
|
className: "inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken/50",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ d("button", {
|
|
121
121
|
type: "button",
|
|
122
122
|
onClick: () => k("all"),
|
|
123
123
|
className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${O === "all" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
|
|
124
124
|
children: "All"
|
|
125
125
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ d("button", {
|
|
127
127
|
type: "button",
|
|
128
128
|
onClick: () => k("POOLED"),
|
|
129
129
|
className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${O === "POOLED" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
|
|
130
130
|
children: "Pooled"
|
|
131
131
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ d("button", {
|
|
133
133
|
type: "button",
|
|
134
134
|
onClick: () => k("PRODUCT_SPECIFIC"),
|
|
135
135
|
className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${O === "PRODUCT_SPECIFIC" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
|
|
@@ -137,48 +137,48 @@ var m = () => {
|
|
|
137
137
|
})
|
|
138
138
|
]
|
|
139
139
|
}),
|
|
140
|
-
_.canManageQuotas && /* @__PURE__ */
|
|
140
|
+
_.canManageQuotas && /* @__PURE__ */ f("label", {
|
|
141
141
|
className: "flex items-center gap-2 text-sm cursor-pointer",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ d("input", {
|
|
143
143
|
type: "checkbox",
|
|
144
144
|
checked: E,
|
|
145
145
|
onChange: (e) => D(e.target.checked),
|
|
146
146
|
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
147
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ d("span", {
|
|
148
148
|
className: "text-text-muted",
|
|
149
|
-
children:
|
|
149
|
+
children: u("billing.quota.showInactive", "Show inactive quotas")
|
|
150
150
|
})]
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ f("div", {
|
|
153
153
|
className: "ml-auto inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken/50",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ d("button", {
|
|
155
155
|
type: "button",
|
|
156
156
|
onClick: () => T("grid"),
|
|
157
157
|
className: `p-1.5 rounded-md transition-colors ${w === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
|
|
158
158
|
title: "Grid view",
|
|
159
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ d("svg", {
|
|
160
160
|
className: "size-4",
|
|
161
161
|
fill: "none",
|
|
162
162
|
viewBox: "0 0 24 24",
|
|
163
163
|
stroke: "currentColor",
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ d("path", {
|
|
165
165
|
strokeLinecap: "round",
|
|
166
166
|
strokeLinejoin: "round",
|
|
167
167
|
strokeWidth: 2,
|
|
168
168
|
d: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
|
|
169
169
|
})
|
|
170
170
|
})
|
|
171
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ d("button", {
|
|
172
172
|
type: "button",
|
|
173
173
|
onClick: () => T("list"),
|
|
174
174
|
className: `p-1.5 rounded-md transition-colors ${w === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
|
|
175
175
|
title: "List view",
|
|
176
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ d("svg", {
|
|
177
177
|
className: "size-4",
|
|
178
178
|
fill: "none",
|
|
179
179
|
viewBox: "0 0 24 24",
|
|
180
180
|
stroke: "currentColor",
|
|
181
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ d("path", {
|
|
182
182
|
strokeLinecap: "round",
|
|
183
183
|
strokeLinejoin: "round",
|
|
184
184
|
strokeWidth: 2,
|
|
@@ -189,19 +189,19 @@ var m = () => {
|
|
|
189
189
|
})
|
|
190
190
|
]
|
|
191
191
|
}),
|
|
192
|
-
A.length === 0 ? /* @__PURE__ */
|
|
192
|
+
A.length === 0 ? /* @__PURE__ */ d(c, {
|
|
193
193
|
illustration: "empty-data",
|
|
194
|
-
title:
|
|
194
|
+
title: u("billing.quota.noQuotasFound", "No quotas found"),
|
|
195
195
|
description: E ? "No quotas match your current filters." : "There are no active quotas available.",
|
|
196
|
-
action: _.canManageQuotas ? /* @__PURE__ */
|
|
196
|
+
action: _.canManageQuotas ? /* @__PURE__ */ d("button", {
|
|
197
197
|
type: "button",
|
|
198
198
|
onClick: () => m("/quotas/new"),
|
|
199
199
|
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",
|
|
200
200
|
children: "Create your first quota"
|
|
201
201
|
}) : void 0
|
|
202
|
-
}) : w === "grid" ? /* @__PURE__ */
|
|
202
|
+
}) : w === "grid" ? /* @__PURE__ */ d("div", {
|
|
203
203
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",
|
|
204
|
-
children: A.map((e) => /* @__PURE__ */
|
|
204
|
+
children: A.map((e) => /* @__PURE__ */ d(h, {
|
|
205
205
|
quota: e,
|
|
206
206
|
onView: M,
|
|
207
207
|
onEdit: N,
|
|
@@ -209,9 +209,9 @@ var m = () => {
|
|
|
209
209
|
canManage: _.canManageQuotas,
|
|
210
210
|
isToggling: C
|
|
211
211
|
}, e.id))
|
|
212
|
-
}) : /* @__PURE__ */
|
|
212
|
+
}) : /* @__PURE__ */ d("div", {
|
|
213
213
|
className: "space-y-3",
|
|
214
|
-
children: A.map((e) => /* @__PURE__ */
|
|
214
|
+
children: A.map((e) => /* @__PURE__ */ d(g, {
|
|
215
215
|
quota: e,
|
|
216
216
|
onView: M,
|
|
217
217
|
onEdit: N,
|
|
@@ -223,22 +223,22 @@ var m = () => {
|
|
|
223
223
|
]
|
|
224
224
|
});
|
|
225
225
|
}, h = ({ quota: e, onView: t, onEdit: n, onToggle: r, canManage: i, isToggling: a }) => {
|
|
226
|
-
let s = e.limits, c = s?.type ?? "unknown",
|
|
227
|
-
return /* @__PURE__ */
|
|
226
|
+
let s = e.limits, c = s?.type ?? "unknown", l = s?.value ?? 0, u = s?.unit ?? "";
|
|
227
|
+
return /* @__PURE__ */ f("div", {
|
|
228
228
|
className: `relative border rounded-card p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:border-border-strong hover:shadow-[var(--shadow-elevation-2)] flex flex-col h-full ${e.isActive ? "border-border-subtle bg-bg-surface" : "border-dashed border-text-muted/30 bg-bg-sunken/30"}`,
|
|
229
229
|
children: [
|
|
230
|
-
!e.isActive && /* @__PURE__ */
|
|
230
|
+
!e.isActive && /* @__PURE__ */ d("span", {
|
|
231
231
|
className: "absolute top-4 right-4 px-2 py-1 text-xs font-medium bg-bg-sunken text-text-muted rounded",
|
|
232
232
|
children: "Inactive"
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ d("div", {
|
|
235
235
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center mb-4",
|
|
236
|
-
children: /* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ d("svg", {
|
|
237
237
|
className: "size-5 text-text-link",
|
|
238
238
|
fill: "none",
|
|
239
239
|
viewBox: "0 0 24 24",
|
|
240
240
|
stroke: "currentColor",
|
|
241
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ d("path", {
|
|
242
242
|
strokeLinecap: "round",
|
|
243
243
|
strokeLinejoin: "round",
|
|
244
244
|
strokeWidth: 2,
|
|
@@ -246,63 +246,63 @@ var m = () => {
|
|
|
246
246
|
})
|
|
247
247
|
})
|
|
248
248
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ f("div", {
|
|
250
250
|
className: "mb-4",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
252
252
|
className: "text-lg font-bold text-text-primary",
|
|
253
253
|
children: e.name
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ f("div", {
|
|
255
255
|
className: "flex items-center gap-2 mt-1",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ d("span", {
|
|
257
257
|
className: `px-2 py-0.5 text-xs font-medium rounded ${e.quotaType === "POOLED" ? "bg-status-info-bg-subtle text-status-info-text" : "bg-accent-purple-subtle text-text-primary"}`,
|
|
258
258
|
children: e.quotaType === "POOLED" ? "Pooled" : "Product Specific"
|
|
259
|
-
}), e.reusable && /* @__PURE__ */
|
|
259
|
+
}), e.reusable && /* @__PURE__ */ d("span", {
|
|
260
260
|
className: "px-2 py-0.5 text-xs font-medium bg-status-success-bg-subtle text-status-success-text rounded",
|
|
261
261
|
children: "Reusable"
|
|
262
262
|
})]
|
|
263
263
|
})]
|
|
264
264
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ f("div", {
|
|
266
266
|
className: "space-y-2 mb-4 flex-1",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ f("div", {
|
|
268
268
|
className: "flex items-center justify-between text-sm",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ d("span", {
|
|
270
270
|
className: "text-text-muted",
|
|
271
271
|
children: "Limit Type:"
|
|
272
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ d("span", {
|
|
273
273
|
className: "font-medium text-text-primary capitalize",
|
|
274
274
|
children: c
|
|
275
275
|
})]
|
|
276
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ f("div", {
|
|
277
277
|
className: "flex items-center justify-between text-sm",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ d("span", {
|
|
279
279
|
className: "text-text-muted",
|
|
280
280
|
children: "Value:"
|
|
281
|
-
}), /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ f("span", {
|
|
282
282
|
className: "font-semibold text-text-primary",
|
|
283
|
-
children: [
|
|
283
|
+
children: [l.toLocaleString(), u && ` ${u}`]
|
|
284
284
|
})]
|
|
285
285
|
})]
|
|
286
286
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ f("div", {
|
|
288
288
|
className: "py-3 border-t border-border-subtle text-sm text-text-muted",
|
|
289
289
|
children: ["Created ", o(e.createdAt, "short")]
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ f("div", {
|
|
292
292
|
className: "space-y-2 pt-4 border-t border-border-subtle",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ d("button", {
|
|
294
294
|
type: "button",
|
|
295
295
|
onClick: () => t(e),
|
|
296
296
|
className: "w-full 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",
|
|
297
297
|
children: "View Details"
|
|
298
|
-
}), i && /* @__PURE__ */
|
|
298
|
+
}), i && /* @__PURE__ */ f("div", {
|
|
299
299
|
className: "flex gap-2",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ d("button", {
|
|
301
301
|
type: "button",
|
|
302
302
|
onClick: () => n(e),
|
|
303
303
|
className: "flex-1 px-3 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
304
304
|
children: "Edit"
|
|
305
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ d("button", {
|
|
306
306
|
type: "button",
|
|
307
307
|
onClick: () => r(e),
|
|
308
308
|
disabled: a,
|
|
@@ -314,18 +314,18 @@ var m = () => {
|
|
|
314
314
|
]
|
|
315
315
|
});
|
|
316
316
|
}, g = ({ quota: e, onView: t, onEdit: n, onToggle: r, canManage: i, isToggling: a }) => {
|
|
317
|
-
let o = e.limits, s = o?.type ?? "unknown",
|
|
318
|
-
return /* @__PURE__ */
|
|
317
|
+
let o = e.limits, s = o?.type ?? "unknown", c = o?.value ?? 0, l = o?.unit ?? "";
|
|
318
|
+
return /* @__PURE__ */ f("div", {
|
|
319
319
|
className: `flex items-center gap-4 p-4 border rounded-card shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:border-border-strong hover:shadow-[var(--shadow-elevation-2)] ${e.isActive ? "border-border-subtle bg-bg-surface" : "border-dashed border-text-muted/30 bg-bg-sunken/30"}`,
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ d("div", {
|
|
322
322
|
className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center shrink-0",
|
|
323
|
-
children: /* @__PURE__ */
|
|
323
|
+
children: /* @__PURE__ */ d("svg", {
|
|
324
324
|
className: "size-5 text-text-link",
|
|
325
325
|
fill: "none",
|
|
326
326
|
viewBox: "0 0 24 24",
|
|
327
327
|
stroke: "currentColor",
|
|
328
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ d("path", {
|
|
329
329
|
strokeLinecap: "round",
|
|
330
330
|
strokeLinejoin: "round",
|
|
331
331
|
strokeWidth: 2,
|
|
@@ -333,51 +333,51 @@ var m = () => {
|
|
|
333
333
|
})
|
|
334
334
|
})
|
|
335
335
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ f("div", {
|
|
337
337
|
className: "flex-1 min-w-0",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ f("div", {
|
|
339
339
|
className: "flex items-center gap-2 flex-wrap",
|
|
340
340
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ d("h3", {
|
|
342
342
|
className: "font-semibold text-text-primary truncate",
|
|
343
343
|
children: e.name
|
|
344
344
|
}),
|
|
345
|
-
!e.isActive && /* @__PURE__ */
|
|
345
|
+
!e.isActive && /* @__PURE__ */ d("span", {
|
|
346
346
|
className: "px-2 py-0.5 text-xs font-medium bg-bg-sunken text-text-muted rounded",
|
|
347
347
|
children: "Inactive"
|
|
348
348
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ d("span", {
|
|
350
350
|
className: `px-2 py-0.5 text-xs font-medium rounded ${e.quotaType === "POOLED" ? "bg-status-info-bg-subtle text-status-info-text" : "bg-accent-purple-subtle text-text-primary"}`,
|
|
351
351
|
children: e.quotaType === "POOLED" ? "Pooled" : "Product Specific"
|
|
352
352
|
})
|
|
353
353
|
]
|
|
354
|
-
}), /* @__PURE__ */
|
|
354
|
+
}), /* @__PURE__ */ f("p", {
|
|
355
355
|
className: "text-sm text-text-muted",
|
|
356
356
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ d("span", {
|
|
358
358
|
className: "capitalize",
|
|
359
359
|
children: s
|
|
360
360
|
}),
|
|
361
361
|
" limit: ",
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
c.toLocaleString(),
|
|
363
|
+
l && ` ${l}`,
|
|
364
364
|
e.reusable && " (Reusable)"
|
|
365
365
|
]
|
|
366
366
|
})]
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ f("div", {
|
|
369
369
|
className: "flex items-center gap-2",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ d("button", {
|
|
371
371
|
type: "button",
|
|
372
372
|
onClick: () => t(e),
|
|
373
373
|
className: "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",
|
|
374
374
|
children: "View"
|
|
375
|
-
}), i && /* @__PURE__ */ u
|
|
375
|
+
}), i && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("button", {
|
|
376
376
|
type: "button",
|
|
377
377
|
onClick: () => n(e),
|
|
378
378
|
className: "px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
379
379
|
children: "Edit"
|
|
380
|
-
}), /* @__PURE__ */
|
|
380
|
+
}), /* @__PURE__ */ d("button", {
|
|
381
381
|
type: "button",
|
|
382
382
|
onClick: () => r(e),
|
|
383
383
|
disabled: a,
|