@acoustic-content-sdk/react-api 中文文档教程

发布于 4年前 浏览 9 更新于 3年前

npm

API Documentation

主页 > @acoustic-content-sdk/react-api

react-api package

Collection of APIs and constants for the React SDK

Functions

FunctionDescription
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

InterfaceDescription
ComponentRegistry
ComponentResolver
ComponentTypeRefResolverService that resolves a component type ref given a layout.
ContentComponentProps
DynamicReactProviderFactory
InjectableReactProviderFactory
ReactComponentPropsProperties of a rendering component
ReactModulePropsInput properties for dynamically generated react modules
ReactProviderDeclares a react provider. The provider declares the provided context and its dependencies.Refer to https://reactjs.org/docs/context.html
ReactWchPageServiceService interface that allows to resolve a rendering context given the page.

Variables

VariableDescription
ACOUSTIC_CONTEXT_API_URLURL to access the API layerNaming of this field according to the field in the rendering context
ACOUSTIC_CONTEXT_AUTH_STATUSInjection token for the AuthStatus
ACOUSTIC_CONTEXT_BASE_URLURL 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.
ACOUSTIC_CONTEXT_COMPONENT_REGISTRY
ACOUSTIC_CONTEXT_COMPONENT_RESOLVER
ACOUSTIC_CONTEXT_COMPONENT_TYPE_REF_RESOLVERSA multi-provider token used for dependency injection of the ComponentTypeRefResolvers.
ACOUSTIC_CONTEXT_CONTENT_COMPONENTInjection token for the content component
ACOUSTIC_CONTEXT_DEFAULT_COMPONENTInjection token for the default component
ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVERInjection token for the DeliveryContentResolver
ACOUSTIC_CONTEXT_DELIVERY_CONTENT_SEEDInjection token for the content seed
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVERInjection token for the DeliveryLayoutMappingResolver
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEEDInjection token for the layout mapping seed
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_RESOLVERInjection token for the DeliveryLayoutResolver
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_SEEDInjection token for the layout seed
ACOUSTIC_CONTEXT_DELIVERY_PAGE_RESOLVERInjection token for the DeliveryPageResolver
ACOUSTIC_CONTEXT_DELIVERY_PAGE_SEEDInjection token for the page seed
ACOUSTIC_CONTEXT_DELIVERY_SEARCH_RESOLVERInjection token for the DeliverySearchResolver
ACOUSTIC_CONTEXT_DELIVERY_SITE_RESOLVERInjection token for the navigation service
ACOUSTIC_CONTEXT_DELIVERY_TYPE_RESOLVERInjection token for the DeliveryTypeResolver
ACOUSTIC_CONTEXT_DELIVERY_TYPE_SEEDInjection token for the type seed
ACOUSTIC_CONTEXT_DYNAMIC_LOGGER_FACTORY
ACOUSTIC_CONTEXT_HANDLEBARS_RESOLVERInjection token for the HandlebarsResolver
ACOUSTIC_CONTEXT_LAYOUT_MAPPING_RESOLVERInjection token for the LayoutMappingResolver
ACOUSTIC_CONTEXT_LAYOUT_RESOLVERInjection token for the LayoutResolver
ACOUSTIC_CONTEXT_LOGGER_FACTORY
ACOUSTIC_CONTEXT_LOGGER_SERVICE
ACOUSTIC_CONTEXT_PAGE_COMPONENTInjection token for the page component
ACOUSTIC_CONTEXT_PAGE_SERVICEInjection token for the ReactWchPageService
ACOUSTIC_CONTEXT_PROTECTED_CONTENTInjection token for the protected content status
ACOUSTIC_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVERInjection token for the ReconciledDeliverySearchResolver
ACOUSTIC_CONTEXT_RENDERING_CONTEXT_PROVIDERInjection token for the RenderingContextProviderV2
ACOUSTIC_CONTEXT_RENDERING_CONTEXT_RESOLVERInjection token for the RenderingContextResolver
ACOUSTIC_CONTEXT_RESOURCE_URLURL to access the deliveryNaming of this field according to the field in the rendering context
ACOUSTIC_CONTEXT_SEED_RESOLVERInjection token for the SeedResolver
ACOUSTIC_CONTEXT_URL_CONFIGInjection token for the UrlConfig
ACOUSTIC_CONTEXT_WINDOWCreate a new injection token for injecting the window into a component.
ACOUSTIC_RC_INTERCEPTOR_TOKEN
createDynamicReactProviderCreates 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.
createInjectableReactProviderCreates a ReactProvider that resolves its mandatory and optional elements and delegates the creation of the provided value to a callback function with these dependencies.
createModuleFromProviderConstructs a module component that includes the referenced providers in topological order
selectDisplayNameReturns the display name of a context
VERSIONVersion and build number of the package
WCH_CONTEXT_API_URL
WCH_CONTEXT_AUTH_STATUS
WCH_CONTEXT_BASE_URL
WCH_CONTEXT_COMPONENT_REGISTRY
WCH_CONTEXT_COMPONENT_RESOLVER
WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS
WCH_CONTEXT_CONTENT_COMPONENT
WCH_CONTEXT_DEFAULT_COMPONENT
WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER
WCH_CONTEXT_DELIVERY_CONTENT_SEED
WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER
WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED
WCH_CONTEXT_DELIVERY_LAYOUT_RESOLVER
WCH_CONTEXT_DELIVERY_LAYOUT_SEED
WCH_CONTEXT_DELIVERY_PAGE_RESOLVER
WCH_CONTEXT_DELIVERY_PAGE_SEED
WCH_CONTEXT_DELIVERY_SEARCH_RESOLVER
WCH_CONTEXT_DELIVERY_SITE_RESOLVER
WCH_CONTEXT_DELIVERY_TYPE_RESOLVER
WCH_CONTEXT_DELIVERY_TYPE_SEED
WCH_CONTEXT_DYNAMIC_LOGGER_FACTORY
WCH_CONTEXT_HANDLEBARS_RESOLVER
WCH_CONTEXT_LAYOUT_MAPPING_RESOLVER
WCH_CONTEXT_LAYOUT_RESOLVER
WCH_CONTEXT_LOGGER_FACTORY
WCH_CONTEXT_LOGGER_SERVICE
WCH_CONTEXT_PAGE_COMPONENT
WCH_CONTEXT_PAGE_SERVICE
WCH_CONTEXT_PROTECTED_CONTENT
WCH_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER
WCH_CONTEXT_RENDERING_CONTEXT_PROVIDER
WCH_CONTEXT_RENDERING_CONTEXT_RESOLVER
WCH_CONTEXT_RESOURCE_URL
WCH_CONTEXT_SEED_RESOLVER
WCH_CONTEXT_URL_CONFIG
WCH_CONTEXT_WINDOW

