@carlonicora/nextjs-jsonapi 6.12.0 → 6.12.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 (80) hide show
  1. package/dist/{AbstractService-Ckm2X5fW.d.mts → AbstractService-N0wFgaHD.d.mts} +1 -1
  2. package/dist/{AbstractService-V3VGQMhL.d.ts → AbstractService-kNAykPDk.d.ts} +1 -1
  3. package/dist/{BlockNoteEditor-R2SLOYS6.js → BlockNoteEditor-CBYKEXAQ.js} +19 -19
  4. package/dist/{BlockNoteEditor-R2SLOYS6.js.map → BlockNoteEditor-CBYKEXAQ.js.map} +1 -1
  5. package/dist/{BlockNoteEditor-ZJPGGUQQ.mjs → BlockNoteEditor-N2NBYCPC.mjs} +4 -4
  6. package/dist/{BlockNoteViewer-UCA3LV3N.mjs → BlockNoteViewer-MTGS6YJV.mjs} +2 -2
  7. package/dist/{BlockNoteViewer-FLUHEXE6.js → BlockNoteViewer-WGCDB7IJ.js} +3 -3
  8. package/dist/{BlockNoteViewer-FLUHEXE6.js.map → BlockNoteViewer-WGCDB7IJ.js.map} +1 -1
  9. package/dist/billing/index.js +491 -491
  10. package/dist/billing/index.mjs +3 -3
  11. package/dist/{chunk-6RLATJ2L.mjs → chunk-4FNGWALA.mjs} +2 -2
  12. package/dist/{chunk-BXR36J25.js → chunk-6NZKWIOR.js} +908 -908
  13. package/dist/{chunk-BXR36J25.js.map → chunk-6NZKWIOR.js.map} +1 -1
  14. package/dist/{chunk-SQUMPLNN.mjs → chunk-6XJOQFCP.mjs} +5 -5
  15. package/dist/{chunk-BGLOFZ3K.mjs → chunk-AA52ORW2.mjs} +11 -15
  16. package/dist/chunk-AA52ORW2.mjs.map +1 -0
  17. package/dist/{chunk-YP6W4AB5.mjs → chunk-EWCY6QJA.mjs} +2 -2
  18. package/dist/{chunk-YGEOX2XX.js → chunk-FF4EIQ6H.js} +11 -15
  19. package/dist/chunk-FF4EIQ6H.js.map +1 -0
  20. package/dist/{chunk-FNPXCYHO.js → chunk-L6PYFQTO.js} +8 -8
  21. package/dist/{chunk-FNPXCYHO.js.map → chunk-L6PYFQTO.js.map} +1 -1
  22. package/dist/{chunk-OHJSI6L2.js → chunk-O3PDL2CV.js} +4 -4
  23. package/dist/{chunk-OHJSI6L2.js.map → chunk-O3PDL2CV.js.map} +1 -1
  24. package/dist/client/index.js +4 -4
  25. package/dist/client/index.mjs +3 -3
  26. package/dist/components/index.d.mts +3 -3
  27. package/dist/components/index.d.ts +3 -3
  28. package/dist/components/index.js +4 -4
  29. package/dist/components/index.mjs +3 -3
  30. package/dist/contexts/index.js +4 -4
  31. package/dist/contexts/index.mjs +3 -3
  32. package/dist/core/index.d.mts +7 -7
  33. package/dist/core/index.d.ts +7 -7
  34. package/dist/core/index.js +2 -2
  35. package/dist/core/index.mjs +1 -1
  36. package/dist/email-automations/index.js +93 -93
  37. package/dist/email-automations/index.mjs +3 -3
  38. package/dist/features/analytics/index.d.mts +1 -1
  39. package/dist/features/analytics/index.d.ts +1 -1
  40. package/dist/features/analytics/index.js +120 -120
  41. package/dist/features/analytics/index.mjs +3 -3
  42. package/dist/features/analytics/server.js +4 -4
  43. package/dist/features/analytics/server.mjs +2 -2
  44. package/dist/features/blog/index.js +150 -150
  45. package/dist/features/blog/index.mjs +3 -3
  46. package/dist/features/blog/server.js +16 -16
  47. package/dist/features/blog/server.mjs +1 -1
  48. package/dist/features/help/index.js +37 -37
  49. package/dist/features/help/index.mjs +3 -3
  50. package/dist/features/tokenusage/index.d.mts +1 -1
  51. package/dist/features/tokenusage/index.d.ts +1 -1
  52. package/dist/features/tokenusage/index.js +126 -126
  53. package/dist/features/tokenusage/index.mjs +3 -3
  54. package/dist/index.d.mts +4 -4
  55. package/dist/index.d.ts +4 -4
  56. package/dist/index.js +3 -3
  57. package/dist/index.mjs +2 -2
  58. package/dist/{referral-admin.interface-CMwl5NiV.d.ts → referral-admin.interface-CnytdDaQ.d.ts} +1 -1
  59. package/dist/{referral-admin.interface-C87ApGMR.d.mts → referral-admin.interface-RVO-ZTJz.d.mts} +1 -1
  60. package/dist/{s3.service-BG136Btz.d.mts → s3.service-CeUsKm-d.d.mts} +1 -1
  61. package/dist/{s3.service-CsrsRPRn.d.ts → s3.service-SkZnngeR.d.ts} +1 -1
  62. package/dist/server/index.d.mts +2 -2
  63. package/dist/server/index.d.ts +2 -2
  64. package/dist/server/index.js +3 -3
  65. package/dist/server/index.mjs +2 -2
  66. package/package.json +1 -1
  67. package/src/core/abstracts/AbstractService.ts +5 -11
  68. package/src/core/abstracts/ClientAbstractService.ts +5 -11
  69. package/src/core/abstracts/__tests__/AbstractService.locale.spec.ts +43 -0
  70. package/src/core/abstracts/__tests__/ClientAbstractService.locale.spec.ts +69 -0
  71. package/src/i18n/__tests__/config.spec.ts +22 -1
  72. package/src/i18n/config.ts +5 -0
  73. package/src/i18n/index.ts +1 -0
  74. package/dist/chunk-BGLOFZ3K.mjs.map +0 -1
  75. package/dist/chunk-YGEOX2XX.js.map +0 -1
  76. /package/dist/{BlockNoteEditor-ZJPGGUQQ.mjs.map → BlockNoteEditor-N2NBYCPC.mjs.map} +0 -0
  77. /package/dist/{BlockNoteViewer-UCA3LV3N.mjs.map → BlockNoteViewer-MTGS6YJV.mjs.map} +0 -0
  78. /package/dist/{chunk-6RLATJ2L.mjs.map → chunk-4FNGWALA.mjs.map} +0 -0
  79. /package/dist/{chunk-SQUMPLNN.mjs.map → chunk-6XJOQFCP.mjs.map} +0 -0
  80. /package/dist/{chunk-YP6W4AB5.mjs.map → chunk-EWCY6QJA.mjs.map} +0 -0
