9.0.10076 • Published 4 years ago

@acoustic-content-sdk/ng-api v9.0.10076

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

npm

Angular specific APIs and injection tokens for the Acoustic Content Services.

API Documentation

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

ng-api package

Collection of APIs and constants for the Angular SDK

Enumerations

EnumerationDescription
PROVIDER_WEIGHT

Interfaces

InterfaceDescription
AcNgPageServiceService interface that allows to resolve a rendering context given the page.
ComponentRegistryService to register components and get information about registered components.
ComponentResolver
ComponentTypeRefCaptures all information required to instantiate a component based on its type
ComponentTypeRefResolverService that resolves a component type ref given a layout.

Variables

VariableDescription
ACOUSTIC_RC_INTERCEPTOR_TOKEN
ACOUSTIC_TOKEN_ACTIVE_PAGEInjection token for the page service
ACOUSTIC_TOKEN_API_URLURL to access the API layerNaming of this field according to the field in the rendering context
ACOUSTIC_TOKEN_AUTH_STATUSInjection token for the page service
ACOUSTIC_TOKEN_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_TOKEN_COMPONENT_REGISTRYInjection token for the component registry
ACOUSTIC_TOKEN_COMPONENT_TYPE_REF_RESOLVERSA multi-provider token used for dependency injection of the ComponentTypeRefResolvers.
ACOUSTIC_TOKEN_DELIVERY_CONTENT_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_CONTENT_SEEDInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_MAPPING_SEEDInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_LAYOUT_SEEDInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_PAGE_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_PAGE_SEEDInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_SEARCH_RESOLVERInjection token for the navigation service
ACOUSTIC_TOKEN_DELIVERY_SITE_RESOLVERInjection token for the navigation service
ACOUSTIC_TOKEN_DELIVERY_TYPE_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_DELIVERY_TYPE_SEEDInjection token for the page service
ACOUSTIC_TOKEN_DYNAMIC_LOGGER_FACTORY
ACOUSTIC_TOKEN_HANDLEBARS_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_LAYOUT_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_LOGGER_FACTORY
ACOUSTIC_TOKEN_LOGGER_SERVICE
ACOUSTIC_TOKEN_PAGE_SERVICEInjection token for the page service
ACOUSTIC_TOKEN_PRE_RENDERING_RESOLVERInjection token for the pre rendering service
ACOUSTIC_TOKEN_PROTECTED_CONTENTInjection token for the protected content status
ACOUSTIC_TOKEN_RENDERING_CONTEXT_PROVIDERInjection token for the rendering context provider
ACOUSTIC_TOKEN_RENDERING_CONTEXT_RESOLVERInjection token for the RenderingContextResolver
ACOUSTIC_TOKEN_RESOURCE_URLURL to access the deliveryNaming of this field according to the field in the rendering context
ACOUSTIC_TOKEN_SEED_RESOLVERInjection token for the page service
ACOUSTIC_TOKEN_URL_CONFIGInjection token for the url config
ACOUSTIC_TOKEN_WINDOWCreate a new injection token for injecting the window into a component.
VERSIONVersion and build number of the package

Type Aliases

Type AliasDescription
ExtractInjectionTokenTypeType 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

MemberValueDescription
HEIGH3000
LOW1000
MAX
MEDIUM2000
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

MethodDescription
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

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

MethodDescription
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

PropertyTypeDescription
resolverComponentFactoryResolverOptionally a component factory resolver
typeType<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

PropertyTypeDescription
getTypeByLayout(aLayout: Layout, aLayoutMode?: string) => Observable<ComponentTypeRef<any>>Returns the type object based on the layout configuration
weightnumberOptionally 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

ParameterTypeDescription
aControllerstring | string[]
aTypeComponentTypeRef<any>
aLayoutModesstring | 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

ParameterTypeDescription
aTypeComponentTypeRef<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

ParameterTypeDescription
aTypeType<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

ParameterTypeDescription
aRouteActivatedRoutethe 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

ParameterTypeDescription
aSegmentsUrlSegment[]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

ParameterTypeDescription
aRenderingContextRenderingContextV2
aLayoutModestring

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>;