@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.
- package/dist/{BlockNoteEditor-ARUXU5AV.js → BlockNoteEditor-G45WMJ5V.js} +19 -19
- package/dist/{BlockNoteEditor-ARUXU5AV.js.map → BlockNoteEditor-G45WMJ5V.js.map} +1 -1
- package/dist/{BlockNoteEditor-MNNISNVN.mjs → BlockNoteEditor-R3745ALQ.mjs} +4 -4
- package/dist/{BlockNoteViewer-SD3ZFIXD.js → BlockNoteViewer-5PGOVURC.js} +3 -3
- package/dist/{BlockNoteViewer-SD3ZFIXD.js.map → BlockNoteViewer-5PGOVURC.js.map} +1 -1
- package/dist/{BlockNoteViewer-BVVN6D3T.mjs → BlockNoteViewer-TNK3OMH5.mjs} +2 -2
- package/dist/billing/index.d.mts +6 -5
- package/dist/billing/index.d.ts +6 -5
- package/dist/billing/index.js +493 -505
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +6 -18
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-5TH2DSAH.js → chunk-3CSPHMVK.js} +2 -3
- package/dist/chunk-3CSPHMVK.js.map +1 -0
- package/dist/{chunk-OKCV4GPJ.mjs → chunk-6KAYEYFU.mjs} +2 -2
- package/dist/{chunk-FK26NX3S.mjs → chunk-CJS5WA4E.mjs} +1 -2
- package/dist/chunk-CJS5WA4E.mjs.map +1 -0
- package/dist/{chunk-XOSC3FFP.js → chunk-CP7BXAFH.js} +8 -8
- package/dist/{chunk-XOSC3FFP.js.map → chunk-CP7BXAFH.js.map} +1 -1
- package/dist/{chunk-2WK35GO2.js → chunk-EXG4ANC7.js} +868 -869
- package/dist/chunk-EXG4ANC7.js.map +1 -0
- package/dist/{chunk-2FNSDBJG.mjs → chunk-JCNB5KTQ.mjs} +7 -8
- package/dist/{chunk-2FNSDBJG.mjs.map → chunk-JCNB5KTQ.mjs.map} +1 -1
- package/dist/{chunk-RGQYFSJF.mjs → chunk-KOA5PZZA.mjs} +2 -2
- package/dist/{chunk-WCHLCOZG.mjs → chunk-RJMLAW5O.mjs} +2 -2
- package/dist/{chunk-IJME5SAM.js → chunk-WU47MIZZ.js} +4 -4
- package/dist/{chunk-IJME5SAM.js.map → chunk-WU47MIZZ.js.map} +1 -1
- package/dist/{chunk-2TXE57LE.js → chunk-YG4YFAYY.js} +3 -3
- package/dist/{chunk-2TXE57LE.js.map → chunk-YG4YFAYY.js.map} +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/{currency-pK9eRYRC.d.ts → currency-8ErEC39n.d.ts} +3 -2
- package/dist/{currency-DT_dveBx.d.mts → currency-DrEVd_Xs.d.mts} +3 -2
- package/dist/email-automations/index.js +92 -92
- package/dist/email-automations/index.mjs +3 -3
- package/dist/features/analytics/index.js +121 -121
- package/dist/features/analytics/index.mjs +4 -4
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.js +150 -150
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.js +16 -16
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +124 -124
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/messages/en.json +0 -2
- package/messages/it.json +0 -2
- package/package.json +1 -1
- package/src/features/billing/components/utils/__tests__/billing-formatters.spec.ts +13 -2
- package/src/features/billing/components/utils/date.ts +7 -5
- package/src/features/billing/components/utils/format-options.ts +4 -2
- package/src/features/billing/i18n-keys.ts +0 -2
- package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +0 -19
- package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +2 -1
- package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +2 -1
- package/src/features/oauth/components/OAuthClientDetail.tsx +2 -1
- package/dist/chunk-2WK35GO2.js.map +0 -1
- package/dist/chunk-5TH2DSAH.js.map +0 -1
- package/dist/chunk-FK26NX3S.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-MNNISNVN.mjs.map → BlockNoteEditor-R3745ALQ.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-BVVN6D3T.mjs.map → BlockNoteViewer-TNK3OMH5.mjs.map} +0 -0
- /package/dist/{chunk-OKCV4GPJ.mjs.map → chunk-6KAYEYFU.mjs.map} +0 -0
- /package/dist/{chunk-RGQYFSJF.mjs.map → chunk-KOA5PZZA.mjs.map} +0 -0
- /package/dist/{chunk-WCHLCOZG.mjs.map → chunk-RJMLAW5O.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -81,10 +81,10 @@ import {
|
|
|
81
81
|
useCurrentUserContext,
|
|
82
82
|
useDataListRetriever,
|
|
83
83
|
usePageUrlGenerator
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-JCNB5KTQ.mjs";
|
|
85
85
|
import {
|
|
86
86
|
getStripePublishableKey
|
|
87
|
-
} from "../chunk-
|
|
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-
|
|
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",
|