Options
All
  • Public
  • Public/Protected
  • All
Menu

@storefront/core

Index

Modules

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Override

Override: function

Type declaration

    • (payload: S | T, event: T): T
    • Parameters

      • payload: S | T
      • event: T

      Returns T

ShouldUpdateFunction

ShouldUpdateFunction: function

The type of the shouldUpdate function. This function is used to determine if a component should perform an update.

param

An object with a property called state that contains the component's state.

param

An object that contains the component's props.

returns

true if the component should update, false otherwise.

Type declaration

    • (data: object, nextOpts: object): boolean
    • Parameters

      • data: object
      • nextOpts: object

      Returns boolean

SystemServices

SystemServices: CoreServices & Map

TagConstructor

TagConstructor: object

Type declaration

Variables

ALIAS_DESCRIPTION

ALIAS_DESCRIPTION: symbol = Symbol.for('alias_description')

ARRAY_SEPARATOR

ARRAY_SEPARATOR: "," = ","

ARRAY_TO_DOT_NOTATION_REGEX

ARRAY_TO_DOT_NOTATION_REGEX: RegExp = /\[(\d+)\]/g

CONFIGURABLE_KEY

CONFIGURABLE_KEY: "configurable" = "configurable"

CONSUMES_KEY

CONSUMES_KEY: "consumes" = "consumes"

CORE

CORE: symbol = Symbol.for('storfront_core_service')

DEFAULT_VARIANT_FIELD

DEFAULT_VARIANT_FIELD: "variants" = "variants"

ESCAPE_CHAR

ESCAPE_CHAR: "\" = "\"

GLOBALS

GLOBALS: object = (typeof global === 'undefined' ? window : global) || {}

Type declaration

LOG_PHASES

LOG_PHASES: string[] = [Phase.INITIALIZE,Phase.BEFORE_MOUNT,Phase.MOUNT,Phase.UPDATE,Phase.UPDATED,Phase.BEFORE_UNMOUNT,Phase.UNMOUNT,]

LOG_STYLE

LOG_STYLE: "font-weight: bold" = "font-weight: bold"

ORIGIN_KEY

ORIGIN_KEY: "origin" = "origin"

PAIR_SEPARATOR

PAIR_SEPARATOR: ":" = ":"

PROVIDES_KEY

PROVIDES_KEY: "provides" = "provides"

RANGE_SEPARATOR

RANGE_SEPARATOR: ".." = ".."

RE_RENDER_MESSAGE

RE_RENDER_MESSAGE: "%ctag is preparing to re-render:" = "%ctag is preparing to re-render:"

RIOT

RIOT: symbol = Symbol.for('storefront_riot_instance')

SEPARATORS

SEPARATORS: string[] = [RANGE_SEPARATOR, ARRAY_SEPARATOR, PAIR_SEPARATOR]

STOREFRONT_APP_ID

STOREFRONT_APP_ID: "GroupBy StoreFront" = "GroupBy StoreFront"

STYLISH_CLASS

STYLISH_CLASS: "gb-stylish" = "gb-stylish"

SUGAR_EVENTS

SUGAR_EVENTS: string[] = [Phase.BEFORE_MOUNT,Phase.MOUNT,Phase.UPDATE,Phase.UPDATED,Phase.BEFORE_UNMOUNT,Phase.UNMOUNT,]

TAGS

TAGS: symbol = Symbol.for('storefront_tags')

TAG_DESC

TAG_DESC: symbol = Symbol.for('tag_description')

TAG_META

TAG_META: symbol = Symbol.for('tag_metadata')

TRACKER_EVENT

TRACKER_EVENT: "tracker:send_event" = "tracker:send_event"

UI_CLASS

UI_CLASS: "gb-ui" = "gb-ui"

mixin

mixin: provideConsumeMixin = ProvideConsume.provideConsumeMixin

Functions

DEFAULT_TRANSFORM

  • DEFAULT_TRANSFORM(data: any): object

WINDOW

  • WINDOW(): Window

addActions

  • addActions(tag: Tag): void

addMetadata

  • addMetadata(tag: Tag): void

addStyles

  • addStyles(tag: Tag): void

alias

  • alias<P, S, A>(name: string): (Anonymous function)
  • Type parameters

    • P: any

    • S: any

    • A: any

    Parameters

    • name: string

    Returns (Anonymous function)

aliasingMixin

  • aliasingMixin(this: Tag): void

applyMixin

  • applyMixin(tag: TagInstance, mixin: function): void

