Changes and additions to Submodules
OrderJourney Module State Submodule
stepActiveOrderErrors
state variable to OrderJourney module's state submodule which is explained in Validation Improvements of Version 1.5
Campaign Module Service Submodule
getEmploymentTypes
function to Campaign module's service which is explained in i18n Improvements of Version 1.5
Language Module Utilities Submodule
Language module has had utilities submodule added which contains the following:
localeKeys
which is explained in i18n Improvements of Version 1.5localesSupportedByBackend
which is explained in i18n Improvements of Version 1.5
Basket Module Utilities Submodule
These functions in Basket module's Utilities submodule have had their return type changed and may be breaking
getBasketProductTimeToSetup
returnsProductDuration
instead ofstring
which had hardcoded strings that could not be translatedgetBasketProductTimeToProcess
returnsProductDuration
instead ofstring
which had hardcoded strings that could not be translatedgetBasketProductDuration
returnsProductDuration
instead ofstring
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)
})