JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 46
  • Score
    100M100P100Q64054F
  • License MIT

Collection of APIs and constants for the React SDK.

Package Exports

  • @acoustic-content-sdk/react-api

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@acoustic-content-sdk/react-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm

API Documentation

Home > @acoustic-content-sdk/react-api

react-api package

Collection of APIs and constants for the React SDK

Functions

Function Description
assertProvider(aValue, aContext, aParentContext) Validates that the value is not nil and throws an exception otherwise
createReactContext(aName, aDefault) Construct the react context and make sure we set the display name
createReactProvider(module, provides, dependencies, optionalDependencies) Constructs an instance of a provider

Interfaces

Interface Description
ComponentRegistry
ComponentResolver
ComponentTypeRefResolver Service that resolves a component type ref given a layout.
ContentComponentProps
DynamicReactProviderFactory
InjectableReactProviderFactory
ReactComponentProps Properties of a rendering component
ReactModuleProps Input properties for dynamically generated react modules
ReactProvider Declares a react provider. The provider declares the provided context and its dependencies.Refer to https://reactjs.org/docs/context.html
ReactWchPageService Service interface that allows to resolve a rendering context given the page.

Variables

Variable Description
createDynamicReactProvider Creates a ReactProvider that resolves its mandatory and optional elements and delegates the creation of the provided value to a callback function with these dependencies. The callback returns an observable and the observable sequence will be provided.
createInjectableReactProvider Creates a ReactProvider that resolves its mandatory and optional elements and delegates the creation of the provided value to a callback function with these dependencies.
createModuleFromProvider Constructs a module component that includes the referenced providers in topological order
selectDisplayName Returns the display name of a context
VERSION Version and build number of the package
WCH_CONTEXT_API_URL URL to access the API layerNaming of this field according to the field in the rendering context
WCH_CONTEXT_AUTH_STATUS Injection token for the AuthStatus
WCH_CONTEXT_BASE_URL URL that represents the base URL of the path based routing of the application. This prefix will be preserved when generating and recognizing URLs. If this property is not configured, then it will be decoded from the window location.
WCH_CONTEXT_COMPONENT_REGISTRY
WCH_CONTEXT_COMPONENT_RESOLVER
WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS A multi-provider token used for dependency injection of the ComponentTypeRefResolvers.
WCH_CONTEXT_CONTENT_COMPONENT Injection token for the content component
WCH_CONTEXT_DEFAULT_COMPONENT Injection token for the default component
WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER Injection token for the DeliveryContentResolver
WCH_CONTEXT_DELIVERY_CONTENT_SEED Injection token for the content seed
WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER Injection token for the DeliveryLayoutMappingResolver
WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED Injection token for the layout mapping seed
WCH_CONTEXT_DELIVERY_LAYOUT_RESOLVER Injection token for the DeliveryLayoutResolver
WCH_CONTEXT_DELIVERY_LAYOUT_SEED Injection token for the layout seed
WCH_CONTEXT_DELIVERY_PAGE_RESOLVER Injection token for the DeliveryPageResolver
WCH_CONTEXT_DELIVERY_PAGE_SEED Injection token for the page seed
WCH_CONTEXT_DELIVERY_SEARCH_RESOLVER Injection token for the DeliverySearchResolver
WCH_CONTEXT_DELIVERY_SITE_RESOLVER Injection token for the navigation service
WCH_CONTEXT_DELIVERY_TYPE_RESOLVER Injection token for the DeliveryTypeResolver
WCH_CONTEXT_DELIVERY_TYPE_SEED Injection token for the type seed
WCH_CONTEXT_DYNAMIC_LOGGER_FACTORY
WCH_CONTEXT_HANDLEBARS_RESOLVER Injection token for the HandlebarsResolver
WCH_CONTEXT_LAYOUT_MAPPING_RESOLVER Injection token for the LayoutMappingResolver
WCH_CONTEXT_LAYOUT_RESOLVER Injection token for the LayoutResolver
WCH_CONTEXT_LOGGER_FACTORY
WCH_CONTEXT_LOGGER_SERVICE
WCH_CONTEXT_PAGE_COMPONENT Injection token for the page component
WCH_CONTEXT_PAGE_SERVICE Injection token for the ReactWchPageService
WCH_CONTEXT_PROTECTED_CONTENT Injection token for the protected content status
WCH_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER Injection token for the ReconciledDeliverySearchResolver
WCH_CONTEXT_RENDERING_CONTEXT_PROVIDER Injection token for the RenderingContextProviderV2
WCH_CONTEXT_RENDERING_CONTEXT_RESOLVER Injection token for the RenderingContextResolver
WCH_CONTEXT_RESOURCE_URL URL to access the deliveryNaming of this field according to the field in the rendering context
WCH_CONTEXT_SEED_RESOLVER Injection token for the SeedResolver
WCH_CONTEXT_URL_CONFIG Injection token for the UrlConfig
WCH_CONTEXT_WINDOW Create a new injection token for injecting the window into a component.
WCH_RC_INTERCEPTOR_TOKEN

