GitHub

DaffCompositeProductEntitiesMemoizedSelectors

import { DaffCompositeProductEntitiesMemoizedSelectors } from '@daffodil/product-composite/state'

An interface for selectors related to the composite product applied options.

interface DaffCompositeProductEntitiesMemoizedSelectors<T extends DaffProduct = DaffProduct> {
  selectCompositeProductAppliedOptionsEntitiesState: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>, DefaultProjectorFn<...>>
  selectCompositeProductIds: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, string[] | number[], DefaultProjectorFn<string[] | number[]>>
  selectCompositeProductAppliedOptionsEntities: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, Dictionary<DaffCompositeProductEntity>, DefaultProjectorFn<Dictionary<...>>>
  selectCompositeProductTotal: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, number, DefaultProjectorFn<number>>
  selectCompositeProductAppliedOptions: (id: T["id"]) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, Dictionary<DaffCompositeProductItemOption>, DefaultProjectorFn<...>>
  selectIsCompositeProductItemRequired: (id: T["id"], item_id: string) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, boolean, DefaultProjectorFn<boolean>>
}

Properties

selectCompositeProductAppliedOptionsEntitiesState
MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>, DefaultProjectorFn<...>>

The ngrx entities state for composite product applied options.

selectCompositeProductIds
MemoizedSelector<DaffCompositeProductStateRootSlice<T>, string[] | number[], DefaultProjectorFn<string[] | number[]>>

A selector for all composite product ids in state.

selectCompositeProductAppliedOptionsEntities
MemoizedSelector<DaffCompositeProductStateRootSlice<T>, Dictionary<DaffCompositeProductEntity>, DefaultProjectorFn<Dictionary<...>>>

The ngrx entities for the composite product appllied options.

selectCompositeProductTotal
MemoizedSelector<DaffCompositeProductStateRootSlice<T>, number, DefaultProjectorFn<number>>

The total number of composite products in state.

selectCompositeProductAppliedOptions
(id: T["id"]) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, Dictionary<DaffCompositeProductItemOption>, DefaultProjectorFn<...>>

Selects the applied options for a composite product.

selectIsCompositeProductItemRequired
(id: T["id"], item_id: string) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, boolean, DefaultProjectorFn<boolean>>

Selects whether the particular item of a composite product is required in order for the product to be valid, i.e. addable to the cart.