@carlonicora/nextjs-jsonapi 3.3.1 → 3.3.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-JLMXCPGB.js → BlockNoteEditor-4LBUVIW6.js} +20 -20
- package/dist/{BlockNoteEditor-JLMXCPGB.js.map → BlockNoteEditor-4LBUVIW6.js.map} +1 -1
- package/dist/{BlockNoteEditor-G5A34EXN.mjs → BlockNoteEditor-CSPPZOZQ.mjs} +5 -5
- package/dist/{JsonApiRequest-2OQCZAK6.mjs → JsonApiRequest-ADNIGXTP.mjs} +2 -2
- package/dist/JsonApiRequest-WWGSGV2I.js +26 -0
- package/dist/{JsonApiRequest-6TYNBVUL.js.map → JsonApiRequest-WWGSGV2I.js.map} +1 -1
- package/dist/billing/index.js +399 -399
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-5AKDE5UW.js → chunk-2PEPIH26.js} +941 -938
- package/dist/chunk-2PEPIH26.js.map +1 -0
- package/dist/{chunk-PGARO3JT.mjs → chunk-KW6LYVFJ.mjs} +8 -7
- package/dist/chunk-KW6LYVFJ.mjs.map +1 -0
- package/dist/{chunk-UYENG3GT.js → chunk-OHG2YWNA.js} +22 -27
- package/dist/chunk-OHG2YWNA.js.map +1 -0
- package/dist/{chunk-LCMVARSP.mjs → chunk-RUEY6XSS.mjs} +8 -13
- package/dist/chunk-RUEY6XSS.mjs.map +1 -0
- package/dist/{chunk-CMGXH5SA.mjs → chunk-RVASYIQG.mjs} +47 -3
- package/dist/chunk-RVASYIQG.mjs.map +1 -0
- package/dist/{chunk-YKFXQOQA.js → chunk-S2C5V2XZ.js} +33 -32
- package/dist/chunk-S2C5V2XZ.js.map +1 -0
- package/dist/{chunk-O4LTJAAM.mjs → chunk-SVCOFVQF.mjs} +15 -12
- package/dist/chunk-SVCOFVQF.mjs.map +1 -0
- package/dist/{chunk-PFAZPP54.js → chunk-W42MYR3Y.js} +59 -15
- package/dist/chunk-W42MYR3Y.js.map +1 -0
- package/dist/client/index.js +5 -5
- package/dist/client/index.mjs +4 -4
- package/dist/components/index.js +5 -5
- package/dist/components/index.mjs +4 -4
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +59 -1
- package/dist/core/index.d.ts +59 -1
- package/dist/core/index.js +5 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +4 -2
- package/dist/features/help/index.js +38 -38
- package/dist/features/help/index.mjs +4 -4
- package/dist/features/tokenusage/index.js +102 -102
- 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 +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/server/index.js +15 -14
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +5 -4
- package/dist/server/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client/JsonApiClient.ts +3 -2
- package/src/client/config.ts +5 -10
- package/src/components/forms/FormPlaceAutocomplete.tsx +2 -1
- package/src/core/env.ts +73 -0
- package/src/core/index.ts +1 -0
- package/src/features/auth/utils/AuthCookies.ts +2 -1
- package/src/features/company/components/forms/CompanyEditor.tsx +2 -3
- package/src/hooks/usePushNotifications.ts +2 -1
- package/src/hooks/useSocket.ts +4 -3
- package/src/server/JsonApiServer.ts +3 -2
- package/src/unified/JsonApiRequest.ts +3 -2
- package/dist/JsonApiRequest-6TYNBVUL.js +0 -26
- package/dist/chunk-5AKDE5UW.js.map +0 -1
- package/dist/chunk-CMGXH5SA.mjs.map +0 -1
- package/dist/chunk-LCMVARSP.mjs.map +0 -1
- package/dist/chunk-O4LTJAAM.mjs.map +0 -1
- package/dist/chunk-PFAZPP54.js.map +0 -1
- package/dist/chunk-PGARO3JT.mjs.map +0 -1
- package/dist/chunk-UYENG3GT.js.map +0 -1
- package/dist/chunk-YKFXQOQA.js.map +0 -1
- /package/dist/{BlockNoteEditor-G5A34EXN.mjs.map → BlockNoteEditor-CSPPZOZQ.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-2OQCZAK6.mjs.map → JsonApiRequest-ADNIGXTP.mjs.map} +0 -0
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
useI18nLocale,
|
|
21
21
|
useI18nRouter,
|
|
22
22
|
useI18nTranslations
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RUEY6XSS.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AVAILABLE_OAUTH_SCOPES,
|
|
26
26
|
AiConnectionService,
|
|
@@ -70,7 +70,10 @@ import {
|
|
|
70
70
|
useIsMobile,
|
|
71
71
|
validateItalianTaxCode,
|
|
72
72
|
validatePartitaIva
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-KW6LYVFJ.mjs";
|
|
74
|
+
import {
|
|
75
|
+
ENV
|
|
76
|
+
} from "./chunk-RVASYIQG.mjs";
|
|
74
77
|
import {
|
|
75
78
|
JsonApiContext
|
|
76
79
|
} from "./chunk-VOXD3ZLY.mjs";
|
|
@@ -10222,7 +10225,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10222
10225
|
import dynamic from "next/dynamic";
|
|
10223
10226
|
import React17 from "react";
|
|
10224
10227
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
10225
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10228
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-CSPPZOZQ.mjs"), {
|
|
10226
10229
|
ssr: false
|
|
10227
10230
|
});
|
|
10228
10231
|
var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -10919,7 +10922,7 @@ function FormPlaceAutocomplete({
|
|
|
10919
10922
|
const debounceRef = useRef18(null);
|
|
10920
10923
|
const containerRef = useRef18(null);
|
|
10921
10924
|
useEffect20(() => {
|
|
10922
|
-
const key =
|
|
10925
|
+
const key = ENV.GOOGLE_MAPS_API_KEY;
|
|
10923
10926
|
if (!key) {
|
|
10924
10927
|
console.error("Google Maps API key not found. Please set NEXT_PUBLIC_GOOGLE_MAPS_API_KEY environment variable.");
|
|
10925
10928
|
setLoadError(true);
|
|
@@ -12449,7 +12452,7 @@ function CompanyEditorInternal({
|
|
|
12449
12452
|
const t = useTranslations37();
|
|
12450
12453
|
const fiscalRef = useRef21(null);
|
|
12451
12454
|
const addressComponentsRef = useRef21({});
|
|
12452
|
-
const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) &&
|
|
12455
|
+
const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) && ENV.PRIVATE_INSTALLATION;
|
|
12453
12456
|
const handleDialogOpenChange = useCallback21(
|
|
12454
12457
|
(open) => {
|
|
12455
12458
|
if (open && features.length === 0 && canAccessFeatures) {
|
|
@@ -14446,7 +14449,7 @@ function usePushNotifications() {
|
|
|
14446
14449
|
if (permission !== "granted") {
|
|
14447
14450
|
return;
|
|
14448
14451
|
}
|
|
14449
|
-
const vapidPublicKey =
|
|
14452
|
+
const vapidPublicKey = ENV.VAPID_PUBLIC_KEY.trim();
|
|
14450
14453
|
if (!vapidPublicKey) {
|
|
14451
14454
|
return;
|
|
14452
14455
|
}
|
|
@@ -14493,7 +14496,7 @@ function useSocket({ token }) {
|
|
|
14493
14496
|
const socketRef = useRef26(null);
|
|
14494
14497
|
useEffect37(() => {
|
|
14495
14498
|
if (!token) return;
|
|
14496
|
-
const globalSocketKey = `__socket_${
|
|
14499
|
+
const globalSocketKey = `__socket_${ENV.API_URL.replace(/[^a-zA-Z0-9]/g, "_")}`;
|
|
14497
14500
|
if (typeof window !== "undefined") {
|
|
14498
14501
|
const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
|
|
14499
14502
|
const existingSocket = window[globalSocketKey];
|
|
@@ -14519,7 +14522,7 @@ function useSocket({ token }) {
|
|
|
14519
14522
|
}
|
|
14520
14523
|
shouldConnect.current = false;
|
|
14521
14524
|
try {
|
|
14522
|
-
currentSocket = io(
|
|
14525
|
+
currentSocket = io(ENV.API_URL, {
|
|
14523
14526
|
auth: { token },
|
|
14524
14527
|
transports: ["websocket"],
|
|
14525
14528
|
timeout: 2e4
|
|
@@ -14574,7 +14577,7 @@ function useSocket({ token }) {
|
|
|
14574
14577
|
return () => {
|
|
14575
14578
|
shouldConnect.current = true;
|
|
14576
14579
|
if (currentSocket) {
|
|
14577
|
-
if (
|
|
14580
|
+
if (ENV.IS_DEVELOPMENT) {
|
|
14578
14581
|
currentSocket.off("connect", handleConnect);
|
|
14579
14582
|
currentSocket.off("disconnect", handleDisconnect);
|
|
14580
14583
|
currentSocket.off("message", handleMessage);
|
|
@@ -16040,7 +16043,7 @@ function useJsonApiGet(params) {
|
|
|
16040
16043
|
setLoading(true);
|
|
16041
16044
|
setError(null);
|
|
16042
16045
|
try {
|
|
16043
|
-
const { JsonApiGet } = await import("./JsonApiRequest-
|
|
16046
|
+
const { JsonApiGet } = await import("./JsonApiRequest-ADNIGXTP.mjs");
|
|
16044
16047
|
const language = navigator.language.split("-")[0] || "en";
|
|
16045
16048
|
const apiResponse = await JsonApiGet({
|
|
16046
16049
|
classKey: params.classKey,
|
|
@@ -16145,7 +16148,7 @@ function useJsonApiMutation(config) {
|
|
|
16145
16148
|
setLoading(true);
|
|
16146
16149
|
setError(null);
|
|
16147
16150
|
try {
|
|
16148
|
-
const { JsonApiPost, JsonApiPut, JsonApiPatch, JsonApiDelete } = await import("./JsonApiRequest-
|
|
16151
|
+
const { JsonApiPost, JsonApiPut, JsonApiPatch, JsonApiDelete } = await import("./JsonApiRequest-ADNIGXTP.mjs");
|
|
16149
16152
|
const language = navigator.language.split("-")[0] || "en";
|
|
16150
16153
|
let apiResponse;
|
|
16151
16154
|
switch (config.method) {
|
|
@@ -25439,4 +25442,4 @@ export {
|
|
|
25439
25442
|
useOAuthClients,
|
|
25440
25443
|
useOAuthClient
|
|
25441
25444
|
};
|
|
25442
|
-
//# sourceMappingURL=chunk-
|
|
25445
|
+
//# sourceMappingURL=chunk-SVCOFVQF.mjs.map
|