Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FluxCapacitor<EventTypes>

Type parameters

  • EventTypes: string | symbol

Hierarchy

  • EventEmitter
    • FluxCapacitor

Index

Constructors

constructor

Properties

___config

___config: Configuration

actions

actions: ActionCreators = ActionCreators

actions for modifying contents of the store

clients

clients: Clients = FluxCapacitor.createClients(this)

instances of all microservice clients

selectors

selectors: Selectors = Selectors

selector functions for extracting data from the store

store

store: ReduxStore<State> = Store.create(this, Observer.listener(this))

instance of the state store

Static prefixed

prefixed: string | boolean

Accessors

config

Methods

addListener

  • addListener(event: EventTypes, fn: ListenerFn, context?: any): this
  • Parameters

    • event: EventTypes
    • fn: ListenerFn
    • Optional context: any

    Returns this

autocomplete

  • autocomplete(query: string): void

countRecords

  • countRecords(collection: string): void

detailsWithRouting

  • detailsWithRouting(product: Product | Record): void

displaySaytPastPurchases

  • displaySaytPastPurchases(): void

emit

  • emit(event: EventTypes, ...args: Array<any>): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: EventTypes
    • Rest ...args: Array<any>

    Returns boolean

eventNames

  • eventNames(): Array<EventTypes>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<EventTypes>

listenerCount

  • listenerCount(event: EventTypes): number
  • Return the number of listeners listening to a given event.

    Parameters

    • event: EventTypes

    Returns number

listeners

  • listeners(event: EventTypes): Array<ListenerFn>
  • Return the listeners registered for a given event.

    Parameters

    • event: EventTypes

    Returns Array<ListenerFn>

moreProducts

  • moreProducts(amount: number): void

moreRefinements

  • moreRefinements(navigationName: string): void

off

  • off(event: EventTypes, fn?: ListenerFn, context?: any, once?: boolean): this
  • Parameters

    • event: EventTypes
    • Optional fn: ListenerFn
    • Optional context: any
    • Optional once: boolean

    Returns this

on

  • on(event: EventTypes, fn: ListenerFn, context?: any): this
  • Add a listener for a given event.

    Parameters

    • event: EventTypes
    • fn: ListenerFn
    • Optional context: any

    Returns this

once

  • once(event: EventTypes, fn: ListenerFn, context?: any): this
  • Add a one-time listener for a given event.

    Parameters

    • event: EventTypes
    • fn: ListenerFn
    • Optional context: any

    Returns this

pastPurchaseProducts

  • pastPurchaseProducts(): void

products

  • products(): void

refine

  • refine(navigationName: string, index: number): void

removeAllListeners

  • removeAllListeners(event?: EventTypes): this
  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: EventTypes

    Returns this

removeListener

  • removeListener(event: EventTypes, fn?: ListenerFn, context?: any, once?: boolean): this
  • Remove the listeners of a given event.

    Parameters

    • event: EventTypes
    • Optional fn: ListenerFn
    • Optional context: any
    • Optional once: boolean

    Returns this

replaceState

  • replaceState(route: string): void

reset

  • reset(query?: string, refinement?: object): void
  • Parameters

    • Optional query: string
    • Optional refinement: object
      • field: string
      • index: number

    Returns void

resize

  • resize(pageSize: number): void

saveState

  • saveState(route: string): void

saytPastPurchases

  • saytPastPurchases(query: string): void

saytProducts

  • saytProducts(query: string, refinements?: Refinement[]): void

saytSuggestions

  • saytSuggestions(query: string): void

search

  • search(query?: string): void

sort

  • sort(index: number): void

switchCollection

  • switchCollection(collection: string): void

switchPage

  • switchPage(page: number): void

unrefine

  • unrefine(navigationName: string, index: number): void

Static createBridge

  • createBridge(config: Configuration, errorHandler: function): BrowserBridge
  • create instance of Searchandiser API client

    Parameters

    • config: Configuration
    • errorHandler: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns BrowserBridge

Static createClients

  • create instances of all clients used to contact microservices

    Parameters

    Returns object

    • bridge: BrowserBridge
    • sayt: Sayt

Static createSayt

Generated using TypeDoc