Class BaseItem<T, M>Abstract

Type Parameters

Hierarchy

Constructors

  • Type Parameters

    Parameters

    • pManager: M
    • pParent: null | T
    • pChildIndex: number
    • pEaiwsItem: BasketItem

    Returns BaseItem<T, M>

Properties

asType: T
mAdditionalImageUrls: undefined | (undefined | string)[]
mCalculation: undefined | CalculationSheetInfo
mCalculationHdrVersion: number
mChildIndex: number
mChildren: T[]
mComments: undefined | null | string
mExtItemNumber: undefined | null | string
mImageUrl: undefined | null | string
mIsDisposed: boolean
mIsSelected: boolean
mItem: BasketItem
mItemNumber: undefined | string
mItemNumberArray: undefined | number[]
mItemProps: undefined | ItemProperties
mManager: M
mParent: null | T
mUserData: GroupedMap
mUserImageUrl: undefined | null | string

Accessors

  • get childIndex(): number
  • Index of this item inside the children array of its parent.

    Returns number

  • get children(): readonly T[]
  • Returns readonly T[]

  • get id(): string
  • Returns string

  • get isDisposed(): boolean
  • Returns boolean

  • get isGroup(): boolean
  • Returns boolean

  • get isOfmlArticle(): boolean
  • Returns true if this item represents an configurable OFML article.

    Returns boolean

  • get isSelected(): boolean
  • Returns boolean

  • get label(): string
  • Returns string

  • get parent(): null | T
  • Returns null | T

  • get userData(): GroupedMap
  • Can be used to store runtime user/custom data. This data is not persistent. Use BasketService.setItemAppData() for persistent data.

    Returns GroupedMap

Methods

  • Fetches the user defined additional images if necessary and adds them to the cache.

    Parameters

    • pIncludeChildren: boolean

      If true the additional images of child items will be fetched too.

    • Optional pShouldFetchCallback: ((pItem: T) => boolean)

      Can be used to ignore certain items. The callback has to return false in this case.

        • (pItem: T): boolean
        • Parameters

          • pItem: T

          Returns boolean

    Returns Promise<void>

  • Fetches the calculations if necessary and adds them to the cache.

    Parameters

    • pIncludeChildren: boolean

      If true the calculations of child items will be fetched too.

    • Optional pShouldFetchCallback: ((pItem: T) => boolean)

      Can be used to ignore certain items. The callback has to return false in this case.

        • (pItem: T): boolean
        • Parameters

          • pItem: T

          Returns boolean

    • pIgnoreHeaderCalculation: boolean = false

      If true the cached calculation will be returned even if the header calculation has changed in the meantime. Every condition which depends on a header condition may have a wrong/outdated value in this case. (default: false)

    Returns Promise<void>

  • Fetches the comments if necessary and adds them to the cache.

    Parameters

    • pIncludeChildren: boolean

      If true the comments of child items will be fetched too.

    • Optional pShouldFetchCallback: ((pItem: T) => boolean)

      Can be used to ignore certain items. The callback has to return false in this case.

        • (pItem: T): boolean
        • Parameters

          • pItem: T

          Returns boolean

    Returns Promise<void>

  • Fetches the external item numbers if necessary and adds them to the cache.

    Parameters

    • pIncludeChildren: boolean

      If true the item number of child items will be fetched too.

    • Optional pShouldFetchCallback: ((pItem: T) => boolean)

      Can be used to ignore certain items. The callback has to return false in this case.

        • (pItem: T): boolean
        • Parameters

          • pItem: T

          Returns boolean

    Returns Promise<void>

  • Fetches the item properties if necessary and adds them to the cache.

    Parameters

    • pIncludeChildren: boolean

      If true the item properties of child items will be fetched too.

    • Optional pShouldFetchCallback: ((pItem: T) => boolean)

      Can be used to ignore certain items. The callback has to return false in this case.

        • (pItem: T): boolean
        • Parameters

          • pItem: T

          Returns boolean

    Returns Promise<void>

  • Fetches the user defined images if necessary and adds them to the cache.

    Parameters

    • pIncludeChildren: boolean

      If true the user image of child items will be fetched too.

    • Optional pShouldFetchCallback: ((pItem: T) => boolean)

      Can be used to ignore certain items. The callback has to return false in this case.

        • (pItem: T): boolean
        • Parameters

          • pItem: T

          Returns boolean

    Returns Promise<void>

  • Returns Promise<void>

  • Returns the additional images for this item. Note: undefined images should be handled as missing/broken images

    Returns Promise<(undefined | string)[]>

  • Returns the additional images for this item from cache. Note: undefined images should be handled as missing/broken images

    Returns undefined | (undefined | string)[]

  • Returns the cached item calculation.

    Parameters

    • pIgnoreHeaderCalculation: boolean = false

      If true the cached calculation will be returned even if the header calculation has changed in the meantime. Every condition which depends on a header condition may have a wrong/outdated value in this case. (default: false)

    Returns undefined | CalculationSheetInfo

  • Returns undefined | null | string

  • Returns undefined | null | string

  • Returns undefined | null | string

  • Returns undefined | null | string

  • Returns the item calculation.

    Parameters

    • pIgnoreHeaderCalculation: boolean = false

      If true the cached calculation will be returned even if the header calculation has changed in the meantime. Every condition which depends on a header condition may have a wrong/outdated value in this case. (default: false)

    Returns Promise<CalculationSheetInfo>

  • Returns Promise<null | string>

  • Returns Promise<null | string>

  • Returns Promise<null | string>

  • Returns Promise<null | string>

  • Returns if this item is marked as alternative or optional for the currently active pricing procedure. Returns undefined if the state is unknown or its an unsupported item. Undefined will be also returned if the ItemProperties are not available. get or fetchItemProperties() should be called before to ensure that they are available.

    Returns undefined | ItemInactiveState

  • Returns string

  • Note: The setArticleId which is part of the ItemProperties may not be up-to-date. Use this.item.setArticleId or this.getSetArticle() instead.

    Returns Promise<ItemProperties>

  • Parameters

    • pChild: T

    Returns null | T

  • Returns null | T

  • Parameters

    • pChild: T

    Returns null | T

  • Returns Promise<null | string>

  • Returns void

  • Returns null | T

  • Parameters

    • pTriggerUpdateEvent: boolean

    Returns void

  • Returns void

  • Parameters

    • pIgnoreHeaderCalculation: boolean

    Returns boolean

  • Parameters

    • pParent: T
    • pDirectOnly: boolean

    Returns boolean

  • Returns true if this item is excluded from the calculations for the currently active pricing procedure (e.g. its an alternative or optional item). Returns undefined if the state is unknown or its an unsupported item. Undefined will be also returned if the ItemProperties are not available. get or fetchItemProperties() should be called before to ensure that they are available.

    Returns undefined | boolean

  • Parameters

    • pFlags: number

    Returns Promise<void>

  • Returns void

  • Parameters

    • pProps: ItemProperties
    • pUpdateItem: boolean
    • pUpdateCalculation: boolean
    • pAdditionalUpdateFlags: number = 0

    Returns Promise<void>

  • Parameters

    • pFlags: number

    Returns Promise<void>

Generated using TypeDoc