Type Aliases

Type AliasDescription
ComponentTypeRefCaptures all information required to instantiate a component based on its type
ReactComponentDefinition of a generic react component
ReactModuleType definition for the react component for a module
ReactModuleTypeType definition for the react component for a module

首页 > @acoustic-content-sdk/react-api > assertProvider

assertProvider() function

验证该值不为 nil,否则抛出异常

签名:

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

Parameters

ParameterTypeDescription
aValueTvalue to check
aContextContext&lt;T&gt;the context, for debugging purposes
aParentContextContext&lt;any&gt;

返回:

NonNullable;

the original value, guaranteed that it will not be nil

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

createReactContext() function

构建反应上下文并确保我们设置显示名称

签名:

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

Parameters

ParameterTypeDescription
aNamestringthe display name
aDefaultToptionally a default value

返回:

Required>

the context with mandatory displayName field

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

createReactProvider() function

构造提供者的实例

签名:

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

Parameters

ParameterTypeDescription
moduleReactModuleTypethe module
providesContext&lt;T&gt;the context the module provides
dependenciesContext&lt;any&gt;[]dependencies
optionalDependenciesContext&lt;any&gt;[]optional dependencies

返回:

ReactProvider

>提供商实例

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

ComponentRegistry interface

Signature:

export interface ComponentRegistry extends AbstractComponentsRegistry<ComponentTypeRef> 

