This section provides an overview of the components available in the embed-react/src/components directory. These components are designed to be used in your React application to integrate with the Versori Embedded SDK.

DialogContent

Description

The DialogContent component is used to render the content of a dialog, including a title, description, and any additional children components.

Props

NameTypeRequiredDescription
childrenReactNodeNoAdditional content to be displayed inside the dialog.
titlestringYesThe title of the dialog, hidden visually but accessible to screen readers.
descriptionstringYesThe description of the dialog, hidden visually but accessible to screen readers.

Example

<DialogContent title="Dialog Title" description="Dialog Description">
  <p>Additional content goes here.</p>
</DialogContent>

IntegrationPage

Description

The IntegrationPage component displays a grid of integration tiles, allowing users to connect, manage, or disconnect integrations.

Props

NameTypeRequiredDescription
idstringNoThe unique identifier for the component.
classNamestringNoAdditional CSS classes for styling.
projectsUserProjectSummary[]YesA list of user projects to display as integration tiles.
onConnectClick(integrationId: string) => voidYesCallback for when the “Connect” button is clicked.
onManageClick(integrationId: string) => voidYesCallback for when the “Manage” button is clicked.
onDisconnectClick(integrationId: string) => voidYesCallback for when the “Disconnect” button is clicked.
isConnectingIdstringNoThe ID of the integration currently being connected.

Example

<IntegrationPage
  projects={projects}
  onConnectClick={handleConnect}
  onManageClick={handleManage}
  onDisconnectClick={handleDisconnect}
/>

ConnectButton

Description

The ConnectButton component is used to display a button for connecting, managing, or indicating the status of an integration.

Props

NameTypeRequiredDescription
isDeployedbooleanYesIndicates if the integration is deployed and available to end users.
isActivatedbooleanYesIndicates if the integration is activated for the user.
onClick(e: SyntheticEvent<HTMLButtonElement>) => voidYesCallback for button click events.
idstringNoThe unique identifier for the button.
classNamestringNoAdditional CSS classes for styling.

Example

<ConnectButton
  isDeployed={true}
  isActivated={false}
  onClick={handleClick}
/>

IntegrationTile

Description

The IntegrationTile component represents a single integration in the grid, displaying its name, image, and connection status.

Props

NameTypeRequiredDescription
idstringNoThe unique identifier for the tile.
classNamestringNoAdditional CSS classes for styling.
projectIdstringYesThe unique identifier for the project.
namestringYesThe name of the integration.
imageUrlstringNoThe URL of the image representing the integration.
descriptionstringYesA description of the integration.
isDeployedbooleanYesIndicates if the integration is deployed and available to end users.
isActivatedbooleanYesIndicates if the integration is activated for the user.
onConnectClick(integrationId: string) => voidYesCallback for when the “Connect” button is clicked.
onManageClick(integrationId: string) => voidYesCallback for when the “Manage” button is clicked.
onDisconnectClick(integrationId: string) => voidYesCallback for when the “Disconnect” button is clicked.
isConnectingbooleanNoIndicates if the integration is currently being connected.

Example

<IntegrationTile
  projectId="123"
  name="Integration Name"
  description="Integration Description"
  isDeployed={true}
  isActivated={false}
  onConnectClick={handleConnect}
  onManageClick={handleManage}
  onDisconnectClick={handleDisconnect}
/>

Connect

Description

The Connect component is the main entry point for managing integrations, providing a user interface for connecting and managing integration templates.

Props

NameTypeRequiredDescription
templatesTemplate[]YesA list of integration templates available for connection.
onConnect(templateId: string) => voidYesCallback triggered when a template is connected.

Example

<Connect templates={templates} onConnect={handleConnect} />

ConnectSingleTemplate

Description

The ConnectSingleTemplate component is used to manage a single integration template, allowing users to configure and connect it.

Props

NameTypeRequiredDescription
templateTemplateYesThe integration template to be managed.
onSave(template: Template) => voidYesCallback triggered when the template is saved.

Example

<ConnectSingleTemplate template={template} onSave={handleSave} />

CredentialDataBasicAuth

Description

The CredentialDataBasicAuth component handles the input and validation of credentials for Basic Authentication.

Props

NameTypeRequiredDescription
data{ basicAuth: { username: string; password: string; } }YesThe credential data for Basic Authentication, including username and password.
onDataChange(data: { basicAuth: { username: string; password: string; } }) => voidYesCallback triggered when the credential data changes.

Example

<CredentialDataBasicAuth
  data={{ basicAuth: { username: 'user', password: 'pass' } }}
  onDataChange={handleDataChange}
/>

CredentialDataBinary

Description

The CredentialDataBinary component handles the input and validation of binary credential data.

Props

NameTypeRequiredDescription
data{ binary: { binaryData: string; } }YesThe binary credential data, represented as a base64-encoded string.
onDataChange(data: { binary: { binaryData: string; } }) => voidYesCallback triggered when the credential data changes.

Example

<CredentialDataBinary
  data={{ binary: { binaryData: 'base64encodedstring' } }}
  onDataChange={handleDataChange}
/>

CredentialDataOAuth2ClientCredentials

Description

The CredentialDataOAuth2ClientCredentials component handles the input and validation of OAuth2 Client Credentials.

Props

NameTypeRequiredDescription
data{ oauth2Client: { clientId: string; clientSecret: string; } }YesThe OAuth2 Client Credentials data, including client ID and client secret.
onDataChange(data: { oauth2Client: { clientId: string; clientSecret: string; } }) => voidYesCallback triggered when the credential data changes.

Example

<CredentialDataOAuth2ClientCredentials
  data={{ oauth2Client: { clientId: 'client-id', clientSecret: 'client-secret' } }}
  onDataChange={handleDataChange}
/>

CredentialDataOAuth2Code

Description

The CredentialDataOAuth2Code component handles the input and validation of OAuth2 Code credentials.

Props

NameTypeRequiredDescription
data{ oauth2Code: { authorizationCode: string; redirectUri: string; } }YesThe OAuth2 Code credential data, including authorization code and redirect URI.
onDataChange(data: { oauth2Code: { authorizationCode: string; redirectUri: string; } }) => voidYesCallback triggered when the credential data changes.

Example

<CredentialDataOAuth2Code
  data={{ oauth2Code: { authorizationCode: 'auth-code', redirectUri: 'https://example.com/callback' } }}
  onDataChange={handleDataChange}
/>

CredentialDataOAuth2Password

Description

The CredentialDataOAuth2Password component handles the input and validation of OAuth2 Password credentials.

Props

NameTypeRequiredDescription
data{ oauth2Password: { username: string; password: string; } }YesThe OAuth2 Password credential data, including username and password.
onDataChange(data: { oauth2Password: { username: string; password: string; } }) => voidYesCallback triggered when the credential data changes.

Example

<CredentialDataOAuth2Password
  data={{ oauth2Password: { username: 'user', password: 'pass' } }}
  onDataChange={handleDataChange}
/>

CredentialDataString

Description

The CredentialDataString component handles the input and validation of string-based credential data.

Props

NameTypeRequiredDescription
data{ string: { value: string; } }YesThe string-based credential data, represented as a single string value.
onDataChange(data: { string: { value: string; } }) => voidYesCallback triggered when the credential data changes.

Example

<CredentialDataString
  data={{ string: { value: 'example-string' } }}
  onDataChange={handleDataChange}
/>