@stigmer/react 0.0.71 → 0.0.73
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/agent/AgentEnvForm.d.ts +2 -0
- package/agent/AgentEnvForm.d.ts.map +1 -1
- package/agent/AgentEnvForm.js.map +1 -1
- package/agent/AgentPicker.d.ts +2 -0
- package/agent/AgentPicker.d.ts.map +1 -1
- package/agent/AgentPicker.js.map +1 -1
- package/agent/agentSetupReducer.d.ts +69 -7
- package/agent/agentSetupReducer.d.ts.map +1 -1
- package/agent/agentSetupReducer.js.map +1 -1
- package/agent/useAgentCount.d.ts +2 -0
- package/agent/useAgentCount.d.ts.map +1 -1
- package/agent/useAgentCount.js.map +1 -1
- package/attachment/AttachmentChipList.d.ts +15 -0
- package/attachment/AttachmentChipList.d.ts.map +1 -1
- package/attachment/AttachmentChipList.js +15 -0
- package/attachment/AttachmentChipList.js.map +1 -1
- package/attachment/useAttachments.d.ts +14 -0
- package/attachment/useAttachments.d.ts.map +1 -1
- package/attachment/useAttachments.js.map +1 -1
- package/composer/useComposer.d.ts +5 -0
- package/composer/useComposer.d.ts.map +1 -1
- package/composer/useComposer.js.map +1 -1
- package/execution/ExecutionPhaseBadge.d.ts +1 -1
- package/execution/ExecutionPhaseBadge.js +1 -1
- package/execution/McpToolDetail.d.ts +16 -8
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +0 -6
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/TodoList.d.ts +8 -0
- package/execution/TodoList.d.ts.map +1 -1
- package/execution/TodoList.js +8 -0
- package/execution/TodoList.js.map +1 -1
- package/execution/ToolArgsView.d.ts +1 -0
- package/execution/ToolArgsView.d.ts.map +1 -1
- package/execution/ToolArgsView.js.map +1 -1
- package/execution/UsageWidget.d.ts +1 -1
- package/execution/UsageWidget.js +1 -1
- package/execution/file-path-resolver.d.ts +10 -0
- package/execution/file-path-resolver.d.ts.map +1 -1
- package/execution/file-path-resolver.js.map +1 -1
- package/execution/index.d.ts +1 -1
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js.map +1 -1
- package/execution/useArtifactContent.d.ts +33 -0
- package/execution/useArtifactContent.d.ts.map +1 -1
- package/execution/useArtifactContent.js +33 -0
- package/execution/useArtifactContent.js.map +1 -1
- package/execution/useSubmitApproval.d.ts +2 -0
- package/execution/useSubmitApproval.d.ts.map +1 -1
- package/execution/useSubmitApproval.js.map +1 -1
- package/github/GitHubRepoPicker.d.ts +13 -0
- package/github/GitHubRepoPicker.d.ts.map +1 -1
- package/github/GitHubRepoPicker.js +13 -0
- package/github/GitHubRepoPicker.js.map +1 -1
- package/github/useGitHubConnection.d.ts +29 -1
- package/github/useGitHubConnection.d.ts.map +1 -1
- package/github/useGitHubConnection.js +29 -1
- package/github/useGitHubConnection.js.map +1 -1
- package/github/useGitHubRepos.d.ts +31 -0
- package/github/useGitHubRepos.d.ts.map +1 -1
- package/github/useGitHubRepos.js +31 -0
- package/github/useGitHubRepos.js.map +1 -1
- package/github/useGitHubSearch.d.ts +25 -0
- package/github/useGitHubSearch.d.ts.map +1 -1
- package/github/useGitHubSearch.js +25 -0
- package/github/useGitHubSearch.js.map +1 -1
- package/iam-policy/GrantAccessForm.d.ts +39 -0
- package/iam-policy/GrantAccessForm.d.ts.map +1 -0
- package/iam-policy/GrantAccessForm.js +75 -0
- package/iam-policy/GrantAccessForm.js.map +1 -0
- package/iam-policy/OrgMembersPanel.d.ts +28 -0
- package/iam-policy/OrgMembersPanel.d.ts.map +1 -0
- package/iam-policy/OrgMembersPanel.js +192 -0
- package/iam-policy/OrgMembersPanel.js.map +1 -0
- package/iam-policy/RoleSelector.d.ts +37 -0
- package/iam-policy/RoleSelector.d.ts.map +1 -0
- package/iam-policy/RoleSelector.js +42 -0
- package/iam-policy/RoleSelector.js.map +1 -0
- package/iam-policy/index.d.ts +12 -0
- package/iam-policy/index.d.ts.map +1 -0
- package/iam-policy/index.js +12 -0
- package/iam-policy/index.js.map +1 -0
- package/iam-policy/useCreateIamPolicy.d.ts +35 -0
- package/iam-policy/useCreateIamPolicy.d.ts.map +1 -0
- package/iam-policy/useCreateIamPolicy.js +46 -0
- package/iam-policy/useCreateIamPolicy.js.map +1 -0
- package/iam-policy/useDeleteIamPolicy.d.ts +34 -0
- package/iam-policy/useDeleteIamPolicy.d.ts.map +1 -0
- package/iam-policy/useDeleteIamPolicy.js +45 -0
- package/iam-policy/useDeleteIamPolicy.js.map +1 -0
- package/iam-policy/useGrantableRoles.d.ts +28 -0
- package/iam-policy/useGrantableRoles.d.ts.map +1 -0
- package/iam-policy/useGrantableRoles.js +32 -0
- package/iam-policy/useGrantableRoles.js.map +1 -0
- package/iam-policy/usePrincipalsCount.d.ts +31 -0
- package/iam-policy/usePrincipalsCount.d.ts.map +1 -0
- package/iam-policy/usePrincipalsCount.js +72 -0
- package/iam-policy/usePrincipalsCount.js.map +1 -0
- package/iam-policy/useResourceAccess.d.ts +51 -0
- package/iam-policy/useResourceAccess.d.ts.map +1 -0
- package/iam-policy/useResourceAccess.js +85 -0
- package/iam-policy/useResourceAccess.js.map +1 -0
- package/iam-policy/useRevokeOrgAccess.d.ts +36 -0
- package/iam-policy/useRevokeOrgAccess.d.ts.map +1 -0
- package/iam-policy/useRevokeOrgAccess.js +48 -0
- package/iam-policy/useRevokeOrgAccess.js.map +1 -0
- package/iam-policy/useRoleSelector.d.ts +52 -0
- package/iam-policy/useRoleSelector.d.ts.map +1 -0
- package/iam-policy/useRoleSelector.js +50 -0
- package/iam-policy/useRoleSelector.js.map +1 -0
- package/iam-policy/useWhoAmI.d.ts +30 -0
- package/iam-policy/useWhoAmI.d.ts.map +1 -0
- package/iam-policy/useWhoAmI.js +56 -0
- package/iam-policy/useWhoAmI.js.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts +39 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.js +102 -0
- package/identity-provider/CreateIdentityProviderForm.js.map +1 -0
- package/identity-provider/IdentityProviderDetailPanel.d.ts +42 -0
- package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -0
- package/identity-provider/IdentityProviderDetailPanel.js +156 -0
- package/identity-provider/IdentityProviderDetailPanel.js.map +1 -0
- package/identity-provider/IdentityProviderListPanel.d.ts +41 -0
- package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -0
- package/identity-provider/IdentityProviderListPanel.js +110 -0
- package/identity-provider/IdentityProviderListPanel.js.map +1 -0
- package/identity-provider/IdentityProviderWizard.d.ts +40 -0
- package/identity-provider/IdentityProviderWizard.d.ts.map +1 -0
- package/identity-provider/IdentityProviderWizard.js +180 -0
- package/identity-provider/IdentityProviderWizard.js.map +1 -0
- package/identity-provider/ProviderPicker.d.ts +28 -0
- package/identity-provider/ProviderPicker.d.ts.map +1 -0
- package/identity-provider/ProviderPicker.js +64 -0
- package/identity-provider/ProviderPicker.js.map +1 -0
- package/identity-provider/SsoLoginPrompt.d.ts +51 -0
- package/identity-provider/SsoLoginPrompt.d.ts.map +1 -0
- package/identity-provider/SsoLoginPrompt.js +119 -0
- package/identity-provider/SsoLoginPrompt.js.map +1 -0
- package/identity-provider/index.d.ts +14 -0
- package/identity-provider/index.d.ts.map +1 -0
- package/identity-provider/index.js +14 -0
- package/identity-provider/index.js.map +1 -0
- package/identity-provider/presets.d.ts +65 -0
- package/identity-provider/presets.d.ts.map +1 -0
- package/identity-provider/presets.js +200 -0
- package/identity-provider/presets.js.map +1 -0
- package/identity-provider/useCreateIdentityProvider.d.ts +37 -0
- package/identity-provider/useCreateIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useCreateIdentityProvider.js +48 -0
- package/identity-provider/useCreateIdentityProvider.js.map +1 -0
- package/identity-provider/useDeleteIdentityProvider.d.ts +34 -0
- package/identity-provider/useDeleteIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useDeleteIdentityProvider.js +45 -0
- package/identity-provider/useDeleteIdentityProvider.js.map +1 -0
- package/identity-provider/useIdentityProvider.d.ts +37 -0
- package/identity-provider/useIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useIdentityProvider.js +62 -0
- package/identity-provider/useIdentityProvider.js.map +1 -0
- package/identity-provider/useIdentityProviderList.d.ts +48 -0
- package/identity-provider/useIdentityProviderList.d.ts.map +1 -0
- package/identity-provider/useIdentityProviderList.js +75 -0
- package/identity-provider/useIdentityProviderList.js.map +1 -0
- package/identity-provider/useOidcDiscovery.d.ts +39 -0
- package/identity-provider/useOidcDiscovery.d.ts.map +1 -0
- package/identity-provider/useOidcDiscovery.js +76 -0
- package/identity-provider/useOidcDiscovery.js.map +1 -0
- package/identity-provider/useSsoProvider.d.ts +50 -0
- package/identity-provider/useSsoProvider.d.ts.map +1 -0
- package/identity-provider/useSsoProvider.js +83 -0
- package/identity-provider/useSsoProvider.js.map +1 -0
- package/identity-provider/useUpdateIdentityProvider.d.ts +38 -0
- package/identity-provider/useUpdateIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useUpdateIdentityProvider.js +49 -0
- package/identity-provider/useUpdateIdentityProvider.js.map +1 -0
- package/index.d.ts +14 -5
- package/index.d.ts.map +1 -1
- package/index.js +10 -2
- package/index.js.map +1 -1
- package/internal/CloudFeatureNotice.d.ts +12 -0
- package/internal/CloudFeatureNotice.d.ts.map +1 -1
- package/internal/CloudFeatureNotice.js +12 -0
- package/internal/CloudFeatureNotice.js.map +1 -1
- package/invitation/InvitationCreatedAlert.d.ts +35 -0
- package/invitation/InvitationCreatedAlert.d.ts.map +1 -0
- package/invitation/InvitationCreatedAlert.js +60 -0
- package/invitation/InvitationCreatedAlert.js.map +1 -0
- package/invitation/InvitationManager.d.ts +44 -0
- package/invitation/InvitationManager.d.ts.map +1 -0
- package/invitation/InvitationManager.js +248 -0
- package/invitation/InvitationManager.js.map +1 -0
- package/invitation/InvitationRedemption.d.ts +69 -0
- package/invitation/InvitationRedemption.d.ts.map +1 -0
- package/invitation/InvitationRedemption.js +140 -0
- package/invitation/InvitationRedemption.js.map +1 -0
- package/invitation/index.d.ts +17 -0
- package/invitation/index.d.ts.map +1 -0
- package/invitation/index.js +9 -0
- package/invitation/index.js.map +1 -0
- package/invitation/useCreateInvitation.d.ts +52 -0
- package/invitation/useCreateInvitation.d.ts.map +1 -0
- package/invitation/useCreateInvitation.js +55 -0
- package/invitation/useCreateInvitation.js.map +1 -0
- package/invitation/useInvitationPreview.d.ts +51 -0
- package/invitation/useInvitationPreview.d.ts.map +1 -0
- package/invitation/useInvitationPreview.js +80 -0
- package/invitation/useInvitationPreview.js.map +1 -0
- package/invitation/useOrgInvitations.d.ts +36 -0
- package/invitation/useOrgInvitations.d.ts.map +1 -0
- package/invitation/useOrgInvitations.js +65 -0
- package/invitation/useOrgInvitations.js.map +1 -0
- package/invitation/useRedeemInvitation.d.ts +47 -0
- package/invitation/useRedeemInvitation.d.ts.map +1 -0
- package/invitation/useRedeemInvitation.js +53 -0
- package/invitation/useRedeemInvitation.js.map +1 -0
- package/invitation/useRevokeInvitation.d.ts +35 -0
- package/invitation/useRevokeInvitation.d.ts.map +1 -0
- package/invitation/useRevokeInvitation.js +47 -0
- package/invitation/useRevokeInvitation.js.map +1 -0
- package/library/detect-skill-package.d.ts +1 -0
- package/library/detect-skill-package.d.ts.map +1 -1
- package/library/detect-skill-package.js.map +1 -1
- package/library/detect-stigmer-resource.d.ts +1 -0
- package/library/detect-stigmer-resource.d.ts.map +1 -1
- package/library/detect-stigmer-resource.js.map +1 -1
- package/library/parse-resource-yaml.d.ts +4 -0
- package/library/parse-resource-yaml.d.ts.map +1 -1
- package/library/parse-resource-yaml.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts +2 -2
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/index.d.ts +1 -1
- package/mcp-server/index.d.ts.map +1 -1
- package/mcp-server/index.js.map +1 -1
- package/mcp-server/mcpServerSetupReducer.d.ts +54 -0
- package/mcp-server/mcpServerSetupReducer.d.ts.map +1 -1
- package/mcp-server/mcpServerSetupReducer.js.map +1 -1
- package/models/ModelSelector.d.ts +9 -0
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +9 -0
- package/models/ModelSelector.js.map +1 -1
- package/models/registry.d.ts +11 -1
- package/models/registry.d.ts.map +1 -1
- package/models/registry.js.map +1 -1
- package/models/useModelRegistry.d.ts +20 -0
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +20 -0
- package/models/useModelRegistry.js.map +1 -1
- package/organization/OrgProfilePanel.d.ts +31 -0
- package/organization/OrgProfilePanel.d.ts.map +1 -0
- package/organization/OrgProfilePanel.js +147 -0
- package/organization/OrgProfilePanel.js.map +1 -0
- package/organization/index.d.ts +6 -0
- package/organization/index.d.ts.map +1 -1
- package/organization/index.js +3 -0
- package/organization/index.js.map +1 -1
- package/organization/useOrganization.d.ts +31 -0
- package/organization/useOrganization.d.ts.map +1 -0
- package/organization/useOrganization.js +56 -0
- package/organization/useOrganization.js.map +1 -0
- package/organization/useUpdateOrganization.d.ts +40 -0
- package/organization/useUpdateOrganization.d.ts.map +1 -0
- package/organization/useUpdateOrganization.js +51 -0
- package/organization/useUpdateOrganization.js.map +1 -0
- package/package.json +4 -4
- package/provider.d.ts +1 -0
- package/provider.d.ts.map +1 -1
- package/provider.js.map +1 -1
- package/search/useResourceList.d.ts +4 -2
- package/search/useResourceList.d.ts.map +1 -1
- package/search/useResourceList.js +2 -1
- package/search/useResourceList.js.map +1 -1
- package/search/useResourceSearch.d.ts +10 -2
- package/search/useResourceSearch.d.ts.map +1 -1
- package/search/useResourceSearch.js +2 -1
- package/search/useResourceSearch.js.map +1 -1
- package/session/group-sessions.d.ts +23 -0
- package/session/group-sessions.d.ts.map +1 -1
- package/session/group-sessions.js +23 -0
- package/session/group-sessions.js.map +1 -1
- package/session/index.d.ts +1 -1
- package/session/index.d.ts.map +1 -1
- package/session/index.js.map +1 -1
- package/session/useCreateSession.d.ts +11 -2
- package/session/useCreateSession.d.ts.map +1 -1
- package/session/useCreateSession.js.map +1 -1
- package/session/useSession.d.ts +24 -0
- package/session/useSession.d.ts.map +1 -1
- package/session/useSession.js +24 -0
- package/session/useSession.js.map +1 -1
- package/session/useSessionArtifacts.d.ts +1 -0
- package/session/useSessionArtifacts.d.ts.map +1 -1
- package/session/useSessionArtifacts.js.map +1 -1
- package/session/useSessionConversation.d.ts +7 -0
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionExecutions.d.ts +23 -0
- package/session/useSessionExecutions.d.ts.map +1 -1
- package/session/useSessionExecutions.js +23 -0
- package/session/useSessionExecutions.js.map +1 -1
- package/session/useSessionList.d.ts +19 -0
- package/session/useSessionList.d.ts.map +1 -1
- package/session/useSessionList.js +19 -0
- package/session/useSessionList.js.map +1 -1
- package/session/useSessionWriteBacks.d.ts +1 -0
- package/session/useSessionWriteBacks.d.ts.map +1 -1
- package/session/useSessionWriteBacks.js.map +1 -1
- package/session/useUpdateSession.d.ts +22 -0
- package/session/useUpdateSession.d.ts.map +1 -1
- package/session/useUpdateSession.js +22 -0
- package/session/useUpdateSession.js.map +1 -1
- package/skill/SkillPicker.d.ts +15 -0
- package/skill/SkillPicker.d.ts.map +1 -1
- package/skill/SkillPicker.js +15 -0
- package/skill/SkillPicker.js.map +1 -1
- package/src/agent/AgentEnvForm.tsx +2 -0
- package/src/agent/AgentPicker.tsx +2 -0
- package/src/agent/agentSetupReducer.ts +109 -20
- package/src/agent/useAgentCount.ts +2 -0
- package/src/attachment/AttachmentChipList.tsx +15 -0
- package/src/attachment/useAttachments.ts +14 -0
- package/src/composer/useComposer.ts +5 -0
- package/src/execution/ExecutionPhaseBadge.tsx +1 -1
- package/src/execution/McpToolDetail.tsx +18 -6
- package/src/execution/TodoList.tsx +8 -0
- package/src/execution/ToolArgsView.tsx +1 -0
- package/src/execution/UsageWidget.tsx +1 -1
- package/src/execution/file-path-resolver.ts +28 -4
- package/src/execution/index.ts +5 -1
- package/src/execution/useArtifactContent.ts +33 -0
- package/src/execution/useSubmitApproval.ts +2 -0
- package/src/github/GitHubRepoPicker.tsx +13 -0
- package/src/github/useGitHubConnection.ts +29 -1
- package/src/github/useGitHubRepos.ts +31 -0
- package/src/github/useGitHubSearch.ts +25 -0
- package/src/iam-policy/GrantAccessForm.tsx +198 -0
- package/src/iam-policy/OrgMembersPanel.tsx +572 -0
- package/src/iam-policy/RoleSelector.tsx +105 -0
- package/src/iam-policy/index.ts +51 -0
- package/src/iam-policy/useCreateIamPolicy.ts +66 -0
- package/src/iam-policy/useDeleteIamPolicy.ts +65 -0
- package/src/iam-policy/useGrantableRoles.ts +45 -0
- package/src/iam-policy/usePrincipalsCount.ts +96 -0
- package/src/iam-policy/useResourceAccess.ts +128 -0
- package/src/iam-policy/useRevokeOrgAccess.ts +74 -0
- package/src/iam-policy/useRoleSelector.ts +97 -0
- package/src/iam-policy/useWhoAmI.ts +78 -0
- package/src/identity-provider/CreateIdentityProviderForm.tsx +308 -0
- package/src/identity-provider/IdentityProviderDetailPanel.tsx +583 -0
- package/src/identity-provider/IdentityProviderListPanel.tsx +370 -0
- package/src/identity-provider/IdentityProviderWizard.tsx +684 -0
- package/src/identity-provider/ProviderPicker.tsx +152 -0
- package/src/identity-provider/SsoLoginPrompt.tsx +404 -0
- package/src/identity-provider/index.ts +67 -0
- package/src/identity-provider/presets.ts +262 -0
- package/src/identity-provider/useCreateIdentityProvider.ts +68 -0
- package/src/identity-provider/useDeleteIdentityProvider.ts +65 -0
- package/src/identity-provider/useIdentityProvider.ts +86 -0
- package/src/identity-provider/useIdentityProviderList.ts +100 -0
- package/src/identity-provider/useOidcDiscovery.ts +124 -0
- package/src/identity-provider/useSsoProvider.ts +99 -0
- package/src/identity-provider/useUpdateIdentityProvider.ts +69 -0
- package/src/index.ts +121 -1
- package/src/internal/CloudFeatureNotice.tsx +12 -0
- package/src/invitation/InvitationCreatedAlert.tsx +185 -0
- package/src/invitation/InvitationManager.tsx +842 -0
- package/src/invitation/InvitationRedemption.tsx +434 -0
- package/src/invitation/index.ts +16 -0
- package/src/invitation/useCreateInvitation.ts +83 -0
- package/src/invitation/useInvitationPreview.ts +103 -0
- package/src/invitation/useOrgInvitations.ts +88 -0
- package/src/invitation/useRedeemInvitation.ts +82 -0
- package/src/invitation/useRevokeInvitation.ts +66 -0
- package/src/library/detect-skill-package.ts +4 -1
- package/src/library/detect-stigmer-resource.ts +4 -1
- package/src/library/parse-resource-yaml.ts +12 -2
- package/src/mcp-server/McpServerDetailView.tsx +2 -1
- package/src/mcp-server/index.ts +4 -1
- package/src/mcp-server/mcpServerSetupReducer.ts +86 -8
- package/src/models/ModelSelector.tsx +9 -0
- package/src/models/registry.ts +11 -1
- package/src/models/useModelRegistry.ts +20 -0
- package/src/organization/OrgProfilePanel.tsx +451 -0
- package/src/organization/index.ts +6 -0
- package/src/organization/useOrganization.ts +79 -0
- package/src/organization/useUpdateOrganization.ts +71 -0
- package/src/provider.tsx +1 -0
- package/src/search/useResourceList.ts +6 -3
- package/src/search/useResourceSearch.ts +12 -3
- package/src/session/group-sessions.ts +23 -0
- package/src/session/index.ts +1 -0
- package/src/session/useCreateSession.ts +19 -3
- package/src/session/useSession.ts +24 -0
- package/src/session/useSessionArtifacts.ts +1 -0
- package/src/session/useSessionConversation.ts +7 -0
- package/src/session/useSessionExecutions.ts +23 -0
- package/src/session/useSessionList.ts +19 -0
- package/src/session/useSessionWriteBacks.ts +1 -0
- package/src/session/useUpdateSession.ts +22 -0
- package/src/skill/SkillPicker.tsx +15 -0
- package/src/usage/OrgUsagePanel.tsx +465 -0
- package/src/usage/date-range.ts +86 -0
- package/src/usage/index.ts +13 -0
- package/src/usage/useOrgUsageReport.ts +110 -0
- package/src/workspace/FolderBrowser.tsx +9 -0
- package/src/workspace/WorkspaceEditor.tsx +17 -0
- package/src/workspace/useFolderListing.ts +24 -0
- package/src/workspace/useWorkspaceEntries.ts +38 -0
- package/styles.css +1 -1
- package/usage/OrgUsagePanel.d.ts +24 -0
- package/usage/OrgUsagePanel.d.ts.map +1 -0
- package/usage/OrgUsagePanel.js +134 -0
- package/usage/OrgUsagePanel.js.map +1 -0
- package/usage/date-range.d.ts +36 -0
- package/usage/date-range.d.ts.map +1 -0
- package/usage/date-range.js +69 -0
- package/usage/date-range.js.map +1 -0
- package/usage/index.d.ts +7 -0
- package/usage/index.d.ts.map +1 -0
- package/usage/index.js +4 -0
- package/usage/index.js.map +1 -0
- package/usage/useOrgUsageReport.d.ts +48 -0
- package/usage/useOrgUsageReport.d.ts.map +1 -0
- package/usage/useOrgUsageReport.js +72 -0
- package/usage/useOrgUsageReport.js.map +1 -0
- package/workspace/FolderBrowser.d.ts +9 -0
- package/workspace/FolderBrowser.d.ts.map +1 -1
- package/workspace/FolderBrowser.js +9 -0
- package/workspace/FolderBrowser.js.map +1 -1
- package/workspace/WorkspaceEditor.d.ts +17 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +17 -0
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/useFolderListing.d.ts +24 -0
- package/workspace/useFolderListing.d.ts.map +1 -1
- package/workspace/useFolderListing.js +24 -0
- package/workspace/useFolderListing.js.map +1 -1
- package/workspace/useWorkspaceEntries.d.ts +38 -0
- package/workspace/useWorkspaceEntries.d.ts.map +1 -1
- package/workspace/useWorkspaceEntries.js +25 -0
- package/workspace/useWorkspaceEntries.js.map +1 -1
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState, type FormEvent } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { getUserMessage } from "@stigmer/sdk";
|
|
6
|
+
import type { IdentityProvider } from "@stigmer/protos/ai/stigmer/iam/identityprovider/v1/api_pb";
|
|
7
|
+
import { timestampDate, type Timestamp } from "@bufbuild/protobuf/wkt";
|
|
8
|
+
import { useUpdateIdentityProvider } from "./useUpdateIdentityProvider";
|
|
9
|
+
|
|
10
|
+
/** Props for {@link IdentityProviderDetailPanel}. */
|
|
11
|
+
export interface IdentityProviderDetailPanelProps {
|
|
12
|
+
/** The identity provider resource to display and edit. */
|
|
13
|
+
readonly identityProvider: IdentityProvider;
|
|
14
|
+
/** Fired with the updated resource after a successful save. */
|
|
15
|
+
readonly onUpdated?: (idp: IdentityProvider) => void;
|
|
16
|
+
/** Fired when the user clicks the back button. */
|
|
17
|
+
readonly onBack?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Pre-computed SSO login URL to display when the IdP is an SSO provider.
|
|
20
|
+
* Omit to hide the field. The consumer is responsible for constructing
|
|
21
|
+
* the URL (e.g., `${window.location.origin}/login?org=${orgSlug}`).
|
|
22
|
+
*/
|
|
23
|
+
readonly ssoLoginUrl?: string;
|
|
24
|
+
/** Additional CSS class names for the root container. */
|
|
25
|
+
readonly className?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* View and edit panel for an existing identity provider.
|
|
30
|
+
*
|
|
31
|
+
* In **view mode**, displays all OIDC configuration fields in a
|
|
32
|
+
* structured label/value layout with an "Edit" button.
|
|
33
|
+
*
|
|
34
|
+
* In **edit mode**, fields become editable inputs. The SSO toggle and
|
|
35
|
+
* OIDC client ID are editable. "Save" submits the update via
|
|
36
|
+
* {@link useUpdateIdentityProvider}; "Cancel" discards changes and
|
|
37
|
+
* returns to view mode.
|
|
38
|
+
*
|
|
39
|
+
* All visual properties flow through `--stgm-*` design tokens.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <IdentityProviderDetailPanel
|
|
44
|
+
* identityProvider={idp}
|
|
45
|
+
* onUpdated={(updated) => refetch()}
|
|
46
|
+
* onBack={() => setFlow({ phase: "idle" })}
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export function IdentityProviderDetailPanel({
|
|
51
|
+
identityProvider,
|
|
52
|
+
onUpdated,
|
|
53
|
+
onBack,
|
|
54
|
+
ssoLoginUrl,
|
|
55
|
+
className,
|
|
56
|
+
}: IdentityProviderDetailPanelProps) {
|
|
57
|
+
const spec = identityProvider.spec;
|
|
58
|
+
const meta = identityProvider.metadata;
|
|
59
|
+
|
|
60
|
+
const { update, isUpdating, error, clearError } =
|
|
61
|
+
useUpdateIdentityProvider();
|
|
62
|
+
const [mode, setMode] = useState<"view" | "edit">("view");
|
|
63
|
+
|
|
64
|
+
// Edit form state — initialized from current resource
|
|
65
|
+
const [displayName, setDisplayName] = useState(spec?.displayName ?? "");
|
|
66
|
+
const [jwksUri, setJwksUri] = useState(spec?.jwksUri ?? "");
|
|
67
|
+
const [issuers, setIssuers] = useState(
|
|
68
|
+
spec?.allowedIssuers.join(", ") ?? "",
|
|
69
|
+
);
|
|
70
|
+
const [audience, setAudience] = useState(spec?.expectedAudience ?? "");
|
|
71
|
+
const [userinfoEndpoint, setUserinfoEndpoint] = useState(
|
|
72
|
+
spec?.userinfoEndpoint ?? "",
|
|
73
|
+
);
|
|
74
|
+
const [isSso, setIsSso] = useState(spec?.isSsoProvider ?? false);
|
|
75
|
+
const [oidcClientId, setOidcClientId] = useState(
|
|
76
|
+
spec?.oidcClientId ?? "",
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const enterEdit = useCallback(() => {
|
|
80
|
+
setDisplayName(spec?.displayName ?? "");
|
|
81
|
+
setJwksUri(spec?.jwksUri ?? "");
|
|
82
|
+
setIssuers(spec?.allowedIssuers.join(", ") ?? "");
|
|
83
|
+
setAudience(spec?.expectedAudience ?? "");
|
|
84
|
+
setUserinfoEndpoint(spec?.userinfoEndpoint ?? "");
|
|
85
|
+
setIsSso(spec?.isSsoProvider ?? false);
|
|
86
|
+
setOidcClientId(spec?.oidcClientId ?? "");
|
|
87
|
+
clearError();
|
|
88
|
+
setMode("edit");
|
|
89
|
+
}, [spec, clearError]);
|
|
90
|
+
|
|
91
|
+
const cancelEdit = useCallback(() => {
|
|
92
|
+
clearError();
|
|
93
|
+
setMode("view");
|
|
94
|
+
}, [clearError]);
|
|
95
|
+
|
|
96
|
+
const handleSave = useCallback(
|
|
97
|
+
async (e: FormEvent) => {
|
|
98
|
+
e.preventDefault();
|
|
99
|
+
clearError();
|
|
100
|
+
try {
|
|
101
|
+
const updated = await update({
|
|
102
|
+
name: meta?.name ?? "",
|
|
103
|
+
slug: meta?.slug,
|
|
104
|
+
org: meta?.org ?? "",
|
|
105
|
+
displayName: displayName.trim(),
|
|
106
|
+
jwksUri: jwksUri.trim(),
|
|
107
|
+
allowedIssuers: issuers
|
|
108
|
+
.split(",")
|
|
109
|
+
.map((s) => s.trim())
|
|
110
|
+
.filter(Boolean),
|
|
111
|
+
expectedAudience: audience.trim(),
|
|
112
|
+
userinfoEndpoint: userinfoEndpoint.trim() || undefined,
|
|
113
|
+
isSsoProvider: isSso,
|
|
114
|
+
oidcClientId: isSso ? oidcClientId.trim() : undefined,
|
|
115
|
+
});
|
|
116
|
+
setMode("view");
|
|
117
|
+
onUpdated?.(updated);
|
|
118
|
+
} catch {
|
|
119
|
+
// error state is managed by useUpdateIdentityProvider
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
[
|
|
123
|
+
meta, displayName, jwksUri, issuers, audience,
|
|
124
|
+
userinfoEndpoint, isSso, oidcClientId, update, clearError, onUpdated,
|
|
125
|
+
],
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
const canSave =
|
|
129
|
+
displayName.trim() !== "" &&
|
|
130
|
+
jwksUri.trim() !== "" &&
|
|
131
|
+
issuers.trim() !== "" &&
|
|
132
|
+
audience.trim() !== "" &&
|
|
133
|
+
(!isSso || oidcClientId.trim() !== "") &&
|
|
134
|
+
!isUpdating;
|
|
135
|
+
|
|
136
|
+
const createdAt = identityProvider.status?.audit?.specAudit?.createdAt;
|
|
137
|
+
const updatedAt = identityProvider.status?.audit?.specAudit?.updatedAt;
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<div className={cn("space-y-4", className)}>
|
|
141
|
+
{/* Header */}
|
|
142
|
+
<div className="flex items-start justify-between gap-3">
|
|
143
|
+
<div className="min-w-0">
|
|
144
|
+
{onBack && (
|
|
145
|
+
<button
|
|
146
|
+
type="button"
|
|
147
|
+
onClick={onBack}
|
|
148
|
+
className="text-muted-foreground hover:text-foreground mb-1 flex items-center gap-1 text-xs transition-colors"
|
|
149
|
+
>
|
|
150
|
+
<ArrowLeftIcon />
|
|
151
|
+
Back to list
|
|
152
|
+
</button>
|
|
153
|
+
)}
|
|
154
|
+
<h3 className="text-foreground truncate text-sm font-semibold">
|
|
155
|
+
{spec?.displayName || meta?.name || "Identity Provider"}
|
|
156
|
+
</h3>
|
|
157
|
+
<div className="flex items-center gap-2">
|
|
158
|
+
{meta?.slug && (
|
|
159
|
+
<span className="text-muted-foreground font-mono text-xs">
|
|
160
|
+
{meta.slug}
|
|
161
|
+
</span>
|
|
162
|
+
)}
|
|
163
|
+
{spec?.isSsoProvider && (
|
|
164
|
+
<span className="inline-flex items-center rounded-full border border-primary/30 bg-primary-subtle px-2 py-0.5 text-[0.65rem] font-medium text-primary">
|
|
165
|
+
SSO
|
|
166
|
+
</span>
|
|
167
|
+
)}
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
{mode === "view" && (
|
|
172
|
+
<button
|
|
173
|
+
type="button"
|
|
174
|
+
onClick={enterEdit}
|
|
175
|
+
className={cn(
|
|
176
|
+
"shrink-0 rounded-md px-2.5 py-1.5 text-xs font-medium",
|
|
177
|
+
"text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
178
|
+
"transition-colors",
|
|
179
|
+
)}
|
|
180
|
+
>
|
|
181
|
+
Edit
|
|
182
|
+
</button>
|
|
183
|
+
)}
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
{/* Body */}
|
|
187
|
+
{mode === "view" ? (
|
|
188
|
+
<ViewMode
|
|
189
|
+
spec={spec}
|
|
190
|
+
ssoLoginUrl={ssoLoginUrl}
|
|
191
|
+
createdAt={createdAt}
|
|
192
|
+
updatedAt={updatedAt}
|
|
193
|
+
/>
|
|
194
|
+
) : (
|
|
195
|
+
<form onSubmit={handleSave} className="space-y-3">
|
|
196
|
+
<FieldInput
|
|
197
|
+
id="stgm-idp-edit-name"
|
|
198
|
+
label="Display name"
|
|
199
|
+
value={displayName}
|
|
200
|
+
onChange={setDisplayName}
|
|
201
|
+
placeholder="e.g., Acme Corp SSO"
|
|
202
|
+
disabled={isUpdating}
|
|
203
|
+
required
|
|
204
|
+
/>
|
|
205
|
+
<FieldInput
|
|
206
|
+
id="stgm-idp-edit-jwks"
|
|
207
|
+
label="JWKS URI"
|
|
208
|
+
value={jwksUri}
|
|
209
|
+
onChange={setJwksUri}
|
|
210
|
+
placeholder="https://example.com/.well-known/jwks.json"
|
|
211
|
+
disabled={isUpdating}
|
|
212
|
+
required
|
|
213
|
+
/>
|
|
214
|
+
<FieldInput
|
|
215
|
+
id="stgm-idp-edit-issuers"
|
|
216
|
+
label="Allowed issuers"
|
|
217
|
+
value={issuers}
|
|
218
|
+
onChange={setIssuers}
|
|
219
|
+
placeholder="https://issuer.example.com/"
|
|
220
|
+
hint="Comma-separated list of trusted JWT issuer values"
|
|
221
|
+
disabled={isUpdating}
|
|
222
|
+
required
|
|
223
|
+
/>
|
|
224
|
+
<FieldInput
|
|
225
|
+
id="stgm-idp-edit-audience"
|
|
226
|
+
label="Expected audience"
|
|
227
|
+
value={audience}
|
|
228
|
+
onChange={setAudience}
|
|
229
|
+
placeholder="stigmer-api"
|
|
230
|
+
disabled={isUpdating}
|
|
231
|
+
required
|
|
232
|
+
/>
|
|
233
|
+
<FieldInput
|
|
234
|
+
id="stgm-idp-edit-userinfo"
|
|
235
|
+
label="Userinfo endpoint"
|
|
236
|
+
value={userinfoEndpoint}
|
|
237
|
+
onChange={setUserinfoEndpoint}
|
|
238
|
+
placeholder="https://example.com/userinfo"
|
|
239
|
+
hint="Optional — used to fetch user profile data"
|
|
240
|
+
disabled={isUpdating}
|
|
241
|
+
/>
|
|
242
|
+
|
|
243
|
+
{/* SSO toggle */}
|
|
244
|
+
<div className="flex items-center gap-2">
|
|
245
|
+
<button
|
|
246
|
+
type="button"
|
|
247
|
+
role="switch"
|
|
248
|
+
aria-checked={isSso}
|
|
249
|
+
onClick={() => setIsSso((v) => !v)}
|
|
250
|
+
disabled={isUpdating}
|
|
251
|
+
className={cn(
|
|
252
|
+
"relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",
|
|
253
|
+
isSso ? "bg-primary" : "bg-muted",
|
|
254
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
255
|
+
)}
|
|
256
|
+
>
|
|
257
|
+
<span
|
|
258
|
+
className={cn(
|
|
259
|
+
"pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform",
|
|
260
|
+
isSso ? "translate-x-4" : "translate-x-0",
|
|
261
|
+
)}
|
|
262
|
+
/>
|
|
263
|
+
</button>
|
|
264
|
+
<span className="text-xs font-medium text-foreground">
|
|
265
|
+
SSO provider
|
|
266
|
+
</span>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
{isSso && (
|
|
270
|
+
<FieldInput
|
|
271
|
+
id="stgm-idp-edit-client-id"
|
|
272
|
+
label="OIDC client ID"
|
|
273
|
+
value={oidcClientId}
|
|
274
|
+
onChange={setOidcClientId}
|
|
275
|
+
placeholder="public-client-id"
|
|
276
|
+
hint="Client ID for the PKCE-based Authorization Code flow"
|
|
277
|
+
disabled={isUpdating}
|
|
278
|
+
required
|
|
279
|
+
/>
|
|
280
|
+
)}
|
|
281
|
+
|
|
282
|
+
{error && (
|
|
283
|
+
<p className="text-destructive text-[0.65rem]" role="alert">
|
|
284
|
+
{getUserMessage(error)}
|
|
285
|
+
</p>
|
|
286
|
+
)}
|
|
287
|
+
|
|
288
|
+
<div className="flex items-center gap-2 pt-1">
|
|
289
|
+
<button
|
|
290
|
+
type="submit"
|
|
291
|
+
disabled={!canSave}
|
|
292
|
+
className={cn(
|
|
293
|
+
"inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium",
|
|
294
|
+
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
295
|
+
"disabled:pointer-events-none disabled:opacity-40",
|
|
296
|
+
)}
|
|
297
|
+
>
|
|
298
|
+
{isUpdating && <SpinnerIcon />}
|
|
299
|
+
Save changes
|
|
300
|
+
</button>
|
|
301
|
+
<button
|
|
302
|
+
type="button"
|
|
303
|
+
onClick={cancelEdit}
|
|
304
|
+
disabled={isUpdating}
|
|
305
|
+
className={cn(
|
|
306
|
+
"rounded-md px-2.5 py-1.5 text-xs",
|
|
307
|
+
"text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
308
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
309
|
+
)}
|
|
310
|
+
>
|
|
311
|
+
Cancel
|
|
312
|
+
</button>
|
|
313
|
+
</div>
|
|
314
|
+
</form>
|
|
315
|
+
)}
|
|
316
|
+
</div>
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// ---------------------------------------------------------------------------
|
|
321
|
+
// View mode
|
|
322
|
+
// ---------------------------------------------------------------------------
|
|
323
|
+
|
|
324
|
+
function ViewMode({
|
|
325
|
+
spec,
|
|
326
|
+
ssoLoginUrl,
|
|
327
|
+
createdAt,
|
|
328
|
+
updatedAt,
|
|
329
|
+
}: {
|
|
330
|
+
spec: IdentityProvider["spec"];
|
|
331
|
+
ssoLoginUrl?: string;
|
|
332
|
+
createdAt?: Timestamp;
|
|
333
|
+
updatedAt?: Timestamp;
|
|
334
|
+
}) {
|
|
335
|
+
return (
|
|
336
|
+
<dl className="space-y-2.5">
|
|
337
|
+
<Field label="JWKS URI" value={spec?.jwksUri} mono />
|
|
338
|
+
<Field
|
|
339
|
+
label="Allowed issuers"
|
|
340
|
+
value={spec?.allowedIssuers.join(", ")}
|
|
341
|
+
mono
|
|
342
|
+
/>
|
|
343
|
+
<Field label="Expected audience" value={spec?.expectedAudience} mono />
|
|
344
|
+
{spec?.userinfoEndpoint && (
|
|
345
|
+
<Field label="Userinfo endpoint" value={spec.userinfoEndpoint} mono />
|
|
346
|
+
)}
|
|
347
|
+
{spec?.isSsoProvider && (
|
|
348
|
+
<Field label="OIDC client ID" value={spec.oidcClientId} mono />
|
|
349
|
+
)}
|
|
350
|
+
{spec?.isSsoProvider && ssoLoginUrl && (
|
|
351
|
+
<CopyableField
|
|
352
|
+
label="SSO login URL"
|
|
353
|
+
value={ssoLoginUrl}
|
|
354
|
+
hint="Share this URL with your team members to sign in via SSO"
|
|
355
|
+
/>
|
|
356
|
+
)}
|
|
357
|
+
{(spec?.rateLimitBudget ?? 0) > 0 && (
|
|
358
|
+
<Field
|
|
359
|
+
label="Rate limit"
|
|
360
|
+
value={`${spec!.rateLimitBudget} req/min`}
|
|
361
|
+
/>
|
|
362
|
+
)}
|
|
363
|
+
<div className="flex gap-6">
|
|
364
|
+
{createdAt && (
|
|
365
|
+
<Field
|
|
366
|
+
label="Created"
|
|
367
|
+
value={formatDate(timestampDate(createdAt))}
|
|
368
|
+
/>
|
|
369
|
+
)}
|
|
370
|
+
{updatedAt && (
|
|
371
|
+
<Field
|
|
372
|
+
label="Updated"
|
|
373
|
+
value={formatDate(timestampDate(updatedAt))}
|
|
374
|
+
/>
|
|
375
|
+
)}
|
|
376
|
+
</div>
|
|
377
|
+
</dl>
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function Field({
|
|
382
|
+
label,
|
|
383
|
+
value,
|
|
384
|
+
mono,
|
|
385
|
+
}: {
|
|
386
|
+
label: string;
|
|
387
|
+
value?: string;
|
|
388
|
+
mono?: boolean;
|
|
389
|
+
}) {
|
|
390
|
+
if (!value) return null;
|
|
391
|
+
return (
|
|
392
|
+
<div>
|
|
393
|
+
<dt className="text-muted-foreground text-[0.65rem] font-medium">
|
|
394
|
+
{label}
|
|
395
|
+
</dt>
|
|
396
|
+
<dd
|
|
397
|
+
className={cn(
|
|
398
|
+
"text-foreground mt-0.5 break-all text-xs",
|
|
399
|
+
mono && "font-mono",
|
|
400
|
+
)}
|
|
401
|
+
>
|
|
402
|
+
{value}
|
|
403
|
+
</dd>
|
|
404
|
+
</div>
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// ---------------------------------------------------------------------------
|
|
409
|
+
// View mode — copyable field
|
|
410
|
+
// ---------------------------------------------------------------------------
|
|
411
|
+
|
|
412
|
+
const COPIED_FEEDBACK_MS = 2000;
|
|
413
|
+
|
|
414
|
+
function CopyableField({
|
|
415
|
+
label,
|
|
416
|
+
value,
|
|
417
|
+
hint,
|
|
418
|
+
}: {
|
|
419
|
+
label: string;
|
|
420
|
+
value: string;
|
|
421
|
+
hint?: string;
|
|
422
|
+
}) {
|
|
423
|
+
const [copied, setCopied] = useState(false);
|
|
424
|
+
const valueId = "stgm-idp-sso-login-url";
|
|
425
|
+
|
|
426
|
+
const handleCopy = useCallback(async () => {
|
|
427
|
+
try {
|
|
428
|
+
await navigator.clipboard.writeText(value);
|
|
429
|
+
setCopied(true);
|
|
430
|
+
setTimeout(() => setCopied(false), COPIED_FEEDBACK_MS);
|
|
431
|
+
} catch {
|
|
432
|
+
const el = document.getElementById(valueId);
|
|
433
|
+
if (el) {
|
|
434
|
+
const selection = window.getSelection();
|
|
435
|
+
const range = document.createRange();
|
|
436
|
+
range.selectNodeContents(el);
|
|
437
|
+
selection?.removeAllRanges();
|
|
438
|
+
selection?.addRange(range);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}, [value]);
|
|
442
|
+
|
|
443
|
+
return (
|
|
444
|
+
<div>
|
|
445
|
+
<dt className="text-muted-foreground text-[0.65rem] font-medium">
|
|
446
|
+
{label}
|
|
447
|
+
</dt>
|
|
448
|
+
<dd className="mt-0.5">
|
|
449
|
+
<div className="flex items-center gap-2">
|
|
450
|
+
<span
|
|
451
|
+
id={valueId}
|
|
452
|
+
className="text-foreground break-all font-mono text-xs select-all"
|
|
453
|
+
>
|
|
454
|
+
{value}
|
|
455
|
+
</span>
|
|
456
|
+
<button
|
|
457
|
+
type="button"
|
|
458
|
+
onClick={handleCopy}
|
|
459
|
+
className={cn(
|
|
460
|
+
"shrink-0 rounded px-1.5 py-0.5 text-[0.6rem]",
|
|
461
|
+
"text-muted-foreground hover:text-foreground hover:bg-accent/50",
|
|
462
|
+
"transition-colors",
|
|
463
|
+
)}
|
|
464
|
+
aria-label={`Copy ${label}`}
|
|
465
|
+
>
|
|
466
|
+
{copied ? "Copied" : "Copy"}
|
|
467
|
+
</button>
|
|
468
|
+
</div>
|
|
469
|
+
{hint && (
|
|
470
|
+
<p className="text-muted-foreground mt-0.5 text-[0.65rem]">
|
|
471
|
+
{hint}
|
|
472
|
+
</p>
|
|
473
|
+
)}
|
|
474
|
+
<div
|
|
475
|
+
role="status"
|
|
476
|
+
aria-live="polite"
|
|
477
|
+
aria-atomic="true"
|
|
478
|
+
className="sr-only"
|
|
479
|
+
>
|
|
480
|
+
{copied && "SSO login URL copied to clipboard"}
|
|
481
|
+
</div>
|
|
482
|
+
</dd>
|
|
483
|
+
</div>
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// ---------------------------------------------------------------------------
|
|
488
|
+
// Shared primitives
|
|
489
|
+
// ---------------------------------------------------------------------------
|
|
490
|
+
|
|
491
|
+
function FieldInput({
|
|
492
|
+
id,
|
|
493
|
+
label,
|
|
494
|
+
value,
|
|
495
|
+
onChange,
|
|
496
|
+
placeholder,
|
|
497
|
+
hint,
|
|
498
|
+
disabled,
|
|
499
|
+
required,
|
|
500
|
+
}: {
|
|
501
|
+
id: string;
|
|
502
|
+
label: string;
|
|
503
|
+
value: string;
|
|
504
|
+
onChange: (v: string) => void;
|
|
505
|
+
placeholder: string;
|
|
506
|
+
hint?: string;
|
|
507
|
+
disabled?: boolean;
|
|
508
|
+
required?: boolean;
|
|
509
|
+
}) {
|
|
510
|
+
return (
|
|
511
|
+
<div className="space-y-1">
|
|
512
|
+
<label htmlFor={id} className="text-xs font-medium text-foreground">
|
|
513
|
+
{label}
|
|
514
|
+
</label>
|
|
515
|
+
<input
|
|
516
|
+
id={id}
|
|
517
|
+
type="text"
|
|
518
|
+
value={value}
|
|
519
|
+
onChange={(e) => onChange(e.target.value)}
|
|
520
|
+
placeholder={placeholder}
|
|
521
|
+
disabled={disabled}
|
|
522
|
+
required={required}
|
|
523
|
+
className={cn(
|
|
524
|
+
"w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-xs text-foreground",
|
|
525
|
+
"placeholder:text-muted-foreground",
|
|
526
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
527
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
528
|
+
)}
|
|
529
|
+
/>
|
|
530
|
+
{hint && (
|
|
531
|
+
<p className="text-[0.65rem] text-muted-foreground">{hint}</p>
|
|
532
|
+
)}
|
|
533
|
+
</div>
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
function formatDate(date: Date): string {
|
|
538
|
+
return date.toLocaleDateString(undefined, {
|
|
539
|
+
month: "short",
|
|
540
|
+
day: "numeric",
|
|
541
|
+
year: "numeric",
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// ---------------------------------------------------------------------------
|
|
546
|
+
// Icons
|
|
547
|
+
// ---------------------------------------------------------------------------
|
|
548
|
+
|
|
549
|
+
function ArrowLeftIcon() {
|
|
550
|
+
return (
|
|
551
|
+
<svg
|
|
552
|
+
width="12"
|
|
553
|
+
height="12"
|
|
554
|
+
viewBox="0 0 16 16"
|
|
555
|
+
fill="none"
|
|
556
|
+
stroke="currentColor"
|
|
557
|
+
strokeWidth="1.5"
|
|
558
|
+
strokeLinecap="round"
|
|
559
|
+
strokeLinejoin="round"
|
|
560
|
+
aria-hidden="true"
|
|
561
|
+
>
|
|
562
|
+
<path d="M10 3L5 8l5 5" />
|
|
563
|
+
</svg>
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
function SpinnerIcon() {
|
|
568
|
+
return (
|
|
569
|
+
<svg
|
|
570
|
+
width="12"
|
|
571
|
+
height="12"
|
|
572
|
+
viewBox="0 0 16 16"
|
|
573
|
+
fill="none"
|
|
574
|
+
stroke="currentColor"
|
|
575
|
+
strokeWidth="2"
|
|
576
|
+
strokeLinecap="round"
|
|
577
|
+
className="animate-spin"
|
|
578
|
+
aria-hidden="true"
|
|
579
|
+
>
|
|
580
|
+
<path d="M8 2a6 6 0 1 0 6 6" />
|
|
581
|
+
</svg>
|
|
582
|
+
);
|
|
583
|
+
}
|