ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

SAP Spartacus 3.0的一些变化

2020-12-07 14:02:08  阅读:381  来源: 互联网

标签:now SAP Spartacus no uses 3.0 removed was longer


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)
relativeLinkResolutionn/a'corrected'
initialNavigationn/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 and default-cms-content-config have been removed. Use defaultCmsContentProviders 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 from PageMateResolver to Observable<PageMetaResolver> so it can take into account page meta resolvers from lazy loaded features.
  • PageMetaService’s constructor is now using UnifiedInjector instead of injecting PageMetaResolver token directly.

ConverterService lazy-loading related changes

  • ConverterService constructor is now using UnifiedInjector instead of standard Injector

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 and ViewContainerRef.

Property renamed in SearchConfig interface

Old NameNew Name
sortCodesort

Changes in CheckoutStepsState interface

  • New property: currently required poNumber: { po: string; costCenter: string; };
  • Change type: property orderDetails type has been changed from Order to Order | 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 new numberOfEntriesBeforeAdd instead
  • cartEntry$ - use activeCartService.getLastEntry(productCode) instead

Auth module refactor

  • @spartacus/core have new dependency on angular-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 under ClientAuthSelectors. User token is no longer stored in ngrx store. To get the token use AuthStorageService.getToken method.
  • StateWithAuth was removed. State related to client token was moved to StateWithClientAuth. Data related to user token are stored in AuthStorageService and UserIdService.
  • AuthState was removed. State related to client token was moved to ClientAuthState. Data related to user token are stored in AuthStorageService and UserIdService.
  • UserTokenState was removed. Data related to user token are no longer stored in ngrx store. User token is stored in AuthStorageService and user id is stored in UserIdService.
  • AUTH_FEATURE was removed. Client token state is under the key from CLIENT_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 contains Login and Logout action class and LOGIN, LOGOUT variables with action type. Actions related to client token (LoadClientToken...) are now available under ClientAuthActions export. Constant LOGOUT_CUSTOMER_SUPPORT_AGENT is available in AsmActions 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 and RevokeUserTokenFail). Instead initialize user token load, refresh or revoke with methods exposed in AuthService and OAuthLibWrapperService.

Models

  • UserToken interface was replaced with AuthToken interface. New interface contains different properties than the previous to match requirements of angular-oauth2-oidc library.
  • AuthenticationToken interface was removed. Use AuthToken or ClientToken directly.
  • Occ.UserGroupList interface was removed.
  • Occ.UserSignUp interface was removed.

Guards

  • NotAuthGuard now returns Observable<UrlTree> for homepage for logged in users instead of invoking redirect. Constructor also changed for this guard. RoutingService is no longer needed, but SemanticPathService and Router is now required.
  • AuthGuard now returns Observable<UrlTree> for login page for anonymous users instead of invoking redirect. Constructor also changed for this guard. RoutingService is no longer needed, but SemanticPathService is now required.

Services

  • AuthRedirectService now requires AuthRedirectStorageService. Make sure to provide it. It is an replacement for private variable redirectUrl.
  • AuthService now requires UserIdService, OAuthLibWrapperService, AuthStorageService, AuthRedirectService and RoutingService.
  • AuthService.authorize was renamed to loginWithCredentials. 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, dispatches Login action and redirects to previously visited page.
  • AuthService.getOccUserId was removed from AuthService. Use UserIdService.getUserId method instead. It is the direct replacement.
  • AuthService.invokeWithUserId was moved to UserIdService. It is available under the same name.
  • AuthService.getUserToken was removed. To check if user is logged in use isUserLoggedIn and to get user id use UserIdService.getUserId. If you need access to tokens then use AuthStorageService.getToken.
  • AuthService.refreshUserToken was moved and renamed to OAuthLibWrapperService.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 shape AuthToken and pass to AuthStorageService.setToken.
  • AuthService.logout method changed behavior to redirect to logout page. Then the method AuthService.coreLogout will be dispatched and perform operations previously done by logout method (Logout action dispatch, clearing local state, revoking tokens).
  • AuthService.getClientToken, AuthService.refreshClientToken and AuthService.isClientTokenLoaded were moved to ClientTokenService.

