@carlonicora/nextjs-jsonapi 3.3.3 → 3.3.5

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-4LBUVIW6.js → BlockNoteEditor-BWC7JDVK.js} +19 -19
  2. package/dist/{BlockNoteEditor-4LBUVIW6.js.map → BlockNoteEditor-BWC7JDVK.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-CSPPZOZQ.mjs → BlockNoteEditor-BXA6SDVC.mjs} +4 -4
  4. package/dist/billing/index.js +398 -398
  5. package/dist/billing/index.mjs +3 -3
  6. package/dist/{chunk-S2C5V2XZ.js → chunk-6T6QB6K2.js} +6 -2
  7. package/dist/chunk-6T6QB6K2.js.map +1 -0
  8. package/dist/{chunk-KW6LYVFJ.mjs → chunk-G6B7RZWJ.mjs} +5 -1
  9. package/dist/chunk-G6B7RZWJ.mjs.map +1 -0
  10. package/dist/{chunk-SVCOFVQF.mjs → chunk-JBTGGZ3K.mjs} +9 -9
  11. package/dist/chunk-JBTGGZ3K.mjs.map +1 -0
  12. package/dist/{chunk-2PEPIH26.js → chunk-PXXVAY7N.js} +822 -822
  13. package/dist/chunk-PXXVAY7N.js.map +1 -0
  14. package/dist/{chunk-RUEY6XSS.mjs → chunk-RZDY4CIF.mjs} +2 -2
  15. package/dist/{chunk-OHG2YWNA.js → chunk-X2MQ3WHX.js} +7 -7
  16. package/dist/{chunk-OHG2YWNA.js.map → chunk-X2MQ3WHX.js.map} +1 -1
  17. package/dist/client/index.js +4 -4
  18. package/dist/client/index.mjs +3 -3
  19. package/dist/components/index.d.mts +17 -2
  20. package/dist/components/index.d.ts +17 -2
  21. package/dist/components/index.js +4 -4
  22. package/dist/components/index.mjs +3 -3
  23. package/dist/contexts/index.js +4 -4
  24. package/dist/contexts/index.mjs +3 -3
  25. package/dist/core/index.d.mts +11 -1
  26. package/dist/core/index.d.ts +11 -1
  27. package/dist/core/index.js +4 -2
  28. package/dist/core/index.js.map +1 -1
  29. package/dist/core/index.mjs +3 -1
  30. package/dist/features/help/index.js +37 -37
  31. package/dist/features/help/index.mjs +3 -3
  32. package/dist/features/tokenusage/index.js +101 -101
  33. package/dist/features/tokenusage/index.mjs +3 -3
  34. package/dist/index.d.mts +1 -1
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.js +5 -3
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +4 -2
  39. package/dist/server/index.js +3 -3
  40. package/dist/server/index.mjs +1 -1
  41. package/package.json +1 -1
  42. package/src/components/forms/DatePickerPopover.tsx +31 -3
  43. package/src/features/auth/components/forms/Logout.tsx +11 -3
  44. package/src/features/auth/components/forms/__tests__/Logout.spec.tsx +13 -9
  45. package/src/features/user/contexts/CurrentUserContext.tsx +2 -1
  46. package/src/features/user/data/index.ts +1 -0
  47. package/src/features/user/data/user.storage.ts +9 -0
  48. package/dist/chunk-2PEPIH26.js.map +0 -1
  49. package/dist/chunk-KW6LYVFJ.mjs.map +0 -1
  50. package/dist/chunk-S2C5V2XZ.js.map +0 -1
  51. package/dist/chunk-SVCOFVQF.mjs.map +0 -1
  52. /package/dist/{BlockNoteEditor-CSPPZOZQ.mjs.map → BlockNoteEditor-BXA6SDVC.mjs.map} +0 -0
  53. /package/dist/{chunk-RUEY6XSS.mjs.map → chunk-RZDY4CIF.mjs.map} +0 -0
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-RUEY6XSS.mjs";
23
+ } from "./chunk-RZDY4CIF.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AiConnectionService,
@@ -29,6 +29,7 @@ import {
29
29
  AssistantMessageService,
30
30
  AssistantService,
31
31
  AuthService,
32
+ CURRENT_USER_STORAGE_KEY,
32
33
  ClientAbstractService,
33
34
  CompanyService,
34
35
  ContentService,
@@ -70,7 +71,7 @@ import {
70
71
  useIsMobile,
71
72
  validateItalianTaxCode,
72
73
  validatePartitaIva
73
- } from "./chunk-KW6LYVFJ.mjs";
74
+ } from "./chunk-G6B7RZWJ.mjs";
74
75
  import {
75
76
  ENV
76
77
  } from "./chunk-RVASYIQG.mjs";