Methods

MethodDescription
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

MethodDescription
resolveComponent(aRenderingContext, aLayoutMode)

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

ComponentTypeRefResolver interface

解析给定布局的组件类型引用的服务。

Signature:

export interface ComponentTypeRefResolver extends AbstractComponentTypeRefResolver<ComponentTypeRef> 

Properties

PropertyTypeDescription
getTypeByLayout(aLayout: Layout, aLayoutMode?: string) =&gt; Observable&lt;ComponentTypeRef&gt;Returns the type object based on the layout configuration

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

ContentComponentProps interface

Signature:

export interface ContentComponentProps 

Properties

PropertyTypeDescription
ctxRenderingContextInputRendering context used to render the component reference
idstringPoints to a piece of external content
layoutModestringOptional 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

PropertyTypeDescription
layoutModestringLayout mode used to render the component
renderingContextRenderingContextV2Rendering 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

PropertyTypeDescription
childrenReactNode

首页 > @acoustic-content-sdk/react-api > ReactProvider

ReactProvider interface

声明一个反应提供者。 提供者声明提供的上下文及其依赖项。

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

Signature:

export interface ReactProvider<T> 

Properties

PropertyTypeDescription
dependenciesContext&lt;any&gt;[]Required contexts, will be consumed when the module gets instantiated
moduleReactModuleTypeReact component that implements the provider. The component consumes the dependencies and the optional dependencies and provides the specified context.
optionalDependenciesContext&lt;any&gt;[]optional contexts
providesContext&lt;T&gt;Provided context

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

ReactWchPageService interface

允许解析给定页面的呈现上下文的服务接口。

Signature:

export interface ReactWchPageService extends WchPageService 

Methods

MethodDescription
getRenderingContextByActivatedRoute(aRoute)Resolves the rendering context given the router

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

ACOUSTIC_CONTEXT_API_URL variable

访问API层的URL

根据渲染上下文中的字段命名该字段

Signature:

ACOUSTIC_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'

首页 @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_AUTH_STATUS

ACOUSTIC_CONTEXT_AUTH_STATUS variable

Injection token for the AuthStatus

Signature:

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

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

ACOUSTIC_CONTEXT_BASE_URL variable

表示应用程序基于路径的路由的基本 URL 的 URL。 生成和识别 URL 时将保留此前缀。 如果未配置此属性,则将从窗口位置解码。

签名:

ACOUSTIC_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 > ACOUSTIC_CONTEXT_COMPONENT_REGISTRY

ACOUSTIC_CONTEXT_COMPONENT_REGISTRY variable

Signature:

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

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

ACOUSTIC_CONTEXT_COMPONENT_RESOLVER variable

Signature:

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

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

ACOUSTIC_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS variable

用于 ComponentTypeRefResolver 的依赖注入的多提供商令牌。

Signature:

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

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

ACOUSTIC_CONTEXT_CONTENT_COMPONENT variable

Injection token for the content component

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DEFAULT_COMPONENT

ACOUSTIC_CONTEXT_DEFAULT_COMPONENT variable

Injection token for the default component

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVER

ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVER variable

Injection token for the DeliveryContentResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_CONTENT_SEED variable

Injection token for the content seed

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER variable

Injection token for the DeliveryLayoutMappingResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED variable

Injection token for the layout mapping seed

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_RESOLVER

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_RESOLVER variable

Injection token for the DeliveryLayoutResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_SEED variable

Injection token for the layout seed

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DELIVERY_PAGE_RESOLVER

ACOUSTIC_CONTEXT_DELIVERY_PAGE_RESOLVER variable

Injection token for the DeliveryPageResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_PAGE_SEED variable

Injection token for the page seed

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DELIVERY_SEARCH_RESOLVER

ACOUSTIC_CONTEXT_DELIVERY_SEARCH_RESOLVER variable

Injection token for the DeliverySearchResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_SITE_RESOLVER variable

Injection token for the navigation service

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DELIVERY_TYPE_RESOLVER

ACOUSTIC_CONTEXT_DELIVERY_TYPE_RESOLVER variable

