Skip to main content

Changes and additions to Submodules

OrderJourney Module State Submodule

Campaign Module Service Submodule

Language Module Utilities Submodule

Language module has had utilities submodule added which contains the following:

Basket Module Utilities Submodule

These functions in Basket module's Utilities submodule have had their return type changed and may be breaking

  • getBasketProductTimeToSetup returns ProductDuration instead of string which had hardcoded strings that could not be translated
  • getBasketProductTimeToProcess returns ProductDuration instead of string which had hardcoded strings that could not be translated
  • getBasketProductDuration returns ProductDuration instead of string which had hardcoded strings that could not be translated

ProductDuration type can be found in the playground

Employment Types array is now locale based

This change may be breaking because now window.hapi.campaign.state.employmentTypes.value will return an empty array as it does first run window.hapi.campaign.service.getEmploymentTypes.run() which sets the employmentTypes variable in Campaign module's state submodule.


If you have code that works on mount of HAPI Elements, we suggest that you switch the code to be like below:

window.hapi.campaign.service.getEmploymentTypes.onSuccess((employmentTypes) => {
console.log('[HAPI Elements] employmentTypes', employmentTypes)
})