@carlonicora/nextjs-jsonapi 1.36.1 → 1.37.0

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 (154) hide show
  1. package/dist/{BlockNoteEditor-4MDHRUS2.js → BlockNoteEditor-74FHJO7E.js} +8 -8
  2. package/dist/{BlockNoteEditor-4MDHRUS2.js.map → BlockNoteEditor-74FHJO7E.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-SZWO3MDO.mjs → BlockNoteEditor-GTWR6CPI.mjs} +4 -4
  4. package/dist/BlockNoteEditor-GTWR6CPI.mjs.map +1 -0
  5. package/dist/billing/index.d.mts +3 -3
  6. package/dist/billing/index.d.ts +3 -3
  7. package/dist/billing/index.js +365 -363
  8. package/dist/billing/index.js.map +1 -1
  9. package/dist/billing/index.mjs +80 -78
  10. package/dist/billing/index.mjs.map +1 -1
  11. package/dist/{chunk-E6PQQTWF.js → chunk-YVEK3SUS.js} +640 -1320
  12. package/dist/chunk-YVEK3SUS.js.map +1 -0
  13. package/dist/{chunk-I7DFEJFF.mjs → chunk-ZUUH4CQC.mjs} +737 -1417
  14. package/dist/chunk-ZUUH4CQC.mjs.map +1 -0
  15. package/dist/client/index.js +2 -2
  16. package/dist/client/index.mjs +1 -1
  17. package/dist/components/index.d.mts +23 -8
  18. package/dist/components/index.d.ts +23 -8
  19. package/dist/components/index.js +2 -2
  20. package/dist/components/index.mjs +1 -1
  21. package/dist/contexts/index.d.mts +1 -1
  22. package/dist/contexts/index.d.ts +1 -1
  23. package/dist/contexts/index.js +2 -2
  24. package/dist/contexts/index.mjs +1 -1
  25. package/dist/testing/index.js.map +1 -1
  26. package/dist/testing/index.mjs.map +1 -1
  27. package/package.json +2 -2
  28. package/src/client/context/JsonApiProvider.tsx +1 -5
  29. package/src/client/hooks/__tests__/useJsonApiGet.test.tsx +9 -9
  30. package/src/client/hooks/__tests__/useJsonApiMutation.test.tsx +11 -11
  31. package/src/client/hooks/__tests__/useRehydration.test.ts +13 -34
  32. package/src/components/editors/BlockNoteEditor.tsx +2 -2
  33. package/src/components/forms/CommonEditorTrigger.tsx +1 -1
  34. package/src/components/forms/FormCheckbox.tsx +2 -12
  35. package/src/components/forms/FormDate.tsx +1 -6
  36. package/src/components/forms/FormInput.tsx +1 -1
  37. package/src/components/forms/FormPassword.tsx +1 -7
  38. package/src/components/forms/FormSelect.tsx +2 -8
  39. package/src/components/forms/FormSlider.tsx +1 -5
  40. package/src/components/forms/FormSwitch.tsx +1 -5
  41. package/src/components/forms/GdprConsentCheckbox.tsx +2 -8
  42. package/src/components/forms/PasswordInput.tsx +28 -26
  43. package/src/components/forms/__tests__/FormCheckbox.test.tsx +16 -18
  44. package/src/components/forms/__tests__/FormDate.test.tsx +14 -30
  45. package/src/components/forms/__tests__/FormInput.test.tsx +21 -37
  46. package/src/components/forms/__tests__/FormSelect.test.tsx +15 -21
  47. package/src/components/tables/ContentListTable.tsx +1 -1
  48. package/src/components/tables/__tests__/ContentListTable.test.tsx +17 -89
  49. package/src/components/tables/cells/cell.component.tsx +1 -1
  50. package/src/contexts/HeaderChildrenContext.tsx +3 -1
  51. package/src/core/endpoint/__tests__/EndpointCreator.test.ts +2 -7
  52. package/src/core/factories/__tests__/JsonApiDataFactory.test.ts +3 -3
  53. package/src/core/factories/__tests__/RehydrationFactory.test.ts +4 -6
  54. package/src/core/registry/__tests__/DataClassRegistry.test.ts +5 -15
  55. package/src/core/registry/__tests__/ModuleRegistrar.test.ts +5 -15
  56. package/src/features/auth/components/GdprConsentSection.tsx +1 -6
  57. package/src/features/auth/components/details/LandingComponent.tsx +6 -1
  58. package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
  59. package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
  60. package/src/features/billing/components/cards/PaymentMethodSummaryCard.tsx +13 -18
  61. package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +7 -1
  62. package/src/features/billing/components/modals/BillingDetailModal.tsx +2 -13
  63. package/src/features/billing/stripe-customer/components/details/PaymentMethodCard.tsx +8 -1
  64. package/src/features/billing/stripe-customer/components/forms/PaymentMethodEditor.tsx +2 -13
  65. package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +2 -12
  66. package/src/features/billing/stripe-invoice/components/details/InvoiceDetails.tsx +6 -1
  67. package/src/features/billing/stripe-price/components/lists/PricesList.tsx +13 -5
  68. package/src/features/billing/stripe-product/components/lists/ProductsList.tsx +5 -5
  69. package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +1 -3
  70. package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +4 -1
  71. package/src/features/billing/stripe-subscription/components/forms/CancelSubscriptionDialog.tsx +1 -1
  72. package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +4 -1
  73. package/src/features/billing/stripe-subscription/components/widgets/PricingCard.tsx +9 -2
  74. package/src/features/billing/stripe-subscription/components/widgets/SubscriptionStatusBadge.tsx +3 -1
  75. package/src/features/billing/stripe-subscription/components/wizards/SubscriptionWizard.tsx +1 -7
  76. package/src/features/billing/stripe-subscription/components/wizards/WizardProgressIndicator.tsx +2 -10
  77. package/src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx +3 -13
  78. package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +5 -16
  79. package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +1 -1
  80. package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +1 -1
  81. package/src/features/company/components/details/CompanyDetails.tsx +2 -2
  82. package/src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx +1 -1
  83. package/src/features/notification/components/containers/NotificationsListContainer.tsx +1 -1
  84. package/src/features/notification/components/modals/NotificationModal.tsx +6 -2
  85. package/src/features/notification/contexts/NotificationContext.tsx +1 -3
  86. package/src/features/oauth/components/OAuthClientCard.tsx +15 -17
  87. package/src/features/oauth/components/OAuthClientDetail.tsx +7 -19
  88. package/src/features/oauth/components/OAuthClientForm.tsx +4 -13
  89. package/src/features/oauth/components/OAuthClientSecretDisplay.tsx +4 -20
  90. package/src/features/oauth/components/OAuthRedirectUriInput.tsx +5 -12
  91. package/src/features/oauth/components/OAuthScopeSelector.tsx +17 -23
  92. package/src/features/oauth/components/consent/OAuthConsentActions.tsx +3 -16
  93. package/src/features/oauth/components/consent/OAuthConsentHeader.tsx +3 -12
  94. package/src/features/oauth/components/consent/OAuthConsentScreen.tsx +5 -20
  95. package/src/features/oauth/components/consent/OAuthScopeList.tsx +3 -18
  96. package/src/features/onboarding/contexts/OnboardingContext.tsx +3 -3
  97. package/src/features/role/components/forms/FormRoles.tsx +1 -7
  98. package/src/features/user/components/containers/UserContainer.tsx +1 -1
  99. package/src/features/user/components/details/UserDetails.tsx +1 -1
  100. package/src/features/user/components/forms/UserDeleter.tsx +1 -1
  101. package/src/features/user/components/forms/UserEditor.tsx +1 -1
  102. package/src/features/user/components/forms/UserMultiSelect.tsx +7 -7
  103. package/src/features/user/components/lists/UserListInAdd.tsx +2 -2
  104. package/src/features/user/components/lists/UsersList.tsx +7 -1
  105. package/src/features/user/contexts/CurrentUserContext.tsx +36 -33
  106. package/src/hooks/__tests__/useDataListRetriever.test.ts +15 -21
  107. package/src/hooks/__tests__/useDebounce.test.ts +2 -7
  108. package/src/hooks/useCustomD3Graph.tsx +2 -2
  109. package/src/shadcnui/custom/multi-select.tsx +28 -2
  110. package/src/shadcnui/ui/accordion.tsx +21 -23
  111. package/src/shadcnui/ui/alert-dialog.tsx +45 -62
  112. package/src/shadcnui/ui/alert.tsx +25 -41
  113. package/src/shadcnui/ui/avatar.tsx +23 -36
  114. package/src/shadcnui/ui/badge.tsx +13 -11
  115. package/src/shadcnui/ui/breadcrumb.tsx +21 -55
  116. package/src/shadcnui/ui/button.tsx +17 -18
  117. package/src/shadcnui/ui/calendar.tsx +44 -93
  118. package/src/shadcnui/ui/carousel.tsx +72 -100
  119. package/src/shadcnui/ui/chart.tsx +102 -161
  120. package/src/shadcnui/ui/checkbox.tsx +8 -9
  121. package/src/shadcnui/ui/combobox.tsx +52 -83
  122. package/src/shadcnui/ui/command.tsx +43 -77
  123. package/src/shadcnui/ui/context-menu.tsx +47 -86
  124. package/src/shadcnui/ui/dialog.tsx +34 -60
  125. package/src/shadcnui/ui/drawer.tsx +32 -53
  126. package/src/shadcnui/ui/dropdown-menu.tsx +48 -65
  127. package/src/shadcnui/ui/field.tsx +39 -48
  128. package/src/shadcnui/ui/hover-card.tsx +9 -14
  129. package/src/shadcnui/ui/input-group.tsx +44 -55
  130. package/src/shadcnui/ui/input-otp.tsx +22 -26
  131. package/src/shadcnui/ui/input.tsx +6 -6
  132. package/src/shadcnui/ui/label.tsx +6 -6
  133. package/src/shadcnui/ui/navigation-menu.tsx +36 -60
  134. package/src/shadcnui/ui/popover.tsx +15 -38
  135. package/src/shadcnui/ui/progress.tsx +12 -29
  136. package/src/shadcnui/ui/radio-group.tsx +9 -15
  137. package/src/shadcnui/ui/resizable.tsx +14 -24
  138. package/src/shadcnui/ui/scroll-area.tsx +12 -27
  139. package/src/shadcnui/ui/select.tsx +41 -65
  140. package/src/shadcnui/ui/separator.tsx +7 -11
  141. package/src/shadcnui/ui/sheet.tsx +30 -55
  142. package/src/shadcnui/ui/sidebar.tsx +141 -189
  143. package/src/shadcnui/ui/skeleton.tsx +3 -9
  144. package/src/shadcnui/ui/slider.tsx +11 -23
  145. package/src/shadcnui/ui/switch.tsx +8 -8
  146. package/src/shadcnui/ui/tabs.tsx +14 -21
  147. package/src/shadcnui/ui/textarea.tsx +5 -5
  148. package/src/shadcnui/ui/toggle.tsx +8 -14
  149. package/src/shadcnui/ui/tooltip.tsx +11 -23
  150. package/src/testing/providers/MockJsonApiProvider.tsx +1 -5
  151. package/src/testing/utils/renderWithProviders.tsx +6 -10
  152. package/dist/BlockNoteEditor-SZWO3MDO.mjs.map +0 -1
  153. package/dist/chunk-E6PQQTWF.js.map +0 -1
  154. package/dist/chunk-I7DFEJFF.mjs.map +0 -1
