@carlonicora/nextjs-jsonapi 1.46.1 → 1.47.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.
Files changed (53) hide show
  1. package/dist/{BlockNoteEditor-UOY5GSMU.mjs → BlockNoteEditor-34PX47L4.mjs} +5 -5
  2. package/dist/{BlockNoteEditor-H6KXV3VK.js → BlockNoteEditor-GBD4N4SA.js} +15 -15
  3. package/dist/{BlockNoteEditor-H6KXV3VK.js.map → BlockNoteEditor-GBD4N4SA.js.map} +1 -1
  4. package/dist/JsonApiRequest-CRRH5B5V.js +24 -0
  5. package/dist/{JsonApiRequest-MUPAO7DI.js.map → JsonApiRequest-CRRH5B5V.js.map} +1 -1
  6. package/dist/{JsonApiRequest-XCQHVVYD.mjs → JsonApiRequest-I2S75QTJ.mjs} +2 -2
  7. package/dist/billing/index.js +347 -347
  8. package/dist/billing/index.mjs +4 -4
  9. package/dist/{chunk-WLS4D6VG.js → chunk-4MN547K7.js} +8 -1
  10. package/dist/chunk-4MN547K7.js.map +1 -0
  11. package/dist/{chunk-GCQUTWZ2.mjs → chunk-BTKJFMFL.mjs} +8 -1
  12. package/dist/chunk-BTKJFMFL.mjs.map +1 -0
  13. package/dist/{chunk-4HMQNMP6.mjs → chunk-BUCV5VFT.mjs} +2 -2
  14. package/dist/{chunk-2OJWO6QV.js → chunk-FLQPQEY2.js} +564 -575
  15. package/dist/chunk-FLQPQEY2.js.map +1 -0
  16. package/dist/{chunk-LM4SDN4Y.mjs → chunk-IPVXH3VC.mjs} +43 -5
  17. package/dist/chunk-IPVXH3VC.mjs.map +1 -0
  18. package/dist/{chunk-5AYSTQBI.mjs → chunk-L7RMKAGH.mjs} +6 -17
  19. package/dist/{chunk-5AYSTQBI.mjs.map → chunk-L7RMKAGH.mjs.map} +1 -1
  20. package/dist/{chunk-5PUPWZB4.js → chunk-ULHMVHDS.js} +137 -99
  21. package/dist/chunk-ULHMVHDS.js.map +1 -0
  22. package/dist/{chunk-GP3MDKGE.js → chunk-V63TFESU.js} +3 -3
  23. package/dist/{chunk-GP3MDKGE.js.map → chunk-V63TFESU.js.map} +1 -1
  24. package/dist/client/index.js +5 -5
  25. package/dist/client/index.mjs +4 -4
  26. package/dist/components/index.js +5 -5
  27. package/dist/components/index.mjs +4 -4
  28. package/dist/contexts/index.js +5 -5
  29. package/dist/contexts/index.mjs +4 -4
  30. package/dist/core/index.d.mts +12 -0
  31. package/dist/core/index.d.ts +12 -0
  32. package/dist/core/index.js +3 -3
  33. package/dist/core/index.mjs +2 -2
  34. package/dist/index.js +4 -4
  35. package/dist/index.mjs +3 -3
  36. package/dist/server/index.js +12 -12
  37. package/dist/server/index.mjs +2 -2
  38. package/package.json +1 -1
  39. package/src/core/abstracts/AbstractApiData.ts +56 -0
  40. package/src/core/abstracts/__tests__/readIncludedPolymorphic.spec.ts +195 -0
  41. package/src/core/registry/DataClassRegistry.ts +8 -0
  42. package/src/core/registry/__tests__/DataClassRegistry.getByJsonApiType.spec.ts +138 -0
  43. package/src/features/auth/components/forms/Register.tsx +18 -21
  44. package/src/features/referral/components/ReferralCodeCapture.tsx +0 -9
  45. package/dist/JsonApiRequest-MUPAO7DI.js +0 -24
  46. package/dist/chunk-2OJWO6QV.js.map +0 -1
  47. package/dist/chunk-5PUPWZB4.js.map +0 -1
  48. package/dist/chunk-GCQUTWZ2.mjs.map +0 -1
  49. package/dist/chunk-LM4SDN4Y.mjs.map +0 -1
  50. package/dist/chunk-WLS4D6VG.js.map +0 -1
  51. /package/dist/{BlockNoteEditor-UOY5GSMU.mjs.map → BlockNoteEditor-34PX47L4.mjs.map} +0 -0
  52. /package/dist/{JsonApiRequest-XCQHVVYD.mjs.map → JsonApiRequest-I2S75QTJ.mjs.map} +0 -0
  53. /package/dist/{chunk-4HMQNMP6.mjs.map → chunk-BUCV5VFT.mjs.map} +0 -0
@@ -9,6 +9,24 @@ import { useEffect, useState } from "react";
9
9
  import { SubmitHandler, useForm } from "react-hook-form";
10
10
  import { v4 } from "uuid";
11
11
  import { z } from "zod";