Type Aliases

Type Alias Description
ComponentTypeRef Captures all information required to instantiate a component based on its type
ReactComponent Definition of a generic react component
ReactModule Type definition for the react component for a module
ReactModuleType Type definition for the react component for a module

Home > @acoustic-content-sdk/react-api > assertProvider

assertProvider() function

Validates that the value is not nil and throws an exception otherwise

Signature:

export declare function assertProvider<T>(aValue: T, aContext: Context<T>, aParentContext?: Context<any>): NonNullable<T>;

Parameters

Parameter Type Description
aValue T value to check
aContext Context<T> the context, for debugging purposes
aParentContext Context<any>

Returns:

NonNullable<T>

the original value, guaranteed that it will not be nil

Home > @acoustic-content-sdk/react-api > createReactContext

createReactContext() function

Construct the react context and make sure we set the display name

Signature:

export declare function createReactContext<T>(aName: string, aDefault?: T): Required<Context<T>>;

Parameters

Parameter Type Description
aName string the display name
aDefault T optionally a default value

Returns:

Required<Context<T>>

the context with mandatory displayName field

Home > @acoustic-content-sdk/react-api > createReactProvider

createReactProvider() function

Constructs an instance of a provider

Signature:

export declare function createReactProvider<T>(module: ReactModuleType, provides: Context<T>, dependencies?: Array<Context<any>>, optionalDependencies?: Array<Context<any>>): ReactProvider<T>;

Parameters

Parameter Type Description
module ReactModuleType the module
provides Context<T> the context the module provides
dependencies Array<Context<any>> dependencies
optionalDependencies Array<Context<any>> optional dependencies

Returns:

ReactProvider<T>

the provider instance

Home > @acoustic-content-sdk/react-api > ComponentRegistry

ComponentRegistry interface

Signature:

export interface ComponentRegistry extends AbstractComponentsRegistry<ComponentTypeRef> 

Methods

Method Description
registerType(aController, aType, aLayoutModes) Registers the type given a full spec
registerType(aType) Registers the type and assumes that a decorator has specified the controller

Home > @acoustic-content-sdk/react-api > ComponentResolver

ComponentResolver interface

Signature:

export interface ComponentResolver extends AbstractComponentResolver<ComponentTypeRef> 

Methods

Method Description
resolveComponent(aRenderingContext, aLayoutMode)

Home > @acoustic-content-sdk/react-api > ComponentTypeRefResolver

ComponentTypeRefResolver interface

Service that resolves a component type ref given a layout.

Signature:

export interface ComponentTypeRefResolver extends AbstractComponentTypeRefResolver<ComponentTypeRef> 

Properties

Property Type Description
getTypeByLayout (aLayout: Layout, aLayoutMode?: string) => Observable<ComponentTypeRef> Returns the type object based on the layout configuration

Home > @acoustic-content-sdk/react-api > ContentComponentProps

ContentComponentProps interface

Signature:

export interface ContentComponentProps 

Properties

Property Type Description
ctx RenderingContextInput Rendering context used to render the component reference
id string Points to a piece of external content
layoutMode string Optional layout mode

Home > @acoustic-content-sdk/react-api > DynamicReactProviderFactory

DynamicReactProviderFactory interface

Signature:

export interface DynamicReactProviderFactory 

Home > @acoustic-content-sdk/react-api > InjectableReactProviderFactory

InjectableReactProviderFactory interface

Signature:

export interface InjectableReactProviderFactory 

Home > @acoustic-content-sdk/react-api > ReactComponentProps

