New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@acoustic-content-sdk/component-api

Package Overview
Dependencies
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acoustic-content-sdk/component-api

Module to attach inline-edit functionality to an WCH based Angular application.

  • 9.0.216
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
6
Weekly downloads
 
Created
Source

npm

API Documentation

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

component-api package

Framework independent collection of APIs and constants

Interfaces

InterfaceDescription
AbstractComponentResolver
AbstractComponentsRegistry
AbstractComponentTypeRefResolverService that resolves a component type ref given a layout.
AbstractLayoutComponentDirectiveType of the Layout metadata.
DeliveryContentResolverService interface that allows to resolve a rendering context given its ID.
DeliveryLayoutMappingResolverService interface that allows to resolve a type
DeliveryLayoutResolverService interface that allows to resolve a type
DeliveryPageResolverService interface that allows to resolve a rendering context given its ID.
DeliverySearchResolverService that performs a search query against delivery search for artifacts of a particular classification.
DeliverySiteResolver
DeliveryTypeResolverService interface that allows to resolve a type
HandlebarsResolverService interface to map a template to a (markup) string
LayoutMappingDirectiveType of the LayoutMapping metadata.
LayoutMappingResolver
LayoutResolverCallback that finds the layout assigned to the object in the current rendering context.
ProtectedContent
RenderingContextResolverConstructs a rendering context
SeedResolverService interface that allows to resolve a seed
WchPageServiceService interface that allows to resolve a rendering context given the page.

Variables

VariableDescription
VERSIONVersion and build number of the package
WCH_RC_INTERCEPTOR_TOKEN

Type Aliases

Type AliasDescription
HandlebarsProcessorthe processor converts the context into a string
RenderingContextInput
WindowType

Home > @acoustic-content-sdk/component-api > AbstractComponentResolver

AbstractComponentResolver interface

Signature:

export interface AbstractComponentResolver<T> 

Methods

MethodDescription
resolveComponent(aRenderingContext, aLayoutMode)

Home > @acoustic-content-sdk/component-api > AbstractComponentsRegistry

AbstractComponentsRegistry interface

Signature:

export interface AbstractComponentsRegistry<TYPE> extends AbstractComponentTypeRefResolver<TYPE> 

Properties

PropertyTypeDescription
getTypeByLayout(aLayout: Layout, aLayoutMode?: string) => Observable<TYPE>Returns the type object based on the layout configuration
getTypeBySelector(aSelector: string, aLayoutMode?: string) => Observable<TYPE>Returns the type object based on the layout selector
registerType(aController: string | string[], aType: TYPE, aLayoutModes?: string | string[]) => voiddefine the methods

Home > @acoustic-content-sdk/component-api > AbstractComponentTypeRefResolver

AbstractComponentTypeRefResolver interface

Service that resolves a component type ref given a layout.

Signature:

export interface AbstractComponentTypeRefResolver<T> 

Properties

PropertyTypeDescription
getTypeByLayout(aLayout: Layout, aLayoutMode?: string) => Observable<T>Returns the type object based on the layout configuration

Home > @acoustic-content-sdk/component-api > AbstractLayoutComponentDirective

AbstractLayoutComponentDirective interface

Type of the Layout metadata.

Signature:

export interface AbstractLayoutComponentDirective 

Properties

PropertyTypeDescription
layoutModestring | string[]An optional layout mode used with a default layout mapping.
mappingIdstring | string[]ID of the content item, content type or the content type name used for a default layout mapping. If the ID is not given, this layout will not be mapped by default.
selectorstring | string[]Defines the mapping between the layout controller to the layout implementation. If this property is missing, the selector of the component will be used instead.

Home > @acoustic-content-sdk/component-api > DeliveryContentResolver

DeliveryContentResolver interface

Service interface that allows to resolve a rendering context given its ID.

Signature:

export interface DeliveryContentResolver 

Methods

MethodDescription
getDeliveryContentItem(aID)Resolves a rendering context given the ID of the item

Home > @acoustic-content-sdk/component-api > DeliveryLayoutMappingResolver

DeliveryLayoutMappingResolver interface

Service interface that allows to resolve a type

Signature:

export interface DeliveryLayoutMappingResolver 

Methods

MethodDescription
getDeliveryLayoutMapping(aTypeId)Resolves a layout mapping given the ID of the type of the mapping

Home > @acoustic-content-sdk/component-api > DeliveryLayoutResolver

DeliveryLayoutResolver interface

Service interface that allows to resolve a type

Signature:

export interface DeliveryLayoutResolver 

