Technical Changes in Spartacus 3.0
Breaking Changes
Translations (i18n) changed
- fixed the typo in the key
user.register.managementInMyAccount
(previously …managmentInMyAccount
) - key
checkout.checkoutReview.editShippingMethod
has been removed - key
checkout.checkoutReview.editPaymentMethod
has been removed
Default Router options changed
The Angular router can be initialized with so-called ExtraOptions
in the forRoot
method fo the RouterModule
. See https://angular.io/api/router/ExtraOptions for more information on those options.
The default ExtraOptions
have changed with 3.0. Before 3.0, Spartacus set the anchorScrolling
and scrollPositionRestoration
options. In Spartacus 3.0, the scrollPositionRestoration
has dropped, and the relativeLinkResolution
and initialNavigation
has been added. See the below table for the actual values and reasoning
Option | < 3.0 | > 3.0 |
---|---|---|
anchorScrolling |
'enabled' |
'enabled' |
scrollPositionRestoration |
'enabled' |
(removed) |
relativeLinkResolution |
n/a | 'corrected' |
initialNavigation |
n/a | 'enabled' |
The enabled scrollPositionRestoration
was causing a bad experience in most cases, as it would scroll the page to the top on each route change. This is unexpected in a single page experience.
The corrected relativeLinkResolution
is used to opt-in to a fix that has been added in angular. This will become default from angular 11 onwards.
The enabled initialNavigation
provides better experience with server side rendering, starting initial navigation before the root component is created and blocking bootstrap until the initial navigation is complete. More details available in Angular documentation.
The RouterModule.forRoot()
method can actually only be called once in an angular application. This makes the default options rather opinionated, which is why the default configurations are carefully selected in Spartacus. The options that have been added/removed can be provided in your custom application with the Angular ROUTER_CONFIGURATION
injection token. For example:
providers: [
{
provide: ROUTER_CONFIGURATION,
useValue: {
scrollPositionRestoration: 'enabled',
},
},
];
There’s no automation (schematics) planned for this change.
Page Layout
With version 2.1 we’ve started to add the page layout based style class to the root element of the application (cx-storefront
). This is done in addition to the style class added by the PageLayoutComponent
. The style class on the PageLayoutComponent
was considered to be too limited, as it would not affect selectors outside the page template component.
The implementation of the page layout based style class has moved from the PageLayoutComponent
to the PageTemplateDirective
. This results in a cleaner PageLayoutComponent
with a constructor that no longer requires the lower level renderer2
service and ElementRef
. The constructor reduces to the following signature:
constructor(protected pageLayoutService: PageLayoutService) {}
We’ve also made the PageLayoutService
a protected argument, so that it is extensible.
There’s no automation (schematics) planned to migrate constructors automatically.
Static CMS structure config changes
-
default-header-config
anddefault-cms-content-config
have been removed. UsedefaultCmsContentProviders
instead to create CMS content.
Occ prefix
Default value for backend.occ.prefix
configuration option was changed from /rest/v2/
to /occ/v2/
.
Storefront config
- New config
SeoConfig
is imported.
ContentPageMetaResolver
ContentPageMetaResolver
has a new required constructor dependency RoutingPageMetaResolver
.
LoginFormComponent
It’s no longer the responsibility of the LoginFormComponent
to redirect to the anticipated page (it no longer calls the method AuthRedirectService.redirect
).
Now the redirecting logic is placed inside the core AuthService
to support more OAuth flows.
LoginFormComponent
no longer has properties loginAsGuest
, sub
and the method ngOnDestroy
.
HttpClientModule is not imported in feature libraries
In most cases HttpClientModule should only be imported in the root app module, as importing it in lazy-loaded modules can
cause unexpected side effects regarding the visibility of HTTP_INTERCEPTORS, etc. To fix this, we removed all HttpClientModule imports from all our
feature libraries and moved them to recipes.
There’s no automation (schematics) planned for this change.
SSR Engine Optimizations
NgExpressEngineDecorator
now adds SSR Optimization logic on top of the universal engine by default.
NgExpressEngineDecorator
was moved from @spartacus/core
to @spartacus/setup/ssr
. Also NgExpressEngineDecorator.get()
method now accepts an additional second parameter to fine-tune SSR optimizations. Passing null
there will turn off optimizations by removing optimization layer completely (bring back default 2.x behavior).
Store finder functionality has been moved to a new library
Store finder logic from @spartacus/core
and store finder components from @spartacus/storefront
were moved to respective entrypoints in @spartacus/misc/storefinder
.
Store finder translations (storeFinderTranslations
) and translation chunks (storeFinderTranslationChunksConfig
) were moved to @spartacus/misc/storefinder/assets
.
Store finder functionality is now also lazy-loadable out of the box.
StockNotificationComponent
StockNotificationComponent
has a new required dependency UserIdService
, but no more depends on AuthService
.
CmsComponentsService
Method CmsComponentsService.getChildRoutes
changed return type from Route[]
to CmsComponentChildRoutesConfig
Config cmsComponents
The property childRoutes
of config cmsComponents
changed type from Route[]
to Route[] | CmsComponentChildRoutesConfig
.
PageMetaService lazy-loading related changes
- Protected method
PageMetaService.getMetaResolver
changed its return type fromPageMateResolver
toObservable<PageMetaResolver>
so it can take into account page meta resolvers from lazy loaded features. - PageMetaService’s constructor is now using
UnifiedInjector
instead of injectingPageMetaResolver
token directly.
ConverterService lazy-loading related changes
- ConverterService constructor is now using
UnifiedInjector
instead of standardInjector
Payload for constructor of PlaceOrder class from Checkout actions requires an additional property
- Checkout.action constructor payload now needs a
termsChecked
additional property
PlaceOrderComponent
-
placeOrderSubscription
property was removed - no replacement - The component has new required constructor dependencies:
CheckoutReplenishmentFormService
,LaunchDialogService
andViewContainerRef
.
Property renamed in SearchConfig
interface
Old Name | New Name |
---|---|
sortCode |
sort |
Changes in CheckoutStepsState
interface
- New property: currently required
poNumber: { po: string; costCenter: string; };
- Change type: property
orderDetails
type has been changed fromOrder
toOrder | ReplenishmentOrder
Changes in CheckoutState
interface
- New property: currently required
paymentTypes: PaymentTypesState;
- New property: currently required
orderType: OrderTypesState;
OutletRefDirective unregisters template on destroy
The directive’s template in unregistered from outlet on directive destroy.
Before v3.0, when an instance of OutletRefDirective
was destroyed (removed from DOM), its template remained registered for the Outlet, which could cause the same template being rendered multiple times in case of re-creation of the same [cxOutletRef]
later on. Now it’s fixed.
CartItemComponent lost members
CartItemComponent
lost members:
-
@Output()
view
- instead use[cxModal]
directive to close modal on link click -
viewItem()
- instead use[cxModal]
directive to close modal on link click
CartItemListComponent
There can be more than one cart entry with the same product code. So now they are referenced by the property entryNumber
instead of the product code in CartItemListComponent
.
AddToCartComponent
AddToCartComponent
lost members:
-
increment
- use newnumberOfEntriesBeforeAdd
instead -
cartEntry$
- useactiveCartService.getLastEntry(productCode)
instead
Auth module refactor
-
@spartacus/core
have new dependency onangular-oauth2-oidc
library. It’s used to handle OAuth login/logout flows in spartacus.
Store
-
AuthSelectors
were removed. Selectors related to client token were moved underClientAuthSelectors
. User token is no longer stored in ngrx store. To get the token useAuthStorageService.getToken
method. -
StateWithAuth
was removed. State related to client token was moved toStateWithClientAuth
. Data related to user token are stored inAuthStorageService
andUserIdService
. -
AuthState
was removed. State related to client token was moved toClientAuthState
. Data related to user token are stored inAuthStorageService
andUserIdService
. -
UserTokenState
was removed. Data related to user token are no longer stored in ngrx store. User token is stored inAuthStorageService
and user id is stored inUserIdService
. -
AUTH_FEATURE
was removed. Client token state is under the key fromCLIENT_AUTH_FEATURE
variable. -
CLIENT_TOKEN_DATA
variable value changed to[Client auth] Client Token Data
. Previously it was[Auth] Client Token Data
. -
AuthActions
now only containsLogin
andLogout
action class andLOGIN
,LOGOUT
variables with action type. Actions related to client token (LoadClientToken...
) are now available underClientAuthActions
export. ConstantLOGOUT_CUSTOMER_SUPPORT_AGENT
is available inAsmActions
export. Actions related to user token were removed (LOAD_USER_TOKEN
,LOAD_USER_TOKEN_FAIL
,LOAD_USER_TOKEN_SUCCESS
,REFRESH_USER_TOKEN
,REFRESH_USER_TOKEN_FAIL
,REFRESH_USER_TOKEN_SUCCESS
,REVOKE_USER_TOKEN
,REVOKE_USER_TOKEN_FAIL
,REVOKE_USER_TOKEN_SUCCESS
,LoadUserToken
,LoadUserTokenFail
,LoadUserTokenSuccess
,RefreshUserToken
,RefreshUserTokenSuccess
,RefreshUserTokenFail
,RevokeUserToken
,RevokeUserTokenSuccess
andRevokeUserTokenFail
). Instead initialize user token load, refresh or revoke with methods exposed inAuthService
andOAuthLibWrapperService
.
Models
-
UserToken
interface was replaced withAuthToken
interface. New interface contains different properties than the previous to match requirements ofangular-oauth2-oidc
library. -
AuthenticationToken
interface was removed. UseAuthToken
orClientToken
directly. -
Occ.UserGroupList
interface was removed. -
Occ.UserSignUp
interface was removed.
Guards
-
NotAuthGuard
now returnsObservable<UrlTree>
for homepage for logged in users instead of invoking redirect. Constructor also changed for this guard.RoutingService
is no longer needed, butSemanticPathService
andRouter
is now required. -
AuthGuard
now returnsObservable<UrlTree>
for login page for anonymous users instead of invoking redirect. Constructor also changed for this guard.RoutingService
is no longer needed, butSemanticPathService
is now required.
Services
-
AuthRedirectService
now requiresAuthRedirectStorageService
. Make sure to provide it. It is an replacement for private variableredirectUrl
. -
AuthService
now requiresUserIdService
,OAuthLibWrapperService
,AuthStorageService
,AuthRedirectService
andRoutingService
. -
AuthService.authorize
was renamed tologinWithCredentials
. It returns Promise that resolves after login procedure completes. Instead of dispatching action the method now invokes login method from the OAuth library and sets correct userId, dispatchesLogin
action and redirects to previously visited page. -
AuthService.getOccUserId
was removed fromAuthService
. UseUserIdService.getUserId
method instead. It is the direct replacement. -
AuthService.invokeWithUserId
was moved toUserIdService
. It is available under the same name. -
AuthService.getUserToken
was removed. To check if user is logged in useisUserLoggedIn
and to get user id useUserIdService.getUserId
. If you need access to tokens then useAuthStorageService.getToken
. -
AuthService.refreshUserToken
was moved and renamed toOAuthLibWrapperService.refreshToken
. The behavior changed as well. It not only dispatches action, but performs complete refresh token procedure from OAuth library. -
AuthService.authorizeWithToken
was removed. Instead you can create object of the shapeAuthToken
and pass toAuthStorageService.setToken
. -
AuthService.logout
method changed behavior to redirect tologout
page. Then the methodAuthService.coreLogout
will be dispatched and perform operations previously done bylogout
method (Logout action dispatch, clearing local state, revoking tokens). -
AuthService.getClientToken
,AuthService.refreshClientToken
andAuthService.isClientTokenLoaded
were moved toClientTokenService
.
Config
-
AuthConfig
no longer extendsOccConfig
. -
login
andrevoke
endpoints were removed fromOccConfig
.login
endpoint is now available undertokenEndpoint
property inAuthConfig
.revoke
endpoint is available underrevokeEndpoint
property inAuthConfig
. -
storageSync
configuration forauth
branch in ngrx store was removed. State of token, userId is now synchronized withAuthStatePersistenceService
. Override this service if you want to sync more properties to localStorage (eg.refresh_token
). -
storageSync
configuration foranonymous-consents
branch in ngrx store was removed. State is now synchronized withAnonymousConsentsStatePersistenceService
. Override this service if you want to sync more/less properties to localStorage.
KymaModule
KymaModule
were removed with all it’s code. We expose the same functionality through configuration of auth.
To fetch OpenId token along with access token in Resource Owner Password Flow you have to use following configuration.
authentication: {
client_id: 'client4kyma',
client_secret: 'secret',
OAuthLibConfig: {
responseType: 'id_token',
scope: 'openid',
customTokenParameters: ['token_type', 'id_token'],
}
}
Then you can access OpenId token with OAuthLibWrapperService.getIdToken
method. For more options related to OpenId token look into angular-oauth2-oidc
library documentation.
ASM module refactor
-
getCustomerSupportAgentTokenState
,getCustomerSupportAgentToken
andgetCustomerSupportAgentTokenLoading
were removed fromAsmSelectors
. To get token useAuthStorageService.getToken
andAsmAuthStorageService.getTokenTarget
to check if it belongs to CS agent. - Effects in
AsmModule
now instead ofmakeErrorSerializable
usenormalizeHttpError
for error transformation. -
storageSync
configuration forasm
branch in ngrx store was removed. State of ASM UI, tokens is now synchronized withAsmStatePersistenceService
. -
CSAGENT_TOKEN_DATA
variable was removed. -
AsmState.csagentToken
was removed. Token is now stored inAuthStorageService
. CheckAsmAuthStorageService.getTokenTarget
to validate if the token belongs to the CS agent. -
AsmActions
no longer contains actions related to customer agent token (LoadCustomerSupportAgentToken
,LoadCustomerSupportAgentTokenFail
,LoadCustomerSupportAgentTokenSuccess
). Instead interact directly withCsAgentAuthService
. -
CustomerSupportAgentTokenInterceptor
interceptor was removed. Token and error handling for CS agent requests are now handled byAuthInterceptor
andAsmAuthHttpHeaderService
.
AsmAuthService
Service was renamed to CsAgentAuthService
. AsmAuthService
is now responsible for making AuthService
aware of ASM and adjusts it for CS agent support.
-
AsmAuthService.authorizeCustomerSupportAgent
was moved toCsAgentAuthService
. It now performs full login flow for CS agent and resolves when it completes. -
AsmAuthService.startCustomerEmulationSession
was moved toCsAgentAuthService
. Behavior haven’t changed. -
AsmAuthService.isCustomerEmulationToken
was removed. To check token useAuthStorageService.getToken
and to check if it belongs to CS agent useAsmAuthStorageService.getTokenTarget
. -
AsmAuthService.getCustomerSupportAgentToken
was removed. To check token useAuthStorageService.getToken
and to check if it belongs to CS agent useAsmAuthStorageService.getTokenTarget
. -
AsmAuthService.getCustomerSupportAgentTokenLoading
was moved toCsAgentAuthService
. Warning! It is not implemented there yet. -
AsmAuthService.logoutCustomerSupportAgent
was moved toCsAgentAuthService
. It performs logout procedure for CS agent and resolves when it completes.
CDC library
-
CdcUserTokenEffects
now usesnormalizeHttpError
for error serialization. -
CdcUserTokenEffects.loadCdcUserToken$
effect now callsCdcAuthService.loginWithToken
instead of dispatchingAuthActions.LoadUserTokenSuccess
action. -
CdcAuthService
no longer extendsAuthService
. -
CdcAuthService
have new required dependencies.AuthStorageService
,UserIdService
,GlobalMessageService
andAuthRedirectService
needs to provided. -
CdcAuthService.authorizeWithCustomCdcFlow
method was renamed tologinWithCustomCdcFlow
. -
CdcAuthService.logout
method was removed. Now CDC hooks into logout process, by providingCdcLogoutGuard
asLogoutGuard
. -
CdcJsService
now requiresAuthService
asCdcAuthService
no longer extends it.AuthService
should be passed afterCdcAuthService
.CdcAuthService
is available in service undercdcAuth
andAuthService
is available underauth
property. AdditionallyGlobalMessageService
andAuthRedirectService
are not longer required. We don’t provide automatic migration for that constructor change!
OrderDetailHeadlineComponent
Order detail headline component has been removed.
OrderDetailShippingComponent
The following functions have been removed from the component:
- getAddressCardContent()
- getBillingAddressCardContent()
- getPaymentCardContent()
- getShippingMethodCardContent()
OrderConfirmationOverviewComponent
The following functions have been removed from the component:
-
getAddressCardContent()
-
getDeliveryModeCardContent()
-
getPaymentInfoCardContent()
-
getBillingAddressCardContent()
-
order$
now has a return type ofObservable<any>
instead ofObservable<Order>
The type of BaseSiteService is changed
Before it was:
BaseSiteService implements SiteContext<string>
Now it is:
BaseSiteService implements SiteContext<BaseSite>
The return type of the function getAll()
is changed from:
getAll(): Observable<string[]>
to:
getAll(): Observable<BaseSite[]>
The return type of the function setActive(baseSite: string)
is changed from:
setActive(baseSite: string): Subscription
to:
setActive(baseSite: string): void
ConfigInitializerService’s constructor has an additional parameter added
Before it was:
constructor(
@Inject(Config) protected config: any,
@Optional()
@Inject(CONFIG_INITIALIZER_FORROOT_GUARD)
protected initializerGuard
) {}
Now it is:
constructor(
@Inject(Config) protected config: any,
@Optional()
@Inject(CONFIG_INITIALIZER_FORROOT_GUARD)
protected initializerGuard,
@Inject(RootConfig) protected rootConfig: any
CmsComponentsService constructor has an additional parameter added
Before it was:
constructor(
protected config: CmsConfig,
@Inject(PLATFORM_ID) protected platformId: Object
) {}
Now it is:
constructor(
protected config: CmsConfig,
@Inject(PLATFORM_ID) protected platformId: Object,
protected featureModules?: FeatureModulesService
) {}
configurationFactory was removed
Configuration merging logic now uses separate tokens for default configuration and user configuration.
CheckoutProgressMobileBottomComponent
-
routerState$
property has been removed. This logic is now handled bycheckoutStepService
. -
activeStepUrl
property has been removed. This logic is now handled bycheckoutStepService
. -
steps
property has been removed - usesteps$
instead.
CheckoutProgressMobileTopComponent
-
routerState$
property has been removed. This logic is now handled bycheckoutStepService
. -
activeStepUrl
property has been removed. This logic is now handled bycheckoutStepService
. -
steps
property has been removed - usesteps$
instead.
CheckoutProgressComponent
-
routerState$
property has been removed. This logic is now handled bycheckoutStepService
. -
activeStepUrl
property has been removed. This logic is now handled bycheckoutStepService
. -
steps
property has been removed - usesteps$
instead.
DeliveryModeComponent
-
checkoutStepUrlNext
property has been removed. This logic is now handled bycheckoutStepService
. -
checkoutStepUrlPrevious
property has been removed. This logic is now handled bycheckoutStepService
.
OrderDetailShippingComponent
-
getPaymentCardContent
was removed, please check theOrderOverviewComponent
instead. -
getShippingMethodCardContent
was removed, please check theOrderOverviewComponent
instead. -
getAddressCardContent
was removed, please check theOrderOverviewComponent
instead. -
getBillingAddressCardContent
was removed, please check theOrderOverviewComponent
instead.
PaymentMethodComponent
-
checkoutStepUrlNext
property has been removed. This logic is now handled bycheckoutStepService
. -
checkoutStepUrlPrevious
property has been removed. This logic is now handled bycheckoutStepService
. -
goNext
method has been renamed tonext
. -
goPrevious
method has been renamed toback
.
ShippingAddressComponent
-
existingAddresses$
property has been removed. -
newAddressFormManuallyOpened
property has been renamed toaddressFormOpened
. -
goNext
method has been renamed tonext
. -
goPrevious
method has been renamed toback
.
CheckoutAuthGuard
-
canActivate
method now returns typeObservable<boolean | UrlTree
.
CheckoutConfigService
-
steps
property has been removed - usecheckoutStepService
instead. -
checkoutStepService
method has been removed - usecheckoutStepRoute
method incheckoutStepService
instead. -
getFirstCheckoutStepRoute
method has been removed - usegetFirstCheckoutStepRoute
method incheckoutStepService
instead. -
getFirstCheckoutStepRoute
method has been removed - usegetFirstCheckoutStepRoute
method incheckoutStepService
instead. -
getNextCheckoutStepUrl
method has been removed - usegetNextCheckoutStepUrl
method incheckoutStepService
instead. -
getPreviousCheckoutStepUrl
method has been removed - usegetPreviousCheckoutStepUrl
method incheckoutStepService
instead. -
getCurrentStepIndex
method has been removed - usegetCurrentStepIndex
method incheckoutStepService
instead. -
CheckoutConfigService
no longer usesRoutingConfigService
.
Method placeOrder in CheckoutAdapter, OccCheckoutAdapter and CheckoutConnector
The method placeOrder
of CheckoutAdapter
, OccCheckoutAdapter
and CheckoutConnector
now has 3rd, a new required argument termsChecked: boolean
.
BreakpointService
- Public getter method
window()
was removed. Instead directly reference thewindowRef
. - Protected method
getClosest
was removed. Instead use the methodgetBreakpoint
. - Property
_breakpoints
has been removed. - Public getter
breakpoint$
was removed. Instead use the propertybreakpoint$
. -
BreakpointService
has new requiredplatform
dependency.
ProtectedRoutesGuard
The return type of the method ProtectedRoutesGuard.canActivate
changed from Observable<boolean>
to Observable<boolean | UrlTree>
ItemCounterComponent
- The component now implements
OnInit
andOnDestroy
.
ViewComponent
- Protected getter method
splitViewCount
was removed.
UpdateEmailComponent
- Method
onSuccess
changed its return type fromvoid
toPromise<void>
in order to wait for the logout to complete before updating the email.
StorefrontComponent
-
collapseMenuIfClickOutside
method param type changed fromMouseEvent
toany
. Behaviour has also been modified to only trigger when header element is passed to the function.
StarRatingComponent
- The component uses
HostBinding
to bind to css custom properties (available since angular 9), which is why we no longer need theElementRef
andRenderer2
in the constructor. There’s a automated constructor migration added for the 3.0 release. - ngOnInit is no longer used
- the
setRate
no longer requires a 2nd argument (force
) - the
setRateOnEvent()
method is replaced by reusing thesetRate()
(this is also fixing a bug), we bindkeydown.space
now directly form the view. The more generickeydown
output binding is removed.
CartNotEmptyGuard
- Method
canActivate
changed its return type fromObservable<boolean>
toObservable<boolean | UrlTree>
to support OAuth flows. - new required constructor dependency
SemanticPathService
. - new required constructor dependency
Router
. - no longer uses
RoutingService
. This service usage was replaced with the corresponding methods fromRouter
andSemanticPathService
.
NotCheckoutAuthGuard
- Method
canActivate
changed its return type fromObservable<boolean>
toObservable<boolean | UrlTree>
to support OAuth flows.
ProductVariantGuard
- Method
canActivate
now requires a parameter of typeActivatedRouteSnapshot
.
LogoutGuard
- Method
canActivate
changed its return type fromObservable<boolean>
toObservable<boolean | UrlTree>
to support OAuth flows. - Method
logout
return type has been changed fromvoid
toPromise<any>
to support OAuth flows. - Method
redirect
was removed. UsegetRedirectUrl
instead.
CurrentProductService
-
getProduct
method will now only emit distinct product.
MultiCartStatePersistenceService
-
sync
method has been renamed toinitSync
.
ProductReferenceService
-
get
method has been removed. UsegetProductReferences
andloadProductReferences
methods instead.
LanguageService
- Method
setActive
changed its return type fromSubscription
tovoid
.
CurrencyService
- Method
setActive
changed its return type fromSubscription
tovoid
.
OccCmsComponentAdapter
The OCC CMS component API in SAP Commerce Cloud before version 1905 was using a POST method. This has changed in 1905 (using GET going forward). Spartacus has supported both version from version 1.0 by using a legacy
flag to distinguish this backend API behavior. With release 3.0 we maintain the support for the pre 1905 CMS component API, but the implementation has moved to a separate adapter (LegacyOccCmsComponentAdapter
). With that change, we’re also dropping the legacy
flag in the OCC configuration.
UserState
The interface for the ngrx state UserState
now has new required properties: replenishmentOrders
, replenishmentOrder
and costCenters
.
CloseAccountModalComponent
The property userToken$
of CloseAccountModalComponent
has been replaced with isLoggedIn$
of type Observable<boolean>
.
BaseSiteState
The interface BaseSiteState
has now a new required property entities: BaseSiteEntities
.
UserService
- Method
loadOrderList
ofUserService
also loads replenishment orders when the url contains a replenishment code.
UserOrderService
- Method
getTitles
ofUserOrderService
will load titles when it is empty.
Checkout selectors
- Selector
getCheckoutOrderDetails
changed its MemoizedSelector return types. Instead ofOrder
now we get unionOrder | ReplenishmentOrder
.
ProductListComponentService
- Property
sub
was removed fromProductListComponentService
. It is no longer used. - Method
setQuery
was removed fromProductListComponentService
. It is no longer used. - Method
viewPage
was removed fromProductListComponentService
. It is no longer used.
ProductCarouselService
The following functions have been removed from the component:
- getProductReferences()
CheckoutService
- Method
placeOrder
ofCheckoutService
now requirestermsChecked
parameter. - Method
getOrderDetails
changed its return type fromObservable<Order>
toObservable<Order | ReplenishmentOrder>
.
AnonymousConsentTemplatesAdapter
- Method
loadAnonymousConsents
ofAnonymousConsentTemplatesAdapter
is no longer optional.
AnonymousConsentTemplatesConnector
- Method
loadAnonymousConsents
ofAnonymousConsentTemplatesConnector
changed the return type fromObservable<AnonymousConsent[] | null>
toObservable<AnonymousConsent[]>
,
SplitViewComponent
- The property
subscription
ofSplitViewComponent
is no longer protected. It’s private now.
Automated Migrations for Version 3
-
CheckoutProgressMobileBottomComponent
no longer usesCheckoutConfig
,RoutingService
andRoutingConfigService
. These services usage was replaced with the corresponding methods fromCheckoutStepService
. This service needs to be provided toCheckoutProgressMobileBottomComponent
. -
CheckoutAuthGuard
no longer usesRoutingService
. This service usage was replaced with the corresponding methods fromRouter
andSemanticPathService
. Additional servicesUserService
andGlobalMessageService
also need to be provided toCheckoutAuthGuard
. -
CheckoutProgressMobileTopComponent
no longer usesCheckoutConfig
,RoutingService
andRoutingConfigService
. These services usage was replaced with the corresponding methods fromCheckoutStepService
. This service needs to be provided toCheckoutProgressMobileTopComponent
. -
CheckoutProgressComponent
no longer usesCheckoutConfig
,RoutingService
andRoutingConfigService
. These services usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toCheckoutProgressComponent
. -
DeliveryModeSetGuard
no longer usesCheckoutConfigService
. This service usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toDeliveryModeSetGuard
. -
DeliveryModeComponent
no longer usesRoutingService
. This service usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toDeliveryModeComponent
. -
LoginFormComponent
no longer usesActivatedRoute
,CheckoutConfigService
andAuthRedirectService
. The logic using these services was moved to a different component. -
OrderDetailShippingComponent
no longer usesTranslationService
. The logic using these services was moved toOrderDetailShippingComponent
. -
PaymentDetailsSetGuard
no longer usesCheckoutConfigService
. This service usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toPaymentDetailsSetGuard
. -
PaymentMethodComponent
no longer usesCheckoutConfigService
andRoutingService
. These services usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toPaymentMethodComponent
. -
ReviewSubmitComponent
no longer usesCheckoutConfigService
. This service usage was replaced with the corresponding methods formCheckoutStepService
. In addition,PaymentTypeService
,CheckoutCostCenterService
andUserCostCenterService
need to be provided toReviewSubmitComponent
. -
ShippingAddressSetGuard
no longer usesCheckoutConfigService
. This service usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toShippingAddressSetGuard
. -
ShippingAddressComponent
no longer usesCheckoutConfigService
andRoutingService
. These services usage was replaced with the corresponding methods formCheckoutStepService
. This service needs to be provided toShippingAddressComponent
. -
MultiCartService
now requires the additional providerUserIdService
. -
PageSlotComponent
no longer usesCmsComponentsService
. This service usage was replaces with thePageSlotService
. -
ForbiddenHandler
now usesGlobalMessageService
,AuthService
,OccEndpointsService
. -
CheckoutPaymentService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
CheckoutService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
CustomerCouponService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
OrderReturnRequestService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
UserAddressService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
UserConsentService
now also requiresUserIdService
. -
UserInterestsService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
UserNotificationPreferenceService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
UserOrderService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. Now also requiresRoutingService
. -
UserPaymentService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
UserService
no longer usesAuthService
. This service usage was replaced with the corresponding methods fromUserIdService
. -
ActiveCartService
no longer usesAuthService
. This service usage was replaces with theUserIdService
. -
CartVoucherService
no longer usesAuthService
. This service usage was replaces with theUserIdService
. -
SelectiveCartService
no longer usesAuthService
. This service usage was replaces with theUserIdService
. -
WishListService
no longer usesAuthService
. This service usage was replaces with theUserIdService
. -
CheckoutDeliveryService
no longer usesAuthService
. This service usage was replaces with theUserIdService
. -
UnauthorizedErrorHandler
has been removed. -
StarRatingComponent
no longer usesElementRef
andRenderer2
. -
ProductCarouselService
no longer usesProductReferenceService
. -
NotCheckoutAuthGuard
no longer usesRoutingService
. This service usage was replaced with the corresponding methods fromSemanticPathService
andRouter
. -
StoreFinderSearchConfig
has been removed.SearchConfig
should be used instead. -
ForgotPasswordComponent
now also requiresAuthConfigService
. -
OrderHistoryComponent
now also requiresUserReplenishmentOrderService
. -
OrderReturnGuard
no longer usesRoutingService
. This service usage was replaced with the corresponding methods fromRouter
andSemanticPathService
. -
OrderCancellationGuard
no longer usesRoutingService
. This service usage was replaced with the corresponding methods fromRouter
andSemanticPathService
. -
OutletRefDirective
no longer usesFeatureConfigService
. -
OutletService
no longer usesFeatureConfigService
. -
RoutingService
now also requiresRoutingParamsService
. -
TOKEN_REVOCATION_HEADER
has been removed. -
JsonLdScriptFactory
now also requiresSeoConfig
. -
LogoutGuard
no longer usesRoutingService
. This service usage was replaced with the corresponding methods fromRouter
. -
ProductVariantGuard
no longer usesRoutingService
. This service usage was replaced with the corresponding methods fromRouter
andSemanticPathService
. -
FeatureModulesService
no longer hasgetInjectors
method. -
CmsComponentsService
no longer hasgetInjectors
method. -
ViewComponent
now also requiresChangeDetectorRef
. -
SplitViewDeactivateGuard
has been removed. -
FeatureModulesService
no longer usesCompiler
. Newly added methodgetModule
does not need it anymore. -
FeatureModulesService
no longer usesInjector
. Newly added methodgetModule
does not need it anymore. -
FeatureModulesService
now usesLazyModulesService
. -
JsonLdProductReviewBuilder
now usesSeoConfig
. -
RegisterComponent
now usesAuthConfigService
. -
SplitViewComponent
now also requiresBreakpointService
andElementRef
. -
CheckoutGuard
now also requiresCheckoutStepService
. -
OrderConfirmationOverviewComponent
no longer usesTranslationService
. The logic using this service was moved to theOrderOverviewComponent
.