@burdenoff/microfe-billing 2026.625.4 → 2026.626.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.
Files changed (96) hide show
  1. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +192 -187
  2. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonCreatePage.js +322 -317
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +190 -185
  6. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  7. package/dist/billing/modules/addons/pages/AddonEditPage.js +297 -292
  8. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  9. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +60 -75
  10. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  11. package/dist/billing/modules/addons/pages/AddonsListPage.js +86 -101
  12. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  13. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +124 -121
  14. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  15. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +103 -111
  16. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +196 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +58 -73
  20. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +65 -75
  22. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +399 -399
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +49 -48
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +144 -151
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/pages/CheckoutPage.js +430 -425
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  31. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +121 -93
  32. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  33. package/dist/billing/modules/coupons/pages/CouponsListPage.js +154 -152
  34. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  35. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +467 -462
  36. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  37. package/dist/billing/modules/coupons/pages/EditCouponPage.js +294 -286
  38. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  39. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +123 -117
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +43 -42
  42. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  43. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +192 -207
  44. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  45. package/dist/billing/modules/credits/pages/CreditsPage.js +40 -56
  46. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  47. package/dist/billing/modules/dashboard/pages/OverviewPage.js +128 -121
  48. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  49. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +165 -180
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  51. package/dist/billing/modules/earnings/pages/EarningsPage.js +103 -100
  52. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  53. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +175 -175
  54. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  55. package/dist/billing/modules/earnings/pages/PayoutsPage.js +96 -96
  56. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  57. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +42 -40
  58. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  59. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +45 -38
  60. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  61. package/dist/billing/modules/plans/pages/PlanCreatePage.js +339 -334
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  63. package/dist/billing/modules/plans/pages/PlanDetailPage.js +80 -74
  64. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  65. package/dist/billing/modules/plans/pages/PlanEditPage.js +342 -337
  66. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  67. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +38 -53
  68. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  69. package/dist/billing/modules/plans/pages/PlansListPage.js +60 -75
  70. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  71. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +242 -237
  72. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  73. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +29 -39
  74. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  75. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -0
  76. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +299 -294
  77. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  78. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +191 -186
  79. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  80. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +308 -303
  81. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  82. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +57 -78
  83. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  84. package/dist/billing/modules/settings/pages/SettingsPage.js +79 -78
  85. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  86. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +15 -13
  87. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  88. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +338 -299
  89. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  90. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +82 -103
  91. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  92. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +59 -54
  93. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  94. package/dist/billing/modules/usage/pages/UsagePage.js +172 -215
  95. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  96. package/package.json +2 -2
@@ -13,21 +13,22 @@ import { useEffect as l, useState as u } from "react";
13
13
  import { useParams as d } from "react-router-dom";
14
14
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
15
15
  import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
+ import { PagePurpose as h } from "@burdenoff/fe-libs/ui";
16
17
  //#region src/billing/modules/quota/pages/QuotaTemplateEditPage.tsx