ReactComponentProps interface

Properties of a rendering component

Signature:

export interface ReactComponentProps 

Properties

Property Type Description
layoutMode string Layout mode used to render the component
renderingContext RenderingContextV2 Rendering context that contains the required information about the data item to be rendered

Home > @acoustic-content-sdk/react-api > ReactModuleProps

ReactModuleProps interface

Input properties for dynamically generated react modules

Signature:

export interface ReactModuleProps 

Properties

Property Type Description
children ReactNode

Home > @acoustic-content-sdk/react-api > ReactProvider

ReactProvider interface

Declares a react provider. The provider declares the provided context and its dependencies.

Refer to https://reactjs.org/docs/context.html

Signature:

export interface ReactProvider<T> 

Properties

Property Type Description
dependencies Array<Context<any>> Required contexts, will be consumed when the module gets instantiated
module ReactModuleType React component that implements the provider. The component consumes the dependencies and the optional dependencies and provides the specified context.
optionalDependencies Array<Context<any>> optional contexts
provides Context<T> Provided context

Home > @acoustic-content-sdk/react-api > ReactWchPageService

ReactWchPageService interface

Service interface that allows to resolve a rendering context given the page.

Signature:

export interface ReactWchPageService extends WchPageService 

Methods

Method Description
getRenderingContextByActivatedRoute(aRoute) Resolves the rendering context given the router

Home > @acoustic-content-sdk/react-api > createDynamicReactProvider

createDynamicReactProvider variable

Creates a ReactProvider that resolves its mandatory and optional elements and delegates the creation of the provided value to a callback function with these dependencies. The callback returns an observable and the observable sequence will be provided.

Signature:

createDynamicReactProvider: DynamicReactProviderFactory

Home > @acoustic-content-sdk/react-api > createInjectableReactProvider

createInjectableReactProvider variable

Creates a ReactProvider that resolves its mandatory and optional elements and delegates the creation of the provided value to a callback function with these dependencies.

Signature:

createInjectableReactProvider: InjectableReactProviderFactory

Home > @acoustic-content-sdk/react-api > createModuleFromProvider

createModuleFromProvider variable

Constructs a module component that includes the referenced providers in topological order

Signature:

createModuleFromProvider: (aProviders: ReactProvider<any>[]) => import("../public_api").ReactComponent<ReactModuleProps, any>

Home > @acoustic-content-sdk/react-api > selectDisplayName

selectDisplayName variable

Returns the display name of a context

Signature:

selectDisplayName: (aCtx: Context<any>) => string

Home > @acoustic-content-sdk/react-api > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_API_URL

WCH_CONTEXT_API_URL variable

URL to access the API layer

Naming of this field according to the field in the rendering context

Signature:

WCH_CONTEXT_API_URL: Required<import("react").Context<HubInfoUrlProvider>>

Example 1

'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1'

Example 2

'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_AUTH_STATUS

WCH_CONTEXT_AUTH_STATUS variable

Injection token for the AuthStatus

Signature:

WCH_CONTEXT_AUTH_STATUS: Required<import("react").Context<AuthStatus>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_BASE_URL

WCH_CONTEXT_BASE_URL variable

URL that represents the base URL of the path based routing of the application. This prefix will be preserved when generating and recognizing URLs. If this property is not configured, then it will be decoded from the window location.

Signature:

WCH_CONTEXT_BASE_URL: Required<import("react").Context<HubInfoUrlProvider>>

Example 1

'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'

Example 2

'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'

Example 3

'https://my.external.example.com/'

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_COMPONENT_REGISTRY

WCH_CONTEXT_COMPONENT_REGISTRY variable

Signature:

WCH_CONTEXT_COMPONENT_REGISTRY: Required<import("react").Context<ComponentRegistry>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_COMPONENT_RESOLVER

WCH_CONTEXT_COMPONENT_RESOLVER variable

Signature:

WCH_CONTEXT_COMPONENT_RESOLVER: Required<import("react").Context<ComponentResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS

WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS variable

A multi-provider token used for dependency injection of the ComponentTypeRefResolvers.

Signature:

WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS: Required<import("react").Context<ComponentTypeRefResolver[]>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_CONTENT_COMPONENT

WCH_CONTEXT_CONTENT_COMPONENT variable

Injection token for the content component

Signature:

