Options
All
  • Public
  • Public/Protected
  • All
Menu

@storefront/flux-capacitor

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Action

Action: RefreshState

GenericTransformer

GenericTransformer: function

Type declaration

    • (...arg: T[]): T
    • Parameters

      • Rest ...arg: T[]

      Returns T

SagaCreator

SagaCreator: function

Type declaration

    • Parameters

      Returns function

        • (): IterableIterator<ForkEffect>
        • Returns IterableIterator<ForkEffect>

State

State: UI

Variables

DEFAULT_AREA

DEFAULT_AREA: "Production" = "Production"

DEFAULT_COLLECTION

DEFAULT_COLLECTION: "default" = "default"

DEFAULT_PAGE_SIZE

DEFAULT_PAGE_SIZE: 10 = 10

DETAILS_CHANGE_ACTIONS

DETAILS_CHANGE_ACTIONS: string[] = [Actions.UPDATE_DETAILS,]

MAX_RECORDS

MAX_RECORDS: 10000 = 10000

PAST_PURCHASES_SEARCH_CHANGE_ACTIONS

PAST_PURCHASES_SEARCH_CHANGE_ACTIONS: string[] = [Actions.UPDATE_PAST_PURCHASE_QUERY,Actions.RESET_PAST_PURCHASE_REFINEMENTS,Actions.SELECT_PAST_PURCHASE_REFINEMENT,Actions.DESELECT_PAST_PURCHASE_REFINEMENT,Actions.SELECT_PAST_PURCHASE_SORT,Actions.UPDATE_PAST_PURCHASE_CURRENT_PAGE,Actions.UPDATE_PAST_PURCHASE_PAGE_SIZE,]

PAST_PURCHASE_SKU_ACTIONS

PAST_PURCHASE_SKU_ACTIONS: string[] = [Actions.FETCH_PAST_PURCHASE_PRODUCTS,Actions.FETCH_SAYT_PAST_PURCHASES,]

PERSONALIZATION_CHANGE_ACTIONS

PERSONALIZATION_CHANGE_ACTIONS: string[] = [Actions.SELECT_REFINEMENT,Actions.ADD_REFINEMENT,]

RECALL_CHANGE_ACTIONS

RECALL_CHANGE_ACTIONS: string[] = [Actions.RESET_REFINEMENTS,Actions.UPDATE_QUERY,Actions.ADD_REFINEMENT,Actions.SELECT_REFINEMENT,Actions.DESELECT_REFINEMENT,]

SAGA_CREATORS

SAGA_CREATORS: (Anonymous function)[] = [autocomplete,collection,productDetails,products,recommendations,refinements,]

SAVE_STATE_ACTIONS

SAVE_STATE_ACTIONS: string[] = [...SEARCH_CHANGE_ACTIONS,...PAST_PURCHASES_SEARCH_CHANGE_ACTIONS,...DETAILS_CHANGE_ACTIONS]

SEARCH_CHANGE_ACTIONS

SEARCH_CHANGE_ACTIONS: string[] = [...RECALL_CHANGE_ACTIONS,Actions.SELECT_COLLECTION,Actions.SELECT_SORT,Actions.UPDATE_PAGE_SIZE,Actions.UPDATE_CURRENT_PAGE,]

STORAGE_KEY

STORAGE_KEY: "gb-personalization" = "gb-personalization"

STORAGE_WHITELIST

STORAGE_WHITELIST: string[] = ['biasing']

UNDOABLE_ACTIONS

UNDOABLE_ACTIONS: string[] = [Actions.RECEIVE_PRODUCTS,Actions.RECEIVE_RECOMMENDATIONS_PRODUCTS,Actions.RECEIVE_COLLECTION_COUNT,Actions.RECEIVE_NAVIGATION_SORT,Actions.RECEIVE_MORE_REFINEMENTS,Actions.RECEIVE_PAST_PURCHASE_PRODUCTS,]

