@carlonicora/nextjs-jsonapi 1.117.1 → 1.119.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-CEWZCORH.js → BlockNoteEditor-BPACLNMB.js} +20 -20
- package/dist/{BlockNoteEditor-CEWZCORH.js.map → BlockNoteEditor-BPACLNMB.js.map} +1 -1
- package/dist/{BlockNoteEditor-K4T6QOJO.mjs → BlockNoteEditor-CEDKBT67.mjs} +5 -5
- package/dist/JsonApiRequest-HE5LTEYK.js +26 -0
- package/dist/JsonApiRequest-HE5LTEYK.js.map +1 -0
- package/dist/{JsonApiRequest-IYL5RZ7I.mjs → JsonApiRequest-SN3DNFDR.mjs} +4 -2
- package/dist/billing/index.js +347 -347
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-6D4GJHLK.mjs → chunk-4SPL6QH3.mjs} +277 -154
- package/dist/chunk-4SPL6QH3.mjs.map +1 -0
- package/dist/{chunk-6KLR3WJQ.js → chunk-55Q43DI5.js} +9 -9
- package/dist/{chunk-6KLR3WJQ.js.map → chunk-55Q43DI5.js.map} +1 -1
- package/dist/{chunk-WEPQD5MP.mjs → chunk-5U7QDGDQ.mjs} +3 -3
- package/dist/{chunk-S2PTWBN6.js → chunk-6P7MEU7Q.js} +64 -50
- package/dist/chunk-6P7MEU7Q.js.map +1 -0
- package/dist/{chunk-56QAXZKI.js → chunk-DXTOA7OO.js} +932 -809
- package/dist/chunk-DXTOA7OO.js.map +1 -0
- package/dist/{chunk-M7XAKLSP.mjs → chunk-FWOS6PC5.mjs} +38 -24
- package/dist/chunk-FWOS6PC5.mjs.map +1 -0
- package/dist/{chunk-J5LROFGL.js → chunk-RCMIVTVL.js} +14 -11
- package/dist/chunk-RCMIVTVL.js.map +1 -0
- package/dist/{chunk-KK7PYKVI.mjs → chunk-WC2BTKJP.mjs} +13 -10
- package/dist/{chunk-KK7PYKVI.mjs.map → chunk-WC2BTKJP.mjs.map} +1 -1
- package/dist/client/index.d.mts +15 -1
- package/dist/client/index.d.ts +15 -1
- package/dist/client/index.js +7 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +6 -4
- package/dist/components/index.d.mts +72 -30
- package/dist/components/index.d.ts +72 -30
- package/dist/components/index.js +7 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +6 -4
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +7 -2
- package/dist/core/index.d.ts +7 -2
- package/dist/core/index.js +3 -3
- package/dist/core/index.mjs +2 -2
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/{s3.service-CihgBy97.d.mts → s3.service-CBqyDZyz.d.mts} +7 -0
- package/dist/{s3.service-Cyvfk3qV.d.ts → s3.service-gcEjq8gF.d.ts} +7 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +12 -12
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/client/JsonApiClient.ts +23 -8
- package/src/client/__tests__/JsonApiClient.test.ts +31 -0
- package/src/components/containers/RoundPageContainer.tsx +197 -76
- package/src/components/containers/TabsContainer.tsx +14 -0
- package/src/components/containers/__tests__/partitionTabs.spec.ts +51 -0
- package/src/components/containers/index.ts +1 -0
- package/src/components/containers/partitionTabs.ts +43 -0
- package/src/components/forms/EditorSheet.tsx +7 -2
- package/src/core/abstracts/AbstractService.ts +13 -0
- package/src/core/abstracts/ClientAbstractService.ts +10 -0
- package/src/unified/JsonApiRequest.ts +22 -8
- package/src/unified/__tests__/JsonApiRequest.test.ts +29 -0
- package/dist/JsonApiRequest-OSGJ63XR.js +0 -24
- package/dist/JsonApiRequest-OSGJ63XR.js.map +0 -1
- package/dist/chunk-56QAXZKI.js.map +0 -1
- package/dist/chunk-6D4GJHLK.mjs.map +0 -1
- package/dist/chunk-J5LROFGL.js.map +0 -1
- package/dist/chunk-M7XAKLSP.mjs.map +0 -1
- package/dist/chunk-S2PTWBN6.js.map +0 -1
- /package/dist/{BlockNoteEditor-K4T6QOJO.mjs.map → BlockNoteEditor-CEDKBT67.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-IYL5RZ7I.mjs.map → JsonApiRequest-SN3DNFDR.mjs.map} +0 -0
- /package/dist/{chunk-WEPQD5MP.mjs.map → chunk-5U7QDGDQ.mjs.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
setBootstrapper,
|
|
15
15
|
translateResponse,
|
|
16
16
|
tryBootstrap
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WC2BTKJP.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-PAWJFY3S.mjs";
|
|
@@ -326,7 +326,7 @@ var AbstractService = class {
|
|
|
326
326
|
* Make an API call with automatic environment detection and error handling.
|
|
327
327
|
*/
|
|
328
328
|
static async callApi(params) {
|
|
329
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-
|
|
329
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-SN3DNFDR.mjs");
|
|
330
330
|
let apiResponse;
|
|
331
331
|
let language = "en";
|
|
332
332
|
if (typeof window === "undefined") {
|
|
@@ -341,7 +341,8 @@ var AbstractService = class {
|
|
|
341
341
|
classKey: params.type,
|
|
342
342
|
endpoint: params.endpoint,
|
|
343
343
|
companyId: params.companyId,
|
|
344
|
-
language
|
|
344
|
+
language,
|
|
345
|
+
baseUrl: params.baseUrl
|
|
345
346
|
});
|
|
346
347
|
break;
|
|
347
348
|
case "POST" /* POST */:
|
|
@@ -354,7 +355,8 @@ var AbstractService = class {
|
|
|
354
355
|
language,
|
|
355
356
|
responseType: params.responseType,
|
|
356
357
|
files: params.files,
|
|
357
|
-
token: params.token
|
|
358
|
+
token: params.token,
|
|
359
|
+
baseUrl: params.baseUrl
|
|
358
360
|
});
|
|
359
361
|
break;
|
|
360
362
|
case "PUT" /* PUT */:
|
|
@@ -365,7 +367,8 @@ var AbstractService = class {
|
|
|
365
367
|
body: params.input,
|
|
366
368
|
language,
|
|
367
369
|
responseType: params.responseType,
|
|
368
|
-
files: params.files
|
|
370
|
+
files: params.files,
|
|
371
|
+
baseUrl: params.baseUrl
|
|
369
372
|
});
|
|
370
373
|
break;
|
|
371
374
|
case "PATCH" /* PATCH */:
|
|
@@ -377,7 +380,8 @@ var AbstractService = class {
|
|
|
377
380
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
378
381
|
language,
|
|
379
382
|
responseType: params.responseType,
|
|
380
|
-
files: params.files
|
|
383
|
+
files: params.files,
|
|
384
|
+
baseUrl: params.baseUrl
|
|
381
385
|
});
|
|
382
386
|
break;
|
|
383
387
|
case "DELETE" /* DELETE */:
|
|
@@ -386,7 +390,8 @@ var AbstractService = class {
|
|
|
386
390
|
endpoint: params.endpoint,
|
|
387
391
|
companyId: params.companyId,
|
|
388
392
|
language,
|
|
389
|
-
responseType: params.responseType
|
|
393
|
+
responseType: params.responseType,
|
|
394
|
+
baseUrl: params.baseUrl
|
|
390
395
|
});
|
|
391
396
|
break;
|
|
392
397
|
default:
|
|
@@ -416,7 +421,7 @@ var AbstractService = class {
|
|
|
416
421
|
* Make an API call and return both data and meta from the response.
|
|
417
422
|
*/
|
|
418
423
|
static async callApiWithMeta(params) {
|
|
419
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-
|
|
424
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-SN3DNFDR.mjs");
|
|
420
425
|
let apiResponse;
|
|
421
426
|
let language = "en";
|
|
422
427
|
if (typeof window === "undefined") {
|
|
@@ -501,7 +506,7 @@ var AbstractService = class {
|
|
|
501
506
|
* Get raw JSON:API response data without deserialization.
|
|
502
507
|
*/
|
|
503
508
|
static async getRawData(params) {
|
|
504
|
-
const { JsonApiGet: JsonApiGet2 } = await import("./JsonApiRequest-
|
|
509
|
+
const { JsonApiGet: JsonApiGet2 } = await import("./JsonApiRequest-SN3DNFDR.mjs");
|
|
505
510
|
let language = "en";
|
|
506
511
|
if (typeof window === "undefined") {
|
|
507
512
|
const { getLocale } = await import("next-intl/server");
|
|
@@ -513,6 +518,7 @@ var AbstractService = class {
|
|
|
513
518
|
classKey: params.type,
|
|
514
519
|
endpoint: params.endpoint,
|
|
515
520
|
companyId: params.companyId,
|
|
521
|
+
baseUrl: params.baseUrl,
|
|
516
522
|
language
|
|
517
523
|
});
|
|
518
524
|
if (!apiResponse.ok) {
|
|
@@ -576,9 +582,10 @@ function runClientBootstrapper() {
|
|
|
576
582
|
}
|
|
577
583
|
}
|
|
578
584
|
__name(runClientBootstrapper, "runClientBootstrapper");
|
|
579
|
-
function buildClientUrl(endpoint) {
|
|
580
|
-
|
|
581
|
-
|
|
585
|
+
function buildClientUrl(endpoint, baseUrl) {
|
|
586
|
+
if (endpoint.startsWith("http")) return endpoint;
|
|
587
|
+
const apiUrl = baseUrl ?? getClientApiUrl();
|
|
588
|
+
return `${apiUrl}${endpoint}`;
|
|
582
589
|
}
|
|
583
590
|
__name(buildClientUrl, "buildClientUrl");
|
|
584
591
|
async function ClientJsonApiGet(params) {
|
|
@@ -586,7 +593,7 @@ async function ClientJsonApiGet(params) {
|
|
|
586
593
|
const token = await getClientToken();
|
|
587
594
|
const apiResponse = await directFetch({
|
|
588
595
|
method: "GET",
|
|
589
|
-
url: buildClientUrl(params.endpoint),
|
|
596
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
590
597
|
token,
|
|
591
598
|
companyId: params.companyId,
|
|
592
599
|
language: params.language,
|
|
@@ -601,7 +608,8 @@ async function ClientJsonApiGet(params) {
|
|
|
601
608
|
classKey: params.classKey,
|
|
602
609
|
endpoint,
|
|
603
610
|
companyId: params.companyId,
|
|
604
|
-
language: params.language
|
|
611
|
+
language: params.language,
|
|
612
|
+
baseUrl: params.baseUrl
|
|
605
613
|
}), "paginationHandler")
|
|
606
614
|
});
|
|
607
615
|
}
|
|
@@ -617,7 +625,7 @@ async function ClientJsonApiPost(params) {
|
|
|
617
625
|
}
|
|
618
626
|
const apiResponse = await directFetch({
|
|
619
627
|
method: "POST",
|
|
620
|
-
url: buildClientUrl(params.endpoint),
|
|
628
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
621
629
|
token,
|
|
622
630
|
body,
|
|
623
631
|
files: params.files,
|
|
@@ -644,7 +652,7 @@ async function ClientJsonApiPut(params) {
|
|
|
644
652
|
}
|
|
645
653
|
const apiResponse = await directFetch({
|
|
646
654
|
method: "PUT",
|
|
647
|
-
url: buildClientUrl(params.endpoint),
|
|
655
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
648
656
|
token,
|
|
649
657
|
body,
|
|
650
658
|
files: params.files,
|
|
@@ -671,7 +679,7 @@ async function ClientJsonApiPatch(params) {
|
|
|
671
679
|
}
|
|
672
680
|
const apiResponse = await directFetch({
|
|
673
681
|
method: "PATCH",
|
|
674
|
-
url: buildClientUrl(params.endpoint),
|
|
682
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
675
683
|
token,
|
|
676
684
|
body,
|
|
677
685
|
files: params.files,
|
|
@@ -692,7 +700,7 @@ async function ClientJsonApiDelete(params) {
|
|
|
692
700
|
const token = await getClientToken();
|
|
693
701
|
const apiResponse = await directFetch({
|
|
694
702
|
method: "DELETE",
|
|
695
|
-
url: buildClientUrl(params.endpoint),
|
|
703
|
+
url: buildClientUrl(params.endpoint, params.baseUrl),
|
|
696
704
|
token,
|
|
697
705
|
companyId: params.companyId,
|
|
698
706
|
language: params.language,
|
|
@@ -790,7 +798,8 @@ var ClientAbstractService = class {
|
|
|
790
798
|
classKey: params.type,
|
|
791
799
|
endpoint: params.endpoint,
|
|
792
800
|
companyId: params.companyId,
|
|
793
|
-
language
|
|
801
|
+
language,
|
|
802
|
+
baseUrl: params.baseUrl
|
|
794
803
|
});
|
|
795
804
|
break;
|
|
796
805
|
case "POST" /* POST */:
|
|
@@ -802,7 +811,8 @@ var ClientAbstractService = class {
|
|
|
802
811
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
803
812
|
language,
|
|
804
813
|
responseType: params.responseType,
|
|
805
|
-
files: params.files
|
|
814
|
+
files: params.files,
|
|
815
|
+
baseUrl: params.baseUrl
|
|
806
816
|
});
|
|
807
817
|
break;
|
|
808
818
|
case "PUT" /* PUT */:
|
|
@@ -813,7 +823,8 @@ var ClientAbstractService = class {
|
|
|
813
823
|
body: params.input,
|
|
814
824
|
language,
|
|
815
825
|
responseType: params.responseType,
|
|
816
|
-
files: params.files
|
|
826
|
+
files: params.files,
|
|
827
|
+
baseUrl: params.baseUrl
|
|
817
828
|
});
|
|
818
829
|
break;
|
|
819
830
|
case "PATCH" /* PATCH */:
|
|
@@ -825,7 +836,8 @@ var ClientAbstractService = class {
|
|
|
825
836
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
826
837
|
language,
|
|
827
838
|
responseType: params.responseType,
|
|
828
|
-
files: params.files
|
|
839
|
+
files: params.files,
|
|
840
|
+
baseUrl: params.baseUrl
|
|
829
841
|
});
|
|
830
842
|
break;
|
|
831
843
|
case "DELETE" /* DELETE */:
|
|
@@ -834,7 +846,8 @@ var ClientAbstractService = class {
|
|
|
834
846
|
endpoint: params.endpoint,
|
|
835
847
|
companyId: params.companyId,
|
|
836
848
|
language,
|
|
837
|
-
responseType: params.responseType
|
|
849
|
+
responseType: params.responseType,
|
|
850
|
+
baseUrl: params.baseUrl
|
|
838
851
|
});
|
|
839
852
|
break;
|
|
840
853
|
default:
|
|
@@ -7654,6 +7667,7 @@ export {
|
|
|
7654
7667
|
getClientApiUrl,
|
|
7655
7668
|
getClientAppUrl,
|
|
7656
7669
|
getClientTrackablePages,
|
|
7670
|
+
buildClientUrl,
|
|
7657
7671
|
ClientJsonApiGet,
|
|
7658
7672
|
ClientJsonApiPost,
|
|
7659
7673
|
ClientJsonApiPut,
|
|
@@ -7831,4 +7845,4 @@ export {
|
|
|
7831
7845
|
AuditLogService,
|
|
7832
7846
|
AuditLogModule
|
|
7833
7847
|
};
|
|
7834
|
-
//# sourceMappingURL=chunk-
|
|
7848
|
+
//# sourceMappingURL=chunk-FWOS6PC5.mjs.map
|