WCH_CONTEXT_CONTENT_COMPONENT: Required<import("react").Context<import("../../type/type.ref").ReactComponent<ContentComponentProps, any>>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DEFAULT_COMPONENT

WCH_CONTEXT_DEFAULT_COMPONENT variable

Injection token for the default component

Signature:

WCH_CONTEXT_DEFAULT_COMPONENT: Required<import("react").Context<import("../../type/type.ref").ReactComponent<ReactComponentProps, any>>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER

WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER variable

Injection token for the DeliveryContentResolver

Signature:

WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER: Required<import("react").Context<DeliveryContentResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_CONTENT_SEED

WCH_CONTEXT_DELIVERY_CONTENT_SEED variable

Injection token for the content seed

Signature:

WCH_CONTEXT_DELIVERY_CONTENT_SEED: Required<import("react").Context<string>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER

WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER variable

Injection token for the DeliveryLayoutMappingResolver

Signature:

WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER: Required<import("react").Context<DeliveryLayoutMappingResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED

WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED variable

Injection token for the layout mapping seed

Signature:

WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED: Required<import("react").Context<string>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_LAYOUT_RESOLVER

WCH_CONTEXT_DELIVERY_LAYOUT_RESOLVER variable

Injection token for the DeliveryLayoutResolver

Signature:

WCH_CONTEXT_DELIVERY_LAYOUT_RESOLVER: Required<import("react").Context<DeliveryLayoutResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_LAYOUT_SEED

WCH_CONTEXT_DELIVERY_LAYOUT_SEED variable

Injection token for the layout seed

Signature:

WCH_CONTEXT_DELIVERY_LAYOUT_SEED: Required<import("react").Context<string>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_PAGE_RESOLVER

WCH_CONTEXT_DELIVERY_PAGE_RESOLVER variable

Injection token for the DeliveryPageResolver

Signature:

WCH_CONTEXT_DELIVERY_PAGE_RESOLVER: Required<import("react").Context<DeliveryPageResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_PAGE_SEED

WCH_CONTEXT_DELIVERY_PAGE_SEED variable

Injection token for the page seed

Signature:

WCH_CONTEXT_DELIVERY_PAGE_SEED: Required<import("react").Context<string>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_SEARCH_RESOLVER

WCH_CONTEXT_DELIVERY_SEARCH_RESOLVER variable

Injection token for the DeliverySearchResolver

Signature:

WCH_CONTEXT_DELIVERY_SEARCH_RESOLVER: Required<import("react").Context<DeliverySearchResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_SITE_RESOLVER

WCH_CONTEXT_DELIVERY_SITE_RESOLVER variable

Injection token for the navigation service

Signature:

WCH_CONTEXT_DELIVERY_SITE_RESOLVER: Required<import("react").Context<DeliverySiteResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_TYPE_RESOLVER

WCH_CONTEXT_DELIVERY_TYPE_RESOLVER variable

Injection token for the DeliveryTypeResolver

Signature:

WCH_CONTEXT_DELIVERY_TYPE_RESOLVER: Required<import("react").Context<DeliveryTypeResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DELIVERY_TYPE_SEED

WCH_CONTEXT_DELIVERY_TYPE_SEED variable

Injection token for the type seed

Signature:

WCH_CONTEXT_DELIVERY_TYPE_SEED: Required<import("react").Context<string>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_DYNAMIC_LOGGER_FACTORY

WCH_CONTEXT_DYNAMIC_LOGGER_FACTORY variable

Signature:

WCH_CONTEXT_DYNAMIC_LOGGER_FACTORY: Required<import("react").Context<DynamicLoggerFactory>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_HANDLEBARS_RESOLVER

WCH_CONTEXT_HANDLEBARS_RESOLVER variable

Injection token for the HandlebarsResolver

Signature:

WCH_CONTEXT_HANDLEBARS_RESOLVER: Required<import("react").Context<HandlebarsResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_LAYOUT_MAPPING_RESOLVER

WCH_CONTEXT_LAYOUT_MAPPING_RESOLVER variable

Injection token for the LayoutMappingResolver

Signature:

WCH_CONTEXT_LAYOUT_MAPPING_RESOLVER: Required<import("react").Context<LayoutMappingResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_LAYOUT_RESOLVER