Injection token for the DeliveryTypeResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_TYPE_SEED variable

Injection token for the type seed

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_DYNAMIC_LOGGER_FACTORY

ACOUSTIC_CONTEXT_DYNAMIC_LOGGER_FACTORY variable

Signature:

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

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

ACOUSTIC_CONTEXT_HANDLEBARS_RESOLVER variable

Injection token for the HandlebarsResolver

Signature:

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

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

ACOUSTIC_CONTEXT_LAYOUT_MAPPING_RESOLVER variable

Injection token for the LayoutMappingResolver

Signature:

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

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

ACOUSTIC_CONTEXT_LAYOUT_RESOLVER variable

Injection token for the LayoutResolver

Signature:

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

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

ACOUSTIC_CONTEXT_LOGGER_FACTORY variable

Signature:

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

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

ACOUSTIC_CONTEXT_LOGGER_SERVICE variable

Signature:

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

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

ACOUSTIC_CONTEXT_PAGE_COMPONENT variable

Injection token for the page component

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_PAGE_SERVICE

ACOUSTIC_CONTEXT_PAGE_SERVICE variable

Injection token for the ReactWchPageService

Signature:

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

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

ACOUSTIC_CONTEXT_PROTECTED_CONTENT variable

Injection token for the protected content status

Signature:

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

首页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER

ACOUSTIC_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER variable

Injection token for the ReconciledDeliverySearchResolver

Signature:

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

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

ACOUSTIC_CONTEXT_RENDERING_CONTEXT_PROVIDER variable

Injection token for the RenderingContextProviderV2

Signature:

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

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

ACOUSTIC_CONTEXT_RENDERING_CONTEXT_RESOLVER variable

Injection token for the RenderingContextResolver

Signature:

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

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

ACOUSTIC_CONTEXT_RESOURCE_URL variable

URL to access the delivery

此字段根据渲染上下文中的字段命名

Signature:

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

Example 1

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

Example 2

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

主页 > @acoustic-content-sdk/react-api > ACOUSTIC_CONTEXT_SEED_RESOLVER

ACOUSTIC_CONTEXT_SEED_RESOLVER variable

Injection token for the SeedResolver

Signature:

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

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

ACOUSTIC_CONTEXT_URL_CONFIG variable

Injection token for the UrlConfig

Signature:

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

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

ACOUSTIC_CONTEXT_WINDOW variable

创建一个新的注入令牌,用于将窗口注入组件。

Signature:

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

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

ACOUSTIC_RC_INTERCEPTOR_TOKEN variable

Signature:

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

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

createDynamicReactProvider variable

创建一个 ReactProvider 解析其必需和可选元素,并将提供的值的创建委托给具有这些依赖项的回调函数。 回调返回一个 observable,并将提供 observable 序列。

Signature:

createDynamicReactProvider: DynamicReactProviderFactory

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

createInjectableReactProvider variable

创建一个 ReactProvider 来解析其必需和可选元素,并将提供的值的创建委托给具有这些依赖项的回调函数。

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>

主页 > @acoustic-content-sdk/react-api > selectDisplayName

selectDisplayName variable

Returns the display name of a context

Signature:

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

首页 > @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;
}

首页 > @acoustic-content-sdk/react-api > WCH_CONTEXT_API_URL

WCH_CONTEXT_API_URL variable

警告:此 API 现已过时。

use ACOUSTIC_CONTEXT_API_URL instead

Signature:

WCH_CONTEXT_API_URL: Required<import("react").Context<import("@acoustic-content-sdk/api").HubInfoUrlProvider>>

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

WCH_CONTEXT_AUTH_STATUS variable

警告:此 API 现已过时。

use ACOUSTIC_CONTEXT_AUTH_STATUS instead

Signature:

WCH_CONTEXT_AUTH_STATUS: Required<import("react").Context<import("@acoustic-content-sdk/api").AuthStatus>>

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

WCH_CONTEXT_BASE_URL variable

警告:此 API 现已过时。

use ACOUSTIC_CONTEXT_BASE_URL instead

Signature:

