@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
@@ -11,48 +11,48 @@ import { useState as m } from "react";
11
11
  import { useParams as h } from "react-router-dom";
12
12
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
13
  import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
- import { ResponsiveTable as y } from "@burdenoff/fe-libs/ui";
14
+ import { EmphasisPanel as y, NextSteps as b, PagePurpose as x, ResponsiveTable as S } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/billing/modules/billing/pages/InvoiceDetailPage.tsx
16
- var b = () => {
17
- let { t: b } = v(), x = (e, t) => {
18
- let n = b(e);
16
+ var C = () => {
17
+ let { t: C } = v(), w = (e, t) => {
18
+ let n = C(e);
19
19
  return n === e ? t : n;
20
- }, { invoiceId: S } = h(), C = u(), { orgId: w } = e(), T = c(), { selectedAccountId: E } = t({
21
- orgId: w,
20
+ }, { invoiceId: T } = h(), E = u(), { orgId: D } = e(), O = c(), { selectedAccountId: k } = t({
21
+ orgId: D,
22
22
  syncFromUrl: !0,
23
23
  urlParamName: "billingAccountId"
24
- }), { data: D } = l({ fetchPolicy: "cache-first" }), O = E ?? D?.getDefaultBillingAccount?.id ?? void 0, { invoice: k, isLoading: A, error: j, refetch: M } = f(S, O), { payInvoice: N, voidInvoice: P, isPaying: F, isVoiding: I } = p(), L = D?.getDefaultBillingAccount?.defaultPaymentMethod, [R, z] = m(null), B = async () => {
25
- if (k) {
26
- if (!L) {
27
- z("Add and set a default payment method before paying this invoice.");
24
+ }), { data: A } = l({ fetchPolicy: "cache-first" }), j = k ?? A?.getDefaultBillingAccount?.id ?? void 0, { invoice: M, isLoading: N, error: P, refetch: F } = f(T, j), { payInvoice: I, voidInvoice: L, isPaying: R, isVoiding: z } = p(), B = A?.getDefaultBillingAccount?.defaultPaymentMethod, [V, H] = m(null), U = async () => {
25
+ if (M) {
26
+ if (!B) {
27
+ H("Add and set a default payment method before paying this invoice.");
28
28
  return;
29
29
  }
30
- if (!O) {
31
- z("No billing account context");
30
+ if (!j) {
31
+ H("No billing account context");
32
32
  return;
33
33
  }
34
- z(null);
34
+ H(null);
35
35
  try {
36
- await N(k.id, L, O), await M();
36
+ await I(M.id, B, j), await F();
37
37
  } catch (e) {
38
- z(e instanceof Error ? e.message : "Failed to pay invoice");
38
+ H(e instanceof Error ? e.message : "Failed to pay invoice");
39
39
  }
40
40
  }
41
- }, V = async () => {
42
- if (k) {
43
- if (!O) {
44
- z("No billing account context");
41
+ }, W = async () => {
42
+ if (M) {
43
+ if (!j) {
44
+ H("No billing account context");
45
45
  return;
46
46
  }
47
- z(null);
47
+ H(null);
48
48
  try {
49
- await P(k.id, O), await M();
49
+ await L(M.id, j), await F();
50
50
  } catch (e) {
51
- z(e instanceof Error ? e.message : "Failed to void invoice");
51
+ H(e instanceof Error ? e.message : "Failed to void invoice");
52
52
  }
53
53
  }
54
54
  };
55
- if (!T.canViewInvoices) return /* @__PURE__ */ g("div", {
55
+ if (!O.canViewInvoices) return /* @__PURE__ */ g("div", {
56
56
  className: "flex items-center justify-center h-full min-h-[400px]",
57
57
  children: /* @__PURE__ */ _("div", {
58
58
  className: "text-center space-y-2",
@@ -74,16 +74,16 @@ var b = () => {
74
74
  }),
75
75
  /* @__PURE__ */ g("h2", {
76
76
  className: "text-lg font-semibold text-text-primary",
77
- children: x("billing.accessDenied.title", "Access Denied")
77
+ children: w("billing.accessDenied.title", "Access Denied")
78
78
  }),
79
79
  /* @__PURE__ */ g("p", {
80
80
  className: "text-sm text-text-secondary max-w-sm",
81
- children: x("billing.invoices.noViewPermission", "You don't have permission to view invoices.")
81
+ children: w("billing.invoices.noViewPermission", "You don't have permission to view invoices.")
82
82
  })
83
83
  ]
84
84
  })
85
85
  });
86
- if (A) return /* @__PURE__ */ _("div", {
86
+ if (N) return /* @__PURE__ */ _("div", {
87
87
  className: "space-y-6 px-6 lg:px-8 py-6",
88
88
  children: [/* @__PURE__ */ _("div", {
89
89
  className: "flex items-center gap-4",
@@ -135,7 +135,7 @@ var b = () => {
135
135
  })]
136
136
  })]
137
137
  });
138
- if (j || !k) return /* @__PURE__ */ g("div", {
138
+ if (P || !M) return /* @__PURE__ */ g("div", {
139
139
  className: "flex items-center justify-center h-full min-h-[400px]",
140
140
  children: /* @__PURE__ */ _("div", {
141
141
  className: "text-center space-y-4",
@@ -157,22 +157,22 @@ var b = () => {
157
157
  }),
158
158
  /* @__PURE__ */ g("h2", {
159
159
  className: "text-lg font-semibold text-text-primary",
160
- children: x("billing.invoices.invoiceNotFound", "Invoice not found")
160
+ children: w("billing.invoices.invoiceNotFound", "Invoice not found")
161
161
  }),
162
162
  /* @__PURE__ */ g("p", {
163
163
  className: "text-sm text-text-secondary",
164
- children: j?.message || x("billing.invoices.invoiceNotFoundMessage", "The invoice you are looking for does not exist.")
164
+ children: P?.message || w("billing.invoices.invoiceNotFoundMessage", "The invoice you are looking for does not exist.")
165
165
  }),
166
166
  /* @__PURE__ */ _("div", {
167
167
  className: "flex items-center justify-center gap-3",
168
168
  children: [/* @__PURE__ */ g("button", {
169
169
  type: "button",
170
- onClick: () => M(),
170
+ onClick: () => F(),
171
171
  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",
172
172
  children: "Try Again"
173
173
  }), /* @__PURE__ */ g("button", {
174
174
  type: "button",
175
- onClick: () => C(d("/invoices", O)),
175
+ onClick: () => E(d("/invoices", j)),
176
176
  className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
177
177
  children: "Back to Invoices"
178
178
  })]
@@ -180,7 +180,69 @@ var b = () => {
180
180
  ]
181
181
  })
182
182
  });
183
- let H = o(k.status), U = k.status === "OPEN", W = k.status === "DRAFT", G = k.items || [], K = k.total - k.amountPaid;
183
+ let G = o(M.status), K = M.status === "OPEN", q = M.status === "DRAFT", J = M.items || [], Y = M.total - M.amountPaid, X = [
184
+ {
185
+ key: "description",
186
+ header: "Description",
187
+ priority: "primary",
188
+ cell: (e) => e.description
189
+ },
190
+ {
191
+ key: "quantity",
192
+ header: "Qty",
193
+ headerClassName: "text-right",
194
+ cellClassName: "text-right",
195
+ cell: (e) => /* @__PURE__ */ g("span", {
196
+ className: "tabular-nums",
197
+ children: e.quantity
198
+ })
199
+ },
200
+ {
201
+ key: "unitPrice",
202
+ header: "Unit Price",
203
+ headerClassName: "text-right",
204
+ cellClassName: "text-right",
205
+ cell: (e) => /* @__PURE__ */ g("span", {
206
+ className: "tabular-nums",
207
+ children: n(e.unitPrice, M.currency)
208
+ })
209
+ },
210
+ {
211
+ key: "amount",
212
+ header: "Amount",
213
+ headerClassName: "text-right",
214
+ cellClassName: "text-right font-medium",
215
+ cell: (e) => /* @__PURE__ */ g("span", {
216
+ className: "tabular-nums",
217
+ children: n(e.amount, M.currency)
218
+ })
219
+ }
220
+ ], Z = [
221
+ ...K && O.canPayInvoice ? [{
222
+ id: "pay",
223
+ label: "Pay this invoice",
224
+ description: B ? "Settle the outstanding amount with your default payment method." : "Add a default payment method first, then pay.",
225
+ onClick: U
226
+ }] : [],
227
+ ...M.pdfUrl ? [{
228
+ id: "download",
229
+ label: "Download the PDF",
230
+ description: "Save a copy of this invoice for your records.",
231
+ href: M.pdfUrl
232
+ }] : [],
233
+ ...M.subscription ? [{
234
+ id: "view-subscription",
235
+ label: "View the related subscription",
236
+ description: "See the plan and quotas this invoice billed for.",
237
+ onClick: () => E(d(`/subscriptions/${M.subscription.id}`, j))
238
+ }] : [],
239
+ {
240
+ id: "request-refund",
241
+ label: "Have an issue? Request a refund",
242
+ description: "Raise a refund request for a charge on this account.",
243
+ onClick: () => E(d("/refunds", j))
244
+ }
245
+ ];
184
246
  return /* @__PURE__ */ _("div", {
185
247
  className: "space-y-6 px-6 lg:px-8 py-6",
186
248
  children: [
@@ -190,7 +252,7 @@ var b = () => {
190
252
  className: "flex items-start gap-4",
191
253
  children: [/* @__PURE__ */ g("button", {
192
254
  type: "button",
193
- onClick: () => C(d("/invoices", O)),
255
+ onClick: () => E(d("/invoices", j)),
194
256
  className: "p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
195
257
  children: /* @__PURE__ */ g("svg", {
196
258
  className: "size-5",
@@ -204,62 +266,69 @@ var b = () => {
204
266
  d: "M15 19l-7-7 7-7"
205
267
  })
206
268
  })
207
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("div", {
208
- className: "flex items-center gap-3",
209
- children: [/* @__PURE__ */ _("h1", {
210
- className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
211
- children: ["Invoice ", i(k.invoiceNumber)]
212
- }), /* @__PURE__ */ g("span", {
213
- className: `px-2 py-1 text-xs font-medium rounded ${s(H)}`,
214
- children: a(k.status)
215
- })]
216
- }), /* @__PURE__ */ _("p", {
217
- className: "text-sm text-text-secondary mt-1",
218
- children: [
219
- "Created ",
220
- r(k.createdAt, "short"),
221
- k.dueDate && ` · Due ${r(k.dueDate, "short")}`
222
- ]
223
- })] })]
269
+ }), /* @__PURE__ */ _("div", { children: [
270
+ /* @__PURE__ */ _("div", {
271
+ className: "flex items-center gap-3",
272
+ children: [/* @__PURE__ */ _("h1", {
273
+ className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
274
+ children: ["Invoice ", i(M.invoiceNumber)]
275
+ }), /* @__PURE__ */ g("span", {
276
+ className: `px-2 py-1 text-xs font-medium rounded ${s(G)}`,
277
+ children: a(M.status)
278
+ })]
279
+ }),
280
+ /* @__PURE__ */ _("p", {
281
+ className: "text-sm text-text-secondary mt-1",
282
+ children: [
283
+ "Created ",
284
+ r(M.createdAt, "short"),
285
+ M.dueDate && ` · Due ${r(M.dueDate, "short")}`
286
+ ]
287
+ }),
288
+ /* @__PURE__ */ g(x, {
289
+ className: "mt-3",
290
+ children: w("billing.invoices.detailPurpose", "The full breakdown of a single invoice — its line items, taxes, what has been paid and what is still due. Use it to download the PDF, pay an outstanding balance, jump to the subscription it covers, or raise a refund.")
291
+ })
292
+ ] })]
224
293
  }), /* @__PURE__ */ _("div", {
225
294
  className: "flex items-center gap-2 flex-wrap",
226
295
  children: [
227
- k.pdfUrl && /* @__PURE__ */ g("a", {
228
- href: k.pdfUrl,
296
+ M.pdfUrl && /* @__PURE__ */ g("a", {
297
+ href: M.pdfUrl,
229
298
  target: "_blank",
230
299
  rel: "noopener noreferrer",
231
300
  className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
232
301
  children: "Download PDF"
233
302
  }),
234
- k.invoiceUrl && /* @__PURE__ */ g("a", {
235
- href: k.invoiceUrl,
303
+ M.invoiceUrl && /* @__PURE__ */ g("a", {
304
+ href: M.invoiceUrl,
236
305
  target: "_blank",
237
306
  rel: "noopener noreferrer",
238
307
  className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
239
308
  children: "View on Portal"
240
309
  }),
241
- U && T.canPayInvoice && /* @__PURE__ */ g("button", {
310
+ K && O.canPayInvoice && /* @__PURE__ */ g("button", {
242
311
  type: "button",
243
- onClick: B,
244
- disabled: F || !L,
312
+ onClick: U,
313
+ disabled: R || !B,
245
314
  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 disabled:opacity-50",
246
- children: L ? F ? "Processing..." : "Pay Invoice" : "Default Payment Method Required"
315
+ children: B ? R ? "Processing..." : "Pay Invoice" : "Default Payment Method Required"
247
316
  }),
248
- (U || W) && T.canVoidInvoice && /* @__PURE__ */ g("button", {
317
+ (K || q) && O.canVoidInvoice && /* @__PURE__ */ g("button", {
249
318
  type: "button",
250
- onClick: V,
251
- disabled: I,
319
+ onClick: W,
320
+ disabled: z,
252
321
  className: "px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-button hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
253
- children: I ? x("billing.invoices.voiding", "Voiding...") : x("billing.invoices.voidInvoice", "Void Invoice")
322
+ children: z ? w("billing.invoices.voiding", "Voiding...") : w("billing.invoices.voidInvoice", "Void Invoice")
254
323
  })
255
324
  ]
256
325
  })]
257
326
  }),
258
- R && /* @__PURE__ */ g("div", {
327
+ V && /* @__PURE__ */ g("div", {
259
328
  className: "p-3 bg-status-error-bg-subtle border border-status-error-border rounded-button",
260
329
  children: /* @__PURE__ */ g("p", {
261
330
  className: "text-sm text-status-error-text",
262
- children: R
331
+ children: V
263
332
  })
264
333
  }),
265
334
  /* @__PURE__ */ _("div", {
@@ -267,68 +336,31 @@ var b = () => {
267
336
  children: [/* @__PURE__ */ _("div", {
268
337
  className: "lg:col-span-2 space-y-6",
269
338
  children: [
270
- /* @__PURE__ */ _("div", {
271
- className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
339
+ /* @__PURE__ */ _(y, {
340
+ className: "overflow-hidden p-0",
272
341
  children: [
273
342
  /* @__PURE__ */ g("div", {
274
- className: "p-6 border-b border-border-subtle bg-bg-sunken",
343
+ className: "p-6 border-b border-border-subtle",
275
344
  children: /* @__PURE__ */ _("h2", {
276
345
  className: "text-lg font-semibold text-text-primary",
277
346
  children: [
278
- x("billing.invoices.lineItems", "Line Items"),
347
+ w("billing.invoices.lineItems", "Line Items"),
279
348
  " (",
280
- G.length,
349
+ J.length,
281
350
  ")"
282
351
  ]
283
352
  })
284
353
  }),
285
- G.length === 0 ? /* @__PURE__ */ g("div", {
354
+ J.length === 0 ? /* @__PURE__ */ g("div", {
286
355
  className: "p-6",
287
356
  children: /* @__PURE__ */ g("p", {
288
357
  className: "text-sm text-text-secondary",
289
- children: x("billing.invoices.noLineItems", "No line items on this invoice.")
358
+ children: w("billing.invoices.noLineItems", "No line items on this invoice.")
290
359
  })
291
- }) : /* @__PURE__ */ g(y, {
292
- data: G,
360
+ }) : /* @__PURE__ */ g(S, {
361
+ data: J,
293
362
  rowKey: (e) => e.id,
294
- columns: [
295
- {
296
- key: "description",
297
- header: "Description",
298
- priority: "primary",
299
- cell: (e) => e.description
300
- },
301
- {
302
- key: "quantity",
303
- header: "Qty",
304
- headerClassName: "text-right",
305
- cellClassName: "text-right",
306
- cell: (e) => /* @__PURE__ */ g("span", {
307
- className: "tabular-nums",
308
- children: e.quantity
309
- })
310
- },
311
- {
312
- key: "unitPrice",
313
- header: "Unit Price",
314
- headerClassName: "text-right",
315
- cellClassName: "text-right",
316
- cell: (e) => /* @__PURE__ */ g("span", {
317
- className: "tabular-nums",
318
- children: n(e.unitPrice, k.currency)
319
- })
320
- },
321
- {
322
- key: "amount",
323
- header: "Amount",
324
- headerClassName: "text-right",
325
- cellClassName: "text-right font-medium",
326
- cell: (e) => /* @__PURE__ */ g("span", {
327
- className: "tabular-nums",
328
- children: n(e.amount, k.currency)
329
- })
330
- }
331
- ]
363
+ columns: X
332
364
  }),
333
365
  /* @__PURE__ */ g("div", {
334
366
  className: "border-t border-border-subtle p-4",
@@ -339,50 +371,50 @@ var b = () => {
339
371
  className: "flex items-center justify-between text-sm",
340
372
  children: [/* @__PURE__ */ g("span", {
341
373
  className: "text-text-secondary",
342
- children: x("billing.invoices.subtotal", "Subtotal")
374
+ children: w("billing.invoices.subtotal", "Subtotal")
343
375
  }), /* @__PURE__ */ g("span", {
344
376
  className: "text-text-primary",
345
- children: n(k.subtotal, k.currency)
377
+ children: n(M.subtotal, M.currency)
346
378
  })]
347
379
  }),
348
380
  /* @__PURE__ */ _("div", {
349
381
  className: "flex items-center justify-between text-sm",
350
382
  children: [/* @__PURE__ */ g("span", {
351
383
  className: "text-text-secondary",
352
- children: x("billing.invoices.tax", "Tax")
384
+ children: w("billing.invoices.tax", "Tax")
353
385
  }), /* @__PURE__ */ g("span", {
354
386
  className: "text-text-primary",
355
- children: n(k.tax, k.currency)
387
+ children: n(M.tax, M.currency)
356
388
  })]
357
389
  }),
358
390
  /* @__PURE__ */ _("div", {
359
391
  className: "flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2",
360
392
  children: [/* @__PURE__ */ g("span", {
361
393
  className: "text-text-primary",
362
- children: x("billing.invoices.total", "Total")
394
+ children: w("billing.invoices.total", "Total")
363
395
  }), /* @__PURE__ */ g("span", {
364
396
  className: "text-text-primary",
365
- children: n(k.total, k.currency)
397
+ children: n(M.total, M.currency)
366
398
  })]
367
399
  }),
368
- k.amountPaid > 0 && /* @__PURE__ */ _("div", {
400
+ M.amountPaid > 0 && /* @__PURE__ */ _("div", {
369
401
  className: "flex items-center justify-between text-sm",
370
402
  children: [/* @__PURE__ */ g("span", {
371
403
  className: "text-text-secondary",
372
- children: x("billing.invoices.amountPaid", "Amount Paid")
404
+ children: w("billing.invoices.amountPaid", "Amount Paid")
373
405
  }), /* @__PURE__ */ _("span", {
374
406
  className: "text-status-success-text",
375
- children: ["-", n(k.amountPaid, k.currency)]
407
+ children: ["-", n(M.amountPaid, M.currency)]
376
408
  })]
377
409
  }),
378
- K > 0 && /* @__PURE__ */ _("div", {
410
+ Y > 0 && /* @__PURE__ */ _("div", {
379
411
  className: "flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2",
380
412
  children: [/* @__PURE__ */ g("span", {
381
413
  className: "text-text-primary",
382
- children: x("billing.invoices.amountDue", "Amount Due")
414
+ children: w("billing.invoices.amountDue", "Amount Due")
383
415
  }), /* @__PURE__ */ g("span", {
384
416
  className: "text-status-warning-text",
385
- children: n(K, k.currency)
417
+ children: n(Y, M.currency)
386
418
  })]
387
419
  })
388
420
  ]
@@ -390,13 +422,13 @@ var b = () => {
390
422
  })
391
423
  ]
392
424
  }),
393
- k.subscription && /* @__PURE__ */ _("div", {
425
+ M.subscription && /* @__PURE__ */ _("div", {
394
426
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
395
427
  children: [/* @__PURE__ */ g("div", {
396
428
  className: "p-6 border-b border-border-subtle bg-bg-sunken",
397
429
  children: /* @__PURE__ */ g("h2", {
398
430
  className: "text-lg font-semibold text-text-primary",
399
- children: x("billing.invoices.subscription", "Subscription")
431
+ children: w("billing.invoices.subscription", "Subscription")
400
432
  })
401
433
  }), /* @__PURE__ */ g("div", {
402
434
  className: "p-6 space-y-4",
@@ -404,7 +436,7 @@ var b = () => {
404
436
  className: "flex items-center justify-between",
405
437
  children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
406
438
  className: "font-medium text-text-primary",
407
- children: k.subscription.plan?.name || "Unknown Plan"
439
+ children: M.subscription.plan?.name || "Unknown Plan"
408
440
  }), /* @__PURE__ */ _("p", {
409
441
  className: "text-sm text-text-secondary mt-0.5",
410
442
  children: [
@@ -412,25 +444,25 @@ var b = () => {
412
444
  " ",
413
445
  /* @__PURE__ */ g("span", {
414
446
  className: "font-mono text-xs",
415
- children: k.subscription.id
447
+ children: M.subscription.id
416
448
  })
417
449
  ]
418
450
  })] }), /* @__PURE__ */ g("button", {
419
451
  type: "button",
420
- onClick: () => C(d(`/subscriptions/${k.subscription.id}`, O)),
452
+ onClick: () => E(d(`/subscriptions/${M.subscription.id}`, j)),
421
453
  className: "px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors",
422
454
  children: "View"
423
455
  })]
424
456
  })
425
457
  })]
426
458
  }),
427
- k.payment && /* @__PURE__ */ _("div", {
459
+ M.payment && /* @__PURE__ */ _("div", {
428
460
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
429
461
  children: [/* @__PURE__ */ g("div", {
430
462
  className: "p-6 border-b border-border-subtle bg-bg-sunken",
431
463
  children: /* @__PURE__ */ g("h2", {
432
464
  className: "text-lg font-semibold text-text-primary",
433
- children: x("billing.invoices.payment", "Payment")
465
+ children: w("billing.invoices.payment", "Payment")
434
466
  })
435
467
  }), /* @__PURE__ */ g("div", {
436
468
  className: "p-6",
@@ -442,42 +474,42 @@ var b = () => {
442
474
  children: "Payment ID"
443
475
  }), /* @__PURE__ */ g("p", {
444
476
  className: "font-mono text-sm text-text-primary mt-0.5 break-all",
445
- children: k.payment.id
477
+ children: M.payment.id
446
478
  })] }),
447
479
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
448
480
  className: "text-sm text-text-secondary",
449
481
  children: "Amount"
450
482
  }), /* @__PURE__ */ g("p", {
451
483
  className: "text-sm text-text-primary mt-0.5",
452
- children: n(k.payment.amount, k.payment.currency)
484
+ children: n(M.payment.amount, M.payment.currency)
453
485
  })] }),
454
486
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
455
487
  className: "text-sm text-text-secondary",
456
488
  children: "Status"
457
489
  }), /* @__PURE__ */ g("p", {
458
490
  className: "text-sm text-text-primary mt-0.5 capitalize",
459
- children: k.payment.status.toLowerCase()
491
+ children: M.payment.status.toLowerCase()
460
492
  })] }),
461
493
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
462
494
  className: "text-sm text-text-secondary",
463
495
  children: "Method"
464
496
  }), /* @__PURE__ */ g("p", {
465
497
  className: "text-sm text-text-primary mt-0.5 capitalize",
466
- children: k.payment.method.toLowerCase().replace(/_/g, " ")
498
+ children: M.payment.method.toLowerCase().replace(/_/g, " ")
467
499
  })] }),
468
- k.payment.provider && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
500
+ M.payment.provider && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
469
501
  className: "text-sm text-text-secondary",
470
502
  children: "Provider"
471
503
  }), /* @__PURE__ */ g("p", {
472
504
  className: "text-sm text-text-primary mt-0.5 capitalize",
473
- children: k.payment.provider
505
+ children: M.payment.provider
474
506
  })] }),
475
- k.payment.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
507
+ M.payment.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
476
508
  className: "text-sm text-text-secondary",
477
509
  children: "Paid At"
478
510
  }), /* @__PURE__ */ g("p", {
479
511
  className: "text-sm text-text-primary mt-0.5",
480
- children: r(k.payment.paidAt, "short")
512
+ children: r(M.payment.paidAt, "short")
481
513
  })] })
482
514
  ]
483
515
  })