Methods

MethodDescription
getDeliveryLayout(aLayoutId)Resolves a layout record

Home > @acoustic-content-sdk/component-api > DeliveryPageResolver

DeliveryPageResolver interface

Service interface that allows to resolve a rendering context given its ID.

Signature:

export interface DeliveryPageResolver 

Methods

MethodDescription
getDeliveryPage(aPath)Resolves a rendering context given the ID of the item

Home > @acoustic-content-sdk/component-api > DeliverySearchResolver

DeliverySearchResolver interface

Service that performs a search query against delivery search for artifacts of a particular classification.

Signature:

export interface DeliverySearchResolver 

Methods

MethodDescription
getDeliverySearchResults(aQuery, aClassification)Execute the search. The implementation will add the classification to the fq part of the query, automatically, so there is no need to contain it in the query.

Home > @acoustic-content-sdk/component-api > DeliverySiteResolver

DeliverySiteResolver interface

Signature:

export interface DeliverySiteResolver 

Methods

MethodDescription
getSiteDeliveryContentItem()Resolves the current site

Home > @acoustic-content-sdk/component-api > DeliveryTypeResolver

DeliveryTypeResolver interface

Service interface that allows to resolve a type

Signature:

export interface DeliveryTypeResolver 

Methods

MethodDescription
getDeliveryType(aID)Resolves a rendering context given the ID of the item

Home > @acoustic-content-sdk/component-api > HandlebarsResolver

HandlebarsResolver interface

Service interface to map a template to a (markup) string

Signature:

export interface HandlebarsResolver 

Methods

MethodDescription
getHandlebarsProcessor(aId)Resolves the template ID to a processor

Home > @acoustic-content-sdk/component-api > LayoutMappingDirective

LayoutMappingDirective interface

Type of the LayoutMapping metadata.

Signature:

export interface LayoutMappingDirective 

Properties

PropertyTypeDescription
idstring | string[]Type IDs or content IDs to map this to
kindCONTENT_ITEM_KIND | CONTENT_ITEM_KIND[]Type IDs to map this to
layoutModestring | string[]An optional layout mode used with this layout mapping.
selectorstring | string[]Defines the mapping between the layout controller to the layout implementation. If this property is missing, the selector of the component will be used instead.

Home > @acoustic-content-sdk/component-api > LayoutMappingResolver

LayoutMappingResolver interface

Signature:

export interface LayoutMappingResolver 

Properties

PropertyTypeDescription
getSelector(aLayoutMode: string, aRenderingContext: RenderingContextV2) => string | undefinedReturns the layout selector based on the rendering context

Home > @acoustic-content-sdk/component-api > LayoutResolver

LayoutResolver interface

Callback that finds the layout assigned to the object in the current rendering context.

Signature:

export interface LayoutResolver 

Properties

PropertyTypeDescription
resolveLayout(aLayoutMode: string, aRenderingContext: RenderingContextV2) => Observable<Layout>Returns the layout layout object based on the rendering context and the mode

Home > @acoustic-content-sdk/component-api > ProtectedContent

ProtectedContent interface

Signature:

export interface ProtectedContent 

Properties

PropertyTypeDescription
protected$Observable<boolean>Flag to tell whether or not to serve protected content

Home > @acoustic-content-sdk/component-api > RenderingContextResolver

RenderingContextResolver interface

Constructs a rendering context

Signature:

export interface RenderingContextResolver 

Properties

PropertyTypeDescription
resolveRenderingContext(aItem: RenderingContextInput, aProvider: RenderingContextProviderV2) => Observable<RenderingContextV2>Returns the layout selector based on the rendering context

Home > @acoustic-content-sdk/component-api > SeedResolver

SeedResolver interface

Service interface that allows to resolve a seed

Signature:

export interface SeedResolver 

Methods

MethodDescription
getSeed(aID, aClassification)Resolves a rendering context given the ID of the item

Home > @acoustic-content-sdk/component-api > WchPageService

WchPageService interface

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

Signature:

export interface WchPageService 

Methods

MethodDescription
getRenderingContextByPath(aPath)Resolves the rendering context given the path

Home > @acoustic-content-sdk/component-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/component-api > WCH_RC_INTERCEPTOR_TOKEN

WCH_RC_INTERCEPTOR_TOKEN variable

Signature:

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

Home > @acoustic-content-sdk/component-api > HandlebarsProcessor

HandlebarsProcessor type

the processor converts the context into a string

Signature:

export declare type HandlebarsProcessor = (aContext: RenderingContextV2) => string;