autocompletePastPurchaseRequest

autocompletePastPurchaseRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.autocompleteProducts, Configuration.pastPurchaseAutocompleteOverrides)

autocompleteProductsRequest

autocompleteProductsRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.autocompleteProducts, Configuration.autocompleteProductsOverrides)

autocompleteSuggestionsRequest

autocompleteSuggestionsRequest: RequestBuilder<AutocompleteConfig & object, AutocompleteConfig & object> = new RequestBuilder<QueryTimeAutocompleteConfig>(RequestHelpers.autocompleteSuggestions, Configuration.autocompleteSuggestionsOverrides)

collectionRequest

collectionRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.search, Configuration.collectionOverrides)

fetch

fetch: any

pastPurchaseProductsRequest

pastPurchaseProductsRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.pastPurchaseProducts, Configuration.pastPurchaseOverrides)

personalizationTransform

personalizationTransform: any = createTransform(// transform state coming from redux on its way to being serialized and storedAdapter.transformToBrowser,// configuration options (if any))

productDetailsRequest

productDetailsRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.search, Configuration.detailsOverrides)

productsRequest

productsRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.products, Configuration.searchOverrides)

recommendationsNavigationsRequest

recommendationsNavigationsRequest: RequestBuilder<RecommendationsBody, RecommendationsBody> = new RequestBuilder<Recommendations.RecommendationsBody>(RequestHelpers.recommendationsNavigations, Configuration.recommendationsNavigationsOverrides)

recommendationsProductIdsRequest

recommendationsProductIdsRequest: RequestBuilder<RecommendationsRequest, RecommendationsRequest> = new RequestBuilder<Recommendations.RecommendationsRequest>(RequestHelpers.recommendationsProductIDs, Configuration.recommendationsIdsOverrides)

recommendationsProductsRequest

recommendationsProductsRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.search, Configuration.recommendationsProductsOverrides)

recommendationsSuggestionsRequest

recommendationsSuggestionsRequest: RequestBuilder<RecommendationsBody & object | RecommendationsRequest & object, RecommendationsBody | RecommendationsRequest> = new RequestBuilder<Recommendations.Request & { query: string }, Recommendations.Request>(RequestHelpers.recommendationsSuggestions, Configuration.recommendationsSuggestionsOverrides)

refinementsRequest

refinementsRequest: RequestBuilder<Request, Request> = new RequestBuilder<Request>(RequestHelpers.search, Configuration.refinementsOverrides)

Functions

addRefinement

  • addRefinement(state: State, __namedParameters: object): object
  • Parameters

    • state: State
    • __namedParameters: object
      • high: number
      • low: number
      • navigationId: string
      • range: boolean
      • value: string

    Returns object

    • byId: object
      • __computed: Object | Object

applyNavigationReducer

  • applyNavigationReducer(state: State, __namedParameters: object, reducer: Function): object

applyPageReducer

  • applyPageReducer(state: State, __namedParameters: object, reducer: Function): object

clearComponentState

createAction

  • createAction<T, P>(type: T, payload?: P, validator?: object): Action<T, P>
  • Type parameters

    • T: string

    • P

    Parameters

    • type: T
    • Optional payload: P
    • Optional validator: object

    Returns Action<T, P>

createComponentState

  • createComponentState(state: State, __namedParameters: object): object
  • Parameters

    • state: State
    • __namedParameters: object
      • id: string
      • tagName: string
      • tagState: object

    Returns object

    • __computed: object
      • __computed: object

createSagas

deselectRefinement

doneFetching

  • doneFetching(state: State, section: string): object

generateNavigation

  • generateNavigation(state: State, navigationId: string, refinement: any, index: number): Object | Object

handleError

  • handleError(errorAction: Action<any>, actionCreator: function): any

insertSorted

  • insertSorted(allIds: BiasKey[], __namedParameters: object): BiasKey[]