@@ -487,13 +519,17 @@ var b = () => {
487
519
  }), /* @__PURE__ */ _("div", {
488
520
  className: "space-y-6",
489
521
  children: [
522
+ /* @__PURE__ */ g(b, {
523
+ storageKey: "billing-invoice-detail",
524
+ steps: Z
525
+ }),
490
526
  /* @__PURE__ */ _("div", {
491
527
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
492
528
  children: [/* @__PURE__ */ g("div", {
493
529
  className: "p-6 border-b border-border-subtle bg-bg-sunken",
494
530
  children: /* @__PURE__ */ g("h2", {
495
531
  className: "text-lg font-semibold text-text-primary",
496
- children: x("billing.invoices.details", "Details")
532
+ children: w("billing.invoices.details", "Details")
497
533
  })
498
534
  }), /* @__PURE__ */ _("div", {
499
535
  className: "p-6 space-y-4",
@@ -503,56 +539,56 @@ var b = () => {
503
539
  children: "Invoice ID"
504
540
  }), /* @__PURE__ */ g("p", {
505
541
  className: "font-mono text-sm text-text-primary mt-0.5 break-all",
506
- children: k.id
542
+ children: M.id
507
543
  })] }),
508
544
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
509
545
  className: "text-sm text-text-secondary",
510
546
  children: "Invoice Number"
511
547
  }), /* @__PURE__ */ g("p", {
512
548
  className: "text-sm text-text-primary mt-0.5",
513
- children: i(k.invoiceNumber)
549
+ children: i(M.invoiceNumber)
514
550
  })] }),