@@ -16,7 +16,7 @@ import {
16
16
  isReferralEnabled,
17
17
  isRegistrationAllowed,
18
18
  useWaitlistText
19
- } from "./chunk-6RLATJ2L.mjs";
19
+ } from "./chunk-4FNGWALA.mjs";
20
20
  import {
21
21
  getRoleId,
22
22
  isRolesConfigured
@@ -103,7 +103,7 @@ import {
103
103
  useIsMobile,
104
104
  validateItalianTaxCode,
105
105
  validatePartitaIva
106
- } from "./chunk-BGLOFZ3K.mjs";
106
+ } from "./chunk-AA52ORW2.mjs";
107
107
  import {
108
108
  ENV
109
109
  } from "./chunk-V5MI7RNB.mjs";
@@ -10840,7 +10840,7 @@ import { useRef as useRef18 } from "react";
10840
10840
  import dynamic from "next/dynamic";
10841
10841
  import React18 from "react";
10842
10842
  import { jsx as jsx91 } from "react/jsx-runtime";
10843
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-ZJPGGUQQ.mjs"), {
10843
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-N2NBYCPC.mjs"), {
10844
10844
  ssr: false
10845
10845
  });
10846
10846
  var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -17049,7 +17049,7 @@ __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMe
17049
17049
  import dynamic2 from "next/dynamic";