@@ -47,7 +47,7 @@ import {
47
47
  TabsList,
48
48
  TabsTrigger,
49
49
  useCurrentUserContext
50
- } from "../chunk-I7DFEJFF.mjs";
50
+ } from "../chunk-ZUUH4CQC.mjs";
51
51
  import {
52
52
  getRoleId,
53
53
  getStripePublishableKey
@@ -173,7 +173,13 @@ function SubscriptionSummaryCard({
173
173
  ] }) : primarySubscription ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
174
174
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
175
175
  /* @__PURE__ */ jsx("p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription) }),
176
- /* @__PURE__ */ jsx(Badge, { variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status), children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status })
176
+ /* @__PURE__ */ jsx(
177
+ Badge,
178
+ {
179
+ variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
180
+ children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status
181
+ }
182
+ )
177
183
  ] }),
178
184
  /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
179
185
  formatPrice(primarySubscription.price?.unitAmount, primarySubscription.price?.currency),
@@ -246,13 +252,22 @@ function PaymentMethodSummaryCard({
246
252
  /* @__PURE__ */ jsx2(CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ jsxs2("div", { className: "space-y-2", children: [
247
253
  /* @__PURE__ */ jsx2("p", { className: "text-xl font-bold text-muted-foreground", children: "No payment method" }),
248
254
  /* @__PURE__ */ jsx2("p", { className: "text-xs text-muted-foreground", children: "Add a card to enable subscriptions" }),
249
- /* @__PURE__ */ jsxs2(Button, { variant: "outline", size: "sm", className: "mt-2", onClick: (e) => {
250
- e.stopPropagation();
251
- onManageClick();
252
- }, children: [
253
- "Add Card",
254
- /* @__PURE__ */ jsx2(ChevronRight2, { className: "h-4 w-4 ml-1" })
255
- ] })
255
+ /* @__PURE__ */ jsxs2(
256
+ Button,
257
+ {
258
+ variant: "outline",
259
+ size: "sm",
260
+ className: "mt-2",
261
+ onClick: (e) => {
262
+ e.stopPropagation();
263
+ onManageClick();
264
+ },
265
+ children: [
266
+ "Add Card",
267
+ /* @__PURE__ */ jsx2(ChevronRight2, { className: "h-4 w-4 ml-1" })
268
+ ]
269
+ }
270
+ )
256
271
  ] }) : defaultMethod?.card ? /* @__PURE__ */ jsxs2("div", { className: "space-y-2", children: [
257
272
  /* @__PURE__ */ jsxs2("p", { className: "text-xl font-bold", children: [
258
273
  getCardBrandIcon(defaultMethod.card.brand),
@@ -634,14 +649,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
634
649
  }
635
650
  ) }),
636
651
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-x-2", children: [
637
- /* @__PURE__ */ jsx6(
638
- Checkbox,
639
- {
640
- id: "setAsDefault",
641
- checked: setAsDefault,
642
- onCheckedChange: (checked) => setSetAsDefault(!!checked)
643
- }
644
- ),
652
+ /* @__PURE__ */ jsx6(Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
645
653
  /* @__PURE__ */ jsx6(Label, { htmlFor: "setAsDefault", className: "text-sm font-normal", children: "Set as default payment method" })
646
654
  ] }),
647
655
  error && /* @__PURE__ */ jsx6(Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ jsx6(AlertDescription, { children: error }) }),
@@ -668,13 +676,7 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
668
676
  /* @__PURE__ */ jsx7(DialogTitle, { children: "Add Payment Method" }),
669
677
  /* @__PURE__ */ jsx7(DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
670
678
  ] }),
