embed-react/src/components
directory. These components are designed to be used in your React application to integrate with the Versori Embedded SDK.
DialogContent
component is used to render the content of a dialog, including a title, description, and any additional children components.
Name | Type | Required | Description |
---|---|---|---|
children | ReactNode | No | Additional content to be displayed inside the dialog. |
title | string | Yes | The title of the dialog, hidden visually but accessible to screen readers. |
description | string | Yes | The description of the dialog, hidden visually but accessible to screen readers. |
IntegrationPage
component displays a grid of integration tiles, allowing users to connect, manage, or disconnect integrations.
Name | Type | Required | Description |
---|---|---|---|
id | string | No | The unique identifier for the component. |
className | string | No | Additional CSS classes for styling. |
projects | UserProjectSummary[] | Yes | A list of user projects to display as integration tiles. |
onConnectClick | (integrationId: string) => void | Yes | Callback for when the “Connect” button is clicked. |
onManageClick | (integrationId: string) => void | Yes | Callback for when the “Manage” button is clicked. |
onDisconnectClick | (integrationId: string) => void | Yes | Callback for when the “Disconnect” button is clicked. |
isConnectingId | string | No | The ID of the integration currently being connected. |
ConnectButton
component is used to display a button for connecting, managing, or indicating the status of an integration.
Name | Type | Required | Description |
---|---|---|---|
isDeployed | boolean | Yes | Indicates if the integration is deployed and available to end users. |
isActivated | boolean | Yes | Indicates if the integration is activated for the user. |
onClick | (e: SyntheticEvent<HTMLButtonElement>) => void | Yes | Callback for button click events. |
id | string | No | The unique identifier for the button. |
className | string | No | Additional CSS classes for styling. |
IntegrationTile
component represents a single integration in the grid, displaying its name, image, and connection status.
Name | Type | Required | Description |
---|---|---|---|
id | string | No | The unique identifier for the tile. |
className | string | No | Additional CSS classes for styling. |
projectId | string | Yes | The unique identifier for the project. |
name | string | Yes | The name of the integration. |
imageUrl | string | No | The URL of the image representing the integration. |
description | string | Yes | A description of the integration. |
isDeployed | boolean | Yes | Indicates if the integration is deployed and available to end users. |
isActivated | boolean | Yes | Indicates if the integration is activated for the user. |
onConnectClick | (integrationId: string) => void | Yes | Callback for when the “Connect” button is clicked. |
onManageClick | (integrationId: string) => void | Yes | Callback for when the “Manage” button is clicked. |
onDisconnectClick | (integrationId: string) => void | Yes | Callback for when the “Disconnect” button is clicked. |
isConnecting | boolean | No | Indicates if the integration is currently being connected. |
Connect
component is the main entry point for managing integrations, providing a user interface for connecting and managing integration templates.
Name | Type | Required | Description |
---|---|---|---|
templates | Template[] | Yes | A list of integration templates available for connection. |
onConnect | (templateId: string) => void | Yes | Callback triggered when a template is connected. |
ConnectSingleTemplate
component is used to manage a single integration template, allowing users to configure and connect it.
Name | Type | Required | Description |
---|---|---|---|
template | Template | Yes | The integration template to be managed. |
onSave | (template: Template) => void | Yes | Callback triggered when the template is saved. |
CredentialDataBasicAuth
component handles the input and validation of credentials for Basic Authentication.
Name | Type | Required | Description |
---|---|---|---|
data | { basicAuth: { username: string; password: string; } } | Yes | The credential data for Basic Authentication, including username and password. |
onDataChange | (data: { basicAuth: { username: string; password: string; } }) => void | Yes | Callback triggered when the credential data changes. |
CredentialDataBinary
component handles the input and validation of binary credential data.
Name | Type | Required | Description |
---|---|---|---|
data | { binary: { binaryData: string; } } | Yes | The binary credential data, represented as a base64-encoded string. |
onDataChange | (data: { binary: { binaryData: string; } }) => void | Yes | Callback triggered when the credential data changes. |
CredentialDataOAuth2ClientCredentials
component handles the input and validation of OAuth2 Client Credentials.
Name | Type | Required | Description |
---|---|---|---|
data | { oauth2Client: { clientId: string; clientSecret: string; } } | Yes | The OAuth2 Client Credentials data, including client ID and client secret. |
onDataChange | (data: { oauth2Client: { clientId: string; clientSecret: string; } }) => void | Yes | Callback triggered when the credential data changes. |
CredentialDataOAuth2Code
component handles the input and validation of OAuth2 Code credentials.
Name | Type | Required | Description |
---|---|---|---|
data | { oauth2Code: { authorizationCode: string; redirectUri: string; } } | Yes | The OAuth2 Code credential data, including authorization code and redirect URI. |
onDataChange | (data: { oauth2Code: { authorizationCode: string; redirectUri: string; } }) => void | Yes | Callback triggered when the credential data changes. |
CredentialDataOAuth2Password
component handles the input and validation of OAuth2 Password credentials.
Name | Type | Required | Description |
---|---|---|---|
data | { oauth2Password: { username: string; password: string; } } | Yes | The OAuth2 Password credential data, including username and password. |
onDataChange | (data: { oauth2Password: { username: string; password: string; } }) => void | Yes | Callback triggered when the credential data changes. |
CredentialDataString
component handles the input and validation of string-based credential data.
Name | Type | Required | Description |
---|---|---|---|
data | { string: { value: string; } } | Yes | The string-based credential data, represented as a single string value. |
onDataChange | (data: { string: { value: string; } }) => void | Yes | Callback triggered when the credential data changes. |