WCH_CONTEXT_LAYOUT_RESOLVER variable

Injection token for the LayoutResolver

Signature:

WCH_CONTEXT_LAYOUT_RESOLVER: Required<import("react").Context<LayoutResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_LOGGER_FACTORY

WCH_CONTEXT_LOGGER_FACTORY variable

Signature:

WCH_CONTEXT_LOGGER_FACTORY: Required<import("react").Context<LoggerFactory>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_LOGGER_SERVICE

WCH_CONTEXT_LOGGER_SERVICE variable

Signature:

WCH_CONTEXT_LOGGER_SERVICE: Required<import("react").Context<LoggerService>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_PAGE_COMPONENT

WCH_CONTEXT_PAGE_COMPONENT variable

Injection token for the page component

Signature:

WCH_CONTEXT_PAGE_COMPONENT: Required<import("react").Context<import("../../type/type.ref").ReactComponent<RouteComponentProps<{}, import("react-router").StaticContext, {}>, any>>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_PAGE_SERVICE

WCH_CONTEXT_PAGE_SERVICE variable

Injection token for the ReactWchPageService

Signature:

WCH_CONTEXT_PAGE_SERVICE: Required<import("react").Context<ReactWchPageService>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_PROTECTED_CONTENT

WCH_CONTEXT_PROTECTED_CONTENT variable

Injection token for the protected content status

Signature:

WCH_CONTEXT_PROTECTED_CONTENT: Required<import("react").Context<ProtectedContent>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER

WCH_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER variable

Injection token for the ReconciledDeliverySearchResolver

Signature:

WCH_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER: Required<import("react").Context<ReconciledDeliverySearchResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_RENDERING_CONTEXT_PROVIDER

WCH_CONTEXT_RENDERING_CONTEXT_PROVIDER variable

Injection token for the RenderingContextProviderV2

Signature:

WCH_CONTEXT_RENDERING_CONTEXT_PROVIDER: Required<import("react").Context<RenderingContextProviderV2>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_RENDERING_CONTEXT_RESOLVER

WCH_CONTEXT_RENDERING_CONTEXT_RESOLVER variable

Injection token for the RenderingContextResolver

Signature:

WCH_CONTEXT_RENDERING_CONTEXT_RESOLVER: Required<import("react").Context<RenderingContextResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_RESOURCE_URL

WCH_CONTEXT_RESOURCE_URL variable

URL to access the delivery

Naming of this field according to the field in the rendering context

Signature:

WCH_CONTEXT_RESOURCE_URL: Required<import("react").Context<HubInfoUrlProvider>>

Example 1

'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'

Example 2

'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_SEED_RESOLVER

WCH_CONTEXT_SEED_RESOLVER variable

Injection token for the SeedResolver

Signature:

WCH_CONTEXT_SEED_RESOLVER: Required<import("react").Context<SeedResolver>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_URL_CONFIG

WCH_CONTEXT_URL_CONFIG variable

Injection token for the UrlConfig

Signature:

WCH_CONTEXT_URL_CONFIG: Required<import("react").Context<Observable<UrlConfig>>>

Home > @acoustic-content-sdk/react-api > WCH_CONTEXT_WINDOW

WCH_CONTEXT_WINDOW variable

Create a new injection token for injecting the window into a component.

Signature:

WCH_CONTEXT_WINDOW: Required<import("react").Context<WindowType>>

Home > @acoustic-content-sdk/react-api > WCH_RC_INTERCEPTOR_TOKEN

WCH_RC_INTERCEPTOR_TOKEN variable

Signature:

WCH_RC_INTERCEPTOR_TOKEN = "8453750A-4519-4184-840B-D490E909D23E"

Home > @acoustic-content-sdk/react-api > ComponentTypeRef

ComponentTypeRef type

Captures all information required to instantiate a component based on its type

Signature:

export declare type ComponentTypeRef<P = ReactComponentProps> = ReactComponent<P>;

Home > @acoustic-content-sdk/react-api > ReactComponent

ReactComponent type

Definition of a generic react component

Signature:

export declare type ReactComponent<P = ReactComponentProps, DS = any> = FunctionComponent<P> | ComponentClass<P, DS>;

Home > @acoustic-content-sdk/react-api > ReactModule

ReactModule type

Type definition for the react component for a module