arrayToDotNotation

  • arrayToDotNotation(input: string): string

augmentAction

  • augmentAction(action: Action | Action[] | Thunk<any>, metadata: object): any

augmentMeta

  • augmentMeta(action: Action, metadata: object): object

configurable

consume

  • consume(name: string): (Anonymous function)

core

  • core(target: any): void

css

  • css(style: string): (Anonymous function)

debugMixin

  • debugMixin(this: Tag): void

decodeArray

  • decodeArray(input: string): any[]

decodeChars

  • decodeChars(input: string): string

decodePair

  • decodePair(input: string): any[]

encodeArray

  • encodeArray(arr: Array<[string, any[]]>): string

encodeChars

  • encodeChars(input: string): string

encodePair

  • encodePair(input: string[]): string

escapeSeparators

  • escapeSeparators(input: string): string

fluxActionsMixin

  • fluxActionsMixin(this: Tag): void

lifecycleMixin

  • lifecycleMixin(this: Tag): void

logStyle

  • logStyle(color: string): string

loggingMixin

  • loggingMixin(this: Tag): void

mapToSearchActions

  • mapToSearchActions(values: string[], actions: ActionCreators): object[]
  • Parameters

    • values: string[]
    • actions: ActionCreators

    Returns object[]

metadataMixin

  • metadataMixin(this: Tag): void

origin

  • origin(name: string): (Anonymous function)

primeTagActions

  • primeTagActions(tag: Tag): any

propsMixin

  • propsMixin(this: Tag): void

provide

  • provide<P, S, A>(name: string, resolver?: function): (Anonymous function)
  • Type parameters

    • P: any

    • S: any

    • A: any

    Parameters

    • name: string
    • Default value resolver: function = (_, state) => state
        • (props: P, state: S, aliases: A): any
        • Parameters

          • props: P
          • state: S
          • aliases: A

          Returns any

    Returns (Anonymous function)

rayify

  • rayify<T>(values: T | T[]): T[]
  • Type parameters

    • T

    Parameters

    • values: T | T[]

    Returns T[]

removeAliases

  • removeAliases(tag: Tag): void

runInitializePhase

  • runInitializePhase(tag: Tag): void

simpleResolve

  • simpleResolve(__namedParameters: object): any
  • Parameters

    • __namedParameters: object
      • data: any

    Returns any

splitExceptEscaped

  • splitExceptEscaped(input: string, separator: string): any[]

stylishMixin

  • stylishMixin(this: Tag): void

sugarMixin

  • sugarMixin(this: Tag): void

tag

  • tag(name: string, template: string, cssVal?: string): (Anonymous function)
  • Parameters

    • name: string
    • template: string
    • Optional cssVal: string

    Returns (Anonymous function)

updateAliases

  • updateAliases(tag: Tag): object

updateProps

  • updateProps(tag: Tag): void

view

  • view(name: string, template: string, cssVal?: string): void

wrapActionCreator

  • wrapActionCreator(actionCreator: ActionCreator, metadata: object, dispatch: function): (Anonymous function)
  • Parameters

    • actionCreator: ActionCreator
    • metadata: object
    • dispatch: function
        • (action: any): any
        • Parameters

          • action: any

          Returns any

    Returns (Anonymous function)

wrapActionCreators

  • wrapActionCreators(actionCreators: object, metadata: object, dispatch: function): object
  • Parameters

    • actionCreators: object
      • [key: string]: ActionCreator
    • metadata: object
    • dispatch: function
        • (action: any): any
        • Parameters

          • action: any

          Returns any

    Returns object

wrapThunk

  • wrapThunk(thunk: Thunk<any>, metadata: object): (Anonymous function)

Object literals

ALIASING_COLOURS

ALIASING_COLOURS: object

added

added: string = "#306895"

inherited

inherited: string = "#cd4f10"

removed

removed: string = "#a11d10"

updated

updated: string = "#1378a3"

DEFAULTS

DEFAULTS: object

area

area: string = DEFAULT_AREA

collection

collection: string = DEFAULT_COLLECTION

tags

tags: object

Type declaration

autocomplete

autocomplete: object

hoverAutoFill

hoverAutoFill: boolean = true

navigationCount

navigationCount: number = 5

navigations

navigations: object

Type declaration

searchCharMinLimit

searchCharMinLimit: number = 1

showCategoryValuesForFirstMatch

showCategoryValuesForFirstMatch: boolean = false

suggestionCount

suggestionCount: number = 5

overrides