WCH_CONTEXT_BASE_URL: Required<import("react").Context<import("@acoustic-content-sdk/api").HubInfoUrlProvider>>

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

WCH_CONTEXT_COMPONENT_REGISTRY variable

警告:此 API 现已过时。

use ACOUSTIC_CONTEXT_COMPONENT_REGISTRY instead

Signature:

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

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

WCH_CONTEXT_COMPONENT_RESOLVER variable

警告:此 API 现已过时。

use ACOUSTIC_CONTEXT_COMPONENT_RESOLVER instead

Signature:

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

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

WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS variable

警告:此 API 现在已过时。

use ACOUSTIC_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS instead

Signature:

WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS: Required<import("react").Context<import("./type/type.ref.resolver").ComponentTypeRefResolver[]>>

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

WCH_CONTEXT_CONTENT_COMPONENT variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_CONTENT_COMPONENT instead

Signature:

WCH_CONTEXT_CONTENT_COMPONENT: Required<import("react").Context<import("./public_api").ReactComponent<import("./component/content/content.component").ContentComponentProps, any>>>

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

WCH_CONTEXT_DEFAULT_COMPONENT variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_DEFAULT_COMPONENT instead

Signature:

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

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

WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVER instead

Signature:

WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER: Required<import("react").Context<import("@acoustic-content-sdk/component-api").DeliveryContentResolver>>

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

WCH_CONTEXT_DELIVERY_CONTENT_SEED variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_DELIVERY_CONTENT_SEED instead

Signature:

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

<

npm

API Documentation

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

react-api package

Collection of APIs and constants for the React SDK

Functions

FunctionDescription
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

InterfaceDescription
ComponentRegistry
ComponentResolver
ComponentTypeRefResolverService that resolves a component type ref given a layout.
ContentComponentProps
DynamicReactProviderFactory
InjectableReactProviderFactory
ReactComponentPropsProperties of a rendering component
ReactModulePropsInput properties for dynamically generated react modules
ReactProviderDeclares a react provider. The provider declares the provided context and its dependencies.Refer to https://reactjs.org/docs/context.html
ReactWchPageServiceService interface that allows to resolve a rendering context given the page.

Variables