515
- k.itemDescription && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
551
+ M.itemDescription && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
516
552
  className: "text-sm text-text-secondary",
517
553
  children: "Description"
518
554
  }), /* @__PURE__ */ g("p", {
519
555
  className: "text-sm text-text-primary mt-0.5",
520
- children: k.itemDescription
556
+ children: M.itemDescription
521
557
  })] }),
522
558
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
523
559
  className: "text-sm text-text-secondary",
524
560
  children: "Status"
525
561
  }), /* @__PURE__ */ g("span", {
526
- className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${s(H)}`,
527
- children: a(k.status)
562
+ className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${s(G)}`,
563
+ children: a(M.status)
528
564
  })] }),
529
565
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
530
566
  className: "text-sm text-text-secondary",
531
567
  children: "Currency"
532
568
  }), /* @__PURE__ */ g("p", {
533
569
  className: "text-sm text-text-primary mt-0.5",
534
- children: k.currency
570
+ children: M.currency
535
571
  })] }),
536
572
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
537
573
  className: "text-sm text-text-secondary",
538
574
  children: "Total"
539
575
  }), /* @__PURE__ */ g("p", {
540
576
  className: "text-sm font-semibold text-text-primary mt-0.5",
541
- children: n(k.total, k.currency)
577
+ children: n(M.total, M.currency)
542
578
  })] }),