normalizeToFunction

rayify

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

    • T

    Parameters

    • arr: T | T[]

    Returns T[]

receiveCount

  • receiveCount(state: State, __namedParameters: object): object

receiveMoreRefinements

receiveNavigationSort

receiveNavigations

receivePage

  • receivePage(state: State, __namedParameters: object): object
  • Parameters

    • state: State
    • __namedParameters: object
      • current: number
      • from: number
      • last: number
      • next: number
      • previous: number
      • to: number

    Returns object

    • current: number
    • from: number
    • last: number
    • next: number
    • previous: number
    • to: number

receiveProductRecords

receiveQuery

  • receiveQuery(state: State, __namedParameters: object): object
  • Parameters

    • state: State
    • __namedParameters: object
      • corrected: string
      • didYouMean: string[]
      • original: string
      • related: string[]
      • rewrites: string[]

    Returns object

    • corrected: string
    • didYouMean: string[]
    • original: string
    • related: string[]
    • rewrites: string[]

receiveSuggestions

  • receiveSuggestions(state: State, __namedParameters: object): object

receiveTemplate

refinementPayload

  • refinementPayload(field: string, valueOrLow: any, high?: any): object | object
  • Parameters

    • field: string
    • valueOrLow: any
    • Default value high: any = null

    Returns object | object

removeComponentState

  • removeComponentState(state: State, __namedParameters: object): object
  • Parameters

    • state: State
    • __namedParameters: object
      • id: string
      • tagName: string

    Returns object

    • __computed: object

resetPage

resetRefinements

  • resetRefinements(state: State, navigationId: boolean | string): object

rootReducer

  • rootReducer(state: any, action: any): State

selectRefinement

shouldResetRefinements

  • shouldResetRefinements(__namedParameters: object, state: State): boolean
  • Parameters

    • __namedParameters: object
      • high: number
      • index: number
      • low: number
      • navigationId: string
      • range: boolean
      • value: string
    • state: State

    Returns boolean

sortBasedOn

  • sortBasedOn<T, S>(toBeSorted: T[], basisArray: S[], callback?: function): T[]
  • Type parameters

    • T

    • S

    Parameters

    • toBeSorted: T[]
    • basisArray: S[]
    • Optional callback: function
        • (sorted: T, unsorted: S): boolean
        • Parameters

          • sorted: T
          • unsorted: S

          Returns boolean

    Returns T[]

startFetching

  • startFetching(state: State, section: string): object

undoWithoutHistory

  • undoWithoutHistory(store: any): (Anonymous function)

update

  • update(state: State, __namedParameters: object): object

updateArea

  • updateArea(state?: string): string

updateAutocomplete

updateBiasing

updateCollections

updateCurrent

  • updateCurrent(state: State, current: number): object

updateDetails

updateFetching

  • updateFetching(state: State, __namedParameters: object): object
  • Parameters

    • state: State
    • __namedParameters: object
      • isFetchingBackward: boolean
      • isFetchingForward: boolean

    Returns object

    • isFetchingBackward: boolean
    • isFetchingForward: boolean

updateInfiniteScroll

updateIsFetching

updateIsRunning

updateMorePastPurchaseProducts

updateMoreProducts

updateNavigations

updateOriginal

  • updateOriginal(state: State, query: string): object

updatePage

updatePastPurchaseAllRecordCount

  • updatePastPurchaseAllRecordCount(state: State, __namedParameters: object): object

updatePastPurchaseCurrentRecordCount

  • updatePastPurchaseCurrentRecordCount(state: State, __namedParameters: object): object

updatePastPurchaseProducts

  • updatePastPurchaseProducts(state: State, __namedParameters: object): object

updatePastPurchaseQuery

  • updatePastPurchaseQuery(state: State, __namedParameters: object): object

updatePastPurchaseSkus

  • updatePastPurchaseSkus(state: State, __namedParameters: object): object