Config

  • AuthConfig no longer extends OccConfig.
  • login and revoke endpoints were removed from OccConfig. login endpoint is now available under tokenEndpoint property in AuthConfig. revoke endpoint is available under revokeEndpoint property in AuthConfig.
  • storageSync configuration for auth branch in ngrx store was removed. State of token, userId is now synchronized with AuthStatePersistenceService. Override this service if you want to sync more properties to localStorage (eg. refresh_token).
  • storageSync configuration for anonymous-consents branch in ngrx store was removed. State is now synchronized with AnonymousConsentsStatePersistenceService. 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 and getCustomerSupportAgentTokenLoading were removed from AsmSelectors. To get token use AuthStorageService.getToken and AsmAuthStorageService.getTokenTarget to check if it belongs to CS agent.
  • Effects in AsmModule now instead of makeErrorSerializable use normalizeHttpError for error transformation.
  • storageSync configuration for asm branch in ngrx store was removed. State of ASM UI, tokens is now synchronized with AsmStatePersistenceService.
  • CSAGENT_TOKEN_DATA variable was removed.
  • AsmState.csagentToken was removed. Token is now stored in AuthStorageService. Check AsmAuthStorageService.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 with CsAgentAuthService.
  • CustomerSupportAgentTokenInterceptor interceptor was removed. Token and error handling for CS agent requests are now handled by AuthInterceptor and AsmAuthHttpHeaderService.

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 to CsAgentAuthService. It now performs full login flow for CS agent and resolves when it completes.
  • AsmAuthService.startCustomerEmulationSession was moved to CsAgentAuthService. Behavior haven’t changed.
  • AsmAuthService.isCustomerEmulationToken was removed. To check token use AuthStorageService.getToken and to check if it belongs to CS agent use AsmAuthStorageService.getTokenTarget.
  • AsmAuthService.getCustomerSupportAgentToken was removed. To check token use AuthStorageService.getToken and to check if it belongs to CS agent use AsmAuthStorageService.getTokenTarget.
  • AsmAuthService.getCustomerSupportAgentTokenLoading was moved to CsAgentAuthService. Warning! It is not implemented there yet.
  • AsmAuthService.logoutCustomerSupportAgent was moved to CsAgentAuthService. It performs logout procedure for CS agent and resolves when it completes.

CDC library

  • CdcUserTokenEffects now uses normalizeHttpError for error serialization.
  • CdcUserTokenEffects.loadCdcUserToken$ effect now calls CdcAuthService.loginWithToken instead of dispatching AuthActions.LoadUserTokenSuccess action.
  • CdcAuthService no longer extends AuthService.
  • CdcAuthService have new required dependencies. AuthStorageService, UserIdService, GlobalMessageService and AuthRedirectService needs to provided.
  • CdcAuthService.authorizeWithCustomCdcFlow method was renamed to loginWithCustomCdcFlow.
  • CdcAuthService.logout method was removed. Now CDC hooks into logout process, by providing CdcLogoutGuard as LogoutGuard.
  • CdcJsService now requires AuthService as CdcAuthService no longer extends it. AuthService should be passed after CdcAuthService. CdcAuthService is available in service under cdcAuth and AuthService is available under auth property. Additionally GlobalMessageService and AuthRedirectService 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 of Observable<any> instead of Observable<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 by checkoutStepService.
  • activeStepUrl property has been removed. This logic is now handled by checkoutStepService.
  • steps property has been removed - use steps$ instead.

CheckoutProgressMobileTopComponent

  • routerState$ property has been removed. This logic is now handled by checkoutStepService.
  • activeStepUrl property has been removed. This logic is now handled by checkoutStepService.
  • steps property has been removed - use steps$ instead.

CheckoutProgressComponent

  • routerState$ property has been removed. This logic is now handled by checkoutStepService.
  • activeStepUrl property has been removed. This logic is now handled by checkoutStepService.
  • steps property has been removed - use steps$ instead.

DeliveryModeComponent

  • checkoutStepUrlNext property has been removed. This logic is now handled by checkoutStepService.
  • checkoutStepUrlPrevious property has been removed. This logic is now handled by checkoutStepService.

OrderDetailShippingComponent

  • getPaymentCardContent was removed, please check the OrderOverviewComponent instead.
  • getShippingMethodCardContent was removed, please check the OrderOverviewComponent instead.
  • getAddressCardContent was removed, please check the OrderOverviewComponent instead.
  • getBillingAddressCardContent was removed, please check the OrderOverviewComponent instead.

PaymentMethodComponent

  • checkoutStepUrlNext property has been removed. This logic is now handled by checkoutStepService.
  • checkoutStepUrlPrevious property has been removed. This logic is now handled by checkoutStepService.
  • goNext method has been renamed to next.
  • goPrevious method has been renamed to back.

ShippingAddressComponent

  • existingAddresses$ property has been removed.
  • newAddressFormManuallyOpened property has been renamed to addressFormOpened.
  • goNext method has been renamed to next.
  • goPrevious method has been renamed to back.

CheckoutAuthGuard

  • canActivate method now returns type Observable<boolean | UrlTree.

