4.0.0 • Published 15 days ago

@pyramid-embed/embed-react v4.0.0

Weekly downloads
2
License
ISC
Repository
-
Last release
15 days ago

Pyramid Embed React

The wrapper for @pyramid-embed/embed-js

Installation

yarn add @pyramid-embed/embed-react
npm i @pyramid-embed/embed-react

API documentation

Please check online help for the general documentation.

Usage

import { PyramidEmbedContainer } from '@pyramid-embed/embed-react';
<PyramidEmbedContainer host="http://pyramid:8181" options={embedOptions} />

Properties

  • host: string - URL of the Pyramid instance
  • options: EmbedOptions - embed options
  • loginType?: "none" | "forms" | "windows" | "saml" - authentication type
  • userName?: string - username, used when loginType="forms"
  • password?: string - password, used when loginType="forms"
  • authToken?: string - Pyramid authentication token
  • samlToken?: string - SAML token
  • style?: object - apply styles to the container element
  • className?: string - apply a className to the container element
  • authFailureCallback?: Function - a function that will be called when the embed token has expired

Examples

Basic

The code example uses existing embed auth cookie.
const embedOptions = {
    contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df'
}

<PyramidEmbedContainer
    host="http://pyramid:8181"
    options={embedOptions}
    style={{width: 1280, height: 720}}
/>

Windows authentication

const embedOptions = {
    contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df'
}

<PyramidEmbedContainer
    host="http://pyramid:8181"
    options={embedOptions}
    loginType="windows"
    style={{width: 1280, height: 720}}
/>

Filtering

The code example uses existing embed auth cookie.
import { PyramidEmbedContainer, Filter } from '@pyramid-embed/embed-react';

const filter = Filter.create().addUniqueName('[customer].[country].[France]');
const embedOptions = {
    contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df',
    filters: filter
}

<PyramidEmbedContainer
    host="http://pyramid:8181"
    options={embedOptions}
    style={{width: 1280, height: 720}}
/>

Further help

For more help on embedding with Pyramid, especially instructions on authentication, scenarios and use of REST APIs together with embedding, please see online help.

4.0.0

15 days ago

3.0.0

11 months ago

2.0.13

3 years ago

2.0.11

3 years ago

2.0.8

4 years ago

2.0.7

4 years ago