@acoustic-content-sdk/ng-api
v9.0.10076
Published
Angular specific APIs and injection tokens for the Acoustic Content Services.
Downloads
91
Readme
Angular specific APIs and injection tokens for the Acoustic Content Services.
Home > @acoustic-content-sdk/ng-api
ng-api package
Collection of APIs and constants for the Angular SDK
Enumerations
| Enumeration | Description | | --- | --- | | PROVIDER_WEIGHT | |
Interfaces
| Interface | Description | | --- | --- | | AcNgPageService | Service interface that allows to resolve a rendering context given the page. | | ComponentRegistry | Service to register components and get information about registered components. | | ComponentResolver | | | ComponentTypeRef | Captures all information required to instantiate a component based on its type | | ComponentTypeRefResolver | Service that resolves a component type ref given a layout. |
Variables
| Variable | Description | | --- | --- | | ACOUSTIC_RC_INTERCEPTOR_TOKEN | | | ACOUSTIC_TOKEN_ACTIVE_PAGE | Injection token for the page service | | ACOUSTIC_TOKEN_API_URL | URL to access the API layerNaming of this field according to the field in the rendering context | | ACOUSTIC_TOKEN_AUTH_STATUS | Injection token for the page service | | ACOUSTIC_TOKEN_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. | | ACOUSTIC_TOKEN_COMPONENT_REGISTRY | Injection token for the component registry | | ACOUSTIC_TOKEN_COMPONENT_TYPE_REF_RESOLVERS | A multi-provider token used for dependency injection of the ComponentTypeRefResolvers. | | ACOUSTIC_TOKEN_DELIVERY_CONTENT_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_CONTENT_SEED | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_SEED | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_LAYOUT_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_LAYOUT_SEED | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_PAGE_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_PAGE_SEED | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_SEARCH_RESOLVER | Injection token for the navigation service | | ACOUSTIC_TOKEN_DELIVERY_SITE_RESOLVER | Injection token for the navigation service | | ACOUSTIC_TOKEN_DELIVERY_TYPE_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_DELIVERY_TYPE_SEED | Injection token for the page service | | ACOUSTIC_TOKEN_DYNAMIC_LOGGER_FACTORY | | | ACOUSTIC_TOKEN_HANDLEBARS_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_LAYOUT_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_LOGGER_FACTORY | | | ACOUSTIC_TOKEN_LOGGER_SERVICE | | | ACOUSTIC_TOKEN_PAGE_SERVICE | Injection token for the page service | | ACOUSTIC_TOKEN_PRE_RENDERING_RESOLVER | Injection token for the pre rendering service | | ACOUSTIC_TOKEN_PROTECTED_CONTENT | Injection token for the protected content status | | ACOUSTIC_TOKEN_RENDERING_CONTEXT_PROVIDER | Injection token for the rendering context provider | | ACOUSTIC_TOKEN_RENDERING_CONTEXT_RESOLVER | Injection token for the RenderingContextResolver | | ACOUSTIC_TOKEN_RESOURCE_URL | URL to access the deliveryNaming of this field according to the field in the rendering context | | ACOUSTIC_TOKEN_SEED_RESOLVER | Injection token for the page service | | ACOUSTIC_TOKEN_URL_CONFIG | Injection token for the url config | | ACOUSTIC_TOKEN_WINDOW | Create a new injection token for injecting the window into a component. | | VERSION | Version and build number of the package |
Type Aliases
| Type Alias | Description | | --- | --- | | ExtractInjectionTokenType | Type that extracts the type of an injection token |
Home > @acoustic-content-sdk/ng-api > PROVIDER_WEIGHT
PROVIDER_WEIGHT enum
Signature:
export declare enum PROVIDER_WEIGHT
Enumeration Members
| Member | Value | Description | | --- | --- | --- | | HEIGH | 3000 | | | LOW | 1000 | | | MAX | | | | MEDIUM | 2000 | | | MIN | | |
Home > @acoustic-content-sdk/ng-api > AcNgPageService
AcNgPageService interface
Service interface that allows to resolve a rendering context given the page.
Signature:
export interface AcNgPageService extends WchPageService
Methods
| Method | Description | | --- | --- | | getRenderingContextByActivatedRoute(aRoute) | Resolves the rendering context given the router | | getRenderingContextByUrlSegments(aSegments) | Resolves the rendering context given the url segments |
Home > @acoustic-content-sdk/ng-api > ComponentRegistry
ComponentRegistry interface
Service to register components and get information about registered components.
Signature:
export interface ComponentRegistry extends AbstractComponentsRegistry<ComponentTypeRef<any>>
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 | | registerType(aType) | Registers the type and assumes that a decorator has specified the controller |
Home > @acoustic-content-sdk/ng-api > ComponentResolver
ComponentResolver interface
Signature:
export interface ComponentResolver extends AbstractComponentResolver<ComponentTypeRef<any>>
Methods
| Method | Description | | --- | --- | | resolveComponent(aRenderingContext, aLayoutMode) | |
Home > @acoustic-content-sdk/ng-api > ComponentTypeRef
ComponentTypeRef interface
Captures all information required to instantiate a component based on its type
Signature:
export interface ComponentTypeRef<T>
Properties
| Property | Type | Description | | --- | --- | --- | | resolver | ComponentFactoryResolver | Optionally a component factory resolver | | type | Type<T> | The actual angular type for the component |
Home > @acoustic-content-sdk/ng-api > ComponentTypeRefResolver
ComponentTypeRefResolver interface
Service that resolves a component type ref given a layout.
Signature:
export interface ComponentTypeRefResolver extends AbstractComponentTypeRefResolver<ComponentTypeRef<any>>
Properties
| Property | Type | Description | | --- | --- | --- | | getTypeByLayout | (aLayout: Layout, aLayoutMode?: string) => Observable<ComponentTypeRef<any>> | Returns the type object based on the layout configuration | | weight | number | Optionally a weight for the resolver |
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_RC_INTERCEPTOR_TOKEN
ACOUSTIC_RC_INTERCEPTOR_TOKEN variable
Signature:
ACOUSTIC_RC_INTERCEPTOR_TOKEN = "8453750A-4519-4184-840B-D490E909D23E"
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_ACTIVE_PAGE
ACOUSTIC_TOKEN_ACTIVE_PAGE variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_ACTIVE_PAGE: InjectionToken<ActivePageV2>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_API_URL
ACOUSTIC_TOKEN_API_URL variable
URL to access the API layer
Naming of this field according to the field in the rendering context
Signature:
ACOUSTIC_TOKEN_API_URL: InjectionToken<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/ng-api > ACOUSTIC_TOKEN_AUTH_STATUS
ACOUSTIC_TOKEN_AUTH_STATUS variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_AUTH_STATUS: InjectionToken<AuthStatus>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_BASE_URL
ACOUSTIC_TOKEN_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_TOKEN_BASE_URL: InjectionToken<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/ng-api > ACOUSTIC_TOKEN_COMPONENT_REGISTRY
ACOUSTIC_TOKEN_COMPONENT_REGISTRY variable
Injection token for the component registry
Signature:
ACOUSTIC_TOKEN_COMPONENT_REGISTRY: InjectionToken<ComponentRegistry>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_COMPONENT_TYPE_REF_RESOLVERS
ACOUSTIC_TOKEN_COMPONENT_TYPE_REF_RESOLVERS variable
A multi-provider token used for dependency injection of the ComponentTypeRefResolvers.
Signature:
ACOUSTIC_TOKEN_COMPONENT_TYPE_REF_RESOLVERS: InjectionToken<ComponentTypeRefResolver[]>
Example
providers: [
{
provide: ACOUSTIC_TOKEN_COMPONENT_TYPE_REF_RESOLVERS,
useClass: MyResolver,
multi: true
}
]
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_CONTENT_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_CONTENT_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_CONTENT_RESOLVER: InjectionToken<DeliveryContentResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_CONTENT_SEED
ACOUSTIC_TOKEN_DELIVERY_CONTENT_SEED variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_CONTENT_SEED: InjectionToken<string>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_RESOLVER: InjectionToken<DeliveryLayoutMappingResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_SEED
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_SEED variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_SEED: InjectionToken<string>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_LAYOUT_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_RESOLVER: InjectionToken<DeliveryLayoutResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_LAYOUT_SEED
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_SEED variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_SEED: InjectionToken<string>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_PAGE_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_PAGE_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_PAGE_RESOLVER: InjectionToken<DeliveryPageResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_PAGE_SEED
ACOUSTIC_TOKEN_DELIVERY_PAGE_SEED variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_PAGE_SEED: InjectionToken<string>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_SEARCH_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_SEARCH_RESOLVER variable
Injection token for the navigation service
Signature:
ACOUSTIC_TOKEN_DELIVERY_SEARCH_RESOLVER: InjectionToken<DeliverySearchResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_SITE_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_SITE_RESOLVER variable
Injection token for the navigation service
Signature:
ACOUSTIC_TOKEN_DELIVERY_SITE_RESOLVER: InjectionToken<DeliverySiteResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_TYPE_RESOLVER
ACOUSTIC_TOKEN_DELIVERY_TYPE_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_TYPE_RESOLVER: InjectionToken<DeliveryTypeResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DELIVERY_TYPE_SEED
ACOUSTIC_TOKEN_DELIVERY_TYPE_SEED variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_DELIVERY_TYPE_SEED: InjectionToken<string>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_DYNAMIC_LOGGER_FACTORY
ACOUSTIC_TOKEN_DYNAMIC_LOGGER_FACTORY variable
Signature:
ACOUSTIC_TOKEN_DYNAMIC_LOGGER_FACTORY: InjectionToken<DynamicLoggerFactory>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_HANDLEBARS_RESOLVER
ACOUSTIC_TOKEN_HANDLEBARS_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_HANDLEBARS_RESOLVER: InjectionToken<HandlebarsResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_LAYOUT_RESOLVER
ACOUSTIC_TOKEN_LAYOUT_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_LAYOUT_RESOLVER: InjectionToken<LayoutResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_LOGGER_FACTORY
ACOUSTIC_TOKEN_LOGGER_FACTORY variable
Signature:
ACOUSTIC_TOKEN_LOGGER_FACTORY: InjectionToken<LoggerFactory>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_LOGGER_SERVICE
ACOUSTIC_TOKEN_LOGGER_SERVICE variable
Signature:
ACOUSTIC_TOKEN_LOGGER_SERVICE: InjectionToken<LoggerService>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_PAGE_SERVICE
ACOUSTIC_TOKEN_PAGE_SERVICE variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_PAGE_SERVICE: InjectionToken<AcNgPageService>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_PRE_RENDERING_RESOLVER
ACOUSTIC_TOKEN_PRE_RENDERING_RESOLVER variable
Injection token for the pre rendering service
Signature:
ACOUSTIC_TOKEN_PRE_RENDERING_RESOLVER: InjectionToken<PreRenderingResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_PROTECTED_CONTENT
ACOUSTIC_TOKEN_PROTECTED_CONTENT variable
Injection token for the protected content status
Signature:
ACOUSTIC_TOKEN_PROTECTED_CONTENT: InjectionToken<ProtectedContent>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_RENDERING_CONTEXT_PROVIDER
ACOUSTIC_TOKEN_RENDERING_CONTEXT_PROVIDER variable
Injection token for the rendering context provider
Signature:
ACOUSTIC_TOKEN_RENDERING_CONTEXT_PROVIDER: InjectionToken<RenderingContextProviderV2>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_RENDERING_CONTEXT_RESOLVER
ACOUSTIC_TOKEN_RENDERING_CONTEXT_RESOLVER variable
Injection token for the RenderingContextResolver
Signature:
ACOUSTIC_TOKEN_RENDERING_CONTEXT_RESOLVER: InjectionToken<RenderingContextResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_RESOURCE_URL
ACOUSTIC_TOKEN_RESOURCE_URL variable
URL to access the delivery
Naming of this field according to the field in the rendering context
Signature:
ACOUSTIC_TOKEN_RESOURCE_URL: InjectionToken<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/ng-api > ACOUSTIC_TOKEN_SEED_RESOLVER
ACOUSTIC_TOKEN_SEED_RESOLVER variable
Injection token for the page service
Signature:
ACOUSTIC_TOKEN_SEED_RESOLVER: InjectionToken<SeedResolver>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_URL_CONFIG
ACOUSTIC_TOKEN_URL_CONFIG variable
Injection token for the url config
Signature:
ACOUSTIC_TOKEN_URL_CONFIG: InjectionToken<Observable<UrlConfig>>
Home > @acoustic-content-sdk/ng-api > ACOUSTIC_TOKEN_WINDOW
ACOUSTIC_TOKEN_WINDOW variable
Create a new injection token for injecting the window into a component.
Signature:
ACOUSTIC_TOKEN_WINDOW: InjectionToken<WindowType>
Home > @acoustic-content-sdk/ng-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/ng-api > ExtractInjectionTokenType
ExtractInjectionTokenType type
Type that extracts the type of an injection token
Signature:
export declare type ExtractInjectionTokenType<T extends InjectionToken<any>> = T extends InjectionToken<infer F> ? F : never;
Home > @acoustic-content-sdk/ng-api > ComponentRegistry > registerType
ComponentRegistry.registerType() method
Registers the type given a full spec
Signature:
registerType(aController: string | string[], aType: ComponentTypeRef<any>, aLayoutModes?: string | string[]): void;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aController | string | string[] | | | aType | ComponentTypeRef<any> | | | aLayoutModes | string | string[] | |
Returns:
void
Home > @acoustic-content-sdk/ng-api > ComponentRegistry > registerType
ComponentRegistry.registerType() method
Registers the type and assumes that a decorator has specified the controller
Signature:
registerType(aType: ComponentTypeRef<any>): void;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aType | ComponentTypeRef<any> | |
Returns:
void
Home > @acoustic-content-sdk/ng-api > ComponentRegistry > registerType
ComponentRegistry.registerType() method
Registers the type and assumes that a decorator has specified the controller
Signature:
registerType(aType: Type<any>): void;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aType | Type<any> | |
Returns:
void
Home > @acoustic-content-sdk/ng-api > AcNgPageService > getRenderingContextByActivatedRoute
AcNgPageService.getRenderingContextByActivatedRoute() method
Resolves the rendering context given the router
Signature:
getRenderingContextByActivatedRoute(aRoute: ActivatedRoute): Observable<RenderingContextV2 | null | undefined>;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aRoute | ActivatedRoute | the activated route |
Returns:
Observable<RenderingContextV2 | null | undefined>
the observable of the rendering context or undefined if it could not be found
Home > @acoustic-content-sdk/ng-api > AcNgPageService > getRenderingContextByUrlSegments
AcNgPageService.getRenderingContextByUrlSegments() method
Resolves the rendering context given the url segments
Signature:
getRenderingContextByUrlSegments(aSegments: UrlSegment[]): Observable<RenderingContextV2 | null | undefined>;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aSegments | UrlSegment[] | the segments |
Returns:
Observable<RenderingContextV2 | null | undefined>
the observable of the rendering context or undefined if it could not be found
Home > @acoustic-content-sdk/ng-api > ComponentResolver > resolveComponent
ComponentResolver.resolveComponent() method
Signature:
resolveComponent(aRenderingContext: RenderingContextV2, aLayoutMode?: string): Observable<ComponentTypeRef<any>>;
Parameters
| Parameter | Type | Description | | --- | --- | --- | | aRenderingContext | RenderingContextV2 | | | aLayoutMode | string | |
Returns:
Observable<ComponentTypeRef<any>>
Home > @acoustic-content-sdk/ng-api > ComponentTypeRefResolver > getTypeByLayout
ComponentTypeRefResolver.getTypeByLayout property
Returns the type object based on the layout configuration
Signature:
getTypeByLayout: (aLayout: Layout, aLayoutMode?: string) => Observable<ComponentTypeRef<any>>;
Home > @acoustic-content-sdk/ng-api > ComponentTypeRefResolver > weight
ComponentTypeRefResolver.weight property
Optionally a weight for the resolver
Signature:
weight?: number;
Home > @acoustic-content-sdk/ng-api > ComponentTypeRef > resolver
ComponentTypeRef.resolver property
Optionally a component factory resolver
Signature:
resolver?: ComponentFactoryResolver;
Home > @acoustic-content-sdk/ng-api > ComponentTypeRef > type
ComponentTypeRef.type property
The actual angular type for the component
Signature:
type: Type<T>;