VariableDescription
ACOUSTIC_CONTEXT_API_URLURL to access the API layerNaming of this field according to the field in the rendering context
ACOUSTIC_CONTEXT_AUTH_STATUSInjection token for the AuthStatus
ACOUSTIC_CONTEXT_BASE_URLURL 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.
ACOUSTIC_CONTEXT_COMPONENT_REGISTRY
ACOUSTIC_CONTEXT_COMPONENT_RESOLVER
ACOUSTIC_CONTEXT_COMPONENT_TYPE_REF_RESOLVERSA multi-provider token used for dependency injection of the ComponentTypeRefResolvers.
ACOUSTIC_CONTEXT_CONTENT_COMPONENTInjection token for the content component
ACOUSTIC_CONTEXT_DEFAULT_COMPONENTInjection token for the default component
ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVERInjection token for the DeliveryContentResolver
ACOUSTIC_CONTEXT_DELIVERY_CONTENT_SEEDInjection token for the content seed
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVERInjection token for the DeliveryLayoutMappingResolver
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEEDInjection token for the layout mapping seed
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_RESOLVERInjection token for the DeliveryLayoutResolver
ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_SEEDInjection token for the layout seed
ACOUSTIC_CONTEXT_DELIVERY_PAGE_RESOLVERInjection token for the DeliveryPageResolver
ACOUSTIC_CONTEXT_DELIVERY_PAGE_SEEDInjection token for the page seed
ACOUSTIC_CONTEXT_DELIVERY_SEARCH_RESOLVERInjection token for the DeliverySearchResolver
ACOUSTIC_CONTEXT_DELIVERY_SITE_RESOLVERInjection token for the navigation service
ACOUSTIC_CONTEXT_DELIVERY_TYPE_RESOLVERInjection token for the DeliveryTypeResolver
ACOUSTIC_CONTEXT_DELIVERY_TYPE_SEEDInjection token for the type seed
ACOUSTIC_CONTEXT_DYNAMIC_LOGGER_FACTORY
ACOUSTIC_CONTEXT_HANDLEBARS_RESOLVERInjection token for the HandlebarsResolver
ACOUSTIC_CONTEXT_LAYOUT_MAPPING_RESOLVERInjection token for the LayoutMappingResolver
ACOUSTIC_CONTEXT_LAYOUT_RESOLVERInjection token for the LayoutResolver
ACOUSTIC_CONTEXT_LOGGER_FACTORY
ACOUSTIC_CONTEXT_LOGGER_SERVICE
ACOUSTIC_CONTEXT_PAGE_COMPONENTInjection token for the page component
ACOUSTIC_CONTEXT_PAGE_SERVICEInjection token for the ReactWchPageService
ACOUSTIC_CONTEXT_PROTECTED_CONTENTInjection token for the protected content status
ACOUSTIC_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVERInjection token for the ReconciledDeliverySearchResolver
ACOUSTIC_CONTEXT_RENDERING_CONTEXT_PROVIDERInjection token for the RenderingContextProviderV2
ACOUSTIC_CONTEXT_RENDERING_CONTEXT_RESOLVERInjection token for the RenderingContextResolver
ACOUSTIC_CONTEXT_RESOURCE_URLURL to access the deliveryNaming of this field according to the field in the rendering context
ACOUSTIC_CONTEXT_SEED_RESOLVERInjection token for the SeedResolver
ACOUSTIC_CONTEXT_URL_CONFIGInjection token for the UrlConfig
ACOUSTIC_CONTEXT_WINDOWCreate a new injection token for injecting the window into a component.
ACOUSTIC_RC_INTERCEPTOR_TOKEN
createDynamicReactProviderCreates 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.
createInjectableReactProviderCreates a ReactProvider that resolves its mandatory and optional elements and delegates the creation of the provided value to a callback function with these dependencies.
createModuleFromProviderConstructs a module component that includes the referenced providers in topological order
selectDisplayNameReturns the display name of a context
VERSIONVersion and build number of the package
WCH_CONTEXT_API_URL
WCH_CONTEXT_AUTH_STATUS
WCH_CONTEXT_BASE_URL
WCH_CONTEXT_COMPONENT_REGISTRY
WCH_CONTEXT_COMPONENT_RESOLVER
WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS
WCH_CONTEXT_CONTENT_COMPONENT
WCH_CONTEXT_DEFAULT_COMPONENT
WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER
WCH_CONTEXT_DELIVERY_CONTENT_SEED
WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER
WCH_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED
WCH_CONTEXT_DELIVERY_LAYOUT_RESOLVER
WCH_CONTEXT_DELIVERY_LAYOUT_SEED
WCH_CONTEXT_DELIVERY_PAGE_RESOLVER
WCH_CONTEXT_DELIVERY_PAGE_SEED
WCH_CONTEXT_DELIVERY_SEARCH_RESOLVER
WCH_CONTEXT_DELIVERY_SITE_RESOLVER
WCH_CONTEXT_DELIVERY_TYPE_RESOLVER
WCH_CONTEXT_DELIVERY_TYPE_SEED
WCH_CONTEXT_DYNAMIC_LOGGER_FACTORY
WCH_CONTEXT_HANDLEBARS_RESOLVER
WCH_CONTEXT_LAYOUT_MAPPING_RESOLVER
WCH_CONTEXT_LAYOUT_RESOLVER
WCH_CONTEXT_LOGGER_FACTORY
WCH_CONTEXT_LOGGER_SERVICE
WCH_CONTEXT_PAGE_COMPONENT
WCH_CONTEXT_PAGE_SERVICE
WCH_CONTEXT_PROTECTED_CONTENT
WCH_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER
WCH_CONTEXT_RENDERING_CONTEXT_PROVIDER
WCH_CONTEXT_RENDERING_CONTEXT_RESOLVER
WCH_CONTEXT_RESOURCE_URL
WCH_CONTEXT_SEED_RESOLVER
WCH_CONTEXT_URL_CONFIG
WCH_CONTEXT_WINDOW

