@carlonicora/nextjs-jsonapi 5.6.0 → 5.7.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.
- package/dist/{BlockNoteEditor-AE3ZTEEH.js → BlockNoteEditor-ARUXU5AV.js} +19 -19
- package/dist/{BlockNoteEditor-AE3ZTEEH.js.map → BlockNoteEditor-ARUXU5AV.js.map} +1 -1
- package/dist/{BlockNoteEditor-NEYG5L6W.mjs → BlockNoteEditor-MNNISNVN.mjs} +4 -4
- package/dist/{BlockNoteViewer-3OUT5UFY.mjs → BlockNoteViewer-BVVN6D3T.mjs} +2 -2
- package/dist/{BlockNoteViewer-4CFKQM7U.js → BlockNoteViewer-SD3ZFIXD.js} +3 -3
- package/dist/{BlockNoteViewer-4CFKQM7U.js.map → BlockNoteViewer-SD3ZFIXD.js.map} +1 -1
- package/dist/billing/index.d.mts +33 -43
- package/dist/billing/index.d.ts +33 -43
- package/dist/billing/index.js +591 -574
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +30 -13
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-SFYPXCK4.mjs → chunk-2FNSDBJG.mjs} +641 -536
- package/dist/chunk-2FNSDBJG.mjs.map +1 -0
- package/dist/{chunk-3I5AAJXV.js → chunk-2TXE57LE.js} +3 -3
- package/dist/{chunk-3I5AAJXV.js.map → chunk-2TXE57LE.js.map} +1 -1
- package/dist/{chunk-LQ4DK4JF.js → chunk-2WK35GO2.js} +1317 -1212
- package/dist/chunk-2WK35GO2.js.map +1 -0
- package/dist/{chunk-HKZAESS6.js → chunk-5TH2DSAH.js} +17 -12
- package/dist/chunk-5TH2DSAH.js.map +1 -0
- package/dist/{chunk-EYA2F6AN.mjs → chunk-FK26NX3S.mjs} +16 -11
- package/dist/chunk-FK26NX3S.mjs.map +1 -0
- package/dist/{chunk-53BAULDP.js → chunk-IJME5SAM.js} +4 -4
- package/dist/{chunk-53BAULDP.js.map → chunk-IJME5SAM.js.map} +1 -1
- package/dist/{chunk-KQHBONL4.mjs → chunk-OKCV4GPJ.mjs} +2 -2
- package/dist/{chunk-BTPUYUQ3.mjs → chunk-RGQYFSJF.mjs} +2 -2
- package/dist/{chunk-Y7RR57EW.mjs → chunk-WCHLCOZG.mjs} +2 -2
- package/dist/{chunk-RL3PL3KV.js → chunk-XOSC3FFP.js} +8 -8
- package/dist/{chunk-RL3PL3KV.js.map → chunk-XOSC3FFP.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 +9 -3
- package/dist/core/index.d.ts +9 -3
- package/dist/core/index.js +10 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +9 -1
- package/dist/{format-options-D6c7FNDi.d.mts → currency-DT_dveBx.d.mts} +41 -8
- package/dist/{format-options-BtX3o0Yu.d.ts → currency-pK9eRYRC.d.ts} +41 -8
- 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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/core/index.ts +3 -0
- package/src/features/billing/contexts/CouponContext.tsx +0 -2
- package/src/features/billing/stripe-coupon/components/containers/CouponContainer.tsx +2 -2
- package/src/features/billing/stripe-coupon/components/details/CouponDetails.tsx +5 -2
- package/src/features/billing/stripe-coupon/components/forms/CouponCodeEditor.tsx +6 -5
- package/src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx +67 -45
- package/src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx +294 -212
- package/src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx +4 -3
- package/src/features/billing/stripe-coupon/data/stripe-coupon.interface.ts +11 -7
- package/src/features/billing/stripe-coupon/data/stripe-coupon.ts +6 -4
- package/src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx +14 -7
- package/src/features/billing/stripe-coupon/hooks/useStripeCouponTableStructure.tsx +2 -2
- package/src/features/billing/stripe-coupon/stripe-coupon-code.module.ts +3 -2
- package/src/features/billing/stripe-coupon/stripe-coupon.module.ts +11 -4
- package/src/features/billing/stripe-coupon/utils/__tests__/coupon-page-module.spec.ts +32 -0
- package/src/features/billing/stripe-coupon/utils/coupon-page-module.ts +13 -0
- package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +1 -1
- package/src/features/billing/stripe-subscription/hooks/wizard-promotion.ts +15 -8
- package/dist/chunk-EYA2F6AN.mjs.map +0 -1
- package/dist/chunk-HKZAESS6.js.map +0 -1
- package/dist/chunk-LQ4DK4JF.js.map +0 -1
- package/dist/chunk-SFYPXCK4.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-NEYG5L6W.mjs.map → BlockNoteEditor-MNNISNVN.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-3OUT5UFY.mjs.map → BlockNoteViewer-BVVN6D3T.mjs.map} +0 -0
- /package/dist/{chunk-KQHBONL4.mjs.map → chunk-OKCV4GPJ.mjs.map} +0 -0
- /package/dist/{chunk-BTPUYUQ3.mjs.map → chunk-RGQYFSJF.mjs.map} +0 -0
- /package/dist/{chunk-Y7RR57EW.mjs.map → chunk-WCHLCOZG.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -65,11 +65,14 @@ import {
|
|
|
65
65
|
couponCodeDefaults,
|
|
66
66
|
couponCodeSchema,
|
|
67
67
|
couponCurrencyOptions,
|
|
68
|
+
couponPageModule,
|
|
68
69
|
errorToast,
|
|
69
70
|
formatDate,
|
|
70
71
|
optionalDate,
|
|
71
72
|
optionalDecimal,
|
|
72
73
|
optionalPositiveInt,
|
|
74
|
+
parseOptionalDecimal,
|
|
75
|
+
parseOptionalPositiveInt,
|
|
73
76
|
promotionCodeDiscount,
|
|
74
77
|
subscriptionDiscount,
|
|
75
78
|
toCouponCodeInput,
|
|
@@ -78,10 +81,10 @@ import {
|
|
|
78
81
|
useCurrentUserContext,
|
|
79
82
|
useDataListRetriever,
|
|
80
83
|
usePageUrlGenerator
|
|
81
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-2FNSDBJG.mjs";
|
|
82
85
|
import {
|
|
83
86
|
getStripePublishableKey
|
|
84
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-WCHLCOZG.mjs";
|
|
85
88
|
import {
|
|
86
89
|
getRoleId
|
|
87
90
|
} from "../chunk-PW42LRSL.mjs";
|
|
@@ -109,7 +112,7 @@ import {
|
|
|
109
112
|
toPromotionCodeResult,
|
|
110
113
|
useI18nLocale,
|
|
111
114
|
useI18nRouter
|
|
112
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-FK26NX3S.mjs";
|
|
113
116
|
import "../chunk-V5MI7RNB.mjs";
|
|
114
117
|
import "../chunk-AUXK7QSA.mjs";
|
|
115
118
|
import "../chunk-PI56A4DG.mjs";
|
|
@@ -1890,14 +1893,20 @@ function shouldLookUpAutomatic(code) {
|
|
|
1890
1893
|
return !code || code.automatic === true;
|
|
1891
1894
|
}
|
|
1892
1895
|
__name(shouldLookUpAutomatic, "shouldLookUpAutomatic");
|
|
1896
|
+
function read(value, key) {
|
|
1897
|
+
return typeof value === "object" && value !== null ? Reflect.get(value, key) : void 0;
|
|
1898
|
+
}
|
|
1899
|
+
__name(read, "read");
|
|
1893
1900
|
function errorStatus(error) {
|
|
1894
|
-
|
|
1901
|
+
const status = read(error, "status") ?? read(read(error, "response"), "status");
|
|
1902
|
+
return typeof status === "number" ? status : void 0;
|
|
1895
1903
|
}
|
|
1896
1904
|
__name(errorStatus, "errorStatus");
|
|
1897
1905
|
function errorCode(error) {
|
|
1898
|
-
const body = error
|
|
1899
|
-
const
|
|
1900
|
-
const
|
|
1906
|
+
const body = read(error, "body");
|
|
1907
|
+
const errors = read(body, "errors");
|
|
1908
|
+
const first = Array.isArray(errors) ? errors[0] : void 0;
|
|
1909
|
+
const code = read(first, "code") ?? read(read(read(first, "meta"), "context"), "code") ?? read(body, "code");
|
|
1901
1910
|
return typeof code === "string" ? code : void 0;
|
|
1902
1911
|
}
|
|
1903
1912
|
__name(errorCode, "errorCode");
|
|
@@ -2488,7 +2497,7 @@ function PromoCodeInput({
|
|
|
2488
2497
|
/* @__PURE__ */ jsx28("p", { className: "text-success text-sm", children: formatDuration(appliedCode) })
|
|
2489
2498
|
] }),
|
|
2490
2499
|
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
2491
|
-
/* @__PURE__ */ jsx28("p", { className: "text-muted-foreground text-
|
|
2500
|
+
/* @__PURE__ */ jsx28("p", { className: "text-muted-foreground text-xs/relaxed", children: t("billing.ui.promo_code.use_different") }),
|
|
2492
2501
|
codeInput
|
|
2493
2502
|
] })
|
|
2494
2503
|
] });
|
|
@@ -4382,9 +4391,9 @@ var seedSchema = z4.object({
|
|
|
4382
4391
|
isTrial: z4.boolean().optional(),
|
|
4383
4392
|
platformFeatures: z4.array(z4.string()).optional()
|
|
4384
4393
|
});
|
|
4385
|
-
function readOptional(
|
|
4394
|
+
function readOptional(read2) {
|
|
4386
4395
|
try {
|
|
4387
|
-
return
|
|
4396
|
+
return read2();
|
|
4388
4397
|
} catch {
|
|
4389
4398
|
return void 0;
|
|
4390
4399
|
}
|
|
@@ -4810,7 +4819,13 @@ function CouponDetails() {
|
|
|
4810
4819
|
value: coupon.valid ? /* @__PURE__ */ jsx54(Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ jsx54(Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
|
|
4811
4820
|
}
|
|
4812
4821
|
),
|
|
4813
|
-
/* @__PURE__ */ jsx54(
|
|
4822
|
+
/* @__PURE__ */ jsx54(
|
|
4823
|
+
DetailField,
|
|
4824
|
+
{
|
|
4825
|
+
label: t("billing.admin.coupons.fields.discount"),
|
|
4826
|
+
value: /* @__PURE__ */ jsx54("span", { className: "tabular-nums", children: formatCouponDiscount(coupon, t, fmt) })
|
|
4827
|
+
}
|
|
4828
|
+
),
|
|
4814
4829
|
/* @__PURE__ */ jsx54(
|
|
4815
4830
|
DetailField,
|
|
4816
4831
|
{
|
|
@@ -4832,7 +4847,7 @@ function CouponDetails() {
|
|
|
4832
4847
|
DetailField,
|
|
4833
4848
|
{
|
|
4834
4849
|
label: t("billing.admin.coupons.fields.redeemBy"),
|
|
4835
|
-
value: coupon.redeemBy ? formatDate(coupon.redeemBy, fmt) : "\u2014"
|
|
4850
|
+
value: /* @__PURE__ */ jsx54("span", { className: "tabular-nums", children: coupon.redeemBy ? formatDate(coupon.redeemBy, fmt) : "\u2014" })
|
|
4836
4851
|
}
|
|
4837
4852
|
),
|
|
4838
4853
|
/* @__PURE__ */ jsx54(
|
|
@@ -4957,7 +4972,7 @@ function CouponContainer() {
|
|
|
4957
4972
|
return /* @__PURE__ */ jsx57(
|
|
4958
4973
|
RoundPageContainer,
|
|
4959
4974
|
{
|
|
4960
|
-
module:
|
|
4975
|
+
module: couponPageModule(),
|
|
4961
4976
|
id: coupon.id,
|
|
4962
4977
|
tabs: [
|
|
4963
4978
|
{
|
|
@@ -5054,6 +5069,8 @@ export {
|
|
|
5054
5069
|
optionalDate,
|
|
5055
5070
|
optionalDecimal,
|
|
5056
5071
|
optionalPositiveInt,
|
|
5072
|
+
parseOptionalDecimal,
|
|
5073
|
+
parseOptionalPositiveInt,
|
|
5057
5074
|
priceLabel,
|
|
5058
5075
|
promotionCodeDiscount,
|
|
5059
5076
|
subscriptionDiscount,
|