@carlonicora/nextjs-jsonapi 3.15.1 → 3.16.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.
Files changed (71) hide show
  1. package/dist/{AbstractService-B0T7h8fX.d.mts → AbstractService-Ckm2X5fW.d.mts} +2 -5
  2. package/dist/{AbstractService-Cew0PD0L.d.ts → AbstractService-V3VGQMhL.d.ts} +2 -5
  3. package/dist/{BlockNoteEditor-6KPJWJJM.js → BlockNoteEditor-S43PQJEC.js} +93 -53
  4. package/dist/BlockNoteEditor-S43PQJEC.js.map +1 -0
  5. package/dist/{BlockNoteEditor-RRUV4TZY.mjs → BlockNoteEditor-SGISBQD5.mjs} +103 -63
  6. package/dist/BlockNoteEditor-SGISBQD5.mjs.map +1 -0
  7. package/dist/{BlockNoteViewer-P2VKEFRN.mjs → BlockNoteViewer-RK2RKOB7.mjs} +2 -2
  8. package/dist/{BlockNoteViewer-CWFPYYIU.js → BlockNoteViewer-SVVAZ6TQ.js} +3 -3
  9. package/dist/{BlockNoteViewer-CWFPYYIU.js.map → BlockNoteViewer-SVVAZ6TQ.js.map} +1 -1
  10. package/dist/{HandbookSectionInterface-CAXxbDw0.d.ts → HandbookSectionInterface-DFj2zErb.d.ts} +1 -1
  11. package/dist/{HandbookSectionInterface-BOxIdBdd.d.mts → HandbookSectionInterface-DqU_d0sy.d.mts} +1 -1
  12. package/dist/billing/index.js +401 -401
  13. package/dist/billing/index.mjs +3 -3
  14. package/dist/{chunk-2SP4NBQA.mjs → chunk-47CLHN2G.mjs} +19 -8
  15. package/dist/chunk-47CLHN2G.mjs.map +1 -0
  16. package/dist/{chunk-ZNAY65EO.js → chunk-AOWHVECO.js} +828 -817
  17. package/dist/chunk-AOWHVECO.js.map +1 -0
  18. package/dist/{chunk-VZKJIAND.mjs → chunk-IALPADOD.mjs} +2 -2
  19. package/dist/{chunk-XH4IURUD.js → chunk-ODH2LYWC.js} +7 -7
  20. package/dist/{chunk-XH4IURUD.js.map → chunk-ODH2LYWC.js.map} +1 -1
  21. package/dist/{chunk-IB7DTXWG.js → chunk-TBSMAL5Y.js} +120 -115
  22. package/dist/chunk-TBSMAL5Y.js.map +1 -0
  23. package/dist/{chunk-OSFYCSTW.mjs → chunk-YCFPSXLK.mjs} +22 -17
  24. package/dist/chunk-YCFPSXLK.mjs.map +1 -0
  25. package/dist/client/index.js +4 -4
  26. package/dist/client/index.mjs +3 -3
  27. package/dist/components/index.d.mts +37 -6
  28. package/dist/components/index.d.ts +37 -6
  29. package/dist/components/index.js +4 -4
  30. package/dist/components/index.mjs +3 -3
  31. package/dist/contexts/index.js +4 -4
  32. package/dist/contexts/index.mjs +3 -3
  33. package/dist/core/index.d.mts +12 -7
  34. package/dist/core/index.d.ts +12 -7
  35. package/dist/core/index.js +2 -2
  36. package/dist/core/index.mjs +1 -1
  37. package/dist/features/help/index.js +37 -37
  38. package/dist/features/help/index.mjs +3 -3
  39. package/dist/features/tokenusage/index.d.mts +1 -1
  40. package/dist/features/tokenusage/index.d.ts +1 -1
  41. package/dist/features/tokenusage/index.js +101 -101
  42. package/dist/features/tokenusage/index.mjs +3 -3
  43. package/dist/index.d.mts +5 -5
  44. package/dist/index.d.ts +5 -5
  45. package/dist/index.js +3 -3
  46. package/dist/index.mjs +2 -2
  47. package/dist/{s3.service-CUGarZs3.d.ts → s3.service-DJHqEZAp.d.ts} +1 -1
  48. package/dist/{s3.service-C0Yq2Sx3.d.mts → s3.service-DaRFLnrX.d.mts} +1 -1
  49. package/dist/server/index.d.mts +2 -2
  50. package/dist/server/index.d.ts +2 -2
  51. package/dist/server/index.js +3 -3
  52. package/dist/server/index.mjs +1 -1
  53. package/package.json +1 -1
  54. package/src/components/editors/BlockNoteEditor.tsx +70 -33
  55. package/src/components/editors/BlockNoteEditorAiActions.tsx +49 -0
  56. package/src/components/editors/__tests__/BlockNoteEditorAiActions.test.ts +25 -0
  57. package/src/components/editors/index.ts +2 -1
  58. package/src/components/forms/FormBlockNote.tsx +8 -0
  59. package/src/components/forms/FormFieldWrapper.tsx +22 -6
  60. package/src/core/abstracts/AbstractService.ts +9 -30
  61. package/src/core/abstracts/ClientAbstractService.ts +5 -0
  62. package/src/core/abstracts/__tests__/lastApiResponse.spec.ts +45 -0
  63. package/src/core/abstracts/lastApiResponse.ts +37 -0
  64. package/dist/BlockNoteEditor-6KPJWJJM.js.map +0 -1
  65. package/dist/BlockNoteEditor-RRUV4TZY.mjs.map +0 -1
  66. package/dist/chunk-2SP4NBQA.mjs.map +0 -1
  67. package/dist/chunk-IB7DTXWG.js.map +0 -1
  68. package/dist/chunk-OSFYCSTW.mjs.map +0 -1
  69. package/dist/chunk-ZNAY65EO.js.map +0 -1
  70. /package/dist/{BlockNoteViewer-P2VKEFRN.mjs.map → BlockNoteViewer-RK2RKOB7.mjs.map} +0 -0
  71. /package/dist/{chunk-VZKJIAND.mjs.map → chunk-IALPADOD.mjs.map} +0 -0