12
+ import { getApiUrl } from "../../../../client/config";
13
+ import { errorToast, FormInput, FormPassword } from "../../../../components";
14
+ import { getRegistrationMode, isDiscordAuthEnabled, isGoogleAuthEnabled } from "../../../../login/config";
15
+ import {
16
+ Button,
17
+ CardContent,
18
+ CardDescription,
19
+ CardFooter,
20
+ CardHeader,
21
+ CardTitle,
22
+ Form,
23
+ Link,
24
+ } from "../../../../shadcnui";
25
+ import { WaitlistService } from "../../../waitlist/data/WaitlistService";
26
+ import { useAuthContext } from "../../contexts";
27
+ import { AuthService } from "../../data/auth.service";
28
+ import { AuthComponent } from "../../enums";
29
+ import { GdprConsentSection } from "../GdprConsentSection";
12
30
 
13
31
  // Referral cookie utilities
14
32
  const REFERRAL_COOKIE_NAME = "referral_code";
@@ -37,24 +55,6 @@ function buildOAuthQueryParams(inviteCode?: string | null, referralCode?: string
37
55
  if (referralCode) params.set("referral", referralCode);
38
56
  return params.toString() ? `?${params.toString()}` : "";
39
57
  }
40
- import { getApiUrl } from "../../../../client/config";
41
- import { errorToast, FormInput, FormPassword } from "../../../../components";
42
- import { getRegistrationMode, isDiscordAuthEnabled, isGoogleAuthEnabled } from "../../../../login/config";
43
- import { GdprConsentSection } from "../GdprConsentSection";
44
- import {
45
- Button,
46
- CardContent,
47
- CardDescription,
48
- CardFooter,
49
- CardHeader,
50
- CardTitle,
51
- Form,
52
- Link,
53
- } from "../../../../shadcnui";
54
- import { useAuthContext } from "../../contexts";
55
- import { AuthService } from "../../data/auth.service";
56
- import { AuthComponent } from "../../enums";
57
- import { WaitlistService } from "../../../waitlist/data/WaitlistService";
58
58
 
59
59
  export default function Register() {
60
60
  const t = useTranslations();
@@ -75,7 +75,6 @@ export default function Register() {
75
75
  const [referralCode, setReferralCode] = useState<string | null>(null);
76
76
  useEffect(() => {
77
77
  const code = getReferralCode();
78
- console.log("[REFERRAL] Register.tsx - cookie value on mount:", code);
79
78
  setReferralCode(code);
80
79
  }, []);
81
80
 
@@ -142,7 +141,6 @@ export default function Register() {
142
141
 
143
142
  const onSubmit: SubmitHandler<z.infer<typeof formSchema>> = async (values: z.infer<typeof formSchema>) => {
144
143
  try {
145
- console.log("[REFERRAL] Register.tsx - referralCode at submit:", referralCode);
146
144
  const payload = {
147
145
  id: v4(),
148
146
  companyName: values.company,
@@ -155,7 +153,6 @@ export default function Register() {
155
153
  inviteCode: inviteCode ?? undefined,
156
154
  referralCode: referralCode ?? undefined,
157
155
  };
158
- console.log("[REFERRAL] Register.tsx - payload.referralCode:", payload.referralCode);
159
156
 
160
157
  await AuthService.register(payload);
161
158
  // Clear referral cookie after successful registration
@@ -20,29 +20,20 @@ export function ReferralCodeCapture(): null {
20
20
  const searchParams = useSearchParams();
21
21
 
22
22
  useEffect(() => {
23
- console.log("[REFERRAL] ReferralCodeCapture mounted");
24
- console.log("[REFERRAL] isReferralEnabled():", isReferralEnabled());
25
-
26
23
  // Skip if feature is disabled
27
24
  if (!isReferralEnabled()) {
28
- console.log("[REFERRAL] Feature DISABLED - not capturing");
29
25
  return;
30
26
  }
31
27
 
32
28
  const config = getReferralConfig();
33
29
  const refCode = searchParams.get(config.urlParamName);
34
- console.log("[REFERRAL] URL param '" + config.urlParamName + "':", refCode);
35
30
 
36
31
  if (refCode) {
37
32
  const existingCode = getReferralCode();
38
- console.log("[REFERRAL] Existing cookie:", existingCode);
39
33
 
40
34
  // First referrer wins - only set if no existing cookie
41
35
  if (!existingCode) {
42
36
  setReferralCode(refCode);
43
- console.log("[REFERRAL] Cookie SET to:", refCode);
44
- } else {
45
- console.log("[REFERRAL] Cookie already exists, not overwriting");
46
37
  }
47
38
  }
48
39
  }, [searchParams]);
@@ -1,24 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
- var _chunkWLS4D6VGjs = require('./chunk-WLS4D6VG.js');
12
- require('./chunk-7QVYU63E.js');
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
- exports.JsonApiDelete = _chunkWLS4D6VGjs.JsonApiDelete; exports.JsonApiGet = _chunkWLS4D6VGjs.JsonApiGet; exports.JsonApiPatch = _chunkWLS4D6VGjs.JsonApiPatch; exports.JsonApiPost = _chunkWLS4D6VGjs.JsonApiPost; exports.JsonApiPut = _chunkWLS4D6VGjs.JsonApiPut; exports.configureJsonApi = _chunkWLS4D6VGjs.configureJsonApi; exports.getApiUrl = _chunkWLS4D6VGjs.getApiUrl; exports.getAppUrl = _chunkWLS4D6VGjs.getAppUrl; exports.getTrackablePages = _chunkWLS4D6VGjs.getTrackablePages;
24
- //# sourceMappingURL=JsonApiRequest-MUPAO7DI.js.map