Options
All
  • Public
  • Public/Protected
  • All
Menu

Main entry point of the spa-sdk library.

Index

Type Aliases

Configuration of the SPA SDK.

Menu: Menu | Menu & Menu

Menu content model.

MetaComment: Meta
PageModel: PageModel | PageModel

Model of a page.

Variables

META_POSITION_BEGIN: "begin" = 'begin'

Meta-data following before a page component.

META_POSITION_END: "end" = 'end'

Meta-data following after a page component.

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

A blocked container with blocked items.

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

A blocked container with inline items.

TYPE_CONTAINER_ITEM_UNDEFINED: symbol = ...

A container item without mapping.

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

A container without surrounding markup.

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

An ordered list container.

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

An unordered list container.

TYPE_LINK_EXTERNAL: "external" = 'external'

Link to a page outside the current application.

TYPE_LINK_INTERNAL: "internal" = 'internal'

Link to a page inside the current application.

TYPE_LINK_RESOURCE: "resource" = 'resource'

Link to a CMS resource.

TYPE_MANAGE_CONTENT_BUTTON: "MANAGE_CONTENT_LINK" = 'MANAGE_CONTENT_LINK'

A manage content button.

TYPE_MANAGE_MENU_BUTTON: "EDIT_MENU_LINK" = 'EDIT_MENU_LINK'

A manage menu button.

Functions

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

    Parameters

    • page: Page

      Page instance to destroy.

    Returns void

  • extractSearchParams(url: string, params: string[]): { searchParams: URLSearchParams; url: string }
  • Extracts query parameters from URL and returns URL object that contains URL path and extracted parameters

    Parameters

    • url: string

      The URL of the page.

    • params: string[]

      Parameters to extract.

    Returns { searchParams: URLSearchParams; url: string }

    • searchParams: URLSearchParams
    • url: string
  • Returns the content of this component.

    Type Parameters

    • T

    Parameters

    • component: ContainerItem

      The component that references the content

    • page: Page

      The page that contains the content

    Returns T | null

  • Initializes the page model.

    Parameters

    Returns Page

  • Initializes the page model.

    Parameters

    • configuration: Configuration

      Configuration of the SPA integration with brXM.

    Returns Promise<Page>

  • Checks whether a value is a page component.

    Parameters

    • value: any

      The value to check.

    Returns value is Component

  • Checks whether a value is a page container.

    Parameters

    • value: any

      The value to check.

    Returns value is Container

  • Checks whether a value is a page container item.

    Parameters

    • value: any

      The value to check.

    Returns value is ContainerItem

  • isContent(value: any): value is Content
  • Checks whether a value is a content.

    Parameters

    • value: any

      The value to check.

    Returns value is Content

  • isDocument(value: any): value is Document
  • Checks whether a value is a document.

    Parameters

    • value: any

      The value to check.

    Returns value is Document

  • isImageSet(value: unknown): value is ImageSet
  • Checks whether a value is an image set.

    Parameters

    • value: unknown

      The value to check.

    Returns value is ImageSet

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

    Parameters

    • value: any

      The value to check.

    Returns value is Link

  • isMenu(value: unknown): value is Menu
  • Checks whether a value is a menu.

    Parameters

    • value: unknown

      The value to check.

    Returns value is Menu

  • 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(value: any): value is Meta
  • Checks whether a value is a meta-data comment.

    Parameters

    • value: any

      The value to check.

    Returns value is Meta

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

    Parameters

    • value: any

      The value to check.

    Returns value is Page

  • Checks whether a value is a pagination.

    Parameters

    • value: unknown

      The value to check.

    Returns value is Pagination

  • Checks whether a value is a reference.

    Parameters

    • value: any

      The value to check.

    Returns value is Reference