Home > @acoustic-content-sdk/component-api > RenderingContextInput

RenderingContextInput type

Signature:

export declare type RenderingContextInput = string | DeliveryContentItem | DeliveryGroupElement | DeliveryReferenceElement;

Home > @acoustic-content-sdk/component-api > WindowType

WindowType type

Signature:

export declare type WindowType = Window | Object;

Home > @acoustic-content-sdk/component-api > AbstractComponentResolver > resolveComponent

AbstractComponentResolver.resolveComponent() method

Signature:

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

Parameters

ParameterTypeDescription
aRenderingContextRenderingContextV2
aLayoutModestring

Returns:

Observable<T>

Home > @acoustic-content-sdk/component-api > AbstractComponentsRegistry > getTypeByLayout

AbstractComponentsRegistry.getTypeByLayout property

Returns the type object based on the layout configuration

Signature:

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

Home > @acoustic-content-sdk/component-api > AbstractComponentsRegistry > getTypeBySelector

AbstractComponentsRegistry.getTypeBySelector property

Returns the type object based on the layout selector

Signature:

getTypeBySelector: (aSelector: string, aLayoutMode?: string) => Observable<TYPE>;

Home > @acoustic-content-sdk/component-api > AbstractComponentsRegistry > registerType

AbstractComponentsRegistry.registerType property

define the methods

Signature:

registerType: (aController: string | string[], aType: TYPE, aLayoutModes?: string | string[]) => void;

Home > @acoustic-content-sdk/component-api > AbstractComponentTypeRefResolver > getTypeByLayout

AbstractComponentTypeRefResolver.getTypeByLayout property

Returns the type object based on the layout configuration

Signature:

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

Home > @acoustic-content-sdk/component-api > AbstractLayoutComponentDirective > layoutMode

AbstractLayoutComponentDirective.layoutMode property

An optional layout mode used with a default layout mapping.

Signature:

layoutMode?: string | string[];

Home > @acoustic-content-sdk/component-api > AbstractLayoutComponentDirective > mappingId

AbstractLayoutComponentDirective.mappingId property

ID of the content item, content type or the content type name used for a default layout mapping. If the ID is not given, this layout will not be mapped by default.

Signature:

mappingId?: string | string[];

Home > @acoustic-content-sdk/component-api > AbstractLayoutComponentDirective > selector

AbstractLayoutComponentDirective.selector property

Defines the mapping between the layout controller to the layout implementation. If this property is missing, the selector of the component will be used instead.

Signature:

selector?: string | string[];

Home > @acoustic-content-sdk/component-api > DeliveryContentResolver > getDeliveryContentItem

DeliveryContentResolver.getDeliveryContentItem() method

Resolves a rendering context given the ID of the item

Signature:

getDeliveryContentItem(aID: string): Observable<DeliveryContentItem>;

Parameters

ParameterTypeDescription
aIDstringthe ID of the item

Returns:

Observable<DeliveryContentItem>

an observable of the context

Home > @acoustic-content-sdk/component-api > DeliveryLayoutResolver > getDeliveryLayout

DeliveryLayoutResolver.getDeliveryLayout() method

Resolves a layout record

Signature:

getDeliveryLayout(aLayoutId: string): Observable<DeliveryLayout>;

Parameters

ParameterTypeDescription
aLayoutIdstringthe ID of the layout

Returns:

Observable<DeliveryLayout>

an observable of the layout

Home > @acoustic-content-sdk/component-api > DeliveryLayoutMappingResolver > getDeliveryLayoutMapping

DeliveryLayoutMappingResolver.getDeliveryLayoutMapping() method

Resolves a layout mapping given the ID of the type of the mapping

Signature:

getDeliveryLayoutMapping(aTypeId: string): Observable<DeliveryLayoutMapping>;

Parameters

ParameterTypeDescription
aTypeIdstringthe ID of the content type the layout is mapped to

Returns:

Observable<DeliveryLayoutMapping>

an observable of the context

Home > @acoustic-content-sdk/component-api > DeliveryPageResolver > getDeliveryPage

DeliveryPageResolver.getDeliveryPage() method

Resolves a rendering context given the ID of the item

Signature:

getDeliveryPage(aPath: string): Observable<DeliveryContentItem>;

Parameters

ParameterTypeDescription
aPathstringthe path to the page

Returns:

Observable<DeliveryContentItem>

an observable of the context

Home > @acoustic-content-sdk/component-api > DeliverySiteResolver > getSiteDeliveryContentItem

DeliverySiteResolver.getSiteDeliveryContentItem() method