updatePastPurchaseSortSelected

  • updatePastPurchaseSortSelected(state: State, __namedParameters: object): object

updatePastPurchaseTemplate

  • updatePastPurchaseTemplate(state: State, __namedParameters: object): object

updatePastPurchases

updatePersonalization

updateProducts

updateProductsLoaded

updateQuery

  • updateQuery(state: State, query: string): object

updateRecommendations

updateRecommendationsProducts

  • updateRecommendationsProducts(state: State, __namedParameters: object): object

updateRecordCount

updateRedirect

updateSaytPastPurchases

  • updateSaytPastPurchases(state: State, __namedParameters: object): object

updateSection

  • updateSection(state: State, value: any, section: string): object

updateSecuredPayload

  • updateSecuredPayload(state: any, securedPayload: SecuredPayload): any

updateSelected

  • updateSelected(state: State, selected: string): object
  • updateSelected(state: State, selected: number): object

updateSession

updateSize

  • updateSize(state: State, size: number): Page

updateSorts

updateState

  • updateState(state: State, __namedParameters: object): any

updateTemplate

updateUi

  • updateUi(state?: State, __namedParameters: object): State

Object literals

DEFAULT

DEFAULT: object

biasing

biasing: object

allIds

allIds: undefined[] = []

byId

byId: object

Type declaration

DEFAULTS

DEFAULTS: object = <any>{suggested: {products: []},}

allIds

allIds: undefined[] = []

current

current: number = 1

didYouMean

didYouMean: undefined[] = []

first

first: number = 1

from

from: number = 1

isFetchingBackward

isFetchingBackward: boolean = false

isFetchingForward

isFetchingForward: boolean = false

items

items: undefined[] = []

navigations

navigations: undefined[] = []

products

products: undefined[] = []

related

related: undefined[] = []

rewrites

rewrites: undefined[] = []

searchCharMinLimit

searchCharMinLimit: number = 1

showCategoryValuesForFirstMatch

showCategoryValuesForFirstMatch: boolean = false

sort

sort: undefined[] = []

suggestions

suggestions: undefined[] = []

template

template: any = <any>{}

byId

byId: object

__computed

__computed: object

name

name: string = DEFAULT_COLLECTION

category

category: object

values

values: undefined[] = []

sizes

sizes: object

items

items: number[] = [DEFAULT_PAGE_SIZE]

selected

selected: number = 0

DEFAULT_FETCHING

DEFAULT_FETCHING: object

autocompleteProducts

autocompleteProducts: boolean = false

autocompleteSuggestions

autocompleteSuggestions: boolean = false

details

details: boolean = false

moreProducts

moreProducts: boolean = false

moreRefinements

moreRefinements: boolean = false

search

search: boolean = false

Routes

Routes: object

DETAILS

DETAILS: string = "details"

NAVIGATION

NAVIGATION: string = "navigation"

PAST_PURCHASE

PAST_PURCHASE: string = "pastpurchase"

SEARCH

SEARCH: string = "search"

hasSelectedPastPurchaseRefinements

hasSelectedPastPurchaseRefinements: object

msg

msg: string = "no refinements to clear"

func

  • func(_: any, state: State): boolean

hasSelectedPastPurchaseRefinementsByField

hasSelectedPastPurchaseRefinementsByField: object

msg

msg: string = "no refinements to clear for field"

func

  • func(field: string, state: State): boolean

hasSelectedRefinements

hasSelectedRefinements: object

msg

msg: string = "no refinements to clear"

func

  • func(_: any, state: State): boolean

hasSelectedRefinementsByField

hasSelectedRefinementsByField: object

msg

msg: string = "no refinements to clear for field"

func

  • func(field: string, state: State): boolean

isCollectionDeselected

isCollectionDeselected: object

msg

msg: string = "collection is already selected"

func

  • func(id: string, state: State): boolean

