@carlonicora/nextjs-jsonapi 1.33.0 → 1.34.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.
@@ -47,7 +47,7 @@ import {
47
47
  TabsList,
48
48
  TabsTrigger,
49
49
  useCurrentUserContext
50
- } from "../chunk-53WT73E6.mjs";
50
+ } from "../chunk-GFRODCD7.mjs";
51
51
  import {
52
52
  getRoleId,
53
53
  getStripePublishableKey
@@ -1012,6 +1012,16 @@ var CurrentUserProvider = /* @__PURE__ */ __name(({ children }) => {
1012
1012
  if (fullUser) {
1013
1013
  setDehydratedUser(fullUser.dehydrate());
1014
1014
  setUser(fullUser);
1015
+ await getTokenHandler()?.updateToken({
1016
+ userId: fullUser.id,
1017
+ companyId: fullUser.company?.id,
1018
+ roles: fullUser.roles.map((role) => role.id),
1019
+ features: fullUser.company?.features?.map((feature) => feature.id) ?? [],
1020
+ modules: fullUser.modules.map((module) => ({
1021
+ id: module.id,
1022
+ permissions: module.permissions
1023
+ }))
1024
+ });
1015
1025
  }
1016
1026
  } catch (error) {
1017
1027
  console.error("Failed to refresh user data:", error);
@@ -11155,7 +11165,7 @@ __name(AllowedUsersDetails, "AllowedUsersDetails");
11155
11165
  import dynamic from "next/dynamic";
11156
11166
  import React15 from "react";
11157
11167
  import { jsx as jsx123 } from "react/jsx-runtime";
11158
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-UTZ7F23J.mjs"), {
11168
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-DFHJWZZB.mjs"), {
11159
11169
  ssr: false
11160
11170
  });
11161
11171
  var BlockNoteEditorContainer = React15.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -15224,4 +15234,4 @@ export {
15224
15234
  useOAuthClients,
15225
15235
  useOAuthClient
15226
15236
  };
15227
- //# sourceMappingURL=chunk-53WT73E6.mjs.map
15237
+ //# sourceMappingURL=chunk-GFRODCD7.mjs.map