@carlonicora/nextjs-jsonapi 5.7.1 → 5.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/{BlockNoteEditor-ARUXU5AV.js → BlockNoteEditor-G45WMJ5V.js} +19 -19
  2. package/dist/{BlockNoteEditor-ARUXU5AV.js.map → BlockNoteEditor-G45WMJ5V.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-MNNISNVN.mjs → BlockNoteEditor-R3745ALQ.mjs} +4 -4
  4. package/dist/{BlockNoteViewer-SD3ZFIXD.js → BlockNoteViewer-5PGOVURC.js} +3 -3
  5. package/dist/{BlockNoteViewer-SD3ZFIXD.js.map → BlockNoteViewer-5PGOVURC.js.map} +1 -1
  6. package/dist/{BlockNoteViewer-BVVN6D3T.mjs → BlockNoteViewer-TNK3OMH5.mjs} +2 -2
  7. package/dist/billing/index.d.mts +6 -5
  8. package/dist/billing/index.d.ts +6 -5
  9. package/dist/billing/index.js +493 -505
  10. package/dist/billing/index.js.map +1 -1
  11. package/dist/billing/index.mjs +6 -18
  12. package/dist/billing/index.mjs.map +1 -1
  13. package/dist/{chunk-5TH2DSAH.js → chunk-3CSPHMVK.js} +2 -3
  14. package/dist/chunk-3CSPHMVK.js.map +1 -0
  15. package/dist/{chunk-OKCV4GPJ.mjs → chunk-6KAYEYFU.mjs} +2 -2
  16. package/dist/{chunk-FK26NX3S.mjs → chunk-CJS5WA4E.mjs} +1 -2
  17. package/dist/chunk-CJS5WA4E.mjs.map +1 -0
  18. package/dist/{chunk-XOSC3FFP.js → chunk-CP7BXAFH.js} +8 -8
  19. package/dist/{chunk-XOSC3FFP.js.map → chunk-CP7BXAFH.js.map} +1 -1
  20. package/dist/{chunk-2WK35GO2.js → chunk-EXG4ANC7.js} +868 -869
  21. package/dist/chunk-EXG4ANC7.js.map +1 -0
  22. package/dist/{chunk-2FNSDBJG.mjs → chunk-JCNB5KTQ.mjs} +7 -8
  23. package/dist/{chunk-2FNSDBJG.mjs.map → chunk-JCNB5KTQ.mjs.map} +1 -1
  24. package/dist/{chunk-RGQYFSJF.mjs → chunk-KOA5PZZA.mjs} +2 -2
  25. package/dist/{chunk-WCHLCOZG.mjs → chunk-RJMLAW5O.mjs} +2 -2
  26. package/dist/{chunk-IJME5SAM.js → chunk-WU47MIZZ.js} +4 -4
  27. package/dist/{chunk-IJME5SAM.js.map → chunk-WU47MIZZ.js.map} +1 -1
  28. package/dist/{chunk-2TXE57LE.js → chunk-YG4YFAYY.js} +3 -3
  29. package/dist/{chunk-2TXE57LE.js.map → chunk-YG4YFAYY.js.map} +1 -1
  30. package/dist/client/index.js +4 -4
  31. package/dist/client/index.mjs +3 -3
  32. package/dist/components/index.js +4 -4
  33. package/dist/components/index.mjs +3 -3
  34. package/dist/contexts/index.js +4 -4
  35. package/dist/contexts/index.mjs +3 -3
  36. package/dist/core/index.d.mts +2 -2
  37. package/dist/core/index.d.ts +2 -2
  38. package/dist/core/index.js +2 -2
  39. package/dist/core/index.mjs +1 -1
  40. package/dist/{currency-pK9eRYRC.d.ts → currency-8ErEC39n.d.ts} +3 -2
  41. package/dist/{currency-DT_dveBx.d.mts → currency-DrEVd_Xs.d.mts} +3 -2
  42. package/dist/email-automations/index.js +92 -92
  43. package/dist/email-automations/index.mjs +3 -3
  44. package/dist/features/analytics/index.js +121 -121
  45. package/dist/features/analytics/index.mjs +4 -4
  46. package/dist/features/analytics/server.js +4 -4
  47. package/dist/features/analytics/server.mjs +2 -2
  48. package/dist/features/blog/index.js +150 -150
  49. package/dist/features/blog/index.mjs +3 -3
  50. package/dist/features/blog/server.js +16 -16
  51. package/dist/features/blog/server.mjs +1 -1
  52. package/dist/features/help/index.js +37 -37
  53. package/dist/features/help/index.mjs +3 -3
  54. package/dist/features/tokenusage/index.js +124 -124
  55. package/dist/features/tokenusage/index.mjs +4 -4
  56. package/dist/index.d.mts +1 -1
  57. package/dist/index.d.ts +1 -1
  58. package/dist/index.js +3 -3
  59. package/dist/index.mjs +2 -2
  60. package/dist/server/index.js +3 -3
  61. package/dist/server/index.mjs +2 -2
  62. package/messages/en.json +0 -2
  63. package/messages/it.json +0 -2
  64. package/package.json +1 -1
  65. package/src/features/billing/components/utils/__tests__/billing-formatters.spec.ts +13 -2
  66. package/src/features/billing/components/utils/date.ts +7 -5
  67. package/src/features/billing/components/utils/format-options.ts +4 -2
  68. package/src/features/billing/i18n-keys.ts +0 -2
  69. package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +0 -19
  70. package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +2 -1
  71. package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +2 -1
  72. package/src/features/oauth/components/OAuthClientDetail.tsx +2 -1
  73. package/dist/chunk-2WK35GO2.js.map +0 -1
  74. package/dist/chunk-5TH2DSAH.js.map +0 -1
  75. package/dist/chunk-FK26NX3S.mjs.map +0 -1
  76. /package/dist/{BlockNoteEditor-MNNISNVN.mjs.map → BlockNoteEditor-R3745ALQ.mjs.map} +0 -0
  77. /package/dist/{BlockNoteViewer-BVVN6D3T.mjs.map → BlockNoteViewer-TNK3OMH5.mjs.map} +0 -0
  78. /package/dist/{chunk-OKCV4GPJ.mjs.map → chunk-6KAYEYFU.mjs.map} +0 -0
  79. /package/dist/{chunk-RGQYFSJF.mjs.map → chunk-KOA5PZZA.mjs.map} +0 -0
  80. /package/dist/{chunk-WCHLCOZG.mjs.map → chunk-RJMLAW5O.mjs.map} +0 -0
