GitHub

DaffCompositeProductEntitiesMemoizedSelectors

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

import { DaffCompositeProductEntitiesMemoizedSelectors } from '@daffodil/product-composite/state'
interface DaffCompositeProductEntitiesMemoizedSelectors<T extends DaffProduct = DaffProduct> {
  selectCompositeProductAppliedOptionsEntitiesState: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>>
  selectCompositeProductIds: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>['ids']>
  selectCompositeProductAppliedOptionsEntities: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>['entities']>
  selectCompositeProductTotal: MemoizedSelector<DaffCompositeProductStateRootSlice<T>, number>
  selectCompositeProductAppliedOptions: (id: T['id']) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, Dictionary<DaffCompositeProductItemOption>>
  selectIsCompositeProductItemRequired: (id: T['id'], item_id: DaffCompositeProductItem['id']) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, boolean>
}

Properties

Name Type Description
selectCompositeProductAppliedOptionsEntitiesState MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>>

The ngrx entities state for composite product applied options.

selectCompositeProductIds MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>['ids']>

A selector for all composite product ids in state.

selectCompositeProductAppliedOptionsEntities MemoizedSelector<DaffCompositeProductStateRootSlice<T>, EntityState<DaffCompositeProductEntity>['entities']>

The ngrx entities for the composite product appllied options.

selectCompositeProductTotal MemoizedSelector<DaffCompositeProductStateRootSlice<T>, number>

The total number of composite products in state.

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

Selects the applied options for a composite product.

selectIsCompositeProductItemRequired (id: T['id'], item_id: DaffCompositeProductItem['id']) => MemoizedSelector<DaffCompositeProductStateRootSlice<T>, 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.