Options
All
  • Public
  • Public/Protected
  • All
Menu

Global registry for registering add-on for the content flow gallery. An add-on should create a new instance of this class and pass its implementation as the methods argument to the constructor. It will be registered automatically.

Type parameters

  • TCfg = unknown

    Type of the configuration for the add-on.

Hierarchy

  • ContentFlowAddOn

Index

Constructors

constructor

  • new ContentFlowAddOn<TCfg>(name: string, methods?: Partial<AddOnMethods<Record<string, unknown>>>, register?: boolean): ContentFlowAddOn<TCfg>
  • Creates a new content flow add-on.

    Type parameters

    • TCfg = unknown

    Parameters

    • name: string

      Name of the add-on.

    • Optional methods: Partial<AddOnMethods<Record<string, unknown>>>

      Object with the implementation of the add-on.

    • Optional register: boolean

      Whether to register as an add-on to the content flow library automatically.

    Returns ContentFlowAddOn<TCfg>

Properties

Browser

Browser: Record<BrowserKind, boolean>

Information about the current browser environment. For each browser, the value is true when the current browser is of that kind, and false otherwise.

addScript

addScript: (path: string) => void

Loads and executes the given JavaScript file.

Type declaration

    • (path: string): void
    • Loads and executes the given JavaScript file.

      Parameters

      • path: string

        URL to a JavaScript file.

      Returns void

addScripts

addScripts: (basePath: string, fileNames: string[]) => void

Loads and executes the given JavaScript files.

Type declaration

    • (basePath: string, fileNames: string[]): void
    • Loads and executes the given JavaScript files.

      Parameters

      • basePath: string

        Base URL to use

      • fileNames: string[]

        List of JavaScript files, relative to the given basePath.

      Returns void

addStylesheet

addStylesheet: (path: string) => void

Loads and applies the given CSS file.

Type declaration

    • (path: string): void
    • Loads and applies the given CSS file.

      Parameters

      • path: string

        URL to a CSS file.

      Returns void

addStylesheets

addStylesheets: (basePath: string, fileNames: string[]) => void

Loads and applies the given CSS files.

Type declaration

    • (basePath: string, fileNames: string[]): void
    • Loads and applies the given CSS files.

      Parameters

      • basePath: string

        Base URL to use

      • fileNames: string[]

        List of CSS files, relative to the given basePath.

      Returns void

conf

conf: TCfg

Current configuration of this add-on.

Methods

Protected _init

  • Called after this add-on was created. It's mostly intended to automatically add additional stylesheet and JavaScript files.

    Parameters

    • flow: ContentFlow

      The content flow gallery for which this add-on was created.

    Returns void

setConfig

  • setConfig(cfg: TCfg): void
  • Sets the configuration of this add-on to the given confugration.

    Parameters

    • cfg: TCfg

      New configuration to set.

    Returns void

Generated using TypeDoc