17050
17050
  import React29 from "react";
17051
17051
  import { jsx as jsx178 } from "react/jsx-runtime";
17052
- var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-UCA3LV3N.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
17052
+ var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-MTGS6YJV.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
17053
17053
  var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
17054
17054
  return /* @__PURE__ */ jsx178(BlockNoteViewer, { ...props });
17055
17055
  }, "ViewerContainer"));
@@ -30751,4 +30751,4 @@ export {
30751
30751
  useOAuthClients,
30752
30752
  useOAuthClient
30753
30753
  };
30754
- //# sourceMappingURL=chunk-SQUMPLNN.mjs.map
30754
+ //# sourceMappingURL=chunk-6XJOQFCP.mjs.map
@@ -336,6 +336,10 @@ function getI18nSupportedLocales() {
336
336
  return ["en"];
337
337
  }
338
338
  __name(getI18nSupportedLocales, "getI18nSupportedLocales");
339
+ function getI18nDefaultLocale() {
340
+ return getI18nSupportedLocales()[0];
341
+ }
342
+ __name(getI18nDefaultLocale, "getI18nDefaultLocale");
339
343
 
340
344
  // src/core/abstracts/AbstractService.ts
341
345
  var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
@@ -362,11 +366,11 @@ var AbstractService = class {
362
366
  /**
363
367
  * Extract locale from client-side URL pathname
364
368
  * URL structure: /{locale}/route-path (e.g., /it/accounts)
365
- * Fallback chain: URL locale → navigator.language → "en"
369
+ * Fallback chain: URL locale → the app's default locale (first supported locale)
366
370
  */
367
371
  static getClientLocale() {
368
372
  if (typeof window === "undefined") {
369
- return "en";
373
+ return getI18nDefaultLocale();
370
374
  }
371
375
  const pathSegments = window.location.pathname.split("/").filter(Boolean);
372
376
  const urlLocale = pathSegments[0];
@@ -374,11 +378,7 @@ var AbstractService = class {
374
378
  if (urlLocale && supportedLocales.includes(urlLocale)) {
375
379
  return urlLocale;
376
380
  }
377
- const navigatorLocale = navigator.language.split("-")[0];
378
- if (navigatorLocale && supportedLocales.includes(navigatorLocale)) {
379
- return navigatorLocale;
380
- }
381
- return "en";
381
+ return getI18nDefaultLocale();
382
382
  }
383
383
  static async next(params) {
384
384
  return await this.callApi({
@@ -825,11 +825,11 @@ var ClientAbstractService = class {
825
825
  /**
826
826
  * Extract locale from client-side URL pathname
827
827
  * URL structure: /{locale}/route-path (e.g., /it/accounts)
828
- * Fallback chain: URL locale → navigator.language → "en"
828
+ * Fallback chain: URL locale → the app's default locale (first supported locale)
829
829
  */
830
830
  static getClientLocale() {
831
831
  if (typeof window === "undefined") {
832
- return "en";
832
+ return getI18nDefaultLocale();
833
833
  }
834
834
  const pathSegments = window.location.pathname.split("/").filter(Boolean);
835
835
  const urlLocale = pathSegments[0];
@@ -837,11 +837,7 @@ var ClientAbstractService = class {
837
837
  if (urlLocale && supportedLocales.includes(urlLocale)) {
838
838
  return urlLocale;
839
839
  }
840
- const navigatorLocale = navigator.language.split("-")[0];
841
- if (navigatorLocale && supportedLocales.includes(navigatorLocale)) {
842
- return navigatorLocale;
843
- }
844
- return "en";
840
+ return getI18nDefaultLocale();
845
841
  }
846
842
  /**
847
843
  * Fetch the next page of results.
@@ -13281,4 +13277,4 @@ export {
13281
13277
  AuditLogService,
13282
13278
  AuditLogModule
13283
13279
  };
13284
- //# sourceMappingURL=chunk-BGLOFZ3K.mjs.map
13280
+ //# sourceMappingURL=chunk-AA52ORW2.mjs.map