@@ -81,10 +81,10 @@ import {
81
81
  useCurrentUserContext,
82
82
  useDataListRetriever,
83
83
  usePageUrlGenerator
84
- } from "../chunk-2FNSDBJG.mjs";
84
+ } from "../chunk-JCNB5KTQ.mjs";
85
85
  import {
86
86
  getStripePublishableKey
87
- } from "../chunk-WCHLCOZG.mjs";
87
+ } from "../chunk-RJMLAW5O.mjs";
88
88
  import {
89
89
  getRoleId
90
90
  } from "../chunk-PW42LRSL.mjs";
@@ -103,6 +103,7 @@ import {
103
103
  StripeUsageService,
104
104
  SubscriptionStatus,
105
105
  cn,
106
+ dateFormatLocale,
106
107
  formatCouponDiscount,
107
108
  formatCurrency,
108
109
  formatFixed,
@@ -112,7 +113,7 @@ import {
112
113
  toPromotionCodeResult,
113
114
  useI18nLocale,
114
115
  useI18nRouter
115
- } from "../chunk-FK26NX3S.mjs";
116
+ } from "../chunk-CJS5WA4E.mjs";
116
117
  import "../chunk-V5MI7RNB.mjs";
117
118
  import "../chunk-AUXK7QSA.mjs";
118
119
  import "../chunk-PI56A4DG.mjs";
@@ -1321,17 +1322,6 @@ function SubscriptionDetails({
1321
1322
  const fmt = useBillingFormatOptions();
1322
1323
  const [showCancel, setShowCancel] = useState8(false);
1323
1324
  const [isProcessing, setIsProcessing] = useState8(false);
1324
- const handlePause = /* @__PURE__ */ __name(async () => {
1325
- setIsProcessing(true);
1326
- try {
1327
- await StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1328
- onSubscriptionChange();
1329
- } catch (error) {
1330
- console.error("[SubscriptionDetails] Failed to pause subscription:", error);
1331
- } finally {
1332
- setIsProcessing(false);
1333
- }
1334
- }, "handlePause");
1335
1325
  const handleResume = /* @__PURE__ */ __name(async () => {
1336
1326
  setIsProcessing(true);
1337
1327
  try {
@@ -1351,7 +1341,6 @@ function SubscriptionDetails({
1351
1341
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
1352
1342
  }
1353
1343
  }, "handleManageViaPortal");
1354
- const canPause = subscription.status === "active" /* ACTIVE */;
1355
1344
  const canResume = subscription.status === "paused" /* PAUSED */;
1356
1345
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1357
1346
  return /* @__PURE__ */ jsxs14(Fragment3, { children: [
@@ -1398,7 +1387,6 @@ function SubscriptionDetails({
1398
1387
  }) }) }),
1399
1388
  /* @__PURE__ */ jsxs14("div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1400
1389
  onChangePlan && /* @__PURE__ */ jsx17(Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1401
- canPause && /* @__PURE__ */ jsx17(Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? t("billing.ui.subscription.pausing") : t("billing.ui.subscription.pause") }),
1402
1390
  canResume && /* @__PURE__ */ jsx17(Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? t("billing.ui.subscription.resuming") : t("billing.ui.subscription.resume") }),
1403
1391
  canCancel && /* @__PURE__ */ jsx17(Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1404
1392
  /* @__PURE__ */ jsx17(Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
@@ -2791,7 +2779,7 @@ __name(getProgressColor, "getProgressColor");
2791
2779
  function formatDate2(date, { locale, t }) {
2792
2780
  if (!date) return t("billing.ui.not_available");
2793
2781
  try {
2794
- return new Intl.DateTimeFormat(locale, {
2782
+ return new Intl.DateTimeFormat(dateFormatLocale(locale), {
2795
2783
  month: "short",
2796
2784
  day: "numeric"
2797
2785
  }).format(new Date(date));
@@ -2923,7 +2911,7 @@ function formatDateTime(date, { locale, t }) {
2923
2911
  if (!date) return t("billing.ui.not_available");
2924
2912
  const dateObj = typeof date === "string" ? new Date(date) : date;
2925
2913
  try {
2926
- return new Intl.DateTimeFormat(locale, {
2914
+ return new Intl.DateTimeFormat(dateFormatLocale(locale), {
2927
2915
  month: "short",
2928
2916
  day: "numeric",
2929
2917
  year: "numeric",