Options
All
  • Public
  • Public/Protected
  • All
Menu

@bloomreach/spa-sdk

Index

Type aliases

ComponentType

ComponentType: "COMPONENT" | "CONTAINER_ITEM_COMPONENT" | "CONTAINER_COMPONENT"

ContainerType

ContainerType: "hst.vbox" | "hst.unorderedlist" | "hst.orderedlist" | "hst.span" | "hst.nomarkup"

HttpClient

HttpClient<T>: function

Fetches the page model data.

Type parameters

  • T

Type declaration

HttpClientConfig

HttpClientConfig: object

Configuration of an HTTP client call.

Type declaration

HttpHeaders

HttpHeaders: Partial<Record<string, string | string[]>>

Map of HTTP headers.

LinkType

LinkType: "external" | "internal" | "resource"

Listener

Listener<T, U>: function

Event listener.

Type parameters

  • T

  • U: Extract<keyof T, string>

Type declaration

    • (eventData: T[U]): any
    • Parameters

      • eventData: T[U]

      Returns any

MetaPosition

MetaPosition: "begin" | "end"

MetaType

MetaType: "comment"

UnsubscribeFn

UnsubscribeFn: function

Function to unsubscribe a listener from an event.

Type declaration

    • (): void
    • Returns void

Variables

Const META_POSITION_BEGIN

META_POSITION_BEGIN: "begin" = "begin"

Meta-data following before a page component.

Const META_POSITION_END

META_POSITION_END: "end" = "end"

Meta-data following after a page component.

Const TYPE_CONTAINER_BOX

TYPE_CONTAINER_BOX: "hst.vbox" = "hst.vbox"

A blocked container with blocked items.

Const TYPE_CONTAINER_INLINE

TYPE_CONTAINER_INLINE: "hst.span" = "hst.span"

A blocked container with inline items.

Const TYPE_CONTAINER_NO_MARKUP

TYPE_CONTAINER_NO_MARKUP: "hst.nomarkup" = "hst.nomarkup"

A container without surrounding markup.

Const TYPE_CONTAINER_ORDERED_LIST

TYPE_CONTAINER_ORDERED_LIST: "hst.orderedlist" = "hst.orderedlist"

An ordered list container.

Const TYPE_CONTAINER_UNORDERED_LIST

TYPE_CONTAINER_UNORDERED_LIST: "hst.unorderedlist" = "hst.unorderedlist"

An unordered list container.

Const TYPE_LINK_EXTERNAL

TYPE_LINK_EXTERNAL: "external" = "external"

Link to a page outside the current application.

Const TYPE_LINK_INTERNAL

TYPE_LINK_INTERNAL: "internal" = "internal"

Link to a page inside the current application.

Const TYPE_LINK_RESOURCE

TYPE_LINK_RESOURCE: "resource" = "resource"

Link to a CMS resource.

Functions

destroy

  • destroy(page: Page): void
  • Destroys the integration with the SPA page.

    Parameters

    • page: Page

      Page instance to destroy.

    Returns void

initialize

  • Initializes the page model.

    Parameters

    • config: Configuration

      Configuration of the SPA integration with brXM.

    • Optional model: PageModel

    Returns Promise<Page>

isComponent

  • isComponent(value: any): value is Component
  • Checks whether a value is a page component.

    Parameters

    • value: any

      The value to check.

    Returns value is Component

isContainer

  • isContainer(value: any): value is Container
  • Checks whether a value is a page container.

    Parameters

    • value: any

      The value to check.

    Returns value is Container

isContainerItem

  • isContainerItem(value: any): value is ContainerItem
  • Checks whether a value is a page container item.

    Parameters

    • value: any

      The value to check.

    Returns value is ContainerItem

isLink

  • isLink(value: any): value is Link
  • Checks whether a value is a link.

    Parameters

    • value: any

      The value to check.

    Returns value is Link

isMeta

  • isMeta(value: any): value is Meta
  • Checks whether a value is a meta-data object.

    Parameters

    • value: any

      The value to check.

    Returns value is Meta

isMetaComment

  • isMetaComment(value: any): value is MetaComment
  • Checks whether a value is a meta-data comment.

    Parameters

    • value: any

      The value to check.

    Returns value is MetaComment

isPage

  • isPage(value: any): value is Page
  • Checks whether a value is a page.

    Parameters

    • value: any

      The value to check.

    Returns value is Page

isReference

  • isReference(value: any): value is Reference
  • Checks whether a value is a reference.

    Parameters

    • value: any

      The value to check.

    Returns value is Reference