overrides: object

products

products: object

Type declaration

suggestions

suggestions: object

Type declaration

products

products: object

count

count: number = 4

recommendations

recommendations: object

suggestionCount

suggestionCount: number = 2

suggestionMode

suggestionMode: string = "popular"

collections

collections: object

overrides

overrides: object

Type declaration

details

details: object

overrides

overrides: object

Type declaration

history

history: object

length

length: number = 1

mixins

mixins: object

custom

custom: object

Type declaration

global

global: object

shouldUpdate

shouldUpdate: boolean = false

network

network: object

https

https: boolean = typeof window !== 'undefined' && window.location.protocol === 'https:'

options

options: object

globalMixin

globalMixin: boolean = true

initialSearch

initialSearch: boolean = false

legacyAliasing

legacyAliasing: boolean = false

stylish

stylish: boolean = false

ui

ui: boolean = true

personalization

personalization: object

realTimeBiasing

realTimeBiasing: object

attributeMaxBiases

attributeMaxBiases: number = 3

autocomplete

autocomplete: boolean = true

expiry

expiry: number = 14

maxBiases

maxBiases: number = 25

strength

strength: string = "Medium_Increase"

recommendations

recommendations: object

idField

idField: string = "productId"

location

location: boolean = false

iNav

iNav: object

size

size: number = 10

window

window: string = "day"

navigations

navigations: object

sort

sort: boolean = false

refinements

refinements: object

sort

sort: boolean = false

overrides

overrides: object

autocompleteSuggestions

autocompleteSuggestions: object

Type declaration

ids

ids: object

Type declaration

navigations

navigations: object

Type declaration

products

products: object

Type declaration

pastPurchases

pastPurchases: object

biasCount

biasCount: number = 0

biasInfluence

biasInfluence: number = 5

biasStrength

biasStrength: string = "Medium_Increase"

enabled

enabled: boolean = false

productCount

productCount: number = 0

securedPayload

securedPayload: null = null

overrides

overrides: object

autocomplete

autocomplete: object

Type declaration

products

products: object

Type declaration

productSuggestions

productSuggestions: object

mode

mode: string = "trending"

productCount

productCount: number = 0

refinements

refinements: object

overrides

overrides: object

Type declaration

search

search: object

overrides

overrides: object

Type declaration

redirectSingleResult

redirectSingleResult: boolean = false

useDefaultCollection

useDefaultCollection: boolean = false

services

services: object

autocomplete

autocomplete: object

useFirstResult

useFirstResult: boolean = false

logging

logging: object

level

level: string = "debug"

tracker

tracker: object

warnings

warnings: boolean = true

url

url: object

redirects

redirects: object

Type declaration

beautifier

beautifier: object

navigations

navigations: object

Type declaration

queryToken

queryToken: string = "q"

refinementMapping

refinementMapping: undefined[] = []

suffix

suffix: string = ""

useReferenceKeys

useReferenceKeys: boolean = true

variantMapping

variantMapping: undefined[] = []

params

params: object

collection

collection: string = "collection"

page

page: string = "page"

pageSize

pageSize: string = "page_size"

refinements

refinements: string = "refinements"

sort

sort: string = "sort"

routes

routes: object

details

details: string = `/${Routes.DETAILS}`

navigation

navigation: string = `/${Routes.NAVIGATION}`

pastpurchase

pastpurchase: string = `/${Routes.PAST_PURCHASE}`

search

search: string = `/${Routes.SEARCH}`

structure

structure: object

id

id: string = "id"

price

price: string = "price"

title

title: string = "title"

DEFAULT_ORIGINS

DEFAULT_ORIGINS: object

autosearch

autosearch: boolean = false

collectionSwitcher

collectionSwitcher: boolean = false

dym

dym: boolean = false

navigation

navigation: boolean = false

recommendations

recommendations: boolean = false

sayt

sayt: boolean = false

LIFECYCLE_COLOURS

LIFECYCLE_COLOURS: object

__computed

__computed: string = "#f04141"

SERVICES

SERVICES: object

autocomplete

autocomplete: AutocompleteService

collections

collections: CollectionsService

details

logging

pastPurchases

pastPurchases: PastPurchaseService

recommendations

recommendations: RecommendationsService

redirect

redirect: RedirectService

search

tracker

url

dot

dot: object

get

  • get(obj: any, path: string, defaultValue?: any): any
  • Parameters

    • obj: any
    • path: string
    • Optional defaultValue: any

    Returns any

Generated using TypeDoc