543
579
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
544
580
  className: "text-sm text-text-secondary",
545
581
  children: "Amount Paid"
546
582
  }), /* @__PURE__ */ g("p", {
547
583
  className: "text-sm text-status-success-text mt-0.5",
548
- children: n(k.amountPaid, k.currency)
584
+ children: n(M.amountPaid, M.currency)
549
585
  })] }),
550
- K > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
586
+ Y > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
551
587
  className: "text-sm text-text-secondary",
552
588
  children: "Amount Due"
553
589
  }), /* @__PURE__ */ g("p", {
554
590
  className: "text-sm font-semibold text-status-warning-text mt-0.5",
555
- children: n(K, k.currency)
591
+ children: n(Y, M.currency)
556
592
  })] })
557
593
  ]
558
594
  })]
@@ -563,7 +599,7 @@ var b = () => {
563
599
  className: "p-6 border-b border-border-subtle bg-bg-sunken",
564
600
  children: /* @__PURE__ */ g("h2", {
565
601
  className: "text-lg font-semibold text-text-primary",
566
- children: x("billing.invoices.dates", "Dates")
602
+ children: w("billing.invoices.dates", "Dates")
567
603
  })
568
604
  }), /* @__PURE__ */ _("div", {
569
605
  className: "p-6 space-y-4",
@@ -573,28 +609,28 @@ var b = () => {
573
609
  children: "Created"
574
610
  }), /* @__PURE__ */ g("p", {
575
611
  className: "text-sm text-text-primary mt-0.5",
576
- children: r(k.createdAt)
612
+ children: r(M.createdAt)
577
613
  })] }),