CheckoutConfigService

  • steps property has been removed - use checkoutStepService instead.
  • checkoutStepService method has been removed - use checkoutStepRoute method in checkoutStepService instead.
  • getFirstCheckoutStepRoute method has been removed - use getFirstCheckoutStepRoute method in checkoutStepService instead.
  • getFirstCheckoutStepRoute method has been removed - use getFirstCheckoutStepRoute method in checkoutStepService instead.
  • getNextCheckoutStepUrl method has been removed - use getNextCheckoutStepUrl method in checkoutStepService instead.
  • getPreviousCheckoutStepUrl method has been removed - use getPreviousCheckoutStepUrl method in checkoutStepService instead.
  • getCurrentStepIndex method has been removed - use getCurrentStepIndex method in checkoutStepService instead.
  • CheckoutConfigService no longer uses RoutingConfigService.

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 the windowRef.
  • Protected method getClosest was removed. Instead use the method getBreakpoint.
  • Property _breakpoints has been removed.
  • Public getter breakpoint$ was removed. Instead use the property breakpoint$.
  • BreakpointService has new required platform dependency.

ProtectedRoutesGuard

The return type of the method ProtectedRoutesGuard.canActivate changed from Observable<boolean> to Observable<boolean | UrlTree>

ItemCounterComponent

  • The component now implements OnInit and OnDestroy.

ViewComponent

  • Protected getter method splitViewCount was removed.

UpdateEmailComponent

  • Method onSuccess changed its return type from void to Promise<void> in order to wait for the logout to complete before updating the email.

StorefrontComponent

  • collapseMenuIfClickOutside method param type changed from MouseEvent to any. 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 the ElementRef and Renderer2 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 the setRate() (this is also fixing a bug), we bind keydown.space now directly form the view. The more generic keydown output binding is removed.

CartNotEmptyGuard

  • Method canActivate changed its return type from Observable<boolean> to Observable<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 from Router and SemanticPathService.

NotCheckoutAuthGuard

  • Method canActivate changed its return type from Observable<boolean> to Observable<boolean | UrlTree> to support OAuth flows.

ProductVariantGuard

  • Method canActivate now requires a parameter of type ActivatedRouteSnapshot.

LogoutGuard

  • Method canActivate changed its return type from Observable<boolean> to Observable<boolean | UrlTree> to support OAuth flows.
  • Method logout return type has been changed from void to Promise<any> to support OAuth flows.
  • Method redirect was removed. Use getRedirectUrl instead.

CurrentProductService

  • getProduct method will now only emit distinct product.

MultiCartStatePersistenceService

  • sync method has been renamed to initSync.

ProductReferenceService

  • get method has been removed. Use getProductReferences and loadProductReferences methods instead.

LanguageService

  • Method setActive changed its return type from Subscription to void.

CurrencyService

  • Method setActive changed its return type from Subscription to void.

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 of UserService also loads replenishment orders when the url contains a replenishment code.

UserOrderService

  • Method getTitles of UserOrderService will load titles when it is empty.

Checkout selectors

  • Selector getCheckoutOrderDetails changed its MemoizedSelector return types. Instead of Order now we get union Order | ReplenishmentOrder.

ProductListComponentService

  • Property sub was removed from ProductListComponentService. It is no longer used.
  • Method setQuery was removed from ProductListComponentService. It is no longer used.
  • Method viewPage was removed from ProductListComponentService. It is no longer used.

ProductCarouselService

The following functions have been removed from the component:

  • getProductReferences()

CheckoutService

  • Method placeOrder of CheckoutService now requires termsChecked parameter.
  • Method getOrderDetails changed its return type from Observable<Order> to Observable<Order | ReplenishmentOrder>.

AnonymousConsentTemplatesAdapter

  • Method loadAnonymousConsents of AnonymousConsentTemplatesAdapter is no longer optional.

AnonymousConsentTemplatesConnector

  • Method loadAnonymousConsents of AnonymousConsentTemplatesConnector changed the return type from Observable<AnonymousConsent[] | null> to Observable<AnonymousConsent[]>,

SplitViewComponent

  • The property subscription of SplitViewComponent is no longer protected. It’s private now.