isDifferentAutocompleteQuery

isDifferentAutocompleteQuery: object

msg

msg: string = "suggestions for query have already been requested"

func

  • func(query: string, state: State): boolean

isDifferentPageSize

isDifferentPageSize: object

msg

msg: string = "page size is already selected"

func

  • func(size: number, state: State): boolean

isDifferentPastPurchasePageSize

isDifferentPastPurchasePageSize: object

msg

msg: string = "page size is already selected"

func

  • func(size: number, state: State): boolean

isNotFetching

isNotFetching: object

msg

msg: string = "is already fetching"

func

  • func(forward: boolean, state: State): boolean

isNotFullRange

isNotFullRange: object

msg

msg: string = "range must be smaller than full range"

func

  • func(__namedParameters: object, state: State): boolean

isOnDifferentPage

isOnDifferentPage: object

msg

msg: string = "page is already selected"

func

  • func(page: number, state: State): boolean

isOnDifferentPastPurchasePage

isOnDifferentPastPurchasePage: object

msg

msg: string = "page is already selected"

func

  • func(page: number, state: State): boolean

isPastPurchaseRefinementDeselectedByIndex

isPastPurchaseRefinementDeselectedByIndex: object

msg

msg: string = "navigation does not exist or refinement is already selected"

func

  • func(__namedParameters: object, state: State): boolean

isPastPurchaseRefinementSelectedByIndex

isPastPurchaseRefinementSelectedByIndex: object

msg

msg: string = "navigation does not exist or refinement is not selected"

func

  • func(__namedParameters: object, state: State): boolean

isPastPurchasesSortDeselected

isPastPurchasesSortDeselected: object

msg

msg: string = "past purchases sort is already selected"

func

  • func(index: number, state: State): boolean

isRangeRefinement

isRangeRefinement: object

msg

msg: string = "low and high values must be numeric"

func

  • func(__namedParameters: object): boolean

isRefinementDeselectedByIndex

isRefinementDeselectedByIndex: object

msg

msg: string = "navigation does not exist or refinement is already selected"

func

  • func(__namedParameters: object, state: State): boolean

isRefinementDeselectedByValue

isRefinementDeselectedByValue: object

msg

msg: string = "refinement is already selected"

func

isRefinementSelectedByIndex

isRefinementSelectedByIndex: object

msg

msg: string = "navigation does not exist or refinement is not selected"

func

  • func(__namedParameters: object, state: State): boolean

isSortDeselected

isSortDeselected: object

msg

msg: string = "sort is already selected"

func

  • func(index: number, state: State): boolean

isString

isString: object

msg

msg: string = "must be a non-empty string"

func

  • func(value: any): boolean

isValidBias

isValidBias: object

msg

msg: string = "bias is invalid"

func

isValidClearField

isValidClearField: object

msg

msg: string = "clear must be a string or true"

func

  • func(field: string | true | false): boolean

isValidPage

isValidPage: object

msg

msg: string = "page is invalid"

func

  • func(page: number, state: State): boolean

isValidPastPurchasePage

isValidPastPurchasePage: object

msg

msg: string = "page is invalid"

func

  • func(page: number, state: State): boolean

isValidQuery

isValidQuery: object

msg

msg: string = "search term is empty"

func

  • func(query: string): boolean

isValidRange

isValidRange: object

msg

msg: string = "low value must be lower than high"

func

  • func(__namedParameters: object): boolean

isValueRefinement

isValueRefinement: object

msg

msg: string = `value ${isString.msg}`

func

  • func(__namedParameters: object): boolean

notOnFirstPage

notOnFirstPage: object

msg

msg: string = "page must not be on first page"

func

  • func(_: any, state: State): boolean

notOnFirstPastPurchasePage

notOnFirstPastPurchasePage: object

msg

msg: string = "page must not be on first page"

func

  • func(_: any, state: State): boolean

Generated using TypeDoc