578
- k.dueDate && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
614
+ M.dueDate && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
579
615
  className: "text-sm text-text-secondary",
580
616
  children: "Due Date"
581
617
  }), /* @__PURE__ */ g("p", {
582
618
  className: "text-sm text-text-primary mt-0.5",
583
- children: r(k.dueDate)
619
+ children: r(M.dueDate)
584
620
  })] }),
585
- k.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
621
+ M.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
586
622
  className: "text-sm text-text-secondary",
587
623
  children: "Paid At"
588
624
  }), /* @__PURE__ */ g("p", {
589
625
  className: "text-sm text-text-primary mt-0.5",
590
- children: r(k.paidAt)
626
+ children: r(M.paidAt)
591
627
  })] }),
592
628
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
593
629
  className: "text-sm text-text-secondary",
594
630
  children: "Last Updated"
595
631
  }), /* @__PURE__ */ g("p", {
596
632
  className: "text-sm text-text-primary mt-0.5",
597
- children: r(k.updatedAt)
633
+ children: r(M.updatedAt)
598
634
  })] })
599
635
  ]
600
636
  })]
@@ -605,7 +641,7 @@ var b = () => {
605
641
  className: "p-6 border-b border-border-subtle bg-bg-sunken",
606
642
  children: /* @__PURE__ */ g("h2", {
607
643
  className: "text-lg font-semibold text-text-primary",
608
- children: x("billing.invoices.organization", "Organization")
644
+ children: w("billing.invoices.organization", "Organization")
609
645
  })
610
646
  }), /* @__PURE__ */ g("div", {
611
647
  className: "p-6 space-y-4",
@@ -614,7 +650,7 @@ var b = () => {
614
650
  children: "Organization ID"
615
651
  }), /* @__PURE__ */ g("p", {
616
652
  className: "font-mono text-sm text-text-primary mt-0.5 break-all",
617
- children: k.orgId
653
+ children: M.orgId
618
654
  })] })
619
655
  })]
620
656
  })
@@ -625,6 +661,6 @@ var b = () => {
625
661
  });
626
662
  };
627
663
  //#endregion
628
- export { b as InvoiceDetailPage };
664
+ export { C as InvoiceDetailPage };
629
665
 
630
666
  //# sourceMappingURL=InvoiceDetailPage.js.map