@thunderid/nextjs 1.13.0 → 1.14.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/cjs/client/components/account/OrganizationUnitSwitcher/OrganizationUnitSwitcher.cjs +116 -0
- package/dist/cjs/client/components/account/OrganizationUnitSwitcher/OrganizationUnitSwitcher.cjs.map +1 -0
- package/dist/cjs/client/components/auth/SignIn/SignIn.cjs +3 -2
- package/dist/cjs/client/components/auth/SignIn/SignIn.cjs.map +1 -1
- package/dist/cjs/client/components/{admin → management}/AgentCreate/AgentCreate.cjs +1 -1
- package/dist/cjs/client/components/management/AgentCreate/AgentCreate.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/AgentDetails/AgentDetails.cjs +1 -1
- package/dist/cjs/client/components/management/AgentDetails/AgentDetails.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/AgentList/AgentList.cjs +1 -1
- package/dist/cjs/client/components/management/AgentList/AgentList.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/ApplicationCreate/ApplicationCreate.cjs +1 -1
- package/dist/cjs/client/components/management/ApplicationCreate/ApplicationCreate.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/ApplicationDetails/ApplicationDetails.cjs +1 -1
- package/dist/cjs/client/components/management/ApplicationDetails/ApplicationDetails.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/ApplicationList/ApplicationList.cjs +1 -1
- package/dist/cjs/client/components/management/ApplicationList/ApplicationList.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/GroupCreate/GroupCreate.cjs +1 -1
- package/dist/cjs/client/components/management/GroupCreate/GroupCreate.cjs.map +1 -0
- package/dist/cjs/client/components/management/GroupDetails/GroupDetails.cjs +28 -0
- package/dist/cjs/client/components/management/GroupDetails/GroupDetails.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/GroupList/GroupList.cjs +1 -1
- package/dist/cjs/client/components/management/GroupList/GroupList.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/GroupMembers/GroupMembers.cjs +1 -1
- package/dist/cjs/client/components/management/GroupMembers/GroupMembers.cjs.map +1 -0
- package/dist/cjs/client/components/management/OrganizationUnitCreate/OrganizationUnitCreate.cjs +28 -0
- package/dist/cjs/client/components/management/OrganizationUnitCreate/OrganizationUnitCreate.cjs.map +1 -0
- package/dist/cjs/client/components/management/OrganizationUnitDetails/OrganizationUnitDetails.cjs +28 -0
- package/dist/cjs/client/components/management/OrganizationUnitDetails/OrganizationUnitDetails.cjs.map +1 -0
- package/dist/cjs/client/components/management/OrganizationUnitList/OrganizationUnitList.cjs +28 -0
- package/dist/cjs/client/components/management/OrganizationUnitList/OrganizationUnitList.cjs.map +1 -0
- package/dist/cjs/client/components/management/ProjectCreate/ProjectCreate.cjs +28 -0
- package/dist/cjs/client/components/management/ProjectCreate/ProjectCreate.cjs.map +1 -0
- package/dist/cjs/client/components/management/ProjectDetails/ProjectDetails.cjs +28 -0
- package/dist/cjs/client/components/management/ProjectDetails/ProjectDetails.cjs.map +1 -0
- package/dist/cjs/client/components/management/ProjectList/ProjectList.cjs +28 -0
- package/dist/cjs/client/components/management/ProjectList/ProjectList.cjs.map +1 -0
- package/dist/cjs/client/components/management/ProjectSwitcher/ProjectSwitcher.cjs +30 -0
- package/dist/cjs/client/components/management/ProjectSwitcher/ProjectSwitcher.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/RoleAssignments/RoleAssignments.cjs +1 -1
- package/dist/cjs/client/components/management/RoleAssignments/RoleAssignments.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/RoleCreate/RoleCreate.cjs +1 -1
- package/dist/cjs/client/components/management/RoleCreate/RoleCreate.cjs.map +1 -0
- package/dist/cjs/client/components/management/RoleDetails/RoleDetails.cjs +28 -0
- package/dist/cjs/client/components/management/RoleDetails/RoleDetails.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/RoleList/RoleList.cjs +1 -1
- package/dist/cjs/client/components/management/RoleList/RoleList.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/RolePermissions/RolePermissions.cjs +1 -1
- package/dist/cjs/client/components/management/RolePermissions/RolePermissions.cjs.map +1 -0
- package/dist/cjs/client/components/management/SharingPolicies/SharingPolicies.cjs +28 -0
- package/dist/cjs/client/components/management/SharingPolicies/SharingPolicies.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/UserCreate/UserCreate.cjs +1 -1
- package/dist/cjs/client/components/management/UserCreate/UserCreate.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/UserDetails/UserDetails.cjs +1 -1
- package/dist/cjs/client/components/management/UserDetails/UserDetails.cjs.map +1 -0
- package/dist/cjs/client/components/{admin → management}/UserList/UserList.cjs +1 -1
- package/dist/cjs/client/components/management/UserList/UserList.cjs.map +1 -0
- package/dist/cjs/client/contexts/ThunderID/ThunderIDProvider.cjs +53 -2
- package/dist/cjs/client/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
- package/dist/cjs/client/index.cjs +28 -17
- package/dist/cjs/index.cjs +98 -16
- package/dist/cjs/server/actions/account/getAccessibleOrganizationUnitsAction.cjs +53 -0
- package/dist/cjs/server/actions/account/getAccessibleOrganizationUnitsAction.cjs.map +1 -0
- package/dist/cjs/server/actions/account/getCurrentOrganizationUnitAction.cjs +31 -0
- package/dist/cjs/server/actions/account/getCurrentOrganizationUnitAction.cjs.map +1 -0
- package/dist/cjs/server/actions/auth/switchOrganizationUnitAction.cjs +85 -0
- package/dist/cjs/server/actions/auth/switchOrganizationUnitAction.cjs.map +1 -0
- package/dist/cjs/server/thunderid.cjs +16 -0
- package/dist/cjs/server/thunderid.cjs.map +1 -1
- package/dist/client/components/account/OrganizationUnitSwitcher/OrganizationUnitSwitcher.d.ts +24 -0
- package/dist/client/components/account/OrganizationUnitSwitcher/OrganizationUnitSwitcher.d.ts.map +1 -0
- package/dist/client/components/account/OrganizationUnitSwitcher/OrganizationUnitSwitcher.js +112 -0
- package/dist/client/components/account/OrganizationUnitSwitcher/OrganizationUnitSwitcher.js.map +1 -0
- package/dist/client/components/auth/SignIn/SignIn.d.ts +7 -1
- package/dist/client/components/auth/SignIn/SignIn.d.ts.map +1 -1
- package/dist/client/components/auth/SignIn/SignIn.js +3 -2
- package/dist/client/components/auth/SignIn/SignIn.js.map +1 -1
- package/dist/client/components/management/AgentCreate/AgentCreate.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/AgentCreate/AgentCreate.js +1 -1
- package/dist/client/components/management/AgentCreate/AgentCreate.js.map +1 -0
- package/dist/client/components/management/AgentDetails/AgentDetails.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/AgentDetails/AgentDetails.js +1 -1
- package/dist/client/components/management/AgentDetails/AgentDetails.js.map +1 -0
- package/dist/client/components/management/AgentList/AgentList.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/AgentList/AgentList.js +1 -1
- package/dist/client/components/management/AgentList/AgentList.js.map +1 -0
- package/dist/client/components/management/ApplicationCreate/ApplicationCreate.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/ApplicationCreate/ApplicationCreate.js +1 -1
- package/dist/client/components/management/ApplicationCreate/ApplicationCreate.js.map +1 -0
- package/dist/client/components/management/ApplicationDetails/ApplicationDetails.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/ApplicationDetails/ApplicationDetails.js +1 -1
- package/dist/client/components/management/ApplicationDetails/ApplicationDetails.js.map +1 -0
- package/dist/client/components/management/ApplicationList/ApplicationList.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/ApplicationList/ApplicationList.js +1 -1
- package/dist/client/components/management/ApplicationList/ApplicationList.js.map +1 -0
- package/dist/client/components/management/GroupCreate/GroupCreate.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/GroupCreate/GroupCreate.js +1 -1
- package/dist/client/components/management/GroupCreate/GroupCreate.js.map +1 -0
- package/dist/client/components/management/GroupDetails/GroupDetails.d.ts +17 -0
- package/dist/client/components/management/GroupDetails/GroupDetails.d.ts.map +1 -0
- package/dist/client/components/management/GroupDetails/GroupDetails.js +25 -0
- package/dist/client/components/management/GroupDetails/GroupDetails.js.map +1 -0
- package/dist/client/components/management/GroupList/GroupList.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/GroupList/GroupList.js +1 -1
- package/dist/client/components/management/GroupList/GroupList.js.map +1 -0
- package/dist/client/components/management/GroupMembers/GroupMembers.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/GroupMembers/GroupMembers.js +1 -1
- package/dist/client/components/management/GroupMembers/GroupMembers.js.map +1 -0
- package/dist/client/components/management/OrganizationUnitCreate/OrganizationUnitCreate.d.ts +17 -0
- package/dist/client/components/management/OrganizationUnitCreate/OrganizationUnitCreate.d.ts.map +1 -0
- package/dist/client/components/management/OrganizationUnitCreate/OrganizationUnitCreate.js +25 -0
- package/dist/client/components/management/OrganizationUnitCreate/OrganizationUnitCreate.js.map +1 -0
- package/dist/client/components/management/OrganizationUnitDetails/OrganizationUnitDetails.d.ts +17 -0
- package/dist/client/components/management/OrganizationUnitDetails/OrganizationUnitDetails.d.ts.map +1 -0
- package/dist/client/components/management/OrganizationUnitDetails/OrganizationUnitDetails.js +25 -0
- package/dist/client/components/management/OrganizationUnitDetails/OrganizationUnitDetails.js.map +1 -0
- package/dist/client/components/management/OrganizationUnitList/OrganizationUnitList.d.ts +17 -0
- package/dist/client/components/management/OrganizationUnitList/OrganizationUnitList.d.ts.map +1 -0
- package/dist/client/components/management/OrganizationUnitList/OrganizationUnitList.js +25 -0
- package/dist/client/components/management/OrganizationUnitList/OrganizationUnitList.js.map +1 -0
- package/dist/client/components/management/ProjectCreate/ProjectCreate.d.ts +17 -0
- package/dist/client/components/management/ProjectCreate/ProjectCreate.d.ts.map +1 -0
- package/dist/client/components/management/ProjectCreate/ProjectCreate.js +25 -0
- package/dist/client/components/management/ProjectCreate/ProjectCreate.js.map +1 -0
- package/dist/client/components/management/ProjectDetails/ProjectDetails.d.ts +17 -0
- package/dist/client/components/management/ProjectDetails/ProjectDetails.d.ts.map +1 -0
- package/dist/client/components/management/ProjectDetails/ProjectDetails.js +25 -0
- package/dist/client/components/management/ProjectDetails/ProjectDetails.js.map +1 -0
- package/dist/client/components/management/ProjectList/ProjectList.d.ts +17 -0
- package/dist/client/components/management/ProjectList/ProjectList.d.ts.map +1 -0
- package/dist/client/components/management/ProjectList/ProjectList.js +25 -0
- package/dist/client/components/management/ProjectList/ProjectList.js.map +1 -0
- package/dist/client/components/management/ProjectSwitcher/ProjectSwitcher.d.ts +19 -0
- package/dist/client/components/management/ProjectSwitcher/ProjectSwitcher.d.ts.map +1 -0
- package/dist/client/components/management/ProjectSwitcher/ProjectSwitcher.js +27 -0
- package/dist/client/components/management/ProjectSwitcher/ProjectSwitcher.js.map +1 -0
- package/dist/client/components/management/RoleAssignments/RoleAssignments.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/RoleAssignments/RoleAssignments.js +1 -1
- package/dist/client/components/management/RoleAssignments/RoleAssignments.js.map +1 -0
- package/dist/client/components/management/RoleCreate/RoleCreate.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/RoleCreate/RoleCreate.js +1 -1
- package/dist/client/components/management/RoleCreate/RoleCreate.js.map +1 -0
- package/dist/client/components/management/RoleDetails/RoleDetails.d.ts +17 -0
- package/dist/client/components/management/RoleDetails/RoleDetails.d.ts.map +1 -0
- package/dist/client/components/management/RoleDetails/RoleDetails.js +25 -0
- package/dist/client/components/management/RoleDetails/RoleDetails.js.map +1 -0
- package/dist/client/components/management/RoleList/RoleList.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/RoleList/RoleList.js +1 -1
- package/dist/client/components/management/RoleList/RoleList.js.map +1 -0
- package/dist/client/components/management/RolePermissions/RolePermissions.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/RolePermissions/RolePermissions.js +1 -1
- package/dist/client/components/management/RolePermissions/RolePermissions.js.map +1 -0
- package/dist/client/components/management/SharingPolicies/SharingPolicies.d.ts +17 -0
- package/dist/client/components/management/SharingPolicies/SharingPolicies.d.ts.map +1 -0
- package/dist/client/components/management/SharingPolicies/SharingPolicies.js +25 -0
- package/dist/client/components/management/SharingPolicies/SharingPolicies.js.map +1 -0
- package/dist/client/components/management/UserCreate/UserCreate.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/UserCreate/UserCreate.js +1 -1
- package/dist/client/components/management/UserCreate/UserCreate.js.map +1 -0
- package/dist/client/components/management/UserDetails/UserDetails.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/UserDetails/UserDetails.js +1 -1
- package/dist/client/components/management/UserDetails/UserDetails.js.map +1 -0
- package/dist/client/components/management/UserList/UserList.d.ts.map +1 -0
- package/dist/client/components/{admin → management}/UserList/UserList.js +1 -1
- package/dist/client/components/management/UserList/UserList.js.map +1 -0
- package/dist/client/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
- package/dist/client/contexts/ThunderID/ThunderIDProvider.js +55 -4
- package/dist/client/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
- package/dist/client/index.d.ts +55 -33
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +28 -17
- package/dist/client/management.d.ts +3 -0
- package/dist/client/management.d.ts.map +1 -0
- package/dist/client/management.js +6 -0
- package/dist/index.js +29 -18
- package/dist/server/actions/account/getAccessibleOrganizationUnitsAction.d.ts +20 -0
- package/dist/server/actions/account/getAccessibleOrganizationUnitsAction.d.ts.map +1 -0
- package/dist/server/actions/account/getAccessibleOrganizationUnitsAction.js +51 -0
- package/dist/server/actions/account/getAccessibleOrganizationUnitsAction.js.map +1 -0
- package/dist/server/actions/account/getCurrentOrganizationUnitAction.d.ts +10 -0
- package/dist/server/actions/account/getCurrentOrganizationUnitAction.d.ts.map +1 -0
- package/dist/server/actions/account/getCurrentOrganizationUnitAction.js +28 -0
- package/dist/server/actions/account/getCurrentOrganizationUnitAction.js.map +1 -0
- package/dist/server/actions/auth/switchOrganizationUnitAction.d.ts +30 -0
- package/dist/server/actions/auth/switchOrganizationUnitAction.d.ts.map +1 -0
- package/dist/server/actions/auth/switchOrganizationUnitAction.js +82 -0
- package/dist/server/actions/auth/switchOrganizationUnitAction.js.map +1 -0
- package/dist/server/thunderid.d.ts +2 -1
- package/dist/server/thunderid.d.ts.map +1 -1
- package/dist/server/thunderid.js +14 -0
- package/dist/server/thunderid.js.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/client/components/admin/AgentCreate/AgentCreate.cjs.map +0 -1
- package/dist/cjs/client/components/admin/AgentDetails/AgentDetails.cjs.map +0 -1
- package/dist/cjs/client/components/admin/AgentList/AgentList.cjs.map +0 -1
- package/dist/cjs/client/components/admin/ApplicationCreate/ApplicationCreate.cjs.map +0 -1
- package/dist/cjs/client/components/admin/ApplicationDetails/ApplicationDetails.cjs.map +0 -1
- package/dist/cjs/client/components/admin/ApplicationList/ApplicationList.cjs.map +0 -1
- package/dist/cjs/client/components/admin/GroupCreate/GroupCreate.cjs.map +0 -1
- package/dist/cjs/client/components/admin/GroupList/GroupList.cjs.map +0 -1
- package/dist/cjs/client/components/admin/GroupMembers/GroupMembers.cjs.map +0 -1
- package/dist/cjs/client/components/admin/RoleAssignments/RoleAssignments.cjs.map +0 -1
- package/dist/cjs/client/components/admin/RoleCreate/RoleCreate.cjs.map +0 -1
- package/dist/cjs/client/components/admin/RoleList/RoleList.cjs.map +0 -1
- package/dist/cjs/client/components/admin/RolePermissions/RolePermissions.cjs.map +0 -1
- package/dist/cjs/client/components/admin/UserCreate/UserCreate.cjs.map +0 -1
- package/dist/cjs/client/components/admin/UserDetails/UserDetails.cjs.map +0 -1
- package/dist/cjs/client/components/admin/UserList/UserList.cjs.map +0 -1
- package/dist/client/admin.d.ts +0 -3
- package/dist/client/admin.d.ts.map +0 -1
- package/dist/client/admin.js +0 -6
- package/dist/client/components/admin/AgentCreate/AgentCreate.d.ts.map +0 -1
- package/dist/client/components/admin/AgentCreate/AgentCreate.js.map +0 -1
- package/dist/client/components/admin/AgentDetails/AgentDetails.d.ts.map +0 -1
- package/dist/client/components/admin/AgentDetails/AgentDetails.js.map +0 -1
- package/dist/client/components/admin/AgentList/AgentList.d.ts.map +0 -1
- package/dist/client/components/admin/AgentList/AgentList.js.map +0 -1
- package/dist/client/components/admin/ApplicationCreate/ApplicationCreate.d.ts.map +0 -1
- package/dist/client/components/admin/ApplicationCreate/ApplicationCreate.js.map +0 -1
- package/dist/client/components/admin/ApplicationDetails/ApplicationDetails.d.ts.map +0 -1
- package/dist/client/components/admin/ApplicationDetails/ApplicationDetails.js.map +0 -1
- package/dist/client/components/admin/ApplicationList/ApplicationList.d.ts.map +0 -1
- package/dist/client/components/admin/ApplicationList/ApplicationList.js.map +0 -1
- package/dist/client/components/admin/GroupCreate/GroupCreate.d.ts.map +0 -1
- package/dist/client/components/admin/GroupCreate/GroupCreate.js.map +0 -1
- package/dist/client/components/admin/GroupList/GroupList.d.ts.map +0 -1
- package/dist/client/components/admin/GroupList/GroupList.js.map +0 -1
- package/dist/client/components/admin/GroupMembers/GroupMembers.d.ts.map +0 -1
- package/dist/client/components/admin/GroupMembers/GroupMembers.js.map +0 -1
- package/dist/client/components/admin/RoleAssignments/RoleAssignments.d.ts.map +0 -1
- package/dist/client/components/admin/RoleAssignments/RoleAssignments.js.map +0 -1
- package/dist/client/components/admin/RoleCreate/RoleCreate.d.ts.map +0 -1
- package/dist/client/components/admin/RoleCreate/RoleCreate.js.map +0 -1
- package/dist/client/components/admin/RoleList/RoleList.d.ts.map +0 -1
- package/dist/client/components/admin/RoleList/RoleList.js.map +0 -1
- package/dist/client/components/admin/RolePermissions/RolePermissions.d.ts.map +0 -1
- package/dist/client/components/admin/RolePermissions/RolePermissions.js.map +0 -1
- package/dist/client/components/admin/UserCreate/UserCreate.d.ts.map +0 -1
- package/dist/client/components/admin/UserCreate/UserCreate.js.map +0 -1
- package/dist/client/components/admin/UserDetails/UserDetails.d.ts.map +0 -1
- package/dist/client/components/admin/UserDetails/UserDetails.js.map +0 -1
- package/dist/client/components/admin/UserList/UserList.d.ts.map +0 -1
- package/dist/client/components/admin/UserList/UserList.js.map +0 -1
- /package/dist/cjs/client/{admin.cjs → management.cjs} +0 -0
- /package/dist/client/components/{admin → management}/AgentCreate/AgentCreate.d.ts +0 -0
- /package/dist/client/components/{admin → management}/AgentDetails/AgentDetails.d.ts +0 -0
- /package/dist/client/components/{admin → management}/AgentList/AgentList.d.ts +0 -0
- /package/dist/client/components/{admin → management}/ApplicationCreate/ApplicationCreate.d.ts +0 -0
- /package/dist/client/components/{admin → management}/ApplicationDetails/ApplicationDetails.d.ts +0 -0
- /package/dist/client/components/{admin → management}/ApplicationList/ApplicationList.d.ts +0 -0
- /package/dist/client/components/{admin → management}/GroupCreate/GroupCreate.d.ts +0 -0
- /package/dist/client/components/{admin → management}/GroupList/GroupList.d.ts +0 -0
- /package/dist/client/components/{admin → management}/GroupMembers/GroupMembers.d.ts +0 -0
- /package/dist/client/components/{admin → management}/RoleAssignments/RoleAssignments.d.ts +0 -0
- /package/dist/client/components/{admin → management}/RoleCreate/RoleCreate.d.ts +0 -0
- /package/dist/client/components/{admin → management}/RoleList/RoleList.d.ts +0 -0
- /package/dist/client/components/{admin → management}/RolePermissions/RolePermissions.d.ts +0 -0
- /package/dist/client/components/{admin → management}/UserCreate/UserCreate.d.ts +0 -0
- /package/dist/client/components/{admin → management}/UserDetails/UserDetails.d.ts +0 -0
- /package/dist/client/components/{admin → management}/UserList/UserList.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectList.js","names":["ProjectList: FC<ProjectListProps>","ReactProjectList","ProjectList"],"sources":["../../../../../src/client/components/management/ProjectList/ProjectList.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {ProjectList as ReactProjectList, ProjectListProps as ReactProjectListProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type ProjectListProps = ReactProjectListProps;\n\n/**\n * Lists the projects, a page at a time. Projects are served by the control plane only.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <ProjectList onSelect={(project) => router.push(`/admin/projects/${project.id}`)} />\n * ```\n */\nconst ProjectList: FC<ProjectListProps> = (props: ProjectListProps): ReactElement => <ReactProjectList {...props} />;\n\nProjectList.displayName = 'ProjectList';\n\nexport default ProjectList;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,iBAAqC,UAA0C,oBAACC,eAAiB,GAAI,QAAS;AAEpH,cAAY,cAAc;AAE1B,0BAAeC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ProjectSwitcherProps as ReactProjectSwitcherProps } from '@thunderid/react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export type ProjectSwitcherProps = ReactProjectSwitcherProps;
|
|
4
|
+
/**
|
|
5
|
+
* Lets the user choose the current project. The choice is client-side context kept in the browser, not a sign-in: `useThunderID()` exposes it as `currentProject`.
|
|
6
|
+
* `ApplicationList` and `AgentList` list the current project, and `ApplicationCreate` and `AgentCreate` place new
|
|
7
|
+
* resources in it when no organization unit is given.
|
|
8
|
+
*
|
|
9
|
+
* Management requests go through a server action with the signed-in user's server-held session, so
|
|
10
|
+
* the access token never reaches the browser. Whether a request succeeds is the server's decision.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ProjectSwitcher onSelect={(project) => router.refresh()} />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare const ProjectSwitcher: FC<ProjectSwitcherProps>;
|
|
18
|
+
export default ProjectSwitcher;
|
|
19
|
+
//# sourceMappingURL=ProjectSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSwitcher.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/ProjectSwitcher/ProjectSwitcher.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,oBAAoB,IAAI,yBAAyB,EAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAE7C,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { ProjectSwitcher } from "@thunderid/react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/components/management/ProjectSwitcher/ProjectSwitcher.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Lets the user choose the current project. The choice is client-side context kept in the browser, not a sign-in: `useThunderID()` exposes it as `currentProject`.
|
|
10
|
+
* `ApplicationList` and `AgentList` list the current project, and `ApplicationCreate` and `AgentCreate` place new
|
|
11
|
+
* resources in it when no organization unit is given.
|
|
12
|
+
*
|
|
13
|
+
* Management requests go through a server action with the signed-in user's server-held session, so
|
|
14
|
+
* the access token never reaches the browser. Whether a request succeeds is the server's decision.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <ProjectSwitcher onSelect={(project) => router.refresh()} />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
const ProjectSwitcher$1 = (props) => /* @__PURE__ */ jsx(ProjectSwitcher, { ...props });
|
|
22
|
+
ProjectSwitcher$1.displayName = "ProjectSwitcher";
|
|
23
|
+
var ProjectSwitcher_default = ProjectSwitcher$1;
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ProjectSwitcher_default as default };
|
|
27
|
+
//# sourceMappingURL=ProjectSwitcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectSwitcher.js","names":["ProjectSwitcher: FC<ProjectSwitcherProps>","ReactProjectSwitcher","ProjectSwitcher"],"sources":["../../../../../src/client/components/management/ProjectSwitcher/ProjectSwitcher.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {\n ProjectSwitcher as ReactProjectSwitcher,\n ProjectSwitcherProps as ReactProjectSwitcherProps,\n} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type ProjectSwitcherProps = ReactProjectSwitcherProps;\n\n/**\n * Lets the user choose the current project. The choice is client-side context kept in the browser, not a sign-in: `useThunderID()` exposes it as `currentProject`.\n * `ApplicationList` and `AgentList` list the current project, and `ApplicationCreate` and `AgentCreate` place new\n * resources in it when no organization unit is given.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <ProjectSwitcher onSelect={(project) => router.refresh()} />\n * ```\n */\nconst ProjectSwitcher: FC<ProjectSwitcherProps> = (props: ProjectSwitcherProps): ReactElement => (\n <ReactProjectSwitcher {...props} />\n);\n\nProjectSwitcher.displayName = 'ProjectSwitcher';\n\nexport default ProjectSwitcher;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,qBAA6C,UACjD,oBAACC,mBAAqB,GAAI,QAAS;AAGrC,kBAAgB,cAAc;AAE9B,8BAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleAssignments.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/RoleAssignments/RoleAssignments.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,oBAAoB,IAAI,yBAAyB,EAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAE7C,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { RoleAssignments } from "@thunderid/react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
//#region src/client/components/
|
|
7
|
+
//#region src/client/components/management/RoleAssignments/RoleAssignments.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Lists a role's assignments and assigns or unassigns users, groups and agents.
|
|
10
10
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleAssignments.js","names":["RoleAssignments: FC<RoleAssignmentsProps>","ReactRoleAssignments","RoleAssignments"],"sources":["../../../../../src/client/components/management/RoleAssignments/RoleAssignments.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {\n RoleAssignments as ReactRoleAssignments,\n RoleAssignmentsProps as ReactRoleAssignmentsProps,\n} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type RoleAssignmentsProps = ReactRoleAssignmentsProps;\n\n/**\n * Lists a role's assignments and assigns or unassigns users, groups and agents.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <RoleAssignments roleId={id} />\n * ```\n */\nconst RoleAssignments: FC<RoleAssignmentsProps> = (props: RoleAssignmentsProps): ReactElement => (\n <ReactRoleAssignments {...props} />\n);\n\nRoleAssignments.displayName = 'RoleAssignments';\n\nexport default RoleAssignments;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,MAAMA,qBAA6C,UACjD,oBAACC,mBAAqB,GAAI,QAAS;AAGrC,kBAAgB,cAAc;AAE9B,8BAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleCreate.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/RoleCreate/RoleCreate.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgC,eAAe,IAAI,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAA4E,CAAC;AAIjH,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleCreate.js","names":["RoleCreate: FC<RoleCreateProps>","ReactRoleCreate","RoleCreate"],"sources":["../../../../../src/client/components/management/RoleCreate/RoleCreate.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {RoleCreate as ReactRoleCreate, RoleCreateProps as ReactRoleCreateProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type RoleCreateProps = ReactRoleCreateProps;\n\n/**\n * Creates a role.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <RoleCreate onCreated={(role) => router.push(`/admin/roles/${role.id}`)} />\n * ```\n */\nconst RoleCreate: FC<RoleCreateProps> = (props: RoleCreateProps): ReactElement => <ReactRoleCreate {...props} />;\n\nRoleCreate.displayName = 'RoleCreate';\n\nexport default RoleCreate;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,gBAAmC,UAAyC,oBAACC,cAAgB,GAAI,QAAS;AAEhH,aAAW,cAAc;AAEzB,yBAAeC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RoleDetailsProps as ReactRoleDetailsProps } from '@thunderid/react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export type RoleDetailsProps = ReactRoleDetailsProps;
|
|
4
|
+
/**
|
|
5
|
+
* Shows a role with its permissions and assignments, and optionally manages the assignments and deletes the role.
|
|
6
|
+
*
|
|
7
|
+
* Management requests go through a server action with the signed-in user's server-held session, so
|
|
8
|
+
* the access token never reaches the browser. Whether a request succeeds is the server's decision.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <RoleDetails roleId={id} editable deletable onDeleted={() => router.push('/admin/roles')} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare const RoleDetails: FC<RoleDetailsProps>;
|
|
16
|
+
export default RoleDetails;
|
|
17
|
+
//# sourceMappingURL=RoleDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleDetails.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/RoleDetails/RoleDetails.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkC,gBAAgB,IAAI,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAC5G,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAErD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAA8E,CAAC;AAIrH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { RoleDetails } from "@thunderid/react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/components/management/RoleDetails/RoleDetails.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Shows a role with its permissions and assignments, and optionally manages the assignments and deletes the role.
|
|
10
|
+
*
|
|
11
|
+
* Management requests go through a server action with the signed-in user's server-held session, so
|
|
12
|
+
* the access token never reaches the browser. Whether a request succeeds is the server's decision.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <RoleDetails roleId={id} editable deletable onDeleted={() => router.push('/admin/roles')} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
const RoleDetails$1 = (props) => /* @__PURE__ */ jsx(RoleDetails, { ...props });
|
|
20
|
+
RoleDetails$1.displayName = "RoleDetails";
|
|
21
|
+
var RoleDetails_default = RoleDetails$1;
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { RoleDetails_default as default };
|
|
25
|
+
//# sourceMappingURL=RoleDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleDetails.js","names":["RoleDetails: FC<RoleDetailsProps>","ReactRoleDetails","RoleDetails"],"sources":["../../../../../src/client/components/management/RoleDetails/RoleDetails.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {RoleDetails as ReactRoleDetails, RoleDetailsProps as ReactRoleDetailsProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type RoleDetailsProps = ReactRoleDetailsProps;\n\n/**\n * Shows a role with its permissions and assignments, and optionally manages the assignments and deletes the role.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <RoleDetails roleId={id} editable deletable onDeleted={() => router.push('/admin/roles')} />\n * ```\n */\nconst RoleDetails: FC<RoleDetailsProps> = (props: RoleDetailsProps): ReactElement => <ReactRoleDetails {...props} />;\n\nRoleDetails.displayName = 'RoleDetails';\n\nexport default RoleDetails;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,iBAAqC,UAA0C,oBAACC,eAAiB,GAAI,QAAS;AAEpH,cAAY,cAAc;AAE1B,0BAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleList.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/RoleList/RoleList.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA4B,aAAa,IAAI,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAwE,CAAC;AAIzG,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoleList.js","names":["RoleList: FC<RoleListProps>","ReactRoleList","RoleList"],"sources":["../../../../../src/client/components/management/RoleList/RoleList.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {RoleList as ReactRoleList, RoleListProps as ReactRoleListProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type RoleListProps = ReactRoleListProps;\n\n/**\n * Lists roles, a page at a time.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <RoleList onSelect={(role) => router.push(`/admin/roles/${role.id}`)} />\n * ```\n */\nconst RoleList: FC<RoleListProps> = (props: RoleListProps): ReactElement => <ReactRoleList {...props} />;\n\nRoleList.displayName = 'RoleList';\n\nexport default RoleList;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,cAA+B,UAAuC,oBAACC,YAAc,GAAI,QAAS;AAExG,WAAS,cAAc;AAEvB,uBAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RolePermissions.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/RolePermissions/RolePermissions.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,oBAAoB,IAAI,yBAAyB,EAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAE7C,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { RolePermissions } from "@thunderid/react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
//#region src/client/components/
|
|
7
|
+
//#region src/client/components/management/RolePermissions/RolePermissions.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Shows the permissions a role grants.
|
|
10
10
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RolePermissions.js","names":["RolePermissions: FC<RolePermissionsProps>","ReactRolePermissions","RolePermissions"],"sources":["../../../../../src/client/components/management/RolePermissions/RolePermissions.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {\n RolePermissions as ReactRolePermissions,\n RolePermissionsProps as ReactRolePermissionsProps,\n} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type RolePermissionsProps = ReactRolePermissionsProps;\n\n/**\n * Shows the permissions a role grants.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <RolePermissions roleId={id} />\n * ```\n */\nconst RolePermissions: FC<RolePermissionsProps> = (props: RolePermissionsProps): ReactElement => (\n <ReactRolePermissions {...props} />\n);\n\nRolePermissions.displayName = 'RolePermissions';\n\nexport default RolePermissions;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,MAAMA,qBAA6C,UACjD,oBAACC,mBAAqB,GAAI,QAAS;AAGrC,kBAAgB,cAAc;AAE9B,8BAAeC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SharingPoliciesProps as ReactSharingPoliciesProps } from '@thunderid/react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export type SharingPoliciesProps = ReactSharingPoliciesProps;
|
|
4
|
+
/**
|
|
5
|
+
* Lists the sharing policies of a user, an application, a role or a flow, and lets the signed-in user manage them when `editable`.
|
|
6
|
+
*
|
|
7
|
+
* Management requests go through a server action with the signed-in user's server-held session, so
|
|
8
|
+
* the access token never reaches the browser. Whether a request succeeds is the server's decision.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <SharingPolicies resourceType="role" resourceId={roleId} editable />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare const SharingPolicies: FC<SharingPoliciesProps>;
|
|
16
|
+
export default SharingPolicies;
|
|
17
|
+
//# sourceMappingURL=SharingPolicies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharingPolicies.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/SharingPolicies/SharingPolicies.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,oBAAoB,IAAI,yBAAyB,EAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAE7C,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { SharingPolicies } from "@thunderid/react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/client/components/management/SharingPolicies/SharingPolicies.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Lists the sharing policies of a user, an application, a role or a flow, and lets the signed-in user manage them when `editable`.
|
|
10
|
+
*
|
|
11
|
+
* Management requests go through a server action with the signed-in user's server-held session, so
|
|
12
|
+
* the access token never reaches the browser. Whether a request succeeds is the server's decision.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SharingPolicies resourceType="role" resourceId={roleId} editable />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
const SharingPolicies$1 = (props) => /* @__PURE__ */ jsx(SharingPolicies, { ...props });
|
|
20
|
+
SharingPolicies$1.displayName = "SharingPolicies";
|
|
21
|
+
var SharingPolicies_default = SharingPolicies$1;
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { SharingPolicies_default as default };
|
|
25
|
+
//# sourceMappingURL=SharingPolicies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharingPolicies.js","names":["SharingPolicies: FC<SharingPoliciesProps>","ReactSharingPolicies","SharingPolicies"],"sources":["../../../../../src/client/components/management/SharingPolicies/SharingPolicies.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {\n SharingPolicies as ReactSharingPolicies,\n SharingPoliciesProps as ReactSharingPoliciesProps,\n} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type SharingPoliciesProps = ReactSharingPoliciesProps;\n\n/**\n * Lists the sharing policies of a user, an application, a role or a flow, and lets the signed-in user manage them when `editable`.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <SharingPolicies resourceType=\"role\" resourceId={roleId} editable />\n * ```\n */\nconst SharingPolicies: FC<SharingPoliciesProps> = (props: SharingPoliciesProps): ReactElement => (\n <ReactSharingPolicies {...props} />\n);\n\nSharingPolicies.displayName = 'SharingPolicies';\n\nexport default SharingPolicies;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,MAAMA,qBAA6C,UACjD,oBAACC,mBAAqB,GAAI,QAAS;AAGrC,kBAAgB,cAAc;AAE9B,8BAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCreate.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/UserCreate/UserCreate.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgC,eAAe,IAAI,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAA4E,CAAC;AAIjH,eAAe,UAAU,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { UserCreate } from "@thunderid/react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
//#region src/client/components/
|
|
7
|
+
//#region src/client/components/management/UserCreate/UserCreate.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Creates a user, or invites one with `mode="invite"`.
|
|
10
10
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCreate.js","names":["UserCreate: FC<UserCreateProps>","ReactUserCreate","UserCreate"],"sources":["../../../../../src/client/components/management/UserCreate/UserCreate.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {UserCreate as ReactUserCreate, UserCreateProps as ReactUserCreateProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type UserCreateProps = ReactUserCreateProps;\n\n/**\n * Creates a user, or invites one with `mode=\"invite\"`.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <UserCreate onCreated={(user) => router.push(`/admin/users/${user.id}`)} />\n * ```\n */\nconst UserCreate: FC<UserCreateProps> = (props: UserCreateProps): ReactElement => <ReactUserCreate {...props} />;\n\nUserCreate.displayName = 'UserCreate';\n\nexport default UserCreate;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,gBAAmC,UAAyC,oBAACC,cAAgB,GAAI,QAAS;AAEhH,aAAW,cAAc;AAEzB,yBAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserDetails.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/UserDetails/UserDetails.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkC,gBAAgB,IAAI,qBAAqB,EAAC,MAAM,kBAAkB,CAAC;AAC5G,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAErD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAA8E,CAAC;AAIrH,eAAe,WAAW,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { UserDetails } from "@thunderid/react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
//#region src/client/components/
|
|
7
|
+
//#region src/client/components/management/UserDetails/UserDetails.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Shows a user's attributes and groups, and optionally edits or deletes the user.
|
|
10
10
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserDetails.js","names":["UserDetails: FC<UserDetailsProps>","ReactUserDetails","UserDetails"],"sources":["../../../../../src/client/components/management/UserDetails/UserDetails.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {UserDetails as ReactUserDetails, UserDetailsProps as ReactUserDetailsProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type UserDetailsProps = ReactUserDetailsProps;\n\n/**\n * Shows a user's attributes and groups, and optionally edits or deletes the user.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <UserDetails userId={id} editable deletable onDeleted={() => router.push('/admin/users')} />\n * ```\n */\nconst UserDetails: FC<UserDetailsProps> = (props: UserDetailsProps): ReactElement => <ReactUserDetails {...props} />;\n\nUserDetails.displayName = 'UserDetails';\n\nexport default UserDetails;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,iBAAqC,UAA0C,oBAACC,eAAiB,GAAI,QAAS;AAEpH,cAAY,cAAc;AAE1B,0BAAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserList.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/management/UserList/UserList.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA4B,aAAa,IAAI,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAC,EAAE,EAAe,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAwE,CAAC;AAIzG,eAAe,QAAQ,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { UserList } from "@thunderid/react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
//#region src/client/components/
|
|
7
|
+
//#region src/client/components/management/UserList/UserList.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Lists the users the signed-in user is allowed to see, a page at a time.
|
|
10
10
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserList.js","names":["UserList: FC<UserListProps>","ReactUserList","UserList"],"sources":["../../../../../src/client/components/management/UserList/UserList.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {UserList as ReactUserList, UserListProps as ReactUserListProps} from '@thunderid/react';\nimport {FC, ReactElement} from 'react';\n\nexport type UserListProps = ReactUserListProps;\n\n/**\n * Lists the users the signed-in user is allowed to see, a page at a time.\n *\n * Management requests go through a server action with the signed-in user's server-held session, so\n * the access token never reaches the browser. Whether a request succeeds is the server's decision.\n *\n * @example\n * ```tsx\n * <UserList onSelect={(user) => router.push(`/admin/users/${user.id}`)} />\n * ```\n */\nconst UserList: FC<UserListProps> = (props: UserListProps): ReactElement => <ReactUserList {...props} />;\n\nUserList.displayName = 'UserList';\n\nexport default UserList;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,cAA+B,UAAuC,oBAACC,YAAc,GAAI,QAAS;AAExG,WAAS,cAAc;AAEvB,uBAAeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../../../src/client/contexts/ThunderID/ThunderIDProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,eAAe,EAEf,oBAAoB,EAEpB,qBAAqB,EACrB,IAAI,EACJ,WAAW,
|
|
1
|
+
{"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../../../src/client/contexts/ThunderID/ThunderIDProvider.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,eAAe,EAEf,oBAAoB,EAEpB,qBAAqB,EACrB,IAAI,EACJ,WAAW,EAMZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAQL,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAkD,MAAM,OAAO,CAAC;AAC7F,OAAyB,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAQ3E,OAAO,EAAC,aAAa,EAAC,MAAM,sCAAsC,CAAC;AAKnE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,C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iBAAiB,CAAC,4BAA4B,CAAC,CAochF,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
import getSessionId_default from "../../../server/actions/getSessionId.js";
|
|
5
|
+
import getUserAction_default from "../../../server/actions/account/getUserAction.js";
|
|
5
6
|
import getUserProfileAction_default from "../../../server/actions/account/getUserProfileAction.js";
|
|
6
7
|
import logger_default from "../../../utils/logger.js";
|
|
7
8
|
import ThunderIDContext_default from "./ThunderIDContext.js";
|
|
9
|
+
import getCurrentOrganizationUnitAction_default from "../../../server/actions/account/getCurrentOrganizationUnitAction.js";
|
|
10
|
+
import switchOrganizationUnitAction_default from "../../../server/actions/auth/switchOrganizationUnitAction.js";
|
|
8
11
|
import fetchFlowMetaFromServer_default from "../../fetchFlowMetaFromServer.js";
|
|
9
12
|
import fetchManagementFromServer_default from "../../fetchManagementFromServer.js";
|
|
10
|
-
import { ThunderIDRuntimeError, generateFlattenedUserProfile, getVendorPrefix } from "@thunderid/node";
|
|
11
|
-
import { FlowMetaProvider, FlowProvider, I18nProvider, ThemeProvider, ThunderIDContext, UserProvider } from "@thunderid/react";
|
|
13
|
+
import { ThunderIDAPIError, ThunderIDRuntimeError, generateFlattenedUserProfile, getVendorPrefix } from "@thunderid/node";
|
|
14
|
+
import { FlowMetaProvider, FlowProvider, I18nProvider, ThemeProvider, ThunderIDContext, UserProvider, useCurrentProjectState } from "@thunderid/react";
|
|
12
15
|
import { useRouter, useSearchParams } from "next/navigation";
|
|
13
16
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
14
17
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -58,6 +61,38 @@ const ThunderIDClientProvider = ({ baseUrl, children, endpoints, signIn, clearSe
|
|
|
58
61
|
useEffect(() => {
|
|
59
62
|
setIsLoading(false);
|
|
60
63
|
}, [isSignedIn, user]);
|
|
64
|
+
const [currentOrganizationUnit, setCurrentOrganizationUnit] = useState(null);
|
|
65
|
+
const { currentProject, setCurrentProject } = useCurrentProjectState(getVendorPrefix(vendor));
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!isSignedIn) {
|
|
68
|
+
setCurrentOrganizationUnit(null);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
getCurrentOrganizationUnitAction_default().then(setCurrentOrganizationUnit).catch(() => setCurrentOrganizationUnit(null));
|
|
72
|
+
}, [isSignedIn, user]);
|
|
73
|
+
/**
|
|
74
|
+
* Signs in again bounded to another organization unit through a server action. Redirect mode sends the
|
|
75
|
+
* browser to the unit's authorization endpoint and resolves with `undefined`; embedded mode replaces
|
|
76
|
+
* the session in place and resolves with the refreshed user. A failure keeps the previous session and
|
|
77
|
+
* rejects with an error whose code is one of `OrganizationUnitSwitchErrorCodes`.
|
|
78
|
+
*/
|
|
79
|
+
const handleSwitchOrganizationUnit = async (organizationUnitId, options) => {
|
|
80
|
+
const result = await switchOrganizationUnitAction_default(organizationUnitId, { redirect: options?.redirect });
|
|
81
|
+
if (!result.success) throw new ThunderIDAPIError(JSON.stringify({
|
|
82
|
+
code: result.code,
|
|
83
|
+
message: { defaultValue: "Switching the organization unit failed" }
|
|
84
|
+
}), result.code, "nextjs", result.statusCode);
|
|
85
|
+
if (result.data.signInUrl) {
|
|
86
|
+
window.location.href = result.data.signInUrl;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const sessionId = await getSessionId_default();
|
|
90
|
+
const refreshedUser = (sessionId ? await getUserAction_default(sessionId) : void 0)?.data?.user ?? null;
|
|
91
|
+
if (refreshedUser) setUser(refreshedUser);
|
|
92
|
+
setCurrentOrganizationUnit(await getCurrentOrganizationUnitAction_default());
|
|
93
|
+
router.refresh();
|
|
94
|
+
return refreshedUser ?? void 0;
|
|
95
|
+
};
|
|
61
96
|
const handleSignIn = async (payload, request) => {
|
|
62
97
|
if (!signIn) throw new ThunderIDRuntimeError("`signIn` function is not available.", "ThunderIDClientProvider-handleSignIn-RuntimeError-001", "nextjs");
|
|
63
98
|
const result = await signIn(payload, request);
|
|
@@ -109,11 +144,16 @@ const ThunderIDClientProvider = ({ baseUrl, children, endpoints, signIn, clearSe
|
|
|
109
144
|
applicationId,
|
|
110
145
|
baseUrl,
|
|
111
146
|
clearSession,
|
|
147
|
+
currentOrganizationUnit,
|
|
148
|
+
currentProject,
|
|
149
|
+
getCurrentOrganizationUnit: getCurrentOrganizationUnitAction_default,
|
|
112
150
|
isLoading,
|
|
113
151
|
isSignedIn,
|
|
114
152
|
organizationHandle,
|
|
115
153
|
preferences,
|
|
116
154
|
refreshToken,
|
|
155
|
+
setCurrentProject,
|
|
156
|
+
switchOrganizationUnit: handleSwitchOrganizationUnit,
|
|
117
157
|
scopes,
|
|
118
158
|
signIn: handleSignIn,
|
|
119
159
|
signInUrl,
|
|
@@ -131,7 +171,10 @@ const ThunderIDClientProvider = ({ baseUrl, children, endpoints, signIn, clearSe
|
|
|
131
171
|
applicationId,
|
|
132
172
|
organizationHandle,
|
|
133
173
|
scopes,
|
|
134
|
-
preferences
|
|
174
|
+
preferences,
|
|
175
|
+
currentOrganizationUnit,
|
|
176
|
+
currentProject,
|
|
177
|
+
setCurrentProject
|
|
135
178
|
]);
|
|
136
179
|
const handleProfileUpdate = (payload) => {
|
|
137
180
|
setUser(payload);
|
|
@@ -159,10 +202,13 @@ const ThunderIDClientProvider = ({ baseUrl, children, endpoints, signIn, clearSe
|
|
|
159
202
|
baseUrl,
|
|
160
203
|
clearSession,
|
|
161
204
|
clientId: void 0,
|
|
205
|
+
currentOrganizationUnit,
|
|
206
|
+
currentProject,
|
|
162
207
|
discovery: { wellKnown: null },
|
|
163
208
|
endpoints,
|
|
164
209
|
exchangeToken: unsupported("exchangeToken"),
|
|
165
210
|
getAccessToken: unsupported("getAccessToken"),
|
|
211
|
+
getCurrentOrganizationUnit: getCurrentOrganizationUnitAction_default,
|
|
166
212
|
getDecodedIdToken: unsupported("getDecodedIdToken"),
|
|
167
213
|
getGrantedPermissions: unsupported("getGrantedPermissions"),
|
|
168
214
|
getIdToken: unsupported("getIdToken"),
|
|
@@ -183,12 +229,14 @@ const ThunderIDClientProvider = ({ baseUrl, children, endpoints, signIn, clearSe
|
|
|
183
229
|
recover: unsupported("recover"),
|
|
184
230
|
resolveFlowTemplateLiterals: (text) => text ?? "",
|
|
185
231
|
scopes,
|
|
232
|
+
setCurrentProject,
|
|
186
233
|
signIn: handleSignIn,
|
|
187
234
|
signInSilently: unsupported("signInSilently"),
|
|
188
235
|
signInUrl,
|
|
189
236
|
signOut: handleSignOut,
|
|
190
237
|
signUp: handleSignUp,
|
|
191
238
|
signUpUrl,
|
|
239
|
+
switchOrganizationUnit: handleSwitchOrganizationUnit,
|
|
192
240
|
user,
|
|
193
241
|
userSchema,
|
|
194
242
|
vendor: getVendorPrefix(vendor)
|
|
@@ -206,7 +254,10 @@ const ThunderIDClientProvider = ({ baseUrl, children, endpoints, signIn, clearSe
|
|
|
206
254
|
user,
|
|
207
255
|
userSchema,
|
|
208
256
|
initialMeta,
|
|
209
|
-
vendor
|
|
257
|
+
vendor,
|
|
258
|
+
currentOrganizationUnit,
|
|
259
|
+
currentProject,
|
|
260
|
+
setCurrentProject
|
|
210
261
|
]);
|
|
211
262
|
return /* @__PURE__ */ jsx(ThunderIDContext_default.Provider, {
|
|
212
263
|
value: contextValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThunderIDProvider.js","names":["ThunderIDClientProvider: FC<PropsWithChildren<ThunderIDClientProviderProps>>","reRenderCheckRef: RefObject<boolean>","router: AppRouterInstance","searchParams: ReadonlyURLSearchParams","code: string | null","state: string | null","result: {error?: string; redirectUrl?: string; success: boolean}","result: any","contextValue: ThunderIDContextProps","result: Awaited<ReturnType<typeof getUserProfileAction>>","getUserProfileAction","getSessionId","reactContextValue: ReactThunderIDContextProps","fetchManagementFromServer","ThunderIDContext","ReactThunderIDContext","fetchFlowMetaFromServer"],"sources":["../../../../src/client/contexts/ThunderID/ThunderIDProvider.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {\n AttributeSchema,\n EmbeddedFlowExecuteRequestConfig,\n FlowMetadataResponse,\n generateFlattenedUserProfile,\n UpdateMeProfileConfig,\n User,\n UserProfile,\n ThunderIDRuntimeError,\n getVendorPrefix,\n} from '@thunderid/node';\nimport {\n I18nProvider,\n FlowMetaProvider,\n FlowProvider,\n UserProvider,\n ThemeProvider,\n ThunderIDContext as ReactThunderIDContext,\n ThunderIDContextProps as ReactThunderIDContextProps,\n ThunderIDProviderProps,\n} from '@thunderid/react';\nimport {ReadonlyURLSearchParams} from 'next/dist/client/components/navigation.react-server';\nimport {AppRouterInstance} from 'next/dist/shared/lib/app-router-context.shared-runtime';\nimport {useRouter, useSearchParams} from 'next/navigation';\nimport {FC, PropsWithChildren, RefObject, useEffect, useMemo, useRef, useState} from 'react';\nimport ThunderIDContext, {ThunderIDContextProps} from './ThunderIDContext';\nimport getUserProfileAction from '../../../server/actions/account/getUserProfileAction';\nimport getSessionId from '../../../server/actions/getSessionId';\nimport {RefreshResult} from '../../../server/actions/refreshToken';\nimport logger from '../../../utils/logger';\nimport fetchFlowMetaFromServer from '../../fetchFlowMetaFromServer';\nimport fetchManagementFromServer from '../../fetchManagementFromServer';\n\n/**\n * Props interface of {@link ThunderIDClientProvider}\n */\nexport type ThunderIDClientProviderProps = Partial<Omit<ThunderIDProviderProps, 'baseUrl' | 'clientId'>> &\n Pick<ThunderIDProviderProps, 'baseUrl' | 'clientId'> & {\n applicationId: ThunderIDContextProps['applicationId'];\n clearSession: () => Promise<void>;\n handleOAuthCallback: (\n code: string,\n state: string,\n ) => Promise<{error?: string; redirectUrl?: string; success: boolean}>;\n /**\n * Flow metadata fetched server-side ahead of time, seeding `FlowMetaProvider` so it can skip\n * its own initial client-side fetch (avoiding a flash of untranslated i18n keys).\n */\n initialMeta?: FlowMetadataResponse | null;\n isSignedIn: boolean;\n organizationHandle: ThunderIDContextProps['organizationHandle'];\n refreshToken: () => Promise<RefreshResult>;\n signIn: ThunderIDContextProps['signIn'];\n signOut: ThunderIDContextProps['signOut'];\n signUp: ThunderIDContextProps['signUp'];\n updateProfile: (\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>;\n user: User | null;\n userProfile: UserProfile;\n userSchema?: Record<string, AttributeSchema> | null;\n };\n\nconst ThunderIDClientProvider: FC<PropsWithChildren<ThunderIDClientProviderProps>> = ({\n baseUrl,\n children,\n endpoints,\n signIn,\n clearSession,\n refreshToken,\n signOut,\n signUp,\n handleOAuthCallback,\n preferences,\n isSignedIn,\n signInUrl,\n signUpUrl,\n user: _user,\n userProfile: _userProfile,\n userSchema: _userSchema = null,\n updateProfile,\n applicationId,\n organizationHandle,\n scopes,\n vendor,\n initialMeta = null,\n}: PropsWithChildren<ThunderIDClientProviderProps>) => {\n const reRenderCheckRef: RefObject<boolean> = useRef(false);\n const router: AppRouterInstance = useRouter();\n const searchParams: ReadonlyURLSearchParams = useSearchParams();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [user, setUser] = useState<User | null>(_user);\n const [userProfile, setUserProfile] = useState<UserProfile>(_userProfile);\n const [userSchema, setUserSchema] = useState<Record<string, AttributeSchema> | null>(_userSchema);\n\n useEffect(() => {\n setUserProfile(_userProfile);\n }, [_userProfile]);\n\n useEffect(() => {\n setUserSchema(_userSchema);\n }, [_userSchema]);\n\n useEffect(() => {\n setUser(_user);\n }, [_user]);\n\n // Handle OAuth callback automatically\n useEffect(() => {\n // React 18.x Strict.Mode has a new check for `Ensuring reusable state` to facilitate an upcoming react feature.\n // https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state\n // This will remount all the useEffects to ensure that there are no unexpected side effects.\n // When react remounts the signIn hook of the AuthProvider, it will cause a race condition. Hence, we have to\n // prevent the re-render of this hook as suggested in the following discussion.\n // https://github.com/reactwg/react-18/discussions/18#discussioncomment-795623\n if (reRenderCheckRef.current) {\n return;\n }\n\n reRenderCheckRef.current = true;\n\n // Don't handle callback if already signed in\n if (isSignedIn) return;\n\n (async (): Promise<void> => {\n try {\n const code: string | null = searchParams.get('code');\n const state: string | null = searchParams.get('state');\n const error: string | null = searchParams.get('error');\n\n // Check for OAuth errors first\n if (error) {\n logger.error('[ThunderIDClientProvider] An error was received for the initiated sign-in request.');\n\n return;\n }\n\n // Handle OAuth callback if code and state are present\n if (code && state) {\n setIsLoading(true);\n\n const result: {error?: string; redirectUrl?: string; success: boolean} = await handleOAuthCallback(\n code,\n state,\n );\n\n if (result.success) {\n // Redirect to the success URL\n if (result.redirectUrl) {\n router.push(result.redirectUrl);\n } else {\n // Refresh the page to update authentication state\n window.location.reload();\n }\n } else {\n logger.error(\n `[ThunderIDClientProvider] An error occurred while signing in: ${result.error || 'Authentication failed'}`,\n );\n }\n }\n } catch (error) {\n logger.error('[ThunderIDClientProvider] Failed to handle OAuth callback:', error);\n }\n })();\n }, []);\n\n useEffect(() => {\n // Set loading to false when server has resolved authentication state\n setIsLoading(false);\n }, [isSignedIn, user]);\n\n const handleSignIn = async (payload: any, request: EmbeddedFlowExecuteRequestConfig): Promise<any> => {\n if (!signIn) {\n throw new ThunderIDRuntimeError(\n '`signIn` function is not available.',\n 'ThunderIDClientProvider-handleSignIn-RuntimeError-001',\n 'nextjs',\n );\n }\n\n const result: any = await signIn(payload, request);\n\n // Redirect based flow URL is sent as `signInUrl` in the response.\n // Use window.location.href instead of router.push() — the OAuth authorization\n // endpoint is on an external server, and router.push() would send RSC fetch\n // headers that the identity provider doesn't understand, causing a CORS error.\n if (result?.data?.signInUrl) {\n window.location.href = result.data.signInUrl;\n\n return undefined;\n }\n\n // After the Embedded flow is successful, the URL to navigate next is sent as `afterSignInUrl` in the response.\n if (result?.data?.afterSignInUrl) {\n router.push(result.data.afterSignInUrl);\n\n return undefined;\n }\n\n if (result?.error) {\n throw new Error(result.error);\n }\n\n return result?.data ?? result;\n };\n\n const handleSignUp = async (payload: any, request: EmbeddedFlowExecuteRequestConfig): Promise<any> => {\n if (!signUp) {\n throw new ThunderIDRuntimeError(\n '`signUp` function is not available.',\n 'ThunderIDClientProvider-handleSignUp-RuntimeError-001',\n 'nextjs',\n );\n }\n\n const result: any = await signUp(payload, request);\n\n // Redirect based flow URL is sent as `signUpUrl` in the response.\n if (result?.data?.signUpUrl) {\n router.push(result.data.signUpUrl);\n\n return undefined;\n }\n\n // After the Embedded flow is successful, the URL to navigate next is sent as `afterSignUpUrl` in the response.\n if (result?.data?.afterSignUpUrl) {\n router.push(result.data.afterSignUpUrl);\n\n return undefined;\n }\n\n if (result?.error) {\n throw new Error(result.error);\n }\n\n return result?.data ?? result;\n };\n\n const handleSignOut = async (): Promise<any> => {\n logger.debug('[ThunderIDClientProvider][handleSignOut] `handleSignOut` called.');\n\n try {\n const result: any = await signOut();\n\n logger.debug('[ThunderIDClientProvider][handleSignOut] Sign out result:', result);\n\n if (result?.data?.afterSignOutUrl) {\n router.push(result.data.afterSignOutUrl);\n\n return {location: result.data.afterSignOutUrl, redirected: true};\n }\n\n if (result?.error) {\n logger.error(\n '[ThunderIDClientProvider][handleSignOut] Error result was returned during signing the user out with a button click:',\n result.error,\n );\n }\n\n return result?.data ?? result;\n } catch (error) {\n logger.error(\n '[ThunderIDClientProvider][handleSignOut] Error occurred during signing the user out with a button click:',\n error,\n );\n\n return undefined;\n }\n };\n\n const contextValue: ThunderIDContextProps = useMemo(\n () => ({\n applicationId,\n baseUrl,\n clearSession,\n isLoading,\n isSignedIn,\n organizationHandle,\n preferences,\n refreshToken,\n scopes,\n signIn: handleSignIn,\n signInUrl,\n signOut: handleSignOut,\n signUp: handleSignUp,\n signUpUrl,\n user,\n }),\n [\n baseUrl,\n user,\n isSignedIn,\n isLoading,\n signInUrl,\n signUpUrl,\n applicationId,\n organizationHandle,\n scopes,\n preferences,\n ],\n );\n\n const handleProfileUpdate = (payload: User): void => {\n setUser(payload);\n setUserProfile((prev: UserProfile) => ({\n ...prev,\n flattenedProfile: generateFlattenedUserProfile(payload),\n profile: payload,\n }));\n };\n\n /**\n * Re-reads `/users/me` through the server-held session, so a change made outside the profile API,\n * such as a recorded verification, shows.\n */\n const revalidateProfile = async (): Promise<void> => {\n if (preferences?.user?.fetchUserProfile === false) return;\n\n const result: Awaited<ReturnType<typeof getUserProfileAction>> = await getUserProfileAction(\n (await getSessionId()) ?? '',\n );\n\n if (result.success) {\n handleProfileUpdate(result.data.userProfile.profile);\n }\n };\n\n // Bridge into @thunderid/react's own ThunderIDContext. Internal react components rendered by\n // BaseSignIn/BaseSignUp — most notably FlowMetaProvider, which fetches `/flow/meta` and injects\n // its i18n bundle — call react's `useThunderID()` directly. Without this bridge they'd only see\n // react's context default (applicationId/baseUrl undefined, isInitialized false), so the meta\n // fetch would never fire and flow labels would render as untranslated i18n keys. Fields with no\n // nextjs equivalent (token/http helpers meant for direct browser API calls) are stubbed out,\n // since nextjs routes those operations through server actions instead.\n const unsupported = (name: string): (() => Promise<never>) => {\n return () =>\n Promise.reject(\n new ThunderIDRuntimeError(\n `\\`${name}\\` is not supported in @thunderid/nextjs.`,\n `ThunderIDClientProvider-${name}-NotSupportedError-001`,\n 'nextjs',\n ),\n );\n };\n\n const reactContextValue: ReactThunderIDContextProps = useMemo(\n () => ({\n afterSignInUrl: undefined,\n applicationId,\n baseUrl,\n clearSession,\n clientId: undefined,\n discovery: {wellKnown: null},\n // Only the management collection overrides arrive here, so the admin hooks build the URLs the\n // management server action accepts.\n endpoints,\n exchangeToken: unsupported('exchangeToken'),\n getAccessToken: unsupported('getAccessToken'),\n getDecodedIdToken: unsupported('getDecodedIdToken'),\n // The Next.js useGrantedPermissions reads them through a server action instead.\n getGrantedPermissions: unsupported('getGrantedPermissions'),\n getIdToken: unsupported('getIdToken'),\n getStorageManager: () => Promise.resolve(null),\n http: {\n // The admin components and hooks send management requests through a server action that adds\n // the server-held access token, so the token never reaches the browser.\n fetcher: fetchManagementFromServer,\n request: unsupported('http.request'),\n requestAll: unsupported('http.requestAll'),\n },\n instanceId: 0,\n isInitialized: !isLoading,\n isLoading,\n isMetaLoading: false,\n isSignedIn,\n meta: initialMeta ?? null,\n organizationHandle,\n reInitialize: unsupported('reInitialize'),\n recover: unsupported('recover'),\n resolveFlowTemplateLiterals: (text: string | undefined): string => text ?? '',\n scopes,\n signIn: handleSignIn,\n signInSilently: unsupported('signInSilently'),\n signInUrl,\n signOut: handleSignOut,\n signUp: handleSignUp,\n signUpUrl,\n user,\n userSchema,\n vendor: getVendorPrefix(vendor),\n }),\n [\n applicationId,\n baseUrl,\n clearSession,\n endpoints,\n isLoading,\n isSignedIn,\n organizationHandle,\n scopes,\n signInUrl,\n signUpUrl,\n user,\n userSchema,\n initialMeta,\n vendor,\n ],\n );\n\n return (\n <ThunderIDContext.Provider value={contextValue}>\n <ReactThunderIDContext.Provider value={reactContextValue}>\n <I18nProvider preferences={preferences?.i18n}>\n <FlowMetaProvider\n enabled={preferences?.resolveFromMeta !== false}\n initialMeta={initialMeta}\n fetchMeta={fetchFlowMetaFromServer}\n >\n <ThemeProvider theme={preferences?.theme?.overrides} mode={preferences?.theme?.mode}>\n <FlowProvider>\n <UserProvider\n profile={userProfile}\n userSchema={userSchema}\n onUpdateProfile={handleProfileUpdate}\n revalidateProfile={revalidateProfile}\n updateProfile={updateProfile}\n >\n {children}\n </UserProvider>\n </FlowProvider>\n </ThemeProvider>\n </FlowMetaProvider>\n </I18nProvider>\n </ReactThunderIDContext.Provider>\n </ThunderIDContext.Provider>\n );\n};\n\nexport default ThunderIDClientProvider;\n"],"mappings":";;;;;;;;;;;;;;;;AAqEA,MAAMA,2BAAgF,EACpF,SACA,UACA,WACA,QACA,cACA,cACA,SACA,QACA,qBACA,aACA,YACA,WACA,WACA,MAAM,OACN,aAAa,cACb,YAAY,cAAc,MAC1B,eACA,eACA,oBACA,QACA,QACA,cAAc,WACuC;CACrD,MAAMC,mBAAuC,OAAO,MAAM;CAC1D,MAAMC,SAA4B,WAAW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,OAAO;MAAW,MAAM,aAAa,OAAO;gBAC7E,oBAAC,0BACC,oBAAC;OACC,SAAS;OACG;OACZ,iBAAiB;OACE;OACJ;OAEd;QACY,GACF;OACD;MACC;KACN;IACgB;GACP;;AAIhC,gCAAe"}
|
|
1
|
+
{"version":3,"file":"ThunderIDProvider.js","names":["ThunderIDClientProvider: FC<PropsWithChildren<ThunderIDClientProviderProps>>","reRenderCheckRef: RefObject<boolean>","router: AppRouterInstance","searchParams: ReadonlyURLSearchParams","code: string | null","state: string | null","result: {error?: string; redirectUrl?: string; success: boolean}","result: SwitchOrganizationUnitActionResult","switchOrganizationUnitAction","sessionId: string | undefined","getSessionId","refreshedUser: User | null","getUserAction","getCurrentOrganizationUnitAction","result: any","contextValue: ThunderIDContextProps","result: Awaited<ReturnType<typeof getUserProfileAction>>","getUserProfileAction","reactContextValue: ReactThunderIDContextProps","fetchManagementFromServer","ThunderIDContext","ReactThunderIDContext","fetchFlowMetaFromServer"],"sources":["../../../../src/client/contexts/ThunderID/ThunderIDProvider.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n'use client';\n\nimport {\n AttributeSchema,\n EmbeddedFlowExecuteRequestConfig,\n FlowMetadataResponse,\n generateFlattenedUserProfile,\n UpdateMeProfileConfig,\n User,\n UserProfile,\n ThunderIDRuntimeError,\n getVendorPrefix,\n CurrentOrganizationUnit,\n SwitchOrganizationUnitOptions,\n ThunderIDAPIError,\n} from '@thunderid/node';\nimport {\n I18nProvider,\n FlowMetaProvider,\n FlowProvider,\n UserProvider,\n ThemeProvider,\n ThunderIDContext as ReactThunderIDContext,\n ThunderIDContextProps as ReactThunderIDContextProps,\n ThunderIDProviderProps,\n useCurrentProjectState,\n} from '@thunderid/react';\nimport {ReadonlyURLSearchParams} from 'next/dist/client/components/navigation.react-server';\nimport {AppRouterInstance} from 'next/dist/shared/lib/app-router-context.shared-runtime';\nimport {useRouter, useSearchParams} from 'next/navigation';\nimport {FC, PropsWithChildren, RefObject, useEffect, useMemo, useRef, useState} from 'react';\nimport ThunderIDContext, {ThunderIDContextProps} from './ThunderIDContext';\nimport getCurrentOrganizationUnitAction from '../../../server/actions/account/getCurrentOrganizationUnitAction';\nimport getUserAction from '../../../server/actions/account/getUserAction';\nimport getUserProfileAction from '../../../server/actions/account/getUserProfileAction';\nimport switchOrganizationUnitAction, {\n SwitchOrganizationUnitActionResult,\n} from '../../../server/actions/auth/switchOrganizationUnitAction';\nimport getSessionId from '../../../server/actions/getSessionId';\nimport {RefreshResult} from '../../../server/actions/refreshToken';\nimport logger from '../../../utils/logger';\nimport fetchFlowMetaFromServer from '../../fetchFlowMetaFromServer';\nimport fetchManagementFromServer from '../../fetchManagementFromServer';\n\n/**\n * Props interface of {@link ThunderIDClientProvider}\n */\nexport type ThunderIDClientProviderProps = Partial<Omit<ThunderIDProviderProps, 'baseUrl' | 'clientId'>> &\n Pick<ThunderIDProviderProps, 'baseUrl' | 'clientId'> & {\n applicationId: ThunderIDContextProps['applicationId'];\n clearSession: () => Promise<void>;\n handleOAuthCallback: (\n code: string,\n state: string,\n ) => Promise<{error?: string; redirectUrl?: string; success: boolean}>;\n /**\n * Flow metadata fetched server-side ahead of time, seeding `FlowMetaProvider` so it can skip\n * its own initial client-side fetch (avoiding a flash of untranslated i18n keys).\n */\n initialMeta?: FlowMetadataResponse | null;\n isSignedIn: boolean;\n organizationHandle: ThunderIDContextProps['organizationHandle'];\n refreshToken: () => Promise<RefreshResult>;\n signIn: ThunderIDContextProps['signIn'];\n signOut: ThunderIDContextProps['signOut'];\n signUp: ThunderIDContextProps['signUp'];\n updateProfile: (\n requestConfig: UpdateMeProfileConfig,\n sessionId?: string,\n ) => Promise<{data: {user: User}; error: string; success: boolean}>;\n user: User | null;\n userProfile: UserProfile;\n userSchema?: Record<string, AttributeSchema> | null;\n };\n\nconst ThunderIDClientProvider: FC<PropsWithChildren<ThunderIDClientProviderProps>> = ({\n baseUrl,\n children,\n endpoints,\n signIn,\n clearSession,\n refreshToken,\n signOut,\n signUp,\n handleOAuthCallback,\n preferences,\n isSignedIn,\n signInUrl,\n signUpUrl,\n user: _user,\n userProfile: _userProfile,\n userSchema: _userSchema = null,\n updateProfile,\n applicationId,\n organizationHandle,\n scopes,\n vendor,\n initialMeta = null,\n}: PropsWithChildren<ThunderIDClientProviderProps>) => {\n const reRenderCheckRef: RefObject<boolean> = useRef(false);\n const router: AppRouterInstance = useRouter();\n const searchParams: ReadonlyURLSearchParams = useSearchParams();\n const [isLoading, setIsLoading] = useState<boolean>(true);\n const [user, setUser] = useState<User | null>(_user);\n const [userProfile, setUserProfile] = useState<UserProfile>(_userProfile);\n const [userSchema, setUserSchema] = useState<Record<string, AttributeSchema> | null>(_userSchema);\n\n useEffect(() => {\n setUserProfile(_userProfile);\n }, [_userProfile]);\n\n useEffect(() => {\n setUserSchema(_userSchema);\n }, [_userSchema]);\n\n useEffect(() => {\n setUser(_user);\n }, [_user]);\n\n // Handle OAuth callback automatically\n useEffect(() => {\n // React 18.x Strict.Mode has a new check for `Ensuring reusable state` to facilitate an upcoming react feature.\n // https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state\n // This will remount all the useEffects to ensure that there are no unexpected side effects.\n // When react remounts the signIn hook of the AuthProvider, it will cause a race condition. Hence, we have to\n // prevent the re-render of this hook as suggested in the following discussion.\n // https://github.com/reactwg/react-18/discussions/18#discussioncomment-795623\n if (reRenderCheckRef.current) {\n return;\n }\n\n reRenderCheckRef.current = true;\n\n // Don't handle callback if already signed in\n if (isSignedIn) return;\n\n (async (): Promise<void> => {\n try {\n const code: string | null = searchParams.get('code');\n const state: string | null = searchParams.get('state');\n const error: string | null = searchParams.get('error');\n\n // Check for OAuth errors first\n if (error) {\n logger.error('[ThunderIDClientProvider] An error was received for the initiated sign-in request.');\n\n return;\n }\n\n // Handle OAuth callback if code and state are present\n if (code && state) {\n setIsLoading(true);\n\n const result: {error?: string; redirectUrl?: string; success: boolean} = await handleOAuthCallback(\n code,\n state,\n );\n\n if (result.success) {\n // Redirect to the success URL\n if (result.redirectUrl) {\n router.push(result.redirectUrl);\n } else {\n // Refresh the page to update authentication state\n window.location.reload();\n }\n } else {\n logger.error(\n `[ThunderIDClientProvider] An error occurred while signing in: ${result.error || 'Authentication failed'}`,\n );\n }\n }\n } catch (error) {\n logger.error('[ThunderIDClientProvider] Failed to handle OAuth callback:', error);\n }\n })();\n }, []);\n\n useEffect(() => {\n // Set loading to false when server has resolved authentication state\n setIsLoading(false);\n }, [isSignedIn, user]);\n\n const [currentOrganizationUnit, setCurrentOrganizationUnit] = useState<CurrentOrganizationUnit | null>(null);\n // The current project is client-side context for the management UI, kept in the browser like the\n // React SDK's: it changes no session, cookie or token.\n const {currentProject, setCurrentProject} = useCurrentProjectState(getVendorPrefix(vendor));\n\n useEffect(() => {\n if (!isSignedIn) {\n setCurrentOrganizationUnit(null);\n\n return;\n }\n\n getCurrentOrganizationUnitAction()\n .then(setCurrentOrganizationUnit)\n .catch(() => setCurrentOrganizationUnit(null));\n }, [isSignedIn, user]);\n\n /**\n * Signs in again bounded to another organization unit through a server action. Redirect mode sends the\n * browser to the unit's authorization endpoint and resolves with `undefined`; embedded mode replaces\n * the session in place and resolves with the refreshed user. A failure keeps the previous session and\n * rejects with an error whose code is one of `OrganizationUnitSwitchErrorCodes`.\n */\n const handleSwitchOrganizationUnit = async (\n organizationUnitId: string,\n options?: SwitchOrganizationUnitOptions,\n ): Promise<User | undefined> => {\n const result: SwitchOrganizationUnitActionResult = await switchOrganizationUnitAction(organizationUnitId, {\n redirect: options?.redirect,\n });\n\n if (!result.success) {\n throw new ThunderIDAPIError(\n JSON.stringify({code: result.code, message: {defaultValue: 'Switching the organization unit failed'}}),\n result.code,\n 'nextjs',\n result.statusCode,\n );\n }\n\n if (result.data.signInUrl) {\n // The authorization endpoint is on the identity server, so leave the app rather than route.\n window.location.href = result.data.signInUrl;\n\n return undefined;\n }\n\n const sessionId: string | undefined = await getSessionId();\n const refreshed: Awaited<ReturnType<typeof getUserAction>> | undefined = sessionId\n ? await getUserAction(sessionId)\n : undefined;\n const refreshedUser: User | null = refreshed?.data?.user ?? null;\n\n if (refreshedUser) {\n setUser(refreshedUser);\n }\n\n setCurrentOrganizationUnit(await getCurrentOrganizationUnitAction());\n router.refresh();\n\n return refreshedUser ?? undefined;\n };\n\n const handleSignIn = async (payload: any, request: EmbeddedFlowExecuteRequestConfig): Promise<any> => {\n if (!signIn) {\n throw new ThunderIDRuntimeError(\n '`signIn` function is not available.',\n 'ThunderIDClientProvider-handleSignIn-RuntimeError-001',\n 'nextjs',\n );\n }\n\n const result: any = await signIn(payload, request);\n\n // Redirect based flow URL is sent as `signInUrl` in the response.\n // Use window.location.href instead of router.push() — the OAuth authorization\n // endpoint is on an external server, and router.push() would send RSC fetch\n // headers that the identity provider doesn't understand, causing a CORS error.\n if (result?.data?.signInUrl) {\n window.location.href = result.data.signInUrl;\n\n return undefined;\n }\n\n // After the Embedded flow is successful, the URL to navigate next is sent as `afterSignInUrl` in the response.\n if (result?.data?.afterSignInUrl) {\n router.push(result.data.afterSignInUrl);\n\n return undefined;\n }\n\n if (result?.error) {\n throw new Error(result.error);\n }\n\n return result?.data ?? result;\n };\n\n const handleSignUp = async (payload: any, request: EmbeddedFlowExecuteRequestConfig): Promise<any> => {\n if (!signUp) {\n throw new ThunderIDRuntimeError(\n '`signUp` function is not available.',\n 'ThunderIDClientProvider-handleSignUp-RuntimeError-001',\n 'nextjs',\n );\n }\n\n const result: any = await signUp(payload, request);\n\n // Redirect based flow URL is sent as `signUpUrl` in the response.\n if (result?.data?.signUpUrl) {\n router.push(result.data.signUpUrl);\n\n return undefined;\n }\n\n // After the Embedded flow is successful, the URL to navigate next is sent as `afterSignUpUrl` in the response.\n if (result?.data?.afterSignUpUrl) {\n router.push(result.data.afterSignUpUrl);\n\n return undefined;\n }\n\n if (result?.error) {\n throw new Error(result.error);\n }\n\n return result?.data ?? result;\n };\n\n const handleSignOut = async (): Promise<any> => {\n logger.debug('[ThunderIDClientProvider][handleSignOut] `handleSignOut` called.');\n\n try {\n const result: any = await signOut();\n\n logger.debug('[ThunderIDClientProvider][handleSignOut] Sign out result:', result);\n\n if (result?.data?.afterSignOutUrl) {\n router.push(result.data.afterSignOutUrl);\n\n return {location: result.data.afterSignOutUrl, redirected: true};\n }\n\n if (result?.error) {\n logger.error(\n '[ThunderIDClientProvider][handleSignOut] Error result was returned during signing the user out with a button click:',\n result.error,\n );\n }\n\n return result?.data ?? result;\n } catch (error) {\n logger.error(\n '[ThunderIDClientProvider][handleSignOut] Error occurred during signing the user out with a button click:',\n error,\n );\n\n return undefined;\n }\n };\n\n const contextValue: ThunderIDContextProps = useMemo(\n () => ({\n applicationId,\n baseUrl,\n clearSession,\n currentOrganizationUnit,\n currentProject,\n getCurrentOrganizationUnit: getCurrentOrganizationUnitAction,\n isLoading,\n isSignedIn,\n organizationHandle,\n preferences,\n refreshToken,\n setCurrentProject,\n switchOrganizationUnit: handleSwitchOrganizationUnit,\n scopes,\n signIn: handleSignIn,\n signInUrl,\n signOut: handleSignOut,\n signUp: handleSignUp,\n signUpUrl,\n user,\n }),\n [\n baseUrl,\n user,\n isSignedIn,\n isLoading,\n signInUrl,\n signUpUrl,\n applicationId,\n organizationHandle,\n scopes,\n preferences,\n currentOrganizationUnit,\n currentProject,\n setCurrentProject,\n ],\n );\n\n const handleProfileUpdate = (payload: User): void => {\n setUser(payload);\n setUserProfile((prev: UserProfile) => ({\n ...prev,\n flattenedProfile: generateFlattenedUserProfile(payload),\n profile: payload,\n }));\n };\n\n /**\n * Re-reads `/users/me` through the server-held session, so a change made outside the profile API,\n * such as a recorded verification, shows.\n */\n const revalidateProfile = async (): Promise<void> => {\n if (preferences?.user?.fetchUserProfile === false) return;\n\n const result: Awaited<ReturnType<typeof getUserProfileAction>> = await getUserProfileAction(\n (await getSessionId()) ?? '',\n );\n\n if (result.success) {\n handleProfileUpdate(result.data.userProfile.profile);\n }\n };\n\n // Bridge into @thunderid/react's own ThunderIDContext. Internal react components rendered by\n // BaseSignIn/BaseSignUp — most notably FlowMetaProvider, which fetches `/flow/meta` and injects\n // its i18n bundle — call react's `useThunderID()` directly. Without this bridge they'd only see\n // react's context default (applicationId/baseUrl undefined, isInitialized false), so the meta\n // fetch would never fire and flow labels would render as untranslated i18n keys. Fields with no\n // nextjs equivalent (token/http helpers meant for direct browser API calls) are stubbed out,\n // since nextjs routes those operations through server actions instead.\n const unsupported = (name: string): (() => Promise<never>) => {\n return () =>\n Promise.reject(\n new ThunderIDRuntimeError(\n `\\`${name}\\` is not supported in @thunderid/nextjs.`,\n `ThunderIDClientProvider-${name}-NotSupportedError-001`,\n 'nextjs',\n ),\n );\n };\n\n const reactContextValue: ReactThunderIDContextProps = useMemo(\n () => ({\n afterSignInUrl: undefined,\n applicationId,\n baseUrl,\n clearSession,\n clientId: undefined,\n currentOrganizationUnit,\n currentProject,\n discovery: {wellKnown: null},\n // Only the management collection overrides arrive here, so the admin hooks build the URLs the\n // management server action accepts.\n endpoints,\n exchangeToken: unsupported('exchangeToken'),\n getAccessToken: unsupported('getAccessToken'),\n getCurrentOrganizationUnit: getCurrentOrganizationUnitAction,\n getDecodedIdToken: unsupported('getDecodedIdToken'),\n // The Next.js useGrantedPermissions reads them through a server action instead.\n getGrantedPermissions: unsupported('getGrantedPermissions'),\n getIdToken: unsupported('getIdToken'),\n getStorageManager: () => Promise.resolve(null),\n http: {\n // The admin components and hooks send management requests through a server action that adds\n // the server-held access token, so the token never reaches the browser.\n fetcher: fetchManagementFromServer,\n request: unsupported('http.request'),\n requestAll: unsupported('http.requestAll'),\n },\n instanceId: 0,\n isInitialized: !isLoading,\n isLoading,\n isMetaLoading: false,\n isSignedIn,\n meta: initialMeta ?? null,\n organizationHandle,\n reInitialize: unsupported('reInitialize'),\n recover: unsupported('recover'),\n resolveFlowTemplateLiterals: (text: string | undefined): string => text ?? '',\n scopes,\n setCurrentProject,\n signIn: handleSignIn,\n signInSilently: unsupported('signInSilently'),\n signInUrl,\n signOut: handleSignOut,\n signUp: handleSignUp,\n signUpUrl,\n switchOrganizationUnit: handleSwitchOrganizationUnit,\n user,\n userSchema,\n vendor: getVendorPrefix(vendor),\n }),\n [\n applicationId,\n baseUrl,\n clearSession,\n endpoints,\n isLoading,\n isSignedIn,\n organizationHandle,\n scopes,\n signInUrl,\n signUpUrl,\n user,\n userSchema,\n initialMeta,\n vendor,\n currentOrganizationUnit,\n currentProject,\n setCurrentProject,\n ],\n );\n\n return (\n <ThunderIDContext.Provider value={contextValue}>\n <ReactThunderIDContext.Provider value={reactContextValue}>\n <I18nProvider preferences={preferences?.i18n}>\n <FlowMetaProvider\n enabled={preferences?.resolveFromMeta !== false}\n initialMeta={initialMeta}\n fetchMeta={fetchFlowMetaFromServer}\n >\n <ThemeProvider theme={preferences?.theme?.overrides} mode={preferences?.theme?.mode}>\n <FlowProvider>\n <UserProvider\n profile={userProfile}\n userSchema={userSchema}\n onUpdateProfile={handleProfileUpdate}\n revalidateProfile={revalidateProfile}\n updateProfile={updateProfile}\n >\n {children}\n </UserProvider>\n </FlowProvider>\n </ThemeProvider>\n </FlowMetaProvider>\n </I18nProvider>\n </ReactThunderIDContext.Provider>\n </ThunderIDContext.Provider>\n );\n};\n\nexport default ThunderIDClientProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8EA,MAAMA,2BAAgF,EACpF,SACA,UACA,WACA,QACA,cACA,cACA,SACA,QACA,qBACA,aACA,YACA,WACA,WACA,MAAM,OACN,aAAa,cACb,YAAY,cAAc,MAC1B,eACA,eACA,oBACA,QACA,QACA,cAAc,WACuC;CACrD,MAAMC,mBAAuC,OAAO,MAAM;CAC1D,MAAMC,SAA4B,WAAW;CAC7C,MAAMC,eAAwC,iBAAiB;CAC/D,MAAM,CAAC,WAAW,gBAAgB,SAAkB,KAAK;CACzD,MAAM,CAAC,MAAM,WAAW,SAAsB,MAAM;CACpD,MAAM,CAAC,aAAa,kBAAkB,SAAsB,aAAa;CACzE,MAAM,CAAC,YAAY,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