Type Aliases

Type AliasDescription
ComponentTypeRefCaptures all information required to instantiate a component based on its type
ReactComponentDefinition of a generic react component
ReactModuleType definition for the react component for a module
ReactModuleTypeType 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

ParameterTypeDescription
aValueTvalue to check
aContextContext&lt;T&gt;the context, for debugging purposes
aParentContextContext&lt;any&gt;

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

ParameterTypeDescription
aNamestringthe display name
aDefaultToptionally 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?: Context<any>[], optionalDependencies?: Context<any>[]): ReactProvider<T>;

Parameters

ParameterTypeDescription
moduleReactModuleTypethe module
providesContext&lt;T&gt;the context the module provides
dependenciesContext&lt;any&gt;[]dependencies
optionalDependenciesContext&lt;any&gt;[]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

MethodDescription
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

MethodDescription
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

PropertyTypeDescription
getTypeByLayout(aLayout: Layout, aLayoutMode?: string) =&gt; Observable&lt;ComponentTypeRef&gt;Returns the type object based on the layout configuration

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

ContentComponentProps interface

Signature:

export interface ContentComponentProps 

Properties

PropertyTypeDescription
ctxRenderingContextInputRendering context used to render the component reference
idstringPoints to a piece of external content
layoutModestringOptional 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

PropertyTypeDescription
layoutModestringLayout mode used to render the component
renderingContextRenderingContextV2Rendering 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

PropertyTypeDescription
childrenReactNode

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

PropertyTypeDescription
dependenciesContext&lt;any&gt;[]Required contexts, will be consumed when the module gets instantiated
moduleReactModuleTypeReact component that implements the provider. The component consumes the dependencies and the optional dependencies and provides the specified context.
optionalDependenciesContext&lt;any&gt;[]optional contexts
providesContext&lt;T&gt;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

MethodDescription
getRenderingContextByActivatedRoute(aRoute)Resolves the rendering context given the router

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

ACOUSTIC_CONTEXT_API_URL variable

URL to access the API layer

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

Signature:

ACOUSTIC_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 > ACOUSTIC_CONTEXT_AUTH_STATUS

ACOUSTIC_CONTEXT_AUTH_STATUS variable

Injection token for the AuthStatus

Signature:

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

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

ACOUSTIC_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:

ACOUSTIC_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 > ACOUSTIC_CONTEXT_COMPONENT_REGISTRY

ACOUSTIC_CONTEXT_COMPONENT_REGISTRY variable

Signature:

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

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

ACOUSTIC_CONTEXT_COMPONENT_RESOLVER variable

Signature:

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

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

ACOUSTIC_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS variable

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

Signature:

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

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

ACOUSTIC_CONTEXT_CONTENT_COMPONENT variable

Injection token for the content component

Signature:

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

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

ACOUSTIC_CONTEXT_DEFAULT_COMPONENT variable

Injection token for the default component

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVER variable

Injection token for the DeliveryContentResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_CONTENT_SEED variable

Injection token for the content seed

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_RESOLVER variable

Injection token for the DeliveryLayoutMappingResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_MAPPING_SEED variable

Injection token for the layout mapping seed

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_RESOLVER variable

Injection token for the DeliveryLayoutResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_LAYOUT_SEED variable

Injection token for the layout seed

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_PAGE_RESOLVER variable

Injection token for the DeliveryPageResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_PAGE_SEED variable

Injection token for the page seed

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_SEARCH_RESOLVER variable

Injection token for the DeliverySearchResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_SITE_RESOLVER variable

Injection token for the navigation service

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_TYPE_RESOLVER variable

Injection token for the DeliveryTypeResolver

Signature:

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

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

ACOUSTIC_CONTEXT_DELIVERY_TYPE_SEED variable

Injection token for the type seed

Signature:

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

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

ACOUSTIC_CONTEXT_DYNAMIC_LOGGER_FACTORY variable

Signature:

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

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

ACOUSTIC_CONTEXT_HANDLEBARS_RESOLVER variable

Injection token for the HandlebarsResolver

Signature:

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

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