Signature:

export declare type ReactModule = ReactComponent<ReactModuleProps>;

Home > @acoustic-content-sdk/react-api > ReactModuleType

ReactModuleType type

Type definition for the react component for a module

Signature:

export declare type ReactModuleType = ReactModule;

Home > @acoustic-content-sdk/react-api > ContentComponentProps > ctx

ContentComponentProps.ctx property

Rendering context used to render the component reference

Signature:

ctx?: RenderingContextInput;

Home > @acoustic-content-sdk/react-api > ContentComponentProps > id

ContentComponentProps.id property

Points to a piece of external content

Signature:

[KEY_ID]?: string;

Home > @acoustic-content-sdk/react-api > ContentComponentProps > layoutMode

ContentComponentProps.layoutMode property

Optional layout mode

Signature:

[KEY_LAYOUT_MODE]?: string;

Home > @acoustic-content-sdk/react-api > ComponentResolver > resolveComponent

ComponentResolver.resolveComponent() method

Signature:

resolveComponent(aRenderingContext: RenderingContextV2, aLayoutMode?: string): Observable<ComponentTypeRef>;

Parameters

Parameter Type Description
aRenderingContext RenderingContextV2
aLayoutMode string

Returns:

Observable<ComponentTypeRef>

Home > @acoustic-content-sdk/react-api > ComponentRegistry > registerType

ComponentRegistry.registerType() method

Registers the type given a full spec

Signature:

registerType(aController: string | string[], aType: ComponentTypeRef, aLayoutModes?: string | string[]): void;

Parameters

Parameter Type Description
aController string | string[]
aType ComponentTypeRef
aLayoutModes string | string[]

Returns:

void

Home > @acoustic-content-sdk/react-api > ComponentRegistry > registerType

ComponentRegistry.registerType() method

Registers the type and assumes that a decorator has specified the controller

Signature:

registerType(aType: ComponentTypeRef): void;

Parameters

Parameter Type Description
aType ComponentTypeRef

Returns:

void

Home > @acoustic-content-sdk/react-api > ComponentTypeRefResolver > getTypeByLayout

ComponentTypeRefResolver.getTypeByLayout property

Returns the type object based on the layout configuration

Signature:

getTypeByLayout: (aLayout: Layout, aLayoutMode?: string) => Observable<ComponentTypeRef>;

Home > @acoustic-content-sdk/react-api > ReactProvider > dependencies

ReactProvider.dependencies property

Required contexts, will be consumed when the module gets instantiated

Signature:

dependencies?: Array<Context<any>>;

Home > @acoustic-content-sdk/react-api > ReactProvider > module

ReactProvider.module property

React component that implements the provider. The component consumes the dependencies and the optional dependencies and provides the specified context.

Signature:

module: ReactModuleType;

Home > @acoustic-content-sdk/react-api > ReactProvider > optionalDependencies

ReactProvider.optionalDependencies property

optional contexts

Signature:

optionalDependencies?: Array<Context<any>>;

Home > @acoustic-content-sdk/react-api > ReactProvider > provides

ReactProvider.provides property

Provided context

Signature:

provides: Context<T>;

Home > @acoustic-content-sdk/react-api > ReactModuleProps > children

ReactModuleProps.children property

Signature:

children?: ReactNode;

Home > @acoustic-content-sdk/react-api > ReactComponentProps > layoutMode

ReactComponentProps.layoutMode property

Layout mode used to render the component

Signature:

[KEY_LAYOUT_MODE]?: string;

Home > @acoustic-content-sdk/react-api > ReactComponentProps > renderingContext

ReactComponentProps.renderingContext property

Rendering context that contains the required information about the data item to be rendered

Signature:

[KEY_RENDERING_CONTEXT]: RenderingContextV2;

Home > @acoustic-content-sdk/react-api > ReactWchPageService > getRenderingContextByActivatedRoute

ReactWchPageService.getRenderingContextByActivatedRoute() method

Resolves the rendering context given the router

Signature:

getRenderingContextByActivatedRoute(aRoute: RouteComponentProps): Observable<RenderingContextV2 | null | undefined>;

Parameters

Parameter Type Description
aRoute RouteComponentProps the activated route

Returns:

Observable<RenderingContextV2 | null | undefined>

the observable of the rendering context or undefined if it could not be found