671
- open && /* @__PURE__ */ jsx7(
672
- PaymentMethodForm,
673
- {
674
- onSuccess: handleSuccess,
675
- onCancel: handleCancel
676
- }
677
- )
679
+ open && /* @__PURE__ */ jsx7(PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
678
680
  ] }) });
679
681
  }
680
682
  __name(PaymentMethodEditor, "PaymentMethodEditor");
@@ -741,7 +743,18 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
741
743
  /* @__PURE__ */ jsx8("span", { className: "text-sm font-medium capitalize", children: brand })
742
744
  ] }),
743
745
  /* @__PURE__ */ jsxs8(DropdownMenu, { children: [
744
- /* @__PURE__ */ jsx8(DropdownMenuTrigger, { children: /* @__PURE__ */ jsx8(Button, { render: /* @__PURE__ */ jsx8("div", {}), nativeButton: false, variant: "ghost", size: "sm", disabled: loading, className: "h-8 w-8 p-0", children: /* @__PURE__ */ jsx8(MoreVertical, { className: "h-4 w-4" }) }) }),
746
+ /* @__PURE__ */ jsx8(DropdownMenuTrigger, { children: /* @__PURE__ */ jsx8(
747
+ Button,
748
+ {
749
+ render: /* @__PURE__ */ jsx8("div", {}),
750
+ nativeButton: false,
751
+ variant: "ghost",
752
+ size: "sm",
753
+ disabled: loading,
754
+ className: "h-8 w-8 p-0",
755
+ children: /* @__PURE__ */ jsx8(MoreVertical, { className: "h-4 w-4" })
756
+ }
757
+ ) }),
745
758
  /* @__PURE__ */ jsxs8(DropdownMenuContent, { align: "end", children: [
746
759
  !isDefault && /* @__PURE__ */ jsx8(DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
747
760
  /* @__PURE__ */ jsx8(DropdownMenuItem, { onClick: () => setShowRemoveDialog(true), disabled: loading, className: "text-red-600", children: "Remove" })
@@ -925,7 +938,12 @@ __name(InvoiceStatusBadge, "InvoiceStatusBadge");
925
938
 
926
939
  // src/features/billing/stripe-invoice/components/details/InvoiceDetails.tsx
927
940
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
928
- function InvoiceDetails({ invoice, open, onOpenChange, onInvoiceChange }) {
941
+ function InvoiceDetails({
942
+ invoice,
943
+ open,
944
+ onOpenChange,
945
+ onInvoiceChange: _onInvoiceChange
946
+ }) {
929
947
  const handleDownloadPDF = /* @__PURE__ */ __name(() => {
930
948
  if (invoice.stripePdfUrl) {
931
949
  window.open(invoice.stripePdfUrl, "_blank");
@@ -1169,7 +1187,7 @@ function CancelSubscriptionDialog({
1169
1187
  reason: ""
1170
1188
  }
1171
1189
  });
1172
- const onSubmit = /* @__PURE__ */ __name(async (values) => {
1190
+ const onSubmit = /* @__PURE__ */ __name(async (_values) => {
1173
1191
  setIsSubmitting(true);
1174
1192
  try {
1175
1193
  await StripeSubscriptionService.cancelSubscription({
@@ -1338,7 +1356,13 @@ function SubscriptionDetails({
1338
1356
  /* @__PURE__ */ jsxs14("div", { className: "space-y-6", children: [
1339
1357
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-x-3", children: [
1340
1358
  /* @__PURE__ */ jsx17("span", { className: "text-sm font-medium text-muted-foreground", children: "Status:" }),
1341
- /* @__PURE__ */ jsx17(SubscriptionStatusBadge, { status: subscription.status, cancelAtPeriodEnd: subscription.cancelAtPeriodEnd })
1359
+ /* @__PURE__ */ jsx17(
1360
+ SubscriptionStatusBadge,
1361
+ {
1362
+ status: subscription.status,
1363
+ cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1364
+ }
1365
+ )
1342
1366
  ] }),
1343
1367
  /* @__PURE__ */ jsxs14("div", { className: "space-y-2", children: [
1344
1368
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between", children: [
@@ -1437,7 +1461,13 @@ function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan
1437
1461
  onClick: () => handleRowClick(subscription),
1438
1462
  className: "cursor-pointer hover:bg-muted/50",
1439
1463
  children: [
1440
- /* @__PURE__ */ jsx18(TableCell, { children: /* @__PURE__ */ jsx18(SubscriptionStatusBadge, { status: subscription.status, cancelAtPeriodEnd: subscription.cancelAtPeriodEnd }) }),
1464
+ /* @__PURE__ */ jsx18(TableCell, { children: /* @__PURE__ */ jsx18(
1465
+ SubscriptionStatusBadge,
1466
+ {
1467
+ status: subscription.status,
1468
+ cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1469
+ }
1470
+ ) }),
1441
1471
  /* @__PURE__ */ jsx18(TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1442
1472
  /* @__PURE__ */ jsx18(TableCell, { className: "text-muted-foreground text-sm", children: period }),
1443
1473
  /* @__PURE__ */ jsx18(TableCell, { className: "text-right font-medium", children: amount })
@@ -1537,7 +1567,14 @@ __name(IntervalToggle, "IntervalToggle");
1537
1567
  // src/features/billing/stripe-subscription/components/widgets/PricingCard.tsx
1538
1568
  import { Check } from "lucide-react";
1539
1569
  import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1540
- function PricingCard({ price, isCurrentPlan = false, isSelected = false, isDisabled = false, isLoading = false, onSelect }) {
1570
+ function PricingCard({
1571
+ price,
1572
+ isCurrentPlan = false,
1573
+ isSelected = false,
1574
+ isDisabled = false,
1575
+ isLoading = false,
1576
+ onSelect
1577
+ }) {
1541
1578
  const description = price.description || price.nickname || "Standard";
1542
1579
  const features = price.features || [];
1543
1580
  const formattedPrice = formatCurrency(price.unitAmount, price.currency);
@@ -1970,19 +2007,8 @@ function WizardProgressIndicator({ currentStep }) {
1970
2007
  children: isCompleted ? /* @__PURE__ */ jsx26(Check3, { className: "h-4 w-4" }) : index + 1
1971
2008
  }
1972
2009
  ),
1973
- /* @__PURE__ */ jsx26(
1974
- "span",
1975
- {
1976
- className: `text-sm ${isCurrent ? "font-medium text-foreground" : "text-muted-foreground"}`,
1977
- children: step.label
1978
- }
1979
- ),
1980
- index < STEPS.length - 1 && /* @__PURE__ */ jsx26(
1981
- "div",
1982
- {
1983
- className: `h-0.5 w-8 ${index < currentIndex ? "bg-primary" : "bg-muted"}`
1984
- }
1985
- )
2010
+ /* @__PURE__ */ jsx26("span", { className: `text-sm ${isCurrent ? "font-medium text-foreground" : "text-muted-foreground"}`, children: step.label }),
2011
+ index < STEPS.length - 1 && /* @__PURE__ */ jsx26("div", { className: `h-0.5 w-8 ${index < currentIndex ? "bg-primary" : "bg-muted"}` })
1986
2012
  ] }, step.key);
1987
2013
  }) });
1988
2014
  }
@@ -2121,14 +2147,7 @@ function WizardStepReview({
2121
2147
  ] }),
2122
2148
  /* @__PURE__ */ jsxs25("div", { className: "flex justify-between pt-4 border-t", children: [
2123
2149
  /* @__PURE__ */ jsx28(Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2124
- /* @__PURE__ */ jsx28(
2125
- Button,
2126
- {
2127
- onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod,
2128
- disabled: isProcessing,
2129
- children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method"
2130
- }
2131
- )
2150
+ /* @__PURE__ */ jsx28(Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2132
2151
  ] })
2133
2152
  ] });
2134
2153
  }
@@ -2136,24 +2155,13 @@ __name(WizardStepReview, "WizardStepReview");
2136
2155
 
2137
2156
  // src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx
2138
2157
  import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
2139
- function WizardStepPaymentMethod({
2140
- onBack,
2141
- onSuccess,
2142
- isProcessing
2143
- }) {
2158
+ function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2144
2159
  return /* @__PURE__ */ jsxs26("div", { className: "space-y-6", children: [
2145
2160
  /* @__PURE__ */ jsxs26("div", { className: "text-center", children: [
2146
2161
  /* @__PURE__ */ jsx29("h3", { className: "font-semibold text-lg", children: "Add Payment Method" }),
2147
2162
  /* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground", children: "Enter your card details to complete your subscription" })
2148
2163
  ] }),
2149
- /* @__PURE__ */ jsx29(
2150
- PaymentMethodForm,
2151
- {
2152
- onSuccess,
2153
- onCancel: onBack,
2154
- isLoading: isProcessing
2155
- }
2156
- )
2164
+ /* @__PURE__ */ jsx29(PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing })
2157
2165
  ] });
2158
2166
  }
2159
2167
  __name(WizardStepPaymentMethod, "WizardStepPaymentMethod");
@@ -2259,7 +2267,7 @@ function formatDate4(date) {
2259
2267
  month: "short",
2260
2268
  day: "numeric"
2261
2269
  }).format(new Date(date));
2262
- } catch (error) {
2270
+ } catch (_error) {
2263
2271
  return "Invalid Date";
2264
2272
  }
2265
2273
  }
@@ -2397,7 +2405,7 @@ function formatDateTime(date) {
2397
2405
  hour: "numeric",
2398
2406
  minute: "2-digit"
2399
2407
  }).format(dateObj);
2400
- } catch (error) {
2408
+ } catch (_error) {
2401
2409
  return "Invalid Date";
2402
2410
  }
2403
2411
  }
@@ -2432,13 +2440,7 @@ __name(UsageHistoryTable, "UsageHistoryTable");
2432
2440
 
2433
2441
  // src/features/billing/components/modals/BillingDetailModal.tsx
2434
2442
  import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
2435
- function BillingDetailModal({
2436
- open,
2437
- onOpenChange,
2438
- title,
2439
- children,
2440
- className
2441
- }) {
2443
+ function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2442
2444
  return /* @__PURE__ */ jsx35(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs31(DialogContent, { className: className ?? "max-w-4xl max-h-[90vh] overflow-y-auto", children: [
2443
2445
  /* @__PURE__ */ jsx35(DialogHeader, { children: /* @__PURE__ */ jsx35(DialogTitle, { children: title }) }),
2444
2446
  children
@@ -3515,11 +3517,11 @@ function ProductsList({ products, onProductsChange }) {
3515
3517
  }
3516
3518
  setArchivingProductId(productToArchive.id);
3517
3519
  try {
3518
- const archivedProduct = await StripeProductService.archiveProduct({ id: productToArchive.id });
3520
+ const _archivedProduct = await StripeProductService.archiveProduct({ id: productToArchive.id });
3519
3521
  setProductToArchive(null);
3520
3522
  onProductsChange();
3521
- } catch (error) {
3522
- console.error("[ProductsList] Failed to archive product:", error);
3523
+ } catch (_error) {
3524
+ console.error("[ProductsList] Failed to archive product:", _error);
3523
3525
  } finally {
3524
3526
  setArchivingProductId(null);
3525
3527
  }
@@ -3530,10 +3532,10 @@ function ProductsList({ products, onProductsChange }) {
3530
3532
  }
3531
3533
  setReactivatingProductId(productToReactivate.id);
3532
3534
  try {
3533
- const reactivatedProduct = await StripeProductService.reactivateProduct({ id: productToReactivate.id });
3535
+ const _reactivatedProduct = await StripeProductService.reactivateProduct({ id: productToReactivate.id });
3534
3536
  setProductToReactivate(null);
3535
3537
  onProductsChange();
3536
- } catch (error) {
3538
+ } catch (_error) {
3537
3539
  } finally {
3538
3540
  setReactivatingProductId(null);
3539
3541
  }