Resolves the current site

Signature:

getSiteDeliveryContentItem(): Observable<SiteDeliveryContentItem>;

Returns:

Observable<SiteDeliveryContentItem>

the site record

Home > @acoustic-content-sdk/component-api > DeliverySearchResolver > getDeliverySearchResults

DeliverySearchResolver.getDeliverySearchResults() method

Execute the search. The implementation will add the classification to the fq part of the query, automatically, so there is no need to contain it in the query.

Signature:

getDeliverySearchResults<T>(aQuery: QueryInput, aClassification: string): Observable<SearchResults<T>>;

Parameters

ParameterTypeDescription
aQueryQueryInputthe query input
aClassificationstringthe classification

Returns:

Observable<SearchResults<T>>

the search result

Home > @acoustic-content-sdk/component-api > DeliveryTypeResolver > getDeliveryType

DeliveryTypeResolver.getDeliveryType() method

Resolves a rendering context given the ID of the item

Signature:

getDeliveryType(aID: string): Observable<DeliveryType>;

Parameters

ParameterTypeDescription
aIDstringthe ID of the item

Returns:

Observable<DeliveryType>

an observable of the context

Home > @acoustic-content-sdk/component-api > HandlebarsResolver > getHandlebarsProcessor

HandlebarsResolver.getHandlebarsProcessor() method

Resolves the template ID to a processor

Signature:

getHandlebarsProcessor(aId: string): Observable<HandlebarsProcessor>;

Parameters

ParameterTypeDescription
aIdstringthe ID of the template

Returns:

Observable<HandlebarsProcessor>

an observable of the processor

Home > @acoustic-content-sdk/component-api > LayoutMappingDirective > id

LayoutMappingDirective.id property

Type IDs or content IDs to map this to

Signature:

id?: string | string[];

Home > @acoustic-content-sdk/component-api > LayoutMappingDirective > kind

LayoutMappingDirective.kind property

Type IDs to map this to

Signature:

kind?: CONTENT_ITEM_KIND | CONTENT_ITEM_KIND[];

Home > @acoustic-content-sdk/component-api > LayoutMappingDirective > layoutMode

LayoutMappingDirective.layoutMode property

An optional layout mode used with this layout mapping.

Signature:

layoutMode?: string | string[];

Home > @acoustic-content-sdk/component-api > LayoutMappingDirective > selector

LayoutMappingDirective.selector property

Defines the mapping between the layout controller to the layout implementation. If this property is missing, the selector of the component will be used instead.

Signature:

selector?: string | string[];

Home > @acoustic-content-sdk/component-api > LayoutMappingResolver > getSelector

LayoutMappingResolver.getSelector property

Returns the layout selector based on the rendering context

Signature:

getSelector: (aLayoutMode: string, aRenderingContext: RenderingContextV2) => string | undefined;

Home > @acoustic-content-sdk/component-api > LayoutResolver > resolveLayout

LayoutResolver.resolveLayout property

Returns the layout layout object based on the rendering context and the mode

Signature:

resolveLayout: (aLayoutMode: string, aRenderingContext: RenderingContextV2) => Observable<Layout>;

Home > @acoustic-content-sdk/component-api > ProtectedContent > protected$

ProtectedContent.protected$ property

Flag to tell whether or not to serve protected content

Signature:

protected$: Observable<boolean>;

Home > @acoustic-content-sdk/component-api > RenderingContextResolver > resolveRenderingContext

RenderingContextResolver.resolveRenderingContext property

Returns the layout selector based on the rendering context

Signature:

resolveRenderingContext: (aItem: RenderingContextInput, aProvider: RenderingContextProviderV2) => Observable<RenderingContextV2>;

Home > @acoustic-content-sdk/component-api > SeedResolver > getSeed

SeedResolver.getSeed() method

Resolves a rendering context given the ID of the item

Signature:

getSeed(aID: string, aClassification: string): Observable<string>;

Parameters

ParameterTypeDescription
aIDstringthe ID of the item
aClassificationstringclassification of the item

Returns:

Observable<string>

an observable of the context

Home > @acoustic-content-sdk/component-api > WchPageService > getRenderingContextByPath

WchPageService.getRenderingContextByPath() method

Resolves the rendering context given the path

Signature:

getRenderingContextByPath(aPath: string): Observable<RenderingContextV2 | null | undefined>;

Parameters

ParameterTypeDescription
aPathstringthe path as a string

Returns:

Observable<RenderingContextV2 | null | undefined>

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

Keywords

FAQs

Package last updated on 03 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc