Package Exports
- @acoustic-content-sdk/react-components
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-components) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Implementation of services and UI components for the React version of the SDK, that are agnostic about how the actual data is loaded.
Define layout components
- Implement a React component that accepts the ReactComponentProps as input
- Register this component using the ComponentRegistry service
How to access the ComponentRegistry service?
- Create a React component and use the provider of theWCH_CONTEXT_COMPONENT_REGISTRY context.
Example:
export const LayoutsModule: FC = ({ children }) => (
<WCH_CONTEXT_COMPONENT_REGISTRY.Consumer>
{(aReg) => {
// do something sensible with the service
// include the children
return <>{children}</>;
}}
</WCH_CONTEXT_COMPONENT_REGISTRY.Consumer>
);Home > @acoustic-content-sdk/react-components
react-components package
Interfaces
| Interface | Description |
|---|---|
| LayoutRegistrationProps |
Variables
| Variable | Description |
|---|---|
| LayoutComponent | The layout component directive |
| LayoutMapping | The layout mapping directive |
| LayoutRegistration | Component that registers layouts |
| VERSION | Version and build number of the package |
| WCH_PROVIDER_BROWSER_WINDOW | Provides the WCH_CONTEXT_WINDOW token for browser based applications. |
| WCH_PROVIDER_COMPONENT_REGISTRY | Declares the provider |
| WCH_PROVIDER_COMPONENT_RESOLVER | Declares the provider |
| WCH_PROVIDER_CONTENT_COMPONENT | Provides the rendering context component |
| WCH_PROVIDER_DELIVERY_SEARCH_RESOLVER | Declares the provider |
| WCH_PROVIDER_EDIT_HOST_WINDOW | Declares the provider |
| WCH_PROVIDER_LOGGER_SERVICE | Declares the provider |
| WCH_PROVIDER_PAGE_COMPONENT | Provides the rendering context component |
| WCH_PROVIDER_PAGE_SERVICE | Declares the provider |
| WCH_PROVIDER_PROTECTED_CONTENT | Declares the provider |
| WCH_PROVIDER_RENDERING_CONTEXT_RESOLVER | Declares the provider |
| WCH_PROVIDERS_COMPONENTS | Exports the providers of this module |
| WchContentComponent | Implementation of the component that performs the actual rendering of content |
| WchPageComponent | Implementation of the top level component that resolves the page |
Type Aliases
| Type Alias | Description |
|---|---|
| LayoutComponentDirective | Type for a directive |
Home > @acoustic-content-sdk/react-components > LayoutRegistrationProps
LayoutRegistrationProps interface
Signature:
export interface LayoutRegistrationProps Properties
| Property | Type | Description |
|---|---|---|
| register | Consumer<ComponentRegistry> |
Home > @acoustic-content-sdk/react-components > LayoutComponent
LayoutComponent variable
The layout component directive
Signature:
LayoutComponent: <T extends import("@acoustic-content-sdk/react-api").ReactComponent<import("@acoustic-content-sdk/react-api").ReactComponentProps, any>>(aDirective?: import("@acoustic-content-sdk/component-api").AbstractLayoutComponentDirective) => (cls: T) => voidHome > @acoustic-content-sdk/react-components > LayoutMapping
LayoutMapping variable
The layout mapping directive
Signature:
LayoutMapping: <T extends import("@acoustic-content-sdk/react-api").ReactComponent<import("@acoustic-content-sdk/react-api").ReactComponentProps, any>>(aID: string | string[] | import("@acoustic-content-sdk/component-api/dist/decorators/layout/layout.directive").LayoutMappingDirective, aSelector?: string | import("react").FunctionComponent<import("@acoustic-content-sdk/react-api").ReactComponentProps> | import("react").ComponentClass<import("@acoustic-content-sdk/react-api").ReactComponentProps, any> | string[], aLayoutMode?: string | string[]) => (cls: T) => voidHome > @acoustic-content-sdk/react-components > LayoutRegistration
LayoutRegistration variable
Component that registers layouts
Signature:
LayoutRegistration: FC<LayoutRegistrationProps>Home > @acoustic-content-sdk/react-components > 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-components > WCH_PROVIDER_BROWSER_WINDOW
WCH_PROVIDER_BROWSER_WINDOW variable
Provides the WCH_CONTEXT_WINDOW token for browser based applications.
Signature:
WCH_PROVIDER_BROWSER_WINDOW: import("@acoustic-content-sdk/react-api").ReactProvider<WindowType>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_COMPONENT_REGISTRY
WCH_PROVIDER_COMPONENT_REGISTRY variable
Declares the provider
Signature:
WCH_PROVIDER_COMPONENT_REGISTRY: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/react-api").ComponentRegistry>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_COMPONENT_RESOLVER
WCH_PROVIDER_COMPONENT_RESOLVER variable
Declares the provider
Signature:
WCH_PROVIDER_COMPONENT_RESOLVER: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/react-api").ComponentResolver>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_CONTENT_COMPONENT
WCH_PROVIDER_CONTENT_COMPONENT variable
Provides the rendering context component
Signature:
WCH_PROVIDER_CONTENT_COMPONENT: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/react-api").ReactComponent<ContentComponentProps, any>>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_DELIVERY_SEARCH_RESOLVER
WCH_PROVIDER_DELIVERY_SEARCH_RESOLVER variable
Declares the provider
Signature:
WCH_PROVIDER_DELIVERY_SEARCH_RESOLVER: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/component-api").DeliverySearchResolver>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_EDIT_HOST_WINDOW
WCH_PROVIDER_EDIT_HOST_WINDOW variable
Declares the provider
Signature:
WCH_PROVIDER_EDIT_HOST_WINDOW: import("@acoustic-content-sdk/react-api").ReactProvider<WindowType>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_LOGGER_SERVICE
WCH_PROVIDER_LOGGER_SERVICE variable
Declares the provider
Signature:
WCH_PROVIDER_LOGGER_SERVICE: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/api").LoggerService>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_PAGE_COMPONENT
WCH_PROVIDER_PAGE_COMPONENT variable
Provides the rendering context component
Signature:
WCH_PROVIDER_PAGE_COMPONENT: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/react-api").ReactComponent<RouteComponentProps<{}, import("react-router").StaticContext, {}>, any>>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_PAGE_SERVICE
WCH_PROVIDER_PAGE_SERVICE variable
Declares the provider
Signature:
WCH_PROVIDER_PAGE_SERVICE: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/react-api").ReactWchPageService>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_PROTECTED_CONTENT
WCH_PROVIDER_PROTECTED_CONTENT variable
Declares the provider
Signature:
WCH_PROVIDER_PROTECTED_CONTENT: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/component-api").ProtectedContent>Home > @acoustic-content-sdk/react-components > WCH_PROVIDER_RENDERING_CONTEXT_RESOLVER
WCH_PROVIDER_RENDERING_CONTEXT_RESOLVER variable
Declares the provider
Signature:
WCH_PROVIDER_RENDERING_CONTEXT_RESOLVER: import("@acoustic-content-sdk/react-api").ReactProvider<import("@acoustic-content-sdk/component-api").RenderingContextResolver>Home > @acoustic-content-sdk/react-components > WCH_PROVIDERS_COMPONENTS
WCH_PROVIDERS_COMPONENTS variable
Exports the providers of this module
Signature:
WCH_PROVIDERS_COMPONENTS: Array<ReactProvider<any>>Home > @acoustic-content-sdk/react-components > WchContentComponent
WchContentComponent variable
Implementation of the component that performs the actual rendering of content
Signature:
WchContentComponent: FC<ContentComponentProps>Home > @acoustic-content-sdk/react-components > WchPageComponent
WchPageComponent variable
Implementation of the top level component that resolves the page
Signature:
WchPageComponent: FC<RouteComponentProps>Home > @acoustic-content-sdk/react-components > LayoutComponentDirective
LayoutComponentDirective type
Type for a directive
Signature:
export declare type LayoutComponentDirective = AbstractLayoutComponentDirective;Home > @acoustic-content-sdk/react-components > LayoutRegistrationProps > register
LayoutRegistrationProps.register property
Signature:
register: Consumer<ComponentRegistry>;