1 | import * as React from 'react';
|
2 | import { BearerInstance } from '@bearer/js';
|
3 | interface IBearerProviderProps {
|
4 | clientId: string;
|
5 | domObserver?: boolean;
|
6 | integrationHost?: string;
|
7 | initialContext?: any;
|
8 | onUpdate?(currentState: any): void;
|
9 | }
|
10 | export interface IBearerContextValue {
|
11 | bearer: BearerInstance;
|
12 | state: any;
|
13 | handlePropUpdates?(e: any): void;
|
14 | }
|
15 | export declare const BearerContext: React.Context<IBearerContextValue>;
|
16 | interface IBearerProviderState {
|
17 | bearer: BearerInstance;
|
18 | integrationState: any;
|
19 | }
|
20 | export default class BearerProvider extends React.Component<IBearerProviderProps, IBearerProviderState> {
|
21 | constructor(props: IBearerProviderProps);
|
22 | render(): JSX.Element;
|
23 | componentWillReceiveProps(newProps: IBearerProviderProps, oldProps: IBearerProviderProps): void;
|
24 | componentDidUpdate(_prevProps: IBearerProviderProps, prevState: any): void;
|
25 | private readonly handlePropUpdates;
|
26 | private initBearerFromProps;
|
27 | }
|
28 | export {};
|