ACOUSTIC_CONTEXT_LAYOUT_MAPPING_RESOLVER variable

Injection token for the LayoutMappingResolver

Signature:

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

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

ACOUSTIC_CONTEXT_LAYOUT_RESOLVER variable

Injection token for the LayoutResolver

Signature:

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

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

ACOUSTIC_CONTEXT_LOGGER_FACTORY variable

Signature:

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

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

ACOUSTIC_CONTEXT_LOGGER_SERVICE variable

Signature:

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

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

ACOUSTIC_CONTEXT_PAGE_COMPONENT variable

Injection token for the page component

Signature:

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

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

ACOUSTIC_CONTEXT_PAGE_SERVICE variable

Injection token for the ReactWchPageService

Signature:

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

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

ACOUSTIC_CONTEXT_PROTECTED_CONTENT variable

Injection token for the protected content status

Signature:

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

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

ACOUSTIC_CONTEXT_RECONCILED_DELIVERY_SEARCH_RESOLVER variable

Injection token for the ReconciledDeliverySearchResolver

Signature:

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

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

ACOUSTIC_CONTEXT_RENDERING_CONTEXT_PROVIDER variable

Injection token for the RenderingContextProviderV2

Signature:

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

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

ACOUSTIC_CONTEXT_RENDERING_CONTEXT_RESOLVER variable

Injection token for the RenderingContextResolver

Signature:

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

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

ACOUSTIC_CONTEXT_RESOURCE_URL variable

URL to access the delivery

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

Signature:

ACOUSTIC_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 > ACOUSTIC_CONTEXT_SEED_RESOLVER

ACOUSTIC_CONTEXT_SEED_RESOLVER variable

Injection token for the SeedResolver

Signature:

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

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

ACOUSTIC_CONTEXT_URL_CONFIG variable

Injection token for the UrlConfig

Signature:

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

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

ACOUSTIC_CONTEXT_WINDOW variable

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

Signature:

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

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

ACOUSTIC_RC_INTERCEPTOR_TOKEN variable

Signature:

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

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

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_API_URL instead

Signature:

WCH_CONTEXT_API_URL: Required<import("react").Context<import("@acoustic-content-sdk/api").HubInfoUrlProvider>>

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

WCH_CONTEXT_AUTH_STATUS variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_AUTH_STATUS instead

Signature:

WCH_CONTEXT_AUTH_STATUS: Required<import("react").Context<import("@acoustic-content-sdk/api").AuthStatus>>

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

WCH_CONTEXT_BASE_URL variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_BASE_URL instead

Signature:

WCH_CONTEXT_BASE_URL: Required<import("react").Context<import("@acoustic-content-sdk/api").HubInfoUrlProvider>>

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

WCH_CONTEXT_COMPONENT_REGISTRY variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_COMPONENT_REGISTRY instead

Signature:

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

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

WCH_CONTEXT_COMPONENT_RESOLVER variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_COMPONENT_RESOLVER instead

Signature:

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

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

WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS instead

Signature:

WCH_CONTEXT_COMPONENT_TYPE_REF_RESOLVERS: Required<import("react").Context<import("./type/type.ref.resolver").ComponentTypeRefResolver[]>>

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

WCH_CONTEXT_CONTENT_COMPONENT variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_CONTENT_COMPONENT instead

Signature:

WCH_CONTEXT_CONTENT_COMPONENT: Required<import("react").Context<import("./public_api").ReactComponent<import("./component/content/content.component").ContentComponentProps, any>>>

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

WCH_CONTEXT_DEFAULT_COMPONENT variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_DEFAULT_COMPONENT instead

Signature:

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

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

WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_DELIVERY_CONTENT_RESOLVER instead

Signature:

WCH_CONTEXT_DELIVERY_CONTENT_RESOLVER: Required<import("react").Context<import("@acoustic-content-sdk/component-api").DeliveryContentResolver>>

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

WCH_CONTEXT_DELIVERY_CONTENT_SEED variable

Warning: This API is now obsolete.

use ACOUSTIC_CONTEXT_DELIVERY_CONTENT_SEED instead

Signature:

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

<

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文