@carlonicora/nextjs-jsonapi 1.34.0 → 1.36.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.
- package/dist/{BlockNoteEditor-DFHJWZZB.mjs → BlockNoteEditor-KFUTQVUK.mjs} +3 -3
- package/dist/{BlockNoteEditor-TS5AN6W2.js → BlockNoteEditor-N3J42SBY.js} +13 -13
- package/dist/{BlockNoteEditor-TS5AN6W2.js.map → BlockNoteEditor-N3J42SBY.js.map} +1 -1
- package/dist/BlockNoteEditor-YOAJRPWU.css +29 -0
- package/dist/BlockNoteEditor-YOAJRPWU.css.map +1 -0
- package/dist/billing/index.css +29 -0
- package/dist/billing/index.css.map +1 -0
- package/dist/billing/index.d.mts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +374 -358
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +22 -6
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-GFRODCD7.mjs → chunk-DLJTN632.mjs} +1242 -981
- package/dist/chunk-DLJTN632.mjs.map +1 -0
- package/dist/{chunk-TZRAOUAR.js → chunk-NNCTRU4O.js} +29 -1
- package/dist/chunk-NNCTRU4O.js.map +1 -0
- package/dist/{chunk-UPA67DQF.js → chunk-S2RZBQP4.js} +977 -716
- package/dist/chunk-S2RZBQP4.js.map +1 -0
- package/dist/{chunk-HWQBSVBT.mjs → chunk-YZV24UWN.mjs} +29 -1
- package/dist/chunk-YZV24UWN.mjs.map +1 -0
- package/dist/client/index.css +29 -0
- package/dist/client/index.css.map +1 -0
- package/dist/client/index.js +3 -3
- package/dist/client/index.mjs +2 -2
- package/dist/components/index.css +29 -0
- package/dist/components/index.css.map +1 -0
- package/dist/components/index.d.mts +4 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +5 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -2
- package/dist/contexts/index.css +29 -0
- package/dist/contexts/index.css.map +1 -0
- package/dist/contexts/index.d.mts +9 -2
- package/dist/contexts/index.d.ts +9 -2
- package/dist/contexts/index.js +9 -3
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +8 -2
- package/dist/core/index.d.mts +6 -4
- package/dist/core/index.d.ts +6 -4
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/onboarding.interface-Djyl9qYu.d.mts +71 -0
- package/dist/onboarding.interface-Djyl9qYu.d.ts +71 -0
- package/dist/{s3.service-DcqkGrKD.d.ts → s3.service-DXkDoMf1.d.ts} +3 -0
- package/dist/{s3.service-ag6M_7GO.d.mts → s3.service-hnTPVTm2.d.mts} +3 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/{stripe-subscription.interface-_VWPY2AA.d.mts → stripe-subscription.interface-C8uhCYIZ.d.mts} +2 -0
- package/dist/{stripe-subscription.interface-Dm__xmvE.d.ts → stripe-subscription.interface-DK7BJaNd.d.ts} +2 -0
- package/package.json +3 -1
- package/src/components/index.ts +1 -0
- package/src/components/navigations/Header.tsx +2 -32
- package/src/contexts/index.ts +1 -0
- package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +22 -6
- package/src/features/billing/stripe-price/data/stripe-price.interface.ts +2 -0
- package/src/features/billing/stripe-price/data/stripe-price.ts +9 -0
- package/src/features/billing/stripe-subscription/components/widgets/ProductPricingList.tsx +3 -0
- package/src/features/company/components/forms/CompanyDeleter.tsx +157 -70
- package/src/features/company/contexts/CompanyContext.tsx +1 -1
- package/src/features/company/data/company.service.ts +23 -0
- package/src/features/onboarding/components/OnboardingCard.tsx +45 -0
- package/src/features/onboarding/components/index.ts +1 -0
- package/src/features/onboarding/contexts/OnboardingContext.tsx +213 -0
- package/src/features/onboarding/contexts/index.ts +2 -0
- package/src/features/onboarding/index.ts +3 -0
- package/src/features/onboarding/interfaces/index.ts +1 -0
- package/src/features/onboarding/interfaces/onboarding.interface.ts +93 -0
- package/src/features/onboarding/styles/onboarding.css +38 -0
- package/src/features/user/contexts/CurrentUserContext.tsx +35 -20
- package/src/shadcnui/ui/card.tsx +22 -47
- package/dist/chunk-GFRODCD7.mjs.map +0 -1
- package/dist/chunk-HWQBSVBT.mjs.map +0 -1
- package/dist/chunk-TZRAOUAR.js.map +0 -1
- package/dist/chunk-UPA67DQF.js.map +0 -1
- /package/dist/{BlockNoteEditor-DFHJWZZB.mjs.map → BlockNoteEditor-KFUTQVUK.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
TabsList,
|
|
48
48
|
TabsTrigger,
|
|
49
49
|
useCurrentUserContext
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-DLJTN632.mjs";
|
|
51
51
|
import {
|
|
52
52
|
getRoleId,
|
|
53
53
|
getStripePublishableKey
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
StripeSubscriptionService,
|
|
62
62
|
StripeUsageService,
|
|
63
63
|
cn
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-YZV24UWN.mjs";
|
|
65
65
|
import "../chunk-AUXK7QSA.mjs";
|
|
66
66
|
import "../chunk-C7C7VY4F.mjs";
|
|
67
67
|
import "../chunk-U4MTVHOC.mjs";
|
|
@@ -1691,6 +1691,7 @@ function ProductPricingList({
|
|
|
1691
1691
|
if (hideOneTimePrices) {
|
|
1692
1692
|
pricesToFilter = pricesToFilter.filter((price) => price.priceType !== "one_time");
|
|
1693
1693
|
}
|
|
1694
|
+
pricesToFilter = pricesToFilter.filter((price) => !price.isTrial);
|
|
1694
1695
|
const filteredPrices = getFilteredPrices(pricesToFilter, selectedInterval);
|
|
1695
1696
|
if (filteredPrices.length === 0) {
|
|
1696
1697
|
return null;
|
|
@@ -2903,6 +2904,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
|
|
|
2903
2904
|
usageType: z2.enum(["licensed", "metered"]).optional(),
|
|
2904
2905
|
nickname: z2.string().optional(),
|
|
2905
2906
|
active: z2.boolean(),
|
|
2907
|
+
isTrial: z2.boolean(),
|
|
2906
2908
|
description: z2.string().optional(),
|
|
2907
2909
|
features: z2.array(z2.string()),
|
|
2908
2910
|
token: z2.string(),
|
|
@@ -2922,6 +2924,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
|
|
|
2922
2924
|
usageType: price?.recurring?.usageType || "licensed",
|
|
2923
2925
|
nickname: price?.nickname || "",
|
|
2924
2926
|
active: price?.active ?? true,
|
|
2927
|
+
isTrial: price?.isTrial ?? false,
|
|
2925
2928
|
description: price?.description || "",
|
|
2926
2929
|
features: price?.features || [],
|
|
2927
2930
|
token: price?.token?.toString() ?? "",
|
|
@@ -2942,6 +2945,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
|
|
|
2942
2945
|
usageType: price?.recurring?.usageType || "licensed",
|
|
2943
2946
|
nickname: price?.nickname || "",
|
|
2944
2947
|
active: price?.active ?? true,
|
|
2948
|
+
isTrial: price?.isTrial ?? false,
|
|
2945
2949
|
description: price?.description || "",
|
|
2946
2950
|
features: price?.features || [],
|
|
2947
2951
|
token: price?.token?.toString() ?? "",
|
|
@@ -2962,8 +2966,8 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
|
|
|
2962
2966
|
description: values.description || void 0,
|
|
2963
2967
|
features: values.features.filter((f) => f.trim()) || void 0,
|
|
2964
2968
|
token: values.token ? parseInt(values.token, 10) : void 0,
|
|
2965
|
-
// Only include featureIds for recurring prices
|
|
2966
|
-
...price?.priceType === "recurring" ? { featureIds: values.featureIds } : {}
|
|
2969
|
+
// Only include isTrial and featureIds for recurring prices
|
|
2970
|
+
...price?.priceType === "recurring" ? { isTrial: values.isTrial, featureIds: values.featureIds } : {}
|
|
2967
2971
|
});
|
|
2968
2972
|
} else {
|
|
2969
2973
|
const createInput = {
|
|
@@ -2992,8 +2996,11 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
|
|
|
2992
2996
|
if (values.token) {
|
|
2993
2997
|
createInput.token = parseInt(values.token, 10);
|
|
2994
2998
|
}
|
|
2995
|
-
if (isRecurring
|
|
2996
|
-
createInput.
|
|
2999
|
+
if (isRecurring) {
|
|
3000
|
+
createInput.isTrial = values.isTrial;
|
|
3001
|
+
if (values.featureIds.length > 0) {
|
|
3002
|
+
createInput.featureIds = values.featureIds;
|
|
3003
|
+
}
|
|
2997
3004
|
}
|
|
2998
3005
|
await StripePriceService.createPrice(createInput);
|
|
2999
3006
|
}
|
|
@@ -3193,6 +3200,15 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
|
|
|
3193
3200
|
}) })
|
|
3194
3201
|
] }),
|
|
3195
3202
|
/* @__PURE__ */ jsx39(FormCheckbox, { form, id: "active", name: "Active" }),
|
|
3203
|
+
isRecurring && /* @__PURE__ */ jsx39(
|
|
3204
|
+
FormCheckbox,
|
|
3205
|
+
{
|
|
3206
|
+
form,
|
|
3207
|
+
id: "isTrial",
|
|
3208
|
+
name: "Trial Price",
|
|
3209
|
+
description: "Mark this as the trial subscription plan (only one price should be marked as trial)"
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
3196
3212
|
/* @__PURE__ */ jsx39(CommonEditorButtons, { isEdit: isEditMode, form, disabled: isSubmitting, setOpen: onOpenChange })
|
|
3197
3213
|
] }) })
|
|
3198
3214
|
] }) });
|