17
- var h = () => {
18
- let { t: h } = m(), g = (e, t) => {
19
- let n = h(e);
18
+ var g = () => {
19
+ let { t: g } = m(), _ = (e, t) => {
20
+ let n = g(e);
20
21
  return n === e ? t : n;
21
- }, { quotaId: _ } = d(), v = o(), y = a(), { quota: b, isLoading: x, error: S, refetch: C } = s(_), { updateQuota: w, isUpdating: T } = c(), [E, D] = u(""), [O, k] = u(""), [A, j] = u(""), [M, N] = u("numeric"), [P, F] = u(""), [I, L] = u(""), [R, z] = u(!1), [B, V] = u(r.NEVER), [H, U] = u(!0), [W, G] = u(null), [K, q] = u(!1);
22
+ }, { quotaId: v } = d(), y = o(), b = a(), { quota: x, isLoading: S, error: C, refetch: w } = s(v), { updateQuota: T, isUpdating: E } = c(), [D, O] = u(""), [k, A] = u(""), [j, M] = u(""), [N, P] = u("numeric"), [F, I] = u(""), [L, R] = u(""), [z, B] = u(!1), [V, H] = u(r.NEVER), [U, W] = u(!0), [G, K] = u(null), [q, J] = u(!1);
22
23
  return l(() => {
23
- if (b) {
24
- D(b.name ?? ""), z(b.reusable ?? !1), V(b.resetPeriod ?? r.NEVER), U(b.isActive ?? !0);
25
- let e = b.limits;
26
- N(e?.type ?? "numeric"), F(String(e?.value ?? "")), L(e?.unit ?? "");
27
- let t = b.context;
28
- k(t?.displayName ?? ""), j(t?.description ?? "");
24
+ if (x) {
25
+ O(x.name ?? ""), B(x.reusable ?? !1), H(x.resetPeriod ?? r.NEVER), W(x.isActive ?? !0);
26
+ let e = x.limits;
27
+ P(e?.type ?? "numeric"), I(String(e?.value ?? "")), R(e?.unit ?? "");
28
+ let t = x.context;
29
+ A(t?.displayName ?? ""), M(t?.description ?? "");
29
30
  }
30
- }, [b]), y.canManageQuotas ? x ? /* @__PURE__ */ p("div", {
31
+ }, [x]), b.canManageQuotas ? S ? /* @__PURE__ */ p("div", {
31
32
  className: "space-y-6 p-6",
32
33
  children: [/* @__PURE__ */ f("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ f("div", {
33
34
  className: "max-w-2xl space-y-4",
@@ -38,322 +39,326 @@ var h = () => {
38
39
  4
39
40
  ].map((e) => /* @__PURE__ */ f("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
40
41
  })]
41
- }) : S && i(S) ? /* @__PURE__ */ f("div", {
42
+ }) : C && i(C) ? /* @__PURE__ */ f("div", {
42
43
  className: "p-6",
43
44
  children: /* @__PURE__ */ f(n, {
44
45
  title: "Server Unavailable",
45
46
  message: "Unable to load quota. The server might be down or experiencing issues.",
46
- onRetry: () => C(),
47
+ onRetry: () => w(),
47
48
  showRetry: !0
48
49
  })
49
- }) : b ? /* @__PURE__ */ p("div", {
50
+ }) : x ? /* @__PURE__ */ p("div", {
50
51
  className: "space-y-6 p-6",
51
- children: [/* @__PURE__ */ f(t, {
52
- title: `Edit Quota: ${b.context?.displayName ?? b.name}`,
53
- description: "Update the quota template configuration"
54
- }), /* @__PURE__ */ p("form", {
55
- onSubmit: async (e) => {
56
- if (e.preventDefault(), G(null), q(!1), !E.trim()) {
57
- G("Quota name is required");
58
- return;
59
- }
60
- if (!P || isNaN(Number(P)) || Number(P) < 0) {
61
- G("Valid limit value is required");
62
- return;
63
- }
64
- if (!I.trim()) {
65
- G("Unit is required (e.g., bots, GB, seats)");
66
- return;
67
- }
68
- let t = {
69
- id: _,
70
- name: E.trim(),
71
- limits: {
72
- type: M,
73
- value: Number(P),
74
- unit: I.trim()
75
- },
76
- reusable: R,
77
- isActive: H,
78
- resetPeriod: B,
79
- context: {
80
- displayName: O.trim() || E.trim(),
81
- description: A.trim()
52
+ children: [
53
+ /* @__PURE__ */ f(t, {
54
+ title: `Edit Quota: ${x.context?.displayName ?? x.name}`,
55
+ description: "Update the quota template configuration"
56
+ }),
57
+ /* @__PURE__ */ f(h, { children: "Adjust this quota template's configuration. Changes apply wherever the template is referenced, so review which plans and add-ons use it before changing its type or unit." }),
58
+ /* @__PURE__ */ p("form", {
59
+ onSubmit: async (e) => {
60
+ if (e.preventDefault(), K(null), J(!1), !D.trim()) {
61
+ K("Quota name is required");
62
+ return;
82
63
  }
83
- };
84
- try {
85
- await w(t), q(!0), setTimeout(() => v(`/quotas/${_}`), 1500);
86
- } catch (e) {
87
- G(e instanceof Error ? e.message : "Failed to update quota");
88
- }
89
- },
90
- className: "max-w-2xl space-y-6",
91
- children: [
92
- W && /* @__PURE__ */ f("div", {
93
- className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
94
- children: /* @__PURE__ */ f("p", {
95
- className: "text-sm text-status-error-text",
96
- children: W
97
- })
98
- }),
99
- K && /* @__PURE__ */ f("div", {
100
- className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
101
- children: /* @__PURE__ */ f("p", {
102
- className: "text-sm text-status-success-text",
103
- children: "Quota updated successfully! Redirecting…"
104
- })
105
- }),
106
- /* @__PURE__ */ p("div", {
107
- className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
108
- children: [/* @__PURE__ */ f("div", {
109
- className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
110
- children: /* @__PURE__ */ f("h2", {
111
- className: "font-semibold text-text-primary",
112
- children: "Basic Information"
64
+ if (!F || isNaN(Number(F)) || Number(F) < 0) {
65
+ K("Valid limit value is required");
66
+ return;
67
+ }
68
+ if (!L.trim()) {
69
+ K("Unit is required (e.g., bots, GB, seats)");
70
+ return;
71
+ }
72
+ let t = {
73
+ id: v,
74
+ name: D.trim(),
75
+ limits: {
76
+ type: N,
77
+ value: Number(F),
78
+ unit: L.trim()
79
+ },
80
+ reusable: z,
81
+ isActive: U,
82
+ resetPeriod: V,
83
+ context: {
84
+ displayName: k.trim() || D.trim(),
85
+ description: j.trim()
86
+ }
87
+ };
88
+ try {
89
+ await T(t), J(!0), setTimeout(() => y(`/quotas/${v}`), 1500);
90
+ } catch (e) {
91
+ K(e instanceof Error ? e.message : "Failed to update quota");
92
+ }
93
+ },
94
+ className: "max-w-2xl space-y-6",
95
+ children: [
96
+ G && /* @__PURE__ */ f("div", {
97
+ className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
98
+ children: /* @__PURE__ */ f("p", {
99
+ className: "text-sm text-status-error-text",
100
+ children: G
113
101
  })
114
- }), /* @__PURE__ */ p("div", {
115
- className: "p-4 space-y-4",
116
- children: [
117
- /* @__PURE__ */ p("div", { children: [
118
- /* @__PURE__ */ f("label", {
119
- htmlFor: "name",
120
- className: "block text-sm font-medium text-text-primary mb-1",
121
- children: "Quota Key *"
122
- }),
123
- /* @__PURE__ */ f("input", {
124
- id: "name",
125
- type: "text",
126
- value: E,
127
- onChange: (e) => D(e.target.value),
128
- 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)] font-mono text-sm",
129
- placeholder: "e.g., sessions-started, tunnels-created",
130
- required: !0
131
- }),
132
- /* @__PURE__ */ p("p", {
133
- className: "text-xs text-text-muted mt-1",
134
- children: [
135
- "Internal machine key, must match the ",
136
- /* @__PURE__ */ f("code", { children: "quotaName" }),
137
- " used in",
138
- " ",
139
- /* @__PURE__ */ f("code", { children: "@usage" }),
140
- " directives. Never shown to users."
141
- ]
142
- })
143
- ] }),
144
- /* @__PURE__ */ p("div", { children: [
145
- /* @__PURE__ */ f("label", {
146
- htmlFor: "displayName",
147
- className: "block text-sm font-medium text-text-primary mb-1",
148
- children: "Display Name *"
149
- }),
150
- /* @__PURE__ */ f("input", {
151
- id: "displayName",
152
- type: "text",
153
- value: O,
154
- onChange: (e) => k(e.target.value),
155
- 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)]",
156
- placeholder: "e.g., Tunnels, Session Starts, Webhooks",
157
- required: !0
158
- }),
159
- /* @__PURE__ */ f("p", {
160
- className: "text-xs text-text-muted mt-1",
161
- children: "Human-readable name shown to users in billing and usage UI."
162
- })
163
- ] }),
164
- /* @__PURE__ */ p("div", { children: [
165
- /* @__PURE__ */ f("label", {
166
- htmlFor: "description",
102
+ }),
103
+ q && /* @__PURE__ */ f("div", {
104
+ className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
105
+ children: /* @__PURE__ */ f("p", {
106
+ className: "text-sm text-status-success-text",
107
+ children: "Quota updated successfully! Redirecting…"
108
+ })
109
+ }),
110
+ /* @__PURE__ */ p("div", {
111
+ className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
112
+ children: [/* @__PURE__ */ f("div", {
113
+ className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
114
+ children: /* @__PURE__ */ f("h2", {
115
+ className: "font-semibold text-text-primary",
116
+ children: "Basic Information"
117
+ })
118
+ }), /* @__PURE__ */ p("div", {
119
+ className: "p-4 space-y-4",
120
+ children: [
121
+ /* @__PURE__ */ p("div", { children: [
122
+ /* @__PURE__ */ f("label", {
123
+ htmlFor: "name",
124
+ className: "block text-sm font-medium text-text-primary mb-1",
125
+ children: "Quota Key *"
126
+ }),
127
+ /* @__PURE__ */ f("input", {
128
+ id: "name",
129
+ type: "text",
130
+ value: D,
131
+ onChange: (e) => O(e.target.value),
132
+ 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)] font-mono text-sm",
133
+ placeholder: "e.g., sessions-started, tunnels-created",
134
+ required: !0
135
+ }),
136
+ /* @__PURE__ */ p("p", {
137
+ className: "text-xs text-text-muted mt-1",
138
+ children: [
139
+ "Internal machine key, must match the ",
140
+ /* @__PURE__ */ f("code", { children: "quotaName" }),
141
+ " used in",
142
+ " ",
143
+ /* @__PURE__ */ f("code", { children: "@usage" }),
144
+ " directives. Never shown to users."
145
+ ]
146
+ })
147
+ ] }),
148
+ /* @__PURE__ */ p("div", { children: [
149
+ /* @__PURE__ */ f("label", {
150
+ htmlFor: "displayName",
151
+ className: "block text-sm font-medium text-text-primary mb-1",
152
+ children: "Display Name *"
153
+ }),
154
+ /* @__PURE__ */ f("input", {
155
+ id: "displayName",
156
+ type: "text",
157
+ value: k,
158
+ onChange: (e) => A(e.target.value),
159
+ 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)]",
160
+ placeholder: "e.g., Tunnels, Session Starts, Webhooks",
161
+ required: !0
162
+ }),
163
+ /* @__PURE__ */ f("p", {
164
+ className: "text-xs text-text-muted mt-1",
165
+ children: "Human-readable name shown to users in billing and usage UI."
166
+ })
167
+ ] }),
168
+ /* @__PURE__ */ p("div", { children: [
169
+ /* @__PURE__ */ f("label", {
170
+ htmlFor: "description",
171
+ className: "block text-sm font-medium text-text-primary mb-1",
172
+ children: "Description"
173
+ }),
174
+ /* @__PURE__ */ f("textarea", {
175
+ id: "description",
176
+ value: j,
177
+ onChange: (e) => M(e.target.value),
178
+ rows: 2,
179
+ 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)] resize-none",
180
+ placeholder: "e.g., Active tunnels created through VibeControls (slot freed on delete)"
181
+ }),
182
+ /* @__PURE__ */ f("p", {
183
+ className: "text-xs text-text-muted mt-1",
184
+ children: "Short explanation shown in billing and usage detail views."
185
+ })
186
+ ] }),
187
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
167
188
  className: "block text-sm font-medium text-text-primary mb-1",
168
- children: "Description"
169
- }),
170
- /* @__PURE__ */ f("textarea", {
171
- id: "description",
172
- value: A,
173
- onChange: (e) => j(e.target.value),
174
- rows: 2,
175
- 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)] resize-none",
176
- placeholder: "e.g., Active tunnels created through VibeControls (slot freed on delete)"
189
+ children: "Quota Type"
190
+ }), /* @__PURE__ */ p("div", {
191
+ className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/50 text-text-muted",
192
+ children: [x.quotaType === "POOLED" ? "Pooled" : "Product Specific", /* @__PURE__ */ f("span", {
193
+ className: "text-xs ml-2",
194
+ children: "(cannot be changed)"
195
+ })]
196
+ })] }),
197
+ /* @__PURE__ */ p("div", {
198
+ className: "flex items-center gap-3",
199
+ children: [/* @__PURE__ */ f("input", {
200
+ id: "reusable",
201
+ type: "checkbox",
202
+ checked: z,
203
+ onChange: (e) => B(e.target.checked),
204
+ className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
205
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
206
+ htmlFor: "reusable",
207
+ className: "text-sm font-medium text-text-primary",
208
+ children: "Reusable Quota"
209
+ }), /* @__PURE__ */ f("p", {
210
+ className: "text-xs text-text-muted",
211
+ children: "Enable for quotas like seats or bots that can be freed up"
212
+ })] })]
177
213
  }),
178
- /* @__PURE__ */ f("p", {
179
- className: "text-xs text-text-muted mt-1",
180
- children: "Short explanation shown in billing and usage detail views."
214
+ /* @__PURE__ */ p("div", { children: [
215
+ /* @__PURE__ */ f("label", {
216
+ htmlFor: "resetPeriod",
217
+ className: "block text-sm font-medium text-text-primary mb-1",
218
+ children: "Reset Period"
219
+ }),
220
+ /* @__PURE__ */ p("select", {
221
+ id: "resetPeriod",
222
+ value: V,
223
+ onChange: (e) => H(e.target.value),
224
+ 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)]",
225
+ children: [
226
+ /* @__PURE__ */ f("option", {
227
+ value: r.NEVER,
228
+ children: "Never (one-time limit)"
229
+ }),
230
+ /* @__PURE__ */ f("option", {
231
+ value: r.DAILY,
232
+ children: "Daily (resets every day)"
233
+ }),
234
+ /* @__PURE__ */ f("option", {
235
+ value: r.MONTHLY,
236
+ children: "Monthly (resets every month)"
237
+ })
238
+ ]
239
+ }),
240
+ /* @__PURE__ */ f("p", {
241
+ className: "text-xs text-text-muted mt-1",
242
+ children: "How often the quota usage counter is reset to zero"
243
+ })
244
+ ] }),
245
+ /* @__PURE__ */ p("div", {
246
+ className: "flex items-center gap-3",
247
+ children: [/* @__PURE__ */ f("input", {
248
+ id: "isActive",
249
+ type: "checkbox",
250
+ checked: U,
251
+ onChange: (e) => W(e.target.checked),
252
+ className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
253
+ }), /* @__PURE__ */ f("label", {
254
+ htmlFor: "isActive",
255
+ className: "text-sm font-medium text-text-primary",
256
+ children: "Quota is active"
257
+ })]
181
258
  })
182
- ] }),
183
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
184
- className: "block text-sm font-medium text-text-primary mb-1",
185
- children: "Quota Type"
186
- }), /* @__PURE__ */ p("div", {
187
- className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/50 text-text-muted",
188
- children: [b.quotaType === "POOLED" ? "Pooled" : "Product Specific", /* @__PURE__ */ f("span", {
189
- className: "text-xs ml-2",
190
- children: "(cannot be changed)"
191
- })]
192
- })] }),
193
- /* @__PURE__ */ p("div", {
194
- className: "flex items-center gap-3",
195
- children: [/* @__PURE__ */ f("input", {
196
- id: "reusable",
197
- type: "checkbox",
198
- checked: R,
199
- onChange: (e) => z(e.target.checked),
200
- className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
201
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
202
- htmlFor: "reusable",
203
- className: "text-sm font-medium text-text-primary",
204
- children: "Reusable Quota"
205
- }), /* @__PURE__ */ f("p", {
206
- className: "text-xs text-text-muted",
207
- children: "Enable for quotas like seats or bots that can be freed up"
208
- })] })]
209
- }),
210
- /* @__PURE__ */ p("div", { children: [
211
- /* @__PURE__ */ f("label", {
212
- htmlFor: "resetPeriod",
259
+ ]
260
+ })]
261
+ }),
262
+ /* @__PURE__ */ p("div", {
263
+ className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
264
+ children: [/* @__PURE__ */ f("div", {
265
+ className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
266
+ children: /* @__PURE__ */ f("h2", {
267
+ className: "font-semibold text-text-primary",
268
+ children: "Limits Configuration"
269
+ })
270
+ }), /* @__PURE__ */ p("div", {
271
+ className: "p-4 space-y-4",
272
+ children: [
273
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
274
+ htmlFor: "limitType",
213
275
  className: "block text-sm font-medium text-text-primary mb-1",
214
- children: "Reset Period"
215
- }),
216
- /* @__PURE__ */ p("select", {
217
- id: "resetPeriod",
218
- value: B,
219
- onChange: (e) => V(e.target.value),
276
+ children: "Limit Type *"
277
+ }), /* @__PURE__ */ p("select", {
278
+ id: "limitType",
279
+ value: N,
280
+ onChange: (e) => P(e.target.value),
220
281
  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)]",
221
282
  children: [
222
283
  /* @__PURE__ */ f("option", {
223
- value: r.NEVER,
224
- children: "Never (one-time limit)"
284
+ value: "numeric",
285
+ children: "Numeric (count)"
225
286
  }),
226
287
  /* @__PURE__ */ f("option", {
227
- value: r.DAILY,
228
- children: "Daily (resets every day)"
288
+ value: "storage",
289
+ children: "Storage (bytes)"
229
290
  }),
230
291
  /* @__PURE__ */ f("option", {
231
- value: r.MONTHLY,
232
- children: "Monthly (resets every month)"
292
+ value: "duration",
293
+ children: "Duration (seconds)"
294
+ }),
295
+ /* @__PURE__ */ f("option", {
296
+ value: "percentage",
297
+ children: "Percentage"
233
298
  })
234
299
  ]
235
- }),
236
- /* @__PURE__ */ f("p", {
237
- className: "text-xs text-text-muted mt-1",
238
- children: "How often the quota usage counter is reset to zero"
239
- })
240
- ] }),
241
- /* @__PURE__ */ p("div", {
242
- className: "flex items-center gap-3",
243
- children: [/* @__PURE__ */ f("input", {
244
- id: "isActive",
245
- type: "checkbox",
246
- checked: H,
247
- onChange: (e) => U(e.target.checked),
248
- className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
249
- }), /* @__PURE__ */ f("label", {
250
- htmlFor: "isActive",
251
- className: "text-sm font-medium text-text-primary",
252
- children: "Quota is active"
253
- })]
254
- })
255
- ]
256
- })]
257
- }),
258
- /* @__PURE__ */ p("div", {
259
- className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
260
- children: [/* @__PURE__ */ f("div", {
261
- className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
262
- children: /* @__PURE__ */ f("h2", {
263
- className: "font-semibold text-text-primary",
264
- children: "Limits Configuration"
265
- })
266
- }), /* @__PURE__ */ p("div", {
267
- className: "p-4 space-y-4",
268
- children: [
269
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
270
- htmlFor: "limitType",
271
- className: "block text-sm font-medium text-text-primary mb-1",
272
- children: "Limit Type *"
273
- }), /* @__PURE__ */ p("select", {
274
- id: "limitType",
275
- value: M,
276
- onChange: (e) => N(e.target.value),
277
- 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)]",
278
- children: [
279
- /* @__PURE__ */ f("option", {
280
- value: "numeric",
281
- children: "Numeric (count)"
300
+ })] }),
301
+ /* @__PURE__ */ p("div", { children: [
302
+ /* @__PURE__ */ f("label", {
303
+ htmlFor: "limitValue",
304
+ className: "block text-sm font-medium text-text-primary mb-1",
305
+ children: "Limit Value *"
282
306
  }),
283
- /* @__PURE__ */ f("option", {
284
- value: "storage",
285
- children: "Storage (bytes)"
307
+ /* @__PURE__ */ f("input", {
308
+ id: "limitValue",
309
+ type: "number",
310
+ min: "0",
311
+ value: F,
312
+ onChange: (e) => I(e.target.value),
313
+ 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)]",
314
+ placeholder: "1000",
315
+ required: !0
286
316
  }),
287
- /* @__PURE__ */ f("option", {
288
- value: "duration",
289
- children: "Duration (seconds)"
317
+ /* @__PURE__ */ f("p", {
318
+ className: "text-xs text-text-muted mt-1",
319
+ children: "The maximum limit value for this quota"
320
+ })
321
+ ] }),
322
+ /* @__PURE__ */ p("div", { children: [
323
+ /* @__PURE__ */ f("label", {
324
+ htmlFor: "unit",
325
+ className: "block text-sm font-medium text-text-primary mb-1",
326
+ children: "Unit *"
290
327
  }),
291
- /* @__PURE__ */ f("option", {
292
- value: "percentage",
293
- children: "Percentage"
328
+ /* @__PURE__ */ f("input", {
329
+ id: "unit",
330
+ type: "text",
331
+ value: L,
332
+ onChange: (e) => R(e.target.value),
333
+ 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)]",
334
+ placeholder: "e.g., bots, GB, MB, seats, workflow runs",
335
+ required: !0
336
+ }),
337
+ /* @__PURE__ */ f("p", {
338
+ className: "text-xs text-text-muted mt-1",
339
+ children: "The unit of measurement displayed with usage values (e.g., \"2/6 bots\")"
294
340
  })
295
- ]
296
- })] }),
297
- /* @__PURE__ */ p("div", { children: [
298
- /* @__PURE__ */ f("label", {
299
- htmlFor: "limitValue",
300
- className: "block text-sm font-medium text-text-primary mb-1",
301
- children: "Limit Value *"
302
- }),
303
- /* @__PURE__ */ f("input", {
304
- id: "limitValue",
305
- type: "number",
306
- min: "0",
307
- value: P,
308
- onChange: (e) => F(e.target.value),
309
- 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)]",
310
- placeholder: "1000",
311
- required: !0
312
- }),
313
- /* @__PURE__ */ f("p", {
314
- className: "text-xs text-text-muted mt-1",
315
- children: "The maximum limit value for this quota"
316
- })
317
- ] }),
318
- /* @__PURE__ */ p("div", { children: [
319
- /* @__PURE__ */ f("label", {
320
- htmlFor: "unit",
321
- className: "block text-sm font-medium text-text-primary mb-1",
322
- children: "Unit *"
323
- }),
324
- /* @__PURE__ */ f("input", {
325
- id: "unit",
326
- type: "text",
327
- value: I,
328
- onChange: (e) => L(e.target.value),
329
- 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)]",
330
- placeholder: "e.g., bots, GB, MB, seats, workflow runs",
331
- required: !0
332
- }),
333
- /* @__PURE__ */ f("p", {
334
- className: "text-xs text-text-muted mt-1",
335
- children: "The unit of measurement displayed with usage values (e.g., \"2/6 bots\")"
336
- })
337
- ] })
338
- ]
339
- })]
340
- }),
341
- /* @__PURE__ */ p("div", {
342
- className: "flex items-center gap-3 pt-4",
343
- children: [/* @__PURE__ */ f("button", {
344
- type: "submit",
345
- disabled: T,
346
- 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",
347
- children: T ? g("billing.quota.saving", "Saving...") : g("billing.quota.saveChanges", "Save Changes")
348
- }), /* @__PURE__ */ f("button", {
349
- type: "button",
350
- onClick: () => v(`/quotas/${_}`),
351
- className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
352
- children: "Cancel"
353
- })]
354
- })
355
- ]
356
- })]
341
+ ] })
342
+ ]
343
+ })]
344
+ }),
345
+ /* @__PURE__ */ p("div", {
346
+ className: "flex items-center gap-3 pt-4",
347
+ children: [/* @__PURE__ */ f("button", {
348
+ type: "submit",
349
+ disabled: E,
350
+ 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",
351
+ children: E ? _("billing.quota.saving", "Saving...") : _("billing.quota.saveChanges", "Save Changes")
352
+ }), /* @__PURE__ */ f("button", {
353
+ type: "button",
354
+ onClick: () => y(`/quotas/${v}`),
355
+ className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
356
+ children: "Cancel"
357
+ })]
358
+ })
359
+ ]
360
+ })
361
+ ]
357
362
  }) : /* @__PURE__ */ f("div", {
358
363
  className: "flex items-center justify-center h-full min-h-[400px]",
359
364
  children: /* @__PURE__ */ p("div", {
@@ -363,7 +368,7 @@ var h = () => {
363
368
  children: "Quota not found"
364
369
  }), /* @__PURE__ */ f("button", {
365
370
  type: "button",
366
- onClick: () => v("/quotas"),
371
+ onClick: () => y("/quotas"),
367
372
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover",
368
373
  children: "Back to Quotas"
369
374
  })]
@@ -371,6 +376,6 @@ var h = () => {
371
376
  }) : /* @__PURE__ */ f(e, { message: "You don't have permission to edit quotas." });
372
377
  };
373
378
  //#endregion
374
- export { h as QuotaTemplateEditPage };
379
+ export { g as QuotaTemplateEditPage };
375
380
 
376
381
  //# sourceMappingURL=QuotaTemplateEditPage.js.map