@@ -62,12 +62,12 @@ import {
62
62
  useCurrentUserContext,
63
63
  useDataListRetriever,
64
64
  usePageUrlGenerator
65
- } from "../chunk-2SP4NBQA.mjs";
65
+ } from "../chunk-47CLHN2G.mjs";
66
66
  import {
67
67
  getRoleId,
68
68
  getStripePublishableKey,
69
69
  useI18nRouter
70
- } from "../chunk-VZKJIAND.mjs";
70
+ } from "../chunk-IALPADOD.mjs";
71
71
  import {
72
72
  FeatureService,
73
73
  Modules,
@@ -81,7 +81,7 @@ import {
81
81
  cn,
82
82
  rehydrate,
83
83
  showToast
84
- } from "../chunk-OSFYCSTW.mjs";
84
+ } from "../chunk-YCFPSXLK.mjs";
85
85
  import "../chunk-AUXK7QSA.mjs";
86
86
  import "../chunk-C7C7VY4F.mjs";
87
87
  import "../chunk-BMVA2IM5.mjs";
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-VZKJIAND.mjs";
23
+ } from "./chunk-IALPADOD.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AiConnectionService,
@@ -81,7 +81,7 @@ import {
81
81
  useIsMobile,
82
82
  validateItalianTaxCode,
83
83
  validatePartitaIva
84
- } from "./chunk-OSFYCSTW.mjs";
84
+ } from "./chunk-YCFPSXLK.mjs";
85
85
  import {
86
86
  ENV
87
87
  } from "./chunk-BMVA2IM5.mjs";