Automated Migrations for Version 3

  • CheckoutProgressMobileBottomComponent no longer uses CheckoutConfig, RoutingService and RoutingConfigService. These services usage was replaced with the corresponding methods from CheckoutStepService. This service needs to be provided to CheckoutProgressMobileBottomComponent.
  • CheckoutAuthGuard no longer uses RoutingService. This service usage was replaced with the corresponding methods from Router and SemanticPathService. Additional services UserService and GlobalMessageService also need to be provided to CheckoutAuthGuard.
  • CheckoutProgressMobileTopComponent no longer uses CheckoutConfig, RoutingService and RoutingConfigService. These services usage was replaced with the corresponding methods from CheckoutStepService. This service needs to be provided to CheckoutProgressMobileTopComponent.
  • CheckoutProgressComponent no longer uses CheckoutConfig, RoutingService and RoutingConfigService. These services usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to CheckoutProgressComponent.
  • DeliveryModeSetGuard no longer uses CheckoutConfigService. This service usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to DeliveryModeSetGuard.
  • DeliveryModeComponent no longer uses RoutingService. This service usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to DeliveryModeComponent.
  • LoginFormComponent no longer uses ActivatedRoute, CheckoutConfigService and AuthRedirectService. The logic using these services was moved to a different component.
  • OrderDetailShippingComponent no longer uses TranslationService. The logic using these services was moved to OrderDetailShippingComponent.
  • PaymentDetailsSetGuard no longer uses CheckoutConfigService. This service usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to PaymentDetailsSetGuard.
  • PaymentMethodComponent no longer uses CheckoutConfigService and RoutingService. These services usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to PaymentMethodComponent.
  • ReviewSubmitComponent no longer uses CheckoutConfigService. This service usage was replaced with the corresponding methods form CheckoutStepService. In addition, PaymentTypeService, CheckoutCostCenterService and UserCostCenterService need to be provided to ReviewSubmitComponent.
  • ShippingAddressSetGuard no longer uses CheckoutConfigService. This service usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to ShippingAddressSetGuard.
  • ShippingAddressComponent no longer uses CheckoutConfigService and RoutingService. These services usage was replaced with the corresponding methods form CheckoutStepService. This service needs to be provided to ShippingAddressComponent.
  • MultiCartService now requires the additional provider UserIdService.
  • PageSlotComponent no longer uses CmsComponentsService. This service usage was replaces with the PageSlotService.
  • ForbiddenHandler now uses GlobalMessageService, AuthService, OccEndpointsService.
  • CheckoutPaymentService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • CheckoutService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • CustomerCouponService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • OrderReturnRequestService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • UserAddressService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • UserConsentService now also requires UserIdService.
  • UserInterestsService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • UserNotificationPreferenceService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • UserOrderService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService. Now also requires RoutingService.
  • UserPaymentService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • UserService no longer uses AuthService. This service usage was replaced with the corresponding methods from UserIdService.
  • ActiveCartService no longer uses AuthService. This service usage was replaces with the UserIdService.
  • CartVoucherService no longer uses AuthService. This service usage was replaces with the UserIdService.
  • SelectiveCartService no longer uses AuthService. This service usage was replaces with the UserIdService.
  • WishListService no longer uses AuthService. This service usage was replaces with the UserIdService.
  • CheckoutDeliveryService no longer uses AuthService. This service usage was replaces with the UserIdService.
  • UnauthorizedErrorHandler has been removed.
  • StarRatingComponent no longer uses ElementRef and Renderer2.
  • ProductCarouselService no longer uses ProductReferenceService.
  • NotCheckoutAuthGuard no longer uses RoutingService. This service usage was replaced with the corresponding methods from SemanticPathService and Router.
  • StoreFinderSearchConfig has been removed. SearchConfig should be used instead.
  • ForgotPasswordComponent now also requires AuthConfigService.
  • OrderHistoryComponent now also requires UserReplenishmentOrderService.
  • OrderReturnGuard no longer uses RoutingService. This service usage was replaced with the corresponding methods from Router and SemanticPathService.
  • OrderCancellationGuard no longer uses RoutingService. This service usage was replaced with the corresponding methods from Router and SemanticPathService.
  • OutletRefDirective no longer uses FeatureConfigService.
  • OutletService no longer uses FeatureConfigService.
  • RoutingService now also requires RoutingParamsService.
  • TOKEN_REVOCATION_HEADER has been removed.
  • JsonLdScriptFactory now also requires SeoConfig.
  • LogoutGuard no longer uses RoutingService. This service usage was replaced with the corresponding methods from Router.
  • ProductVariantGuard no longer uses RoutingService. This service usage was replaced with the corresponding methods from Router and SemanticPathService.
  • FeatureModulesService no longer has getInjectors method.
  • CmsComponentsService no longer has getInjectors method.
  • ViewComponent now also requires ChangeDetectorRef.
  • SplitViewDeactivateGuard has been removed.
  • FeatureModulesService no longer uses Compiler. Newly added method getModule does not need it anymore.
  • FeatureModulesService no longer uses Injector. Newly added method getModule does not need it anymore.
  • FeatureModulesService now uses LazyModulesService.
  • JsonLdProductReviewBuilder now uses SeoConfig.
  • RegisterComponent now uses AuthConfigService.
  • SplitViewComponent now also requires BreakpointService and ElementRef.
  • CheckoutGuard now also requires CheckoutStepService.
  • OrderConfirmationOverviewComponent no longer uses TranslationService. The logic using this service was moved to the OrderOverviewComponent.

标签:now,SAP,Spartacus,no,uses,3.0,removed,was,longer
来源: https://blog.csdn.net/i042416/article/details/110817308

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有