@@ -7625,7 +7626,7 @@ var useSocketContext = /* @__PURE__ */ __name(() => {
7625
7626
 
7626
7627
  // src/features/user/contexts/CurrentUserContext.tsx
7627
7628
  import { jsx as jsx61 } from "react/jsx-runtime";
7628
- var userAtom = atomWithStorage("user", null);
7629
+ var userAtom = atomWithStorage(CURRENT_USER_STORAGE_KEY, null);
7629
7630
  var CurrentUserContext = createContext12(void 0);
7630
7631
  var CurrentUserProvider = /* @__PURE__ */ __name(({ children }) => {
7631
7632
  const path = usePathname();
@@ -9189,6 +9190,7 @@ import { useMemo as useMemo12, useState as useState20 } from "react";
9189
9190
  import { jsx as jsx83, jsxs as jsxs46 } from "react/jsx-runtime";
9190
9191
  var DatePickerPopover = /* @__PURE__ */ __name(({
9191
9192
  children,
9193
+ nativeButton = true,
9192
9194
  value,
9193
9195
  onSelect,
9194
9196
  minDate,
@@ -9258,7 +9260,7 @@ var DatePickerPopover = /* @__PURE__ */ __name(({
9258
9260
  setInputValue("");
9259
9261
  }, "handleClear");
9260
9262
  return /* @__PURE__ */ jsxs46(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
9261
- /* @__PURE__ */ jsx83(PopoverTrigger, { children }),
9263
+ /* @__PURE__ */ jsx83(PopoverTrigger, { nativeButton, render: children }),
9262
9264
  /* @__PURE__ */ jsx83(PopoverContent, { className: cn("p-0", className), align, onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs46("div", { className: "p-3", children: [
9263
9265
  /* @__PURE__ */ jsxs46("div", { className: "relative mb-3", children: [
9264
9266
  /* @__PURE__ */ jsx83(
@@ -10225,7 +10227,7 @@ import { useRef as useRef17 } from "react";
10225
10227
  import dynamic from "next/dynamic";
10226
10228
  import React17 from "react";
10227
10229
  import { jsx as jsx88 } from "react/jsx-runtime";
10228
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-CSPPZOZQ.mjs"), {
10230
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-BXA6SDVC.mjs"), {
10229
10231
  ssr: false
10230
10232
  });
10231
10233
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -19190,9 +19192,7 @@ function Logout({ storageKeys }) {
19190
19192
  const generateUrl = usePageUrlGenerator();
19191
19193
  useEffect59(() => {
19192
19194
  const logOut = /* @__PURE__ */ __name(async () => {
19193
- if (storageKeys?.length) {
19194
- clearClientStorage(storageKeys);
19195
- }
19195
+ clearClientStorage([CURRENT_USER_STORAGE_KEY, ...storageKeys ?? []]);
19196
19196
  await AuthService.logout();
19197
19197
  window.location.href = generateUrl({ page: `/` });
19198
19198
  }, "logOut");
@@ -25442,4 +25442,4 @@ export {
25442
25442
  useOAuthClients,
25443
25443
  useOAuthClient
25444
25444
  };
25445
- //# sourceMappingURL=chunk-SVCOFVQF.mjs.map
25445
+ //# sourceMappingURL=chunk-JBTGGZ3K.mjs.map