@@ -8367,6 +8367,7 @@ function FormFieldWrapper({
8367
8367
  form,
8368
8368
  name,
8369
8369
  label,
8370
+ labelAction,
8370
8371
  description,
8371
8372
  isRequired,
8372
8373
  orientation = "vertical",
@@ -8380,10 +8381,16 @@ function FormFieldWrapper({
8380
8381
  control: form.control,
8381
8382
  name,
8382
8383
  render: ({ field, fieldState }) => /* @__PURE__ */ jsxs32(Field, { orientation, className, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
8383
- label && /* @__PURE__ */ jsxs32(FieldLabel, { children: [
8384
+ label && (labelAction ? /* @__PURE__ */ jsxs32("div", { className: "flex w-full items-center justify-between gap-2", children: [
8385
+ /* @__PURE__ */ jsxs32(FieldLabel, { children: [
8386
+ label,
8387
+ isRequired && /* @__PURE__ */ jsx67("span", { className: "ms-1 text-destructive", children: "*" })
8388
+ ] }),
8389
+ labelAction
8390
+ ] }) : /* @__PURE__ */ jsxs32(FieldLabel, { children: [
8384
8391
  label,
8385
8392
  isRequired && /* @__PURE__ */ jsx67("span", { className: "ms-1 text-destructive", children: "*" })
8386
- ] }),
8393
+ ] })),
8387
8394
  children(field, fieldState),
8388
8395
  description && /* @__PURE__ */ jsx67(FieldDescription, { children: description }),
8389
8396
  fieldState.error && /* @__PURE__ */ jsx67(FieldError, { children: fieldState.error.message })
@@ -10385,7 +10392,7 @@ import { useRef as useRef17 } from "react";
10385
10392
  import dynamic from "next/dynamic";
10386
10393
  import React18 from "react";
10387
10394
  import { jsx as jsx90 } from "react/jsx-runtime";
10388
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-RRUV4TZY.mjs"), {
10395
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-SGISBQD5.mjs"), {
10389
10396
  ssr: false
10390
10397
  });
10391
10398
  var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -10415,7 +10422,9 @@ function FormBlockNote({
10415
10422
  suggestionMenuComponent,
10416
10423
  mentionNameResolver,
10417
10424
  onWarmMentions,
10418
- aiConfig
10425
+ aiConfig,
10426
+ aiHandleRef,
10427
+ headerAction
10419
10428
  }) {
10420
10429
  const initialContentRef = useRef17(null);
10421
10430
  const lastEditorContentRef = useRef17(void 0);
@@ -10433,6 +10442,7 @@ function FormBlockNote({
10433
10442
  form,
10434
10443
  name: id,
10435
10444
  label: name,
10445
+ labelAction: headerAction,
10436
10446
  isRequired,
10437
10447
  description,
10438
10448
  testId,
@@ -10464,6 +10474,7 @@ function FormBlockNote({
10464
10474
  mentionNameResolver,
10465
10475
  onWarmMentions,
10466
10476
  aiConfig,
10477
+ aiHandleRef,
10467
10478
  stretch,
10468
10479
  className: cn(stretch && "min-h-0 flex-1")
10469
10480
  }
@@ -16245,7 +16256,7 @@ __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMe
16245
16256
  import dynamic2 from "next/dynamic";
16246
16257
  import React29 from "react";
16247
16258
  import { jsx as jsx175 } from "react/jsx-runtime";
16248
- var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-P2VKEFRN.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
16259
+ var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-RK2RKOB7.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
16249
16260
  var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
16250
16261
  return /* @__PURE__ */ jsx175(BlockNoteViewer, { ...props });
16251
16262
  }, "ViewerContainer"));
@@ -27015,4 +27026,4 @@ export {
27015
27026
  useOAuthClients,
27016
27027
  useOAuthClient
27017
27028
  };
27018
- //# sourceMappingURL=chunk-2SP4NBQA.mjs.map
27029
+ //# sourceMappingURL=chunk-47CLHN2G.mjs.map