-
+
{{ 'asm.saveCart.dialog.row.id' | cxTranslate }}
{{ cart.code }}
-
+
{{ 'asm.saveCart.dialog.row.qty' | cxTranslate }}
{{ cartQty }}
-
+
{{ 'asm.saveCart.dialog.row.total' | cxTranslate }}
{{ cart.totalPriceWithTax?.formattedValue }}
diff --git a/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.spec.ts b/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.spec.ts
index 67e2ee34317..6f1096cc551 100644
--- a/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.spec.ts
+++ b/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.spec.ts
@@ -32,16 +32,15 @@ class MockLaunchDialogService implements Partial
{
class MockAsmComponentService extends AsmComponentService {
logoutCustomer() {}
}
-class MockRoutingService implements Partial {
- go = () => Promise.resolve(true);
-}
class MockAuthService implements Partial {
isUserLoggedIn(): Observable {
return of(false);
}
}
-
+class MockRoutingService implements Partial {
+ go = () => Promise.resolve(true);
+}
class MockCsAgentAuthService implements Partial {
authorizeCustomerSupportAgent(): Promise {
return Promise.resolve();
diff --git a/feature-libs/asm/components/services/asm-component.service.spec.ts b/feature-libs/asm/components/services/asm-component.service.spec.ts
index 28edae83bd8..d7a2b42d563 100644
--- a/feature-libs/asm/components/services/asm-component.service.spec.ts
+++ b/feature-libs/asm/components/services/asm-component.service.spec.ts
@@ -2,10 +2,11 @@ import { TestBed } from '@angular/core/testing';
import {
ASM_ENABLED_LOCAL_STORAGE_KEY,
CsAgentAuthService,
+ AsmDeepLinkService,
AsmEnablerService,
} from '@spartacus/asm/root';
import { AsmDialogActionType } from '@spartacus/asm/customer-360/root';
-import { AuthService, RoutingService, WindowRef } from '@spartacus/core';
+import { AuthService, WindowRef, RoutingService } from '@spartacus/core';
import { Observable, of } from 'rxjs';
import { take } from 'rxjs/operators';
import { AsmComponentService } from './asm-component.service';
@@ -43,6 +44,24 @@ const MockWindowRef = {
},
};
+class MockAsmDeepLinkService implements Partial {
+ isEmulateInURL(): boolean {
+ return true;
+ }
+
+ getSearchParameter(key: any) {
+ return key;
+ }
+
+ handleNavigation() {
+ return {};
+ }
+
+ getParamsInUrl() {
+ return {};
+ }
+}
+
class MockAsmEnablerService implements Partial {
isEmulateInURL(): boolean {
return true;
@@ -65,6 +84,8 @@ describe('AsmComponentService', () => {
{ provide: AuthService, useClass: MockAuthService },
{ provide: CsAgentAuthService, useClass: MockCsAgentAuthService },
{ provide: WindowRef, useValue: MockWindowRef },
+ { provice: AsmDeepLinkService, useClass: MockAsmDeepLinkService },
+ { provide: RoutingService, useClass: MockRoutingService },
{ provide: AsmEnablerService, useClass: MockAsmEnablerService },
{ provide: RoutingService, useClass: MockRoutingService },
],
diff --git a/feature-libs/asm/components/services/asm-component.service.ts b/feature-libs/asm/components/services/asm-component.service.ts
index a5b418412dd..e55f2c182be 100644
--- a/feature-libs/asm/components/services/asm-component.service.ts
+++ b/feature-libs/asm/components/services/asm-component.service.ts
@@ -8,6 +8,8 @@ import { Injectable, Optional } from '@angular/core';
import {
ASM_ENABLED_LOCAL_STORAGE_KEY,
CsAgentAuthService,
+ AsmDeepLinkParameters,
+ AsmDeepLinkService,
AsmEnablerService,
} from '@spartacus/asm/root';
import { AuthService, RoutingService, WindowRef } from '@spartacus/core';
@@ -32,10 +34,11 @@ export class AsmComponentService {
winRef: WindowRef,
// eslint-disable-next-line @typescript-eslint/unified-signatures
asmEnablerService: AsmEnablerService,
- routingService: RoutingService
+ routingService: RoutingService,
+ asmDeepLinkService: AsmDeepLinkService
);
/**
- * @deprecated since 7.0
+ * @deprecated since 7.0 (CXSPA-3090)
*/
constructor(
authService: AuthService,
@@ -46,14 +49,25 @@ export class AsmComponentService {
protected authService: AuthService,
protected csAgentAuthService: CsAgentAuthService,
protected winRef: WindowRef,
+ // TODO(CXSPA-3090): Remove optional flag in 7.0 where service is used
@Optional() protected asmEnablerService?: AsmEnablerService,
- @Optional() protected routingService?: RoutingService
+ @Optional() protected routingService?: RoutingService,
+ @Optional() protected asmDeepLinkService?: AsmDeepLinkService
+
) {
+ // TODO(CXSPA-3090): We can remove this in 7.0 and use asmDeepLinkService instead.
this.searchparam = new URLSearchParams(this.winRef?.location?.search);
}
- getSearchParameter(key: string): string | null {
- return this.searchparam.get(key);
+ /**
+ * Returns a deep link parameter value if it is in the url.
+ */
+ getSearchParameter(key: string): string | undefined | null {
+ // TODO(CXSPA-3090): Use asmDeepLinkService only in 7.0
+ return (
+ this.asmDeepLinkService?.getSearchParameter(key) ??
+ this.searchparam.get(key)
+ );
}
isEmulatedByDeepLink(): BehaviorSubject {
@@ -101,7 +115,27 @@ export class AsmComponentService {
* check whether try to emulate customer from deeplink
*/
isEmulateInURL(): boolean {
- return this.asmEnablerService?.isEmulateInURL() || false;
+ // TODO(CXSPA-3090): Use asmDeepLinkService only in 7.0
+ return (
+ (this.asmDeepLinkService?.isEmulateInURL() ??
+ this.asmEnablerService?.isEmulateInURL()) ||
+ false
+ );
+ }
+
+ /**
+ * Returns valid deep link parameters in the url.
+ */
+ getDeepLinkUrlParams(): AsmDeepLinkParameters | undefined {
+ return this.asmDeepLinkService?.getParamsInUrl();
+ }
+
+ /**
+ * Handles the navigation based on deep link parameters in the URL
+ * or passed parameter.
+ */
+ handleDeepLinkNavigation(parameters = this.getDeepLinkUrlParams()): void {
+ this.asmDeepLinkService?.handleNavigation(parameters);
}
handleAsmDialogAction(event: AsmDialogActionEvent | string): void {
diff --git a/feature-libs/asm/package.json b/feature-libs/asm/package.json
index 433fadd58aa..1f75feb84bc 100644
--- a/feature-libs/asm/package.json
+++ b/feature-libs/asm/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/asm",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "ASM feature library for Spartacus",
"keywords": [
"spartacus",
@@ -33,14 +33,14 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefinder": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefinder": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/feature-libs/asm/root/services/asm-deep-link.service.spec.ts b/feature-libs/asm/root/services/asm-deep-link.service.spec.ts
new file mode 100644
index 00000000000..c503a7abdb4
--- /dev/null
+++ b/feature-libs/asm/root/services/asm-deep-link.service.spec.ts
@@ -0,0 +1,114 @@
+import { TestBed } from '@angular/core/testing';
+import { WindowRef, RoutingService } from '@spartacus/core';
+import { AsmDeepLinkService } from './asm-deep-link.service';
+import { AsmEnablerService } from '@spartacus/asm/root';
+
+const MockWindowRef = {
+ location: {
+ search: 'customerId=testId&ticketId=123&invalidparam=666',
+ },
+};
+
+class MockRoutingService implements Partial {
+ go = () => Promise.resolve(true);
+}
+
+class MockAsmEnablerService implements Partial {
+ isEmulateInURL = () => true;
+}
+
+describe('AsmDeepLinkService', () => {
+ let asmDeepLinkService: AsmDeepLinkService;
+ let asmEnablerService: AsmEnablerService;
+ let routingService: RoutingService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [
+ { provide: RoutingService, useClass: MockRoutingService },
+ { provide: WindowRef, useValue: MockWindowRef },
+ { provide: AsmEnablerService, useClass: MockAsmEnablerService },
+ ],
+ });
+
+ asmDeepLinkService = TestBed.inject(AsmDeepLinkService);
+ asmEnablerService = TestBed.inject(AsmEnablerService);
+ routingService = TestBed.inject(RoutingService);
+ });
+
+ it('should be created', () => {
+ expect(asmDeepLinkService).toBeTruthy();
+ });
+
+ describe('getSearchParameter', () => {
+ it('should get parameter from search result', () => {
+ expect(asmDeepLinkService.getSearchParameter('customerId')).toEqual(
+ 'testId'
+ );
+ });
+ });
+
+ describe('isEmulateInURL', () => {
+ it('should call enabler service', () => {
+ spyOn(asmEnablerService, 'isEmulateInURL');
+ asmDeepLinkService.isEmulateInURL();
+ expect(asmEnablerService.isEmulateInURL).toHaveBeenCalled();
+ });
+ });
+
+ describe('getParamsInUrl', () => {
+ it('should return only valid deep link params in url', () => {
+ expect(asmDeepLinkService.getParamsInUrl()).toEqual({
+ customerId: 'testId',
+ ticketId: '123',
+ });
+ });
+ });
+
+ describe('handleNavigation', () => {
+ beforeEach(() => {
+ spyOn(routingService, 'go').and.callThrough();
+ });
+ it('should navigate to active cart', () => {
+ asmDeepLinkService.handleNavigation({
+ customerId: '123',
+ cartType: 'active',
+ });
+ expect(routingService.go).toHaveBeenCalledWith({ cxRoute: 'cart' });
+ });
+ it('should navigate to saved cart', () => {
+ asmDeepLinkService.handleNavigation({
+ customerId: '123',
+ cartType: 'saved',
+ cartId: '456',
+ });
+ expect(routingService.go).toHaveBeenCalledWith(
+ 'my-account/saved-cart/456'
+ );
+ });
+ it('should navigate to order details', () => {
+ asmDeepLinkService.handleNavigation({
+ customerId: '123',
+ orderId: '456',
+ });
+ expect(routingService.go).toHaveBeenCalledWith({
+ cxRoute: 'orderDetails',
+ params: { code: '456' },
+ });
+ });
+ it('should navigate to support ticket details', () => {
+ asmDeepLinkService.handleNavigation({
+ customerId: '123',
+ ticketId: '456',
+ });
+ expect(routingService.go).toHaveBeenCalledWith({
+ cxRoute: 'supportTicketDetails',
+ params: { ticketCode: '456' },
+ });
+ });
+ it('should not navigate', () => {
+ asmDeepLinkService.handleNavigation({});
+ expect(routingService.go).not.toHaveBeenCalled();
+ });
+ });
+});
diff --git a/feature-libs/asm/root/services/asm-deep-link.service.ts b/feature-libs/asm/root/services/asm-deep-link.service.ts
new file mode 100644
index 00000000000..1f99b1328b2
--- /dev/null
+++ b/feature-libs/asm/root/services/asm-deep-link.service.ts
@@ -0,0 +1,80 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { RoutingService, WindowRef } from '@spartacus/core';
+import { Injectable } from '@angular/core';
+import { AsmEnablerService } from './asm-enabler.service';
+import { AsmDeepLinkParameters } from '../model/asm.models';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class AsmDeepLinkService {
+ protected searchParams: URLSearchParams;
+
+ constructor(
+ protected routingService: RoutingService,
+ protected winRef: WindowRef,
+ protected asmEnablerService: AsmEnablerService
+ ) {
+ this.searchParams = new URLSearchParams(this.winRef?.location?.search);
+ }
+
+ /**
+ * check whether try to emulate customer from deeplink
+ */
+ isEmulateInURL(): boolean {
+ return this.asmEnablerService?.isEmulateInURL() || false;
+ }
+
+ /**
+ * Returns a deep link parameter value if it is in the url.
+ */
+ getSearchParameter(key: string): string | undefined {
+ return this.searchParams.get(key) ?? undefined;
+ }
+
+ /**
+ * Handles the navigation based on deep link parameters in the URL
+ * or passed parameters.
+ */
+ handleNavigation(parameters = this.getParamsInUrl()): void {
+ if (parameters.cartType === 'active') {
+ // Navigate to active cart
+ this.routingService.go({ cxRoute: 'cart' });
+ } else if (parameters.cartType === 'saved' && parameters.cartId) {
+ // Navigate to saved cart
+ this.routingService.go('my-account/saved-cart/' + parameters.cartId);
+ } else if (parameters.orderId) {
+ // Navigate to order details
+ this.routingService.go({
+ cxRoute: 'orderDetails',
+ params: { code: parameters.orderId },
+ });
+ } else if (parameters.ticketId) {
+ // Navigate to support ticket details
+ this.routingService.go({
+ cxRoute: 'supportTicketDetails',
+ params: { ticketCode: parameters.ticketId },
+ });
+ }
+ }
+
+ /**
+ * Returns valid deep link parameters in the url.
+ */
+ getParamsInUrl(): AsmDeepLinkParameters {
+ const params: AsmDeepLinkParameters = {
+ customerId: this.getSearchParameter('customerId'),
+ orderId: this.getSearchParameter('orderId'),
+ ticketId: this.getSearchParameter('ticketId'),
+ cartId: this.getSearchParameter('cartId'),
+ cartType: this.getSearchParameter('cartType'),
+ };
+ // Filter undefined properties
+ return Object.fromEntries(Object.entries(params).filter(([_, v]) => !!v));
+ }
+}
diff --git a/feature-libs/asm/root/services/csagent-auth.service.spec.ts b/feature-libs/asm/root/services/csagent-auth.service.spec.ts
index e534e5a478a..846706340e8 100644
--- a/feature-libs/asm/root/services/csagent-auth.service.spec.ts
+++ b/feature-libs/asm/root/services/csagent-auth.service.spec.ts
@@ -4,12 +4,12 @@ import {
AuthActions,
AuthService,
AuthToken,
+ FeatureConfigService,
OAuthLibWrapperService,
OCC_USER_ID_ANONYMOUS,
OCC_USER_ID_CURRENT,
UserIdService,
} from '@spartacus/core';
-import { UserProfileFacade } from '@spartacus/user/profile/root';
import { TokenResponse } from 'angular-oauth2-oidc';
import { of } from 'rxjs';
import { take } from 'rxjs/operators';
@@ -20,6 +20,7 @@ import {
TokenTarget,
} from '../services/asm-auth-storage.service';
import { CsAgentAuthService } from './csagent-auth.service';
+import { UserAccountFacade } from '@spartacus/user/account/root';
class MockAuthService implements Partial {
logout() {}
@@ -34,7 +35,7 @@ class MockOAuthLibWrapperService implements Partial {
}
}
-class MockUserProfileFacade implements Partial {
+class MockUserAccountFacade implements Partial {
get() {
return of({});
}
@@ -47,7 +48,8 @@ describe('CsAgentAuthService', () => {
let authService: AuthService;
let asmAuthStorageService: AsmAuthStorageService;
let oAuthLibWrapperService: OAuthLibWrapperService;
- let userProfileFacade: UserProfileFacade;
+ let userAccountFacade: UserAccountFacade;
+ let featureConfig: FeatureConfigService;
beforeEach(() => {
TestBed.configureTestingModule({
@@ -63,7 +65,7 @@ describe('CsAgentAuthService', () => {
provide: OAuthLibWrapperService,
useClass: MockOAuthLibWrapperService,
},
- { provide: UserProfileFacade, useClass: MockUserProfileFacade },
+ { provide: UserAccountFacade, useClass: MockUserAccountFacade },
],
});
@@ -72,7 +74,8 @@ describe('CsAgentAuthService', () => {
authService = TestBed.inject(AuthService);
asmAuthStorageService = TestBed.inject(AsmAuthStorageService);
oAuthLibWrapperService = TestBed.inject(OAuthLibWrapperService);
- userProfileFacade = TestBed.inject(UserProfileFacade);
+ userAccountFacade = TestBed.inject(UserAccountFacade);
+ featureConfig = TestBed.inject(FeatureConfigService);
store = TestBed.inject(Store);
});
@@ -117,9 +120,10 @@ describe('CsAgentAuthService', () => {
).and.callThrough();
spyOn(userIdService, 'setUserId').and.callThrough();
spyOn(asmAuthStorageService, 'setEmulatedUserToken').and.callThrough();
- spyOn(userProfileFacade, 'get').and.returnValue(
+ spyOn(userAccountFacade, 'get').and.returnValue(
of({ customerId: 'custId' })
);
+ spyOn(featureConfig, 'isLevel').and.returnValue(true);
asmAuthStorageService.setToken({ access_token: 'token' } as AuthToken);
await service.authorizeCustomerSupportAgent('testUser', 'testPass');
diff --git a/feature-libs/asm/root/services/csagent-auth.service.ts b/feature-libs/asm/root/services/csagent-auth.service.ts
index 81cb22397e3..c5f2c537463 100644
--- a/feature-libs/asm/root/services/csagent-auth.service.ts
+++ b/feature-libs/asm/root/services/csagent-auth.service.ts
@@ -4,12 +4,13 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import { Injectable } from '@angular/core';
+import { Injectable, Optional } from '@angular/core';
import { Store } from '@ngrx/store';
import {
AuthActions,
AuthService,
AuthToken,
+ FeatureConfigService,
OAuthLibWrapperService,
OCC_USER_ID_ANONYMOUS,
OCC_USER_ID_CURRENT,
@@ -20,6 +21,7 @@ import { UserProfileFacade } from '@spartacus/user/profile/root';
import { combineLatest, Observable, of } from 'rxjs';
import { map } from 'rxjs/operators';
import { AsmAuthStorageService, TokenTarget } from './asm-auth-storage.service';
+import { UserAccountFacade } from '@spartacus/user/account/root';
/**
* Auth service for CS agent. Useful to login/logout agent, start emulation
@@ -29,13 +31,39 @@ import { AsmAuthStorageService, TokenTarget } from './asm-auth-storage.service';
providedIn: 'root',
})
export class CsAgentAuthService {
+ constructor(
+ authService: AuthService,
+ authStorageService: AsmAuthStorageService,
+ userIdService: UserIdService,
+ oAuthLibWrapperService: OAuthLibWrapperService,
+ store: Store,
+ // Consider delete it in 7.0
+ _userProfileFacade: UserProfileFacade,
+ userAccountFacade: UserAccountFacade
+ );
+ /**
+ * @deprecated since 7.0
+ */
+ constructor(
+ authService: AuthService,
+ authStorageService: AsmAuthStorageService,
+ userIdService: UserIdService,
+ oAuthLibWrapperService: OAuthLibWrapperService,
+ store: Store,
+ userProfileFacade: UserProfileFacade,
+ userAccountFacade: UserAccountFacade,
+ // eslint-disable-next-line @typescript-eslint/unified-signatures
+ featureConfig: FeatureConfigService
+ );
constructor(
protected authService: AuthService,
protected authStorageService: AsmAuthStorageService,
protected userIdService: UserIdService,
protected oAuthLibWrapperService: OAuthLibWrapperService,
protected store: Store,
- protected userProfileFacade: UserProfileFacade
+ protected userProfileFacade: UserProfileFacade,
+ protected userAccountFacade: UserAccountFacade,
+ @Optional() protected featureConfig?: FeatureConfigService
) {}
/**
@@ -48,6 +76,15 @@ export class CsAgentAuthService {
password: string
): Promise {
let userToken: AuthToken | undefined;
+ // Start emulation for currently logged in user
+ let customerId: string | undefined;
+ if (this.featureConfig?.isLevel('6.4')) {
+ this.userAccountFacade
+ .get()
+ .subscribe((user) => (customerId = user?.customerId))
+ .unsubscribe();
+ }
+
this.authStorageService
.getToken()
.subscribe((token) => (userToken = token))
@@ -59,12 +96,6 @@ export class CsAgentAuthService {
userId,
password
);
- // Start emulation for currently logged in user
- let customerId: string | undefined;
- this.userProfileFacade
- .get()
- .subscribe((user) => (customerId = user?.customerId))
- .unsubscribe();
this.store.dispatch(new AuthActions.Logout());
if (customerId !== undefined && userToken !== undefined) {
diff --git a/feature-libs/asm/root/services/index.ts b/feature-libs/asm/root/services/index.ts
index 96801af3c0a..62e71aaed9f 100644
--- a/feature-libs/asm/root/services/index.ts
+++ b/feature-libs/asm/root/services/index.ts
@@ -7,5 +7,6 @@
export * from './asm-auth-http-header.service';
export * from './asm-auth-storage.service';
export * from './asm-auth.service';
+export * from './asm-deep-link.service';
export * from './asm-enabler.service';
export * from './csagent-auth.service';
diff --git a/feature-libs/asm/styles/components/_asm-bind-cart.component.scss b/feature-libs/asm/styles/components/_asm-bind-cart.component.scss
index e431f2ef3a9..1646d57f297 100644
--- a/feature-libs/asm/styles/components/_asm-bind-cart.component.scss
+++ b/feature-libs/asm/styles/components/_asm-bind-cart.component.scss
@@ -78,7 +78,7 @@
}
.cx-asm-assignCart {
- border: none;
+ border: 1px solid #eff1f2;
border-radius: 4px;
background-color: #eff1f2;
box-shadow: 0px 4px 4px rgb(0 0 0 / 25%);
@@ -101,10 +101,7 @@
&:active,
&.active {
background-color: #ffffff;
- outline-style: solid;
- outline-color: var(--cx-color-visual-focus);
- outline-width: var(--cx-visual-focus-width, 2px);
- outline-offset: 4px;
+ outline: none;
}
.cx-asm-reset {
diff --git a/feature-libs/asm/styles/components/_asm-save-cart-dialog.component.scss b/feature-libs/asm/styles/components/_asm-save-cart-dialog.component.scss
index 80fe3e96e70..9dfa1e2ab98 100644
--- a/feature-libs/asm/styles/components/_asm-save-cart-dialog.component.scss
+++ b/feature-libs/asm/styles/components/_asm-save-cart-dialog.component.scss
@@ -120,30 +120,26 @@ $sapFiori_Button_Emphasized_Active_BorderColor: #0070f2;
min-height: 137px;
.cx-dialog-content {
- margin: 0px 60px 30px 60px;
+ margin: 10px 60px 0px 60px;
.item-left-text {
- width: 27px;
- height: 22px;
- font-family: 'Open Sans';
- font-style: normal;
+ font-family: 72;
+ font-size: 14px;
font-weight: 400;
- font-size: 16px;
- line-height: 22px;
- color: #14293a;
- padding: 15px;
+ line-height: 16px;
+ letter-spacing: 0px;
+ color: #556b82;
+ padding: 5px;
}
+
.item-right-text {
- width: 93px;
- height: 25px;
- font-family: 'Open Sans';
- font-style: normal;
- font-weight: 700;
- font-size: 18px;
- line-height: 25px;
- text-transform: capitalize;
- color: #14293a;
- padding: 15px;
+ font-family: 72;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 16px;
+ letter-spacing: 0px;
+ color: #131e29;
+ padding: 5px;
}
}
}
diff --git a/feature-libs/asm/styles/components/_csagent-login-form.component.scss b/feature-libs/asm/styles/components/_csagent-login-form.component.scss
index c6ca609b80e..b5bf0bf44cd 100644
--- a/feature-libs/asm/styles/components/_csagent-login-form.component.scss
+++ b/feature-libs/asm/styles/components/_csagent-login-form.component.scss
@@ -21,6 +21,9 @@
input {
width: 100%;
+ &:focus {
+ outline: none;
+ }
}
}
}
diff --git a/feature-libs/asm/styles/components/_customer-selection.component.scss b/feature-libs/asm/styles/components/_customer-selection.component.scss
index 825f8580c57..64b725f4be4 100644
--- a/feature-libs/asm/styles/components/_customer-selection.component.scss
+++ b/feature-libs/asm/styles/components/_customer-selection.component.scss
@@ -59,6 +59,9 @@
input {
width: 100%;
+ &:focus {
+ outline: none;
+ }
}
}
diff --git a/feature-libs/asm/tsconfig.schematics.json b/feature-libs/asm/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/asm/tsconfig.schematics.json
+++ b/feature-libs/asm/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/cart/base/occ/adapters/default-occ-cart-config.ts b/feature-libs/cart/base/occ/adapters/default-occ-cart-config.ts
index 3da024ba3b9..53fb6ab7c76 100644
--- a/feature-libs/cart/base/occ/adapters/default-occ-cart-config.ts
+++ b/feature-libs/cart/base/occ/adapters/default-occ-cart-config.ts
@@ -12,10 +12,10 @@ export const defaultOccCartConfig: OccConfig = {
endpoints: {
/* eslint-disable max-len */
carts:
- 'users/${userId}/carts?fields=carts(DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),user,saveTime,name,description)',
- cart: 'users/${userId}/carts/${cartId}?fields=DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),user,saveTime,name,description',
+ 'users/${userId}/carts?fields=carts(DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),totalUnitCount,deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),user,saveTime,name,description)',
+ cart: 'users/${userId}/carts/${cartId}?fields=DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),totalUnitCount,deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),user,saveTime,name,description',
createCart:
- 'users/${userId}/carts?fields=DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),user',
+ 'users/${userId}/carts?fields=DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),totalUnitCount,deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),user',
addEntries: 'users/${userId}/carts/${cartId}/entries',
updateEntries: 'users/${userId}/carts/${cartId}/entries/${entryNumber}',
removeEntries: 'users/${userId}/carts/${cartId}/entries/${entryNumber}',
diff --git a/feature-libs/cart/base/root/models/cart-outlets.model.ts b/feature-libs/cart/base/root/models/cart-outlets.model.ts
index 5f819a5ddaf..c07b2245d29 100644
--- a/feature-libs/cart/base/root/models/cart-outlets.model.ts
+++ b/feature-libs/cart/base/root/models/cart-outlets.model.ts
@@ -19,4 +19,6 @@ export enum CartOutlets {
ADD_TO_CART_CONTAINER = 'cx-add-to-cart-container',
PICKUP_INFO = 'cx-pickup-info',
ADD_TO_CART_PICKUP_OPTION = 'cx-add-to-cart-pickup-option',
+ DELIVERY_MODE = 'cx-delivery-mode',
+ ORDER_OVERVIEW = 'cx-order-overview',
}
diff --git a/feature-libs/cart/package.json b/feature-libs/cart/package.json
index c50d8d64fb4..43dbc51e2a3 100644
--- a/feature-libs/cart/package.json
+++ b/feature-libs/cart/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/cart",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "",
"keywords": [
"spartacus",
@@ -37,11 +37,11 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/feature-libs/cart/saved-cart/occ/config/default-occ-saved-cart-config.ts b/feature-libs/cart/saved-cart/occ/config/default-occ-saved-cart-config.ts
index ead8067453a..dd3ece8c564 100644
--- a/feature-libs/cart/saved-cart/occ/config/default-occ-saved-cart-config.ts
+++ b/feature-libs/cart/saved-cart/occ/config/default-occ-saved-cart-config.ts
@@ -11,7 +11,7 @@ export const defaultOccSavedCartConfig: OccConfig = {
occ: {
endpoints: {
savedCarts:
- '/users/${userId}/carts?savedCartsOnly=true&fields=carts(DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),saveTime,user,name,description)',
+ '/users/${userId}/carts?savedCartsOnly=true&fields=carts(DEFAULT,potentialProductPromotions,appliedProductPromotions,potentialOrderPromotions,appliedOrderPromotions,entries(totalPrice(formattedValue),product(images(FULL),stock(FULL)),basePrice(formattedValue,value),updateable),totalPrice(formattedValue),totalItems,totalPriceWithTax(formattedValue),totalDiscounts(value,formattedValue),subTotal(formattedValue),totalUnitCount,deliveryItemsQuantity,deliveryCost(formattedValue),totalTax(formattedValue, value),pickupItemsQuantity,net,appliedVouchers,productDiscounts(formattedValue),saveTime,user,name,description)',
savedCart: '/users/${userId}/carts/${cartId}/savedcart',
restoreSavedCart: '/users/${userId}/carts/${cartId}/restoresavedcart',
cloneSavedCart:
diff --git a/feature-libs/cart/tsconfig.schematics.json b/feature-libs/cart/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/cart/tsconfig.schematics.json
+++ b/feature-libs/cart/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/checkout/b2b/components/checkout-payment-type/checkout-payment-type.component.html b/feature-libs/checkout/b2b/components/checkout-payment-type/checkout-payment-type.component.html
index baf15c7bd01..e4707e495c3 100644
--- a/feature-libs/checkout/b2b/components/checkout-payment-type/checkout-payment-type.component.html
+++ b/feature-libs/checkout/b2b/components/checkout-payment-type/checkout-payment-type.component.html
@@ -77,7 +77,7 @@
-
-
-
-
+
-
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -126,6 +171,15 @@
+
+
+
+
+
+
diff --git a/feature-libs/order/components/order-details/order-overview/order-overview.component.spec.ts b/feature-libs/order/components/order-details/order-overview/order-overview.component.spec.ts
index 2334c3a9887..d020683f642 100644
--- a/feature-libs/order/components/order-details/order-overview/order-overview.component.spec.ts
+++ b/feature-libs/order/components/order-details/order-overview/order-overview.component.spec.ts
@@ -411,6 +411,15 @@ describe('OrderOverviewComponent', () => {
);
});
+ it('should isPaymentInfoCardFull be falsy when paymentInfo is partial', () => {
+ expect(
+ component.isPaymentInfoCardFull({
+ ...mockOrder.paymentInfo,
+ expiryMonth: undefined,
+ })
+ ).toBeFalsy();
+ });
+
it('should call getBillingAddressCardContent(billingAddress: Address)', () => {
spyOn(component, 'getBillingAddressCardContent').and.callThrough();
diff --git a/feature-libs/order/components/order-details/order-overview/order-overview.component.ts b/feature-libs/order/components/order-details/order-overview/order-overview.component.ts
index fc40394daab..7a212ab8311 100644
--- a/feature-libs/order/components/order-details/order-overview/order-overview.component.ts
+++ b/feature-libs/order/components/order-details/order-overview/order-overview.component.ts
@@ -5,7 +5,11 @@
*/
import { ChangeDetectionStrategy, Component } from '@angular/core';
-import { DeliveryMode, PaymentDetails } from '@spartacus/cart/base/root';
+import {
+ CartOutlets,
+ DeliveryMode,
+ PaymentDetails,
+} from '@spartacus/cart/base/root';
import {
Address,
CmsOrderDetailOverviewComponent,
@@ -13,7 +17,7 @@ import {
TranslationService,
} from '@spartacus/core';
import { Card, CmsComponentData } from '@spartacus/storefront';
-import { combineLatest, Observable, of } from 'rxjs';
+import { Observable, combineLatest, of } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { OrderDetailsService } from '../order-details.service';
@@ -23,6 +27,8 @@ import { OrderDetailsService } from '../order-details.service';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OrderOverviewComponent {
+ readonly cartOutlets = CartOutlets;
+
order$: Observable
= this.orderDetailsService.getOrderDetails();
isOrderLoading$: Observable =
typeof this.orderDetailsService.isOrderDetailsLoading === 'function'
@@ -226,6 +232,12 @@ export class OrderOverviewComponent {
);
}
+ isPaymentInfoCardFull(payment: PaymentDetails): boolean {
+ return (
+ !!payment?.cardNumber && !!payment?.expiryMonth && !!payment?.expiryYear
+ );
+ }
+
getBillingAddressCardContent(billingAddress: Address): Observable {
return this.translation.translate('paymentForm.billingAddress').pipe(
filter(() => Boolean(billingAddress)),
diff --git a/feature-libs/order/package.json b/feature-libs/order/package.json
index bd568a131c0..ef8e96d979d 100644
--- a/feature-libs/order/package.json
+++ b/feature-libs/order/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/order",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Order feature library for Spartacus",
"keywords": [
"spartacus",
@@ -33,12 +33,12 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/feature-libs/order/tsconfig.schematics.json b/feature-libs/order/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/order/tsconfig.schematics.json
+++ b/feature-libs/order/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/organization/package.json b/feature-libs/organization/package.json
index ac7775f3060..38f89ae0f91 100644
--- a/feature-libs/organization/package.json
+++ b/feature-libs/organization/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/organization",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Organization library for Spartacus",
"keywords": [
"spartacus",
@@ -33,13 +33,13 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap
index 40492a9b238..0d0d33778be 100644
--- a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap
+++ b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap
@@ -51,7 +51,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -266,7 +266,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -481,7 +481,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -696,7 +696,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -911,7 +911,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
diff --git a/feature-libs/organization/tsconfig.schematics.json b/feature-libs/organization/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/organization/tsconfig.schematics.json
+++ b/feature-libs/organization/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/organization/user-registration/root/public_api.ts b/feature-libs/organization/user-registration/root/public_api.ts
index f45f787b151..93a4c255caf 100644
--- a/feature-libs/organization/user-registration/root/public_api.ts
+++ b/feature-libs/organization/user-registration/root/public_api.ts
@@ -8,3 +8,4 @@ export * from './user-registration-root.module';
export * from './facade/index';
export * from './model/index';
export * from './feature-name';
+export * from './model/user-registration.model';
diff --git a/feature-libs/pickup-in-store/package.json b/feature-libs/pickup-in-store/package.json
index 7921af273fb..1ffe58a0192 100644
--- a/feature-libs/pickup-in-store/package.json
+++ b/feature-libs/pickup-in-store/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/pickup-in-store",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "",
"keywords": [
"spartacus",
@@ -32,14 +32,14 @@
"@angular/router": "^15.2.4",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefinder": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefinder": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/feature-libs/pickup-in-store/tsconfig.lib.json b/feature-libs/pickup-in-store/tsconfig.lib.json
index 55e1a18086a..371a4445768 100644
--- a/feature-libs/pickup-in-store/tsconfig.lib.json
+++ b/feature-libs/pickup-in-store/tsconfig.lib.json
@@ -62,6 +62,12 @@
"@spartacus/cart/wish-list": ["dist/cart/wish-list"],
"@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"],
"@spartacus/core": ["dist/core"],
+ "@spartacus/order/assets": ["dist/order/assets"],
+ "@spartacus/order/components": ["dist/order/components"],
+ "@spartacus/order/core": ["dist/order/core"],
+ "@spartacus/order": ["dist/order"],
+ "@spartacus/order/occ": ["dist/order/occ"],
+ "@spartacus/order/root": ["dist/order/root"],
"@spartacus/storefinder/assets": ["dist/storefinder/assets"],
"@spartacus/storefinder/components": ["dist/storefinder/components"],
"@spartacus/storefinder/core": ["dist/storefinder/core"],
@@ -81,13 +87,7 @@
"@spartacus/user/profile/core": ["dist/user/profile/core"],
"@spartacus/user/profile": ["dist/user/profile"],
"@spartacus/user/profile/occ": ["dist/user/profile/occ"],
- "@spartacus/user/profile/root": ["dist/user/profile/root"],
- "@spartacus/order/assets": ["dist/order/assets"],
- "@spartacus/order/components": ["dist/order/components"],
- "@spartacus/order/core": ["dist/order/core"],
- "@spartacus/order": ["dist/order"],
- "@spartacus/order/occ": ["dist/order/occ"],
- "@spartacus/order/root": ["dist/order/root"]
+ "@spartacus/user/profile/root": ["dist/user/profile/root"]
},
"strict": true
},
diff --git a/feature-libs/pickup-in-store/tsconfig.schematics.json b/feature-libs/pickup-in-store/tsconfig.schematics.json
index b745ab5c11e..0e4befc8a7b 100644
--- a/feature-libs/pickup-in-store/tsconfig.schematics.json
+++ b/feature-libs/pickup-in-store/tsconfig.schematics.json
@@ -406,6 +406,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -491,6 +506,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -528,6 +546,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/product-configurator/package.json b/feature-libs/product-configurator/package.json
index d8cb702f423..c92560dfcd8 100644
--- a/feature-libs/product-configurator/package.json
+++ b/feature-libs/product-configurator/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/product-configurator",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Product configurator feature library for Spartacus",
"keywords": [
"spartacus",
@@ -33,13 +33,13 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/checkout": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/checkout": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap
index 8401ae1c5ee..19148ba7c82 100644
--- a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap
+++ b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap
@@ -58,7 +58,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -303,7 +303,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -534,7 +534,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
})]
})
diff --git a/feature-libs/product-configurator/tsconfig.lib.json b/feature-libs/product-configurator/tsconfig.lib.json
index 367e3b22560..8bd6f6883a6 100644
--- a/feature-libs/product-configurator/tsconfig.lib.json
+++ b/feature-libs/product-configurator/tsconfig.lib.json
@@ -15,48 +15,6 @@
"types": [],
"lib": ["es2020", "dom"],
"paths": {
- "@spartacus/checkout": ["dist/checkout"],
- "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"],
- "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"],
- "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"],
- "@spartacus/checkout/b2b": ["dist/checkout/b2b"],
- "@spartacus/checkout/b2b/occ": ["dist/checkout/b2b/occ"],
- "@spartacus/checkout/b2b/root": ["dist/checkout/b2b/root"],
- "@spartacus/checkout/base/assets": ["dist/checkout/base/assets"],
- "@spartacus/checkout/base/components": ["dist/checkout/base/components"],
- "@spartacus/checkout/base/core": ["dist/checkout/base/core"],
- "@spartacus/checkout/base": ["dist/checkout/base"],
- "@spartacus/checkout/base/occ": ["dist/checkout/base/occ"],
- "@spartacus/checkout/base/root": ["dist/checkout/base/root"],
- "@spartacus/checkout/scheduled-replenishment/assets": [
- "dist/checkout/scheduled-replenishment/assets"
- ],
- "@spartacus/checkout/scheduled-replenishment/components": [
- "dist/checkout/scheduled-replenishment/components"
- ],
- "@spartacus/checkout/scheduled-replenishment": [
- "dist/checkout/scheduled-replenishment"
- ],
- "@spartacus/checkout/scheduled-replenishment/root": [
- "dist/checkout/scheduled-replenishment/root"
- ],
- "@spartacus/core": ["dist/core"],
- "@spartacus/storefront": ["dist/storefrontlib"],
- "@spartacus/order/assets": ["dist/order/assets"],
- "@spartacus/order/components": ["dist/order/components"],
- "@spartacus/order/core": ["dist/order/core"],
- "@spartacus/order": ["dist/order"],
- "@spartacus/order/occ": ["dist/order/occ"],
- "@spartacus/order/root": ["dist/order/root"],
- "@spartacus/cart/import-export/assets": [
- "dist/cart/import-export/assets"
- ],
- "@spartacus/cart/import-export/components": [
- "dist/cart/import-export/components"
- ],
- "@spartacus/cart/import-export/core": ["dist/cart/import-export/core"],
- "@spartacus/cart/import-export": ["dist/cart/import-export"],
- "@spartacus/cart/import-export/root": ["dist/cart/import-export/root"],
"@spartacus/cart/base/assets": ["dist/cart/base/assets"],
"@spartacus/cart/base/components/add-to-cart": [
"dist/cart/base/components/add-to-cart"
@@ -69,6 +27,15 @@
"@spartacus/cart/base": ["dist/cart/base"],
"@spartacus/cart/base/occ": ["dist/cart/base/occ"],
"@spartacus/cart/base/root": ["dist/cart/base/root"],
+ "@spartacus/cart/import-export/assets": [
+ "dist/cart/import-export/assets"
+ ],
+ "@spartacus/cart/import-export/components": [
+ "dist/cart/import-export/components"
+ ],
+ "@spartacus/cart/import-export/core": ["dist/cart/import-export/core"],
+ "@spartacus/cart/import-export": ["dist/cart/import-export"],
+ "@spartacus/cart/import-export/root": ["dist/cart/import-export/root"],
"@spartacus/cart": ["dist/cart"],
"@spartacus/cart/quick-order/assets": ["dist/cart/quick-order/assets"],
"@spartacus/cart/quick-order/components": [
@@ -95,6 +62,39 @@
"@spartacus/cart/wish-list/core": ["dist/cart/wish-list/core"],
"@spartacus/cart/wish-list": ["dist/cart/wish-list"],
"@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"],
+ "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"],
+ "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"],
+ "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"],
+ "@spartacus/checkout/b2b": ["dist/checkout/b2b"],
+ "@spartacus/checkout/b2b/occ": ["dist/checkout/b2b/occ"],
+ "@spartacus/checkout/b2b/root": ["dist/checkout/b2b/root"],
+ "@spartacus/checkout/base/assets": ["dist/checkout/base/assets"],
+ "@spartacus/checkout/base/components": ["dist/checkout/base/components"],
+ "@spartacus/checkout/base/core": ["dist/checkout/base/core"],
+ "@spartacus/checkout/base": ["dist/checkout/base"],
+ "@spartacus/checkout/base/occ": ["dist/checkout/base/occ"],
+ "@spartacus/checkout/base/root": ["dist/checkout/base/root"],
+ "@spartacus/checkout": ["dist/checkout"],
+ "@spartacus/checkout/scheduled-replenishment/assets": [
+ "dist/checkout/scheduled-replenishment/assets"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/components": [
+ "dist/checkout/scheduled-replenishment/components"
+ ],
+ "@spartacus/checkout/scheduled-replenishment": [
+ "dist/checkout/scheduled-replenishment"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/root": [
+ "dist/checkout/scheduled-replenishment/root"
+ ],
+ "@spartacus/core": ["dist/core"],
+ "@spartacus/order/assets": ["dist/order/assets"],
+ "@spartacus/order/components": ["dist/order/components"],
+ "@spartacus/order/core": ["dist/order/core"],
+ "@spartacus/order": ["dist/order"],
+ "@spartacus/order/occ": ["dist/order/occ"],
+ "@spartacus/order/root": ["dist/order/root"],
+ "@spartacus/storefront": ["dist/storefrontlib"],
"@spartacus/user/account/assets": ["dist/user/account/assets"],
"@spartacus/user/account/components": ["dist/user/account/components"],
"@spartacus/user/account/core": ["dist/user/account/core"],
diff --git a/feature-libs/product-configurator/tsconfig.schematics.json b/feature-libs/product-configurator/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/product-configurator/tsconfig.schematics.json
+++ b/feature-libs/product-configurator/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/product/package.json b/feature-libs/product/package.json
index e30e7d883eb..d05fcea3c57 100644
--- a/feature-libs/product/package.json
+++ b/feature-libs/product/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/product",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Product library for Spartacus",
"keywords": [
"spartacus",
@@ -29,10 +29,10 @@
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
"@angular/router": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap
index c0ca31940a6..c64f861dfdd 100644
--- a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap
+++ b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap
@@ -51,7 +51,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
@@ -266,7 +266,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu
},
}), provideConfig({
features: {
- level: '5.0'
+ level: '6.3'
}
}), provideConfig(defaultB2bOccConfig)]
})
diff --git a/feature-libs/product/tsconfig.schematics.json b/feature-libs/product/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/product/tsconfig.schematics.json
+++ b/feature-libs/product/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/qualtrics/package.json b/feature-libs/qualtrics/package.json
index b542a5e0d35..d957fc0a4fa 100644
--- a/feature-libs/qualtrics/package.json
+++ b/feature-libs/qualtrics/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/qualtrics",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Qualtrics library for Spartacus",
"keywords": [
"spartacus",
@@ -30,9 +30,9 @@
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/feature-libs/qualtrics/tsconfig.schematics.json b/feature-libs/qualtrics/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/qualtrics/tsconfig.schematics.json
+++ b/feature-libs/qualtrics/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/requested-delivery-date/.eslintrc.json b/feature-libs/requested-delivery-date/.eslintrc.json
new file mode 100644
index 00000000000..862b5a870b0
--- /dev/null
+++ b/feature-libs/requested-delivery-date/.eslintrc.json
@@ -0,0 +1,4 @@
+{
+ "extends": "../../.eslintrc.json",
+ "ignorePatterns": ["schematics/**/*.d.ts"]
+}
diff --git a/feature-libs/requested-delivery-date/README.md b/feature-libs/requested-delivery-date/README.md
new file mode 100644
index 00000000000..6e061e29cb4
--- /dev/null
+++ b/feature-libs/requested-delivery-date/README.md
@@ -0,0 +1,3 @@
+# Requested Delivery Date
+
+Requested Delivery Date allows customers to provide a delivery date for which the item would be needed. The minimum date would be fetched from the S/4 HANA system and used along with the Order.
diff --git a/feature-libs/requested-delivery-date/_index.scss b/feature-libs/requested-delivery-date/_index.scss
new file mode 100644
index 00000000000..86f72a0df42
--- /dev/null
+++ b/feature-libs/requested-delivery-date/_index.scss
@@ -0,0 +1,2 @@
+@import '@spartacus/styles/scss/core';
+@import './styles/index';
diff --git a/feature-libs/requested-delivery-date/assets/ng-package.json b/feature-libs/requested-delivery-date/assets/ng-package.json
new file mode 100644
index 00000000000..38e01ac17de
--- /dev/null
+++ b/feature-libs/requested-delivery-date/assets/ng-package.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ }
+}
diff --git a/feature-libs/requested-delivery-date/assets/public_api.ts b/feature-libs/requested-delivery-date/assets/public_api.ts
new file mode 100644
index 00000000000..f3d8f426ab4
--- /dev/null
+++ b/feature-libs/requested-delivery-date/assets/public_api.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './translations/translations';
diff --git a/feature-libs/requested-delivery-date/assets/translations/en/index.ts b/feature-libs/requested-delivery-date/assets/translations/en/index.ts
new file mode 100644
index 00000000000..6e31c96fd7b
--- /dev/null
+++ b/feature-libs/requested-delivery-date/assets/translations/en/index.ts
@@ -0,0 +1,11 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { requestedDeliveryDate } from './requested-delivery-date';
+
+export const en = {
+ requestedDeliveryDate,
+};
diff --git a/feature-libs/requested-delivery-date/assets/translations/en/requested-delivery-date.ts b/feature-libs/requested-delivery-date/assets/translations/en/requested-delivery-date.ts
new file mode 100644
index 00000000000..6d89369eac5
--- /dev/null
+++ b/feature-libs/requested-delivery-date/assets/translations/en/requested-delivery-date.ts
@@ -0,0 +1,14 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export const requestedDeliveryDate = {
+ requestedDeliveryDate: {
+ datePickerLabel: 'Request Delivery Date',
+ readOnlyTextLabel: 'Requested Delivery Date',
+ successMessage: 'Delivery Date updated successfully.',
+ errorMessage: 'Something went wrong. Unable to update the requested date.',
+ },
+};
diff --git a/feature-libs/requested-delivery-date/assets/translations/translations.ts b/feature-libs/requested-delivery-date/assets/translations/translations.ts
new file mode 100644
index 00000000000..ceded4e2c21
--- /dev/null
+++ b/feature-libs/requested-delivery-date/assets/translations/translations.ts
@@ -0,0 +1,17 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { TranslationChunksConfig, TranslationResources } from '@spartacus/core';
+import { en } from './en/index';
+
+export const requestedDeliveryDateTranslations: TranslationResources = {
+ en,
+};
+
+export const requestedDeliveryDateTranslationChunksConfig: TranslationChunksConfig =
+ {
+ requestedDeliveryDate: ['requestedDeliveryDate'],
+ };
diff --git a/feature-libs/requested-delivery-date/core/connectors/index.ts b/feature-libs/requested-delivery-date/core/connectors/index.ts
new file mode 100644
index 00000000000..aa0d3a7fbe4
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/connectors/index.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './requested-delivery-date.adapter';
+export * from './requested-delivery-date.connector';
diff --git a/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.adapter.ts b/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.adapter.ts
new file mode 100644
index 00000000000..0fb381574a7
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.adapter.ts
@@ -0,0 +1,18 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Observable } from 'rxjs';
+
+export abstract class RequestedDeliveryDateAdapter {
+ /**
+ * Abstract method used to set the requested delivery date for a cart entry
+ */
+ abstract setRequestedDeliveryDate(
+ userId: string,
+ cartId: string,
+ requestedDate: string
+ ): Observable<{}>;
+}
diff --git a/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.connector.spec.ts b/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.connector.spec.ts
new file mode 100644
index 00000000000..4fe26a9ab56
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.connector.spec.ts
@@ -0,0 +1,56 @@
+import { TestBed } from '@angular/core/testing';
+import { of } from 'rxjs';
+import { take } from 'rxjs/operators';
+import { RequestedDeliveryDateAdapter } from './requested-delivery-date.adapter';
+import { RequestedDeliveryDateConnector } from './requested-delivery-date.connector';
+import createSpy = jasmine.createSpy;
+
+const mockUserId = 'userId1';
+const mockCartId = '00012345';
+const mockRequestedDate = '15-09-2023';
+
+class MockRequestedDeliveryDateAdapter
+ implements Partial
+{
+ setRequestedDeliveryDate = createSpy(
+ 'RequestedDeliveryDateAdapter.setRequestedDeliveryDate'
+ ).and.callFake((_userId: string, _cartId: string, _date: Date) => of());
+}
+
+describe('RequestedDeliveryDateConnector', () => {
+ let service: RequestedDeliveryDateConnector;
+ let adapter: RequestedDeliveryDateAdapter;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [
+ RequestedDeliveryDateConnector,
+ {
+ provide: RequestedDeliveryDateAdapter,
+ useClass: MockRequestedDeliveryDateAdapter,
+ },
+ ],
+ });
+
+ service = TestBed.inject(RequestedDeliveryDateConnector);
+ adapter = TestBed.inject(RequestedDeliveryDateAdapter);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+
+ it('setRequestedDeliveryDate should call adapter', () => {
+ let result;
+ service
+ .setRequestedDeliveryDate(mockUserId, mockCartId, mockRequestedDate)
+ .pipe(take(1))
+ .subscribe((res) => (result = res));
+ expect(result).toBeUndefined();
+ expect(adapter.setRequestedDeliveryDate).toHaveBeenCalledWith(
+ mockUserId,
+ mockCartId,
+ mockRequestedDate
+ );
+ });
+});
diff --git a/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.connector.ts b/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.connector.ts
new file mode 100644
index 00000000000..e9b8359ad9a
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/connectors/requested-delivery-date.connector.ts
@@ -0,0 +1,24 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { RequestedDeliveryDateAdapter } from './requested-delivery-date.adapter';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class RequestedDeliveryDateConnector {
+ constructor(protected adapter: RequestedDeliveryDateAdapter) {}
+
+ public setRequestedDeliveryDate(
+ userId: string,
+ cartId: string,
+ requestedDate: string
+ ): Observable<{}> {
+ return this.adapter.setRequestedDeliveryDate(userId, cartId, requestedDate);
+ }
+}
diff --git a/feature-libs/requested-delivery-date/core/http-interceptors/bad-request/requested-delivery-date-badrequest.handler.spec.ts b/feature-libs/requested-delivery-date/core/http-interceptors/bad-request/requested-delivery-date-badrequest.handler.spec.ts
new file mode 100644
index 00000000000..edb25e19df4
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/http-interceptors/bad-request/requested-delivery-date-badrequest.handler.spec.ts
@@ -0,0 +1,64 @@
+import { HttpErrorResponse, HttpRequest } from '@angular/common/http';
+import { TestBed } from '@angular/core/testing';
+import {
+ GlobalMessageService,
+ GlobalMessageType,
+ HttpResponseStatus,
+} from '@spartacus/core';
+import { RequestedDeliveryDateBadRequestHandler } from './requested-delivery-date-badrequest.handler';
+
+class MockGlobalMessageService {
+ add() {}
+}
+
+const MockRequest = {} as HttpRequest;
+
+const MockRDDBadRequestResponse = {
+ error: {
+ errors: [
+ {
+ message: 'checkout.multi.requestedretrievaldatevalid.error',
+ type: 'ValidationError',
+ },
+ ],
+ },
+} as HttpErrorResponse;
+
+describe('RequestedDeliveryDateBadRequestHandler', () => {
+ let service: RequestedDeliveryDateBadRequestHandler;
+ let globalMessageService: GlobalMessageService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [
+ RequestedDeliveryDateBadRequestHandler,
+ {
+ provide: GlobalMessageService,
+ useClass: MockGlobalMessageService,
+ },
+ ],
+ });
+ service = TestBed.inject(RequestedDeliveryDateBadRequestHandler);
+ globalMessageService = TestBed.inject(GlobalMessageService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+
+ it('should register 400 responseStatus ', () => {
+ expect(service.responseStatus).toEqual(HttpResponseStatus.BAD_REQUEST);
+ });
+
+ it('should handle wrong date bad request', () => {
+ spyOn(globalMessageService, 'add');
+ service.handleError(MockRequest, MockRDDBadRequestResponse);
+
+ expect(globalMessageService.add).toHaveBeenCalledWith(
+ {
+ key: 'requestedDeliveryDate.errorMessage',
+ },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ });
+});
diff --git a/feature-libs/requested-delivery-date/core/http-interceptors/bad-request/requested-delivery-date-badrequest.handler.ts b/feature-libs/requested-delivery-date/core/http-interceptors/bad-request/requested-delivery-date-badrequest.handler.ts
new file mode 100644
index 00000000000..fdc07f28460
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/http-interceptors/bad-request/requested-delivery-date-badrequest.handler.ts
@@ -0,0 +1,49 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { HttpErrorResponse, HttpRequest } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import {
+ ErrorModel,
+ GlobalMessageType,
+ HttpErrorHandler,
+ HttpResponseStatus,
+ Priority,
+} from '@spartacus/core';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class RequestedDeliveryDateBadRequestHandler extends HttpErrorHandler {
+ responseStatus = HttpResponseStatus.BAD_REQUEST;
+
+ hasMatch(errorResponse: HttpErrorResponse): boolean {
+ return (
+ super.hasMatch(errorResponse) && this.getErrors(errorResponse)?.length > 0
+ );
+ }
+
+ handleError(request: HttpRequest, response: HttpErrorResponse) {
+ if (request && this.getErrors(response)?.length) {
+ this.globalMessageService.add(
+ { key: 'requestedDeliveryDate.errorMessage' },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ }
+ }
+
+ protected getErrors(response: HttpErrorResponse): ErrorModel[] {
+ return (response.error?.errors).filter(
+ (error: any) =>
+ error?.type === 'ValidationError' &&
+ error?.message === 'checkout.multi.requestedretrievaldatevalid.error'
+ );
+ }
+
+ getPriority(): Priority {
+ return Priority.NORMAL;
+ }
+}
diff --git a/feature-libs/requested-delivery-date/core/http-interceptors/index.ts b/feature-libs/requested-delivery-date/core/http-interceptors/index.ts
new file mode 100644
index 00000000000..59dc0b1a99d
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/http-interceptors/index.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './bad-request/requested-delivery-date-badrequest.handler';
diff --git a/feature-libs/requested-delivery-date/core/ng-package.json b/feature-libs/requested-delivery-date/core/ng-package.json
new file mode 100644
index 00000000000..38e01ac17de
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/ng-package.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ }
+}
diff --git a/feature-libs/requested-delivery-date/core/public_api.ts b/feature-libs/requested-delivery-date/core/public_api.ts
new file mode 100644
index 00000000000..68e7d9884cc
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/public_api.ts
@@ -0,0 +1,10 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './connectors';
+export * from './requested-delivery-date-core.module';
+export * from './services/index';
diff --git a/feature-libs/requested-delivery-date/core/requested-delivery-date-core.module.ts b/feature-libs/requested-delivery-date/core/requested-delivery-date-core.module.ts
new file mode 100644
index 00000000000..aba8955e922
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/requested-delivery-date-core.module.ts
@@ -0,0 +1,30 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule } from '@angular/core';
+import { HttpErrorHandler } from '@spartacus/core';
+import { RequestedDeliveryDateFacade } from '@spartacus/requested-delivery-date/root';
+import { RequestedDeliveryDateConnector } from './connectors/requested-delivery-date.connector';
+import { RequestedDeliveryDateBadRequestHandler } from './http-interceptors/bad-request/requested-delivery-date-badrequest.handler';
+import { RequestedDeliveryDateService } from './services';
+
+@NgModule({
+ imports: [],
+ providers: [
+ RequestedDeliveryDateService,
+ {
+ provide: RequestedDeliveryDateFacade,
+ useExisting: RequestedDeliveryDateService,
+ },
+ {
+ provide: HttpErrorHandler,
+ useExisting: RequestedDeliveryDateBadRequestHandler,
+ multi: true,
+ },
+ RequestedDeliveryDateConnector,
+ ],
+})
+export class RequestedDeliveryDateCoreModule {}
diff --git a/feature-libs/requested-delivery-date/core/services/index.ts b/feature-libs/requested-delivery-date/core/services/index.ts
new file mode 100644
index 00000000000..ebfd31df225
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/services/index.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './requested-delivery-date.service';
diff --git a/feature-libs/requested-delivery-date/core/services/requested-delivery-date.service.spec.ts b/feature-libs/requested-delivery-date/core/services/requested-delivery-date.service.spec.ts
new file mode 100644
index 00000000000..ff56059dc10
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/services/requested-delivery-date.service.spec.ts
@@ -0,0 +1,61 @@
+import { TestBed } from '@angular/core/testing';
+import { of } from 'rxjs';
+import { RequestedDeliveryDateConnector } from '../connectors/requested-delivery-date.connector';
+import { RequestedDeliveryDateService } from './requested-delivery-date.service';
+
+import createSpy = jasmine.createSpy;
+
+const mockUserId = 'userId1';
+const mockCartId = '00012345';
+const mockRequestedDate = '15-09-2023';
+
+class MockRequestedDeliveryDateConnector
+ implements Partial
+{
+ setRequestedDeliveryDate = createSpy().and.callFake(() => of());
+}
+
+describe('RequestedDeliveryDateService', () => {
+ let service: RequestedDeliveryDateService;
+ let connector: RequestedDeliveryDateConnector;
+
+ describe('Current user', () => {
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [
+ RequestedDeliveryDateService,
+ {
+ provide: RequestedDeliveryDateConnector,
+ useClass: MockRequestedDeliveryDateConnector,
+ },
+ ],
+ });
+
+ service = TestBed.inject(RequestedDeliveryDateService);
+ connector = TestBed.inject(RequestedDeliveryDateConnector);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+
+ it('should set requested delivery date', () => {
+ let result;
+ service
+ .setRequestedDeliveryDate(mockUserId, mockCartId, mockRequestedDate)
+ .subscribe((data) => {
+ result = data;
+ })
+ .unsubscribe();
+ expect(result).toBeUndefined();
+ });
+
+ it('should call connector', () => {
+ service
+ .setRequestedDeliveryDate(mockUserId, mockCartId, mockRequestedDate)
+ .subscribe(() => {})
+ .unsubscribe();
+ expect(connector.setRequestedDeliveryDate).toHaveBeenCalled();
+ });
+ });
+});
diff --git a/feature-libs/requested-delivery-date/core/services/requested-delivery-date.service.ts b/feature-libs/requested-delivery-date/core/services/requested-delivery-date.service.ts
new file mode 100644
index 00000000000..328968dd441
--- /dev/null
+++ b/feature-libs/requested-delivery-date/core/services/requested-delivery-date.service.ts
@@ -0,0 +1,34 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Injectable } from '@angular/core';
+import { RequestedDeliveryDateFacade } from '@spartacus/requested-delivery-date/root';
+import { Observable } from 'rxjs';
+import { RequestedDeliveryDateConnector } from '../connectors/requested-delivery-date.connector';
+
+@Injectable()
+export class RequestedDeliveryDateService
+ implements RequestedDeliveryDateFacade
+{
+ /**
+ * Set requested delivery date
+ */
+ setRequestedDeliveryDate(
+ userId: string,
+ cartId: string,
+ requestedDate: string
+ ): Observable<{}> {
+ return this.requestedDeliveryDateConnector.setRequestedDeliveryDate(
+ userId,
+ cartId,
+ requestedDate
+ );
+ }
+
+ constructor(
+ protected requestedDeliveryDateConnector: RequestedDeliveryDateConnector
+ ) {}
+}
diff --git a/feature-libs/requested-delivery-date/jest.schematics.config.js b/feature-libs/requested-delivery-date/jest.schematics.config.js
new file mode 100644
index 00000000000..9d613f804c1
--- /dev/null
+++ b/feature-libs/requested-delivery-date/jest.schematics.config.js
@@ -0,0 +1,36 @@
+const { pathsToModuleNameMapper } = require('ts-jest');
+const { compilerOptions } = require('./tsconfig.schematics.json');
+const { defaultTransformerOptions } = require('jest-preset-angular/presets');
+
+/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
+module.exports = {
+ preset: 'jest-preset-angular',
+ globalSetup: 'jest-preset-angular/global-setup',
+ moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
+ prefix: '/',
+ }),
+ setupFilesAfterEnv: ['/setup-jest.ts'],
+ testMatch: ['**/+(*_)+(spec).+(ts)'],
+ transform: {
+ '^.+\\.(ts|js|mjs|html|svg)$': [
+ 'jest-preset-angular',
+ {
+ ...defaultTransformerOptions,
+ tsconfig: '/tsconfig.schematics.json',
+ },
+ ],
+ },
+
+ collectCoverage: false,
+ coverageReporters: ['json', 'lcov', 'text', 'clover'],
+ coverageDirectory:
+ '/../../coverage/requested-delivery-date/schematics',
+ coverageThreshold: {
+ global: {
+ statements: 90,
+ branches: 90,
+ functions: 90,
+ lines: 90,
+ },
+ },
+};
diff --git a/feature-libs/requested-delivery-date/karma.conf.js b/feature-libs/requested-delivery-date/karma.conf.js
new file mode 100644
index 00000000000..e451c881c40
--- /dev/null
+++ b/feature-libs/requested-delivery-date/karma.conf.js
@@ -0,0 +1,50 @@
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['parallel', 'jasmine', '@angular-devkit/build-angular'],
+ plugins: [
+ require('karma-parallel'),
+ require('karma-jasmine'),
+ require('karma-coverage'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('@angular-devkit/build-angular/plugins/karma'),
+ ],
+ parallelOptions: {
+ executors: 2,
+ shardStrategy: 'round-robin',
+ },
+ client: {
+ clearContext: false, // leave Jasmine Spec Runner output visible in browser
+ jasmine: {
+ random: false,
+ },
+ },
+ reporters: ['progress', 'kjhtml', 'dots'],
+ coverageReporter: {
+ dir: require('path').join(
+ __dirname,
+ '../../coverage/requested-delivery-date'
+ ),
+ reporters: [{ type: 'lcov', subdir: '.' }, { type: 'text-summary' }],
+ check: {
+ global: {
+ statements: 90,
+ lines: 90,
+ branches: 75,
+ functions: 85,
+ },
+ },
+ },
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false,
+ restartOnFileChange: true,
+ });
+};
diff --git a/feature-libs/requested-delivery-date/ng-package.json b/feature-libs/requested-delivery-date/ng-package.json
new file mode 100644
index 00000000000..d12af3d785d
--- /dev/null
+++ b/feature-libs/requested-delivery-date/ng-package.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
+ "dest": "../../dist/requested-delivery-date",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ },
+ "assets": ["**/*.scss", "schematics/**/*.json", "schematics/**/*.js"]
+}
diff --git a/feature-libs/requested-delivery-date/occ/adapters/index.ts b/feature-libs/requested-delivery-date/occ/adapters/index.ts
new file mode 100644
index 00000000000..8b47daab834
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/adapters/index.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './occ-requested-delivery-date.adapter';
diff --git a/feature-libs/requested-delivery-date/occ/adapters/occ-requested-delivery-date.adapter.spec.ts b/feature-libs/requested-delivery-date/occ/adapters/occ-requested-delivery-date.adapter.spec.ts
new file mode 100644
index 00000000000..e65f66370c7
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/adapters/occ-requested-delivery-date.adapter.spec.ts
@@ -0,0 +1,107 @@
+import { HttpClient, HttpErrorResponse } from '@angular/common/http';
+import {
+ HttpClientTestingModule,
+ HttpTestingController,
+} from '@angular/common/http/testing';
+import { TestBed } from '@angular/core/testing';
+import { HttpErrorModel, OccConfig, OccEndpoints } from '@spartacus/core';
+import { throwError } from 'rxjs';
+import { take } from 'rxjs/operators';
+import { OccRequestedDeliveryDateAdapter } from './occ-requested-delivery-date.adapter';
+
+const mockUserId = 'userId1';
+const mockCartId = '00012345';
+const mockRequestedDate = '15-09-2023';
+
+const MockOccModuleConfig: OccConfig = {
+ backend: {
+ occ: {
+ baseUrl: '',
+ prefix: '',
+ endpoints: {
+ requestedDeliveryDate:
+ 'users/${userId}/carts/${cartId}/requestedretrievaldate',
+ } as OccEndpoints,
+ },
+ },
+ context: {
+ baseSite: [''],
+ },
+};
+
+const mockValidationError = new HttpErrorResponse({
+ error: {
+ errors: [
+ {
+ message: 'checkout.multi.requestedretrievaldatevalid.error',
+ reason: 'invalid',
+ type: 'ValidationError',
+ },
+ ],
+ },
+});
+
+describe('OccRequestedDeliveryDateAdapter', () => {
+ let service: OccRequestedDeliveryDateAdapter;
+ let httpClient: HttpClient;
+ let httpMock: HttpTestingController;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [
+ OccRequestedDeliveryDateAdapter,
+ { provide: OccConfig, useValue: MockOccModuleConfig },
+ ],
+ });
+ service = TestBed.inject(OccRequestedDeliveryDateAdapter);
+ httpClient = TestBed.inject(HttpClient);
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+
+ afterEach(() => {
+ httpMock.verify();
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+
+ describe(`set requested delivery date`, () => {
+ it(`should set requested delivery date for cart for given user id, cart id`, (done) => {
+ service
+ .setRequestedDeliveryDate(mockUserId, mockCartId, mockRequestedDate)
+ .pipe(take(1))
+ .subscribe((result) => {
+ expect(result).toEqual('');
+ done();
+ });
+
+ const mockReq = httpMock.expectOne((req) => {
+ return (
+ req.method === 'PUT' &&
+ req.url ===
+ `users/${mockUserId}/carts/${mockCartId}/requestedretrievaldate?requestedRetrievalAt=${mockRequestedDate}`
+ );
+ });
+
+ expect(mockReq.cancelled).toBeFalsy();
+ mockReq.flush('');
+ expect(mockReq.request.responseType).toEqual('json');
+ });
+
+ it(`should result in error when Validation Error is thrown`, () => {
+ spyOn(httpClient, 'put').and.returnValue(throwError(mockValidationError));
+
+ let result: HttpErrorModel | undefined;
+ const subscription = service
+ .setRequestedDeliveryDate(mockUserId, mockCartId, mockRequestedDate)
+ .pipe(take(1))
+ .subscribe({ error: (err: any) => (result = err) });
+
+ expect(result).toEqual(mockValidationError);
+
+ subscription.unsubscribe();
+ });
+ });
+});
diff --git a/feature-libs/requested-delivery-date/occ/adapters/occ-requested-delivery-date.adapter.ts b/feature-libs/requested-delivery-date/occ/adapters/occ-requested-delivery-date.adapter.ts
new file mode 100644
index 00000000000..6e484dd5ef5
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/adapters/occ-requested-delivery-date.adapter.ts
@@ -0,0 +1,45 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { HttpClient, HttpHeaders } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import {
+ InterceptorUtil,
+ OccEndpointsService,
+ USE_CLIENT_TOKEN,
+} from '@spartacus/core';
+import { RequestedDeliveryDateAdapter } from '@spartacus/requested-delivery-date/core';
+
+@Injectable()
+export class OccRequestedDeliveryDateAdapter
+ implements RequestedDeliveryDateAdapter
+{
+ constructor(
+ protected http: HttpClient,
+ protected occEndpoints: OccEndpointsService
+ ) {}
+
+ setRequestedDeliveryDate(
+ userId: string,
+ cartId: string,
+ requestedRetrievalAt: string
+ ) {
+ let headers = new HttpHeaders({
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ });
+ headers = InterceptorUtil.createHeader(USE_CLIENT_TOKEN, true, headers);
+
+ const url = this.occEndpoints.buildUrl('requestedDeliveryDate', {
+ urlParams: {
+ userId,
+ cartId,
+ },
+ queryParams: { requestedRetrievalAt },
+ });
+
+ return this.http.put(url, { headers });
+ }
+}
diff --git a/feature-libs/requested-delivery-date/occ/config/default-occ-requested-delivery-date-config.ts b/feature-libs/requested-delivery-date/occ/config/default-occ-requested-delivery-date-config.ts
new file mode 100644
index 00000000000..df99c19a8be
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/config/default-occ-requested-delivery-date-config.ts
@@ -0,0 +1,18 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { OccConfig } from '@spartacus/core';
+
+export const defaultOccRequestedDeliveryDateConfig: OccConfig = {
+ backend: {
+ occ: {
+ endpoints: {
+ requestedDeliveryDate:
+ 'users/${userId}/carts/${cartId}/requestedretrievaldate',
+ },
+ },
+ },
+};
diff --git a/feature-libs/requested-delivery-date/occ/model/index.ts b/feature-libs/requested-delivery-date/occ/model/index.ts
new file mode 100644
index 00000000000..5b7bb4ef8f5
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/model/index.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+// Imported for side effects (module augmentation)
+import './occ-requested-delivery-date-endpoints.model';
diff --git a/feature-libs/requested-delivery-date/occ/model/occ-requested-delivery-date-endpoints.model.ts b/feature-libs/requested-delivery-date/occ/model/occ-requested-delivery-date-endpoints.model.ts
new file mode 100644
index 00000000000..fdec787b0a2
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/model/occ-requested-delivery-date-endpoints.model.ts
@@ -0,0 +1,18 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { OccEndpoint } from '@spartacus/core';
+
+declare module '@spartacus/core' {
+ interface OccEndpoints {
+ /**
+ * Endpoint for requested delivery date
+ *
+ * @member {string}
+ */
+ requestedDeliveryDate?: string | OccEndpoint;
+ }
+}
diff --git a/feature-libs/requested-delivery-date/occ/ng-package.json b/feature-libs/requested-delivery-date/occ/ng-package.json
new file mode 100644
index 00000000000..38e01ac17de
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/ng-package.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ }
+}
diff --git a/feature-libs/requested-delivery-date/occ/public_api.ts b/feature-libs/requested-delivery-date/occ/public_api.ts
new file mode 100644
index 00000000000..0ca2932226d
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/public_api.ts
@@ -0,0 +1,9 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './adapters/index';
+export * from './model/index';
+export * from './requested-delivery-date-occ.module';
diff --git a/feature-libs/requested-delivery-date/occ/requested-delivery-date-occ.module.ts b/feature-libs/requested-delivery-date/occ/requested-delivery-date-occ.module.ts
new file mode 100644
index 00000000000..59c4a8808fd
--- /dev/null
+++ b/feature-libs/requested-delivery-date/occ/requested-delivery-date-occ.module.ts
@@ -0,0 +1,24 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { CommonModule } from '@angular/common';
+import { NgModule } from '@angular/core';
+import { provideDefaultConfig } from '@spartacus/core';
+import { RequestedDeliveryDateAdapter } from '@spartacus/requested-delivery-date/core';
+import { OccRequestedDeliveryDateAdapter } from './adapters/occ-requested-delivery-date.adapter';
+import { defaultOccRequestedDeliveryDateConfig } from './config/default-occ-requested-delivery-date-config';
+
+@NgModule({
+ imports: [CommonModule],
+ providers: [
+ provideDefaultConfig(defaultOccRequestedDeliveryDateConfig),
+ {
+ provide: RequestedDeliveryDateAdapter,
+ useClass: OccRequestedDeliveryDateAdapter,
+ },
+ ],
+})
+export class RequestedDeliveryDateOccModule {}
diff --git a/feature-libs/requested-delivery-date/package.json b/feature-libs/requested-delivery-date/package.json
new file mode 100644
index 00000000000..cbeacc85e4a
--- /dev/null
+++ b/feature-libs/requested-delivery-date/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "@spartacus/requested-delivery-date",
+ "version": "6.3.0-1",
+ "description": "Requested Delivery Date library for Spartacus",
+ "keywords": [
+ "spartacus",
+ "framework",
+ "storefront",
+ "requested-delivery-date"
+ ],
+ "homepage": "https://github.com/SAP/spartacus",
+ "repository": "https://github.com/SAP/spartacus/tree/develop/feature-libs/requested-delivery-date",
+ "license": "Apache-2.0",
+ "exports": {
+ ".": {
+ "sass": "./_index.scss"
+ }
+ },
+ "scripts": {
+ "build:schematics": "npm run clean:schematics && ../../node_modules/.bin/tsc -p ./tsconfig.schematics.json",
+ "clean:schematics": "../../node_modules/.bin/rimraf --glob \"schematics/**/*.js\" \"schematics/**/*.js.map\" \"schematics/**/*.d.ts\"",
+ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js"
+ },
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "@angular-devkit/schematics": "^15.2.4",
+ "@angular/common": "^15.2.4",
+ "@angular/core": "^15.2.4",
+ "@angular/forms": "^15.2.4",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/checkout": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "rxjs": "^6.6.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "schematics": "./schematics/collection.json"
+}
diff --git a/feature-libs/requested-delivery-date/project.json b/feature-libs/requested-delivery-date/project.json
new file mode 100644
index 00000000000..9d42bce5e90
--- /dev/null
+++ b/feature-libs/requested-delivery-date/project.json
@@ -0,0 +1,40 @@
+{
+ "name": "requested-delivery-date",
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
+ "projectType": "library",
+ "sourceRoot": "feature-libs/requested-delivery-date",
+ "prefix": "cx",
+ "targets": {
+ "build": {
+ "executor": "./tools/build-lib:augmented-types",
+ "options": {
+ "tsConfig": "feature-libs/requested-delivery-date/tsconfig.lib.json",
+ "project": "feature-libs/requested-delivery-date/ng-package.json"
+ },
+ "configurations": {
+ "production": {
+ "tsConfig": "feature-libs/requested-delivery-date/tsconfig.lib.prod.json"
+ }
+ }
+ },
+ "test": {
+ "executor": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "feature-libs/requested-delivery-date/test.ts",
+ "tsConfig": "feature-libs/requested-delivery-date/tsconfig.spec.json",
+ "polyfills": ["zone.js", "zone.js/testing"],
+ "karmaConfig": "feature-libs/requested-delivery-date/karma.conf.js"
+ }
+ },
+ "lint": {
+ "executor": "@angular-eslint/builder:lint",
+ "options": {
+ "lintFilePatterns": [
+ "feature-libs/requested-delivery-date/**/*.ts",
+ "feature-libs/requested-delivery-date/**/*.html"
+ ]
+ }
+ }
+ },
+ "tags": ["type:feature"]
+}
diff --git a/feature-libs/requested-delivery-date/public_api.ts b/feature-libs/requested-delivery-date/public_api.ts
new file mode 100644
index 00000000000..1076e3d5a24
--- /dev/null
+++ b/feature-libs/requested-delivery-date/public_api.ts
@@ -0,0 +1,10 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/*
+ * Public API Surface of requested-delivery-date
+ */
+export * from './requested-delivery-date.module';
diff --git a/feature-libs/requested-delivery-date/requested-delivery-date.module.ts b/feature-libs/requested-delivery-date/requested-delivery-date.module.ts
new file mode 100644
index 00000000000..3f262129034
--- /dev/null
+++ b/feature-libs/requested-delivery-date/requested-delivery-date.module.ts
@@ -0,0 +1,15 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule } from '@angular/core';
+import { RequestedDeliveryDateCoreModule } from '@spartacus/requested-delivery-date/core';
+import { RequestedDeliveryDateOccModule } from '@spartacus/requested-delivery-date/occ';
+
+@NgModule({
+ imports: [RequestedDeliveryDateCoreModule, RequestedDeliveryDateOccModule],
+})
+export class RequestedDeliveryDateModule {}
diff --git a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.html b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.html
new file mode 100644
index 00000000000..1429921411c
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
diff --git a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts
new file mode 100644
index 00000000000..2341afccc78
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.spec.ts
@@ -0,0 +1,286 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { By } from '@angular/platform-browser';
+import {
+ CxDatePipe,
+ EventService,
+ GlobalMessageService,
+ GlobalMessageType,
+ I18nTestingModule,
+ LanguageService,
+ TranslationService,
+} from '@spartacus/core';
+import {
+ Card,
+ CardModule,
+ DatePickerModule,
+ OutletContextData,
+} from '@spartacus/storefront';
+import { of, throwError } from 'rxjs';
+import { RequestedDeliveryDateFacade } from '../../facade/requested-delivery-date.facade';
+import { DeliveryModeDatePickerComponent } from './delivery-mode-date-picker.component';
+
+describe('DeliveryModeDatePickerComponent', () => {
+ let component: DeliveryModeDatePickerComponent;
+ let fixture: ComponentFixture;
+
+ const requestedDelDateFacadeMock = {
+ setRequestedDeliveryDate: jasmine
+ .createSpy('setRequestedDeliveryDate')
+ .and.returnValue(of({})),
+ };
+
+ const mockedGlobalMessageService = {
+ add: () => {},
+ remove: () => {},
+ };
+
+ const mockLanguageService = {
+ getActive: () => of('en'),
+ };
+
+ const translationServiceMock = {
+ translate: jasmine
+ .createSpy('translate')
+ .and.returnValue(of('Delivery Date')),
+ };
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [DeliveryModeDatePickerComponent],
+ imports: [I18nTestingModule, DatePickerModule, CardModule],
+ providers: [
+ CxDatePipe,
+ EventService,
+ {
+ provide: RequestedDeliveryDateFacade,
+ useValue: requestedDelDateFacadeMock,
+ },
+ { provide: GlobalMessageService, useValue: mockedGlobalMessageService },
+ { provide: TranslationService, useValue: translationServiceMock },
+ { provide: LanguageService, useValue: mockLanguageService },
+ {
+ provide: OutletContextData,
+ useValue: {
+ context: undefined,
+ },
+ },
+ ],
+ }).compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(DeliveryModeDatePickerComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ afterEach(() => {
+ fixture.destroy();
+ });
+
+ it('should create the component', () => {
+ expect(component).toBeTruthy();
+ });
+
+ describe('Render the component based on the Outlet Context readonly attribute', () => {
+ it('should display card with translated text when outlet context readonly attribute is true', () => {
+ const data = TestBed.inject(OutletContextData);
+ const isoDate = '2023-09-15';
+ const formattedDate = 'Sep 15, 2023';
+ data.context$ = of({
+ item: {
+ requestedRetrievalAt: isoDate,
+ earliestRetrievalAt: isoDate,
+ },
+ readonly: true,
+ });
+ const textTitle = 'Delivery Date';
+
+ component.ngOnInit();
+ fixture.detectChanges();
+
+ let card: Card = {};
+ component
+ .getRequestedDeliveryDateCardContent(isoDate)
+ .subscribe((result) => {
+ card = result;
+ });
+
+ const expectedCard: Card = {
+ text: [textTitle, isoDate],
+ };
+
+ expect(card).toBeTruthy();
+ expect(card).toEqual(expectedCard);
+
+ const cardElement = fixture.debugElement.query(
+ By.css('.cx-card-label:first-child')
+ )?.nativeElement;
+ const cardText = fixture.debugElement.query(
+ By.css('cx-card > div > div > div > div > div:nth-child(2) > div')
+ )?.nativeElement;
+
+ expect(cardElement.textContent).toContain(textTitle);
+ expect(cardText.textContent).toContain(formattedDate);
+ });
+
+ it('should display date picker component when outlet context readonly attribute is false', () => {
+ const data = TestBed.inject(OutletContextData);
+ const earliestDate = '2023-03-05';
+ const requestedDate = '2023-09-15';
+
+ data.context$ = of({
+ item: {
+ requestedRetrievalAt: requestedDate,
+ earliestRetrievalAt: earliestDate,
+ },
+ readonly: false,
+ });
+ const datePickerLab = 'requestedDeliveryDate.datePickerLabel';
+
+ component.ngOnInit();
+ fixture.detectChanges();
+
+ const datePickerLabelEl = fixture.debugElement.query(
+ By.css('form > label > div')
+ )?.nativeElement;
+ const datePickerEl = fixture.debugElement.query(
+ By.css('cx-date-picker')
+ )?.nativeElement;
+
+ expect(datePickerLabelEl.textContent).toContain(datePickerLab);
+ expect(datePickerEl.innerHTML).toContain('min="2023-03-05"');
+ expect(component['form'].get('requestDeliveryDate')?.value).toBeTruthy();
+ });
+ });
+
+ it('should initialize form with requestedRetrievalAt value', () => {
+ const requestedRetrievalAt = '2023-09-15';
+ component['cartEntry'] = {
+ requestedRetrievalAt,
+ } as any;
+ component.ngOnInit();
+ expect(component['form'].get('requestDeliveryDate')?.value).toEqual(
+ requestedRetrievalAt
+ );
+ });
+
+ it('should set requestedRetrievalAt with earliestRetrievalAt if requestedRetrievalAt is not present', () => {
+ const earliestRetrievalAt = '2023-09-15';
+ component['cartEntry'] = {
+ earliestRetrievalAt,
+ code: '123',
+ user: {
+ uid: 'current',
+ },
+ } as any;
+ component.ngOnInit();
+ expect(component['requestedRetrievalAt']).toEqual(earliestRetrievalAt);
+ expect(component['form'].get('requestDeliveryDate')?.value).toEqual(
+ earliestRetrievalAt
+ );
+ expect(
+ component['requestedDelDateFacade'].setRequestedDeliveryDate
+ ).toHaveBeenCalled();
+ });
+
+ it('should call setRequestedDeliveryDate when form value changes and show info message on success', (done) => {
+ spyOn(component['globalMessageService'], 'add');
+ const requestedRetrievalAt = '2023-05-03';
+ const earliestRetrievalAt = '2023-09-15';
+ const data = TestBed.inject(OutletContextData);
+ data.context$ = of({
+ item: {
+ requestedRetrievalAt,
+ earliestRetrievalAt,
+ code: '123',
+ user: {
+ uid: 'current',
+ },
+ },
+ readonly: false,
+ });
+
+ component.ngOnInit();
+ fixture.detectChanges();
+ const newRequestedRetrievalAt = '2023-09-15';
+ component['form'].patchValue({
+ requestDeliveryDate: newRequestedRetrievalAt,
+ });
+
+ //Manually trigger change event for date picker.
+ const event = new Event('update');
+ const datePickerEl: HTMLInputElement = fixture.debugElement.query(
+ By.css('cx-date-picker')
+ )?.nativeElement;
+ datePickerEl.dispatchEvent(event);
+
+ expect(
+ component['requestedDelDateFacade'].setRequestedDeliveryDate
+ ).toHaveBeenCalled();
+ component['requestedDelDateFacade']
+ .setRequestedDeliveryDate('current', '123', newRequestedRetrievalAt)
+ .subscribe(() => {
+ expect(component['globalMessageService'].add).toHaveBeenCalledWith(
+ { key: 'requestedDeliveryDate.successMessage' },
+ GlobalMessageType.MSG_TYPE_INFO
+ );
+ done();
+ });
+ });
+
+ it('should show error message when backend OCC API returns UnknownResourceError', (done) => {
+ spyOn(component['globalMessageService'], 'add');
+
+ component['requestedDelDateFacade'].setRequestedDeliveryDate = jasmine
+ .createSpy('setRequestedDeliveryDate')
+ .and.returnValue(
+ throwError({
+ error: {
+ errors: [
+ {
+ message:
+ 'There is no resource for path /occ/v2/powertools-spa/users/user.lname%40sap-cx.com/carts/0000003004/requestedretrievaldate',
+ type: 'UnknownResourceError',
+ },
+ ],
+ },
+ })
+ );
+
+ const earliestRetrievalAt = '2023-09-15';
+ component['cartEntry'] = {
+ earliestRetrievalAt,
+ code: '123',
+ user: {
+ uid: 'current',
+ },
+ } as any;
+ component.ngOnInit();
+ expect(component['requestedRetrievalAt']).toEqual(earliestRetrievalAt);
+ expect(component['form'].get('requestDeliveryDate')?.value).toEqual(
+ earliestRetrievalAt
+ );
+ expect(
+ component['requestedDelDateFacade'].setRequestedDeliveryDate
+ ).toHaveBeenCalled();
+
+ component['requestedDelDateFacade']
+ .setRequestedDeliveryDate('current', '123', earliestRetrievalAt)
+ .subscribe({
+ error: () => {
+ expect(component['globalMessageService'].add).toHaveBeenCalledWith(
+ { key: 'requestedDeliveryDate.errorMessage' },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ done();
+ },
+ });
+ });
+
+ it('should unsubscribe from subscription on component destruction', () => {
+ spyOn(component['subscription'], 'unsubscribe');
+ component.ngOnDestroy();
+ expect(component['subscription'].unsubscribe).toHaveBeenCalled();
+ });
+});
diff --git a/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts
new file mode 100644
index 00000000000..5911eedb6fa
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/delivery-mode-date-picker/delivery-mode-date-picker.component.ts
@@ -0,0 +1,154 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { HttpErrorResponse } from '@angular/common/http';
+import { Component, OnDestroy, OnInit, Optional } from '@angular/core';
+import { FormControl, FormGroup } from '@angular/forms';
+import { Cart } from '@spartacus/cart/base/root';
+import { CheckoutSupportedDeliveryModesQueryReloadEvent } from '@spartacus/checkout/base/root';
+import {
+ CxDatePipe,
+ ErrorModel,
+ EventService,
+ GlobalMessageService,
+ GlobalMessageType,
+ TranslationService,
+} from '@spartacus/core';
+import { Card, OutletContextData } from '@spartacus/storefront';
+import { Observable, Subscription } from 'rxjs';
+import { filter, map } from 'rxjs/operators';
+import { RequestedDeliveryDateFacade } from '../../facade/requested-delivery-date.facade';
+import { DateValidationService } from '../shared/date-validation.service';
+
+@Component({
+ selector: 'cx-request-delivery-date',
+ templateUrl: './delivery-mode-date-picker.component.html',
+ providers: [CxDatePipe],
+})
+export class DeliveryModeDatePickerComponent implements OnInit, OnDestroy {
+ constructor(
+ protected datePipe: CxDatePipe,
+ protected requestedDelDateFacade: RequestedDeliveryDateFacade,
+ protected dateValidationService: DateValidationService,
+ protected eventService: EventService,
+ protected translation: TranslationService,
+ protected globalMessageService: GlobalMessageService,
+ @Optional() protected deliveryOutlet?: OutletContextData
+ ) {}
+
+ protected cartEntry: Cart = {};
+ protected subscription = new Subscription();
+
+ protected earliestRetrievalAt: string | undefined;
+ protected requestedRetrievalAt: string | undefined;
+ protected form: FormGroup = new FormGroup({
+ requestDeliveryDate: new FormControl(),
+ });
+ protected isDatePickerReadOnly: boolean = true;
+
+ ngOnInit(): void {
+ if (this.deliveryOutlet?.context$) {
+ this.subscription.add(
+ this.deliveryOutlet.context$.subscribe((context) => {
+ this.cartEntry = context?.item;
+ this.isDatePickerReadOnly = context?.readonly || false;
+ })
+ );
+ }
+
+ if (this.isEarliestRetrievalDatePresent()) {
+ this.earliestRetrievalAt = this.cartEntry.earliestRetrievalAt;
+ }
+ if (this.isRequestedDeliveryDatePresent()) {
+ this.requestedRetrievalAt = this.cartEntry.requestedRetrievalAt;
+ } else {
+ //set the value of requestedRetrievalAt as earliestRetrievalAt and update occ.
+ this.requestedRetrievalAt = this.earliestRetrievalAt;
+ this.setRequestedDeliveryDate();
+ }
+ this.form.patchValue({
+ requestDeliveryDate: this.requestedRetrievalAt,
+ });
+ }
+
+ isEarliestRetrievalDatePresent(): boolean {
+ return this.dateValidationService.isDateStringValid(
+ this.cartEntry?.earliestRetrievalAt
+ );
+ }
+
+ isRequestedDeliveryDatePresent(): boolean {
+ return this.dateValidationService.isDateStringValid(
+ this.cartEntry?.requestedRetrievalAt
+ );
+ }
+
+ getRequestedDeliveryDateCardContent(
+ isoDate: string | null
+ ): Observable {
+ return this.translation
+ .translate('requestedDeliveryDate.readOnlyTextLabel')
+ .pipe(
+ filter(() => Boolean(isoDate)),
+ map((textTitle) => {
+ return {
+ text: [textTitle, isoDate],
+ } as Card;
+ })
+ );
+ }
+
+ setRequestedDeliveryDate() {
+ const userId = this.cartEntry?.user?.uid || '';
+ const cartId = this.cartEntry?.code || '';
+ const requestedDate =
+ this.form?.get('requestDeliveryDate')?.value ||
+ this.requestedRetrievalAt ||
+ '';
+
+ if (
+ userId.length === 0 ||
+ cartId.length === 0 ||
+ requestedDate.length === 0
+ ) {
+ return;
+ }
+ this.subscription.add(
+ this.requestedDelDateFacade
+ .setRequestedDeliveryDate(userId, cartId, requestedDate)
+ .subscribe({
+ next: () => {
+ this.eventService.dispatch(
+ {},
+ CheckoutSupportedDeliveryModesQueryReloadEvent
+ );
+ this.globalMessageService.add(
+ { key: 'requestedDeliveryDate.successMessage' },
+ GlobalMessageType.MSG_TYPE_INFO
+ );
+ },
+ error: (error: HttpErrorResponse) => {
+ if (error && this.getErrors(error)?.length) {
+ this.globalMessageService.add(
+ { key: 'requestedDeliveryDate.errorMessage' },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ }
+ },
+ })
+ );
+ }
+
+ getErrors(response: HttpErrorResponse): ErrorModel[] {
+ return (response.error?.errors).filter(
+ (error: any) => error?.type === 'UnknownResourceError'
+ );
+ }
+
+ ngOnDestroy(): void {
+ this.subscription.unsubscribe();
+ }
+}
diff --git a/feature-libs/requested-delivery-date/root/components/index.ts b/feature-libs/requested-delivery-date/root/components/index.ts
new file mode 100644
index 00000000000..d2c7af18ba0
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/index.ts
@@ -0,0 +1,9 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './delivery-mode-date-picker/delivery-mode-date-picker.component';
+export * from './order-overview-delivery-date/order-overview-delivery-date.component';
+export * from './requested-delivery-date-components.module';
diff --git a/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.html b/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.html
new file mode 100644
index 00000000000..a85f0c6d637
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.html
@@ -0,0 +1,8 @@
+
+
+
diff --git a/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.spec.ts b/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.spec.ts
new file mode 100644
index 00000000000..9511956fff4
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.spec.ts
@@ -0,0 +1,69 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { I18nTestingModule, TranslationService } from '@spartacus/core';
+import { Card, OutletContextData } from '@spartacus/storefront';
+import { of } from 'rxjs';
+import { OrderOverviewDeliveryDateComponent } from './order-overview-delivery-date.component';
+
+describe('OrderOverviewDeliveryDateComponent', () => {
+ let component: OrderOverviewDeliveryDateComponent;
+ let fixture: ComponentFixture;
+
+ const translationServiceMock = {
+ translate: jasmine
+ .createSpy('translate')
+ .and.returnValue(of('Translated Text')),
+ };
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [OrderOverviewDeliveryDateComponent],
+ imports: [I18nTestingModule],
+ providers: [
+ { provide: TranslationService, useValue: translationServiceMock },
+ ],
+ }).compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(OrderOverviewDeliveryDateComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ afterEach(() => {
+ fixture.destroy();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+
+ it('should set order property when context changes', () => {
+ const order = { code: '123' } as any;
+ component['orderOutlet'] = {
+ context$: of({ item: order }),
+ } as OutletContextData;
+ component.ngOnInit();
+ expect(component.order).toEqual(order);
+ });
+
+ it('should return card content with translated text and isoDate', () => {
+ const isoDate = '2022-01-01';
+ const expectedCard: Card = {
+ title: 'Translated Text',
+ text: [isoDate],
+ };
+
+ const result$ = component.getRequestedDeliveryDateCardContent(isoDate);
+
+ result$.subscribe((card) => {
+ expect(card).toEqual(expectedCard);
+ });
+ });
+
+ it('should unsubscribe from subscription on component destruction', () => {
+ spyOn(component['subscription'], 'unsubscribe');
+ component.ngOnDestroy();
+ expect(component['subscription'].unsubscribe).toHaveBeenCalled();
+ });
+});
diff --git a/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.ts b/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.ts
new file mode 100644
index 00000000000..1520459a195
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/order-overview-delivery-date/order-overview-delivery-date.component.ts
@@ -0,0 +1,64 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Component, OnDestroy, OnInit, Optional } from '@angular/core';
+import { TranslationService } from '@spartacus/core';
+import { Order } from '@spartacus/order/root';
+import { Card, OutletContextData } from '@spartacus/storefront';
+import { Observable, Subscription } from 'rxjs';
+import { filter, map } from 'rxjs/operators';
+import { DateValidationService } from '../shared/date-validation.service';
+
+@Component({
+ selector: 'cx-order-overview-delivery-date',
+ templateUrl: './order-overview-delivery-date.component.html',
+})
+export class OrderOverviewDeliveryDateComponent implements OnInit, OnDestroy {
+ constructor(
+ protected dateValidationService: DateValidationService,
+ protected translation: TranslationService,
+ @Optional() protected orderOutlet?: OutletContextData
+ ) {}
+
+ protected subscription = new Subscription();
+ order: Order;
+
+ ngOnInit(): void {
+ if (this.orderOutlet?.context$) {
+ this.subscription.add(
+ this.orderOutlet.context$.subscribe(
+ (context) => (this.order = context?.item)
+ )
+ );
+ }
+ }
+
+ isRequestedDeliveryDatePresent(): boolean {
+ return this.dateValidationService.isDateStringValid(
+ this.order?.requestedRetrievalAt
+ );
+ }
+
+ getRequestedDeliveryDateCardContent(
+ isoDate: string | null
+ ): Observable {
+ return this.translation
+ .translate('requestedDeliveryDate.readOnlyTextLabel')
+ .pipe(
+ filter(() => Boolean(isoDate)),
+ map((textTitle) => {
+ return {
+ title: textTitle,
+ text: [isoDate],
+ } as Card;
+ })
+ );
+ }
+
+ ngOnDestroy(): void {
+ this.subscription.unsubscribe();
+ }
+}
diff --git a/feature-libs/requested-delivery-date/root/components/requested-delivery-date-components.module.ts b/feature-libs/requested-delivery-date/root/components/requested-delivery-date-components.module.ts
new file mode 100644
index 00000000000..a844ca1effc
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/requested-delivery-date-components.module.ts
@@ -0,0 +1,32 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { CommonModule } from '@angular/common';
+import { NgModule } from '@angular/core';
+import { ReactiveFormsModule } from '@angular/forms';
+import { I18nModule } from '@spartacus/core';
+import { CardModule, DatePickerModule } from '@spartacus/storefront';
+import { DeliveryModeDatePickerComponent } from './delivery-mode-date-picker/delivery-mode-date-picker.component';
+import { OrderOverviewDeliveryDateComponent } from './order-overview-delivery-date/order-overview-delivery-date.component';
+
+@NgModule({
+ imports: [
+ CommonModule,
+ DatePickerModule,
+ I18nModule,
+ ReactiveFormsModule,
+ CardModule,
+ ],
+ declarations: [
+ DeliveryModeDatePickerComponent,
+ OrderOverviewDeliveryDateComponent,
+ ],
+ exports: [
+ DeliveryModeDatePickerComponent,
+ OrderOverviewDeliveryDateComponent,
+ ],
+})
+export class RequestedDeliveryDateComponentsModule {}
diff --git a/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts
new file mode 100644
index 00000000000..5e947fcaca0
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.spec.ts
@@ -0,0 +1,35 @@
+import { TestBed } from '@angular/core/testing';
+import { DateValidationService } from './date-validation.service';
+
+const mockValidDate = '15-09-2023';
+const mockInvalidDate1 = '32-09-2023';
+const mockInvalidDate2 = '29-02-rddo';
+const mockInvalidDate3 = '';
+const mockInvalidDate4 = 'abcd';
+
+describe('DateValidationService', () => {
+ let service: DateValidationService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ providers: [DateValidationService],
+ });
+
+ service = TestBed.inject(DateValidationService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+
+ it('should validate correct Dates', () => {
+ expect(service.isDateStringValid(mockValidDate)).toBeTruthy();
+ });
+
+ it('should invalidate wrong Dates', () => {
+ expect(service.isDateStringValid(mockInvalidDate1)).toBeFalsy();
+ expect(service.isDateStringValid(mockInvalidDate2)).toBeFalsy();
+ expect(service.isDateStringValid(mockInvalidDate3)).toBeFalsy();
+ expect(service.isDateStringValid(mockInvalidDate4)).toBeFalsy();
+ });
+});
diff --git a/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts
new file mode 100644
index 00000000000..2410013bd29
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/components/shared/date-validation.service.ts
@@ -0,0 +1,28 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Injectable } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class DateValidationService {
+ /**
+ * Validates if the string is containing a date string.
+ * @param value Date string in the format 'dd-mm-yyy'
+ * @returns true if valid, false if invalid
+ */
+ isDateStringValid(value: string | undefined): boolean {
+ return (
+ value != null &&
+ value !== undefined &&
+ value.length > 0 &&
+ !isNaN(
+ new Date(value.replace(/(\d{2})-(\d{2})-(\d{4})/, '$2/$1/$3')).getDate() //convert 'dd-mm-yyyy' into 'mm/dd/yyyy'
+ )
+ );
+ }
+}
diff --git a/feature-libs/requested-delivery-date/root/facade/index.ts b/feature-libs/requested-delivery-date/root/facade/index.ts
new file mode 100644
index 00000000000..e4a8bad6ac2
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/facade/index.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './requested-delivery-date.facade';
diff --git a/feature-libs/requested-delivery-date/root/facade/requested-delivery-date.facade.ts b/feature-libs/requested-delivery-date/root/facade/requested-delivery-date.facade.ts
new file mode 100644
index 00000000000..1fea680bbf3
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/facade/requested-delivery-date.facade.ts
@@ -0,0 +1,33 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Injectable } from '@angular/core';
+import { facadeFactory } from '@spartacus/core';
+import { Observable } from 'rxjs';
+import { REQUESTED_DELIVERY_DATE_FEATURE } from '../feature-name';
+
+export function requestedDeliveryDateFacadeFactory() {
+ return facadeFactory({
+ facade: RequestedDeliveryDateFacade,
+ feature: REQUESTED_DELIVERY_DATE_FEATURE,
+ methods: ['setRequestedDeliveryDate'],
+ });
+}
+
+@Injectable({
+ providedIn: 'root',
+ useFactory: requestedDeliveryDateFacadeFactory,
+})
+export abstract class RequestedDeliveryDateFacade {
+ /**
+ * Set the requested delivery date
+ */
+ abstract setRequestedDeliveryDate(
+ userId: string,
+ cartId: string,
+ requestedDate: string
+ ): Observable<{}>;
+}
diff --git a/feature-libs/requested-delivery-date/root/feature-name.ts b/feature-libs/requested-delivery-date/root/feature-name.ts
new file mode 100644
index 00000000000..de942fd4fbb
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/feature-name.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export const REQUESTED_DELIVERY_DATE_FEATURE = 'requestedDeliveryDate';
+export const REQUESTED_DELIVERY_DATE_CORE_FEATURE = 'requestedDeliveryDateCore';
diff --git a/feature-libs/requested-delivery-date/root/model/augmented-core.model.ts b/feature-libs/requested-delivery-date/root/model/augmented-core.model.ts
new file mode 100644
index 00000000000..13494181400
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/model/augmented-core.model.ts
@@ -0,0 +1,21 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import '@spartacus/cart/base/root';
+import '@spartacus/order/root';
+
+declare module '@spartacus/cart/base/root' {
+ interface Cart {
+ earliestRetrievalAt?: string;
+ requestedRetrievalAt?: string;
+ }
+}
+
+declare module '@spartacus/order/root' {
+ interface Order {
+ requestedRetrievalAt?: string;
+ }
+}
diff --git a/feature-libs/requested-delivery-date/root/model/index.ts b/feature-libs/requested-delivery-date/root/model/index.ts
new file mode 100644
index 00000000000..1b216202084
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/model/index.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+// Imported for side effects (module augmentation)
+import './augmented-core.model';
diff --git a/feature-libs/requested-delivery-date/root/ng-package.json b/feature-libs/requested-delivery-date/root/ng-package.json
new file mode 100644
index 00000000000..38e01ac17de
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/ng-package.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ }
+}
diff --git a/feature-libs/requested-delivery-date/root/public_api.ts b/feature-libs/requested-delivery-date/root/public_api.ts
new file mode 100644
index 00000000000..f20c3d9911d
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/public_api.ts
@@ -0,0 +1,12 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './components/index'; //Make components available without being CMS driven
+export * from './facade/index';
+export * from './feature-name';
+export * from './model/index';
+export * from './requested-delivery-date-root.module';
diff --git a/feature-libs/requested-delivery-date/root/requested-delivery-date-root.module.ts b/feature-libs/requested-delivery-date/root/requested-delivery-date-root.module.ts
new file mode 100644
index 00000000000..47fbc3bef9d
--- /dev/null
+++ b/feature-libs/requested-delivery-date/root/requested-delivery-date-root.module.ts
@@ -0,0 +1,51 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule } from '@angular/core';
+import { CartOutlets } from '@spartacus/cart/base/root';
+import { CmsConfig, provideDefaultConfigFactory } from '@spartacus/core';
+import { OutletPosition, provideOutlet } from '@spartacus/storefront';
+import { DeliveryModeDatePickerComponent } from './components/delivery-mode-date-picker/delivery-mode-date-picker.component';
+import { OrderOverviewDeliveryDateComponent } from './components/order-overview-delivery-date/order-overview-delivery-date.component';
+import {
+ REQUESTED_DELIVERY_DATE_CORE_FEATURE,
+ REQUESTED_DELIVERY_DATE_FEATURE,
+} from './feature-name';
+
+export function defaultRequestedDeliveryDateComponentsConfig(): CmsConfig {
+ const config: CmsConfig = {
+ featureModules: {
+ [REQUESTED_DELIVERY_DATE_FEATURE]: {
+ cmsComponents: [
+ 'DeliveryModeDatePickerComponent',
+ 'OrderOverviewDeliveryDateComponent',
+ ],
+ },
+ // by default core is bundled together with components
+ [REQUESTED_DELIVERY_DATE_CORE_FEATURE]: REQUESTED_DELIVERY_DATE_FEATURE,
+ },
+ };
+
+ return config;
+}
+
+@NgModule({
+ providers: [
+ provideOutlet({
+ id: CartOutlets.DELIVERY_MODE,
+ position: OutletPosition.AFTER,
+ component: DeliveryModeDatePickerComponent,
+ }),
+ provideOutlet({
+ id: CartOutlets.ORDER_OVERVIEW,
+ position: OutletPosition.AFTER,
+ component: OrderOverviewDeliveryDateComponent,
+ }),
+ provideDefaultConfigFactory(defaultRequestedDeliveryDateComponentsConfig),
+ ],
+})
+export class RequestedDeliveryDateRootModule {}
diff --git a/feature-libs/requested-delivery-date/schematics/.gitignore b/feature-libs/requested-delivery-date/schematics/.gitignore
new file mode 100644
index 00000000000..c88f4d69e15
--- /dev/null
+++ b/feature-libs/requested-delivery-date/schematics/.gitignore
@@ -0,0 +1,18 @@
+# Outputs
+**/*.js
+**/*.js.map
+**/*.d.ts
+
+# IDEs
+.idea/
+jsconfig.json
+.vscode/
+
+# Misc
+node_modules/
+npm-debug.log*
+yarn-error.log*
+
+# Mac OSX Finder files.
+**/.DS_Store
+.DS_Store
diff --git a/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/__snapshots__/index_spec.ts.snap b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/__snapshots__/index_spec.ts.snap
new file mode 100644
index 00000000000..621f8c67463
--- /dev/null
+++ b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/__snapshots__/index_spec.ts.snap
@@ -0,0 +1,130 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Spartacus Requested Delivery Date schematics: ng-add Requested Delivery Date feature eager loading should import appropriate modules 1`] = `""`;
+
+exports[`Spartacus Requested Delivery Date schematics: ng-add Requested Delivery Date feature general setup should add the feature using the lazy loading syntax 1`] = `""`;
+
+exports[`Spartacus Requested Delivery Date schematics: ng-add Requested Delivery Date feature general setup styling should create a proper scss file 1`] = `
+"@import "../../styles-config";
+@import "@spartacus/requested-delivery-date";
+"
+`;
+
+exports[`Spartacus Requested Delivery Date schematics: ng-add Requested Delivery Date feature general setup styling should update angular.json 1`] = `
+"{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "",
+ "projects": {
+ "schematics-test": {
+ "projectType": "application",
+ "schematics": {
+ "@schematics/angular:component": {
+ "style": "scss"
+ }
+ },
+ "root": "",
+ "sourceRoot": "src",
+ "prefix": "app",
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:browser",
+ "options": {
+ "outputPath": "dist/schematics-test",
+ "index": "src/index.html",
+ "main": "src/main.ts",
+ "polyfills": [
+ "zone.js"
+ ],
+ "tsConfig": "tsconfig.app.json",
+ "inlineStyleLanguage": "scss",
+ "assets": [
+ "src/favicon.ico",
+ "src/assets"
+ ],
+ "styles": [
+ "src/styles.scss",
+ "src/styles/spartacus/requested-delivery-date.scss"
+ ],
+ "scripts": [],
+ "stylePreprocessorOptions": {
+ "includePaths": [
+ "node_modules/"
+ ]
+ }
+ },
+ "configurations": {
+ "production": {
+ "budgets": [
+ {
+ "type": "initial",
+ "maximumWarning": "500kb",
+ "maximumError": "2.5mb"
+ },
+ {
+ "type": "anyComponentStyle",
+ "maximumWarning": "2kb",
+ "maximumError": "4kb"
+ }
+ ],
+ "outputHashing": "all"
+ },
+ "development": {
+ "buildOptimizer": false,
+ "optimization": false,
+ "vendorChunk": true,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "namedChunks": true
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "builder": "@angular-devkit/build-angular:dev-server",
+ "configurations": {
+ "production": {
+ "browserTarget": "schematics-test:build:production"
+ },
+ "development": {
+ "browserTarget": "schematics-test:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
+ },
+ "extract-i18n": {
+ "builder": "@angular-devkit/build-angular:extract-i18n",
+ "options": {
+ "browserTarget": "schematics-test:build"
+ }
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "polyfills": [
+ "zone.js",
+ "zone.js/testing"
+ ],
+ "tsConfig": "tsconfig.spec.json",
+ "inlineStyleLanguage": "scss",
+ "assets": [
+ "src/favicon.ico",
+ "src/assets"
+ ],
+ "styles": [
+ "src/styles.scss",
+ "src/styles/spartacus/requested-delivery-date.scss"
+ ],
+ "scripts": [],
+ "stylePreprocessorOptions": {
+ "includePaths": [
+ "node_modules/"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+}"
+`;
diff --git a/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/index.ts b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/index.ts
new file mode 100644
index 00000000000..36117e0edf7
--- /dev/null
+++ b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/index.ts
@@ -0,0 +1,46 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {
+ chain,
+ Rule,
+ SchematicContext,
+ Tree,
+} from '@angular-devkit/schematics';
+import {
+ addFeatures,
+ addPackageJsonDependenciesForLibrary,
+ analyzeApplication,
+ analyzeCrossFeatureDependencies,
+ finalizeInstallation,
+ LibraryOptions as SpartacusRequestedDeliveryDateOptions,
+ readPackageJson,
+ validateSpartacusInstallation,
+} from '@spartacus/schematics';
+import { peerDependencies } from '../../package.json';
+
+export function addRequestedDeliveryDateFeature(
+ options: SpartacusRequestedDeliveryDateOptions
+): Rule {
+ return (tree: Tree, _context: SchematicContext): Rule => {
+ const packageJson = readPackageJson(tree);
+ validateSpartacusInstallation(packageJson);
+
+ const features = analyzeCrossFeatureDependencies(
+ options.features as string[]
+ );
+
+ return chain([
+ analyzeApplication(options, features),
+
+ addFeatures(options, features),
+ addPackageJsonDependenciesForLibrary(peerDependencies, options),
+
+ finalizeInstallation(options, features),
+ ]);
+ };
+}
diff --git a/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/index_spec.ts b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/index_spec.ts
new file mode 100644
index 00000000000..cff43d68f33
--- /dev/null
+++ b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/index_spec.ts
@@ -0,0 +1,181 @@
+///
+
+import {
+ SchematicTestRunner,
+ UnitTestTree,
+} from '@angular-devkit/schematics/testing';
+import {
+ Schema as ApplicationOptions,
+ Style,
+} from '@schematics/angular/application/schema';
+import { Schema as WorkspaceOptions } from '@schematics/angular/workspace/schema';
+import {
+ LibraryOptions as RequestedDeliveryDateOptions,
+ requestedDeliveryDateFeatureModulePath,
+ REQUESTED_DELIVERY_DATE_FEATURE_NAME,
+ SpartacusOptions,
+ SPARTACUS_REQUESTED_DELIVERY_DATE,
+ SPARTACUS_SCHEMATICS,
+} from '@spartacus/schematics';
+import * as path from 'path';
+import { peerDependencies } from '../../package.json';
+
+const collectionPath = path.join(__dirname, '../collection.json');
+const scssFilePath = 'src/styles/spartacus/requested-delivery-date.scss';
+
+describe('Spartacus Requested Delivery Date schematics: ng-add', () => {
+ const schematicRunner = new SchematicTestRunner(
+ SPARTACUS_REQUESTED_DELIVERY_DATE,
+ collectionPath
+ );
+
+ let appTree: UnitTestTree;
+
+ const workspaceOptions: WorkspaceOptions = {
+ name: 'workspace',
+ version: '0.5.0',
+ };
+
+ const appOptions: ApplicationOptions = {
+ name: 'schematics-test',
+ inlineStyle: false,
+ inlineTemplate: false,
+ routing: false,
+ style: Style.Scss,
+ skipTests: false,
+ projectRoot: '',
+ };
+
+ const spartacusDefaultOptions: SpartacusOptions = {
+ project: 'schematics-test',
+ lazy: true,
+ features: [],
+ };
+
+ const libraryNoFeaturesOptions: RequestedDeliveryDateOptions = {
+ project: 'schematics-test',
+ lazy: true,
+ features: [],
+ };
+
+ const rddOptions: RequestedDeliveryDateOptions = {
+ ...libraryNoFeaturesOptions,
+ features: [REQUESTED_DELIVERY_DATE_FEATURE_NAME],
+ };
+
+ beforeEach(async () => {
+ schematicRunner.registerCollection(
+ SPARTACUS_SCHEMATICS,
+ '../../projects/schematics/src/collection.json'
+ );
+
+ appTree = await schematicRunner.runExternalSchematic(
+ '@schematics/angular',
+ 'workspace',
+ workspaceOptions
+ );
+
+ appTree = await schematicRunner.runExternalSchematic(
+ '@schematics/angular',
+ 'application',
+ appOptions,
+ appTree
+ );
+
+ appTree = await schematicRunner.runExternalSchematic(
+ SPARTACUS_SCHEMATICS,
+ 'ng-add',
+ { ...spartacusDefaultOptions, name: 'schematics-test' },
+ appTree
+ );
+ });
+
+ describe('Without features', () => {
+ beforeEach(async () => {
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ libraryNoFeaturesOptions,
+ appTree
+ );
+ });
+
+ it('should not create any of the feature modules', () => {
+ expect(
+ appTree.exists(requestedDeliveryDateFeatureModulePath)
+ ).toBeFalsy();
+ });
+
+ it('should install necessary Spartacus libraries', () => {
+ const packageJson = JSON.parse(appTree.readContent('package.json'));
+ let dependencies: Record = {};
+ dependencies = { ...packageJson.dependencies };
+ dependencies = { ...dependencies, ...packageJson.devDependencies };
+
+ for (const toAdd in peerDependencies) {
+ // skip the SPARTACUS_SCHEMATICS, as those are added only when running by the Angular CLI, and not in the testing environment
+ if (
+ !peerDependencies.hasOwnProperty(toAdd) ||
+ toAdd === SPARTACUS_SCHEMATICS
+ ) {
+ continue;
+ }
+ // TODO: after 4.0: use this test, as we'll have synced versions between lib's and root package.json
+ // const expectedVersion = (peerDependencies as Record<
+ // string,
+ // string
+ // >)[toAdd];
+ const expectedDependency = dependencies[toAdd];
+ expect(expectedDependency).toBeTruthy();
+ // expect(expectedDependency).toEqual(expectedVersion);
+ }
+ });
+ });
+
+ describe('Requested Delivery Date feature', () => {
+ describe('general setup', () => {
+ beforeEach(async () => {
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ rddOptions,
+ appTree
+ );
+ });
+
+ it('should add the feature using the lazy loading syntax', async () => {
+ const module = appTree.readContent(
+ requestedDeliveryDateFeatureModulePath
+ );
+ expect(module).toMatchSnapshot();
+ });
+
+ describe('styling', () => {
+ it('should create a proper scss file', () => {
+ const scssContent = appTree.readContent(scssFilePath);
+ expect(scssContent).toMatchSnapshot();
+ });
+
+ it('should update angular.json', async () => {
+ const content = appTree.readContent('/angular.json');
+ expect(content).toMatchSnapshot();
+ });
+ });
+ });
+
+ describe('eager loading', () => {
+ beforeEach(async () => {
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ { ...rddOptions, lazy: false },
+ appTree
+ );
+ });
+
+ it('should import appropriate modules', async () => {
+ const module = appTree.readContent(
+ requestedDeliveryDateFeatureModulePath
+ );
+ expect(module).toMatchSnapshot();
+ });
+ });
+ });
+});
diff --git a/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/schema.json b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/schema.json
new file mode 100644
index 00000000000..536d90100ba
--- /dev/null
+++ b/feature-libs/requested-delivery-date/schematics/add-requested-delivery-date/schema.json
@@ -0,0 +1,31 @@
+{
+ "$schema": "http://json-schema.org/schema",
+ "$id": "RequestedDeliveryDateSchematics",
+ "title": "Requested Delivery Date Schematics",
+ "type": "object",
+ "properties": {
+ "project": {
+ "type": "string",
+ "description": "The name of the project.",
+ "$default": {
+ "$source": "projectName"
+ }
+ },
+ "debug": {
+ "description": "Display additional details during the running process.",
+ "type": "boolean",
+ "default": false
+ },
+ "lazy": {
+ "type": "boolean",
+ "description": "Lazy load the Requested Delivery Date.",
+ "default": true
+ },
+ "features": {
+ "type": "array",
+ "uniqueItems": true,
+ "default": ["Requested-Delivery-Date"]
+ }
+ },
+ "required": []
+}
diff --git a/feature-libs/requested-delivery-date/schematics/collection.json b/feature-libs/requested-delivery-date/schematics/collection.json
new file mode 100644
index 00000000000..6c428a2907e
--- /dev/null
+++ b/feature-libs/requested-delivery-date/schematics/collection.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
+ "schematics": {
+ "ng-add": {
+ "factory": "./add-requested-delivery-date/index#addRequestedDeliveryDateFeature",
+ "description": "Add Requested Delivery Date feature",
+ "schema": "./add-requested-delivery-date/schema.json",
+ "private": true,
+ "hidden": true,
+ "aliases": ["install"]
+ },
+ "add": {
+ "factory": "./add-requested-delivery-date/index#addRequestedDeliveryDateFeature",
+ "description": "Add and configure Requested Delivery Date feature",
+ "schema": "./add-requested-delivery-date/schema.json"
+ }
+ }
+}
diff --git a/feature-libs/requested-delivery-date/setup-jest.ts b/feature-libs/requested-delivery-date/setup-jest.ts
new file mode 100644
index 00000000000..919fe8743ac
--- /dev/null
+++ b/feature-libs/requested-delivery-date/setup-jest.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import 'jest-preset-angular/setup-jest';
+import 'zone.js';
diff --git a/feature-libs/requested-delivery-date/styles/_index.scss b/feature-libs/requested-delivery-date/styles/_index.scss
new file mode 100644
index 00000000000..93340d0a5ca
--- /dev/null
+++ b/feature-libs/requested-delivery-date/styles/_index.scss
@@ -0,0 +1 @@
+@import './requested-delivery-date';
diff --git a/feature-libs/requested-delivery-date/styles/_requested-delivery-date.scss b/feature-libs/requested-delivery-date/styles/_requested-delivery-date.scss
new file mode 100644
index 00000000000..267824bf4bb
--- /dev/null
+++ b/feature-libs/requested-delivery-date/styles/_requested-delivery-date.scss
@@ -0,0 +1,25 @@
+cx-request-delivery-date {
+ form {
+ width: 100%;
+ }
+
+ cx-card {
+ .cx-card {
+ .card-body {
+ padding-top: 0;
+ }
+ }
+ }
+}
+
+// Avoid bottom padding in the delivery method, as the padding
+// would add extra space with the delivey mode date picker
+.cx-review-card-shipping {
+ cx-card {
+ .cx-card {
+ .card-body {
+ padding-bottom: 0;
+ }
+ }
+ }
+}
diff --git a/feature-libs/requested-delivery-date/test.ts b/feature-libs/requested-delivery-date/test.ts
new file mode 100644
index 00000000000..bd3bae74074
--- /dev/null
+++ b/feature-libs/requested-delivery-date/test.ts
@@ -0,0 +1,22 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting,
+} from '@angular/platform-browser-dynamic/testing';
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting(),
+ {
+ teardown: { destroyAfterEach: false },
+ }
+);
diff --git a/feature-libs/requested-delivery-date/tsconfig.lib.json b/feature-libs/requested-delivery-date/tsconfig.lib.json
new file mode 100644
index 00000000000..78d0becdbd7
--- /dev/null
+++ b/feature-libs/requested-delivery-date/tsconfig.lib.json
@@ -0,0 +1,124 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/lib",
+ "declarationMap": true,
+ "forceConsistentCasingInFileNames": true,
+ "target": "es2020",
+ "module": "es2020",
+ "moduleResolution": "node",
+ "declaration": true,
+ "sourceMap": true,
+ "inlineSources": true,
+ "experimentalDecorators": true,
+ "emitDecoratorMetadata": true,
+ "importHelpers": true,
+ "types": [],
+ "lib": ["dom", "esnext"],
+ "strict": true,
+ "paths": {
+ "@spartacus/cart/base/assets": ["dist/cart/base/assets"],
+ "@spartacus/cart/base/components/add-to-cart": [
+ "dist/cart/base/components/add-to-cart"
+ ],
+ "@spartacus/cart/base/components/mini-cart": [
+ "dist/cart/base/components/mini-cart"
+ ],
+ "@spartacus/cart/base/components": ["dist/cart/base/components"],
+ "@spartacus/cart/base/core": ["dist/cart/base/core"],
+ "@spartacus/cart/base": ["dist/cart/base"],
+ "@spartacus/cart/base/occ": ["dist/cart/base/occ"],
+ "@spartacus/cart/base/root": ["dist/cart/base/root"],
+ "@spartacus/cart/import-export/assets": [
+ "dist/cart/import-export/assets"
+ ],
+ "@spartacus/cart/import-export/components": [
+ "dist/cart/import-export/components"
+ ],
+ "@spartacus/cart/import-export/core": ["dist/cart/import-export/core"],
+ "@spartacus/cart/import-export": ["dist/cart/import-export"],
+ "@spartacus/cart/import-export/root": ["dist/cart/import-export/root"],
+ "@spartacus/cart": ["dist/cart"],
+ "@spartacus/cart/quick-order/assets": ["dist/cart/quick-order/assets"],
+ "@spartacus/cart/quick-order/components": [
+ "dist/cart/quick-order/components"
+ ],
+ "@spartacus/cart/quick-order/core": ["dist/cart/quick-order/core"],
+ "@spartacus/cart/quick-order": ["dist/cart/quick-order"],
+ "@spartacus/cart/quick-order/root": ["dist/cart/quick-order/root"],
+ "@spartacus/cart/saved-cart/assets": ["dist/cart/saved-cart/assets"],
+ "@spartacus/cart/saved-cart/components": [
+ "dist/cart/saved-cart/components"
+ ],
+ "@spartacus/cart/saved-cart/core": ["dist/cart/saved-cart/core"],
+ "@spartacus/cart/saved-cart": ["dist/cart/saved-cart"],
+ "@spartacus/cart/saved-cart/occ": ["dist/cart/saved-cart/occ"],
+ "@spartacus/cart/saved-cart/root": ["dist/cart/saved-cart/root"],
+ "@spartacus/cart/wish-list/assets": ["dist/cart/wish-list/assets"],
+ "@spartacus/cart/wish-list/components/add-to-wishlist": [
+ "dist/cart/wish-list/components/add-to-wishlist"
+ ],
+ "@spartacus/cart/wish-list/components": [
+ "dist/cart/wish-list/components"
+ ],
+ "@spartacus/cart/wish-list/core": ["dist/cart/wish-list/core"],
+ "@spartacus/cart/wish-list": ["dist/cart/wish-list"],
+ "@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"],
+ "@spartacus/core": ["dist/core"],
+ "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"],
+ "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"],
+ "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"],
+ "@spartacus/checkout/b2b": ["dist/checkout/b2b"],
+ "@spartacus/checkout/b2b/occ": ["dist/checkout/b2b/occ"],
+ "@spartacus/checkout/b2b/root": ["dist/checkout/b2b/root"],
+ "@spartacus/checkout/base/assets": ["dist/checkout/base/assets"],
+ "@spartacus/checkout/base/components": ["dist/checkout/base/components"],
+ "@spartacus/checkout/base/core": ["dist/checkout/base/core"],
+ "@spartacus/checkout/base": ["dist/checkout/base"],
+ "@spartacus/checkout/base/occ": ["dist/checkout/base/occ"],
+ "@spartacus/checkout/base/root": ["dist/checkout/base/root"],
+ "@spartacus/checkout": ["dist/checkout"],
+ "@spartacus/checkout/scheduled-replenishment/assets": [
+ "dist/checkout/scheduled-replenishment/assets"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/components": [
+ "dist/checkout/scheduled-replenishment/components"
+ ],
+ "@spartacus/checkout/scheduled-replenishment": [
+ "dist/checkout/scheduled-replenishment"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/root": [
+ "dist/checkout/scheduled-replenishment/root"
+ ],
+ "@spartacus/order/assets": ["dist/order/assets"],
+ "@spartacus/order/components": ["dist/order/components"],
+ "@spartacus/order/core": ["dist/order/core"],
+ "@spartacus/order": ["dist/order"],
+ "@spartacus/order/occ": ["dist/order/occ"],
+ "@spartacus/order/root": ["dist/order/root"],
+ "@spartacus/storefront": ["dist/storefrontlib"],
+ "@spartacus/user/account/assets": ["dist/user/account/assets"],
+ "@spartacus/user/account/components": ["dist/user/account/components"],
+ "@spartacus/user/account/core": ["dist/user/account/core"],
+ "@spartacus/user/account": ["dist/user/account"],
+ "@spartacus/user/account/occ": ["dist/user/account/occ"],
+ "@spartacus/user/account/root": ["dist/user/account/root"],
+ "@spartacus/user": ["dist/user"],
+ "@spartacus/user/profile/assets": ["dist/user/profile/assets"],
+ "@spartacus/user/profile/components": ["dist/user/profile/components"],
+ "@spartacus/user/profile/core": ["dist/user/profile/core"],
+ "@spartacus/user/profile": ["dist/user/profile"],
+ "@spartacus/user/profile/occ": ["dist/user/profile/occ"],
+ "@spartacus/user/profile/root": ["dist/user/profile/root"]
+ }
+ },
+ "angularCompilerOptions": {
+ "skipTemplateCodegen": true,
+ "strictMetadataEmit": true,
+ "fullTemplateTypeCheck": true,
+ "strictInjectionParameters": true,
+ "enableResourceInlining": true,
+ "strictInputAccessModifiers": true
+ },
+ "exclude": ["test.ts", "setup-jest.ts", "**/*.spec.ts"]
+}
diff --git a/feature-libs/requested-delivery-date/tsconfig.lib.prod.json b/feature-libs/requested-delivery-date/tsconfig.lib.prod.json
new file mode 100644
index 00000000000..0d1bf3896fa
--- /dev/null
+++ b/feature-libs/requested-delivery-date/tsconfig.lib.prod.json
@@ -0,0 +1,11 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+
+{
+ "extends": "./tsconfig.lib.json",
+ "compilerOptions": {
+ "declarationMap": false
+ },
+ "angularCompilerOptions": {
+ "compilationMode": "partial"
+ }
+}
diff --git a/feature-libs/requested-delivery-date/tsconfig.schematics.json b/feature-libs/requested-delivery-date/tsconfig.schematics.json
new file mode 100644
index 00000000000..bc2b2041ba7
--- /dev/null
+++ b/feature-libs/requested-delivery-date/tsconfig.schematics.json
@@ -0,0 +1,541 @@
+{
+ "compilerOptions": {
+ "baseUrl": "./",
+ "module": "CommonJs",
+ "types": ["jest"],
+ "noEmitOnError": true,
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "noUnusedParameters": true,
+ "noUnusedLocals": true,
+ "skipDefaultLibCheck": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true,
+ "strictNullChecks": true,
+ "resolveJsonModule": true,
+ "esModuleInterop": true,
+ "paths": {
+ "@spartacus/schematics": ["../../projects/schematics/index"],
+ "@spartacus/setup": ["../../core-libs/setup/public_api"],
+ "@spartacus/setup/ssr": ["../../core-libs/setup/ssr/public_api"],
+ "@spartacus/asm/assets": ["../../feature-libs/asm/assets/public_api"],
+ "@spartacus/asm/components": [
+ "../../feature-libs/asm/components/public_api"
+ ],
+ "@spartacus/asm/core": ["../../feature-libs/asm/core/public_api"],
+ "@spartacus/asm": ["../../feature-libs/asm/public_api"],
+ "@spartacus/asm/occ": ["../../feature-libs/asm/occ/public_api"],
+ "@spartacus/asm/root": ["../../feature-libs/asm/root/public_api"],
+ "@spartacus/cart/base/assets": [
+ "../../feature-libs/cart/base/assets/public_api"
+ ],
+ "@spartacus/cart/base/components/add-to-cart": [
+ "../../feature-libs/cart/base/components/add-to-cart/public_api"
+ ],
+ "@spartacus/cart/base/components/mini-cart": [
+ "../../feature-libs/cart/base/components/mini-cart/public_api"
+ ],
+ "@spartacus/cart/base/components": [
+ "../../feature-libs/cart/base/components/public_api"
+ ],
+ "@spartacus/cart/base/core": [
+ "../../feature-libs/cart/base/core/public_api"
+ ],
+ "@spartacus/cart/base": ["../../feature-libs/cart/base/public_api"],
+ "@spartacus/cart/base/occ": [
+ "../../feature-libs/cart/base/occ/public_api"
+ ],
+ "@spartacus/cart/base/root": [
+ "../../feature-libs/cart/base/root/public_api"
+ ],
+ "@spartacus/cart/import-export/assets": [
+ "../../feature-libs/cart/import-export/assets/public_api"
+ ],
+ "@spartacus/cart/import-export/components": [
+ "../../feature-libs/cart/import-export/components/public_api"
+ ],
+ "@spartacus/cart/import-export/core": [
+ "../../feature-libs/cart/import-export/core/public_api"
+ ],
+ "@spartacus/cart/import-export": [
+ "../../feature-libs/cart/import-export/public_api"
+ ],
+ "@spartacus/cart/import-export/root": [
+ "../../feature-libs/cart/import-export/root/public_api"
+ ],
+ "@spartacus/cart": ["../../feature-libs/cart/public_api"],
+ "@spartacus/cart/quick-order/assets": [
+ "../../feature-libs/cart/quick-order/assets/public_api"
+ ],
+ "@spartacus/cart/quick-order/components": [
+ "../../feature-libs/cart/quick-order/components/public_api"
+ ],
+ "@spartacus/cart/quick-order/core": [
+ "../../feature-libs/cart/quick-order/core/public_api"
+ ],
+ "@spartacus/cart/quick-order": [
+ "../../feature-libs/cart/quick-order/public_api"
+ ],
+ "@spartacus/cart/quick-order/root": [
+ "../../feature-libs/cart/quick-order/root/public_api"
+ ],
+ "@spartacus/cart/saved-cart/assets": [
+ "../../feature-libs/cart/saved-cart/assets/public_api"
+ ],
+ "@spartacus/cart/saved-cart/components": [
+ "../../feature-libs/cart/saved-cart/components/public_api"
+ ],
+ "@spartacus/cart/saved-cart/core": [
+ "../../feature-libs/cart/saved-cart/core/public_api"
+ ],
+ "@spartacus/cart/saved-cart": [
+ "../../feature-libs/cart/saved-cart/public_api"
+ ],
+ "@spartacus/cart/saved-cart/occ": [
+ "../../feature-libs/cart/saved-cart/occ/public_api"
+ ],
+ "@spartacus/cart/saved-cart/root": [
+ "../../feature-libs/cart/saved-cart/root/public_api"
+ ],
+ "@spartacus/cart/wish-list/assets": [
+ "../../feature-libs/cart/wish-list/assets/public_api"
+ ],
+ "@spartacus/cart/wish-list/components/add-to-wishlist": [
+ "../../feature-libs/cart/wish-list/components/add-to-wishlist/public_api"
+ ],
+ "@spartacus/cart/wish-list/components": [
+ "../../feature-libs/cart/wish-list/components/public_api"
+ ],
+ "@spartacus/cart/wish-list/core": [
+ "../../feature-libs/cart/wish-list/core/public_api"
+ ],
+ "@spartacus/cart/wish-list": [
+ "../../feature-libs/cart/wish-list/public_api"
+ ],
+ "@spartacus/cart/wish-list/root": [
+ "../../feature-libs/cart/wish-list/root/public_api"
+ ],
+ "@spartacus/checkout/b2b/assets": [
+ "../../feature-libs/checkout/b2b/assets/public_api"
+ ],
+ "@spartacus/checkout/b2b/components": [
+ "../../feature-libs/checkout/b2b/components/public_api"
+ ],
+ "@spartacus/checkout/b2b/core": [
+ "../../feature-libs/checkout/b2b/core/public_api"
+ ],
+ "@spartacus/checkout/b2b": ["../../feature-libs/checkout/b2b/public_api"],
+ "@spartacus/checkout/b2b/occ": [
+ "../../feature-libs/checkout/b2b/occ/public_api"
+ ],
+ "@spartacus/checkout/b2b/root": [
+ "../../feature-libs/checkout/b2b/root/public_api"
+ ],
+ "@spartacus/checkout/base/assets": [
+ "../../feature-libs/checkout/base/assets/public_api"
+ ],
+ "@spartacus/checkout/base/components": [
+ "../../feature-libs/checkout/base/components/public_api"
+ ],
+ "@spartacus/checkout/base/core": [
+ "../../feature-libs/checkout/base/core/public_api"
+ ],
+ "@spartacus/checkout/base": [
+ "../../feature-libs/checkout/base/public_api"
+ ],
+ "@spartacus/checkout/base/occ": [
+ "../../feature-libs/checkout/base/occ/public_api"
+ ],
+ "@spartacus/checkout/base/root": [
+ "../../feature-libs/checkout/base/root/public_api"
+ ],
+ "@spartacus/checkout": ["../../feature-libs/checkout/public_api"],
+ "@spartacus/checkout/scheduled-replenishment/assets": [
+ "../../feature-libs/checkout/scheduled-replenishment/assets/public_api"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/components": [
+ "../../feature-libs/checkout/scheduled-replenishment/components/public_api"
+ ],
+ "@spartacus/checkout/scheduled-replenishment": [
+ "../../feature-libs/checkout/scheduled-replenishment/public_api"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/root": [
+ "../../feature-libs/checkout/scheduled-replenishment/root/public_api"
+ ],
+ "@spartacus/customer-ticketing/assets": [
+ "../../feature-libs/customer-ticketing/assets/public_api"
+ ],
+ "@spartacus/customer-ticketing/components": [
+ "../../feature-libs/customer-ticketing/components/public_api"
+ ],
+ "@spartacus/customer-ticketing/core": [
+ "../../feature-libs/customer-ticketing/core/public_api"
+ ],
+ "@spartacus/customer-ticketing": [
+ "../../feature-libs/customer-ticketing/public_api"
+ ],
+ "@spartacus/customer-ticketing/occ": [
+ "../../feature-libs/customer-ticketing/occ/public_api"
+ ],
+ "@spartacus/customer-ticketing/root": [
+ "../../feature-libs/customer-ticketing/root/public_api"
+ ],
+ "@spartacus/order/assets": ["../../feature-libs/order/assets/public_api"],
+ "@spartacus/order/components": [
+ "../../feature-libs/order/components/public_api"
+ ],
+ "@spartacus/order/core": ["../../feature-libs/order/core/public_api"],
+ "@spartacus/order": ["../../feature-libs/order/public_api"],
+ "@spartacus/order/occ": ["../../feature-libs/order/occ/public_api"],
+ "@spartacus/order/root": ["../../feature-libs/order/root/public_api"],
+ "@spartacus/organization/account-summary/assets": [
+ "../../feature-libs/organization/account-summary/assets/public_api"
+ ],
+ "@spartacus/organization/account-summary/components": [
+ "../../feature-libs/organization/account-summary/components/public_api"
+ ],
+ "@spartacus/organization/account-summary/core": [
+ "../../feature-libs/organization/account-summary/core/public_api"
+ ],
+ "@spartacus/organization/account-summary": [
+ "../../feature-libs/organization/account-summary/public_api"
+ ],
+ "@spartacus/organization/account-summary/occ": [
+ "../../feature-libs/organization/account-summary/occ/public_api"
+ ],
+ "@spartacus/organization/account-summary/root": [
+ "../../feature-libs/organization/account-summary/root/public_api"
+ ],
+ "@spartacus/organization/administration/assets": [
+ "../../feature-libs/organization/administration/assets/public_api"
+ ],
+ "@spartacus/organization/administration/components": [
+ "../../feature-libs/organization/administration/components/public_api"
+ ],
+ "@spartacus/organization/administration/core": [
+ "../../feature-libs/organization/administration/core/public_api"
+ ],
+ "@spartacus/organization/administration": [
+ "../../feature-libs/organization/administration/public_api"
+ ],
+ "@spartacus/organization/administration/occ": [
+ "../../feature-libs/organization/administration/occ/public_api"
+ ],
+ "@spartacus/organization/administration/root": [
+ "../../feature-libs/organization/administration/root/public_api"
+ ],
+ "@spartacus/organization": ["../../feature-libs/organization/public_api"],
+ "@spartacus/organization/order-approval/assets": [
+ "../../feature-libs/organization/order-approval/assets/public_api"
+ ],
+ "@spartacus/organization/order-approval": [
+ "../../feature-libs/organization/order-approval/public_api"
+ ],
+ "@spartacus/organization/order-approval/root": [
+ "../../feature-libs/organization/order-approval/root/public_api"
+ ],
+ "@spartacus/organization/unit-order/assets": [
+ "../../feature-libs/organization/unit-order/assets/public_api"
+ ],
+ "@spartacus/organization/unit-order/components": [
+ "../../feature-libs/organization/unit-order/components/public_api"
+ ],
+ "@spartacus/organization/unit-order/core": [
+ "../../feature-libs/organization/unit-order/core/public_api"
+ ],
+ "@spartacus/organization/unit-order": [
+ "../../feature-libs/organization/unit-order/public_api"
+ ],
+ "@spartacus/organization/unit-order/occ": [
+ "../../feature-libs/organization/unit-order/occ/public_api"
+ ],
+ "@spartacus/organization/unit-order/root": [
+ "../../feature-libs/organization/unit-order/root/public_api"
+ ],
+ "@spartacus/organization/user-registration/assets": [
+ "../../feature-libs/organization/user-registration/assets/public_api"
+ ],
+ "@spartacus/organization/user-registration/components": [
+ "../../feature-libs/organization/user-registration/components/public_api"
+ ],
+ "@spartacus/organization/user-registration/core": [
+ "../../feature-libs/organization/user-registration/core/public_api"
+ ],
+ "@spartacus/organization/user-registration": [
+ "../../feature-libs/organization/user-registration/public_api"
+ ],
+ "@spartacus/organization/user-registration/occ": [
+ "../../feature-libs/organization/user-registration/occ/public_api"
+ ],
+ "@spartacus/organization/user-registration/root": [
+ "../../feature-libs/organization/user-registration/root/public_api"
+ ],
+ "@spartacus/pickup-in-store/assets": [
+ "../../feature-libs/pickup-in-store/assets/public_api"
+ ],
+ "@spartacus/pickup-in-store/components": [
+ "../../feature-libs/pickup-in-store/components/public_api"
+ ],
+ "@spartacus/pickup-in-store/core": [
+ "../../feature-libs/pickup-in-store/core/public_api"
+ ],
+ "@spartacus/pickup-in-store": [
+ "../../feature-libs/pickup-in-store/public_api"
+ ],
+ "@spartacus/pickup-in-store/occ": [
+ "../../feature-libs/pickup-in-store/occ/public_api"
+ ],
+ "@spartacus/pickup-in-store/root": [
+ "../../feature-libs/pickup-in-store/root/public_api"
+ ],
+ "@spartacus/product-configurator/common/assets": [
+ "../../feature-libs/product-configurator/common/assets/public_api"
+ ],
+ "@spartacus/product-configurator/common": [
+ "../../feature-libs/product-configurator/common/public_api"
+ ],
+ "@spartacus/product-configurator": [
+ "../../feature-libs/product-configurator/public_api"
+ ],
+ "@spartacus/product-configurator/rulebased/cpq": [
+ "../../feature-libs/product-configurator/rulebased/cpq/public_api"
+ ],
+ "@spartacus/product-configurator/rulebased": [
+ "../../feature-libs/product-configurator/rulebased/public_api"
+ ],
+ "@spartacus/product-configurator/rulebased/root": [
+ "../../feature-libs/product-configurator/rulebased/root/public_api"
+ ],
+ "@spartacus/product-configurator/textfield": [
+ "../../feature-libs/product-configurator/textfield/public_api"
+ ],
+ "@spartacus/product-configurator/textfield/root": [
+ "../../feature-libs/product-configurator/textfield/root/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/assets": [
+ "../../feature-libs/product/bulk-pricing/assets/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/components": [
+ "../../feature-libs/product/bulk-pricing/components/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/core": [
+ "../../feature-libs/product/bulk-pricing/core/public_api"
+ ],
+ "@spartacus/product/bulk-pricing": [
+ "../../feature-libs/product/bulk-pricing/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/occ": [
+ "../../feature-libs/product/bulk-pricing/occ/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/root": [
+ "../../feature-libs/product/bulk-pricing/root/public_api"
+ ],
+ "@spartacus/product/future-stock/assets": [
+ "../../feature-libs/product/future-stock/assets/public_api"
+ ],
+ "@spartacus/product/future-stock/components": [
+ "../../feature-libs/product/future-stock/components/public_api"
+ ],
+ "@spartacus/product/future-stock/core": [
+ "../../feature-libs/product/future-stock/core/public_api"
+ ],
+ "@spartacus/product/future-stock": [
+ "../../feature-libs/product/future-stock/public_api"
+ ],
+ "@spartacus/product/future-stock/occ": [
+ "../../feature-libs/product/future-stock/occ/public_api"
+ ],
+ "@spartacus/product/future-stock/root": [
+ "../../feature-libs/product/future-stock/root/public_api"
+ ],
+ "@spartacus/product/image-zoom/assets": [
+ "../../feature-libs/product/image-zoom/assets/public_api"
+ ],
+ "@spartacus/product/image-zoom/components": [
+ "../../feature-libs/product/image-zoom/components/public_api"
+ ],
+ "@spartacus/product/image-zoom": [
+ "../../feature-libs/product/image-zoom/public_api"
+ ],
+ "@spartacus/product/image-zoom/root": [
+ "../../feature-libs/product/image-zoom/root/public_api"
+ ],
+ "@spartacus/product": ["../../feature-libs/product/public_api"],
+ "@spartacus/product/variants/assets": [
+ "../../feature-libs/product/variants/assets/public_api"
+ ],
+ "@spartacus/product/variants/components": [
+ "../../feature-libs/product/variants/components/public_api"
+ ],
+ "@spartacus/product/variants": [
+ "../../feature-libs/product/variants/public_api"
+ ],
+ "@spartacus/product/variants/occ": [
+ "../../feature-libs/product/variants/occ/public_api"
+ ],
+ "@spartacus/product/variants/root": [
+ "../../feature-libs/product/variants/root/public_api"
+ ],
+ "@spartacus/qualtrics/components": [
+ "../../feature-libs/qualtrics/components/public_api"
+ ],
+ "@spartacus/qualtrics": ["../../feature-libs/qualtrics/public_api"],
+ "@spartacus/qualtrics/root": [
+ "../../feature-libs/qualtrics/root/public_api"
+ ],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
+ "@spartacus/smartedit/core": [
+ "../../feature-libs/smartedit/core/public_api"
+ ],
+ "@spartacus/smartedit": ["../../feature-libs/smartedit/public_api"],
+ "@spartacus/smartedit/root": [
+ "../../feature-libs/smartedit/root/public_api"
+ ],
+ "@spartacus/storefinder/assets": [
+ "../../feature-libs/storefinder/assets/public_api"
+ ],
+ "@spartacus/storefinder/components": [
+ "../../feature-libs/storefinder/components/public_api"
+ ],
+ "@spartacus/storefinder/core": [
+ "../../feature-libs/storefinder/core/public_api"
+ ],
+ "@spartacus/storefinder": ["../../feature-libs/storefinder/public_api"],
+ "@spartacus/storefinder/occ": [
+ "../../feature-libs/storefinder/occ/public_api"
+ ],
+ "@spartacus/storefinder/root": [
+ "../../feature-libs/storefinder/root/public_api"
+ ],
+ "@spartacus/tracking": ["../../feature-libs/tracking/public_api"],
+ "@spartacus/tracking/personalization/core": [
+ "../../feature-libs/tracking/personalization/core/public_api"
+ ],
+ "@spartacus/tracking/personalization": [
+ "../../feature-libs/tracking/personalization/public_api"
+ ],
+ "@spartacus/tracking/personalization/root": [
+ "../../feature-libs/tracking/personalization/root/public_api"
+ ],
+ "@spartacus/tracking/tms/aep": [
+ "../../feature-libs/tracking/tms/aep/public_api"
+ ],
+ "@spartacus/tracking/tms/core": [
+ "../../feature-libs/tracking/tms/core/public_api"
+ ],
+ "@spartacus/tracking/tms/gtm": [
+ "../../feature-libs/tracking/tms/gtm/public_api"
+ ],
+ "@spartacus/tracking/tms": ["../../feature-libs/tracking/tms/public_api"],
+ "@spartacus/user/account/assets": [
+ "../../feature-libs/user/account/assets/public_api"
+ ],
+ "@spartacus/user/account/components": [
+ "../../feature-libs/user/account/components/public_api"
+ ],
+ "@spartacus/user/account/core": [
+ "../../feature-libs/user/account/core/public_api"
+ ],
+ "@spartacus/user/account": ["../../feature-libs/user/account/public_api"],
+ "@spartacus/user/account/occ": [
+ "../../feature-libs/user/account/occ/public_api"
+ ],
+ "@spartacus/user/account/root": [
+ "../../feature-libs/user/account/root/public_api"
+ ],
+ "@spartacus/user": ["../../feature-libs/user/public_api"],
+ "@spartacus/user/profile/assets": [
+ "../../feature-libs/user/profile/assets/public_api"
+ ],
+ "@spartacus/user/profile/components": [
+ "../../feature-libs/user/profile/components/public_api"
+ ],
+ "@spartacus/user/profile/core": [
+ "../../feature-libs/user/profile/core/public_api"
+ ],
+ "@spartacus/user/profile": ["../../feature-libs/user/profile/public_api"],
+ "@spartacus/user/profile/occ": [
+ "../../feature-libs/user/profile/occ/public_api"
+ ],
+ "@spartacus/user/profile/root": [
+ "../../feature-libs/user/profile/root/public_api"
+ ],
+ "@spartacus/cdc/assets": ["../../integration-libs/cdc/assets/public_api"],
+ "@spartacus/cdc/components": [
+ "../../integration-libs/cdc/components/public_api"
+ ],
+ "@spartacus/cdc/core": ["../../integration-libs/cdc/core/public_api"],
+ "@spartacus/cdc": ["../../integration-libs/cdc/public_api"],
+ "@spartacus/cdc/organization/administration": [
+ "../../integration-libs/cdc/organization/administration/public_api"
+ ],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
+ "@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
+ "@spartacus/cdc/user-account": [
+ "../../integration-libs/cdc/user-account/public_api"
+ ],
+ "@spartacus/cdc/user-profile": [
+ "../../integration-libs/cdc/user-profile/public_api"
+ ],
+ "@spartacus/cds": ["../../integration-libs/cds/public_api"],
+ "@spartacus/digital-payments/assets": [
+ "../../integration-libs/digital-payments/assets/public_api"
+ ],
+ "@spartacus/digital-payments": [
+ "../../integration-libs/digital-payments/public_api"
+ ],
+ "@spartacus/epd-visualization/assets": [
+ "../../integration-libs/epd-visualization/assets/public_api"
+ ],
+ "@spartacus/epd-visualization/components": [
+ "../../integration-libs/epd-visualization/components/public_api"
+ ],
+ "@spartacus/epd-visualization/core": [
+ "../../integration-libs/epd-visualization/core/public_api"
+ ],
+ "@spartacus/epd-visualization/epd-visualization-api": [
+ "../../integration-libs/epd-visualization/epd-visualization-api/public_api"
+ ],
+ "@spartacus/epd-visualization": [
+ "../../integration-libs/epd-visualization/public_api"
+ ],
+ "@spartacus/epd-visualization/root": [
+ "../../integration-libs/epd-visualization/root/public_api"
+ ],
+ "@spartacus/s4om/assets": [
+ "../../integration-libs/s4om/assets/public_api"
+ ],
+ "@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
+ "@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
+ "@spartacus/assets": ["../../projects/assets/src/public_api"],
+ "@spartacus/core": ["../../projects/core/public_api"],
+ "@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
+ }
+ },
+ "include": ["schematics/**/*.ts"],
+ "exclude": ["schematics/*/files/**/*", "schematics/**/*_spec.ts"]
+}
diff --git a/feature-libs/requested-delivery-date/tsconfig.spec.json b/feature-libs/requested-delivery-date/tsconfig.spec.json
new file mode 100644
index 00000000000..9f660f8b0a1
--- /dev/null
+++ b/feature-libs/requested-delivery-date/tsconfig.spec.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/spec",
+ "strict": false,
+ "module": "es2020",
+ "types": ["jasmine", "node"],
+ "skipLibCheck": true,
+ "resolveJsonModule": true,
+ "esModuleInterop": true
+ },
+ "files": ["test.ts"],
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
+}
diff --git a/feature-libs/smartedit/assets/webApplicationInjector.js b/feature-libs/smartedit/assets/webApplicationInjector.js
index 0e03ead7e02..8d6dcebe2d8 100644
--- a/feature-libs/smartedit/assets/webApplicationInjector.js
+++ b/feature-libs/smartedit/assets/webApplicationInjector.js
@@ -1,2 +1,3 @@
-/*! For license information please see webApplicationInjector.js.LICENSE.txt */
-(()=>{var t={874:(t,e,n)=>{var r,a,o;o=function(){var t,e,n=document,r=n.getElementsByTagName("head")[0],a=!1,o="push",i="readyState",s="onreadystatechange",c={},l={},d={},u={};function p(t,e){for(var n=0,r=t.length;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Heartbeat=void 0;class n{static startSendingHeartBeatToIframe(t){const e=n.getHeartBeatInterval(t);setInterval((()=>{parent.postMessage({pk:Math.random(),gatewayId:"heartBeatGateway",eventId:"heartBeat",data:{location:document.location.href}},"*")}),e)}static getHeartBeatInterval(t){return parseInt(t.getAttribute("data-smartedit-heart-beat-interval")||n.DEFAULT_HEARTBEAT_INTERVAL,10)}}e.Heartbeat=n,n.DEFAULT_HEARTBEAT_INTERVAL="500"},167:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(874);class a{static getWebappScriptElementFromDocument(t){if(t.currentScript){if(!(t.currentScript instanceof HTMLScriptElement))throw new Error("getWebappScriptElementFromDocument() found non html script element");return t.currentScript}const e=t.querySelector(`script#${a.webappScriptId}`);if(e)return e;const n=t.querySelectorAll(`script[src*=${a.webappScriptName}]`);if(1!==n.length)throw new Error(`SmartEdit unable to load - invalid ${a.webappScriptName} script tag`);return n.item(0)}static extractQueryParameter(t,e){const n={};return t.replace(/([?&])([^&=]+)=([^&]*)?/g,((t,e,r,a)=>(n[r]=a,""))),n[e]}static injectJS(t,e=0){t.length&&e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(167);class a{static convertWhitelistingToRegexp(t){return(t=t||[]).map((t=>{const e=t.trim();if(a.whitelistingConfigRegex.test(e)){const t=["^","$"].join(e.replace(/\./g,"\\.").replace(/\*/g,"[-a-zA-Z0-9]*"));return new RegExp(t)}throw new Error(a.whitelistingErrorMsg)}))}static getWhitelistFromScriptElement(t,e){let n=[a.getSanitizedHostFromLocation(e.location)];const o=t.getAttribute(a.allowOriginAttributeName)||"";o&&(n=n.concat(o.split(",")));let i="";const s=e.document.createElement("a");s.href=t.src;const c=r.default.extractQueryParameter(s.search,a.allowOriginQueryParamName);return c&&(i=decodeURI(c),i&&i.split(",").forEach((t=>n.push(t)))),n}static isAllowed(t,e,n){if(!/^(https?:)\/\/([-.a-zA-Z0-9]+(:[0-9]{1,5})?)$/.test(t))return!1;const r=e.document.createElement("a");return r.href=t,("https:"!==e.location.protocol||"https:"===r.protocol)&&n.some((t=>(t.lastIndex=0,t.test(a.getSanitizedHostFromLocation(r)))))}static getSanitizedHostFromLocation(t){const e=t.port||("https"===t.protocol.replace(/:/g,"")?"443":"80");return`${t.hostname}:${e}`}}e.default=a,a.whitelistingConfigRegex=new RegExp(/^(([-*a-zA-Z0-9]+[.])*([-a-zA-Z0-9]+[.]))?[-a-zA-Z0-9]+(:[0-9]{1,5})$/),a.allowOriginAttributeName="data-smartedit-allow-origin",a.allowOriginQueryParamName="allow-origin",a.whitelistingErrorMsg="\n\t\tAllowed whitelist characters are a-z, A-Z, 0-9, -, period, or *\n\t\tThe wildcard * can be used to represent a prefixed domain, Good example: *.domain.com:80\n\t\tbut not a suffix or port, Bad examples: subdomain.*.com subdomain.domain.com:*.\n\t\tEvery whitelisting must contain a specific port.\n\t"}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}(()=>{"use strict";const t=n(597),e=n(167),r=n(750),a="smartEditBootstrap",o=e.default.getWebappScriptElementFromDocument(document);if(!o)throw new Error("Unable to location webappInjector script");const i=r.default.getWhitelistFromScriptElement(o,window),s=r.default.convertWhitelistingToRegexp(i);parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"loading",data:{location:document.location.href}},"*"),window.addEventListener("load",(function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"bootstrapSmartEdit",data:{location:document.location.href}},"*")})),window.addEventListener("message",(function(t){if(t.data.gatewayId===a&&"bundle"===t.data.eventId){if(!r.default.isAllowed(t.origin,window,s))throw new Error(t.origin+" is not allowed to override this storefront.");!function(t,n){if(window.smartedit=window.smartedit||{},parent.postMessage({gatewayId:a,eventId:"promiseAcknowledgement",data:{pk:t}},"*"),n){const t=document.getElementsByTagName("body")[0];!function(t){if(t.properties)for(const e in t.properties)t.properties.hasOwnProperty(e)&&(window.smartedit[e]=t.properties[e])}(n),function(t){if(!(t.js&&t.js.length>0))return;let n;n="string"==typeof t.js[0]?t.js:t.js.filter((t=>!t.namespaceToCheck||!window[t.namespaceToCheck])).map((t=>t.src)),e.default.injectJS(n)}(n),n.css&&n.css.length>0&&(e.default.removeThemeCSS(),e.default.injectCSS(t,n.css))}parent.postMessage({gatewayId:a,eventId:"promiseReturn",data:{pk:t,type:"success"}},"*")}(t.data.pk,t.data.data.resources)}}),!1),window.onbeforeunload=function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"unloading",data:{location:document.location.href}},"*")},t.Heartbeat.startSendingHeartBeatToIframe(o)})()})();
\ No newline at end of file
+/*! For license information please see webApplicationInjector.js.LICENSE.txt
+Version: 0.0.3 */
+(()=>{var t={874:(t,e,n)=>{var r,a,o;o=function(){var t,e,n=document,r=n.getElementsByTagName("head")[0],a=!1,o="push",i="readyState",s="onreadystatechange",c={},l={},d={},u={};function p(t,e){for(var n=0,r=t.length;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Heartbeat=void 0;class n{static startSendingHeartBeatToIframe(t){const e=n.getHeartBeatInterval(t);setInterval((()=>{parent.postMessage({pk:Math.random(),gatewayId:"heartBeatGateway",eventId:"heartBeat",data:{location:document.location.href}},"*")}),e)}static getHeartBeatInterval(t){return parseInt(t.getAttribute("data-smartedit-heart-beat-interval")||n.DEFAULT_HEARTBEAT_INTERVAL,10)}}e.Heartbeat=n,n.DEFAULT_HEARTBEAT_INTERVAL="500"},986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(874);class a{static getWebappScriptElementFromDocument(t){if(t.currentScript){if(!(t.currentScript instanceof HTMLScriptElement))throw new Error("getWebappScriptElementFromDocument() found non html script element");return t.currentScript}const e=t.querySelector(`script#${a.webappScriptId}`);if(e)return e;const n=t.querySelectorAll(`script[src*=${a.webappScriptName}]`);if(1!==n.length)throw new Error(`SmartEdit unable to load - invalid ${a.webappScriptName} script tag`);return n.item(0)}static extractQueryParameter(t,e){const n={};return t.replace(/([?&])([^&=]+)=([^&]*)?/g,((t,e,r,a)=>(n[r]=a,""))),n[e]}static injectJS(t,e=0){t.length&&e{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(986);class a{static convertWhitelistingToRegexp(t){return(t=t||[]).map((t=>{const e=t.trim();if(a.whitelistingConfigRegex.test(e)){const t=["^","$"].join(e.replace(/\./g,"\\.").replace(/\*/g,"[-a-zA-Z0-9]*"));return new RegExp(t)}throw new Error(a.whitelistingErrorMsg)}))}static getWhitelistFromScriptElement(t,e){let n=[a.getSanitizedHostFromLocation(e.location)];const o=t.getAttribute(a.allowOriginAttributeName)||"";o&&(n=n.concat(o.split(",")));let i="";const s=e.document.createElement("a");s.href=t.src;const c=r.default.extractQueryParameter(s.search,a.allowOriginQueryParamName);return c&&(i=decodeURI(c),i&&i.split(",").forEach((t=>n.push(t)))),n}static isAllowed(t,e,n){if(!/^(https?:)\/\/([-.a-zA-Z0-9]+(:[0-9]{1,5})?)$/.test(t))return!1;const r=e.document.createElement("a");return r.href=t,("https:"!==e.location.protocol||"https:"===r.protocol)&&n.some((t=>(t.lastIndex=0,t.test(a.getSanitizedHostFromLocation(r)))))}static getSanitizedHostFromLocation(t){const e=t.port||("https"===t.protocol.replace(/:/g,"")?"443":"80");return`${t.hostname}:${e}`}}e.default=a,a.whitelistingConfigRegex=new RegExp(/^(([-*a-zA-Z0-9]+[.])*([-a-zA-Z0-9]+[.]))?[-a-zA-Z0-9]+(:[0-9]{1,5})$/),a.allowOriginAttributeName="data-smartedit-allow-origin",a.allowOriginQueryParamName="allow-origin",a.whitelistingErrorMsg="\n\t\tAllowed whitelist characters are a-z, A-Z, 0-9, -, period, or *\n\t\tThe wildcard * can be used to represent a prefixed domain, Good example: *.domain.com:80\n\t\tbut not a suffix or port, Bad examples: subdomain.*.com subdomain.domain.com:*.\n\t\tEvery whitelisting must contain a specific port.\n\t"}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}(()=>{"use strict";const t=n(977),e=n(986),r=n(810),a="smartEditBootstrap",o=e.default.getWebappScriptElementFromDocument(document);if(!o)throw new Error("Unable to location webappInjector script");const i=r.default.getWhitelistFromScriptElement(o,window),s=r.default.convertWhitelistingToRegexp(i);function c(t){parent.postMessage({gatewayId:a,eventId:"promiseAcknowledgement",data:{pk:t}},"*")}function l(t){parent.postMessage({gatewayId:a,eventId:"promiseReturn",data:{pk:t,type:"success"}},"*")}parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"loading",data:{location:document.location.href,version:"0.0.3"}},"*"),window.addEventListener("load",(function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"bootstrapSmartEdit",data:{location:document.location.href}},"*")})),window.addEventListener("message",(function(t){if(!r.default.isAllowed(t.origin,window,s))throw new Error(t.origin+" is not allowed to override this storefront.");if(t.data.gatewayId===a&&"bundle"===t.data.eventId)return void function(t,n){if(window.smartedit=window.smartedit||{},c(t),n){const t=document.getElementsByTagName("head")[0];!function(t){if(!t.properties)return;for(const e in t.properties)t.properties.hasOwnProperty(e)&&(window.smartedit[e]=t.properties[e])}(n),function(t){if(!(t.js&&t.js.length>0))return;let n;n="string"==typeof t.js[0]?t.js:t.js.filter((t=>!t.namespaceToCheck||!window[t.namespaceToCheck])).map((t=>t.src));e.default.injectJS(n)}(n),n.css&&n.css.length>0&&e.default.injectCSS(t,n.css),n.themeCss&&n.themeCss.length>0&&e.default.injectThemeCSS(t,n.themeCss)}l(t)}(t.data.pk,t.data.data.resources);t.data.gatewayId===a&&"theme"===t.data.eventId&&(n=t.data.pk,o=t.data.data.resources,c(n),e.default.updateThemeCss(o.themeCss),l(n));var n,o}),!1),window.onbeforeunload=function(){parent.postMessage({pk:Math.random(),gatewayId:a,eventId:"unloading",data:{location:document.location.href}},"*")},t.Heartbeat.startSendingHeartBeatToIframe(o)})()})();
diff --git a/feature-libs/smartedit/package.json b/feature-libs/smartedit/package.json
index cfbcdd1ef71..b56b5b3f661 100644
--- a/feature-libs/smartedit/package.json
+++ b/feature-libs/smartedit/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/smartedit",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Smart Edit feature library for Spartacus",
"keywords": [
"spartacus",
@@ -23,8 +23,8 @@
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/feature-libs/smartedit/tsconfig.schematics.json b/feature-libs/smartedit/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/smartedit/tsconfig.schematics.json
+++ b/feature-libs/smartedit/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/storefinder/package.json b/feature-libs/storefinder/package.json
index 791914a8ce1..33507e7151a 100644
--- a/feature-libs/storefinder/package.json
+++ b/feature-libs/storefinder/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/storefinder",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Store finder feature library for Spartacus",
"keywords": [
"spartacus",
@@ -32,10 +32,10 @@
"@angular/router": "^15.2.4",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/feature-libs/storefinder/tsconfig.schematics.json b/feature-libs/storefinder/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/storefinder/tsconfig.schematics.json
+++ b/feature-libs/storefinder/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/tracking/package.json b/feature-libs/tracking/package.json
index 0922b17227f..957912bb9f7 100644
--- a/feature-libs/tracking/package.json
+++ b/feature-libs/tracking/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/tracking",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Spartacus tracking and personalization library",
"keywords": [
"spartacus",
@@ -27,8 +27,8 @@
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/feature-libs/tracking/tsconfig.schematics.json b/feature-libs/tracking/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/tracking/tsconfig.schematics.json
+++ b/feature-libs/tracking/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/feature-libs/user/account/root/model/user.model.ts b/feature-libs/user/account/root/model/user.model.ts
index d950f060e2b..a875eb7fccd 100644
--- a/feature-libs/user/account/root/model/user.model.ts
+++ b/feature-libs/user/account/root/model/user.model.ts
@@ -10,4 +10,5 @@ export interface User {
lastName?: string;
name?: string;
uid?: string;
+ customerId?: string;
}
diff --git a/feature-libs/user/package.json b/feature-libs/user/package.json
index 223d907ce18..dbd2f380bfb 100644
--- a/feature-libs/user/package.json
+++ b/feature-libs/user/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/user",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "User feature library for Spartacus",
"keywords": [
"spartacus",
@@ -32,10 +32,10 @@
"@angular/router": "^15.2.4",
"@ng-select/ng-select": "^10.0.3",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/feature-libs/user/profile/components/update-password/update-password-component.service.ts b/feature-libs/user/profile/components/update-password/update-password-component.service.ts
index 8af7786a617..8b7585f2844 100644
--- a/feature-libs/user/profile/components/update-password/update-password-component.service.ts
+++ b/feature-libs/user/profile/components/update-password/update-password-component.service.ts
@@ -15,6 +15,7 @@ import {
AuthService,
GlobalMessageService,
GlobalMessageType,
+ HttpErrorModel,
RoutingService,
} from '@spartacus/core';
import { CustomFormValidators } from '@spartacus/storefront';
@@ -71,7 +72,7 @@ export class UpdatePasswordComponentService {
this.userPasswordService.update(oldPassword, newPassword).subscribe({
next: () => this.onSuccess(),
- error: (error: Error) => this.onError(error),
+ error: (error: HttpErrorModel | Error) => this.onError(error),
});
}
@@ -93,7 +94,16 @@ export class UpdatePasswordComponentService {
});
}
- protected onError(_error: Error): void {
+ protected onError(_error: HttpErrorModel | Error): void {
+ if (
+ _error instanceof HttpErrorModel &&
+ _error.details?.[0].type === 'AccessDeniedError'
+ ) {
+ this.globalMessageService.add(
+ { key: 'updatePasswordForm.accessDeniedError' },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ }
this.busy$.next(false);
this.form.reset();
}
diff --git a/feature-libs/user/tsconfig.schematics.json b/feature-libs/user/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/feature-libs/user/tsconfig.schematics.json
+++ b/feature-libs/user/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/integration-libs/cdc/organization/user-registration/cdc-b2b-register-component.service.spec.ts b/integration-libs/cdc/organization/user-registration/cdc-b2b-register-component.service.spec.ts
new file mode 100644
index 00000000000..5a26d4308aa
--- /dev/null
+++ b/integration-libs/cdc/organization/user-registration/cdc-b2b-register-component.service.spec.ts
@@ -0,0 +1,298 @@
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { TestBed } from '@angular/core/testing';
+import { FormGroup } from '@angular/forms';
+import { Store } from '@ngrx/store';
+import { CdcJsService } from '@spartacus/cdc/root';
+import {
+ AuthService,
+ EventService,
+ GlobalMessageService,
+ GlobalMessageType,
+ RoutingService,
+ TranslationService,
+ UserAddressService,
+} from '@spartacus/core';
+import { UserRegistrationConnector } from '@spartacus/organization/user-registration/core';
+import {
+ OrganizationUserRegistration,
+ UserRegistrationFacade,
+} from '@spartacus/organization/user-registration/root';
+import { UserRegisterFacade } from '@spartacus/user/profile/root';
+import { of, throwError } from 'rxjs';
+import { CDCB2BRegisterComponentService } from './cdc-b2b-register-component.service';
+import createSpy = jasmine.createSpy;
+
+const mockedGlobalMessageService = {
+ add: () => {},
+ remove: () => {},
+};
+
+class MockRoutingService implements Partial {
+ go = () => Promise.resolve(true);
+}
+
+class MockUserAddressService implements Partial {
+ getDeliveryCountries = createSpy().and.returnValue(of([]));
+ getRegions = createSpy().and.returnValue(of([]));
+ loadDeliveryCountries(): void {
+ return;
+ }
+}
+
+class MockUserRegisterFacade implements Partial {
+ getTitles = createSpy().and.returnValue(of([]));
+}
+
+class MockTranslationService implements Partial {
+ translate(value: string, options: any) {
+ return of(value + Object.values(options));
+ }
+}
+
+class MockUserRegistrationFacade implements Partial {
+ registerUser(userData: OrganizationUserRegistration) {
+ return of(userData);
+ }
+}
+
+class MockUserRegistrationConnector
+ implements Partial
+{
+ registerUser = createSpy().and.callFake((user: any) => of(user));
+}
+
+class MockAuthService implements Partial {
+ loginWithCredentials = createSpy().and.returnValue(Promise.resolve());
+ isUserLoggedIn = createSpy().and.returnValue(of(true));
+}
+
+class MockEventService implements Partial {
+ get = createSpy().and.callFake(() => of(false)); //no failures
+}
+
+class MockCDCJsService implements Partial {
+ didLoad = createSpy().and.callFake(() => of(true));
+ registerOrganisationWithoutScreenSet = createSpy().and.callFake(() =>
+ of({ status: 'OK' })
+ );
+ onLoginEventHandler = createSpy();
+}
+
+describe('CdcRegisterComponentService', () => {
+ let cdcOrgRegisterService: CDCB2BRegisterComponentService;
+ let connector: UserRegistrationConnector;
+ let cdcJsService: CdcJsService;
+ let globalMessageService: GlobalMessageService;
+ let eventService: EventService;
+ let userAddressService: UserAddressService;
+ let userRegisterFacade: UserRegisterFacade;
+ let routingService: RoutingService;
+ let orgRegistrationFormData: FormGroup;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [
+ { provide: AuthService, useClass: MockAuthService },
+ {
+ provide: RoutingService,
+ useClass: MockRoutingService,
+ },
+ {
+ provide: UserAddressService,
+ useClass: MockUserAddressService,
+ },
+ {
+ provide: UserRegisterFacade,
+ useClass: MockUserRegisterFacade,
+ },
+ {
+ provide: TranslationService,
+ useClass: MockTranslationService,
+ },
+ {
+ provide: UserRegistrationFacade,
+ useClass: MockUserRegistrationFacade,
+ },
+ { provide: Store, useValue: { dispatch: () => {} } },
+ {
+ provide: UserRegistrationConnector,
+ useClass: MockUserRegistrationConnector,
+ },
+ { provide: CdcJsService, useClass: MockCDCJsService },
+ { provide: EventService, useClass: MockEventService },
+ { provide: GlobalMessageService, useValue: mockedGlobalMessageService },
+ CDCB2BRegisterComponentService,
+ ],
+ });
+
+ globalMessageService = TestBed.inject(GlobalMessageService);
+ cdcOrgRegisterService = TestBed.inject(CDCB2BRegisterComponentService);
+ connector = TestBed.inject(UserRegistrationConnector);
+ cdcJsService = TestBed.inject(CdcJsService);
+ eventService = TestBed.inject(EventService);
+ userAddressService = TestBed.inject(UserAddressService);
+ userRegisterFacade = TestBed.inject(UserRegisterFacade);
+ routingService = TestBed.inject(RoutingService);
+ orgRegistrationFormData = cdcOrgRegisterService.form;
+
+ orgRegistrationFormData.get('firstName')?.setValue('firstName');
+ orgRegistrationFormData.get('lastName')?.setValue('lastName');
+ orgRegistrationFormData
+ .get('email')
+ ?.setValue('firstName.lastName@test.com');
+ orgRegistrationFormData.get('companyName')?.setValue('New Company Inc.');
+ orgRegistrationFormData.get('line1')?.setValue('Test St.');
+ orgRegistrationFormData.get('line2')?.setValue('1/2');
+ orgRegistrationFormData.get('postalCode')?.setValue('1234');
+ orgRegistrationFormData.get('town')?.setValue('Town');
+ orgRegistrationFormData
+ .get('message')
+ ?.setValue('Department: CX; Position: QE');
+ orgRegistrationFormData.get('phoneNumber')?.setValue('9876543210');
+ orgRegistrationFormData.get('country')?.setValue({
+ isocode: 'US',
+ });
+ orgRegistrationFormData.get('region')?.setValue({
+ isocode: 'US-AZ',
+ });
+
+ TestBed.compileComponents();
+ });
+
+ it('should be created', () => {
+ expect(cdcOrgRegisterService).toBeTruthy();
+ });
+
+ it('should get countries from `userAddressService`', () => {
+ cdcOrgRegisterService.getCountries().subscribe().unsubscribe();
+ expect(userAddressService.getDeliveryCountries).toHaveBeenCalled();
+ });
+
+ it('should get titles from `userRegisterFacade`', () => {
+ cdcOrgRegisterService.getTitles().subscribe().unsubscribe();
+ expect(userRegisterFacade.getTitles).toHaveBeenCalled();
+ });
+
+ describe('Register', () => {
+ it('should be able to register organization through CDC', (done) => {
+ cdcOrgRegisterService
+ .registerUser(orgRegistrationFormData)
+ .subscribe(() => {
+ expect(connector.registerUser).not.toHaveBeenCalled();
+ expect(
+ cdcJsService.registerOrganisationWithoutScreenSet
+ ).toHaveBeenCalledWith({
+ firstName: 'firstName',
+ lastName: 'lastName',
+ email: 'firstName.lastName@test.com',
+ message: 'Department: CX; Position: QE',
+ addressLine1: 'Test St.',
+ addressLine2: '1/2',
+ postalCode: '1234',
+ town: 'Town',
+ region: 'US-AZ',
+ country: 'US',
+ phoneNumber: '9876543210',
+ companyName: 'New Company Inc.',
+ });
+ });
+ expect(cdcJsService.didLoad).toHaveBeenCalled();
+ done();
+ });
+
+ it('should NOT happen without CDC, should show error', (done) => {
+ spyOn(globalMessageService, 'remove');
+ spyOn(globalMessageService, 'add');
+ cdcJsService.didLoad = createSpy().and.callFake(() => of(false));
+ cdcOrgRegisterService.registerUser(orgRegistrationFormData).subscribe({
+ error: () => {
+ expect(
+ cdcJsService.registerOrganisationWithoutScreenSet
+ ).not.toHaveBeenCalled();
+ expect(connector.registerUser).not.toHaveBeenCalled();
+ expect(globalMessageService.add).toHaveBeenCalledWith(
+ {
+ key: 'errorHandlers.scriptFailedToLoad',
+ },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ expect(
+ cdcJsService.registerOrganisationWithoutScreenSet
+ ).not.toHaveBeenCalled();
+ done();
+ },
+ });
+ });
+
+ it('should not do anything when CDC registration fails', (done) => {
+ cdcJsService.registerOrganisationWithoutScreenSet =
+ createSpy().and.returnValue(throwError('ERROR'));
+
+ cdcOrgRegisterService.registerUser(orgRegistrationFormData).subscribe({
+ error: () => {
+ expect(connector.registerUser).not.toHaveBeenCalled();
+ expect(
+ cdcJsService.registerOrganisationWithoutScreenSet
+ ).toHaveBeenCalledWith({
+ firstName: 'firstName',
+ lastName: 'lastName',
+ email: 'firstName.lastName@test.com',
+ message: 'Department: CX; Position: QE',
+ addressLine1: 'Test St.',
+ addressLine2: '1/2',
+ postalCode: '1234',
+ town: 'Town',
+ region: 'US-AZ',
+ country: 'US',
+ phoneNumber: '9876543210',
+ companyName: 'New Company Inc.',
+ });
+ },
+ });
+ expect(cdcJsService.didLoad).toHaveBeenCalled();
+ done();
+ });
+
+ it('should throw error when CDC user token fails', (done) => {
+ eventService.get = createSpy().and.returnValue(of(true));
+
+ cdcOrgRegisterService.registerUser(orgRegistrationFormData).subscribe({
+ error: () => {
+ expect(connector.registerUser).not.toHaveBeenCalled();
+ expect(
+ cdcJsService.registerOrganisationWithoutScreenSet
+ ).toHaveBeenCalledWith({
+ firstName: 'firstName',
+ lastName: 'lastName',
+ email: 'firstName.lastName@test.com',
+ message: 'Department: CX; Position: QE',
+ addressLine1: 'Test St.',
+ addressLine2: '1/2',
+ postalCode: '1234',
+ town: 'Town',
+ region: 'US-AZ',
+ country: 'US',
+ phoneNumber: '9876543210',
+ companyName: 'New Company Inc.',
+ });
+ done();
+ },
+ });
+ expect(cdcJsService.didLoad).toHaveBeenCalled();
+ done();
+ });
+
+ it('should redirect to login page', () => {
+ spyOn(routingService, 'go').and.callThrough();
+ cdcOrgRegisterService
+ .registerUser(orgRegistrationFormData)
+ .subscribe()
+ .unsubscribe();
+
+ expect(routingService.go).toHaveBeenCalledWith({
+ cxRoute: 'login',
+ });
+ });
+ });
+});
diff --git a/integration-libs/cdc/organization/user-registration/cdc-b2b-register-component.service.ts b/integration-libs/cdc/organization/user-registration/cdc-b2b-register-component.service.ts
new file mode 100644
index 00000000000..c845792a16f
--- /dev/null
+++ b/integration-libs/cdc/organization/user-registration/cdc-b2b-register-component.service.ts
@@ -0,0 +1,138 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Injectable } from '@angular/core';
+import { FormBuilder, FormGroup } from '@angular/forms';
+import { CdcJsService, CdcLoadUserTokenFailEvent } from '@spartacus/cdc/root';
+import {
+ AuthConfigService,
+ AuthService,
+ Command,
+ CommandService,
+ EventService,
+ GlobalMessageService,
+ GlobalMessageType,
+ RoutingService,
+ TranslationService,
+ UserAddressService,
+} from '@spartacus/core';
+import { UserRegistrationFormService } from '@spartacus/organization/user-registration/components';
+import {
+ UserRegistrationFacade,
+ OrganizationUserRegistrationForm,
+} from '@spartacus/organization/user-registration/root';
+import { UserRegisterFacade } from '@spartacus/user/profile/root';
+import { Observable, throwError } from 'rxjs';
+import { map, switchMap, tap } from 'rxjs/operators';
+
+@Injectable()
+export class CDCB2BRegisterComponentService extends UserRegistrationFormService {
+ protected registerCommand: Command<
+ { orgInfo: OrganizationUserRegistrationForm },
+ OrganizationUserRegistrationForm
+ > = this.command.create(
+ ({ orgInfo }) =>
+ // Registering user through CDC Gigya SDK
+ this.cdcJSService.registerOrganisationWithoutScreenSet(
+ orgInfo
+ ) as unknown as Observable
+ );
+
+ protected loadUserTokenFailed$: Observable = this.eventService
+ .get(CdcLoadUserTokenFailEvent)
+ .pipe(
+ map((event) => !!event),
+ tap((failed) => {
+ if (failed) {
+ throw new Error(`User token failed to load.`);
+ }
+ })
+ );
+
+ constructor(
+ protected command: CommandService,
+ protected cdcJSService: CdcJsService,
+ protected authService: AuthService,
+ protected eventService: EventService,
+ protected userRegisterFacade: UserRegisterFacade,
+ protected userAddressService: UserAddressService,
+ protected organizationUserRegistrationFacade: UserRegistrationFacade,
+ protected translationService: TranslationService,
+ protected globalMessageService: GlobalMessageService,
+ protected authConfigService: AuthConfigService,
+ protected routingService: RoutingService,
+ protected formBuilder: FormBuilder
+ ) {
+ super(
+ userRegisterFacade,
+ userAddressService,
+ organizationUserRegistrationFacade,
+ translationService,
+ globalMessageService,
+ authConfigService,
+ routingService,
+ formBuilder
+ );
+ }
+
+ /**
+ * Register a new user using CDC SDK.
+ *
+ * @param form as FormGroup
+ */
+ registerUser(form: FormGroup): Observable {
+ if (
+ !form.get('firstName')?.value ||
+ !form.get('lastName')?.value ||
+ !form.get('email')?.value ||
+ !form.get('companyName')?.value
+ ) {
+ return throwError(`The provided user is not valid: ${form.value}`);
+ }
+
+ const orgInfo: OrganizationUserRegistrationForm = {
+ firstName: form.get('firstName')?.value,
+ lastName: form.get('lastName')?.value,
+ email: form.get('email')?.value,
+ companyName: form.get('companyName')?.value,
+ addressLine1: form.get('line1')?.value,
+ addressLine2: form.get('line2')?.value,
+ postalCode: form.get('postalCode')?.value,
+ town: form.get('town')?.value,
+ region: form.get('region')?.get('isocode')?.value,
+ country: form.get('country')?.get('isocode')?.value,
+ phoneNumber: form.get('phoneNumber')?.value,
+ message: form.get('message')?.value,
+ };
+ return this.cdcJSService.didLoad().pipe(
+ tap((cdcLoaded) => {
+ if (!cdcLoaded) {
+ this.globalMessageService.add(
+ {
+ key: 'errorHandlers.scriptFailedToLoad',
+ },
+ GlobalMessageType.MSG_TYPE_ERROR
+ );
+ throw new Error(`CDC script didn't load.`);
+ }
+ }),
+ switchMap(() =>
+ // Logging in using CDC Gigya SDK, update the registerCommand
+ this.registerCommand.execute({ orgInfo })
+ ),
+ tap(() => {
+ this.displayGlobalMessage();
+ this.redirectToLogin();
+ form.reset();
+ })
+ );
+ }
+
+ // @override
+ postRegisterMessage(): void {
+ // don't show the message
+ }
+}
diff --git a/integration-libs/cdc/organization/user-registration/cdc-b2b-register.module.ts b/integration-libs/cdc/organization/user-registration/cdc-b2b-register.module.ts
new file mode 100644
index 00000000000..5ede1796de0
--- /dev/null
+++ b/integration-libs/cdc/organization/user-registration/cdc-b2b-register.module.ts
@@ -0,0 +1,40 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { CommonModule } from '@angular/common';
+import { NgModule } from '@angular/core';
+import { ReactiveFormsModule } from '@angular/forms';
+import { RouterModule } from '@angular/router';
+import { NgSelectModule } from '@ng-select/ng-select';
+import { I18nModule, UrlModule } from '@spartacus/core';
+import {
+ FormErrorsModule,
+ NgSelectA11yModule,
+ SpinnerModule,
+} from '@spartacus/storefront';
+import { UserRegistrationFormService } from '@spartacus/organization/user-registration/components';
+import { CDCB2BRegisterComponentService } from './cdc-b2b-register-component.service';
+
+@NgModule({
+ imports: [
+ CommonModule,
+ ReactiveFormsModule,
+ RouterModule,
+ UrlModule,
+ I18nModule,
+ SpinnerModule,
+ FormErrorsModule,
+ NgSelectModule,
+ NgSelectA11yModule,
+ ],
+ providers: [
+ {
+ provide: UserRegistrationFormService,
+ useClass: CDCB2BRegisterComponentService,
+ },
+ ],
+})
+export class CDCB2BRegisterModule {}
diff --git a/integration-libs/cdc/organization/user-registration/ng-package.json b/integration-libs/cdc/organization/user-registration/ng-package.json
new file mode 100644
index 00000000000..2a9c6221b0e
--- /dev/null
+++ b/integration-libs/cdc/organization/user-registration/ng-package.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ }
+}
diff --git a/integration-libs/cdc/organization/user-registration/public_api.ts b/integration-libs/cdc/organization/user-registration/public_api.ts
new file mode 100644
index 00000000000..527a4ccf6d1
--- /dev/null
+++ b/integration-libs/cdc/organization/user-registration/public_api.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './cdc-b2b-register-component.service';
+export * from './cdc-b2b-register.module';
diff --git a/integration-libs/cdc/package.json b/integration-libs/cdc/package.json
index 31b6d40ffd3..39dd392508b 100644
--- a/integration-libs/cdc/package.json
+++ b/integration-libs/cdc/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/cdc",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Customer Data Cloud Integration library for Spartacus",
"keywords": [
"spartacus",
@@ -30,12 +30,12 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/asm": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/organization": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/asm": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/organization": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/integration-libs/cdc/root/service/cdc-js.service.spec.ts b/integration-libs/cdc/root/service/cdc-js.service.spec.ts
index 2e79b9c300f..fe6ce38d4b2 100644
--- a/integration-libs/cdc/root/service/cdc-js.service.spec.ts
+++ b/integration-libs/cdc/root/service/cdc-js.service.spec.ts
@@ -1,6 +1,7 @@
import { TestBed } from '@angular/core/testing';
import {
AuthService,
+ BaseSite,
BaseSiteService,
GlobalMessageService,
GlobalMessageType,
@@ -37,6 +38,9 @@ class BaseSiteServiceStub implements Partial {
getActive(): Observable {
return of('electronics-spa');
}
+ get(_siteUid?: string): Observable {
+ return of({ uid: 'electronics-spa', channel: 'B2C' });
+ }
}
class LanguageServiceStub implements Partial {
getActive(): Observable {
@@ -263,7 +267,7 @@ describe('CdcJsService', () => {
errorCallback: jasmine.any(Function) as any,
});
expect(winRef?.nativeWindow['__gigyaConf']).toEqual({
- include: 'id_token',
+ include: 'id_token, missing-required-fields',
});
});
@@ -441,6 +445,7 @@ describe('CdcJsService', () => {
describe('loginUserWithoutScreenSet', () => {
it('should login user without screenset', (done) => {
+ expect(service['getCurrentBaseSite']()).toBe('electronics-spa');
spyOn(service['gigyaSDK'].accounts, 'login').and.callFake(
(options: { callback: Function }) => {
options.callback({ status: 'OK' });
@@ -451,7 +456,6 @@ describe('CdcJsService', () => {
expect(service['gigyaSDK'].accounts.login).toHaveBeenCalledWith({
loginID: 'uid',
password: 'password',
- include: 'missing-required-fields',
ignoreInterruptions: true,
sessionExpiry: sampleCdcConfig.cdc[0].sessionExpiration,
callback: jasmine.any(Function),
@@ -480,7 +484,6 @@ describe('CdcJsService', () => {
expect(service['gigyaSDK'].accounts.login).toHaveBeenCalledWith({
loginID: 'uid',
password: 'password',
- include: 'missing-required-fields',
ignoreInterruptions: true,
context: 'RESET_EMAIL',
sessionExpiry: sampleCdcConfig?.cdc[0]?.sessionExpiration,
@@ -696,6 +699,22 @@ describe('CdcJsService', () => {
});
});
+ describe('getCurrentBaseSiteChannel', () => {
+ it('should return the channel value of the base site - B2C', () => {
+ spyOn(baseSiteService, 'get').and.returnValue(
+ of({ uid: 'electronics-spa', channel: 'B2C' })
+ );
+ expect(service['getCurrentBaseSiteChannel']()).toBe('B2C');
+ });
+
+ it('should return the channel of the base site - B2B', () => {
+ spyOn(baseSiteService, 'get').and.returnValue(
+ of({ uid: 'powertools-spa', channel: 'B2B' })
+ );
+ expect(service['getCurrentBaseSiteChannel']()).toBe('B2B');
+ });
+ });
+
describe('updateProfileWithoutScreenSet', () => {
it('should not call accounts.setAccountInfo', (done) => {
spyOn(service['gigyaSDK'].accounts, 'setAccountInfo').and.callFake(
diff --git a/integration-libs/cdc/root/service/cdc-js.service.ts b/integration-libs/cdc/root/service/cdc-js.service.ts
index 26aee76e4d1..a86e511b464 100644
--- a/integration-libs/cdc/root/service/cdc-js.service.ts
+++ b/integration-libs/cdc/root/service/cdc-js.service.ts
@@ -24,6 +24,7 @@ import {
User,
WindowRef,
} from '@spartacus/core';
+import { OrganizationUserRegistrationForm } from '@spartacus/organization/user-registration/root';
import { UserProfileFacade, UserSignUp } from '@spartacus/user/profile/root';
import {
combineLatest,
@@ -35,10 +36,10 @@ import {
} from 'rxjs';
import { filter, switchMap, take, tap } from 'rxjs/operators';
import { CdcConfig } from '../config/cdc-config';
-import { CdcAuthFacade } from '../facade/cdc-auth.facade';
-import { CdcReConsentEvent } from '../events';
-import { CdcSiteConsentTemplate } from '../consent-management/model/index';
import { CdcConsentsLocalStorageService } from '../consent-management';
+import { CdcSiteConsentTemplate } from '../consent-management/model/index';
+import { CdcReConsentEvent } from '../events';
+import { CdcAuthFacade } from '../facade/cdc-auth.facade';
const defaultSessionTimeOut = 3600;
const setAccountInfoAPI = 'accounts.setAccountInfo';
@@ -124,7 +125,7 @@ export class CdcJsService implements OnDestroy {
(this.winRef.nativeWindow as { [key: string]: any })[
'__gigyaConf'
] = {
- include: 'id_token',
+ include: 'id_token, missing-required-fields',
};
}
}
@@ -255,13 +256,17 @@ export class CdcJsService implements OnDestroy {
context?: any
): Observable<{ status: string }> {
const missingConsentErrorCode = 206001;
+ let ignoreInterruptions = false;
+ const channel = this.getCurrentBaseSiteChannel();
+ if (channel && channel === 'B2C') {
+ ignoreInterruptions = true;
+ }
return this.getSessionExpirationValue().pipe(
switchMap((sessionExpiration) => {
return this.invokeAPI('accounts.login', {
loginID: email,
password: password,
- include: 'missing-required-fields',
- ignoreInterruptions: true,
+ ignoreInterruptions: ignoreInterruptions,
...(context && { context: context }),
sessionExpiry: sessionExpiration,
}).pipe(
@@ -285,6 +290,65 @@ export class CdcJsService implements OnDestroy {
})
);
}
+
+ /**
+ * Trigger CDC Organisation registration using CDC APIs.
+ *
+ * @param orgInfo
+ */
+ registerOrganisationWithoutScreenSet(
+ orgInfo: OrganizationUserRegistrationForm
+ ): Observable<{ status: string }> {
+ if (
+ !orgInfo?.companyName ||
+ !orgInfo?.email ||
+ !orgInfo?.firstName ||
+ !orgInfo?.lastName
+ ) {
+ return throwError(null);
+ } else {
+ const regSource: string = this.winRef.nativeWindow?.location?.href || '';
+ const message = orgInfo.message;
+ let department = null;
+ let position = null;
+ if (message) {
+ const msgList = message.replace('\n', '').split(';');
+ for (const msg of msgList) {
+ if (msg.trim().toLowerCase().search('department') === 0) {
+ department = msg.split(':')[1].trim();
+ } else if (msg.trim().toLowerCase().search('position') === 0) {
+ position = msg.split(':')[1].trim();
+ }
+ }
+ }
+
+ return this.invokeAPI('accounts.b2b.registerOrganization', {
+ organization: {
+ name: orgInfo.companyName,
+ street_address: orgInfo.addressLine1 + ' ' + orgInfo.addressLine2,
+ city: orgInfo.town,
+ state: orgInfo.region,
+ zip_code: orgInfo.postalCode,
+ country: orgInfo.country,
+ },
+ requester: {
+ firstName: orgInfo.firstName,
+ lastName: orgInfo.lastName,
+ email: orgInfo.email,
+ phone: orgInfo.phoneNumber,
+ department: department,
+ jobFunction: position,
+ },
+ regSource: regSource,
+ }).pipe(
+ take(1),
+ tap({
+ error: (errorResponse) => this.handleRegisterError(errorResponse),
+ })
+ );
+ }
+ }
+
/**
* Retrieves the organization selected by the logged in user
*
@@ -367,6 +431,16 @@ export class CdcJsService implements OnDestroy {
return baseSite;
}
+ private getCurrentBaseSiteChannel(): string {
+ let channel: string = '';
+ const baseSiteUid: string = this.getCurrentBaseSite();
+ this.baseSiteService
+ .get(baseSiteUid)
+ .pipe(take(1))
+ .subscribe((data) => (channel = data?.channel ?? ''));
+ return channel;
+ }
+
/**
* Trigger CDC forgot password using CDC APIs.
*
diff --git a/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap b/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap
index 6bd9f3ffbaa..d070e7678d8 100644
--- a/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap
+++ b/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap
@@ -5,6 +5,7 @@ exports[`Spartacus CDC schematics: ng-add CDC feature eager loading should impor
import { CdcModule } from "@spartacus/cdc";
import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets";
import { CdcAdministrationModule } from "@spartacus/cdc/organization/administration";
+import { CDCB2BRegisterModule } from "@spartacus/cdc/organization/user-registration";
import { CdcConfig, CdcRootModule } from "@spartacus/cdc/root";
import { CDCUserAccountModule } from "@spartacus/cdc/user-account";
import { CDCUserProfileModule } from "@spartacus/cdc/user-profile";
@@ -17,7 +18,8 @@ import { I18nConfig, provideConfig } from "@spartacus/core";
CdcModule,
CDCUserAccountModule,
CDCUserProfileModule,
- CdcAdministrationModule
+ CdcAdministrationModule,
+ CDCB2BRegisterModule
],
providers: [provideConfig({
i18n: {
@@ -128,6 +130,22 @@ export class AdministrationWrapperModule { }
"
`;
+exports[`Spartacus CDC schematics: ng-add CDC feature general setup should install the appropriate dependencies 4`] = `
+"import { NgModule } from '@angular/core';
+import { CDCB2BRegisterModule } from "@spartacus/cdc/organization/user-registration";
+import { OrganizationUserRegistrationModule } from "@spartacus/organization/user-registration";
+
+@NgModule({
+ declarations: [],
+ imports: [
+ OrganizationUserRegistrationModule,
+ CDCB2BRegisterModule
+ ]
+})
+export class OrganizationUserRegistrationWrapperModule { }
+"
+`;
+
exports[`Spartacus CDC schematics: ng-add CDC feature validation of jsSDKUrl should set the given javascriptUrl 1`] = `
"import { NgModule } from '@angular/core';
import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets";
diff --git a/integration-libs/cdc/schematics/add-cdc/index_spec.ts b/integration-libs/cdc/schematics/add-cdc/index_spec.ts
index 210d4f91313..7c899a0de99 100644
--- a/integration-libs/cdc/schematics/add-cdc/index_spec.ts
+++ b/integration-libs/cdc/schematics/add-cdc/index_spec.ts
@@ -14,7 +14,9 @@ import {
CDC_FEATURE_NAME,
LibraryOptions as SpartacusCdcOptions,
organizationAdministrationWrapperModulePath,
+ organizationUserRegistrationWrapperModulePath,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
SpartacusOptions,
SPARTACUS_ASM,
SPARTACUS_CDC,
@@ -136,6 +138,7 @@ describe('Spartacus CDC schematics: ng-add', () => {
USER_ACCOUNT_FEATURE_NAME,
USER_PROFILE_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
],
},
appTree
@@ -164,6 +167,7 @@ describe('Spartacus CDC schematics: ng-add', () => {
USER_ACCOUNT_FEATURE_NAME,
USER_PROFILE_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
],
},
appTree
@@ -221,6 +225,11 @@ describe('Spartacus CDC schematics: ng-add', () => {
organizationAdministrationWrapperModulePath
);
expect(administrationWrapperModule).toMatchSnapshot();
+
+ const organizationUserRegistrationWrapperModule = appTree.readContent(
+ organizationUserRegistrationWrapperModulePath
+ );
+ expect(organizationUserRegistrationWrapperModule).toMatchSnapshot();
});
});
@@ -234,6 +243,7 @@ describe('Spartacus CDC schematics: ng-add', () => {
USER_ACCOUNT_FEATURE_NAME,
USER_PROFILE_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
],
},
appTree
diff --git a/integration-libs/cdc/tsconfig.lib.json b/integration-libs/cdc/tsconfig.lib.json
index 7d2419aa99d..aca72bf8a09 100644
--- a/integration-libs/cdc/tsconfig.lib.json
+++ b/integration-libs/cdc/tsconfig.lib.json
@@ -9,6 +9,7 @@
"sourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
+ "emitDecoratorMetadata": true,
"importHelpers": true,
"strict": true,
"types": [],
diff --git a/integration-libs/cdc/tsconfig.schematics.json b/integration-libs/cdc/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/integration-libs/cdc/tsconfig.schematics.json
+++ b/integration-libs/cdc/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/integration-libs/cds/package.json b/integration-libs/cds/package.json
index da8e44e3d07..3821b1a1a00 100644
--- a/integration-libs/cds/package.json
+++ b/integration-libs/cds/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/cds",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Context Driven Service library for Spartacus",
"keywords": [
"spartacus",
@@ -28,12 +28,12 @@
"@angular/core": "^15.2.4",
"@angular/router": "^15.2.4",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/tracking": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/tracking": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/integration-libs/cds/tsconfig.schematics.json b/integration-libs/cds/tsconfig.schematics.json
index 9ab41cbf808..6de3c72a504 100644
--- a/integration-libs/cds/tsconfig.schematics.json
+++ b/integration-libs/cds/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/integration-libs/digital-payments/package.json b/integration-libs/digital-payments/package.json
index 57786f137c3..726b83f117f 100644
--- a/integration-libs/digital-payments/package.json
+++ b/integration-libs/digital-payments/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/digital-payments",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Digital Payments Integration library for Spartacus",
"keywords": [
"spartacus",
@@ -27,11 +27,11 @@
"@angular/forms": "^15.2.4",
"@angular/router": "^15.2.4",
"@ng-select/ng-select": "^10.0.3",
- "@spartacus/cart": "5.0.0",
- "@spartacus/checkout": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/checkout": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/integration-libs/digital-payments/tsconfig.lib.json b/integration-libs/digital-payments/tsconfig.lib.json
index e7b50e33065..ae852f43a4f 100644
--- a/integration-libs/digital-payments/tsconfig.lib.json
+++ b/integration-libs/digital-payments/tsconfig.lib.json
@@ -12,40 +12,6 @@
"types": [],
"lib": ["dom", "esnext"],
"paths": {
- "@spartacus/checkout": ["dist/checkout"],
- "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"],
- "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"],
- "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"],
- "@spartacus/checkout/b2b": ["dist/checkout/b2b"],
- "@spartacus/checkout/b2b/occ": ["dist/checkout/b2b/occ"],
- "@spartacus/checkout/b2b/root": ["dist/checkout/b2b/root"],
- "@spartacus/checkout/base/assets": ["dist/checkout/base/assets"],
- "@spartacus/checkout/base/components": ["dist/checkout/base/components"],
- "@spartacus/checkout/base/core": ["dist/checkout/base/core"],
- "@spartacus/checkout/base": ["dist/checkout/base"],
- "@spartacus/checkout/base/occ": ["dist/checkout/base/occ"],
- "@spartacus/checkout/base/root": ["dist/checkout/base/root"],
- "@spartacus/checkout/scheduled-replenishment/assets": [
- "dist/checkout/scheduled-replenishment/assets"
- ],
- "@spartacus/checkout/scheduled-replenishment/components": [
- "dist/checkout/scheduled-replenishment/components"
- ],
- "@spartacus/checkout/scheduled-replenishment": [
- "dist/checkout/scheduled-replenishment"
- ],
- "@spartacus/checkout/scheduled-replenishment/root": [
- "dist/checkout/scheduled-replenishment/root"
- ],
- "@spartacus/cart/import-export/assets": [
- "dist/cart/import-export/assets"
- ],
- "@spartacus/cart/import-export/components": [
- "dist/cart/import-export/components"
- ],
- "@spartacus/cart/import-export/core": ["dist/cart/import-export/core"],
- "@spartacus/cart/import-export": ["dist/cart/import-export"],
- "@spartacus/cart/import-export/root": ["dist/cart/import-export/root"],
"@spartacus/cart/base/assets": ["dist/cart/base/assets"],
"@spartacus/cart/base/components/add-to-cart": [
"dist/cart/base/components/add-to-cart"
@@ -58,6 +24,15 @@
"@spartacus/cart/base": ["dist/cart/base"],
"@spartacus/cart/base/occ": ["dist/cart/base/occ"],
"@spartacus/cart/base/root": ["dist/cart/base/root"],
+ "@spartacus/cart/import-export/assets": [
+ "dist/cart/import-export/assets"
+ ],
+ "@spartacus/cart/import-export/components": [
+ "dist/cart/import-export/components"
+ ],
+ "@spartacus/cart/import-export/core": ["dist/cart/import-export/core"],
+ "@spartacus/cart/import-export": ["dist/cart/import-export"],
+ "@spartacus/cart/import-export/root": ["dist/cart/import-export/root"],
"@spartacus/cart": ["dist/cart"],
"@spartacus/cart/quick-order/assets": ["dist/cart/quick-order/assets"],
"@spartacus/cart/quick-order/components": [
@@ -84,14 +59,33 @@
"@spartacus/cart/wish-list/core": ["dist/cart/wish-list/core"],
"@spartacus/cart/wish-list": ["dist/cart/wish-list"],
"@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"],
+ "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"],
+ "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"],
+ "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"],
+ "@spartacus/checkout/b2b": ["dist/checkout/b2b"],
+ "@spartacus/checkout/b2b/occ": ["dist/checkout/b2b/occ"],
+ "@spartacus/checkout/b2b/root": ["dist/checkout/b2b/root"],
+ "@spartacus/checkout/base/assets": ["dist/checkout/base/assets"],
+ "@spartacus/checkout/base/components": ["dist/checkout/base/components"],
+ "@spartacus/checkout/base/core": ["dist/checkout/base/core"],
+ "@spartacus/checkout/base": ["dist/checkout/base"],
+ "@spartacus/checkout/base/occ": ["dist/checkout/base/occ"],
+ "@spartacus/checkout/base/root": ["dist/checkout/base/root"],
+ "@spartacus/checkout": ["dist/checkout"],
+ "@spartacus/checkout/scheduled-replenishment/assets": [
+ "dist/checkout/scheduled-replenishment/assets"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/components": [
+ "dist/checkout/scheduled-replenishment/components"
+ ],
+ "@spartacus/checkout/scheduled-replenishment": [
+ "dist/checkout/scheduled-replenishment"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/root": [
+ "dist/checkout/scheduled-replenishment/root"
+ ],
"@spartacus/core": ["dist/core"],
"@spartacus/storefront": ["dist/storefrontlib"],
- "@spartacus/order/assets": ["dist/order/assets"],
- "@spartacus/order/components": ["dist/order/components"],
- "@spartacus/order/core": ["dist/order/core"],
- "@spartacus/order": ["dist/order"],
- "@spartacus/order/occ": ["dist/order/occ"],
- "@spartacus/order/root": ["dist/order/root"],
"@spartacus/user/account/assets": ["dist/user/account/assets"],
"@spartacus/user/account/components": ["dist/user/account/components"],
"@spartacus/user/account/core": ["dist/user/account/core"],
@@ -104,7 +98,13 @@
"@spartacus/user/profile/core": ["dist/user/profile/core"],
"@spartacus/user/profile": ["dist/user/profile"],
"@spartacus/user/profile/occ": ["dist/user/profile/occ"],
- "@spartacus/user/profile/root": ["dist/user/profile/root"]
+ "@spartacus/user/profile/root": ["dist/user/profile/root"],
+ "@spartacus/order/assets": ["dist/order/assets"],
+ "@spartacus/order/components": ["dist/order/components"],
+ "@spartacus/order/core": ["dist/order/core"],
+ "@spartacus/order": ["dist/order"],
+ "@spartacus/order/occ": ["dist/order/occ"],
+ "@spartacus/order/root": ["dist/order/root"]
}
},
"angularCompilerOptions": {
diff --git a/integration-libs/digital-payments/tsconfig.schematics.json b/integration-libs/digital-payments/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/integration-libs/digital-payments/tsconfig.schematics.json
+++ b/integration-libs/digital-payments/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.component.ts b/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.component.ts
index 9562771d32c..366b41d2e06 100644
--- a/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.component.ts
+++ b/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.component.ts
@@ -32,7 +32,12 @@ export class VisualPickingTabComponent implements AfterViewInit {
);
}
- selectedProductCodes: string[] = [];
+ public get selectedProductCodes() {
+ return this.visualPickingTabService.selectedProductCodes;
+ }
+ public set selectedProductCodes(selectedProducts: string[]) {
+ this.visualPickingTabService.selectedProductCodes = selectedProducts;
+ }
@ViewChild(VisualViewerComponent, { read: VisualViewerService })
visualViewerService: VisualViewerService;
diff --git a/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.service.ts b/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.service.ts
index 49c52db3f30..110b5063222 100644
--- a/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.service.ts
+++ b/integration-libs/epd-visualization/components/visual-picking/visual-picking-tab/visual-picking-tab.service.ts
@@ -98,6 +98,15 @@ export class VisualPickingTabService implements OnDestroy {
private getProductReferencesSubscription: Subscription;
private getFilteredProductReferencesSubscription: Subscription;
+ private _selectedProductCodes: string[] = [];
+ public get selectedProductCodes() {
+ return this._selectedProductCodes;
+ }
+ public set selectedProductCodes(selectedProducts: string[]) {
+ this._selectedProductCodes = selectedProducts;
+ this.changeDetectorRef.detectChanges();
+ }
+
/**
* When true, error messages will be shown when visualization load/lookup failures occur.
*/
diff --git a/integration-libs/epd-visualization/components/visual-viewer/visual-viewer.service.ts b/integration-libs/epd-visualization/components/visual-viewer/visual-viewer.service.ts
index 21d0e710804..ce00830d174 100644
--- a/integration-libs/epd-visualization/components/visual-viewer/visual-viewer.service.ts
+++ b/integration-libs/epd-visualization/components/visual-viewer/visual-viewer.service.ts
@@ -1104,17 +1104,22 @@ export class VisualViewerService implements OnDestroy {
this.windowRef.document
.getElementsByTagName('head')[0]
.appendChild(script);
- script.onload = () => {
+
+ (this.windowRef.document as any).onUi5Bootstrapped = () => {
subscriber.next();
subscriber.complete();
};
+
script.onerror = (error: any) => {
subscriber.error(error);
subscriber.complete();
};
+
script.id = 'sap-ui-bootstrap';
script.type = 'text/javascript';
script.setAttribute('data-sap-ui-compatVersion', 'edge');
+ script.setAttribute('data-sap-ui-async', 'true');
+ script.setAttribute('data-sap-ui-onInit', 'document.onUi5Bootstrapped()');
script.src = ui5Config.bootstrapUrl;
});
}
diff --git a/integration-libs/epd-visualization/package.json b/integration-libs/epd-visualization/package.json
index 3a5d5919187..23a84e541d2 100644
--- a/integration-libs/epd-visualization/package.json
+++ b/integration-libs/epd-visualization/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/epd-visualization",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "SAP Enterprise Product Development Visualization integration library for Spartacus",
"keywords": [
"spartacus",
@@ -38,11 +38,11 @@
"@angular/forms": "^15.2.4",
"@angular/router": "^15.2.4",
"@sapui5/ts-types-esm": "1.108.14",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
diff --git a/integration-libs/epd-visualization/root/testing/epd-visualization-test-config.ts b/integration-libs/epd-visualization/root/testing/epd-visualization-test-config.ts
index 9ae2ced1fef..507699ae820 100644
--- a/integration-libs/epd-visualization/root/testing/epd-visualization-test-config.ts
+++ b/integration-libs/epd-visualization/root/testing/epd-visualization-test-config.ts
@@ -14,8 +14,7 @@ export function getTestConfig(): EpdVisualizationConfig {
'https://epd-acc-eu20-consumer.epdacc.cfapps.eu20.hana.ondemand.com',
},
ui5: {
- bootstrapUrl:
- 'https://sapui5.hana.ondemand.com/1.108.14/resources/sap-ui-core.js',
+ bootstrapUrl: 'https://ui5.sap.com/1.108/resources/sap-ui-core.js',
},
},
};
diff --git a/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap b/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap
index c3cf97a731b..085cdda13ba 100644
--- a/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap
+++ b/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap
@@ -22,7 +22,7 @@ import { EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/e
provideConfig({
epdVisualization: {
ui5: {
- bootstrapUrl: "https://sapui5.hana.ondemand.com/1.108.14/resources/sap-ui-core.js"
+ bootstrapUrl: "https://ui5.sap.com/1.108/resources/sap-ui-core.js"
},
apis: {
@@ -58,7 +58,7 @@ import { EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/e
provideConfig({
epdVisualization: {
ui5: {
- bootstrapUrl: "https://sapui5.hana.ondemand.com/1.108.14/resources/sap-ui-core.js"
+ bootstrapUrl: "https://ui5.sap.com/1.108/resources/sap-ui-core.js"
},
apis: {
@@ -100,7 +100,7 @@ import { EpdVisualizationConfig, EpdVisualizationRootModule, EPD_VISUALIZATION_F
provideConfig({
epdVisualization: {
ui5: {
- bootstrapUrl: "https://sapui5.hana.ondemand.com/1.108.14/resources/sap-ui-core.js"
+ bootstrapUrl: "https://ui5.sap.com/1.108/resources/sap-ui-core.js"
},
apis: {
diff --git a/integration-libs/epd-visualization/tsconfig.schematics.json b/integration-libs/epd-visualization/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/integration-libs/epd-visualization/tsconfig.schematics.json
+++ b/integration-libs/epd-visualization/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/integration-libs/s4om/package.json b/integration-libs/s4om/package.json
index 5f04da81a4e..d0ddb7f36b9 100644
--- a/integration-libs/s4om/package.json
+++ b/integration-libs/s4om/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/s4om",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "S/4HANA Order Management (b2b feature)",
"keywords": [
"spartacus",
@@ -23,11 +23,12 @@
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/requested-delivery-date": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"rxjs": "^6.6.0"
},
"publishConfig": {
diff --git a/integration-libs/s4om/root/s4om-root.module.ts b/integration-libs/s4om/root/s4om-root.module.ts
index 8eb751b08b2..a176a2349d7 100644
--- a/integration-libs/s4om/root/s4om-root.module.ts
+++ b/integration-libs/s4om/root/s4om-root.module.ts
@@ -6,12 +6,16 @@
import { NgModule } from '@angular/core';
import { CartOutlets } from '@spartacus/cart/base/root';
+import { RequestedDeliveryDateComponentsModule } from '@spartacus/requested-delivery-date/root';
import { OutletPosition, provideOutlet } from '@spartacus/storefront';
import { ScheduleLinesComponent } from './components/schedule-lines/schedule-lines.component';
import { ScheduleLinesModule } from './components/schedule-lines/schedule-lines.module';
@NgModule({
- imports: [ScheduleLinesModule],
+ imports: [
+ ScheduleLinesModule,
+ RequestedDeliveryDateComponentsModule, //Adding dependency with Requested Delivery Date so that the library gets installed along with S4OM
+ ],
providers: [
provideOutlet({
id: CartOutlets.ITEM_DETAILS,
diff --git a/integration-libs/s4om/schematics/add-s4om/schema.json b/integration-libs/s4om/schematics/add-s4om/schema.json
index 8aa903b709f..19c66cb018b 100644
--- a/integration-libs/s4om/schematics/add-s4om/schema.json
+++ b/integration-libs/s4om/schematics/add-s4om/schema.json
@@ -24,7 +24,18 @@
"features": {
"type": "array",
"uniqueItems": true,
- "default": ["S4HANA-Order-Management"]
+ "default": ["S4HANA-Order-Management"],
+ "x-prompt": {
+ "message": "Which S/4 HANA Order Management features would you like to set up?",
+ "type": "list",
+ "items": [
+ { "value": "S4HANA-Order-Management", "label": "Schedule Lines" },
+ {
+ "value": "Requested-Delivery-Date",
+ "label": "Requested Delivery Date"
+ }
+ ]
+ }
}
},
"required": []
diff --git a/integration-libs/s4om/tsconfig.lib.json b/integration-libs/s4om/tsconfig.lib.json
index 81f7bd8bf7e..1c370c142e5 100644
--- a/integration-libs/s4om/tsconfig.lib.json
+++ b/integration-libs/s4om/tsconfig.lib.json
@@ -62,6 +62,19 @@
"@spartacus/cart/wish-list/root": ["dist/cart/wish-list/root"],
"@spartacus/core": ["dist/core"],
"@spartacus/storefront": ["dist/storefrontlib"],
+ "@spartacus/requested-delivery-date/assets": [
+ "dist/requested-delivery-date/assets"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "dist/requested-delivery-date/core"
+ ],
+ "@spartacus/requested-delivery-date": ["dist/requested-delivery-date"],
+ "@spartacus/requested-delivery-date/occ": [
+ "dist/requested-delivery-date/occ"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "dist/requested-delivery-date/root"
+ ],
"@spartacus/user/account/assets": ["dist/user/account/assets"],
"@spartacus/user/account/components": ["dist/user/account/components"],
"@spartacus/user/account/core": ["dist/user/account/core"],
@@ -74,7 +87,38 @@
"@spartacus/user/profile/core": ["dist/user/profile/core"],
"@spartacus/user/profile": ["dist/user/profile"],
"@spartacus/user/profile/occ": ["dist/user/profile/occ"],
- "@spartacus/user/profile/root": ["dist/user/profile/root"]
+ "@spartacus/user/profile/root": ["dist/user/profile/root"],
+ "@spartacus/checkout/b2b/assets": ["dist/checkout/b2b/assets"],
+ "@spartacus/checkout/b2b/components": ["dist/checkout/b2b/components"],
+ "@spartacus/checkout/b2b/core": ["dist/checkout/b2b/core"],
+ "@spartacus/checkout/b2b": ["dist/checkout/b2b"],
+ "@spartacus/checkout/b2b/occ": ["dist/checkout/b2b/occ"],
+ "@spartacus/checkout/b2b/root": ["dist/checkout/b2b/root"],
+ "@spartacus/checkout/base/assets": ["dist/checkout/base/assets"],
+ "@spartacus/checkout/base/components": ["dist/checkout/base/components"],
+ "@spartacus/checkout/base/core": ["dist/checkout/base/core"],
+ "@spartacus/checkout/base": ["dist/checkout/base"],
+ "@spartacus/checkout/base/occ": ["dist/checkout/base/occ"],
+ "@spartacus/checkout/base/root": ["dist/checkout/base/root"],
+ "@spartacus/checkout": ["dist/checkout"],
+ "@spartacus/checkout/scheduled-replenishment/assets": [
+ "dist/checkout/scheduled-replenishment/assets"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/components": [
+ "dist/checkout/scheduled-replenishment/components"
+ ],
+ "@spartacus/checkout/scheduled-replenishment": [
+ "dist/checkout/scheduled-replenishment"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/root": [
+ "dist/checkout/scheduled-replenishment/root"
+ ],
+ "@spartacus/order/assets": ["dist/order/assets"],
+ "@spartacus/order/components": ["dist/order/components"],
+ "@spartacus/order/core": ["dist/order/core"],
+ "@spartacus/order": ["dist/order"],
+ "@spartacus/order/occ": ["dist/order/occ"],
+ "@spartacus/order/root": ["dist/order/root"]
},
"resolveJsonModule": true,
"esModuleInterop": true
diff --git a/integration-libs/s4om/tsconfig.schematics.json b/integration-libs/s4om/tsconfig.schematics.json
index 8b9da397933..4892ea92d95 100644
--- a/integration-libs/s4om/tsconfig.schematics.json
+++ b/integration-libs/s4om/tsconfig.schematics.json
@@ -390,6 +390,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -475,6 +490,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -512,6 +530,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/integration-libs/segment-refs/README.md b/integration-libs/segment-refs/README.md
new file mode 100644
index 00000000000..8b44e1b8999
--- /dev/null
+++ b/integration-libs/segment-refs/README.md
@@ -0,0 +1,7 @@
+# Spartacus Segment Reference Integration
+
+Spartacus' Segment Reference library is an enhancement to Personalization library. Spartacus' Segment Reference library enables external system (Emarsys) segmentation based personalisation capabilities into Spartacus storefront
+
+It can be added to the existing Spartacus application by running `ng add @spartacus/segment-refs`. For more information about Spartacus schematics, visit the [official Spartacus schematics documentation page](https://sap.github.io/spartacus-docs/schematics/).
+
+For more information, see [Spartacus](https://github.com/SAP/spartacus).
diff --git a/integration-libs/segment-refs/jest.schematics.config.js b/integration-libs/segment-refs/jest.schematics.config.js
new file mode 100644
index 00000000000..ce45d273ab7
--- /dev/null
+++ b/integration-libs/segment-refs/jest.schematics.config.js
@@ -0,0 +1,35 @@
+const { pathsToModuleNameMapper } = require('ts-jest');
+const { compilerOptions } = require('./tsconfig.schematics.json');
+const { defaultTransformerOptions } = require('jest-preset-angular/presets');
+
+/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
+module.exports = {
+ preset: 'jest-preset-angular',
+ globalSetup: 'jest-preset-angular/global-setup',
+ moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
+ prefix: '/',
+ }),
+ setupFilesAfterEnv: ['/setup-jest.ts'],
+ testMatch: ['**/+(*_)+(spec).+(ts)'],
+ transform: {
+ '^.+\\.(ts|js|mjs|html|svg)$': [
+ 'jest-preset-angular',
+ {
+ ...defaultTransformerOptions,
+ tsconfig: '/tsconfig.schematics.json',
+ },
+ ],
+ },
+
+ collectCoverage: false,
+ coverageReporters: ['json', 'lcov', 'text', 'clover'],
+ coverageDirectory: '/../../coverage/segment/schematics',
+ coverageThreshold: {
+ global: {
+ statements: 90,
+ branches: 90,
+ functions: 90,
+ lines: 90,
+ },
+ },
+};
diff --git a/integration-libs/segment-refs/karma.conf.js b/integration-libs/segment-refs/karma.conf.js
new file mode 100644
index 00000000000..c784a91dad0
--- /dev/null
+++ b/integration-libs/segment-refs/karma.conf.js
@@ -0,0 +1,45 @@
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
+ plugins: [
+ require('karma-jasmine'),
+ require('karma-coverage'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('@angular-devkit/build-angular/plugins/karma'),
+ require('karma-junit-reporter'),
+ ],
+ client: {
+ clearContext: false, // leave Jasmine Spec Runner output visible in browser
+ },
+ reporters: ['progress', 'kjhtml', 'dots', 'junit'],
+ junitReporter: {
+ outputFile: 'unit-test-segment.xml',
+ outputDir: require('path').join(__dirname, '../../unit-tests-reports'),
+ useBrowserName: false,
+ },
+ coverageReporter: {
+ dir: require('path').join(__dirname, '../../coverage/segment'),
+ reporters: [{ type: 'lcov', subdir: '.' }, { type: 'text-summary' }],
+ check: {
+ global: {
+ statements: 90,
+ lines: 90,
+ branches: 75,
+ functions: 90,
+ },
+ },
+ },
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false,
+ restartOnFileChange: true,
+ });
+};
diff --git a/integration-libs/segment-refs/ng-package.json b/integration-libs/segment-refs/ng-package.json
new file mode 100644
index 00000000000..ffb739c7c84
--- /dev/null
+++ b/integration-libs/segment-refs/ng-package.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
+ "dest": "../../dist/segment-refs",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ },
+ "assets": ["**/*.scss", "schematics/**/*.json", "schematics/**/*.js"]
+}
diff --git a/integration-libs/segment-refs/package.json b/integration-libs/segment-refs/package.json
new file mode 100644
index 00000000000..005fa7301d6
--- /dev/null
+++ b/integration-libs/segment-refs/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "@spartacus/segment-refs",
+ "version": "6.3.0-1",
+ "description": "segment-refs",
+ "keywords": [
+ "spartacus",
+ "framework",
+ "storefront",
+ "segment"
+ ],
+ "homepage": "https://github.com/SAP/spartacus",
+ "repository": "https://github.com/SAP/spartacus",
+ "license": "Apache-2.0",
+ "scripts": {
+ "build:schematics": "npm run clean:schematics && ../../node_modules/.bin/tsc -p ./tsconfig.schematics.json",
+ "clean:schematics": "../../node_modules/.bin/rimraf --glob \"schematics/**/*.js\" \"schematics/**/*.js.map\" \"schematics/**/*.d.ts\"",
+ "test:schematics": "npm --prefix ../../projects/schematics/ run clean && npm run clean:schematics && ../../node_modules/.bin/jest --config ./jest.schematics.config.js"
+ },
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "@angular-devkit/schematics": "^15.2.4",
+ "@angular/common": "^15.2.4",
+ "@angular/core": "^15.2.4",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "rxjs": "^6.6.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "schematics": "./schematics/collection.json"
+}
diff --git a/integration-libs/segment-refs/project.json b/integration-libs/segment-refs/project.json
new file mode 100644
index 00000000000..7a907450d7e
--- /dev/null
+++ b/integration-libs/segment-refs/project.json
@@ -0,0 +1,50 @@
+{
+ "name": "segment-refs",
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
+ "projectType": "library",
+ "sourceRoot": "integration-libs/segment-refs",
+ "prefix": "cx",
+ "targets": {
+ "build": {
+ "executor": "@angular-devkit/build-angular:ng-packagr",
+ "options": {
+ "project": "integration-libs/segment-refs/ng-package.json"
+ },
+ "configurations": {
+ "production": {
+ "tsConfig": "integration-libs/segment-refs/tsconfig.lib.prod.json"
+ },
+ "development": {
+ "tsConfig": "integration-libs/segment-refs/tsconfig.lib.json"
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "test": {
+ "executor": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "integration-libs/segment-refs/test.ts",
+ "tsConfig": "integration-libs/segment-refs/tsconfig.spec.json",
+ "polyfills": ["zone.js", "zone.js/testing"],
+ "karmaConfig": "integration-libs/segment-refs/karma.conf.js"
+ }
+ },
+ "test-jest": {
+ "executor": "nx:run-commands",
+ "options": {
+ "command": "npm run test:schematics",
+ "cwd": "integration-libs/segment-refs"
+ }
+ },
+ "lint": {
+ "executor": "@angular-eslint/builder:lint",
+ "options": {
+ "lintFilePatterns": [
+ "integration-libs/segment-refs/**/*.ts",
+ "integration-libs/segment-refs/**/*.html"
+ ]
+ }
+ }
+ },
+ "tags": ["type:feature", "type:integration"]
+}
diff --git a/integration-libs/segment-refs/public_api.ts b/integration-libs/segment-refs/public_api.ts
new file mode 100644
index 00000000000..5a1a5ac7cbe
--- /dev/null
+++ b/integration-libs/segment-refs/public_api.ts
@@ -0,0 +1,10 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/*
+ * Public API Surface of segment
+ */
+export * from './root/public_api';
diff --git a/integration-libs/segment-refs/root/config/default-segment-refs-config.ts b/integration-libs/segment-refs/root/config/default-segment-refs-config.ts
new file mode 100644
index 00000000000..e7bbced03cd
--- /dev/null
+++ b/integration-libs/segment-refs/root/config/default-segment-refs-config.ts
@@ -0,0 +1,13 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { SegmentRefsConfig } from './segment-refs-config';
+
+export const defaultSegmentRefsConfig: SegmentRefsConfig = {
+ segmentRefs: {
+ httpHeaderName: 'Segmentrefs',
+ },
+};
diff --git a/integration-libs/segment-refs/root/config/segment-refs-config.ts b/integration-libs/segment-refs/root/config/segment-refs-config.ts
new file mode 100644
index 00000000000..c75f6f79358
--- /dev/null
+++ b/integration-libs/segment-refs/root/config/segment-refs-config.ts
@@ -0,0 +1,22 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Injectable } from '@angular/core';
+import { Config } from '@spartacus/core';
+
+@Injectable({
+ providedIn: 'root',
+ useExisting: Config,
+})
+export abstract class SegmentRefsConfig {
+ segmentRefs?: {
+ httpHeaderName: string;
+ };
+}
+
+declare module '@spartacus/core' {
+ interface Config extends SegmentRefsConfig {}
+}
diff --git a/integration-libs/segment-refs/root/feature-name.ts b/integration-libs/segment-refs/root/feature-name.ts
new file mode 100644
index 00000000000..0ac97b8e131
--- /dev/null
+++ b/integration-libs/segment-refs/root/feature-name.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export const SEGMENT_REFS_FEATURE = 'Segment-Refs';
diff --git a/integration-libs/segment-refs/root/http-interceptors/index.ts b/integration-libs/segment-refs/root/http-interceptors/index.ts
new file mode 100644
index 00000000000..f263dae1da4
--- /dev/null
+++ b/integration-libs/segment-refs/root/http-interceptors/index.ts
@@ -0,0 +1,17 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { Provider } from '@angular/core';
+import { HTTP_INTERCEPTORS } from '@angular/common/http';
+import { OccSegmentRefsInterceptor } from './occ-segment-refs.interceptor';
+
+export const segmentRefsInterceptors: Provider[] = [
+ {
+ provide: HTTP_INTERCEPTORS,
+ useExisting: OccSegmentRefsInterceptor,
+ multi: true,
+ },
+];
diff --git a/integration-libs/segment-refs/root/http-interceptors/occ-segment-refs.interceptor.spec.ts b/integration-libs/segment-refs/root/http-interceptors/occ-segment-refs.interceptor.spec.ts
new file mode 100644
index 00000000000..28f2bc549ca
--- /dev/null
+++ b/integration-libs/segment-refs/root/http-interceptors/occ-segment-refs.interceptor.spec.ts
@@ -0,0 +1,166 @@
+import { HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
+import {
+ HttpClientTestingModule,
+ HttpTestingController,
+} from '@angular/common/http/testing';
+import { inject, TestBed } from '@angular/core/testing';
+import { WindowRef } from '@spartacus/core';
+import { SegmentRefsConfig } from '../config/segment-refs-config';
+import { OccSegmentRefsInterceptor } from './occ-segment-refs.interceptor';
+
+const url =
+ 'https://localhost:9002/occ/v2/electronics-spa/cms/pages?lang=en&curr=USD';
+const mockSegmentRefsConfig: SegmentRefsConfig = {
+ segmentRefs: {
+ httpHeaderName: 'mock-Segmentrefs',
+ },
+};
+const MockWindowRef1 = {
+ localStorage: {
+ setItem: (_key: string, _value: string) => {},
+ },
+ isBrowser(): boolean {
+ return true;
+ },
+ location: {
+ href: 'http://localhost:4200/electronics-spa/en/USD/?segmentrefs=footwear,bags',
+ },
+};
+const MockWindowRef2 = {
+ localStorage: {
+ getItem: (_key: string): string => {
+ return 'footwear,bags';
+ },
+ },
+ isBrowser(): boolean {
+ return true;
+ },
+ location: {
+ href: 'http://localhost:4200/electronics-spa/en/USD/',
+ },
+};
+const MockWindowRef3 = {
+ localStorage: {
+ getItem: (_key: string): null => {
+ return null;
+ },
+ },
+ isBrowser(): boolean {
+ return true;
+ },
+ location: {
+ href: 'http://localhost:4200/electronics-spa/en/USD/',
+ },
+};
+describe('OccSegmentRefsInterceptor', () => {
+ describe('launch storefront with url containing segmentrefs', () => {
+ let httpMock: HttpTestingController;
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [
+ { provide: SegmentRefsConfig, useValue: mockSegmentRefsConfig },
+ { provide: WindowRef, useValue: MockWindowRef1 },
+ {
+ provide: HTTP_INTERCEPTORS,
+ useClass: OccSegmentRefsInterceptor,
+ multi: true,
+ },
+ ],
+ });
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+ afterEach(() => {
+ httpMock.verify();
+ });
+ it('should add request header if segmentrefs exists in url', inject(
+ [HttpClient],
+ (http: HttpClient) => {
+ http.get(url).subscribe((result) => {
+ expect(result).toBeTruthy();
+ });
+ const mockReq = httpMock.expectOne((req) => {
+ return req.method === 'GET';
+ });
+ const perHeader = mockReq.request.headers.get('mock-Segmentrefs');
+ expect(perHeader).toBeTruthy();
+ expect(perHeader).toEqual('footwear,bags');
+ mockReq.flush('someData');
+ }
+ ));
+ });
+
+ describe('launch storefront with url not containing segmentrefs but previous histroty exists', () => {
+ let httpMock: HttpTestingController;
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [
+ { provide: SegmentRefsConfig, useValue: mockSegmentRefsConfig },
+ { provide: WindowRef, useValue: MockWindowRef2 },
+ {
+ provide: HTTP_INTERCEPTORS,
+ useClass: OccSegmentRefsInterceptor,
+ multi: true,
+ },
+ ],
+ });
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+ afterEach(() => {
+ httpMock.verify();
+ });
+ it('should add request header if segmentrefs exists in local storage', inject(
+ [HttpClient],
+ (http: HttpClient) => {
+ http.get(url).subscribe((result) => {
+ expect(result).toBeTruthy();
+ });
+ const mockReq = httpMock.expectOne((req) => {
+ return req.method === 'GET';
+ });
+ const perHeader = mockReq.request.headers.get('mock-Segmentrefs');
+ expect(perHeader).toBeTruthy();
+ expect(perHeader).toEqual('footwear,bags');
+ mockReq.flush('someData');
+ }
+ ));
+ });
+
+ describe('launch storefront with url not containing segmentrefs and no previous history of segmentRefs', () => {
+ let httpMock: HttpTestingController;
+ beforeEach(() => {
+ TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [
+ { provide: SegmentRefsConfig, useValue: mockSegmentRefsConfig },
+ { provide: WindowRef, useValue: MockWindowRef3 },
+ {
+ provide: HTTP_INTERCEPTORS,
+ useClass: OccSegmentRefsInterceptor,
+ multi: true,
+ },
+ ],
+ });
+ httpMock = TestBed.inject(HttpTestingController);
+ });
+ afterEach(() => {
+ httpMock.verify();
+ });
+ it('should not add request header if segmentrefs doesnot exists', inject(
+ [HttpClient],
+ (http: HttpClient) => {
+ http.get(url).subscribe((result) => {
+ expect(result).toBeTruthy();
+ });
+ const mockReq = httpMock.expectOne((req) => {
+ return req.method === 'GET';
+ });
+ const perHeader = mockReq.request.headers.get('mock-Segmentrefs');
+ expect(perHeader).toBeFalsy();
+ expect(perHeader).toEqual(null);
+ mockReq.flush('someData');
+ }
+ ));
+ });
+});
diff --git a/integration-libs/segment-refs/root/http-interceptors/occ-segment-refs.interceptor.ts b/integration-libs/segment-refs/root/http-interceptors/occ-segment-refs.interceptor.ts
new file mode 100644
index 00000000000..07d47d231ee
--- /dev/null
+++ b/integration-libs/segment-refs/root/http-interceptors/occ-segment-refs.interceptor.ts
@@ -0,0 +1,87 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {
+ HttpEvent,
+ HttpHandler,
+ HttpInterceptor,
+ HttpRequest,
+} from '@angular/common/http';
+import { Injectable, inject, isDevMode } from '@angular/core';
+import { Observable } from 'rxjs';
+import { LoggerService, OccEndpointsService, WindowRef } from '@spartacus/core';
+import { SegmentRefsConfig } from '../config/segment-refs-config';
+
+@Injectable({ providedIn: 'root' })
+export class OccSegmentRefsInterceptor implements HttpInterceptor {
+ private segmentRefs?: string | null;
+ private requestHeader?: string;
+ protected readonly SEGMENT_REFS_KEY = 'segment-refs';
+ protected readonly SEGMENT_REFS_QUERY_PARAM = 'segmentrefs';
+
+ protected logger = inject(LoggerService);
+
+ constructor(
+ protected config: SegmentRefsConfig,
+ protected occEndpoints: OccEndpointsService,
+ protected winRef: WindowRef
+ ) {
+ this.initialize();
+ }
+
+ /**
+ * Fetched the segment reference ID from URL query parameter and saves it into
+ * browser local storage
+ */
+ protected initialize() {
+ const url = this.winRef.location.href ?? '';
+ const queryParams = new URLSearchParams(url.substring(url.indexOf('?')));
+ this.segmentRefs = queryParams.get(this.SEGMENT_REFS_QUERY_PARAM);
+ if (this.segmentRefs) {
+ this.winRef.localStorage?.setItem(
+ this.SEGMENT_REFS_KEY,
+ this.segmentRefs
+ );
+ } else {
+ this.segmentRefs = this.winRef.localStorage?.getItem(
+ this.SEGMENT_REFS_KEY
+ );
+ }
+ if (this.winRef.isBrowser()) {
+ if (!this.config.segmentRefs?.httpHeaderName && isDevMode()) {
+ this.logger.warn(`There is no httpHeaderName configured in Segment`);
+ }
+ this.requestHeader =
+ this.config.segmentRefs?.httpHeaderName?.toLowerCase?.();
+ }
+ }
+
+ /**
+ * Adds a new request header 'Segmentrefs' to the given HTTP request.
+ * @param request The outgoing request object to handle.
+ * @param next The next interceptor in the chain, or the backend
+ * if no interceptors remain in the chain.
+ * @returns An observable of the event stream.
+ */
+ intercept(
+ request: HttpRequest,
+ next: HttpHandler
+ ): Observable> {
+ if (
+ this.winRef.isBrowser() &&
+ this.requestHeader &&
+ this.segmentRefs &&
+ request.url.includes(this.occEndpoints.getBaseUrl())
+ ) {
+ request = request.clone({
+ setHeaders: {
+ [this.requestHeader]: this.segmentRefs,
+ },
+ });
+ }
+ return next.handle(request);
+ }
+}
diff --git a/integration-libs/segment-refs/root/ng-package.json b/integration-libs/segment-refs/root/ng-package.json
new file mode 100644
index 00000000000..38e01ac17de
--- /dev/null
+++ b/integration-libs/segment-refs/root/ng-package.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
+ "lib": {
+ "entryFile": "./public_api.ts"
+ }
+}
diff --git a/integration-libs/segment-refs/root/public_api.ts b/integration-libs/segment-refs/root/public_api.ts
new file mode 100644
index 00000000000..998448de30c
--- /dev/null
+++ b/integration-libs/segment-refs/root/public_api.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './segment-refs-root.module';
diff --git a/integration-libs/segment-refs/root/segment-refs-root.module.ts b/integration-libs/segment-refs/root/segment-refs-root.module.ts
new file mode 100644
index 00000000000..925b30ad055
--- /dev/null
+++ b/integration-libs/segment-refs/root/segment-refs-root.module.ts
@@ -0,0 +1,20 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule } from '@angular/core';
+import { provideDefaultConfig } from '@spartacus/core';
+import { defaultSegmentRefsConfig } from './config/default-segment-refs-config';
+import { segmentRefsInterceptors } from './http-interceptors';
+
+@NgModule({
+ declarations: [],
+ imports: [],
+ providers: [
+ ...segmentRefsInterceptors,
+ provideDefaultConfig(defaultSegmentRefsConfig),
+ ],
+})
+export class SegmentRefsRootModule {}
diff --git a/integration-libs/segment-refs/schematics/.gitignore b/integration-libs/segment-refs/schematics/.gitignore
new file mode 100644
index 00000000000..c88f4d69e15
--- /dev/null
+++ b/integration-libs/segment-refs/schematics/.gitignore
@@ -0,0 +1,18 @@
+# Outputs
+**/*.js
+**/*.js.map
+**/*.d.ts
+
+# IDEs
+.idea/
+jsconfig.json
+.vscode/
+
+# Misc
+node_modules/
+npm-debug.log*
+yarn-error.log*
+
+# Mac OSX Finder files.
+**/.DS_Store
+.DS_Store
diff --git a/integration-libs/segment-refs/schematics/add-segment-refs/__snapshots__/index_spec.ts.snap b/integration-libs/segment-refs/schematics/add-segment-refs/__snapshots__/index_spec.ts.snap
new file mode 100644
index 00000000000..b450e8c1bea
--- /dev/null
+++ b/integration-libs/segment-refs/schematics/add-segment-refs/__snapshots__/index_spec.ts.snap
@@ -0,0 +1,29 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Spartacus segment-refs schematics: ng-add Segment-refs feature eager loading should import appropriate modules 1`] = `
+"import { NgModule } from '@angular/core';
+import { SegmentRefsRootModule } from "@spartacus/segment-refs/root";
+
+@NgModule({
+ declarations: [],
+ imports: [
+ SegmentRefsRootModule
+ ]
+})
+export class SegmentRefsFeatureModule { }
+"
+`;
+
+exports[`Spartacus segment-refs schematics: ng-add Segment-refs feature general setup should add the feature using the lazy loading syntax 1`] = `
+"import { NgModule } from '@angular/core';
+import { SegmentRefsRootModule } from "@spartacus/segment-refs/root";
+
+@NgModule({
+ declarations: [],
+ imports: [
+ SegmentRefsRootModule
+ ]
+})
+export class SegmentRefsFeatureModule { }
+"
+`;
diff --git a/integration-libs/segment-refs/schematics/add-segment-refs/index.ts b/integration-libs/segment-refs/schematics/add-segment-refs/index.ts
new file mode 100644
index 00000000000..3bf5c64d830
--- /dev/null
+++ b/integration-libs/segment-refs/schematics/add-segment-refs/index.ts
@@ -0,0 +1,45 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {
+ chain,
+ Rule,
+ SchematicContext,
+ Tree,
+} from '@angular-devkit/schematics';
+import {
+ addFeatures,
+ addPackageJsonDependenciesForLibrary,
+ analyzeApplication,
+ analyzeCrossFeatureDependencies,
+ finalizeInstallation,
+ readPackageJson,
+ validateSpartacusInstallation,
+ LibraryOptions as SpartacusSegmentRefsOptions,
+} from '@spartacus/schematics';
+import { peerDependencies } from '../../package.json';
+
+export function addSegmentRefsFeature(
+ options: SpartacusSegmentRefsOptions
+): Rule {
+ return (tree: Tree, _context: SchematicContext): Rule => {
+ const packageJson = readPackageJson(tree);
+ validateSpartacusInstallation(packageJson);
+
+ const features = analyzeCrossFeatureDependencies(
+ options.features as string[]
+ );
+
+ return chain([
+ analyzeApplication(options, features),
+
+ addFeatures(options, features),
+ addPackageJsonDependenciesForLibrary(peerDependencies, options),
+
+ finalizeInstallation(options, features),
+ ]);
+ };
+}
diff --git a/integration-libs/segment-refs/schematics/add-segment-refs/index_spec.ts b/integration-libs/segment-refs/schematics/add-segment-refs/index_spec.ts
new file mode 100644
index 00000000000..f6a4cfb3694
--- /dev/null
+++ b/integration-libs/segment-refs/schematics/add-segment-refs/index_spec.ts
@@ -0,0 +1,179 @@
+///
+
+import {
+ SchematicTestRunner,
+ UnitTestTree,
+} from '@angular-devkit/schematics/testing';
+import {
+ Schema as ApplicationOptions,
+ Style,
+} from '@schematics/angular/application/schema';
+import { Schema as WorkspaceOptions } from '@schematics/angular/workspace/schema';
+import {
+ LibraryOptions as SegmentRefsOptions,
+ segmentRefsFeatureModulePath,
+ SEGMENT_REFS_FEATURE_NAME,
+ SpartacusOptions,
+ SPARTACUS_SCHEMATICS,
+ SPARTACUS_SEGMENT_REFS,
+ trackingPersonalizationFeatureModulePath,
+ TRACKING_PERSONALIZATION_FEATURE_NAME,
+} from '@spartacus/schematics';
+import * as path from 'path';
+import { peerDependencies } from '../../package.json';
+
+const collectionPath = path.join(__dirname, '../collection.json');
+
+describe('Spartacus segment-refs schematics: ng-add', () => {
+ const schematicRunner = new SchematicTestRunner(
+ SPARTACUS_SEGMENT_REFS,
+ collectionPath
+ );
+
+ let appTree: UnitTestTree;
+
+ const workspaceOptions: WorkspaceOptions = {
+ name: 'workspace',
+ version: '0.5.0',
+ };
+
+ const appOptions: ApplicationOptions = {
+ name: 'schematics-test',
+ inlineStyle: false,
+ inlineTemplate: false,
+ routing: false,
+ style: Style.Scss,
+ skipTests: false,
+ projectRoot: '',
+ };
+
+ const spartacusDefaultOptions: SpartacusOptions = {
+ project: 'schematics-test',
+ lazy: true,
+ features: [],
+ };
+
+ const libraryNoFeaturesOptions: SegmentRefsOptions = {
+ project: 'schematics-test',
+ lazy: false,
+ features: [],
+ };
+
+ const segmentRefsFeatureOptions: SegmentRefsOptions = {
+ ...libraryNoFeaturesOptions,
+ features: [SEGMENT_REFS_FEATURE_NAME],
+ };
+
+ beforeEach(async () => {
+ schematicRunner.registerCollection(
+ SPARTACUS_SCHEMATICS,
+ path.join(
+ __dirname,
+ '../../../../projects/schematics/src/collection.json'
+ )
+ );
+
+ appTree = await schematicRunner.runExternalSchematic(
+ '@schematics/angular',
+ 'workspace',
+ workspaceOptions
+ );
+
+ appTree = await schematicRunner.runExternalSchematic(
+ '@schematics/angular',
+ 'application',
+ appOptions,
+ appTree
+ );
+
+ appTree = await schematicRunner.runExternalSchematic(
+ SPARTACUS_SCHEMATICS,
+ 'ng-add',
+ { ...spartacusDefaultOptions, name: 'schematics-test' },
+ appTree
+ );
+ });
+
+ describe('Without features', () => {
+ beforeEach(async () => {
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ libraryNoFeaturesOptions,
+ appTree
+ );
+ });
+
+ it('should not create any of the feature modules', () => {
+ expect(appTree.exists(segmentRefsFeatureModulePath)).toBeFalsy();
+ });
+ });
+
+ describe('Segment-refs feature', () => {
+ describe('general setup', () => {
+ beforeEach(async () => {
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ {
+ ...segmentRefsFeatureOptions,
+ features: [TRACKING_PERSONALIZATION_FEATURE_NAME],
+ },
+ appTree
+ );
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ segmentRefsFeatureOptions,
+ appTree
+ );
+ });
+
+ it('should install necessary Spartacus libraries', () => {
+ const packageJson = JSON.parse(appTree.readContent('package.json'));
+ let dependencies: Record = {};
+ dependencies = { ...packageJson.dependencies };
+ dependencies = { ...dependencies, ...packageJson.devDependencies };
+
+ for (const toAdd in peerDependencies) {
+ if (
+ !peerDependencies.hasOwnProperty(toAdd) ||
+ toAdd === SPARTACUS_SCHEMATICS
+ ) {
+ continue;
+ }
+ const expectedDependency = dependencies[toAdd];
+ expect(expectedDependency).toBeTruthy();
+ }
+ });
+
+ it('should add the feature using the lazy loading syntax', async () => {
+ const module = appTree.readContent(segmentRefsFeatureModulePath);
+ expect(module).toMatchSnapshot();
+ });
+ });
+
+ describe('eager loading', () => {
+ beforeEach(async () => {
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ {
+ ...segmentRefsFeatureOptions,
+ features: [TRACKING_PERSONALIZATION_FEATURE_NAME],
+ },
+ appTree
+ );
+ appTree = await schematicRunner.runSchematic(
+ 'ng-add',
+ { ...segmentRefsFeatureOptions, lazy: false },
+ appTree
+ );
+ });
+
+ it('should import appropriate modules', async () => {
+ const module = appTree.readContent(segmentRefsFeatureModulePath);
+ expect(module).toMatchSnapshot();
+ expect(
+ appTree.readContent(trackingPersonalizationFeatureModulePath)
+ ).toBeTruthy();
+ });
+ });
+ });
+});
diff --git a/integration-libs/segment-refs/schematics/add-segment-refs/schema.json b/integration-libs/segment-refs/schematics/add-segment-refs/schema.json
new file mode 100644
index 00000000000..77eb434283f
--- /dev/null
+++ b/integration-libs/segment-refs/schematics/add-segment-refs/schema.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "http://json-schema.org/schema",
+ "$id": "SegmentRefsSchematics",
+ "title": "Segment Refs Schematics",
+ "type": "object",
+ "properties": {
+ "project": {
+ "type": "string",
+ "description": "The name of the project.",
+ "$default": {
+ "$source": "projectName"
+ }
+ },
+ "debug": {
+ "description": "Display additional details during the running process.",
+ "type": "boolean",
+ "default": false
+ },
+ "features": {
+ "type": "array",
+ "uniqueItems": true,
+ "default": ["Segment-Refs"]
+ }
+ }
+}
diff --git a/integration-libs/segment-refs/schematics/collection.json b/integration-libs/segment-refs/schematics/collection.json
new file mode 100644
index 00000000000..682bcca6840
--- /dev/null
+++ b/integration-libs/segment-refs/schematics/collection.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
+ "schematics": {
+ "ng-add": {
+ "factory": "./add-segment-refs/index#addSegmentRefsFeature",
+ "description": "Add and configure Spartacus' Segment feature",
+ "schema": "./add-segment-refs/schema.json",
+ "private": true,
+ "hidden": true,
+ "aliases": ["install"]
+ },
+ "add": {
+ "factory": "./add-segment-refs/index#addSegmentRefsFeature",
+ "description": "Add and configure Spartacus' Segment feature",
+ "schema": "./add-segment-refs/schema.json"
+ }
+ }
+}
diff --git a/integration-libs/segment-refs/setup-jest.ts b/integration-libs/segment-refs/setup-jest.ts
new file mode 100644
index 00000000000..919fe8743ac
--- /dev/null
+++ b/integration-libs/segment-refs/setup-jest.ts
@@ -0,0 +1,8 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import 'jest-preset-angular/setup-jest';
+import 'zone.js';
diff --git a/integration-libs/segment-refs/test.ts b/integration-libs/segment-refs/test.ts
new file mode 100644
index 00000000000..bd3bae74074
--- /dev/null
+++ b/integration-libs/segment-refs/test.ts
@@ -0,0 +1,22 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting,
+} from '@angular/platform-browser-dynamic/testing';
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting(),
+ {
+ teardown: { destroyAfterEach: false },
+ }
+);
diff --git a/integration-libs/segment-refs/tsconfig.lib.json b/integration-libs/segment-refs/tsconfig.lib.json
new file mode 100644
index 00000000000..d9e7d2b243d
--- /dev/null
+++ b/integration-libs/segment-refs/tsconfig.lib.json
@@ -0,0 +1,29 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/lib",
+ "module": "es2020",
+ "moduleResolution": "node",
+ "declaration": true,
+ "sourceMap": true,
+ "inlineSources": true,
+ "experimentalDecorators": true,
+ "allowSyntheticDefaultImports": true,
+ "importHelpers": true,
+ "skipLibCheck": true,
+ "lib": ["dom", "esnext"],
+ "paths": {
+ "@spartacus/core": ["dist/core"]
+ },
+ "resolveJsonModule": true,
+ "esModuleInterop": true
+ },
+ "angularCompilerOptions": {
+ "skipTemplateCodegen": true,
+ "strictMetadataEmit": true,
+ "fullTemplateTypeCheck": true,
+ "strictInjectionParameters": true,
+ "enableResourceInlining": true
+ },
+ "exclude": ["test.ts", "**/*.spec.ts"]
+}
diff --git a/integration-libs/segment-refs/tsconfig.lib.prod.json b/integration-libs/segment-refs/tsconfig.lib.prod.json
new file mode 100644
index 00000000000..2a2faa884cf
--- /dev/null
+++ b/integration-libs/segment-refs/tsconfig.lib.prod.json
@@ -0,0 +1,9 @@
+{
+ "extends": "./tsconfig.lib.json",
+ "compilerOptions": {
+ "declarationMap": false
+ },
+ "angularCompilerOptions": {
+ "compilationMode": "partial"
+ }
+}
diff --git a/integration-libs/segment-refs/tsconfig.schematics.json b/integration-libs/segment-refs/tsconfig.schematics.json
new file mode 100644
index 00000000000..1652ce2b588
--- /dev/null
+++ b/integration-libs/segment-refs/tsconfig.schematics.json
@@ -0,0 +1,541 @@
+{
+ "compilerOptions": {
+ "baseUrl": "./",
+ "module": "CommonJs",
+ "types": ["jest"],
+ "paths": {
+ "@spartacus/schematics": ["../../projects/schematics/index"],
+ "@spartacus/setup": ["../../core-libs/setup/public_api"],
+ "@spartacus/setup/ssr": ["../../core-libs/setup/ssr/public_api"],
+ "@spartacus/asm/assets": ["../../feature-libs/asm/assets/public_api"],
+ "@spartacus/asm/components": [
+ "../../feature-libs/asm/components/public_api"
+ ],
+ "@spartacus/asm/core": ["../../feature-libs/asm/core/public_api"],
+ "@spartacus/asm": ["../../feature-libs/asm/public_api"],
+ "@spartacus/asm/occ": ["../../feature-libs/asm/occ/public_api"],
+ "@spartacus/asm/root": ["../../feature-libs/asm/root/public_api"],
+ "@spartacus/cart/base/assets": [
+ "../../feature-libs/cart/base/assets/public_api"
+ ],
+ "@spartacus/cart/base/components/add-to-cart": [
+ "../../feature-libs/cart/base/components/add-to-cart/public_api"
+ ],
+ "@spartacus/cart/base/components/mini-cart": [
+ "../../feature-libs/cart/base/components/mini-cart/public_api"
+ ],
+ "@spartacus/cart/base/components": [
+ "../../feature-libs/cart/base/components/public_api"
+ ],
+ "@spartacus/cart/base/core": [
+ "../../feature-libs/cart/base/core/public_api"
+ ],
+ "@spartacus/cart/base": ["../../feature-libs/cart/base/public_api"],
+ "@spartacus/cart/base/occ": [
+ "../../feature-libs/cart/base/occ/public_api"
+ ],
+ "@spartacus/cart/base/root": [
+ "../../feature-libs/cart/base/root/public_api"
+ ],
+ "@spartacus/cart/import-export/assets": [
+ "../../feature-libs/cart/import-export/assets/public_api"
+ ],
+ "@spartacus/cart/import-export/components": [
+ "../../feature-libs/cart/import-export/components/public_api"
+ ],
+ "@spartacus/cart/import-export/core": [
+ "../../feature-libs/cart/import-export/core/public_api"
+ ],
+ "@spartacus/cart/import-export": [
+ "../../feature-libs/cart/import-export/public_api"
+ ],
+ "@spartacus/cart/import-export/root": [
+ "../../feature-libs/cart/import-export/root/public_api"
+ ],
+ "@spartacus/cart": ["../../feature-libs/cart/public_api"],
+ "@spartacus/cart/quick-order/assets": [
+ "../../feature-libs/cart/quick-order/assets/public_api"
+ ],
+ "@spartacus/cart/quick-order/components": [
+ "../../feature-libs/cart/quick-order/components/public_api"
+ ],
+ "@spartacus/cart/quick-order/core": [
+ "../../feature-libs/cart/quick-order/core/public_api"
+ ],
+ "@spartacus/cart/quick-order": [
+ "../../feature-libs/cart/quick-order/public_api"
+ ],
+ "@spartacus/cart/quick-order/root": [
+ "../../feature-libs/cart/quick-order/root/public_api"
+ ],
+ "@spartacus/cart/saved-cart/assets": [
+ "../../feature-libs/cart/saved-cart/assets/public_api"
+ ],
+ "@spartacus/cart/saved-cart/components": [
+ "../../feature-libs/cart/saved-cart/components/public_api"
+ ],
+ "@spartacus/cart/saved-cart/core": [
+ "../../feature-libs/cart/saved-cart/core/public_api"
+ ],
+ "@spartacus/cart/saved-cart": [
+ "../../feature-libs/cart/saved-cart/public_api"
+ ],
+ "@spartacus/cart/saved-cart/occ": [
+ "../../feature-libs/cart/saved-cart/occ/public_api"
+ ],
+ "@spartacus/cart/saved-cart/root": [
+ "../../feature-libs/cart/saved-cart/root/public_api"
+ ],
+ "@spartacus/cart/wish-list/assets": [
+ "../../feature-libs/cart/wish-list/assets/public_api"
+ ],
+ "@spartacus/cart/wish-list/components/add-to-wishlist": [
+ "../../feature-libs/cart/wish-list/components/add-to-wishlist/public_api"
+ ],
+ "@spartacus/cart/wish-list/components": [
+ "../../feature-libs/cart/wish-list/components/public_api"
+ ],
+ "@spartacus/cart/wish-list/core": [
+ "../../feature-libs/cart/wish-list/core/public_api"
+ ],
+ "@spartacus/cart/wish-list": [
+ "../../feature-libs/cart/wish-list/public_api"
+ ],
+ "@spartacus/cart/wish-list/root": [
+ "../../feature-libs/cart/wish-list/root/public_api"
+ ],
+ "@spartacus/checkout/b2b/assets": [
+ "../../feature-libs/checkout/b2b/assets/public_api"
+ ],
+ "@spartacus/checkout/b2b/components": [
+ "../../feature-libs/checkout/b2b/components/public_api"
+ ],
+ "@spartacus/checkout/b2b/core": [
+ "../../feature-libs/checkout/b2b/core/public_api"
+ ],
+ "@spartacus/checkout/b2b": ["../../feature-libs/checkout/b2b/public_api"],
+ "@spartacus/checkout/b2b/occ": [
+ "../../feature-libs/checkout/b2b/occ/public_api"
+ ],
+ "@spartacus/checkout/b2b/root": [
+ "../../feature-libs/checkout/b2b/root/public_api"
+ ],
+ "@spartacus/checkout/base/assets": [
+ "../../feature-libs/checkout/base/assets/public_api"
+ ],
+ "@spartacus/checkout/base/components": [
+ "../../feature-libs/checkout/base/components/public_api"
+ ],
+ "@spartacus/checkout/base/core": [
+ "../../feature-libs/checkout/base/core/public_api"
+ ],
+ "@spartacus/checkout/base": [
+ "../../feature-libs/checkout/base/public_api"
+ ],
+ "@spartacus/checkout/base/occ": [
+ "../../feature-libs/checkout/base/occ/public_api"
+ ],
+ "@spartacus/checkout/base/root": [
+ "../../feature-libs/checkout/base/root/public_api"
+ ],
+ "@spartacus/checkout": ["../../feature-libs/checkout/public_api"],
+ "@spartacus/checkout/scheduled-replenishment/assets": [
+ "../../feature-libs/checkout/scheduled-replenishment/assets/public_api"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/components": [
+ "../../feature-libs/checkout/scheduled-replenishment/components/public_api"
+ ],
+ "@spartacus/checkout/scheduled-replenishment": [
+ "../../feature-libs/checkout/scheduled-replenishment/public_api"
+ ],
+ "@spartacus/checkout/scheduled-replenishment/root": [
+ "../../feature-libs/checkout/scheduled-replenishment/root/public_api"
+ ],
+ "@spartacus/customer-ticketing/assets": [
+ "../../feature-libs/customer-ticketing/assets/public_api"
+ ],
+ "@spartacus/customer-ticketing/components": [
+ "../../feature-libs/customer-ticketing/components/public_api"
+ ],
+ "@spartacus/customer-ticketing/core": [
+ "../../feature-libs/customer-ticketing/core/public_api"
+ ],
+ "@spartacus/customer-ticketing": [
+ "../../feature-libs/customer-ticketing/public_api"
+ ],
+ "@spartacus/customer-ticketing/occ": [
+ "../../feature-libs/customer-ticketing/occ/public_api"
+ ],
+ "@spartacus/customer-ticketing/root": [
+ "../../feature-libs/customer-ticketing/root/public_api"
+ ],
+ "@spartacus/order/assets": ["../../feature-libs/order/assets/public_api"],
+ "@spartacus/order/components": [
+ "../../feature-libs/order/components/public_api"
+ ],
+ "@spartacus/order/core": ["../../feature-libs/order/core/public_api"],
+ "@spartacus/order": ["../../feature-libs/order/public_api"],
+ "@spartacus/order/occ": ["../../feature-libs/order/occ/public_api"],
+ "@spartacus/order/root": ["../../feature-libs/order/root/public_api"],
+ "@spartacus/organization/account-summary/assets": [
+ "../../feature-libs/organization/account-summary/assets/public_api"
+ ],
+ "@spartacus/organization/account-summary/components": [
+ "../../feature-libs/organization/account-summary/components/public_api"
+ ],
+ "@spartacus/organization/account-summary/core": [
+ "../../feature-libs/organization/account-summary/core/public_api"
+ ],
+ "@spartacus/organization/account-summary": [
+ "../../feature-libs/organization/account-summary/public_api"
+ ],
+ "@spartacus/organization/account-summary/occ": [
+ "../../feature-libs/organization/account-summary/occ/public_api"
+ ],
+ "@spartacus/organization/account-summary/root": [
+ "../../feature-libs/organization/account-summary/root/public_api"
+ ],
+ "@spartacus/organization/administration/assets": [
+ "../../feature-libs/organization/administration/assets/public_api"
+ ],
+ "@spartacus/organization/administration/components": [
+ "../../feature-libs/organization/administration/components/public_api"
+ ],
+ "@spartacus/organization/administration/core": [
+ "../../feature-libs/organization/administration/core/public_api"
+ ],
+ "@spartacus/organization/administration": [
+ "../../feature-libs/organization/administration/public_api"
+ ],
+ "@spartacus/organization/administration/occ": [
+ "../../feature-libs/organization/administration/occ/public_api"
+ ],
+ "@spartacus/organization/administration/root": [
+ "../../feature-libs/organization/administration/root/public_api"
+ ],
+ "@spartacus/organization": ["../../feature-libs/organization/public_api"],
+ "@spartacus/organization/order-approval/assets": [
+ "../../feature-libs/organization/order-approval/assets/public_api"
+ ],
+ "@spartacus/organization/order-approval": [
+ "../../feature-libs/organization/order-approval/public_api"
+ ],
+ "@spartacus/organization/order-approval/root": [
+ "../../feature-libs/organization/order-approval/root/public_api"
+ ],
+ "@spartacus/organization/unit-order/assets": [
+ "../../feature-libs/organization/unit-order/assets/public_api"
+ ],
+ "@spartacus/organization/unit-order/components": [
+ "../../feature-libs/organization/unit-order/components/public_api"
+ ],
+ "@spartacus/organization/unit-order/core": [
+ "../../feature-libs/organization/unit-order/core/public_api"
+ ],
+ "@spartacus/organization/unit-order": [
+ "../../feature-libs/organization/unit-order/public_api"
+ ],
+ "@spartacus/organization/unit-order/occ": [
+ "../../feature-libs/organization/unit-order/occ/public_api"
+ ],
+ "@spartacus/organization/unit-order/root": [
+ "../../feature-libs/organization/unit-order/root/public_api"
+ ],
+ "@spartacus/organization/user-registration/assets": [
+ "../../feature-libs/organization/user-registration/assets/public_api"
+ ],
+ "@spartacus/organization/user-registration/components": [
+ "../../feature-libs/organization/user-registration/components/public_api"
+ ],
+ "@spartacus/organization/user-registration/core": [
+ "../../feature-libs/organization/user-registration/core/public_api"
+ ],
+ "@spartacus/organization/user-registration": [
+ "../../feature-libs/organization/user-registration/public_api"
+ ],
+ "@spartacus/organization/user-registration/occ": [
+ "../../feature-libs/organization/user-registration/occ/public_api"
+ ],
+ "@spartacus/organization/user-registration/root": [
+ "../../feature-libs/organization/user-registration/root/public_api"
+ ],
+ "@spartacus/pickup-in-store/assets": [
+ "../../feature-libs/pickup-in-store/assets/public_api"
+ ],
+ "@spartacus/pickup-in-store/components": [
+ "../../feature-libs/pickup-in-store/components/public_api"
+ ],
+ "@spartacus/pickup-in-store/core": [
+ "../../feature-libs/pickup-in-store/core/public_api"
+ ],
+ "@spartacus/pickup-in-store": [
+ "../../feature-libs/pickup-in-store/public_api"
+ ],
+ "@spartacus/pickup-in-store/occ": [
+ "../../feature-libs/pickup-in-store/occ/public_api"
+ ],
+ "@spartacus/pickup-in-store/root": [
+ "../../feature-libs/pickup-in-store/root/public_api"
+ ],
+ "@spartacus/product-configurator/common/assets": [
+ "../../feature-libs/product-configurator/common/assets/public_api"
+ ],
+ "@spartacus/product-configurator/common": [
+ "../../feature-libs/product-configurator/common/public_api"
+ ],
+ "@spartacus/product-configurator": [
+ "../../feature-libs/product-configurator/public_api"
+ ],
+ "@spartacus/product-configurator/rulebased/cpq": [
+ "../../feature-libs/product-configurator/rulebased/cpq/public_api"
+ ],
+ "@spartacus/product-configurator/rulebased": [
+ "../../feature-libs/product-configurator/rulebased/public_api"
+ ],
+ "@spartacus/product-configurator/rulebased/root": [
+ "../../feature-libs/product-configurator/rulebased/root/public_api"
+ ],
+ "@spartacus/product-configurator/textfield": [
+ "../../feature-libs/product-configurator/textfield/public_api"
+ ],
+ "@spartacus/product-configurator/textfield/root": [
+ "../../feature-libs/product-configurator/textfield/root/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/assets": [
+ "../../feature-libs/product/bulk-pricing/assets/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/components": [
+ "../../feature-libs/product/bulk-pricing/components/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/core": [
+ "../../feature-libs/product/bulk-pricing/core/public_api"
+ ],
+ "@spartacus/product/bulk-pricing": [
+ "../../feature-libs/product/bulk-pricing/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/occ": [
+ "../../feature-libs/product/bulk-pricing/occ/public_api"
+ ],
+ "@spartacus/product/bulk-pricing/root": [
+ "../../feature-libs/product/bulk-pricing/root/public_api"
+ ],
+ "@spartacus/product/future-stock/assets": [
+ "../../feature-libs/product/future-stock/assets/public_api"
+ ],
+ "@spartacus/product/future-stock/components": [
+ "../../feature-libs/product/future-stock/components/public_api"
+ ],
+ "@spartacus/product/future-stock/core": [
+ "../../feature-libs/product/future-stock/core/public_api"
+ ],
+ "@spartacus/product/future-stock": [
+ "../../feature-libs/product/future-stock/public_api"
+ ],
+ "@spartacus/product/future-stock/occ": [
+ "../../feature-libs/product/future-stock/occ/public_api"
+ ],
+ "@spartacus/product/future-stock/root": [
+ "../../feature-libs/product/future-stock/root/public_api"
+ ],
+ "@spartacus/product/image-zoom/assets": [
+ "../../feature-libs/product/image-zoom/assets/public_api"
+ ],
+ "@spartacus/product/image-zoom/components": [
+ "../../feature-libs/product/image-zoom/components/public_api"
+ ],
+ "@spartacus/product/image-zoom": [
+ "../../feature-libs/product/image-zoom/public_api"
+ ],
+ "@spartacus/product/image-zoom/root": [
+ "../../feature-libs/product/image-zoom/root/public_api"
+ ],
+ "@spartacus/product": ["../../feature-libs/product/public_api"],
+ "@spartacus/product/variants/assets": [
+ "../../feature-libs/product/variants/assets/public_api"
+ ],
+ "@spartacus/product/variants/components": [
+ "../../feature-libs/product/variants/components/public_api"
+ ],
+ "@spartacus/product/variants": [
+ "../../feature-libs/product/variants/public_api"
+ ],
+ "@spartacus/product/variants/occ": [
+ "../../feature-libs/product/variants/occ/public_api"
+ ],
+ "@spartacus/product/variants/root": [
+ "../../feature-libs/product/variants/root/public_api"
+ ],
+ "@spartacus/qualtrics/components": [
+ "../../feature-libs/qualtrics/components/public_api"
+ ],
+ "@spartacus/qualtrics": ["../../feature-libs/qualtrics/public_api"],
+ "@spartacus/qualtrics/root": [
+ "../../feature-libs/qualtrics/root/public_api"
+ ],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
+ "@spartacus/smartedit/core": [
+ "../../feature-libs/smartedit/core/public_api"
+ ],
+ "@spartacus/smartedit": ["../../feature-libs/smartedit/public_api"],
+ "@spartacus/smartedit/root": [
+ "../../feature-libs/smartedit/root/public_api"
+ ],
+ "@spartacus/storefinder/assets": [
+ "../../feature-libs/storefinder/assets/public_api"
+ ],
+ "@spartacus/storefinder/components": [
+ "../../feature-libs/storefinder/components/public_api"
+ ],
+ "@spartacus/storefinder/core": [
+ "../../feature-libs/storefinder/core/public_api"
+ ],
+ "@spartacus/storefinder": ["../../feature-libs/storefinder/public_api"],
+ "@spartacus/storefinder/occ": [
+ "../../feature-libs/storefinder/occ/public_api"
+ ],
+ "@spartacus/storefinder/root": [
+ "../../feature-libs/storefinder/root/public_api"
+ ],
+ "@spartacus/tracking": ["../../feature-libs/tracking/public_api"],
+ "@spartacus/tracking/personalization/core": [
+ "../../feature-libs/tracking/personalization/core/public_api"
+ ],
+ "@spartacus/tracking/personalization": [
+ "../../feature-libs/tracking/personalization/public_api"
+ ],
+ "@spartacus/tracking/personalization/root": [
+ "../../feature-libs/tracking/personalization/root/public_api"
+ ],
+ "@spartacus/tracking/tms/aep": [
+ "../../feature-libs/tracking/tms/aep/public_api"
+ ],
+ "@spartacus/tracking/tms/core": [
+ "../../feature-libs/tracking/tms/core/public_api"
+ ],
+ "@spartacus/tracking/tms/gtm": [
+ "../../feature-libs/tracking/tms/gtm/public_api"
+ ],
+ "@spartacus/tracking/tms": ["../../feature-libs/tracking/tms/public_api"],
+ "@spartacus/user/account/assets": [
+ "../../feature-libs/user/account/assets/public_api"
+ ],
+ "@spartacus/user/account/components": [
+ "../../feature-libs/user/account/components/public_api"
+ ],
+ "@spartacus/user/account/core": [
+ "../../feature-libs/user/account/core/public_api"
+ ],
+ "@spartacus/user/account": ["../../feature-libs/user/account/public_api"],
+ "@spartacus/user/account/occ": [
+ "../../feature-libs/user/account/occ/public_api"
+ ],
+ "@spartacus/user/account/root": [
+ "../../feature-libs/user/account/root/public_api"
+ ],
+ "@spartacus/user": ["../../feature-libs/user/public_api"],
+ "@spartacus/user/profile/assets": [
+ "../../feature-libs/user/profile/assets/public_api"
+ ],
+ "@spartacus/user/profile/components": [
+ "../../feature-libs/user/profile/components/public_api"
+ ],
+ "@spartacus/user/profile/core": [
+ "../../feature-libs/user/profile/core/public_api"
+ ],
+ "@spartacus/user/profile": ["../../feature-libs/user/profile/public_api"],
+ "@spartacus/user/profile/occ": [
+ "../../feature-libs/user/profile/occ/public_api"
+ ],
+ "@spartacus/user/profile/root": [
+ "../../feature-libs/user/profile/root/public_api"
+ ],
+ "@spartacus/cdc/assets": ["../../integration-libs/cdc/assets/public_api"],
+ "@spartacus/cdc/components": [
+ "../../integration-libs/cdc/components/public_api"
+ ],
+ "@spartacus/cdc/core": ["../../integration-libs/cdc/core/public_api"],
+ "@spartacus/cdc": ["../../integration-libs/cdc/public_api"],
+ "@spartacus/cdc/organization/administration": [
+ "../../integration-libs/cdc/organization/administration/public_api"
+ ],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
+ "@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
+ "@spartacus/cdc/user-account": [
+ "../../integration-libs/cdc/user-account/public_api"
+ ],
+ "@spartacus/cdc/user-profile": [
+ "../../integration-libs/cdc/user-profile/public_api"
+ ],
+ "@spartacus/cds": ["../../integration-libs/cds/public_api"],
+ "@spartacus/digital-payments/assets": [
+ "../../integration-libs/digital-payments/assets/public_api"
+ ],
+ "@spartacus/digital-payments": [
+ "../../integration-libs/digital-payments/public_api"
+ ],
+ "@spartacus/epd-visualization/assets": [
+ "../../integration-libs/epd-visualization/assets/public_api"
+ ],
+ "@spartacus/epd-visualization/components": [
+ "../../integration-libs/epd-visualization/components/public_api"
+ ],
+ "@spartacus/epd-visualization/core": [
+ "../../integration-libs/epd-visualization/core/public_api"
+ ],
+ "@spartacus/epd-visualization/epd-visualization-api": [
+ "../../integration-libs/epd-visualization/epd-visualization-api/public_api"
+ ],
+ "@spartacus/epd-visualization": [
+ "../../integration-libs/epd-visualization/public_api"
+ ],
+ "@spartacus/epd-visualization/root": [
+ "../../integration-libs/epd-visualization/root/public_api"
+ ],
+ "@spartacus/s4om/assets": [
+ "../../integration-libs/s4om/assets/public_api"
+ ],
+ "@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
+ "@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
+ "@spartacus/assets": ["../../projects/assets/src/public_api"],
+ "@spartacus/core": ["../../projects/core/public_api"],
+ "@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
+ },
+ "noEmitOnError": true,
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "noUnusedParameters": true,
+ "noUnusedLocals": true,
+ "skipDefaultLibCheck": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true,
+ "strictNullChecks": true,
+ "resolveJsonModule": true,
+ "esModuleInterop": true
+ },
+ "include": ["schematics/**/*.ts"],
+ "exclude": ["schematics/*/files/**/*", "schematics/**/*_spec.ts"]
+}
diff --git a/integration-libs/segment-refs/tsconfig.spec.json b/integration-libs/segment-refs/tsconfig.spec.json
new file mode 100644
index 00000000000..11ee9d53a30
--- /dev/null
+++ b/integration-libs/segment-refs/tsconfig.spec.json
@@ -0,0 +1,12 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../../out-tsc/spec",
+ "strict": false,
+ "module": "es2020",
+ "types": ["jasmine", "node"]
+ },
+ "files": ["test.ts"],
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
+}
diff --git a/package-lock.json b/package-lock.json
index b5549857e51..c2d2ecbfe4a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -115,7 +115,7 @@
"prettier": "~2.4.1",
"rimraf": "^5.0.0",
"sass-true": "^6.1.0",
- "semver": "^7.5.0",
+ "semver": "^7.5.2",
"shelljs": "^0.8.5",
"stylelint": "^13.13.1",
"stylelint-scss": "^3.18.0",
@@ -19414,8 +19414,9 @@
}
},
"node_modules/semver": {
- "version": "7.5.0",
- "license": "ISC",
+ "version": "7.5.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz",
+ "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==",
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -21069,8 +21070,9 @@
}
},
"node_modules/tough-cookie": {
- "version": "4.1.2",
- "license": "BSD-3-Clause",
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
+ "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
"dependencies": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
@@ -22368,8 +22370,9 @@
"license": "MIT"
},
"node_modules/word-wrap": {
- "version": "1.2.3",
- "license": "MIT",
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
+ "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
"engines": {
"node": ">=0.10.0"
}
diff --git a/package.json b/package.json
index 153839af3be..bcf7afcd037 100644
--- a/package.json
+++ b/package.json
@@ -22,13 +22,15 @@
"build:digital-payments": "npm --prefix integration-libs/digital-payments run build:schematics && nx build digital-payments --configuration production",
"build:epd-visualization": "npm --prefix integration-libs/epd-visualization run build:schematics && nx build epd-visualization --configuration production",
"build:order": "npm --prefix feature-libs/order run build:schematics && nx build order --configuration production",
- "build:libs": "nx build core --configuration production && nx build storefrontlib --configuration production && concurrently --kill-others-on-fail npm:build:schematics npm:build:user && npm run build:cart && npm run build:order && concurrently --kill-others-on-fail npm:build:checkout npm:build:storefinder npm:build:asm npm:build:tracking npm:build:customer-ticketing && concurrently --kill-others-on-fail npm:build:organization npm:build:product npm:build:product-configurator && concurrently --kill-others-on-fail npm:build:smartedit npm:build:qualtrics npm:build:assets npm:build:cds npm:build:cdc npm:build:digital-payments npm:build:epd-visualization npm:build:s4om npm:build:pickup-in-store && npm run build:setup",
+ "build:libs": "nx build core --configuration production && nx build storefrontlib --configuration production && concurrently --kill-others-on-fail npm:build:schematics npm:build:user && npm run build:cart && npm run build:order && concurrently --kill-others-on-fail npm:build:checkout npm:build:storefinder npm:build:asm npm:build:tracking npm:build:customer-ticketing && concurrently --kill-others-on-fail npm:build:organization npm:build:product npm:build:product-configurator npm:build:requested-delivery-date && concurrently --kill-others-on-fail npm:build:smartedit npm:build:qualtrics npm:build:assets npm:build:cds npm:build:cdc npm:build:digital-payments npm:build:epd-visualization npm:build:s4om npm:build:segment-refs npm:build:pickup-in-store && npm run build:setup",
"build:organization": "npm --prefix feature-libs/organization run build:schematics && nx build organization --configuration production",
"build:pickup-in-store": "npm --prefix feature-libs/pickup-in-store run build:schematics && nx build pickup-in-store --configuration production",
"build:product": "npm --prefix feature-libs/product run build:schematics && nx build product --configuration production",
"build:product-configurator": "npm --prefix feature-libs/product-configurator run build:schematics && nx build product-configurator --configuration production",
"build:s4om": "npm --prefix integration-libs/s4om run build:schematics && nx build s4om --configuration production",
+ "build:segment-refs": "npm --prefix integration-libs/segment-refs run build:schematics && nx build segment-refs --configuration production",
"build:qualtrics": "npm --prefix feature-libs/qualtrics run build:schematics && nx build qualtrics --configuration production",
+ "build:requested-delivery-date": "npm --prefix feature-libs/requested-delivery-date run build:schematics && nx build requested-delivery-date --configuration production",
"build:schematics": "npm --prefix projects/schematics run build",
"build:setup": "nx build setup --configuration production",
"build:ssr": "env-cmd --no-override -e dev,b2c,$SPA_ENV nx run storefrontapp:server:production",
@@ -64,6 +66,7 @@
"e2e:run:ci:ccv2-cpq": "npm --prefix ./projects/storefrontapp-e2e-cypress run cy:run:ci:ccv2-cpq",
"e2e:run:ci:mcs": "npm --prefix ./projects/storefrontapp-e2e-cypress run run cy:run:ci:mcs",
"e2e:run:ci:cdc-b2b": "npm --prefix ./projects/storefrontapp-e2e-cypress run cy:run:ci:cdc-b2b",
+ "e2e:run:ci:segment-refs": "npm --prefix ./projects/storefrontapp-e2e-cypress run cy:run:ci:segment-refs",
"generate:docs": "npx @compodoc/compodoc@1.1.13 -p tsconfig.compodoc.json",
"generate:publish:docs": "npm run generate:docs && npm run publish:docs",
"graph": "nx graph",
@@ -79,7 +82,7 @@
"start:prod": "env-cmd --no-override -e dev,b2c,$SPA_ENV nx serve storefrontapp --configuration=production",
"start:pwa": "cd ./dist/storefrontapp/ && http-server --silent --proxy http://localhost:4200? -p 4200",
"test": "nx test",
- "test:libs": "concurrently \"nx test core --code-coverage\" \"nx test storefrontlib --code-coverage\" \"nx test cart --code-coverage\" \"nx test organization --code-coverage\" \"nx test storefinder --code-coverage\" \"nx test smartedit --code-coverage\" \"nx test asm --code-coverage\" \"nx test qualtrics --code-coverage\" \"nx test product --code-coverage\" \"nx test product-configurator --code-coverage\" \"nx test customer-ticketing --code-coverage\" \"nx test cdc --code-coverage\" \"nx test setup --code-coverage\" \"nx test checkout --code-coverage\" \"nx test order --code-coverage\" \"nx test digital-payments --code-coverage\" \"nx test epd-visualization --code-coverage\" \"nx test pickup-in-store --code-coverage\"",
+ "test:libs": "concurrently \"nx test core --code-coverage\" \"nx test storefrontlib --code-coverage\" \"nx test cart --code-coverage\" \"nx test organization --code-coverage\" \"nx test storefinder --code-coverage\" \"nx test smartedit --code-coverage\" \"nx test asm --code-coverage\" \"nx test qualtrics --code-coverage\" \"nx test product --code-coverage\" \"nx test product-configurator --code-coverage\" \"nx test customer-ticketing --code-coverage\" \"nx test cdc --code-coverage\" \"nx test setup --code-coverage\" \"nx test checkout --code-coverage\" \"nx test order --code-coverage\" \"nx test digital-payments --code-coverage\" \"nx test epd-visualization --code-coverage\" \"nx test pickup-in-store --code-coverage\" \"nx test s4om --code-coverage\" \"nx test requested-delivery-date --code-coverage\"",
"test:storefront:lib": "nx test storefrontlib --source-map --code-coverage",
"dev:ssr": "env-cmd --no-override -e dev,b2c,$SPA_ENV cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 nx run storefrontapp:serve-ssr",
"serve:ssr": "node dist/storefrontapp-server/main.js",
@@ -202,7 +205,7 @@
"prettier": "~2.4.1",
"rimraf": "^5.0.0",
"sass-true": "^6.1.0",
- "semver": "^7.5.0",
+ "semver": "^7.5.2",
"shelljs": "^0.8.5",
"stylelint": "^13.13.1",
"stylelint-scss": "^3.18.0",
diff --git a/projects/assets/package.json b/projects/assets/package.json
index f82d01e76e7..7d083ba55f6 100644
--- a/projects/assets/package.json
+++ b/projects/assets/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/assets",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"homepage": "https://github.com/SAP/spartacus",
"repository": "https://github.com/SAP/spartacus/tree/develop/projects/assets",
"scripts": {
diff --git a/projects/assets/src/translations/en/delivery-mode.ts b/projects/assets/src/translations/en/delivery-mode.ts
new file mode 100644
index 00000000000..afa3b8f375c
--- /dev/null
+++ b/projects/assets/src/translations/en/delivery-mode.ts
@@ -0,0 +1,11 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export const deliveryMode = {
+ setDeliveryMode: {
+ unknownError: 'An unknown error occurred. Please contact support.',
+ },
+};
diff --git a/projects/assets/src/translations/en/index.ts b/projects/assets/src/translations/en/index.ts
index ed0a04c185f..ad8a387debe 100644
--- a/projects/assets/src/translations/en/index.ts
+++ b/projects/assets/src/translations/en/index.ts
@@ -6,6 +6,7 @@
import { address } from './address';
import { common } from './common';
+import { deliveryMode } from './delivery-mode';
import { myAccount } from './my-account';
import { payment } from './payment';
import { pdf } from './pdf';
@@ -24,4 +25,5 @@ export const en = {
user,
video,
pdf,
+ deliveryMode,
};
diff --git a/projects/assets/src/translations/en/my-account.ts b/projects/assets/src/translations/en/my-account.ts
index a9af034ab5a..1bac6db8186 100644
--- a/projects/assets/src/translations/en/my-account.ts
+++ b/projects/assets/src/translations/en/my-account.ts
@@ -32,6 +32,7 @@ export const myAccount = {
},
bothPasswordMustMatch: 'Both password must match',
passwordUpdateSuccess: 'Password updated with success',
+ accessDeniedError: 'Access is denied',
},
updateProfileForm: {
title: 'Title',
diff --git a/projects/assets/src/translations/translation-chunks-config.ts b/projects/assets/src/translations/translation-chunks-config.ts
index 1782f0863b5..c9632429ca9 100644
--- a/projects/assets/src/translations/translation-chunks-config.ts
+++ b/projects/assets/src/translations/translation-chunks-config.ts
@@ -73,4 +73,5 @@ export const translationChunksConfig: TranslationChunksConfig = {
],
user: ['anonymousConsents', 'loginRegister', 'checkoutLogin', 'authMessages'],
video: ['player'],
+ deliveryMode: ['setDeliveryMode'],
};
diff --git a/projects/core/package.json b/projects/core/package.json
index 1d9a43eace7..d4326fac941 100644
--- a/projects/core/package.json
+++ b/projects/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/core",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Spartacus - the core framework",
"keywords": [
"spartacus",
diff --git a/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.spec.ts b/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.spec.ts
index 7246435e66f..7e40fbf246f 100755
--- a/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.spec.ts
+++ b/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.spec.ts
@@ -41,5 +41,15 @@ describe('Navigation Entry Item Reducer', () => {
const state = fromComponent.reducer(initialState, action);
expect(state).toEqual(mockNodes['testId']);
});
+
+ it(`should NOT populate the component state nodes, when no components' details were received`, () => {
+ const mockPayload = { nodeId: 'testId', components: [] };
+
+ const { initialState } = fromComponent;
+ const action = new CmsActions.LoadCmsNavigationItemsSuccess(mockPayload);
+ const state = fromComponent.reducer(initialState, action);
+ expect(state).toEqual(initialState); // check that no nested mutations were done
+ expect(state).toBe(initialState); // check that the same object reference was returned
+ });
});
});
diff --git a/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.ts b/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.ts
index 0c0ab0ecb97..62989987792 100755
--- a/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.ts
+++ b/projects/core/src/cms/store/reducers/navigation-entry-item.reducer.ts
@@ -15,7 +15,7 @@ export function reducer(
): NodeItem | undefined {
switch (action.type) {
case CmsActions.LOAD_CMS_NAVIGATION_ITEMS_SUCCESS: {
- if (action.payload.components) {
+ if (action.payload.components.length) {
const components = action.payload.components;
const newItem: NodeItem = components.reduce(
(compItems: { [uid_type: string]: any }, component: any) => {
@@ -24,9 +24,7 @@ export function reducer(
[`${component.uid}_AbstractCMSComponent`]: component,
};
},
- {
- ...{},
- }
+ {}
);
return {
diff --git a/projects/core/src/occ/adapters/product/converters/product-image-normalizer.spec.ts b/projects/core/src/occ/adapters/product/converters/product-image-normalizer.spec.ts
index 35f8214bdfc..3266997eb74 100644
--- a/projects/core/src/occ/adapters/product/converters/product-image-normalizer.spec.ts
+++ b/projects/core/src/occ/adapters/product/converters/product-image-normalizer.spec.ts
@@ -43,6 +43,13 @@ describe('ProductImageNormalizer', () => {
imageType: ImageType.PRIMARY,
url: 'https://hybris.com/test3.jpg',
},
+ {
+ altText: 'Test alt text',
+ format: 'cartIcon',
+ galleryIndex: null as any,
+ imageType: ImageType.PRIMARY,
+ url: '/test6',
+ },
{
altText: 'Test alt text',
format: 'product',
@@ -83,6 +90,13 @@ describe('ProductImageNormalizer', () => {
imageType: ImageType.PRIMARY,
url: 'https://hybris.com/test3.jpg',
},
+ cartIcon: {
+ altText: 'Test alt text',
+ format: 'cartIcon',
+ galleryIndex: null as any,
+ imageType: ImageType.PRIMARY,
+ url: baseUrl + '/test6',
+ },
},
GALLERY: [
{
diff --git a/projects/core/src/occ/adapters/product/converters/product-image-normalizer.ts b/projects/core/src/occ/adapters/product/converters/product-image-normalizer.ts
index a80e80e29a1..58e2282ecc9 100644
--- a/projects/core/src/occ/adapters/product/converters/product-image-normalizer.ts
+++ b/projects/core/src/occ/adapters/product/converters/product-image-normalizer.ts
@@ -37,7 +37,7 @@ export class ProductImageNormalizer implements Converter {
const images: Images = {};
if (source) {
for (const image of source) {
- const isList = image.hasOwnProperty('galleryIndex');
+ const isList = this.hasGalleryIndex(image);
if (image.imageType) {
if (!images.hasOwnProperty(image.imageType)) {
images[image.imageType] = isList ? [] : {};
@@ -98,4 +98,9 @@ export class ProductImageNormalizer implements Converter {
'') + url
);
}
+
+ private hasGalleryIndex(image: Occ.Image) {
+ const galleryIndex = image.galleryIndex ?? false;
+ return galleryIndex !== false;
+ }
}
diff --git a/projects/core/src/occ/utils/index.ts b/projects/core/src/occ/utils/index.ts
index 17a2528a7d5..d2e78d50ceb 100644
--- a/projects/core/src/occ/utils/index.ts
+++ b/projects/core/src/occ/utils/index.ts
@@ -14,6 +14,7 @@ export * from './interceptor-util';
export * from './occ-constants';
export * from './occ-url-util';
export * from './occ-http-token';
+export * from './occ-fields';
export const OCC_USER_ID_CONSTANTS = new InjectionToken<{
[identifier: string]: string;
diff --git a/projects/core/src/util/occ-http-error-constants.ts b/projects/core/src/util/occ-http-error-constants.ts
index b491c68ad07..bd8d4efc6c8 100644
--- a/projects/core/src/util/occ-http-error-constants.ts
+++ b/projects/core/src/util/occ-http-error-constants.ts
@@ -8,6 +8,7 @@
export declare const enum OccHttpErrorType {
NOT_FOUND_ERROR = 'NotFoundError',
+ CLASS_MISMATCH_ERROR = 'ClassMismatchError',
}
export declare const enum OccHttpErrorReason {
diff --git a/projects/schematics/package.json b/projects/schematics/package.json
index 485f2e7c26a..69b9829e9b0 100644
--- a/projects/schematics/package.json
+++ b/projects/schematics/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/schematics",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Spartacus schematics",
"keywords": [
"spartacus",
@@ -18,7 +18,7 @@
"dependencies": {
"@angular/pwa": "^15.2.4",
"@nguniversal/express-engine": "^15.2.0",
- "semver": "^7.5.0",
+ "semver": "^7.5.2",
"ts-morph": "^9.1.0",
"tslib": "^2.4.0"
},
@@ -55,6 +55,7 @@
"@spartacus/product",
"@spartacus/product-configurator",
"@spartacus/qualtrics",
+ "@spartacus/requested-delivery-date",
"@spartacus/smartedit",
"@spartacus/storefinder",
"@spartacus/tracking",
@@ -64,6 +65,7 @@
"@spartacus/cds",
"@spartacus/digital-payments",
"@spartacus/epd-visualization",
+ "@spartacus/s4om",
"@spartacus/customer-ticketing"
]
},
diff --git a/projects/schematics/src/add-spartacus/schema.json b/projects/schematics/src/add-spartacus/schema.json
index d0d87fdbb5a..e01cee99e55 100644
--- a/projects/schematics/src/add-spartacus/schema.json
+++ b/projects/schematics/src/add-spartacus/schema.json
@@ -45,10 +45,12 @@
"Textfield-Configurator",
"CPQ-Configurator",
"Qualtrics",
+ "Requested-Delivery-Date",
"S4HANA-Order-Management",
"SmartEdit",
"Store-Finder",
"Personalization",
+ "Segment-Refs",
"TMS-GTM",
"TMS-AEPL",
"Pickup-In-Store",
@@ -191,6 +193,10 @@
"value": "Qualtrics",
"label": "Qualtrics"
},
+ {
+ "value": "Requested-Delivery-Date",
+ "label": "Requested Delivery Date"
+ },
{
"value": "S4HANA-Order-Management",
"label": "S/4HANA Order Management (b2b feature)"
@@ -207,6 +213,10 @@
"value": "Personalization",
"label": "Tracking - Personalization"
},
+ {
+ "value": "Segment-Refs",
+ "label": "Segment Reference"
+ },
{
"value": "TMS-GTM",
"label": "Tracking - Tag Management System - Google Tag Manager"
diff --git a/projects/schematics/src/add-spartacus/spartacus.ts b/projects/schematics/src/add-spartacus/spartacus.ts
index d9c87f147a8..a4f1f036e6e 100644
--- a/projects/schematics/src/add-spartacus/spartacus.ts
+++ b/projects/schematics/src/add-spartacus/spartacus.ts
@@ -68,6 +68,7 @@ function configureSpartacusModules(
namedImports: [BASE_STOREFRONT_MODULE],
},
content: BASE_STOREFRONT_MODULE,
+ order: 0,
});
addModuleExport(sourceFile, {
import: {
diff --git a/projects/schematics/src/dependencies.json b/projects/schematics/src/dependencies.json
index ff8b0906755..3b288d6757b 100644
--- a/projects/schematics/src/dependencies.json
+++ b/projects/schematics/src/dependencies.json
@@ -35,7 +35,7 @@
"@ngrx/effects": "^15.3.0",
"@ngrx/router-store": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
"ngx-infinite-scroll": "^15.0.0",
"rxjs": "^6.6.0"
},
@@ -47,10 +47,10 @@
},
"@spartacus/setup": {
"@angular/core": "^15.2.4",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/user": "5.0.0"
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1"
},
"@spartacus/asm": {
"@angular-devkit/schematics": "^15.2.4",
@@ -61,14 +61,14 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefinder": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefinder": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/cart": {
@@ -80,11 +80,11 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -96,13 +96,13 @@
"@angular/router": "^15.2.4",
"@ng-select/ng-select": "^10.0.3",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -112,11 +112,11 @@
"@angular/core": "^15.2.4",
"@angular/forms": "^15.2.4",
"@angular/router": "^15.2.4",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/order": {
@@ -128,12 +128,12 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/organization": {
@@ -145,13 +145,13 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -163,14 +163,14 @@
"@angular/router": "^15.2.4",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefinder": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefinder": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -179,10 +179,10 @@
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
"@angular/router": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -195,31 +195,45 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/checkout": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/checkout": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/qualtrics": {
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
+ "@spartacus/requested-delivery-date": {
+ "@angular-devkit/schematics": "^15.2.4",
+ "@angular/common": "^15.2.4",
+ "@angular/core": "^15.2.4",
+ "@angular/forms": "^15.2.4",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/checkout": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "rxjs": "^6.6.0"
+ },
"@spartacus/smartedit": {
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/storefinder": {
@@ -230,10 +244,10 @@
"@angular/router": "^15.2.4",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -241,8 +255,8 @@
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/user": {
@@ -253,10 +267,10 @@
"@angular/router": "^15.2.4",
"@ng-select/ng-select": "^10.0.3",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/cdc": {
@@ -268,12 +282,12 @@
"@ng-select/ng-select": "^10.0.3",
"@ngrx/effects": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/asm": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/organization": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/user": "5.0.0",
+ "@spartacus/asm": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/organization": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/user": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/cds": {
@@ -282,12 +296,12 @@
"@angular/core": "^15.2.4",
"@angular/router": "^15.2.4",
"@ngrx/store": "^15.3.0",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/order": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/tracking": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/order": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/tracking": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/digital-payments": {
@@ -297,11 +311,11 @@
"@angular/forms": "^15.2.4",
"@angular/router": "^15.2.4",
"@ng-select/ng-select": "^10.0.3",
- "@spartacus/cart": "5.0.0",
- "@spartacus/checkout": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/checkout": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
"rxjs": "^6.6.0"
},
"@spartacus/epd-visualization": {
@@ -311,11 +325,11 @@
"@angular/forms": "^15.2.4",
"@angular/router": "^15.2.4",
"@sapui5/ts-types-esm": "1.108.14",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
"bootstrap": "^4.6.2",
"rxjs": "^6.6.0"
},
@@ -323,11 +337,20 @@
"@angular-devkit/schematics": "^15.2.4",
"@angular/common": "^15.2.4",
"@angular/core": "^15.2.4",
- "@spartacus/cart": "5.0.0",
- "@spartacus/core": "5.0.0",
- "@spartacus/schematics": "5.0.0",
- "@spartacus/storefront": "5.0.0",
- "@spartacus/styles": "5.0.0",
+ "@spartacus/cart": "6.3.0-1",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/requested-delivery-date": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
+ "@spartacus/storefront": "6.3.0-1",
+ "@spartacus/styles": "6.3.0-1",
+ "rxjs": "^6.6.0"
+ },
+ "@spartacus/segment-refs": {
+ "@angular-devkit/schematics": "^15.2.4",
+ "@angular/common": "^15.2.4",
+ "@angular/core": "^15.2.4",
+ "@spartacus/core": "6.3.0-1",
+ "@spartacus/schematics": "6.3.0-1",
"rxjs": "^6.6.0"
},
"storefrontapp": {
diff --git a/projects/schematics/src/migrations/mechanism/scaffold-app-structure/__snapshots__/scaffold-app-structure_spec.ts.snap b/projects/schematics/src/migrations/mechanism/scaffold-app-structure/__snapshots__/scaffold-app-structure_spec.ts.snap
index 1c8d5272a7b..c55722cb110 100644
--- a/projects/schematics/src/migrations/mechanism/scaffold-app-structure/__snapshots__/scaffold-app-structure_spec.ts.snap
+++ b/projects/schematics/src/migrations/mechanism/scaffold-app-structure/__snapshots__/scaffold-app-structure_spec.ts.snap
@@ -84,9 +84,9 @@ import { SpartacusFeaturesModule } from './spartacus-features.module';
declarations: [],
imports: [
MyFeature,
+ BaseStorefrontModule,
SpartacusFeaturesModule,
SpartacusConfigurationModule,
- BaseStorefrontModule
],
exports: [BaseStorefrontModule]
})
diff --git a/projects/schematics/src/migrations/mechanism/scaffold-app-structure/scaffold-app-structure_spec.ts b/projects/schematics/src/migrations/mechanism/scaffold-app-structure/scaffold-app-structure_spec.ts
index 1389f5bf70d..3d5f3e33ccc 100644
--- a/projects/schematics/src/migrations/mechanism/scaffold-app-structure/scaffold-app-structure_spec.ts
+++ b/projects/schematics/src/migrations/mechanism/scaffold-app-structure/scaffold-app-structure_spec.ts
@@ -24,9 +24,9 @@ import { SpartacusFeaturesModule } from './spartacus-features.module';
declarations: [],
imports: [
MyFeature,
+ BaseStorefrontModule,
SpartacusFeaturesModule,
SpartacusConfigurationModule,
- BaseStorefrontModule
],
exports: [BaseStorefrontModule]
})
diff --git a/projects/schematics/src/migrations/migrations.json b/projects/schematics/src/migrations/migrations.json
index c751a95682a..01112d36515 100644
--- a/projects/schematics/src/migrations/migrations.json
+++ b/projects/schematics/src/migrations/migrations.json
@@ -139,52 +139,52 @@
},
"00-migration-v6-ssr": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/ssr/ssr#migrate",
"description": "Updates the SSR setup"
},
"01-migration-v6-config-deprecations": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/config-deprecations/config-deprecations#migrate",
"description": "Handle deprecated configuration properties"
},
"02-migration-v6-constructor-deprecations": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/constructor-deprecations/constructor-deprecations#migrate",
"description": "Add or remove constructor parameters"
},
"03-migration-v6-css": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/css/css#migrate",
"description": "Handle deprecated CSS"
},
"04-migration-v6-dependency-management": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/dependency-management/dependency-management#migrate",
"description": "Update dependencies"
},
"05-migration-v6-methods-and-properties-deprecations": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/methods-and-properties-deprecations/methods-and-properties-deprecations#migrate",
"description": "Comment about usage of removed public methods or properties"
},
"06-migration-v6-missing-packages": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/missing-packages/missing-packages#migrate",
"description": "Check missing packages"
},
"07-migration-v6-removed-public-api-deprecations": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/removed-public-api-deprecations/removed-public-api-deprecations#migrate",
"description": "Comment about usage of removed public api"
},
"08-migration-v6-rename-symbol": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/rename-symbol/rename-symbol#migrate",
"description": "Rename import symbols that were moved/changed in majors"
},
"09-migration-v6-angular-json-styling": {
- "version": "6.0.0-next.0",
+ "version": "6.3.0-1",
"factory": "./6_0/angular-json-styles/angular-json-styles#migrate",
"description": "Update the angular.json with the style preprocessor options"
}
diff --git a/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap b/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap
index 645d3a796f5..0167385ada7 100644
--- a/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap
+++ b/projects/schematics/src/ng-add/__snapshots__/index_spec.ts.snap
@@ -63,11 +63,11 @@ exports[`Spartacus Schematics: ng-add should add spartacus properly with SSR 2`]
"@ngrx/router-store": "^15.3.0",
"@ngrx/store": "^15.3.0",
"@nguniversal/express-engine": "^15.2.0",
- "@spartacus/assets": "~5.0.0",
- "@spartacus/core": "~5.0.0",
- "@spartacus/setup": "~5.0.0",
- "@spartacus/storefront": "~5.0.0",
- "@spartacus/styles": "~5.0.0",
+ "@spartacus/assets": "~6.3.0-1",
+ "@spartacus/core": "~6.3.0-1",
+ "@spartacus/setup": "~6.3.0-1",
+ "@spartacus/storefront": "~6.3.0-1",
+ "@spartacus/styles": "~6.3.0-1",
"angular-oauth2-oidc": "^15.0.1",
"bootstrap": "^4.6.2",
"express": "^4.15.2",
diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/cdc-schematics-config.ts b/projects/schematics/src/shared/lib-configs/integration-libs/cdc-schematics-config.ts
index 6d7f2adf005..ba1676de488 100644
--- a/projects/schematics/src/shared/lib-configs/integration-libs/cdc-schematics-config.ts
+++ b/projects/schematics/src/shared/lib-configs/integration-libs/cdc-schematics-config.ts
@@ -12,12 +12,17 @@ import {
SPARTACUS_CDC_ROOT,
USER_PROFILE_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
SPARTACUS_CDC_ORGANIZATION_ADMINISTRATION,
SPARTACUS_CDC_ASSETS,
+ SPARTACUS_CDC_ORGANIZATION_REGISTRATION,
} from '../../libs-constants';
import { AdditionalFeatureConfiguration } from '../../utils/feature-utils';
import { LibraryOptions, SchematicConfig } from '../../utils/lib-utils';
-import { ADMINISTRATION_MODULE } from '../organization-schematics-config';
+import {
+ ADMINISTRATION_MODULE,
+ ORGANIZATION_USER_REGISTRATION_MODULE,
+} from '../organization-schematics-config';
import {
USER_ACCOUNT_MODULE,
USER_PROFILE_MODULE,
@@ -41,6 +46,7 @@ export const CDC_USER_ACCOUNT_MODULE = 'CDCUserAccountModule';
export const CDC_USER_PROFILE_MODULE = 'CDCUserProfileModule';
export const CDC_ADMINISTRATION_MODULE = 'CdcAdministrationModule';
+export const CDC_B2B_REGISTER_MODULE = 'CDCB2BRegisterModule';
export const CDC_TRANSLATION_CHUNKS_CONFIG = 'cdcTranslationChunksConfig';
export const CDC_TRANSLATIONS = 'cdcTranslations';
@@ -69,6 +75,10 @@ export const CDC_SCHEMATICS_CONFIG: SchematicConfig = {
name: CDC_ADMINISTRATION_MODULE,
importPath: SPARTACUS_CDC_ORGANIZATION_ADMINISTRATION,
},
+ {
+ name: CDC_B2B_REGISTER_MODULE,
+ importPath: SPARTACUS_CDC_ORGANIZATION_REGISTRATION,
+ },
],
lazyLoadingChunk: {
moduleSpecifier: SPARTACUS_CDC_ROOT,
@@ -88,6 +98,7 @@ export const CDC_SCHEMATICS_CONFIG: SchematicConfig = {
dependencyFeatures: [
USER_PROFILE_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
],
importAfter: [
{
@@ -102,6 +113,10 @@ export const CDC_SCHEMATICS_CONFIG: SchematicConfig = {
markerModuleName: ADMINISTRATION_MODULE,
featureModuleName: CDC_ADMINISTRATION_MODULE,
},
+ {
+ markerModuleName: ORGANIZATION_USER_REGISTRATION_MODULE,
+ featureModuleName: CDC_B2B_REGISTER_MODULE,
+ },
],
};
diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts b/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts
index b8e6de53fc3..943b883e4c3 100644
--- a/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts
+++ b/projects/schematics/src/shared/lib-configs/integration-libs/epd-schematics-config.ts
@@ -75,7 +75,7 @@ function buildCdsConfig(
content: `<${EPD_VISUALIZATION_CONFIG}>{
epdVisualization: {
ui5: {
- bootstrapUrl: "https://sapui5.hana.ondemand.com/1.108.14/resources/sap-ui-core.js"
+ bootstrapUrl: "https://ui5.sap.com/1.108/resources/sap-ui-core.js"
},
apis: {
diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/index.ts b/projects/schematics/src/shared/lib-configs/integration-libs/index.ts
index 8281dbbf98f..f97c1039505 100644
--- a/projects/schematics/src/shared/lib-configs/integration-libs/index.ts
+++ b/projects/schematics/src/shared/lib-configs/integration-libs/index.ts
@@ -9,3 +9,4 @@ export * from './cds-schematics-config';
export * from './digital-payments-schematics-config';
export * from './epd-schematics-config';
export * from './s4om-schematics-config';
+export * from './segment-refs-schematics-config';
diff --git a/projects/schematics/src/shared/lib-configs/integration-libs/segment-refs-schematics-config.ts b/projects/schematics/src/shared/lib-configs/integration-libs/segment-refs-schematics-config.ts
new file mode 100644
index 00000000000..38469ebb1cd
--- /dev/null
+++ b/projects/schematics/src/shared/lib-configs/integration-libs/segment-refs-schematics-config.ts
@@ -0,0 +1,40 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {
+ SEGMENT_REFS_FEATURE_NAME,
+ SPARTACUS_SEGMENT_REFS,
+ SPARTACUS_SEGMENT_REFS_ROOT,
+ TRACKING_PERSONALIZATION_FEATURE_NAME,
+} from '../../libs-constants';
+import { SchematicConfig } from '../../utils/lib-utils';
+
+export const SEGMENT_REFS_FOLDER_NAME = 'segment-refs';
+export const SEGMENT_REFS_MODULE_NAME = 'SegmentRefs';
+export const SEGMENT_REFS_ROOT_MODULE = 'SegmentRefsRootModule';
+export const SEGMENT_REF_FEATURE_NAME_CONSTANT = 'SEGMENT_REFS_FEATURE';
+
+export const SEGMENT_REFS_SCHEMATICS_CONFIG: SchematicConfig = {
+ library: {
+ featureName: SEGMENT_REFS_FEATURE_NAME,
+ mainScope: SPARTACUS_SEGMENT_REFS,
+ },
+ folderName: SEGMENT_REFS_FOLDER_NAME,
+ moduleName: SEGMENT_REFS_MODULE_NAME,
+ featureModule: {
+ name: SEGMENT_REFS_ROOT_MODULE,
+ importPath: SPARTACUS_SEGMENT_REFS,
+ },
+ rootModule: {
+ importPath: SPARTACUS_SEGMENT_REFS_ROOT,
+ name: SEGMENT_REFS_ROOT_MODULE,
+ content: `${SEGMENT_REFS_ROOT_MODULE}`,
+ },
+ /* Through Spartacus Segment-refs code doesnot have a dependency on Personalization,
+ backend occ api of Segment-refs requires Personalization to be enabled , hence adding this dependency
+ If Personalization library is not installed, Personalization & Segment-refs won't apply */
+ dependencyFeatures: [TRACKING_PERSONALIZATION_FEATURE_NAME],
+};
diff --git a/projects/schematics/src/shared/lib-configs/requested-delivery-date-schematics-config.ts b/projects/schematics/src/shared/lib-configs/requested-delivery-date-schematics-config.ts
new file mode 100644
index 00000000000..bdd9ffdca55
--- /dev/null
+++ b/projects/schematics/src/shared/lib-configs/requested-delivery-date-schematics-config.ts
@@ -0,0 +1,66 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {
+ CART_BASE_FEATURE_NAME,
+ CHECKOUT_BASE_FEATURE_NAME,
+ ORDER_FEATURE_NAME,
+ REQUESTED_DELIVERY_DATE_FEATURE_NAME,
+ SPARTACUS_REQUESTED_DELIVERY_DATE,
+ SPARTACUS_REQUESTED_DELIVERY_DATE_ASSETS,
+ SPARTACUS_REQUESTED_DELIVERY_DATE_ROOT,
+} from '../libs-constants';
+import { SchematicConfig } from '../utils/lib-utils';
+
+export const REQUESTED_DELIVERY_DATE_FEATURE_NAME_CONSTANT =
+ 'REQUESTED_DELIVERY_DATE_FEATURE';
+export const REQUESTED_DELIVERY_DATE_FOLDER_NAME = 'requested-delivery-date';
+export const REQUESTED_DELIVERY_DATE_TRANSLATIONS =
+ 'requestedDeliveryDateTranslations';
+export const REQUESTED_DELIVERY_DATE_TRANSLATION_CHUNKS_CONFIG =
+ 'requestedDeliveryDateTranslationChunksConfig';
+export const REQUESTED_DELIVERY_DATE_ROOT_MODULE =
+ 'RequestedDeliveryDateRootModule';
+export const REQUESTED_DELIVERY_DATE_MODULE = 'RequestedDeliveryDateModule';
+
+export const REQUESTED_DELIVERY_DATE_SCSS_FILE_NAME =
+ 'requested-delivery-date.scss';
+
+export const REQUESTED_DELIVERY_DATE_SCHEMATICS_CONFIG: SchematicConfig = {
+ library: {
+ featureName: REQUESTED_DELIVERY_DATE_FEATURE_NAME,
+ mainScope: SPARTACUS_REQUESTED_DELIVERY_DATE,
+ },
+ folderName: REQUESTED_DELIVERY_DATE_FOLDER_NAME,
+ moduleName: REQUESTED_DELIVERY_DATE_MODULE,
+ featureModule: {
+ name: REQUESTED_DELIVERY_DATE_MODULE,
+ importPath: SPARTACUS_REQUESTED_DELIVERY_DATE,
+ },
+ rootModule: {
+ name: REQUESTED_DELIVERY_DATE_ROOT_MODULE,
+ importPath: SPARTACUS_REQUESTED_DELIVERY_DATE_ROOT,
+ },
+ styles: {
+ scssFileName: REQUESTED_DELIVERY_DATE_SCSS_FILE_NAME,
+ importStyle: SPARTACUS_REQUESTED_DELIVERY_DATE,
+ },
+ lazyLoadingChunk: {
+ moduleSpecifier: SPARTACUS_REQUESTED_DELIVERY_DATE_ROOT,
+ namedImports: [REQUESTED_DELIVERY_DATE_FEATURE_NAME_CONSTANT],
+ },
+ i18n: {
+ resources: REQUESTED_DELIVERY_DATE_TRANSLATIONS,
+ chunks: REQUESTED_DELIVERY_DATE_TRANSLATION_CHUNKS_CONFIG,
+ importPath: SPARTACUS_REQUESTED_DELIVERY_DATE_ASSETS,
+ },
+ dependencyFeatures: [
+ CART_BASE_FEATURE_NAME,
+ CHECKOUT_BASE_FEATURE_NAME,
+ ORDER_FEATURE_NAME,
+ ],
+};
diff --git a/projects/schematics/src/shared/libs-constants.ts b/projects/schematics/src/shared/libs-constants.ts
index 4c986734e48..79f2062cd83 100644
--- a/projects/schematics/src/shared/libs-constants.ts
+++ b/projects/schematics/src/shared/libs-constants.ts
@@ -148,6 +148,10 @@ export const SPARTACUS_QUALTRICS = `@spartacus/qualtrics`;
export const SPARTACUS_QUALTRICS_COMPONENTS = `@spartacus/qualtrics/components`;
export const SPARTACUS_QUALTRICS_ROOT = `@spartacus/qualtrics/root`;
+export const SPARTACUS_REQUESTED_DELIVERY_DATE = `@spartacus/requested-delivery-date`;
+export const SPARTACUS_REQUESTED_DELIVERY_DATE_ROOT = `@spartacus/requested-delivery-date/root`;
+export const SPARTACUS_REQUESTED_DELIVERY_DATE_ASSETS = `@spartacus/requested-delivery-date/assets`;
+
export const SPARTACUS_SMARTEDIT = `@spartacus/smartedit`;
export const SPARTACUS_SMARTEDIT_ROOT = `@spartacus/smartedit/root`;
@@ -184,6 +188,7 @@ export const SPARTACUS_CDC_ASSETS = `@spartacus/cdc/assets`;
export const SPARTACUS_CDC_USER_ACCOUNT = `@spartacus/cdc/user-account`;
export const SPARTACUS_CDC_USER_PROFILE = `@spartacus/cdc/user-profile`;
export const SPARTACUS_CDC_ORGANIZATION_ADMINISTRATION = `@spartacus/cdc/organization/administration`;
+export const SPARTACUS_CDC_ORGANIZATION_REGISTRATION = `@spartacus/cdc/organization/user-registration`;
export const SPARTACUS_DIGITAL_PAYMENTS = `@spartacus/digital-payments`;
export const SPARTACUS_DIGITAL_PAYMENTS_ASSETS = `@spartacus/digital-payments/assets`;
@@ -196,6 +201,9 @@ export const SPARTACUS_S4OM = '@spartacus/s4om';
export const SPARTACUS_S4OM_ROOT = `@spartacus/s4om/root`;
export const SPARTACUS_S4OM_ASSETS = `@spartacus/s4om/assets`;
+export const SPARTACUS_SEGMENT_REFS = '@spartacus/segment-refs';
+export const SPARTACUS_SEGMENT_REFS_ROOT = `@spartacus/segment-refs/root`;
+
export const SPARTACUS_CUSTOMER_TICKETING_ROOT = `@spartacus/customer-ticketing/root`;
export const SPARTACUS_CUSTOMER_TICKETING_ASSETS = `@spartacus/customer-ticketing/assets`;
export const SPARTACUS_CUSTOMER_TICKETING = '@spartacus/customer-ticketing';
@@ -248,6 +256,8 @@ export const PRODUCT_CONFIGURATOR_CPQ_FEATURE_NAME = 'CPQ-Configurator';
export const QUALTRICS_FEATURE_NAME = 'Qualtrics';
+export const REQUESTED_DELIVERY_DATE_FEATURE_NAME = 'Requested-Delivery-Date';
+
export const SMARTEDIT_FEATURE_NAME = 'SmartEdit';
export const STOREFINDER_FEATURE_NAME = 'Store-Finder';
@@ -268,6 +278,9 @@ export const DIGITAL_PAYMENTS_FEATURE_NAME = 'Digital-Payments';
export const EPD_VISUALIZATION_FEATURE_NAME = 'EPD-Visualization';
export const S4OM_FEATURE_NAME = 'S4HANA-Order-Management';
+
+export const SEGMENT_REFS_FEATURE_NAME = 'Segment-Refs';
+
export const CUSTOMER_TICKETING_FEATURE_NAME = 'Customer-Ticketing';
/***** Feature name end *****/
diff --git a/projects/schematics/src/shared/schematics-config-mappings.ts b/projects/schematics/src/shared/schematics-config-mappings.ts
index bc561e34781..fb5ab3815a9 100644
--- a/projects/schematics/src/shared/schematics-config-mappings.ts
+++ b/projects/schematics/src/shared/schematics-config-mappings.ts
@@ -27,13 +27,14 @@ import { CDS_SCHEMATICS_CONFIG } from './lib-configs/integration-libs/cds-schema
import { DIGITAL_PAYMENTS_SCHEMATICS_CONFIG } from './lib-configs/integration-libs/digital-payments-schematics-config';
import { EPD_SCHEMATICS_CONFIG } from './lib-configs/integration-libs/epd-schematics-config';
import { S4OM_SCHEMATICS_CONFIG } from './lib-configs/integration-libs/s4om-schematics-config';
+import { SEGMENT_REFS_SCHEMATICS_CONFIG } from './lib-configs/integration-libs/segment-refs-schematics-config';
import { ORDER_SCHEMATICS_CONFIG } from './lib-configs/order-schematics-config';
import {
ORGANIZATION_ACCOUNT_SUMMARY_SCHEMATICS_CONFIG,
ORGANIZATION_ADMINISTRATION_SCHEMATICS_CONFIG,
ORGANIZATION_ORDER_APPROVAL_SCHEMATICS_CONFIG,
- ORGANIZATION_USER_REGISTRATION_SCHEMATICS_CONFIG,
ORGANIZATION_UNIT_ORDER_SCHEMATICS_CONFIG,
+ ORGANIZATION_USER_REGISTRATION_SCHEMATICS_CONFIG,
} from './lib-configs/organization-schematics-config';
import { PICKUP_IN_STORE_SCHEMATICS_CONFIG } from './lib-configs/pickup-in-store-schematics-config';
import {
@@ -43,11 +44,12 @@ import {
} from './lib-configs/product-configurator-schematics-config';
import {
PRODUCT_BULK_PRICING_SCHEMATICS_CONFIG,
+ PRODUCT_FUTURE_STOCK_SCHEMATICS_CONFIG,
PRODUCT_IMAGE_ZOOM_SCHEMATICS_CONFIG,
PRODUCT_VARIANTS_SCHEMATICS_CONFIG,
- PRODUCT_FUTURE_STOCK_SCHEMATICS_CONFIG,
} from './lib-configs/product-schematics-config';
import { QUALTRICS_SCHEMATICS_CONFIG } from './lib-configs/qualtrics-schematics-config';
+import { REQUESTED_DELIVERY_DATE_SCHEMATICS_CONFIG } from './lib-configs/requested-delivery-date-schematics-config';
import { SMARTEDIT_SCHEMATICS_CONFIG } from './lib-configs/smartedit-schematics-config';
import { STOREFINDER_SCHEMATICS_CONFIG } from './lib-configs/storefinder-schematics-config';
import {
@@ -59,7 +61,6 @@ import {
USER_ACCOUNT_SCHEMATICS_CONFIG,
USER_PROFILE_SCHEMATICS_CONFIG,
} from './lib-configs/user-schematics-config';
-
import { Module, SchematicConfig } from './utils/lib-utils';
/**
@@ -102,6 +103,8 @@ export const SCHEMATICS_CONFIGS: SchematicConfig[] = [
QUALTRICS_SCHEMATICS_CONFIG,
+ REQUESTED_DELIVERY_DATE_SCHEMATICS_CONFIG,
+
SMARTEDIT_SCHEMATICS_CONFIG,
STOREFINDER_SCHEMATICS_CONFIG,
@@ -125,6 +128,8 @@ export const SCHEMATICS_CONFIGS: SchematicConfig[] = [
EPD_SCHEMATICS_CONFIG,
S4OM_SCHEMATICS_CONFIG,
+
+ SEGMENT_REFS_SCHEMATICS_CONFIG,
];
/**
diff --git a/projects/schematics/src/shared/schematics-config-mappings_spec.ts b/projects/schematics/src/shared/schematics-config-mappings_spec.ts
index 5ee55ade5d4..b98d052a986 100644
--- a/projects/schematics/src/shared/schematics-config-mappings_spec.ts
+++ b/projects/schematics/src/shared/schematics-config-mappings_spec.ts
@@ -19,6 +19,7 @@ import {
CHECKOUT_SCHEDULED_REPLENISHMENT_ROOT_MODULE,
CHECKOUT_SCHEDULED_REPLENISHMENT_SCHEMATICS_CONFIG,
CDC_ADMINISTRATION_MODULE,
+ CDC_B2B_REGISTER_MODULE,
MINI_CART_MODULE,
ORDER_MODULE,
ORDER_ROOT_MODULE,
@@ -90,6 +91,7 @@ describe('schematics-config-mappings', () => {
CDC_USER_ACCOUNT_MODULE,
CDC_USER_PROFILE_MODULE,
CDC_ADMINISTRATION_MODULE,
+ CDC_B2B_REGISTER_MODULE,
]);
});
});
diff --git a/projects/schematics/src/shared/utils/dependency-utils_spec.ts b/projects/schematics/src/shared/utils/dependency-utils_spec.ts
index 092c24c0753..5b5289feafb 100644
--- a/projects/schematics/src/shared/utils/dependency-utils_spec.ts
+++ b/projects/schematics/src/shared/utils/dependency-utils_spec.ts
@@ -7,6 +7,7 @@ import {
CHECKOUT_BASE_FEATURE_NAME,
DIGITAL_PAYMENTS_FEATURE_NAME,
ORDER_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
SPARTACUS_ASM,
SPARTACUS_CART,
@@ -46,6 +47,7 @@ describe('dependency-util', () => {
ORDER_FEATURE_NAME,
CHECKOUT_BASE_FEATURE_NAME,
CHECKOUT_B2B_FEATURE_NAME,
+ ORGANIZATION_USER_REGISTRATION_FEATURE_NAME,
ORGANIZATION_ADMINISTRATION_FEATURE_NAME,
DIGITAL_PAYMENTS_FEATURE_NAME,
CDC_FEATURE_NAME,
diff --git a/projects/schematics/src/shared/utils/graph-utils_spec.ts b/projects/schematics/src/shared/utils/graph-utils_spec.ts
index 6047f4614d9..5fd2883d8a6 100644
--- a/projects/schematics/src/shared/utils/graph-utils_spec.ts
+++ b/projects/schematics/src/shared/utils/graph-utils_spec.ts
@@ -15,7 +15,9 @@ import {
SPARTACUS_PRODUCT,
SPARTACUS_PRODUCT_CONFIGURATOR,
SPARTACUS_QUALTRICS,
+ SPARTACUS_REQUESTED_DELIVERY_DATE,
SPARTACUS_S4OM,
+ SPARTACUS_SEGMENT_REFS,
SPARTACUS_SMARTEDIT,
SPARTACUS_STOREFINDER,
SPARTACUS_TRACKING,
@@ -129,9 +131,12 @@ describe('Graph utils', () => {
SPARTACUS_ORDER,
SPARTACUS_STOREFINDER,
SPARTACUS_CHECKOUT,
+ SPARTACUS_REQUESTED_DELIVERY_DATE,
SPARTACUS_TRACKING,
SPARTACUS_ORGANIZATION,
SPARTACUS_ASM,
+ SPARTACUS_STOREFINDER,
+ SPARTACUS_SEGMENT_REFS,
SPARTACUS_S4OM,
SPARTACUS_EPD_VISUALIZATION,
SPARTACUS_DIGITAL_PAYMENTS,
@@ -165,10 +170,10 @@ describe('Graph utils', () => {
"Personalization",
"TMS-AEPL",
"TMS-GTM",
+ "Organization-User-Registration",
"Administration",
"Account-Summary",
"Unit-Order",
- "Organization-User-Registration",
"Order-Approval",
"VC-Configurator",
"CPQ-Configurator",
@@ -176,6 +181,7 @@ describe('Graph utils', () => {
"Store-Finder",
"ASM",
"Customer-360",
+ "Segment-Refs",
"S4HANA-Order-Management",
"EPD-Visualization",
"Digital-Payments",
@@ -183,6 +189,7 @@ describe('Graph utils', () => {
"CDC",
"Customer-Ticketing",
"SmartEdit",
+ "Requested-Delivery-Date",
"Qualtrics",
"Future-Stock",
"Product-Variants",
diff --git a/projects/schematics/src/shared/utils/test-utils.ts b/projects/schematics/src/shared/utils/test-utils.ts
index 10f4363f4fe..f6cdf7aedf3 100644
--- a/projects/schematics/src/shared/utils/test-utils.ts
+++ b/projects/schematics/src/shared/utils/test-utils.ts
@@ -49,6 +49,8 @@ export const organizationOrderApprovalFeatureModulePath =
'src/app/spartacus/features/organization/organization-order-approval-feature.module.ts';
export const organizationUserRegistrationFeatureModulePath =
'src/app/spartacus/features/organization/organization-user-registration-feature.module.ts';
+export const organizationUserRegistrationWrapperModulePath =
+ 'src/app/spartacus/features/organization/organization-user-registration-wrapper.module.ts';
export const organizationUnitOrderFeatureModulePath =
'src/app/spartacus/features/organization/organization-unit-order-feature.module.ts';
export const organizationAccountSummaryFeatureModulePath =
@@ -67,6 +69,8 @@ export const productConfiguratorRulebasedWrapperModulePath =
'src/app/spartacus/features/product-configurator/rulebased-configurator-wrapper.module.ts';
export const qualtricsFeatureModulePath =
'src/app/spartacus/features/qualtrics/qualtrics-feature.module.ts';
+export const requestedDeliveryDateFeatureModulePath =
+ 'src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts';
export const smartEditFeatureModulePath =
'src/app/spartacus/features/smartedit/smart-edit-feature.module.ts';
export const storeFinderFeatureModulePath =
@@ -90,6 +94,8 @@ export const digitalPaymentsFeatureModulePath =
'src/app/spartacus/features/digital-payments/digital-payments-feature.module.ts';
export const epdFeatureModulePath =
'src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts';
+export const segmentRefsFeatureModulePath =
+ 'src/app/spartacus/features/segment-refs/segment-refs-feature.module.ts';
export function writeFile(
host: TempScopedNodeJsSyncHost,
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/b2b/regression/asm/customer-list.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/b2b/regression/asm/customer-list.e2e-flaky.cy.ts
index eaae974e83f..dfd44574642 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/b2b/regression/asm/customer-list.e2e-flaky.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/b2b/regression/asm/customer-list.e2e-flaky.cy.ts
@@ -45,7 +45,6 @@ context('Assisted Service Module', () => {
asm.agentLogin('brandon.leclair@acme.com', 'pw4all');
asm.asmB2bCustomerLists();
- asm.agentSignOut();
});
it('checking pagination (CXSPA-2109)', () => {
@@ -61,7 +60,6 @@ context('Assisted Service Module', () => {
asm.agentLogin('jules.hasson@acme.com', 'pw4all');
asm.asmB2bCustomerListPagination();
- asm.agentSignOut();
});
});
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/bind-cart.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/bind-cart.e2e-flaky.cy.ts
index d8f4f31e926..cfb79f8ef34 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/bind-cart.e2e-flaky.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/bind-cart.e2e-flaky.cy.ts
@@ -13,14 +13,14 @@ import { getSampleUser } from '../../../sample-data/checkout-flow';
context('Assisted Service Module', () => {
describe('Bind cart', () => {
- it('should be able to bind anonymous cart to customer (CXSAP-153)', () => {
- const customer = getSampleUser();
+ const customerForBindCart = getSampleUser();
+ let anonymousCartCodeForBindCart: string;
- let anonymousCartCode: string;
+ it('should be able to bind anonymous cart to customer (CXSAP-153)', () => {
checkout.visitHomePage();
cy.get('cx-asm-main-ui').should('not.exist');
- checkout.registerUser(false, customer);
+ checkout.registerUser(false, customerForBindCart);
cy.log('--> Add to cart as an anonymous user');
cart.addProductAsAnonymous();
@@ -32,7 +32,7 @@ context('Assisted Service Module', () => {
.then(($cartId) => {
// localStorage contains anonymous cart uid, read code from UI
const text = $cartId.text();
- anonymousCartCode = text.replace('Cart #', '').trim();
+ anonymousCartCodeForBindCart = text.replace('Cart #', '').trim();
cy.log('--> Agent logging in');
checkout.visitHomePage('asm=true');
@@ -41,12 +41,12 @@ context('Assisted Service Module', () => {
asm.agentLogin('asagent', 'pw4all');
cy.log('--> Starting customer emulation');
- asm.startCustomerEmulation(customer);
+ asm.startCustomerEmulation(customerForBindCart);
cy.log('--> Enter users cart number');
cy.get(
'cx-customer-emulation input[formcontrolname="cartNumber"]'
- ).type(anonymousCartCode);
+ ).type(anonymousCartCodeForBindCart);
});
cy.log('--> Agent binding cart');
@@ -58,22 +58,17 @@ context('Assisted Service Module', () => {
const customerCartCode = JSON.parse(
window.localStorage.getItem('spartacusâš¿electronics-spaâš¿cart')
).active;
- expect(customerCartCode).to.equal(anonymousCartCode);
+ expect(customerCartCode).to.equal(anonymousCartCodeForBindCart);
});
+ });
- cy.log(
- '--> Stop customer emulation using the end emulation button in the ASM UI'
- );
- asm.agentSignOut();
-
- cy.get('cx-asm-main-ui').should('exist');
-
+ it(`Verify anonymous cart is now the user's active cart for bind cart (CXSAP-153)`, () => {
cy.log('--> Log in as customer');
const loginPage = waitForPage('/login', 'getLoginPage');
cy.visit('/login');
cy.wait(`@${loginPage}`);
- login(customer.email, customer.password);
- cy.wait('@csAgentAuthentication');
+ login(customerForBindCart.email, customerForBindCart.password);
+ cy.get('cx-login .cx-login-greet').should('be.visible');
cy.log("--> Verify anonymous cart is now the user's active cart");
cart.goToCart();
@@ -81,17 +76,17 @@ context('Assisted Service Module', () => {
const customerCartCode = JSON.parse(
window.localStorage.getItem('spartacusâš¿electronics-spaâš¿cart')
).active;
- expect(customerCartCode).to.equal(anonymousCartCode);
+ expect(customerCartCode).to.equal(anonymousCartCodeForBindCart);
});
});
+ const customerForReplaceBindCart = getSampleUser();
+ let anonymousCartCodeForReplaceBindCart: string;
it('should be able to replace current customer cart with anonymous cart (CXSAP-153)', () => {
- const customer = getSampleUser();
-
checkout.visitHomePage();
cy.get('cx-asm-main-ui').should('not.exist');
- checkout.registerUser(false, customer);
+ checkout.registerUser(false, customerForReplaceBindCart);
cy.log('--> Add to cart as an anonymous user');
cart.addProductAsAnonymous();
@@ -103,8 +98,10 @@ context('Assisted Service Module', () => {
.then(($cartId) => {
// localStorage contains anonymous cart uid, but need cart code. read cart code from UI
const text = $cartId.text();
- const anonymousCartCode = text.replace('Cart #', '').trim();
- cy.wrap(anonymousCartCode).as('anonymousCartCode');
+ anonymousCartCodeForReplaceBindCart = text
+ .replace('Cart #', '')
+ .trim();
+ cy.wrap(anonymousCartCodeForReplaceBindCart).as('anonymousCartCode');
});
cy.get('@anonymousCartCode').then((anonymousCartCode) => {
cy.log(`--> Anonymous cart id: ${anonymousCartCode}`);
@@ -117,7 +114,7 @@ context('Assisted Service Module', () => {
asm.agentLogin('asagent', 'pw4all');
cy.log('--> Starting customer emulation');
- asm.startCustomerEmulation(customer);
+ asm.startCustomerEmulation(customerForReplaceBindCart);
cy.log('--> Create current active cart');
cart.addProductFromPdp(cart.products[1].code).then(() => {
@@ -155,20 +152,18 @@ context('Assisted Service Module', () => {
expect(customerCartCode).to.equal(anonymousCartCode);
});
});
+ });
- cy.log(
- '--> Stop customer emulation using the end emulation button in the ASM UI'
- );
- asm.agentSignOut();
-
- cy.get('cx-asm-main-ui').should('exist');
-
+ it(`Verify anonymous cart is now the user's active cart for replace bind cart (CXSAP-153)`, () => {
cy.log('--> Log in as customer');
const loginPage = waitForPage('/login', 'getLoginPage');
cy.visit('/login');
cy.wait(`@${loginPage}`);
- login(customer.email, customer.password);
- cy.wait('@csAgentAuthentication');
+ login(
+ customerForReplaceBindCart.email,
+ customerForReplaceBindCart.password
+ );
+ cy.get('cx-login .cx-login-greet').should('be.visible');
cy.log("--> Verify anonymous cart is now the user's active cart");
cart.goToCart();
@@ -176,9 +171,7 @@ context('Assisted Service Module', () => {
const customerCartCode = JSON.parse(
window.localStorage.getItem('spartacusâš¿electronics-spaâš¿cart')
).active;
- cy.get('@anonymousCartCode').then((anonymousCartCode) => {
- expect(customerCartCode).to.equal(anonymousCartCode);
- });
+ expect(customerCartCode).to.equal(anonymousCartCodeForReplaceBindCart);
});
});
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/create-customer.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/create-customer.e2e-flaky.cy.ts
index cce0303f15c..f5dc14a04aa 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/create-customer.e2e-flaky.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/create-customer.e2e-flaky.cy.ts
@@ -16,6 +16,7 @@ context('Assisted Service Module', () => {
});
describe('Create Customer', () => {
+ const user = getSampleUser();
it('should be able to create a new customer by agent click button (CXSPA-1594)', () => {
cy.log('--> Agent logging in');
checkout.visitHomePage('asm=true');
@@ -35,7 +36,6 @@ context('Assisted Service Module', () => {
asm.asmOpenCreateCustomerDialogOnCustomerListDialog();
cy.log('--> fill form');
- let user = getSampleUser();
asm.fillCreateCustomerForm(user);
cy.log('--> submit form');
@@ -46,8 +46,6 @@ context('Assisted Service Module', () => {
cy.get('cx-customer-emulation').should('be.visible');
- asm.agentSignOut();
-
const backOfficeUrl =
Cypress.env('BACK_OFFICE_URL') + Cypress.env('BACK_OFFICE_PREFIX');
cy.log('--> Go to ' + backOfficeUrl + ' to update the customer password');
@@ -120,7 +118,9 @@ context('Assisted Service Module', () => {
'Saved items'
);
});
+ });
+ it('vertify login to Spartacus (CXSPA-1594)', () => {
cy.log('--> Return to Spartacus to verify login');
checkout.visitHomePage();
cy.log('--> Log in to Spartacus');
@@ -150,8 +150,6 @@ context('Assisted Service Module', () => {
cy.log('--> close create customer dialog');
asm.asmCloseCreateCustomerDialog();
-
- asm.agentSignOut();
});
it('should be not able to create a new customer with invalid user data by agent (CXSPA-1594)', () => {
cy.log('--> Agent logging in');
@@ -206,8 +204,6 @@ context('Assisted Service Module', () => {
cy.log('--> close create customer dialog');
asm.asmCloseCreateCustomerDialog();
-
- asm.agentSignOut();
});
});
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e-flaky.cy.ts
index af310c31a62..270555a3f37 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e-flaky.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e-flaky.cy.ts
@@ -27,7 +27,6 @@ context('Assisted Service Module', () => {
asm.agentLogin('asagent', 'pw4all');
asm.asmCustomerLists();
- asm.agentSignOut();
});
it('checking pagination (CXSPA-2109)', () => {
@@ -37,7 +36,6 @@ context('Assisted Service Module', () => {
asm.agentLogin('asagent', 'pw4all');
asm.asmCustomerListPagination();
- asm.agentSignOut();
});
});
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/cms/cms-navigation.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/cms/cms-navigation.e2e.cy.ts
new file mode 100644
index 00000000000..f928aa03d20
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/cms/cms-navigation.e2e.cy.ts
@@ -0,0 +1,47 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { isolateTests } from '../../../support/utils/test-isolation';
+
+context('Cms navigation', { testIsolation: false }, () => {
+ isolateTests();
+ it('should not go into infinite loop of loading cms components data, when some details of some component are missing', () => {
+ /**
+ * Circuit breaker, just in case if the infinite loop would happen. However, in a successful test pass, infinite loop should not happen.
+ */
+ let circuitBreakerCounter = 20;
+ function shouldSimulateMissingData(): boolean {
+ return circuitBreakerCounter-- >= 0;
+ }
+
+ // We want to intercept the HTTP response from `/cms/components` endpoint and simulate missing details of one random CMS component.
+ // This endpoint is expected to be called a few times, but not infinite number of times.
+ // Just in case we would go into infinite loop, we have circuit breaker.
+ cy.intercept('GET', `**/cms/components*`, (req) => {
+ req.reply((res) => {
+ if (shouldSimulateMissingData()) {
+ res.body.component.pop();
+ }
+ return res;
+ });
+ }).as('getComponents');
+
+ cy.visit('/');
+ cy.wait('@getComponents');
+ cy.get('cx-category-navigation cx-generic-link').should('exist');
+
+ // `/cms/components` endpoint is called for each different Navigation components (e.g. header and footer)
+ const EXPECTED_MAX_COUNT_LOADING_CMS_COMPONENTS = 4;
+
+ // Our heuristic to assert that there is no infinite loop of calling `/cms/components` endpoint
+ // is to check whether this endpoint was called not too many times during 1st second after the page is rendered.
+ cy.wait(1_000);
+ cy.get('@getComponents.all', { timeout: 0 }).should(
+ 'have.length.at.most',
+ EXPECTED_MAX_COUNT_LOADING_CMS_COMPONENTS
+ );
+ });
+});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/my-account/update-password.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/my-account/update-password.e2e-flaky.cy.ts
new file mode 100644
index 00000000000..99578b2e5f8
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/my-account/update-password.e2e-flaky.cy.ts
@@ -0,0 +1,85 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import * as asm from '../../../helpers/asm';
+import * as checkout from '../../../helpers/checkout-flow';
+import * as alerts from '../../../helpers/global-message';
+import { signOutUser } from '../../../helpers/login';
+import * as updatePassword from '../../../helpers/update-password';
+import { generateMail, randomString } from '../../../helpers/user';
+import { viewportContext } from '../../../helpers/viewport-context';
+import { standardUser } from '../../../sample-data/shared-users';
+import { isolateTests } from '../../../support/utils/test-isolation';
+describe('My Account - Update Password', () => {
+ viewportContext(['mobile'], () => {
+ before(() =>
+ cy.window().then((win) => {
+ win.sessionStorage.clear();
+ })
+ );
+ // Core e2e test. Repeat in mobile viewport.
+ updatePassword.testUpdatePasswordLoggedInUser();
+ });
+
+ viewportContext(['mobile', 'desktop'], () => {
+ before(() =>
+ cy.window().then((win) => {
+ win.sessionStorage.clear();
+ })
+ );
+
+ describe('update password by agent', { testIsolation: false }, () => {
+ isolateTests();
+ before(() => {
+ standardUser.registrationData.email = generateMail(
+ randomString(),
+ true
+ );
+ cy.requireLoggedIn(standardUser);
+ cy.visit('/');
+ });
+
+ it('should display server error if agent try to modify customer password(CXSPA-3399)', () => {
+ const customer = {
+ fullName:
+ standardUser.registrationData.firstName +
+ ' ' +
+ standardUser.registrationData.lastName,
+ email: standardUser.registrationData.email,
+ };
+ cy.log('--> Agent logging in');
+ checkout.visitHomePage('asm=true');
+ cy.get('cx-asm-main-ui').should('exist');
+ cy.get('cx-asm-main-ui').should('be.visible');
+ asm.agentLogin('asagent', 'pw4all');
+ cy.log('--> Starting customer emulation');
+ asm.startCustomerEmulation(customer);
+
+ cy.selectUserMenuOption({
+ option: 'Password',
+ });
+
+ alerts.getErrorAlert().should('not.exist');
+ cy.get('[formcontrolname="oldPassword"]').type(
+ standardUser.registrationData.password
+ );
+ cy.get('[formcontrolname="newPassword"]').type(
+ updatePassword.newPassword
+ );
+ cy.get('[formcontrolname="newPasswordConfirm"]').type(
+ updatePassword.newPassword
+ );
+ cy.get('cx-update-password button.btn-primary').click();
+ cy.url().should('contain', updatePassword.PAGE_URL_UPDATE_PASSWORD);
+ alerts.getErrorAlert().should('contain', 'Access is denied');
+ });
+
+ after(() => {
+ signOutUser();
+ });
+ });
+ });
+});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts
index 0ed2ba23464..4283eaf496b 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-textfield.e2e.cy.ts
@@ -7,6 +7,7 @@
import * as cart from '../../../helpers/cart';
import * as configuration from '../../../helpers/product-configurator';
import * as textfieldConfiguration from '../../../helpers/textfield-configuration';
+import * as common from '../../../helpers/common';
const electronicsShop = 'electronics-spa';
const testProduct = '1934793';
@@ -46,8 +47,8 @@ context('Textfield Configuration', () => {
electronicsShop,
testProduct
);
- textfieldConfiguration.clickOnAddToCartBtnOnPD();
- textfieldConfiguration.clickOnViewCartBtnOnPD();
+ common.clickOnAddToCartBtnOnPD();
+ common.clickOnViewCartBtnOnPD();
cart.verifyCartNotEmpty();
textfieldConfiguration.clickOnEditConfigurationLink(0);
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts
index 5361db0d602..3ae7b31c767 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-cart.e2e-flaky.cy.ts
@@ -12,6 +12,7 @@ import * as configurationCartVc from '../../../helpers/product-configurator-cart
import * as configurationOverview from '../../../helpers/product-configurator-overview';
import * as configurationOverviewVc from '../../../helpers/product-configurator-overview-vc';
import * as configurationVc from '../../../helpers/product-configurator-vc';
+import * as common from '../../../helpers/common';
const electronicsShop = 'electronics-spa';
const testProductMultiLevel = 'CONF_HOME_THEATER_ML';
@@ -98,8 +99,8 @@ context('Product Configuration', () => {
it('should be able to navigate from the cart after adding product directly to the cart', () => {
clickAllowAllFromBanner();
configuration.searchForProduct(testProductMultiLevel);
- configuration.clickOnAddToCartBtnOnPD();
- configuration.clickOnViewCartBtnOnPD();
+ common.clickOnAddToCartBtnOnPD();
+ common.clickOnViewCartBtnOnPD();
cart.verifyCartNotEmpty();
configurationCart.clickOnEditConfigurationLink(0);
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts
index ae4e2e9618f..825e716f8ca 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts
@@ -8,6 +8,7 @@ import * as configuration from '../../../helpers/product-configurator';
import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents';
import * as configurationOverviewVc from '../../../helpers/product-configurator-overview-vc';
import * as configurationVc from '../../../helpers/product-configurator-vc';
+import * as common from '../../../helpers/common';
const electronicsShop = 'electronics-spa';
const testProduct = 'CONF_CAMERA_SL';
@@ -96,7 +97,7 @@ context('Product Configuration', () => {
it('should be able to navigate from the product details page', () => {
clickAllowAllFromBanner();
- configurationVc.goToPDPage(electronicsShop, testProduct);
+ common.goToPDPage(electronicsShop, testProduct);
configurationVc.clickOnConfigureBtnInCatalog(testProduct);
});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts
new file mode 100644
index 00000000000..216ba80a3d4
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cdc/b2b/b2b-register-org.core-e2e.cy.ts
@@ -0,0 +1,97 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import * as cdc from '../../../../helpers/vendor/cdc/cdc';
+import {
+ user,
+ organisation,
+ getSampleUser,
+} from '../../../../sample-data/checkout-flow';
+import { isolateTests } from '../../../../support/utils/test-isolation';
+import {
+ fillOrganizationUserRegistrationForm,
+ navigateToOrganizationUserRegisterPage,
+ submitOrganizationUserRegistrationForm,
+ verifyFormErrors,
+ verifyGlobalMessageAfterRegistration,
+ verifyRedirectionToLoginPage,
+ verifyTabbingOrder,
+} from '../../../../helpers/b2b/b2b-user-registration';
+
+describe('Register B2B Organisation when CDC enabled', () => {
+ describe('Register B2B Organisation with Screenset', () => {
+ before(() => {
+ cy.window().then((win) => win.sessionStorage.clear());
+ cy.visit('/cdc/register-org');
+ });
+
+ it('should register organization and request received message should appear', () => {
+ cdc.registerOrg(user, organisation);
+ cdc.verifyOrgRegistrationRequestReceived();
+ });
+ });
+
+ describe(
+ 'Registration B2B Organization with Native UI',
+ { testIsolation: false },
+ () => {
+ isolateTests();
+ before(() => {
+ cy.window().then((win) => win.sessionStorage.clear());
+ cy.visit('/');
+ });
+
+ it('should navigate to organization user registration page', () => {
+ navigateToOrganizationUserRegisterPage();
+ });
+
+ it('should fill registration form and register user', () => {
+ fillOrganizationUserRegistrationForm(
+ getSampleUser(),
+ 'Please register my account'
+ );
+ });
+
+ it('should verify tabbing order', () => {
+ // Accessibility
+ verifyTabbingOrder();
+ });
+
+ it('should submit the form filled with data', () => {
+ cy.get('cx-user-registration-form').within(() => {
+ cy.get('button[type=submit]').click();
+ });
+ });
+
+ it('should verify global message after successful registration', () => {
+ const message =
+ 'Thank you for registering! A representative will contact you shortly and confirm your access information.';
+ verifyGlobalMessageAfterRegistration(message);
+ // verifyRedirectionToLoginPage();
+ // cdc.verifyOrgRegistrationRequestReceived();
+ });
+
+ describe('Form errors', () => {
+ before(() => {
+ cy.window().then((win) => win.sessionStorage.clear());
+ cy.visit('/');
+ });
+
+ it('should display validation errors if form is empty', () => {
+ navigateToOrganizationUserRegisterPage();
+
+ /*
+ * If form is not valid we should not expect call to the API
+ */
+ cy.get('cx-user-registration-form').within(() => {
+ cy.get('button[type=submit]').click();
+ });
+ verifyFormErrors();
+ });
+ });
+ }
+ );
+});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts
index 73072a13ccd..eaaa97ae98d 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.ccv2-e2e.cy.ts
@@ -8,8 +8,7 @@ import * as configuration from '../../../helpers/product-configurator';
import * as configurationCpq from '../../../helpers/product-configurator-cpq';
import * as configurationOverview from '../../../helpers/product-configurator-overview';
import * as configurationOverviewCpq from '../../../helpers/product-configurator-overview-cpq';
-import * as configurationCart from '../../../helpers/product-configurator-cart';
-import * as configurationCartCpq from '../../../helpers/product-configurator-cart-cpq';
+import * as common from '../../../helpers/common';
import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents';
const POWERTOOLS = 'powertools-spa';
@@ -109,14 +108,14 @@ context('CPQ Configuration', () => {
});
it('should be able to navigate from the product details page', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
configurationCpq.clickOnConfigureBtnInCatalog();
});
});
describe('Handling different UI type', () => {
it('should support radio button attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_CUPS, RADGRP);
@@ -137,7 +136,7 @@ context('CPQ Configuration', () => {
});
it('should support checkbox list attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_MODE, CHKBOX);
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts
index 6c7348d5060..404da626436 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/cpq/cpq-configuration.core-e2e.cy.ts
@@ -10,6 +10,7 @@ import * as configurationOverview from '../../../helpers/product-configurator-ov
import * as configurationOverviewCpq from '../../../helpers/product-configurator-overview-cpq';
import * as configurationCart from '../../../helpers/product-configurator-cart';
import * as configurationCartCpq from '../../../helpers/product-configurator-cart-cpq';
+import * as common from '../../../helpers/common';
import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents';
const POWERTOOLS = 'powertools-spa';
@@ -127,14 +128,14 @@ testConfig.forEach((config) => {
});
it('should be able to navigate from the product details page', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
configurationCpq.clickOnConfigureBtnInCatalog();
});
});
describe('Handling different UI type', () => {
it('should support radio button attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_CUPS, RADGRP);
@@ -165,7 +166,7 @@ testConfig.forEach((config) => {
});
it('should support checkbox list attribute type', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_COF);
+ common.goToPDPage(POWERTOOLS, PROD_CODE_COF);
configurationCpq.clickOnConfigureBtnInCatalog();
configuration.checkAttributeDisplayed(ATTR_COF_MODE, CHKBOX);
@@ -555,9 +556,9 @@ testConfig.forEach((config) => {
describe('Configuration Process', () => {
it('should support configuration aspect in product search, cart, checkout and order history', () => {
- configurationCpq.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
- configuration.clickOnAddToCartBtnOnPD();
- configuration.clickOnViewCartBtnOnPD();
+ common.goToPDPage(POWERTOOLS, PROD_CODE_CAM);
+ common.clickOnAddToCartBtnOnPD();
+ common.clickOnViewCartBtnOnPD();
cy.get('cx-mini-cart .count').then((elem) => {
const numberOfCartItems = Number(elem.text());
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts
new file mode 100644
index 00000000000..21aa07b32f4
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/requested-delivery-date/requested-delivery-date.e2e.cy.ts
@@ -0,0 +1,168 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import * as b2bCheckout from '../../../helpers/b2b/b2b-checkout';
+import {
+ interceptOrdersEndpoint,
+ waitForResponse,
+} from '../../../helpers/order-history';
+import * as rddHelper from '../../../helpers/vendor/requested-delivery-date/requested-delivery-date';
+import * as s4Helper from '../../../helpers/vendor/s4om/s4om';
+import {
+ ORDER_REQUEST_ENDPOINT,
+ order_type,
+ POWERTOOLS_BASESITE,
+ USER_REQUEST_ENDPOINT,
+} from '../../../sample-data/b2b-checkout';
+import { isolateTestsBefore } from '../../../support/utils/test-isolation';
+
+//Set the date in mmm dd, yyyy format
+const formattedDate = new Date().toLocaleDateString('en', {
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+});
+const today = new Date();
+
+//Set the date in yyyy-mm-dd format
+const inputDate = `${today.getFullYear()}-${today.toLocaleString('default', {
+ month: '2-digit',
+})}-${today.toLocaleString('default', { day: '2-digit' })}`;
+
+describe('Requested Delivery Date', { testIsolation: false }, () => {
+ isolateTestsBefore();
+ before(() => {
+ cy.window().then((win) => win.sessionStorage.clear());
+ Cypress.env('BASE_SITE', POWERTOOLS_BASESITE);
+ Cypress.env('OCC_PREFIX_USER_ENDPOINT', USER_REQUEST_ENDPOINT);
+ Cypress.env('OCC_PREFIX_ORDER_ENDPOINT', ORDER_REQUEST_ENDPOINT);
+ });
+
+ beforeEach(() => {
+ cy.restoreLocalStorage();
+ });
+
+ afterEach(() => {
+ cy.saveLocalStorage();
+ });
+
+ describe('Requested Delivery Date in Checkout Flow', () => {
+ it('should be able to login as a b2b user', () => {
+ s4Helper.loginS4OMB2bUser();
+ });
+
+ it('should add a S4 HANA product (TG-11) to cart', () => {
+ s4Helper.resetCart(); //clear the cart
+ s4Helper.addB2bS4ProductToCart(); //Ensure that the cart has only 1 S4 product
+ });
+
+ it('should proceed to checkout and select Account payment type', () => {
+ s4Helper.proceedtoCheckOutS4Product();
+ b2bCheckout.enterPONumber(rddHelper.poNumber);
+ b2bCheckout.selectAccountPayment();
+ });
+
+ it('should select shipping address', () => {
+ s4Helper.selectS4OMAccountShippingAddress();
+ });
+
+ it('should select delivery mode and display Request Delivery Date form', () => {
+ rddHelper.selectAccountDeliveryMode();
+ });
+
+ it('should show an error when an invalid delivery date is provided', () => {
+ rddHelper.updateRequestedDeliveryDate('1000-01-01');
+ rddHelper.verifyDeliveryDateErrorMessage();
+ });
+
+ it('should show an info message when the delivery date is updated', () => {
+ rddHelper.updateRequestedDeliveryDate(inputDate);
+ rddHelper.verifyDeliveryDateInfoMessage();
+ });
+
+ it('should review and display the Requested Delivery Date', () => {
+ rddHelper.proceedToOrderReviewPage();
+ rddHelper.verifyRDDOrderReviewPage(formattedDate);
+ });
+
+ it('should route back to the select delivery mode step when the edit button is clicked', () => {
+ rddHelper.editDeliveryMethodOrderReviewPage();
+ rddHelper.proceedToOrderReviewPage();
+ });
+
+ it('should place order', () => {
+ rddHelper.verifyRDDOrderReviewPage(formattedDate);
+ b2bCheckout.reviewB2bReviewOrderPage(
+ s4Helper.s4omB2bAccountShipToUser,
+ s4Helper.cartWithS4OMB2bProductAndPremiumShipping,
+ true,
+ order_type.PLACE_ORDER,
+ s4Helper.s4omTabbingOrderConfig,
+ rddHelper.poNumber,
+ s4Helper.s4omCostCenter,
+ s4Helper.s4omB2BUnit
+ );
+ b2bCheckout.placeOrder('/order-confirmation');
+ });
+
+ it('should display order confirmation summary page with Requested delivery date', () => {
+ s4Helper.reviewB2bOrderDetail(
+ s4Helper.s4omB2bAccountShipToUser,
+ s4Helper.s4omProduct,
+ s4Helper.cartWithS4OMB2bProductAndPremiumShipping,
+ true,
+ null,
+ rddHelper.poNumber,
+ s4Helper.s4omCostCenter,
+ s4Helper.s4omB2BUnit
+ );
+ rddHelper.verifyRDDOrderDetailPage(formattedDate);
+ s4Helper.setOrderConfirmationIdInSessionStorage('rddOrderId');
+ });
+ });
+
+ describe('Requested Delivery Date in Order History', () => {
+ it('should be able to view order in order history with PO# and Cost center', () => {
+ cy.visit('/my-account/orders');
+ const ordersAlias = interceptOrdersEndpoint();
+ waitForResponse(ordersAlias);
+
+ const rddOrderId = window.sessionStorage.getItem('rddOrderId');
+ cy.wrap(rddOrderId).should('not.be.null');
+ s4Helper.findRowInOrderHistoryTable(
+ ordersAlias,
+ rddOrderId,
+ rddHelper.poNumber
+ );
+ });
+
+ it('should be able to view a past order detail in order detail page with requested delivery date information', () => {
+ cy.intercept({
+ method: 'GET',
+ pathname: `${Cypress.env('OCC_PREFIX')}/${Cypress.env(
+ 'BASE_SITE'
+ )}/users/current/orders/*`,
+ }).as('getOrderDetail');
+
+ const rddOrderId = window.sessionStorage.getItem('rddOrderId');
+ cy.visit('/my-account/order/' + rddOrderId);
+ cy.wait('@getOrderDetail');
+
+ s4Helper.reviewB2bOrderDetail(
+ s4Helper.s4omB2bAccountShipToUser,
+ s4Helper.s4omProduct,
+ s4Helper.cartWithS4OMB2bProductAndPremiumShipping,
+ true,
+ null,
+ rddHelper.poNumber,
+ s4Helper.s4omCostCenter,
+ s4Helper.s4omB2BUnit,
+ false
+ );
+ rddHelper.verifyRDDOrderDetailPage(formattedDate);
+ });
+ });
+});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts
index 2ad0229bac4..18547e65088 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/s4om/s4om-schedule-lines.e2e.cy.ts
@@ -18,8 +18,10 @@ import {
POWERTOOLS_BASESITE,
USER_REQUEST_ENDPOINT,
} from '../../../sample-data/b2b-checkout';
+import { isolateTestsBefore } from '../../../support/utils/test-isolation';
-describe('S4HANA Order management', () => {
+describe('S4HANA Order management', { testIsolation: false }, () => {
+ isolateTestsBefore();
before(() => {
cy.window().then((win) => win.sessionStorage.clear());
Cypress.env('BASE_SITE', POWERTOOLS_BASESITE);
@@ -65,7 +67,7 @@ describe('S4HANA Order management', () => {
});
it('should select delivery mode', () => {
- b2bCheckout.selectAccountDeliveryMode();
+ s4omHelper.selectAccountDeliveryMode();
});
it('should review and place order', () => {
@@ -87,10 +89,12 @@ describe('S4HANA Order management', () => {
s4omHelper.cartWithS4OMB2bProductAndPremiumShipping,
true,
null,
+ s4omHelper.s4omPONumber,
s4omHelper.s4omCostCenter,
s4omHelper.s4omB2BUnit
);
s4omHelper.verifyScheduleLineInfo();
+ s4omHelper.setOrderConfirmationIdInSessionStorage('s4omOrderId');
});
});
describe('Schedule lines in Order History', () => {
@@ -99,9 +103,14 @@ describe('S4HANA Order management', () => {
const ordersAlias = interceptOrdersEndpoint();
waitForResponse(ordersAlias);
- cy.get('cx-order-history h2').should('contain', 'Order history');
- cy.get('.cx-order-history-po a').should('contain', poNumber);
- //cy.get('.cx-order-history-cost-center a').should('contain', s4omHelper.s4omCostCenter);
+ const s4omPastOrderId =
+ window.sessionStorage.getItem('s4omOrderId') || '103439';
+ cy.wrap(s4omPastOrderId).should('not.be.null');
+ s4omHelper.findRowInOrderHistoryTable(
+ ordersAlias,
+ s4omPastOrderId,
+ poNumber
+ );
});
it('should be able to view a past order detail in order detail page with schedule line delivery information', () => {
@@ -112,7 +121,11 @@ describe('S4HANA Order management', () => {
)}/users/current/orders/*`,
}).as('getOrderDetail');
- cy.visit('/my-account/order/' + s4omHelper.s4omPastOrderId);
+ const s4omPastOrderId =
+ window.sessionStorage.getItem('s4omOrderId') ||
+ s4omHelper.s4omPastOrderId;
+ cy.wrap(s4omPastOrderId).should('not.be.null');
+ cy.visit('/my-account/order/' + s4omPastOrderId);
cy.wait('@getOrderDetail');
s4omHelper.reviewB2bOrderDetail(
@@ -121,6 +134,7 @@ describe('S4HANA Order management', () => {
s4omHelper.cartWithS4OMB2bProductAndPremiumShipping,
true,
null,
+ s4omHelper.s4omPONumber,
s4omHelper.s4omCostCenter,
s4omHelper.s4omB2BUnit,
false
diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/segment-refs/segment-refs-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/segment-refs/segment-refs-e2e.cy.ts
new file mode 100644
index 00000000000..2023bab4aa6
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/segment-refs/segment-refs-e2e.cy.ts
@@ -0,0 +1,28 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { interceptGet } from '../../../support/utils/intercept';
+
+export const APPAREL_BASESITE = 'apparel-uk-spa';
+export const APPAREL_CURRENCY = 'EUR';
+describe('Segment Reference', () => {
+ beforeEach(() => {
+ cy.restoreLocalStorage();
+ Cypress.env('BASE_SITE', APPAREL_BASESITE);
+ Cypress.env('BASE_CURRENCY', APPAREL_CURRENCY);
+ });
+ it('should fetch appropriate banner customization', () => {
+ interceptGet('segmentRefApi', '/cms/pages*');
+ cy.visit(
+ `${Cypress.env('BASE_SITE')}/${Cypress.env('BASE_LANG')}/${Cypress.env(
+ 'BASE_CURRENCY'
+ )}/?segmentrefs=footwear`
+ );
+ cy.wait('@segmentRefApi').then((xhr) => {
+ expect(xhr.request.headers).to.have.property('segmentrefs', 'footwear');
+ });
+ });
+});
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/accessibility/tabbing-order/asm.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/accessibility/tabbing-order/asm.ts
index 2a28742056d..e430f4341b5 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/accessibility/tabbing-order/asm.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/accessibility/tabbing-order/asm.ts
@@ -111,7 +111,6 @@ export function asmTabbingOrderWithSaveInactiveCartDialog(
cy.get('button[id=asm-save-inactive-cart-btn]').click();
verifyTabbingOrder(containerSelectorForInactiveCartDialog, config);
cy.findByText(/Cancel/i).click();
- asm.agentSignOut();
});
});
}
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/asm.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/asm.ts
index 0bf9029dc1e..9c400e2b540 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/asm.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/asm.ts
@@ -479,6 +479,7 @@ export function loginCustomerInStorefront(customer) {
cy.wait(authRequest).its('response.statusCode').should('eq', 200);
}
+// It is not recommended to use agentSignOut as it can cause failure in E2E tests related to ASM in the pipeline
export function agentSignOut() {
const tokenRevocationAlias = loginHelper.listenForTokenRevocationRequest();
cy.get('button[title="Sign Out"]').click();
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-checkout.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-checkout.ts
index 3b0f90c1806..7937013ef08 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-checkout.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/b2b/b2b-checkout.ts
@@ -158,14 +158,14 @@ export function addB2bProductToCart() {
addCheapProductToCart(products[0]);
}
-export function enterPONumber() {
+export function enterPONumber(poNum: string = poNumber) {
cy.get('cx-payment-type .cx-payment-type-container').should(
'contain',
'Payment method'
);
cy.get('cx-payment-type').within(() => {
- cy.get('.form-control').clear().type(poNumber);
+ cy.get('.form-control').clear().type(poNum);
});
// Accessibility
@@ -320,7 +320,10 @@ export function reviewB2bReviewOrderPage(
cartData: SampleCartProduct,
isAccount: boolean,
orderType: string,
- conf: TabbingOrderConfig = config
+ conf: TabbingOrderConfig = config,
+ poNum: string = poNumber,
+ costCtr: string = costCenter,
+ b2bUnt: string = b2bUnit
) {
verifyReviewOrderPage();
@@ -329,7 +332,7 @@ export function reviewB2bReviewOrderPage(
.contains('cx-card', 'Purchase Order Number')
.find('.cx-card-container')
.within(() => {
- cy.findByText(poNumber);
+ cy.findByText(poNum);
});
cy.get('.cx-review-summary-card')
@@ -343,8 +346,8 @@ export function reviewB2bReviewOrderPage(
.contains('cx-card', 'Cost Center')
.find('.cx-card-container')
.within(() => {
- cy.findByText(costCenter);
- cy.findByText(`(${b2bUnit})`);
+ cy.findByText(costCtr);
+ cy.findByText(`(${b2bUnt})`);
});
}
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/checkout-flow.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/checkout-flow.ts
index 6cd78329f25..6f94b5030ee 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/checkout-flow.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/checkout-flow.ts
@@ -328,7 +328,7 @@ export function goToPaymentDetails() {
}
export function clickAddNewPayment() {
- cy.findByText('Add New Payment').click();
+ cy.contains('Add New Payment').click();
}
export function goToCheapProductDetailsPage(
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts
new file mode 100644
index 00000000000..3b8b9edeeb5
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/common.ts
@@ -0,0 +1,60 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/**
+ * Clicks on 'Add to cart' on the product details page.
+ */
+export function clickOnAddToCartBtnOnPD(): void {
+ cy.get('cx-add-to-cart button.btn-primary')
+ .contains('Add to cart')
+ .click()
+ .then(() => {
+ cy.get('cx-added-to-cart-dialog').should('be.visible');
+ cy.get('div.cx-dialog-body').should('be.visible');
+ cy.get('div.cx-dialog-buttons a.btn-primary')
+ .contains('view cart')
+ .should('be.visible');
+ cy.get('div.cx-dialog-buttons a.btn-secondary')
+ .contains('proceed to checkout')
+ .should('be.visible');
+ });
+}
+
+/**
+ * Clicks on 'View Cart' on the product details page.
+ */
+export function clickOnViewCartBtnOnPD(): void {
+ cy.get('div.cx-dialog-buttons a.btn-primary')
+ .contains('view cart')
+ .click()
+ .then(() => {
+ cy.location('pathname').should('contain', '/cart');
+ cy.get('cx-cart-details').should('be.visible');
+ });
+}
+
+/**
+ * Navigates to the product detail page.
+ *
+ * @param {string} shopName - shop name
+ * @param {string} productId - Product ID
+ */
+export function goToPDPage(shopName: string, productId: string): void {
+ const location = `${shopName}/en/USD/product/${productId}/${productId}`;
+ cy.visit(location).then(() => {
+ checkLoadingMsgNotDisplayed();
+ cy.location('pathname').should('contain', location);
+ cy.get('.ProductDetailsPageTemplate').should('be.visible');
+ });
+}
+
+/**
+ * Verifies whether the loading message is not displayed.
+ */
+export function checkLoadingMsgNotDisplayed(): void {
+ cy.log('Wait until the loading notification is not displayed anymore');
+ cy.get('cx-storefront').should('not.contain.value', 'Loading');
+}
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts
index b4605a355e9..1729b670172 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-cpq.ts
@@ -56,20 +56,6 @@ export function goToCPQConfigurationPage(
});
}
-/**
- * Navigates to the product detail page.
- *
- * @param {string} shopName - shop name
- * @param {string} productId - Product ID
- */
-export function goToPDPage(shopName: string, productId: string): void {
- const location = `${shopName}/en/USD/product/${productId}/${productId}`;
- cy.visit(location).then(() => {
- cy.location('pathname').should('contain', location);
- cy.get('.ProductDetailsPageTemplate').should('be.visible');
- });
-}
-
/**
* Clicks on 'Add to Cart' button in catalog list.
*/
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts
index 7f7b51e7ee0..d9401d8d128 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator-vc.ts
@@ -5,6 +5,7 @@
*/
import * as configuration from './product-configurator';
+import * as common from './common';
const addToCartButtonSelector =
'cx-configurator-add-to-cart-button button.cx-add-to-cart-btn';
@@ -93,21 +94,6 @@ export function registerCreateConfigurationRoute() {
}).as(CREATE_CONFIG_ALIAS.substring(1)); // strip the '@'
}
-/**
- * Navigates to the product detail page.
- *
- * @param {string} shopName - shop name
- * @param {string} productId - Product ID
- */
-export function goToPDPage(shopName: string, productId: string): void {
- const location = `${shopName}/en/USD/product/${productId}/${productId}`;
- cy.visit(location).then(() => {
- checkLoadingMsgNotDisplayed();
- cy.location('pathname').should('contain', location);
- cy.get('.ProductDetailsPageTemplate').should('be.visible');
- });
-}
-
/**
* Navigates to the cart page.
*
@@ -121,14 +107,6 @@ export function goToCart(shopName: string) {
});
}
-/**
- * Verifies whether the loading message is not displayed.
- */
-export function checkLoadingMsgNotDisplayed(): void {
- cy.log('Wait until the loading notification is not displayed anymore');
- cy.get('cx-storefront').should('not.contain.value', 'Loading');
-}
-
/**
* Verifies whether the global message is not displayed on the top of the configuration.
*/
@@ -171,7 +149,7 @@ export function checkGhostAnimationNotDisplayed(): void {
*/
export function checkConfigPageDisplayed(): void {
checkGhostAnimationNotDisplayed();
- checkLoadingMsgNotDisplayed();
+ common.checkLoadingMsgNotDisplayed();
checkGlobalMessageNotDisplayed();
configuration.checkTabBarDisplayed();
configuration.checkGroupTitleDisplayed();
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts
index 89e41540429..9cf8c81b78a 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-configurator.ts
@@ -6,8 +6,8 @@
import * as login from './login';
import * as configurationCartVc from './product-configurator-cart-vc';
-//import * as configurationCart from './product-configurator-cart';
import * as productSearch from './product-search';
+import * as common from './common';
import { verifyGlobalMessageAfterRegistration } from './register';
const nextBtnSelector =
@@ -487,38 +487,6 @@ export function checkHamburgerDisplayed(): void {
).should('be.visible');
}
-/**
- * Clicks on 'Add to cart' on the product details page.
- */
-export function clickOnAddToCartBtnOnPD(): void {
- cy.get('cx-add-to-cart button.btn-primary')
- .contains('Add to cart')
- .click()
- .then(() => {
- cy.get('cx-added-to-cart-dialog').should('be.visible');
- cy.get('div.cx-dialog-body').should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-secondary')
- .contains('proceed to checkout')
- .should('be.visible');
- });
-}
-
-/**
- * Clicks on 'View Cart' on the product details page.
- */
-export function clickOnViewCartBtnOnPD(): void {
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .click()
- .then(() => {
- cy.location('pathname').should('contain', '/cart');
- cy.get('cx-cart-details').should('be.visible');
- });
-}
-
/**
* Clicks on 'Proceed to Checkout' on the product details page.
*/
@@ -569,7 +537,7 @@ export function completeOrderProcess(productName: string): void {
login.loginUser();
cy.wait(tokenAuthRequestAlias).its('response.statusCode').should('eq', 200);
this.searchForProduct(productName);
- this.clickOnAddToCartBtnOnPD();
+ common.clickOnAddToCartBtnOnPD();
this.clickOnProceedToCheckoutBtnOnPD();
configurationCartVc.checkout();
//TODO: activate after 22.05
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts
index 12fcbec1138..d692a8ddef2 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/textfield-configuration.ts
@@ -144,42 +144,6 @@ export function clickAddToCartButton(shopName: string): void {
});
}
-/**
- * Clicks 'Add to Cart' button on the product details page.
- */
-export function clickOnAddToCartBtnOnPD(): void {
- cy.log("Clicks 'Add to Cart' button on the product details page");
- cy.get('cx-add-to-cart button.btn-primary')
- .contains('Add to cart')
- .click()
- .then(() => {
- cy.get('cx-added-to-cart-dialog').should('be.visible');
- cy.get('div.cx-dialog-body').should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .should('be.visible');
- cy.get('div.cx-dialog-buttons a.btn-secondary')
- .contains('proceed to checkout')
- .should('be.visible');
- });
-}
-
-/**
- * Clicks on 'View Cart' on the product details page.
- */
-export function clickOnViewCartBtnOnPD(): void {
- cy.log("Clicks on 'View Cart' on the product details page");
- cy.get('div.cx-dialog-buttons a.btn-primary')
- .contains('view cart')
- .click()
- .then(() => {
- cy.log("Verify whether 'Cart details section' is visible");
- cy.get('cx-cart-details').should('be.visible');
- cy.log("Verify whether 'cx-cart-details' is visible");
- cy.get('cx-cart-details').should('be.visible');
- });
-}
-
/**
* Verifies whether the cart contains the product.
*
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/cdc/cdc.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/cdc/cdc.ts
index 159281651b0..5025fe9d6e4 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/cdc/cdc.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/cdc/cdc.ts
@@ -8,7 +8,11 @@ import { editedAddress } from '../../../helpers/address-book';
import { fillRegistrationForm, login } from '../../../helpers/auth-forms';
import * as loginHelper from '../../../helpers/login';
import { generateMail, randomString } from '../../../helpers/user';
-import { getSampleUser } from '../../../sample-data/checkout-flow';
+import {
+ getSampleUser,
+ SampleOrg,
+ SampleUser,
+} from '../../../sample-data/checkout-flow';
import { AddressData, fillShippingAddress } from '../../checkout-forms';
import * as alerts from '../../global-message';
import { listenForTokenRevocationRequest } from '../../login';
@@ -148,6 +152,22 @@ export function loginUser(email: string, password: string) {
});
}
+export function registerOrg(user: SampleUser, org: SampleOrg) {
+ cy.get('[id="gigya-org-register-form"]').within(() => {
+ cy.get('[name="organization.name"]').type(org.companyName);
+ cy.get('[name="organization.street_address"]').type(org.address);
+ cy.get('[name="organization.city"]').type(org.city);
+ cy.get('[name="organization.state"]').type(org.state);
+ cy.get('[name="organization.zip_code"]').type(org.zipCode);
+ cy.get('[name="organization.country"]').type(org.country);
+ cy.get('[name="requester.firstName"]').type(user.firstName);
+ cy.get('[name="requester.lastName"]').type(user.lastName);
+ cy.get('[name="requester.email"]').type(user.email);
+ cy.get('[name="requester.phone"]').type(user.phone);
+ cy.get('[class="gigya-input-submit"]').click();
+ });
+}
+
export function loginWithoutScreenSet(email: string, password: string) {
login(email, password);
}
@@ -156,6 +176,13 @@ export function verifyLoginOrRegistrationSuccess(fullName: string) {
cy.get('[class="cx-login-greet"]').should('contain', fullName);
}
+export function verifyOrgRegistrationRequestReceived() {
+ cy.get('[id="gigya-org-register-success-screen"]').should(
+ 'contain',
+ "We have received your request to register as a Customer. You'll receive an email once your request is approved."
+ );
+}
+
export function interceptCDCSDKMethod(methodName: string) {
let cdcInterceptName = 'CDCSdkInvocation';
cy.intercept({
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts
new file mode 100644
index 00000000000..c3f8432f38b
--- /dev/null
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/requested-delivery-date/requested-delivery-date.ts
@@ -0,0 +1,173 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {
+ b2bDeliveryAddress,
+ b2bDeliveryModeStub,
+} from '../../../sample-data/b2b-checkout';
+import { interceptGet } from '../../../support/utils/intercept';
+import { tabbingOrderConfig } from '../../accessibility/b2b/tabbing-order.config';
+import { verifyTabbingOrder } from '../../accessibility/tabbing-order';
+import {
+ TabbingOrderConfig,
+ TabbingOrderTypes,
+} from '../../accessibility/tabbing-order.model';
+import {
+ interceptCheckoutB2BDetailsEndpoint,
+ interceptPutDeliveryModeEndpoint,
+} from '../../b2b/b2b-checkout';
+import { waitForPage } from '../../checkout-flow';
+import * as alerts from '../../global-message';
+
+export const poNumber = '777';
+
+export const rddDeliveryModeTabbingConfig: TabbingOrderConfig = {
+ ...tabbingOrderConfig,
+ deliveryMode: [
+ { value: 'Method ofPayment', type: TabbingOrderTypes.LINK },
+ { value: 'ShippingAddress', type: TabbingOrderTypes.LINK },
+ { value: 'deliveryModeId', type: TabbingOrderTypes.RADIO },
+ { value: 'deliveryModeId', type: TabbingOrderTypes.RADIO },
+ { value: 'requestedDeliveryDate', type: TabbingOrderTypes.GENERIC_INPUT },
+ { value: 'Back', type: TabbingOrderTypes.BUTTON },
+ { value: 'Continue', type: TabbingOrderTypes.BUTTON },
+ ],
+};
+
+export function selectAccountDeliveryMode() {
+ const getCheckoutDetails = interceptCheckoutB2BDetailsEndpoint(
+ b2bDeliveryModeStub,
+ b2bDeliveryAddress.id
+ );
+ const putDeliveryMode = interceptPutDeliveryModeEndpoint();
+
+ interceptGet(
+ 'cart_refresh',
+ '/users/*/carts/*?fields=DEFAULT,potentialProductPromotions*'
+ );
+
+ cy.get('.cx-checkout-title').should('contain', 'Delivery Method');
+ cy.wait(`@${getCheckoutDetails}`)
+ .its('response.statusCode')
+ .should('eq', 200);
+ cy.get('cx-delivery-mode input').first().should('be.checked');
+ cy.get('cx-delivery-mode input').eq(1).click();
+
+ cy.wait(`@${putDeliveryMode}`).its('response.statusCode').should('eq', 200);
+ cy.get('cx-delivery-mode input').first().should('not.be.checked');
+
+ cy.get('input[type=radio][formcontrolname=deliveryModeId]').should(
+ 'not.be.disabled'
+ );
+ cy.get(
+ 'input[type=radio][formcontrolname=deliveryModeId]:not(:disabled)'
+ ).then(() => {
+ // Accessibility
+ verifyTabbingOrder(
+ 'cx-page-layout.MultiStepCheckoutSummaryPageTemplate',
+ rddDeliveryModeTabbingConfig.deliveryMode
+ );
+ });
+ cy.wait(`@cart_refresh`).then((xhr) => {
+ expect(xhr.request.method).to.eq('GET');
+ expect(xhr.response.statusCode).to.eq(200);
+ if (xhr && xhr.response && xhr.response.body) {
+ if (!xhr.response.body.requestedRetrievalAt) {
+ const alert = alerts.getAlert();
+ alert.should('contain', 'Delivery Date updated successfully.');
+ cy.get('cx-global-message .alert', { timeout: 5000 }).should(
+ 'not.exist'
+ );
+ }
+ }
+ });
+
+ verifyRDDDatePickerExists();
+}
+
+export function verifyRDDDatePickerExists() {
+ cy.get('cx-request-delivery-date').should('exist');
+ cy.get('cx-request-delivery-date').within(() => {
+ cy.get('cx-date-picker').should('exist');
+ cy.get('input[type="date"]', { timeout: 3000 }).should('not.be.disabled');
+ });
+}
+
+export function updateRequestedDeliveryDate(date: string) {
+ interceptPutRequestedRetrievalAtEndpoint();
+ cy.get('cx-date-picker').within(() => {
+ cy.get('input[type="date"]', { timeout: 3000 })
+ .should('not.be.disabled')
+ .type(date)
+ .trigger('update');
+ });
+}
+
+export function verifyDeliveryDateErrorMessage() {
+ cy.wait(`@putRetrievalAt`).its('response.statusCode').should('eq', 400);
+ //verify error message is shown.
+ const alert = alerts.getErrorAlert();
+ alert.should(
+ 'contain',
+ 'Something went wrong. Unable to update the requested date.'
+ );
+}
+
+export function verifyDeliveryDateInfoMessage() {
+ const getCheckoutDetails = interceptCheckoutB2BDetailsEndpoint(
+ b2bDeliveryModeStub,
+ b2bDeliveryAddress.id
+ );
+
+ cy.wait(`@${getCheckoutDetails}`)
+ .its('response.statusCode')
+ .should('eq', 200);
+
+ cy.wait(`@putRetrievalAt`).its('response.statusCode').should('eq', 200);
+ //verify info message is shown.
+ const alert = alerts.getAlert();
+ alert.should('contain', 'Delivery Date updated successfully.');
+}
+
+export function proceedToOrderReviewPage() {
+ const orderReview = waitForPage('/checkout/review-order', 'getReviewOrder');
+ cy.get('button.btn-primary').should('be.enabled').click();
+ cy.wait(`@${orderReview}`, { timeout: 30000 })
+ .its('response.statusCode')
+ .should('eq', 200);
+}
+
+export function verifyRDDOrderReviewPage(date: string) {
+ cy.get('.cx-review-summary-card')
+ .contains('cx-card', 'Delivery Method')
+ .get('cx-request-delivery-date')
+ .within(() => {
+ cy.findByText('Requested Delivery Date');
+ cy.findByText(date);
+ });
+}
+
+export function editDeliveryMethodOrderReviewPage() {
+ cy.get('.cx-review-card-shipping > .cx-review-summary-edit-step > a').click();
+ verifyRDDDatePickerExists();
+}
+
+export function verifyRDDOrderDetailPage(date: string) {
+ cy.get('cx-order-overview-delivery-date').should('exist');
+ cy.get('cx-order-overview-delivery-date').within(() => {
+ cy.findByText('Requested Delivery Date');
+ cy.findByText(date);
+ });
+}
+
+export function interceptPutRequestedRetrievalAtEndpoint() {
+ cy.intercept({
+ method: 'PUT',
+ path: `${Cypress.env('OCC_PREFIX')}/${Cypress.env(
+ 'BASE_SITE'
+ )}/**/requestedretrievaldate?requestedRetrievalAt=*`,
+ }).as('putRetrievalAt');
+}
diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/s4om/s4om.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/s4om/s4om.ts
index be0ccfe1748..901eb81a8e2 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/s4om/s4om.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/vendor/s4om/s4om.ts
@@ -5,6 +5,8 @@
*/
import {
+ b2bDeliveryAddress,
+ b2bDeliveryModeStub,
cartWithB2bProductAndPremiumShipping,
poNumber,
POWERTOOLS_BASESITE,
@@ -16,18 +18,21 @@ import {
SampleUser,
} from '../../../sample-data/checkout-flow';
import { AccountData } from '../../../support/require-logged-in.commands';
+import { interceptGet, interceptPost } from '../../../support/utils/intercept';
import { tabbingOrderConfig } from '../../accessibility/b2b/tabbing-order.config';
import { verifyTabbingOrder } from '../../accessibility/tabbing-order';
import {
TabbingOrderConfig,
TabbingOrderTypes,
} from '../../accessibility/tabbing-order.model';
-import { addProductToCart } from '../../applied-promotions';
import { login } from '../../auth-forms';
-import { interceptPutDeliveryModeEndpoint } from '../../b2b/b2b-checkout';
+import {
+ interceptCheckoutB2BDetailsEndpoint,
+ interceptPutDeliveryModeEndpoint,
+} from '../../b2b/b2b-checkout';
import { clearActiveCart, goToCart, validateEmptyCart } from '../../cart';
-//import { interceptPaymentTypesEndpoint } from "../../b2b/b2b-checkout";
import { waitForPage, waitForProductPage } from '../../checkout-flow';
+import { LOCATORS } from '../../pickup-in-store-utils';
export const s4omB2BUser: AccountData = {
registrationData: {
@@ -46,14 +51,14 @@ export const s4omB2bAccountShipToUser: SampleUser = {
fullName: 'James Weber',
address: {
city: 'Chicago',
- line1: 'Sunset, 87654, California, Beverly Hills, 90210',
+ line1: 'Sunset',
},
};
export const cartWithS4OMB2bProductAndPremiumShipping: SampleCartProduct = {
estimatedShipping: '$16.99',
- total: '$17.55',
- totalAndShipping: '$34.54',
+ total: '$12.55',
+ totalAndShipping: '$30.72',
};
export const s4omProduct: SampleProduct = {
@@ -62,9 +67,10 @@ export const s4omProduct: SampleProduct = {
};
export const s4omProductLink: string = s4omProduct.code + '/multi-eco-33i';
-export const s4omCostCenter: string = '17100005_CC';
+export const s4omPONumber: string = poNumber;
+export const s4omCostCenter: string = '17100003_CC';
export const s4omB2BUnit: string = 'Dell Bont Industries';
-export const s4omPastOrderId: string = '787';
+export const s4omPastOrderId: string = '103300';
const acceptAndSubmitOrder = [
{
@@ -80,7 +86,7 @@ const acceptAndSubmitOrder = [
export const s4omAccountReviewOrderGeneral = [
{ value: 'Method ofPayment', type: TabbingOrderTypes.LINK },
- { value: 'DeliveryAddress', type: TabbingOrderTypes.LINK },
+ { value: 'ShippingAddress', type: TabbingOrderTypes.LINK },
{ value: 'DeliveryMode', type: TabbingOrderTypes.LINK },
{
value: '/powertools-spa/en/USD/checkout/payment-type',
@@ -120,6 +126,19 @@ export const s4omAccountReviewOrderGeneral = [
},
];
+export const s4omDeliveryModeTabbingConfig: TabbingOrderConfig = {
+ ...tabbingOrderConfig,
+ deliveryMode: [
+ { value: 'Method ofPayment', type: TabbingOrderTypes.LINK },
+ { value: 'ShippingAddress', type: TabbingOrderTypes.LINK },
+ { value: 'deliveryModeId', type: TabbingOrderTypes.RADIO },
+ { value: 'deliveryModeId', type: TabbingOrderTypes.RADIO },
+ { value: 'requestedDeliveryDate', type: TabbingOrderTypes.GENERIC_INPUT },
+ { value: 'Back', type: TabbingOrderTypes.BUTTON },
+ { value: 'Continue', type: TabbingOrderTypes.BUTTON },
+ ],
+};
+
export const s4omTabbingOrderConfig: TabbingOrderConfig = {
...tabbingOrderConfig,
checkoutReviewOrder: [
@@ -145,6 +164,7 @@ export function loginS4OMB2bUser() {
cy.window().then((win) => win.sessionStorage.clear());
cy.visit('/login');
+ cy.get(LOCATORS.ALLOW_COOKIES_BUTTON).click();
login(
s4omB2BUser.registrationData.email,
s4omB2BUser.registrationData.password
@@ -165,7 +185,41 @@ export function addB2bS4ProductToCart() {
cy.get('h1').should('contain', s4omProduct.name);
});
- addProductToCart();
+ interceptPost(`cart_entry`, `/orgUsers/current/carts/*/entries*`);
+
+ interceptGet(
+ 'cart_refresh',
+ '/users/*/carts/*?fields=DEFAULT,potentialProductPromotions*'
+ );
+ cy.get('cx-add-to-cart')
+ .findByText(/Add To Cart/i)
+ .click();
+
+ //Obtain schedule line info from Cart Entry
+ cy.wait('@cart_entry')
+ .then((xhr) => {
+ expect(xhr.request.method).to.eq('POST');
+ if (
+ xhr &&
+ xhr.response &&
+ xhr.response.body &&
+ xhr.response.body.entry &&
+ xhr.response.body.entry.scheduleLines
+ ) {
+ window.sessionStorage.setItem(
+ 'TG11-scheduleLines',
+ JSON.stringify(xhr.response.body.entry.scheduleLines)
+ );
+ }
+ })
+ .its('response.statusCode')
+ .should('eq', 200);
+
+ cy.wait(`@cart_refresh`);
+
+ cy.get('cx-added-to-cart-dialog').within(() => {
+ cy.get('.cx-name .cx-link').should('contain', s4omProduct.name);
+ });
}
export function resetCart() {
@@ -184,9 +238,29 @@ export function goToCart() {
}
export function verifyScheduleLineInfo() {
- cy.get('[class="cx-schedule-line-info"]').within(() => {
- cy.findByText('Quantity');
- });
+ let scheduleLines = window.sessionStorage.getItem('TG11-scheduleLines');
+ cy.wrap('scheduleLines').should('not.be.null');
+
+ scheduleLines = JSON.parse(scheduleLines);
+ cy.wrap('scheduleLines').should('have.length.at.least', 1);
+
+ for (let i = 0; i < scheduleLines.length; i++) {
+ cy.get('[aria-describedby="cx-schedule-line-info-' + i + '"]').within(
+ () => {
+ const confirmedDate = new Date(
+ scheduleLines[i]['confirmedAt']
+ ).toLocaleDateString('en', {
+ year: 'numeric',
+ month: 'numeric',
+ day: 'numeric',
+ });
+
+ cy.contains(confirmedDate);
+ cy.contains('Qty');
+ cy.contains(scheduleLines[i]['confirmedQuantity']);
+ }
+ );
+ }
}
export function proceedtoCheckOutS4Product() {
@@ -200,7 +274,9 @@ export function proceedtoCheckOutS4Product() {
export function selectS4OMAccountShippingAddress() {
const putDeliveryMode = interceptPutDeliveryModeEndpoint();
- cy.wait(7000); //delivery address loads slow
+ cy.get('.cx-delivery-address-card-inner > cx-card .card-header', {
+ timeout: 15000,
+ }).should('contain', 'Selected'); //delivery address loads slow
cy.get('.cx-checkout-title').should('contain', 'Shipping Address');
cy.get('cx-order-summary .cx-summary-partials .cx-summary-row')
.first()
@@ -234,12 +310,53 @@ export function selectS4OMAccountShippingAddress() {
cy.wait(`@${putDeliveryMode}`).its('response.statusCode').should('eq', 200);
}
+export function selectAccountDeliveryMode() {
+ const getCheckoutDetails = interceptCheckoutB2BDetailsEndpoint(
+ b2bDeliveryModeStub,
+ b2bDeliveryAddress.id
+ );
+ const putDeliveryMode = interceptPutDeliveryModeEndpoint();
+
+ cy.get('.cx-checkout-title').should('contain', 'Delivery Method');
+
+ cy.get('cx-delivery-mode input').first().should('be.checked');
+ cy.get('cx-delivery-mode input').eq(1).click();
+
+ cy.wait(`@${putDeliveryMode}`).its('response.statusCode').should('eq', 200);
+ cy.wait(`@${getCheckoutDetails}`)
+ .its('response.statusCode')
+ .should('eq', 200);
+
+ cy.get('cx-delivery-mode input').first().should('not.be.checked');
+
+ cy.get(
+ 'input[type=radio][formcontrolname=deliveryModeId]:not(:disabled)'
+ ).then(() => {
+ // Accessibility
+ verifyTabbingOrder(
+ 'cx-page-layout.MultiStepCheckoutSummaryPageTemplate',
+ s4omDeliveryModeTabbingConfig.deliveryMode
+ );
+ });
+
+ const orderReview = waitForPage('/checkout/review-order', 'getReviewOrder');
+
+ cy.get('.cx-checkout-btns button.btn-primary')
+ .should('be.enabled')
+ .click({ force: true });
+
+ cy.wait(`@${orderReview}`, { timeout: 30000 })
+ .its('response.statusCode')
+ .should('eq', 200);
+}
+
export function reviewB2bOrderDetail(
sampleUser: SampleUser = s4omB2bAccountShipToUser,
sampleProduct: SampleProduct = s4omProduct,
cartData: SampleCartProduct,
isAccount: boolean = true,
replenishment?: string,
+ poNum: string = s4omPONumber,
costCtr: string = s4omCostCenter,
b2bUnt: string = s4omB2BUnit,
isOrderConfirmation: boolean = true
@@ -253,14 +370,16 @@ export function reviewB2bOrderDetail(
cy.get('cx-order-overview .container').within(() => {
cy.get('.cx-summary-card:nth-child(1)').within(() => {
- cy.get('cx-card:nth-child(1)').within(() => {
- if (!replenishment) {
- cy.get('.cx-card-title').should('contain', 'Order Number');
- } else {
- cy.get('.cx-card-title').should('contain', 'Replenishment #');
- }
- cy.get('.cx-card-label').should('not.be.empty');
- });
+ cy.get('cx-card:nth-child(1)')
+ .first()
+ .within(() => {
+ if (!replenishment) {
+ cy.get('.cx-card-title').should('contain', 'Order Number');
+ } else {
+ cy.get('.cx-card-title').should('contain', 'Replenishment #');
+ }
+ cy.get('.cx-card-label').should('not.be.empty');
+ });
if (!replenishment) {
cy.get('cx-card:nth-child(2)').within(() => {
cy.get('.cx-card-title').should('contain', 'Placed on');
@@ -279,15 +398,29 @@ export function reviewB2bOrderDetail(
});
if (!replenishment) {
- cy.get('.cx-summary-card:nth-child(2) .cx-card').within(() => {
- cy.contains(poNumber);
- if (isAccount) {
- cy.contains('Account');
- cy.contains(costCtr);
- cy.contains(`(${b2bUnt})`);
- } else {
- cy.contains('Credit Card');
- }
+ cy.get('.cx-summary-card:nth-child(2)').within(() => {
+ cy.get('.cx-card')
+ .eq(0)
+ .within(() => {
+ cy.contains(poNum);
+ });
+ cy.get('.cx-card')
+ .eq(1)
+ .within(() => {
+ if (isAccount) {
+ cy.contains('Account');
+ } else {
+ cy.contains('Credit Card');
+ }
+ });
+ cy.get('.cx-card')
+ .eq(2)
+ .within(() => {
+ if (isAccount) {
+ cy.contains(costCtr);
+ cy.contains(`(${b2bUnt})`);
+ }
+ });
});
} else {
cy.get('.cx-summary-card:nth-child(2) .cx-card').within(() => {
@@ -296,7 +429,7 @@ export function reviewB2bOrderDetail(
});
cy.get('.cx-summary-card:nth-child(3) .cx-card').within(() => {
- cy.contains(poNumber);
+ cy.contains(poNum);
if (isAccount) {
cy.contains('Account');
cy.contains(costCtr);
@@ -308,18 +441,25 @@ export function reviewB2bOrderDetail(
}
if (!replenishment) {
- cy.get('.cx-summary-card:nth-child(3) .cx-card').within(() => {
- cy.contains(sampleUser.fullName);
- cy.contains(sampleUser.address.line1);
-
- if (
- cartData.estimatedShipping ===
- cartWithB2bProductAndPremiumShipping.estimatedShipping
- ) {
- cy.contains('Premium Delivery');
- } else {
- cy.contains('Standard Delivery');
- }
+ cy.get('.cx-summary-card:nth-child(3)').within(() => {
+ cy.get('.cx-card')
+ .eq(0)
+ .within(() => {
+ cy.contains(sampleUser.fullName);
+ cy.contains(sampleUser.address.line1);
+ });
+ cy.get('.cx-card')
+ .eq(1)
+ .within(() => {
+ if (
+ cartData.estimatedShipping ===
+ cartWithB2bProductAndPremiumShipping.estimatedShipping
+ ) {
+ cy.contains('Premium Delivery');
+ } else {
+ cy.contains('Standard Delivery');
+ }
+ });
});
} else {
cy.get('.cx-summary-card:nth-child(4) .cx-card').within(() => {
@@ -345,3 +485,47 @@ export function reviewB2bOrderDetail(
cartData.totalAndShipping
);
}
+
+export function setOrderConfirmationIdInSessionStorage(alias: string) {
+ cy.get('cx-order-overview .container').within(() => {
+ cy.get('.cx-summary-card:nth-child(1)').within(() => {
+ cy.get('cx-card:nth-child(1)')
+ .first()
+ .within(() => {
+ cy.get('.cx-card-title').should('contain', 'Order Number');
+ cy.get('.cx-card-label').then(($el) => {
+ window.sessionStorage.setItem(alias, $el.text().trim());
+ });
+ });
+ });
+ });
+ return alias;
+}
+
+export function findRowInOrderHistoryTable(
+ orderAPIAlias: string,
+ orderId: string,
+ poNum: string,
+ costCenter?: string
+) {
+ cy.get('cx-order-history h2').should('contain', 'Order history');
+
+ let index = 2; //start navigating from the second page
+ cy.get('#order-history-table').as('orderHistoryTable');
+ const goToNextPage = () => {
+ cy.get('@orderHistoryTable').then(($odt) => {
+ if ($odt.html().includes(orderId)) {
+ cy.get('.cx-order-history-code a').should('contain', orderId);
+ cy.get('.cx-order-history-po a').should('contain', poNum);
+ if (costCenter) {
+ cy.get('.cx-order-history-po a').should('contain', costCenter);
+ }
+ } else {
+ cy.get('cx-pagination').findByText(index).first().click();
+ index++;
+ cy.wait(`@${orderAPIAlias}`).then(goToNextPage);
+ }
+ });
+ };
+ goToNextPage();
+}
diff --git a/projects/storefrontapp-e2e-cypress/cypress/sample-data/checkout-flow.ts b/projects/storefrontapp-e2e-cypress/cypress/sample-data/checkout-flow.ts
index 9b979b7de49..24ccfe311ec 100644
--- a/projects/storefrontapp-e2e-cypress/cypress/sample-data/checkout-flow.ts
+++ b/projects/storefrontapp-e2e-cypress/cypress/sample-data/checkout-flow.ts
@@ -6,6 +6,15 @@
import { generateMail, randomString } from '../helpers/user';
+export interface SampleOrg {
+ companyName?: string;
+ address?: string;
+ city?: string;
+ state?: string;
+ zipCode?: string;
+ country?: string;
+}
+
export interface SampleUser {
titleCode?: string;
firstName?: string;
@@ -59,7 +68,7 @@ export function getSampleUser() {
fullName: 'Cypress customer',
password: 'Password123.',
email: generateMail(randomString(), true),
- phone: '555 555 555',
+ phone: '+919555555555',
cellphone: '123 456 7899',
address: {
city: 'Los Angeles',
@@ -81,6 +90,19 @@ export function getSampleUser() {
};
}
+export const organisation = getSampleOrg();
+
+export function getSampleOrg() {
+ return {
+ companyName: randomString(),
+ address: '1111 S Figueroa St',
+ city: 'Los Angeles',
+ state: 'California',
+ zipCode: '90015',
+ country: 'United States',
+ };
+}
+
export const product: SampleProduct = {
name: 'Alpha 350',
code: '1446509',
diff --git a/projects/storefrontapp-e2e-cypress/package.json b/projects/storefrontapp-e2e-cypress/package.json
index 481128ed9c0..28f54557686 100644
--- a/projects/storefrontapp-e2e-cypress/package.json
+++ b/projects/storefrontapp-e2e-cypress/package.json
@@ -30,7 +30,8 @@
"cy:run:ci:cdc": "cypress run --config-file cypress.config.ci.ts --env API_URL=https://api.cg79x9wuu9-eccommerc1-s1-public.model-t.myhybris.cloud/ --record --key $CYPRESS_KEY --tag \"2005,cdc\" --group CDC --spec \"cypress/e2e/vendor/cdc/b2c/*.e2e.cy.ts\"",
"cy:run:ci:cdc-b2b": "cypress run --config-file cypress.ci.json --env BASE_SITE=powertools-spa,OCC_PREFIX_USER_ENDPOINT=orgUsers,API_URL=https://api.cg79x9wuu9-eccommerc1-s1-public.model-t.myhybris.cloud/ --record --key $CYPRESS_KEY --tag \"2211,cdc\" --group CDC --spec \"cypress/integration/vendor/cdc/b2b/*.e2e.cy.ts\"",
"cy:run:ci:digital-payments": "cypress run --config-file cypress.config.ci.ts --env API_URL=https://backoffice.cp96avkh5f-sapcxteam1-d5-public.model-t.cc.commerce.ondemand.com --record --key $CYPRESS_KEY --tag \"2105,digital-payments\" --group DIGITAL-PAYMENTS --spec \"cypress/e2e/vendor/digital-payments/*.e2e.cy.ts\"",
- "cy:run:ci:epd-visualization": "cypress run --config-file cypress.config.ci.ts --env API_URL=https://api.cp96avkh5f-integrati1-d1-public.model-t.cc.commerce.ondemand.com,BASE_SITE=powertools-epdvisualization-spa --record --key $CYPRESS_KEY --tag \"2105,epd-visualization\" --group EPD_VISUALIZATION --ci-build-id $BUILD_NUMBER --spec \"cypress/e2e/vendor/epd-visualization/**/*.e2e.cy.ts\""
+ "cy:run:ci:epd-visualization": "cypress run --config-file cypress.config.ci.ts --env API_URL=https://api.cp96avkh5f-integrati1-d1-public.model-t.cc.commerce.ondemand.com,BASE_SITE=powertools-epdvisualization-spa --record --key $CYPRESS_KEY --tag \"2105,epd-visualization\" --group EPD_VISUALIZATION --ci-build-id $BUILD_NUMBER --spec \"cypress/e2e/vendor/epd-visualization/**/*.e2e.cy.ts\"",
+ "cy:run:ci:segment-refs": "cypress run --config-file cypress.config.ci.ts --env API_URL=https://api.cg79x9wuu9-eccommerc1-p7-public.model-t.myhybris.cloud/ --record --key $CYPRESS_KEY --tag \"segment-refs\" --group SEGMENT-REFS --spec \"cypress/e2e/vendor/segment-refs/*.e2e.cy.ts\""
},
"devDependencies": {
"@babel/core": "^7.14.3",
diff --git a/projects/storefrontapp/project.json b/projects/storefrontapp/project.json
index 36b2eb16a26..d52aecd7154 100644
--- a/projects/storefrontapp/project.json
+++ b/projects/storefrontapp/project.json
@@ -57,6 +57,10 @@
"input": "projects/storefrontapp/src/styles/lib-qualtrics.scss",
"bundleName": "qualtrics"
},
+ {
+ "input": "projects/storefrontapp/src/styles/lib-requested-delivery-date.scss",
+ "bundleName": "requested-delivery-date"
+ },
{
"input": "projects/storefrontapp/src/styles/lib-cart.scss",
"bundleName": "cart"
diff --git a/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts
index 9c246c62d90..779932076bf 100644
--- a/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts
+++ b/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts
@@ -24,8 +24,7 @@ const epdVisualizationConfig: EpdVisualizationConfig = {
},
ui5: {
- bootstrapUrl:
- 'https://sapui5.hana.ondemand.com/1.108.14/resources/sap-ui-core.js',
+ bootstrapUrl: 'https://ui5.sap.com/1.108/resources/sap-ui-core.js',
},
},
};
diff --git a/projects/storefrontapp/src/app/spartacus/features/organization/organization-user-registration-wrapper.module.ts b/projects/storefrontapp/src/app/spartacus/features/organization/organization-user-registration-wrapper.module.ts
new file mode 100644
index 00000000000..b71f40c12d6
--- /dev/null
+++ b/projects/storefrontapp/src/app/spartacus/features/organization/organization-user-registration-wrapper.module.ts
@@ -0,0 +1,22 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule, Type } from '@angular/core';
+import { CDCB2BRegisterModule } from '@spartacus/cdc/organization/user-registration';
+import { OrganizationUserRegistrationModule } from '@spartacus/organization/user-registration';
+
+import { environment } from '../../../../environments/environment';
+
+const extensions: Type[] = [];
+
+if (environment.cdc) {
+ extensions.push(CDCB2BRegisterModule);
+}
+
+@NgModule({
+ imports: [OrganizationUserRegistrationModule, ...extensions],
+})
+export class OrganizationUserRegistrationWrapperModule {}
diff --git a/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts
index 274d1b5b557..bc55479257c 100644
--- a/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts
+++ b/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts
@@ -22,9 +22,9 @@ import {
featureModules: {
[ORGANIZATION_USER_REGISTRATION_FEATURE]: {
module: () =>
- import('@spartacus/organization/user-registration').then(
- (m) => m.OrganizationUserRegistrationModule
- ),
+ import(
+ './organization/organization-user-registration-wrapper.module'
+ ).then((m) => m.OrganizationUserRegistrationWrapperModule),
},
},
}),
diff --git a/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts
new file mode 100644
index 00000000000..fe1dd2a6726
--- /dev/null
+++ b/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts
@@ -0,0 +1,40 @@
+/*
+ * SPDX-FileCopyrightText: 2022 SAP Spartacus team
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule } from '@angular/core';
+import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core';
+import {
+ requestedDeliveryDateTranslationChunksConfig,
+ requestedDeliveryDateTranslations,
+} from '@spartacus/requested-delivery-date/assets';
+import {
+ RequestedDeliveryDateRootModule,
+ REQUESTED_DELIVERY_DATE_FEATURE,
+} from '@spartacus/requested-delivery-date/root';
+
+@NgModule({
+ imports: [RequestedDeliveryDateRootModule],
+ providers: [
+ provideConfig({
+ featureModules: {
+ [REQUESTED_DELIVERY_DATE_FEATURE]: {
+ module: () =>
+ import('@spartacus/requested-delivery-date').then(
+ (m) => m.RequestedDeliveryDateModule
+ ),
+ },
+ },
+ }),
+ provideConfig({
+ i18n: {
+ resources: requestedDeliveryDateTranslations,
+ chunks: requestedDeliveryDateTranslationChunksConfig,
+ },
+ }),
+ ],
+})
+export class RequestedDeliveryDateFeatureModule {}
diff --git a/projects/storefrontapp/src/app/spartacus/features/segment-refs/segment-refs-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/segment-refs/segment-refs-feature.module.ts
new file mode 100644
index 00000000000..236693e4bdd
--- /dev/null
+++ b/projects/storefrontapp/src/app/spartacus/features/segment-refs/segment-refs-feature.module.ts
@@ -0,0 +1,13 @@
+/*
+ * SPDX-FileCopyrightText: 2023 SAP Spartacus team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import { NgModule } from '@angular/core';
+import { SegmentRefsRootModule } from '@spartacus/segment-refs/root';
+
+@NgModule({
+ imports: [SegmentRefsRootModule],
+})
+export class SegmentRefsFeatureModule {}
diff --git a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts
index 91b6014637c..3189c3c768c 100644
--- a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts
+++ b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts
@@ -37,16 +37,16 @@ import {
NavigationEventModule,
NavigationModule,
NotificationPreferenceModule,
- PDFModule,
PageTitleModule,
PaymentMethodsModule,
+ PDFModule,
ProductCarouselModule,
ProductDetailsPageModule,
ProductFacetNavigationModule,
ProductImagesModule,
ProductIntroModule,
- ProductListModule,
ProductListingPageModule,
+ ProductListModule,
ProductPageEventModule,
ProductReferencesModule,
ProductSummaryModule,
@@ -86,7 +86,9 @@ import { ImageZoomFeatureModule } from './features/product/product-image-zoom-fe
import { VariantsFeatureModule } from './features/product/product-variants-feature.module';
import { QualtricsFeatureModule } from './features/qualtrics/qualtrics-feature.module';
import { OrganizationUserRegistrationFeatureModule } from './features/registration-feature.module';
+import { RequestedDeliveryDateFeatureModule } from './features/requested-delivery-date/requested-delivery-date-feature.module';
import { S4OMFeatureModule } from './features/s4om/s4om-feature.module';
+import { SegmentRefsFeatureModule } from './features/segment-refs/segment-refs-feature.module';
import { SmartEditFeatureModule } from './features/smartedit/smartedit-feature.module';
import { StorefinderFeatureModule } from './features/storefinder/storefinder-feature.module';
import { TrackingFeatureModule } from './features/tracking/tracking-feature.module';
@@ -123,6 +125,12 @@ if (environment.epdVisualization) {
if (environment.s4om) {
featureModules.push(S4OMFeatureModule);
}
+if (environment.segmentRefs) {
+ featureModules.push(SegmentRefsFeatureModule);
+}
+if (environment.requestedDeliveryDate) {
+ featureModules.push(RequestedDeliveryDateFeatureModule);
+}
@NgModule({
imports: [
diff --git a/projects/storefrontapp/src/environments/environment.prod.ts b/projects/storefrontapp/src/environments/environment.prod.ts
index 89b96f8e4c8..52f3d2609ca 100644
--- a/projects/storefrontapp/src/environments/environment.prod.ts
+++ b/projects/storefrontapp/src/environments/environment.prod.ts
@@ -17,4 +17,6 @@ export const environment: Environment = {
digitalPayments: buildProcess.env.CX_DIGITAL_PAYMENTS,
epdVisualization: buildProcess.env.CX_EPD_VISUALIZATION,
s4om: buildProcess.env.CX_S4OM,
+ segmentRefs: buildProcess.env.CX_SEGMENT_REFS,
+ requestedDeliveryDate: buildProcess.env.CX_REQUESTED_DELIVERY_DATE,
};
diff --git a/projects/storefrontapp/src/environments/environment.ts b/projects/storefrontapp/src/environments/environment.ts
index 65b48712aee..18033dad14d 100644
--- a/projects/storefrontapp/src/environments/environment.ts
+++ b/projects/storefrontapp/src/environments/environment.ts
@@ -30,4 +30,6 @@ export const environment: Environment = {
digitalPayments: buildProcess.env.CX_DIGITAL_PAYMENTS ?? false,
epdVisualization: buildProcess.env.CX_EPD_VISUALIZATION ?? false,
s4om: buildProcess.env.CX_S4OM ?? false,
+ segmentRefs: buildProcess.env.CX_SEGMENT_REFS ?? false,
+ requestedDeliveryDate: buildProcess.env.CX_REQUESTED_DELIVERY_DATE ?? false,
};
diff --git a/projects/storefrontapp/src/environments/models/build.process.env.d.ts b/projects/storefrontapp/src/environments/models/build.process.env.d.ts
index 5122bd186b5..b6e0f46055d 100644
--- a/projects/storefrontapp/src/environments/models/build.process.env.d.ts
+++ b/projects/storefrontapp/src/environments/models/build.process.env.d.ts
@@ -19,4 +19,6 @@ interface Env {
CX_DIGITAL_PAYMENTS: boolean;
CX_EPD_VISUALIZATION: boolean;
CX_S4OM: boolean;
+ CX_SEGMENT_REFS: boolean;
+ CX_REQUESTED_DELIVERY_DATE: boolean;
}
diff --git a/projects/storefrontapp/src/environments/models/environment.model.ts b/projects/storefrontapp/src/environments/models/environment.model.ts
index 2e67720f564..4e6b60e944d 100644
--- a/projects/storefrontapp/src/environments/models/environment.model.ts
+++ b/projects/storefrontapp/src/environments/models/environment.model.ts
@@ -15,4 +15,6 @@ export interface Environment {
digitalPayments: boolean;
epdVisualization: boolean;
s4om: boolean;
+ segmentRefs: boolean;
+ requestedDeliveryDate: boolean;
}
diff --git a/projects/storefrontapp/src/styles/lib-requested-delivery-date.scss b/projects/storefrontapp/src/styles/lib-requested-delivery-date.scss
new file mode 100644
index 00000000000..e312d35ff2d
--- /dev/null
+++ b/projects/storefrontapp/src/styles/lib-requested-delivery-date.scss
@@ -0,0 +1,2 @@
+@import '../styles-config';
+@import '@spartacus/requested-delivery-date';
diff --git a/projects/storefrontapp/tsconfig.app.prod.json b/projects/storefrontapp/tsconfig.app.prod.json
index 7ce6230e020..8ff3fe7e347 100644
--- a/projects/storefrontapp/tsconfig.app.prod.json
+++ b/projects/storefrontapp/tsconfig.app.prod.json
@@ -263,6 +263,19 @@
"@spartacus/qualtrics/components": ["dist/qualtrics/components"],
"@spartacus/qualtrics": ["dist/qualtrics"],
"@spartacus/qualtrics/root": ["dist/qualtrics/root"],
+ "@spartacus/requested-delivery-date/assets": [
+ "dist/requested-delivery-date/assets"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "dist/requested-delivery-date/core"
+ ],
+ "@spartacus/requested-delivery-date": ["dist/requested-delivery-date"],
+ "@spartacus/requested-delivery-date/occ": [
+ "dist/requested-delivery-date/occ"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "dist/requested-delivery-date/root"
+ ],
"@spartacus/smartedit/core": ["dist/smartedit/core"],
"@spartacus/smartedit": ["dist/smartedit"],
"@spartacus/smartedit/root": ["dist/smartedit/root"],
@@ -304,6 +317,9 @@
"@spartacus/cdc/organization/administration": [
"dist/cdc/organization/administration"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "dist/cdc/organization/user-registration"
+ ],
"@spartacus/cdc/root": ["dist/cdc/root"],
"@spartacus/cdc/user-account": ["dist/cdc/user-account"],
"@spartacus/cdc/user-profile": ["dist/cdc/user-profile"],
@@ -323,6 +339,8 @@
"@spartacus/s4om/assets": ["dist/s4om/assets"],
"@spartacus/s4om": ["dist/s4om"],
"@spartacus/s4om/root": ["dist/s4om/root"],
+ "@spartacus/segment-refs": ["dist/segment-refs"],
+ "@spartacus/segment-refs/root": ["dist/segment-refs/root"],
"@spartacus/assets": ["dist/assets"],
"@spartacus/core": ["dist/core"],
"@spartacus/storefront": ["dist/storefrontlib"]
diff --git a/projects/storefrontapp/tsconfig.server.json b/projects/storefrontapp/tsconfig.server.json
index 6a55bade0f7..9fa5801376a 100644
--- a/projects/storefrontapp/tsconfig.server.json
+++ b/projects/storefrontapp/tsconfig.server.json
@@ -392,6 +392,21 @@
"@spartacus/qualtrics/root": [
"../../feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"../../feature-libs/smartedit/core/public_api"
],
@@ -477,6 +492,9 @@
"@spartacus/cdc/organization/administration": [
"../../integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": ["../../integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"../../integration-libs/cdc/user-account/public_api"
@@ -514,6 +532,12 @@
],
"@spartacus/s4om": ["../../integration-libs/s4om/public_api"],
"@spartacus/s4om/root": ["../../integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": [
+ "../../integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "../../integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": ["../../projects/assets/src/public_api"],
"@spartacus/core": ["../../projects/core/public_api"],
"@spartacus/storefront": ["../../projects/storefrontlib/public_api"]
diff --git a/projects/storefrontapp/tsconfig.server.prod.json b/projects/storefrontapp/tsconfig.server.prod.json
index 00c7ae1abcb..0a3eb97a3f8 100644
--- a/projects/storefrontapp/tsconfig.server.prod.json
+++ b/projects/storefrontapp/tsconfig.server.prod.json
@@ -296,6 +296,21 @@
"@spartacus/qualtrics/components": ["../../dist/qualtrics/components"],
"@spartacus/qualtrics": ["../../dist/qualtrics"],
"@spartacus/qualtrics/root": ["../../dist/qualtrics/root"],
+ "@spartacus/requested-delivery-date/assets": [
+ "../../dist/requested-delivery-date/assets"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "../../dist/requested-delivery-date/core"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "../../dist/requested-delivery-date"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "../../dist/requested-delivery-date/occ"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "../../dist/requested-delivery-date/root"
+ ],
"@spartacus/smartedit/core": ["../../dist/smartedit/core"],
"@spartacus/smartedit": ["../../dist/smartedit"],
"@spartacus/smartedit/root": ["../../dist/smartedit/root"],
@@ -345,6 +360,9 @@
"@spartacus/cdc/organization/administration": [
"../../dist/cdc/organization/administration"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "../../dist/cdc/organization/user-registration"
+ ],
"@spartacus/cdc/root": ["../../dist/cdc/root"],
"@spartacus/cdc/user-account": ["../../dist/cdc/user-account"],
"@spartacus/cdc/user-profile": ["../../dist/cdc/user-profile"],
@@ -372,6 +390,8 @@
"@spartacus/s4om/assets": ["../../dist/s4om/assets"],
"@spartacus/s4om": ["../../dist/s4om"],
"@spartacus/s4om/root": ["../../dist/s4om/root"],
+ "@spartacus/segment-refs": ["../../dist/segment-refs"],
+ "@spartacus/segment-refs/root": ["../../dist/segment-refs/root"],
"@spartacus/assets": ["../../dist/assets"],
"@spartacus/core": ["../../dist/core"],
"@spartacus/storefront": ["../../dist/storefrontlib"]
diff --git a/projects/storefrontlib/package.json b/projects/storefrontlib/package.json
index abb61948760..ce778e85755 100644
--- a/projects/storefrontlib/package.json
+++ b/projects/storefrontlib/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/storefront",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"keywords": [
"spartacus",
"storefront",
@@ -23,7 +23,7 @@
"@ngrx/effects": "^15.3.0",
"@ngrx/router-store": "^15.3.0",
"@ngrx/store": "^15.3.0",
- "@spartacus/core": "5.0.0",
+ "@spartacus/core": "6.3.0-1",
"ngx-infinite-scroll": "^15.0.0",
"rxjs": "^6.6.0"
},
diff --git a/projects/storefrontlib/shared/components/generic-link/generic-link.component.html b/projects/storefrontlib/shared/components/generic-link/generic-link.component.html
index 771d396368e..64725425dfa 100644
--- a/projects/storefrontlib/shared/components/generic-link/generic-link.component.html
+++ b/projects/storefrontlib/shared/components/generic-link/generic-link.component.html
@@ -19,7 +19,7 @@
[routerLink]="routerUrl"
[queryParams]="queryParams"
[fragment]="fragment"
- [attr.target]="target"
+ [target]="target || undefined"
[attr.id]="id"
[attr.class]="class"
[attr.style]="style"
diff --git a/projects/storefrontstyles/package.json b/projects/storefrontstyles/package.json
index e11de26b9ab..c8fc024414f 100644
--- a/projects/storefrontstyles/package.json
+++ b/projects/storefrontstyles/package.json
@@ -1,6 +1,6 @@
{
"name": "@spartacus/styles",
- "version": "5.0.0",
+ "version": "6.3.0-1",
"description": "Style library containing global styles",
"keywords": [
"spartacus",
diff --git a/projects/storefrontstyles/scss/_versioning.scss b/projects/storefrontstyles/scss/_versioning.scss
index 9cf17472e2e..36f844bb04c 100644
--- a/projects/storefrontstyles/scss/_versioning.scss
+++ b/projects/storefrontstyles/scss/_versioning.scss
@@ -24,7 +24,7 @@
// or `$styleVersion` are enabled.
$_fullVersion: (
major: 6,
- minor: 1,
+ minor: 4,
patch: 0,
);
diff --git a/projects/storefrontstyles/scss/components/misc/card/_card.scss b/projects/storefrontstyles/scss/components/misc/card/_card.scss
index 1599c5e3c88..96febe5009d 100644
--- a/projects/storefrontstyles/scss/components/misc/card/_card.scss
+++ b/projects/storefrontstyles/scss/components/misc/card/_card.scss
@@ -1,6 +1,10 @@
%cx-card {
.cx-card-border {
border: 1px solid var(--cx-color-light);
+
+ @include forVersion(6.3) {
+ border: 1px solid var(--cx-color-medium);
+ }
}
.cx-card-container {
diff --git a/scripts/install/functions.sh b/scripts/install/functions.sh
index e1cd7ec6c2c..43ec075e050 100644
--- a/scripts/install/functions.sh
+++ b/scripts/install/functions.sh
@@ -94,7 +94,11 @@ function create_shell_app {
function add_b2b {
if [ "${ADD_B2B_LIBS}" = true ] ; then
ng add @spartacus/organization@${SPARTACUS_VERSION} --skip-confirmation --no-interactive
+
+ ng add @spartacus/checkout@${SPARTACUS_VERSION} --skip-confirmation --no-interactive
ng add @spartacus/checkout --skip-confirmation --no-interactive --features "Checkout-B2B" --features "Checkout-Scheduled-Replenishment"
+
+ ng add @spartacus/product@${SPARTACUS_VERSION} --skip-confirmation
ng add @spartacus/product --skip-confirmation --no-interactive --features "Future-Stock"
fi
}
@@ -107,7 +111,7 @@ function add_cdc {
function add_epd_visualization {
if [ "$ADD_EPD_VISUALIZATION" = true ] ; then
- ng add @spartacus/epd-visualization --base-url ${EPD_VISUALIZATION_BASE_URL} --skip-confirmation --no-interactive
+ ng add @spartacus/epd-visualization@${SPARTACUS_VERSION} --base-url ${EPD_VISUALIZATION_BASE_URL} --skip-confirmation --no-interactive
fi
}
@@ -128,7 +132,9 @@ function add_s4om {
# Don't install b2b features here (use add_b2b function for that)
function add_feature_libs {
+ ng add @spartacus/tracking@${SPARTACUS_VERSION} --skip-confirmation --no-interactive
ng add @spartacus/tracking --skip-confirmation --no-interactive --features "TMS-GTM" --features "TMS-AEPL"
+
ng add @spartacus/qualtrics@${SPARTACUS_VERSION} --skip-confirmation --no-interactive
ng add @spartacus/customer-ticketing --skip-confirmation --no-interactive
ng add @spartacus/pickup-in-store --skip-confirmation --no-interactive
diff --git a/tools/breaking-changes/package-lock.json b/tools/breaking-changes/package-lock.json
index 6396cd08796..7084a3729fd 100644
--- a/tools/breaking-changes/package-lock.json
+++ b/tools/breaking-changes/package-lock.json
@@ -8,7 +8,7 @@
"name": "breaking-change-extractor",
"version": "1.0.0",
"dependencies": {
- "@microsoft/api-extractor": "^7.34.4"
+ "@microsoft/api-extractor": "^7.36.3"
},
"devDependencies": {
"@types/deep-equal": "^1.0.1",
@@ -58,35 +58,47 @@
}
},
"node_modules/@microsoft/api-extractor": {
- "version": "7.34.4",
- "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.34.4.tgz",
- "integrity": "sha512-HOdcci2nT40ejhwPC3Xja9G+WSJmWhCUKKryRfQYsmE9cD+pxmBaKBKCbuS9jUcl6bLLb4Gz+h7xEN5r0QiXnQ==",
+ "version": "7.36.3",
+ "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.36.3.tgz",
+ "integrity": "sha512-u0H6362AQq+r55X8drHx4npgkrCfJnMzRRHfQo8PMNKB8TcBnrTLfXhXWi+xnTM6CzlU/netEN8c4bq581Rnrg==",
"dependencies": {
- "@microsoft/api-extractor-model": "7.26.4",
+ "@microsoft/api-extractor-model": "7.27.5",
"@microsoft/tsdoc": "0.14.2",
"@microsoft/tsdoc-config": "~0.16.1",
- "@rushstack/node-core-library": "3.55.2",
- "@rushstack/rig-package": "0.3.18",
- "@rushstack/ts-command-line": "4.13.2",
+ "@rushstack/node-core-library": "3.59.6",
+ "@rushstack/rig-package": "0.4.0",
+ "@rushstack/ts-command-line": "4.15.1",
"colors": "~1.2.1",
"lodash": "~4.17.15",
"resolve": "~1.22.1",
- "semver": "~7.3.0",
+ "semver": "~7.5.4",
"source-map": "~0.6.1",
- "typescript": "~4.8.4"
+ "typescript": "~5.0.4"
},
"bin": {
"api-extractor": "bin/api-extractor"
}
},
"node_modules/@microsoft/api-extractor-model": {
- "version": "7.26.4",
- "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.26.4.tgz",
- "integrity": "sha512-PDCgCzXDo+SLY5bsfl4bS7hxaeEtnXj7XtuzEE+BtALp7B5mK/NrS2kHWU69pohgsRmEALycQdaQPXoyT2i5MQ==",
+ "version": "7.27.5",
+ "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.27.5.tgz",
+ "integrity": "sha512-9/tBzYMJitR+o+zkPr1lQh2+e8ClcaTF6eZo7vZGDqRt2O5XmXWPbYJZmxyM3wb5at6lfJNEeGZrQXLjsQ0Nbw==",
"dependencies": {
"@microsoft/tsdoc": "0.14.2",
"@microsoft/tsdoc-config": "~0.16.1",
- "@rushstack/node-core-library": "3.55.2"
+ "@rushstack/node-core-library": "3.59.6"
+ }
+ },
+ "node_modules/@microsoft/api-extractor/node_modules/typescript": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=12.20"
}
},
"node_modules/@microsoft/tsdoc": {
@@ -118,16 +130,16 @@
}
},
"node_modules/@rushstack/node-core-library": {
- "version": "3.55.2",
- "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.55.2.tgz",
- "integrity": "sha512-SaLe/x/Q/uBVdNFK5V1xXvsVps0y7h1sN7aSJllQyFbugyOaxhNRF25bwEDnicARNEjJw0pk0lYnJQ9Kr6ev0A==",
+ "version": "3.59.6",
+ "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.59.6.tgz",
+ "integrity": "sha512-bMYJwNFfWXRNUuHnsE9wMlW/mOB4jIwSUkRKtu02CwZhQdmzMsUbxE0s1xOLwTpNIwlzfW/YT7OnOHgDffLgYg==",
"dependencies": {
"colors": "~1.2.1",
"fs-extra": "~7.0.1",
"import-lazy": "~4.0.0",
"jju": "~1.4.0",
"resolve": "~1.22.1",
- "semver": "~7.3.0",
+ "semver": "~7.5.4",
"z-schema": "~5.0.2"
},
"peerDependencies": {
@@ -140,18 +152,18 @@
}
},
"node_modules/@rushstack/rig-package": {
- "version": "0.3.18",
- "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.18.tgz",
- "integrity": "sha512-SGEwNTwNq9bI3pkdd01yCaH+gAsHqs0uxfGvtw9b0LJXH52qooWXnrFTRRLG1aL9pf+M2CARdrA9HLHJys3jiQ==",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.4.0.tgz",
+ "integrity": "sha512-FnM1TQLJYwSiurP6aYSnansprK5l8WUK8VG38CmAaZs29ZeL1msjK0AP1VS4ejD33G0kE/2cpsPsS9jDenBMxw==",
"dependencies": {
"resolve": "~1.22.1",
"strip-json-comments": "~3.1.1"
}
},
"node_modules/@rushstack/ts-command-line": {
- "version": "4.13.2",
- "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.13.2.tgz",
- "integrity": "sha512-bCU8qoL9HyWiciltfzg7GqdfODUeda/JpI0602kbN5YH22rzTxyqYvv7aRLENCM7XCQ1VRs7nMkEqgJUOU8Sag==",
+ "version": "4.15.1",
+ "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.15.1.tgz",
+ "integrity": "sha512-EL4jxZe5fhb1uVL/P/wQO+Z8Rc8FMiWJ1G7VgnPDvdIt5GVjRfK7vwzder1CZQiX3x0PY6uxENYLNGTFd1InRQ==",
"dependencies": {
"@types/argparse": "1.0.38",
"argparse": "~1.0.9",
@@ -696,9 +708,9 @@
}
},
"node_modules/is-core-module": {
- "version": "2.12.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",
- "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
"dependencies": {
"has": "^1.0.3"
},
@@ -1076,9 +1088,9 @@
}
},
"node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -1117,9 +1129,9 @@
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
},
"node_modules/string-argv": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
- "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==",
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
+ "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==",
"engines": {
"node": ">=0.6.19"
}
@@ -1233,6 +1245,7 @@
"version": "4.8.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
+ "dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -1410,32 +1423,39 @@
}
},
"@microsoft/api-extractor": {
- "version": "7.34.4",
- "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.34.4.tgz",
- "integrity": "sha512-HOdcci2nT40ejhwPC3Xja9G+WSJmWhCUKKryRfQYsmE9cD+pxmBaKBKCbuS9jUcl6bLLb4Gz+h7xEN5r0QiXnQ==",
+ "version": "7.36.3",
+ "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.36.3.tgz",
+ "integrity": "sha512-u0H6362AQq+r55X8drHx4npgkrCfJnMzRRHfQo8PMNKB8TcBnrTLfXhXWi+xnTM6CzlU/netEN8c4bq581Rnrg==",
"requires": {
- "@microsoft/api-extractor-model": "7.26.4",
+ "@microsoft/api-extractor-model": "7.27.5",
"@microsoft/tsdoc": "0.14.2",
"@microsoft/tsdoc-config": "~0.16.1",
- "@rushstack/node-core-library": "3.55.2",
- "@rushstack/rig-package": "0.3.18",
- "@rushstack/ts-command-line": "4.13.2",
+ "@rushstack/node-core-library": "3.59.6",
+ "@rushstack/rig-package": "0.4.0",
+ "@rushstack/ts-command-line": "4.15.1",
"colors": "~1.2.1",
"lodash": "~4.17.15",
"resolve": "~1.22.1",
- "semver": "~7.3.0",
+ "semver": "~7.5.4",
"source-map": "~0.6.1",
- "typescript": "~4.8.4"
+ "typescript": "~5.0.4"
+ },
+ "dependencies": {
+ "typescript": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw=="
+ }
}
},
"@microsoft/api-extractor-model": {
- "version": "7.26.4",
- "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.26.4.tgz",
- "integrity": "sha512-PDCgCzXDo+SLY5bsfl4bS7hxaeEtnXj7XtuzEE+BtALp7B5mK/NrS2kHWU69pohgsRmEALycQdaQPXoyT2i5MQ==",
+ "version": "7.27.5",
+ "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.27.5.tgz",
+ "integrity": "sha512-9/tBzYMJitR+o+zkPr1lQh2+e8ClcaTF6eZo7vZGDqRt2O5XmXWPbYJZmxyM3wb5at6lfJNEeGZrQXLjsQ0Nbw==",
"requires": {
"@microsoft/tsdoc": "0.14.2",
"@microsoft/tsdoc-config": "~0.16.1",
- "@rushstack/node-core-library": "3.55.2"
+ "@rushstack/node-core-library": "3.59.6"
}
},
"@microsoft/tsdoc": {
@@ -1466,32 +1486,32 @@
}
},
"@rushstack/node-core-library": {
- "version": "3.55.2",
- "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.55.2.tgz",
- "integrity": "sha512-SaLe/x/Q/uBVdNFK5V1xXvsVps0y7h1sN7aSJllQyFbugyOaxhNRF25bwEDnicARNEjJw0pk0lYnJQ9Kr6ev0A==",
+ "version": "3.59.6",
+ "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.59.6.tgz",
+ "integrity": "sha512-bMYJwNFfWXRNUuHnsE9wMlW/mOB4jIwSUkRKtu02CwZhQdmzMsUbxE0s1xOLwTpNIwlzfW/YT7OnOHgDffLgYg==",
"requires": {
"colors": "~1.2.1",
"fs-extra": "~7.0.1",
"import-lazy": "~4.0.0",
"jju": "~1.4.0",
"resolve": "~1.22.1",
- "semver": "~7.3.0",
+ "semver": "~7.5.4",
"z-schema": "~5.0.2"
}
},
"@rushstack/rig-package": {
- "version": "0.3.18",
- "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.18.tgz",
- "integrity": "sha512-SGEwNTwNq9bI3pkdd01yCaH+gAsHqs0uxfGvtw9b0LJXH52qooWXnrFTRRLG1aL9pf+M2CARdrA9HLHJys3jiQ==",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.4.0.tgz",
+ "integrity": "sha512-FnM1TQLJYwSiurP6aYSnansprK5l8WUK8VG38CmAaZs29ZeL1msjK0AP1VS4ejD33G0kE/2cpsPsS9jDenBMxw==",
"requires": {
"resolve": "~1.22.1",
"strip-json-comments": "~3.1.1"
}
},
"@rushstack/ts-command-line": {
- "version": "4.13.2",
- "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.13.2.tgz",
- "integrity": "sha512-bCU8qoL9HyWiciltfzg7GqdfODUeda/JpI0602kbN5YH22rzTxyqYvv7aRLENCM7XCQ1VRs7nMkEqgJUOU8Sag==",
+ "version": "4.15.1",
+ "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.15.1.tgz",
+ "integrity": "sha512-EL4jxZe5fhb1uVL/P/wQO+Z8Rc8FMiWJ1G7VgnPDvdIt5GVjRfK7vwzder1CZQiX3x0PY6uxENYLNGTFd1InRQ==",
"requires": {
"@types/argparse": "1.0.38",
"argparse": "~1.0.9",
@@ -1921,9 +1941,9 @@
"dev": true
},
"is-core-module": {
- "version": "2.12.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",
- "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",
+ "version": "2.12.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
+ "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
"requires": {
"has": "^1.0.3"
}
@@ -2190,9 +2210,9 @@
}
},
"semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"requires": {
"lru-cache": "^6.0.0"
}
@@ -2219,9 +2239,9 @@
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
},
"string-argv": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
- "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg=="
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
+ "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q=="
},
"string.prototype.trimend": {
"version": "1.0.4",
@@ -2288,7 +2308,8 @@
"typescript": {
"version": "4.8.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
- "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ=="
+ "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
+ "dev": true
},
"unbox-primitive": {
"version": "1.0.1",
diff --git a/tools/breaking-changes/package.json b/tools/breaking-changes/package.json
index d1da176b1b5..71f9a7f2585 100644
--- a/tools/breaking-changes/package.json
+++ b/tools/breaking-changes/package.json
@@ -22,7 +22,7 @@
"gen-all": "npm run gen-const && npm run gen-methods-props && npm run gen-deleted && npm run gen-moved && npm run gen-doc"
},
"dependencies": {
- "@microsoft/api-extractor": "^7.34.4"
+ "@microsoft/api-extractor": "^7.36.3"
},
"devDependencies": {
"@types/deep-equal": "^1.0.1",
diff --git a/tools/config/const.ts b/tools/config/const.ts
index 6ae750650b3..c923a002212 100644
--- a/tools/config/const.ts
+++ b/tools/config/const.ts
@@ -10,4 +10,4 @@ export const SPARTACUS_SCOPE = '@spartacus';
export const SAP_SCOPE = 'sap';
export const SAPUI5_TYPES = '@sapui5/ts-types-esm';
export const SPARTACUS_SCHEMATICS = `${SPARTACUS_SCOPE}/schematics`;
-export const PUBLISHING_VERSION = '';
+export const PUBLISHING_VERSION = '6.3.0-1';
diff --git a/tools/schematics/testing.ts b/tools/schematics/testing.ts
index ab64137ebbd..76f198673a0 100644
--- a/tools/schematics/testing.ts
+++ b/tools/schematics/testing.ts
@@ -21,6 +21,7 @@ const featureLibsFolders: string[] = [
'product',
'product-configurator',
'qualtrics',
+ 'requested-delivery-date',
'smartedit',
'storefinder',
'tracking',
@@ -34,6 +35,7 @@ const integrationLibsFolders: string[] = [
'digital-payments',
'epd-visualization',
's4om',
+ 'segment-refs',
];
const commands = [
@@ -52,7 +54,9 @@ const commands = [
'build product/schematics',
'build product-configurator/schematics',
'build s4om/schematics',
+ 'build segment-refs/schematics',
'build qualtrics/schematics',
+ 'build requested-delivery-date/schematics',
'build smartedit/schematics',
'build storefinder/schematics',
'build tracking/schematics',
@@ -199,7 +203,9 @@ async function executeCommand(command: Command): Promise {
case 'build product/schematics':
case 'build product-configurator/schematics':
case 'build qualtrics/schematics':
+ case 'build requested-delivery-date/schematics':
case 'build s4om/schematics':
+ case 'build segment-refs/schematics':
case 'build smartedit/schematics':
case 'build storefinder/schematics':
case 'build tracking/schematics':
diff --git a/tsconfig.compodoc.json b/tsconfig.compodoc.json
index 879791c4d7d..f9576c3d964 100644
--- a/tsconfig.compodoc.json
+++ b/tsconfig.compodoc.json
@@ -446,6 +446,21 @@
"@spartacus/qualtrics/root": [
"feature-libs/qualtrics/root/public_api"
],
+ "@spartacus/requested-delivery-date/assets": [
+ "feature-libs/requested-delivery-date/assets/public_api"
+ ],
+ "@spartacus/requested-delivery-date/core": [
+ "feature-libs/requested-delivery-date/core/public_api"
+ ],
+ "@spartacus/requested-delivery-date": [
+ "feature-libs/requested-delivery-date/public_api"
+ ],
+ "@spartacus/requested-delivery-date/occ": [
+ "feature-libs/requested-delivery-date/occ/public_api"
+ ],
+ "@spartacus/requested-delivery-date/root": [
+ "feature-libs/requested-delivery-date/root/public_api"
+ ],
"@spartacus/smartedit/core": [
"feature-libs/smartedit/core/public_api"
],
@@ -551,6 +566,9 @@
"@spartacus/cdc/organization/administration": [
"integration-libs/cdc/organization/administration/public_api"
],
+ "@spartacus/cdc/organization/user-registration": [
+ "integration-libs/cdc/organization/user-registration/public_api"
+ ],
"@spartacus/cdc/root": [
"integration-libs/cdc/root/public_api"
],
@@ -596,6 +614,12 @@
"@spartacus/s4om/root": [
"integration-libs/s4om/root/public_api"
],
+ "@spartacus/segment-refs": [
+ "integration-libs/segment-refs/public_api"
+ ],
+ "@spartacus/segment-refs/root": [
+ "integration-libs/segment-refs/root/public_api"
+ ],
"@spartacus/assets": [
"projects/assets/src/public_api"
],
diff --git a/tsconfig.json b/tsconfig.json
index 17e6c46e805..6a967f1292a 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,13 +9,8 @@
"moduleResolution": "node",
"experimentalDecorators": true,
"target": "ES2022",
- "typeRoots": [
- "node_modules/@types"
- ],
- "lib": [
- "ES2022",
- "dom"
- ],
+ "typeRoots": ["node_modules/@types"],
+ "lib": ["ES2022", "dom"],
"strictPropertyInitialization": false,
"strict": true,
"noUnusedLocals": true,
@@ -24,24 +19,12 @@
"resolveJsonModule": true,
"esModuleInterop": true,
"paths": {
- "@spartacus/schematics": [
- "projects/schematics/index"
- ],
- "@spartacus/setup": [
- "core-libs/setup/public_api"
- ],
- "@spartacus/setup/ssr": [
- "core-libs/setup/ssr/public_api"
- ],
- "@spartacus/asm/assets": [
- "feature-libs/asm/assets/public_api"
- ],
- "@spartacus/asm/components": [
- "feature-libs/asm/components/public_api"
- ],
- "@spartacus/asm/core": [
- "feature-libs/asm/core/public_api"
- ],
+ "@spartacus/schematics": ["projects/schematics/index"],
+ "@spartacus/setup": ["core-libs/setup/public_api"],
+ "@spartacus/setup/ssr": ["core-libs/setup/ssr/public_api"],
+ "@spartacus/asm/assets": ["feature-libs/asm/assets/public_api"],
+ "@spartacus/asm/components": ["feature-libs/asm/components/public_api"],
+ "@spartacus/asm/core": ["feature-libs/asm/core/public_api"],
"@spartacus/asm/customer-360/assets": [
"feature-libs/asm/customer-360/assets/public_api"
],
@@ -60,15 +43,9 @@
"@spartacus/asm/customer-360/root": [
"feature-libs/asm/customer-360/root/public_api"
],
- "@spartacus/asm": [
- "feature-libs/asm/public_api"
- ],
- "@spartacus/asm/occ": [
- "feature-libs/asm/occ/public_api"
- ],
- "@spartacus/asm/root": [
- "feature-libs/asm/root/public_api"
- ],
+ "@spartacus/asm": ["feature-libs/asm/public_api"],
+ "@spartacus/asm/occ": ["feature-libs/asm/occ/public_api"],
+ "@spartacus/asm/root": ["feature-libs/asm/root/public_api"],
"@spartacus/cart/base/assets": [
"feature-libs/cart/base/assets/public_api"
],
@@ -81,18 +58,10 @@
"@spartacus/cart/base/components": [
"feature-libs/cart/base/components/public_api"
],
- "@spartacus/cart/base/core": [
- "feature-libs/cart/base/core/public_api"
- ],
- "@spartacus/cart/base": [
- "feature-libs/cart/base/public_api"
- ],
- "@spartacus/cart/base/occ": [
- "feature-libs/cart/base/occ/public_api"
- ],
- "@spartacus/cart/base/root": [
- "feature-libs/cart/base/root/public_api"
- ],
+ "@spartacus/cart/base/core": ["feature-libs/cart/base/core/public_api"],
+ "@spartacus/cart/base": ["feature-libs/cart/base/public_api"],
+ "@spartacus/cart/base/occ": ["feature-libs/cart/base/occ/public_api"],
+ "@spartacus/cart/base/root": ["feature-libs/cart/base/root/public_api"],
"@spartacus/cart/import-export/assets": [
"feature-libs/cart/import-export/assets/public_api"
],
@@ -108,9 +77,7 @@
"@spartacus/cart/import-export/root": [
"feature-libs/cart/import-export/root/public_api"
],
- "@spartacus/cart": [
- "feature-libs/cart/public_api"
- ],
+ "@spartacus/cart": ["feature-libs/cart/public_api"],
"@spartacus/cart/quick-order/assets": [
"feature-libs/cart/quick-order/assets/public_api"
],
@@ -135,9 +102,7 @@
"@spartacus/cart/saved-cart/core": [
"feature-libs/cart/saved-cart/core/public_api"
],
- "@spartacus/cart/saved-cart": [
- "feature-libs/cart/saved-cart/public_api"
- ],
+ "@spartacus/cart/saved-cart": ["feature-libs/cart/saved-cart/public_api"],
"@spartacus/cart/saved-cart/occ": [
"feature-libs/cart/saved-cart/occ/public_api"
],
@@ -156,9 +121,7 @@
"@spartacus/cart/wish-list/core": [
"feature-libs/cart/wish-list/core/public_api"
],
- "@spartacus/cart/wish-list": [
- "feature-libs/cart/wish-list/public_api"
- ],
+ "@spartacus/cart/wish-list": ["feature-libs/cart/wish-list/public_api"],
"@spartacus/cart/wish-list/root": [
"feature-libs/cart/wish-list/root/public_api"
],
@@ -171,9 +134,7 @@
"@spartacus/checkout/b2b/core": [
"feature-libs/checkout/b2b/core/public_api"
],
- "@spartacus/checkout/b2b": [
- "feature-libs/checkout/b2b/public_api"
- ],
+ "@spartacus/checkout/b2b": ["feature-libs/checkout/b2b/public_api"],
"@spartacus/checkout/b2b/occ": [
"feature-libs/checkout/b2b/occ/public_api"
],
@@ -189,18 +150,14 @@
"@spartacus/checkout/base/core": [
"feature-libs/checkout/base/core/public_api"
],
- "@spartacus/checkout/base": [
- "feature-libs/checkout/base/public_api"
- ],
+ "@spartacus/checkout/base": ["feature-libs/checkout/base/public_api"],
"@spartacus/checkout/base/occ": [
"feature-libs/checkout/base/occ/public_api"
],
"@spartacus/checkout/base/root": [
"feature-libs/checkout/base/root/public_api"
],
- "@spartacus/checkout": [
- "feature-libs/checkout/public_api"
- ],
+ "@spartacus/checkout": ["feature-libs/checkout/public_api"],
"@spartacus/checkout/scheduled-replenishment/assets": [
"feature-libs/checkout/scheduled-replenishment/assets/public_api"
],
@@ -231,24 +188,14 @@
"@spartacus/customer-ticketing/root": [
"feature-libs/customer-ticketing/root/public_api"
],
- "@spartacus/order/assets": [
- "feature-libs/order/assets/public_api"
- ],
+ "@spartacus/order/assets": ["feature-libs/order/assets/public_api"],
"@spartacus/order/components": [
"feature-libs/order/components/public_api"
],
- "@spartacus/order/core": [
- "feature-libs/order/core/public_api"
- ],
- "@spartacus/order": [
- "feature-libs/order/public_api"
- ],
- "@spartacus/order/occ": [
- "feature-libs/order/occ/public_api"
- ],
- "@spartacus/order/root": [
- "feature-libs/order/root/public_api"
- ],
+ "@spartacus/order/core": ["feature-libs/order/core/public_api"],
+ "@spartacus/order": ["feature-libs/order/public_api"],
+ "@spartacus/order/occ": ["feature-libs/order/occ/public_api"],
+ "@spartacus/order/root": ["feature-libs/order/root/public_api"],
"@spartacus/organization/account-summary/assets": [
"feature-libs/organization/account-summary/assets/public_api"
],
@@ -285,9 +232,7 @@
"@spartacus/organization/administration/root": [
"feature-libs/organization/administration/root/public_api"
],
- "@spartacus/organization": [
- "feature-libs/organization/public_api"
- ],
+ "@spartacus/organization": ["feature-libs/organization/public_api"],
"@spartacus/organization/order-approval/assets": [
"feature-libs/organization/order-approval/assets/public_api"
],
@@ -342,9 +287,7 @@
"@spartacus/pickup-in-store/core": [
"feature-libs/pickup-in-store/core/public_api"
],
- "@spartacus/pickup-in-store": [
- "feature-libs/pickup-in-store/public_api"
- ],
+ "@spartacus/pickup-in-store": ["feature-libs/pickup-in-store/public_api"],
"@spartacus/pickup-in-store/occ": [
"feature-libs/pickup-in-store/occ/public_api"
],
@@ -423,9 +366,7 @@
"@spartacus/product/image-zoom/root": [
"feature-libs/product/image-zoom/root/public_api"
],
- "@spartacus/product": [
- "feature-libs/product/public_api"
- ],
+ "@spartacus/product": ["feature-libs/product/public_api"],
"@spartacus/product/variants/assets": [
"feature-libs/product/variants/assets/public_api"
],
@@ -444,21 +385,26 @@
"@spartacus/qualtrics/components": [
"feature-libs/qualtrics/components/public_api"
],
- "@spartacus/qualtrics": [
- "feature-libs/qualtrics/public_api"
+ "@spartacus/qualtrics": ["feature-libs/qualtrics/public_api"],
+ "@spartacus/qualtrics/root": ["feature-libs/qualtrics/root/public_api"],
+ "@spartacus/requested-delivery-date/assets": [
+ "feature-libs/requested-delivery-date/assets/public_api"
],
- "@spartacus/qualtrics/root": [
- "feature-libs/qualtrics/root/public_api"
+ "@spartacus/requested-delivery-date/core": [
+ "feature-libs/requested-delivery-date/core/public_api"
],
- "@spartacus/smartedit/core": [
- "feature-libs/smartedit/core/public_api"
+ "@spartacus/requested-delivery-date": [
+ "feature-libs/requested-delivery-date/public_api"
],
- "@spartacus/smartedit": [
- "feature-libs/smartedit/public_api"
+ "@spartacus/requested-delivery-date/occ": [
+ "feature-libs/requested-delivery-date/occ/public_api"
],
- "@spartacus/smartedit/root": [
- "feature-libs/smartedit/root/public_api"
+ "@spartacus/requested-delivery-date/root": [
+ "feature-libs/requested-delivery-date/root/public_api"
],
+ "@spartacus/smartedit/core": ["feature-libs/smartedit/core/public_api"],
+ "@spartacus/smartedit": ["feature-libs/smartedit/public_api"],
+ "@spartacus/smartedit/root": ["feature-libs/smartedit/root/public_api"],
"@spartacus/storefinder/assets": [
"feature-libs/storefinder/assets/public_api"
],
@@ -468,18 +414,12 @@
"@spartacus/storefinder/core": [
"feature-libs/storefinder/core/public_api"
],
- "@spartacus/storefinder": [
- "feature-libs/storefinder/public_api"
- ],
- "@spartacus/storefinder/occ": [
- "feature-libs/storefinder/occ/public_api"
- ],
+ "@spartacus/storefinder": ["feature-libs/storefinder/public_api"],
+ "@spartacus/storefinder/occ": ["feature-libs/storefinder/occ/public_api"],
"@spartacus/storefinder/root": [
"feature-libs/storefinder/root/public_api"
],
- "@spartacus/tracking": [
- "feature-libs/tracking/public_api"
- ],
+ "@spartacus/tracking": ["feature-libs/tracking/public_api"],
"@spartacus/tracking/personalization/core": [
"feature-libs/tracking/personalization/core/public_api"
],
@@ -498,9 +438,7 @@
"@spartacus/tracking/tms/gtm": [
"feature-libs/tracking/tms/gtm/public_api"
],
- "@spartacus/tracking/tms": [
- "feature-libs/tracking/tms/public_api"
- ],
+ "@spartacus/tracking/tms": ["feature-libs/tracking/tms/public_api"],
"@spartacus/user/account/assets": [
"feature-libs/user/account/assets/public_api"
],
@@ -510,18 +448,14 @@
"@spartacus/user/account/core": [
"feature-libs/user/account/core/public_api"
],
- "@spartacus/user/account": [
- "feature-libs/user/account/public_api"
- ],
+ "@spartacus/user/account": ["feature-libs/user/account/public_api"],
"@spartacus/user/account/occ": [
"feature-libs/user/account/occ/public_api"
],
"@spartacus/user/account/root": [
"feature-libs/user/account/root/public_api"
],
- "@spartacus/user": [
- "feature-libs/user/public_api"
- ],
+ "@spartacus/user": ["feature-libs/user/public_api"],
"@spartacus/user/profile/assets": [
"feature-libs/user/profile/assets/public_api"
],
@@ -531,42 +465,33 @@
"@spartacus/user/profile/core": [
"feature-libs/user/profile/core/public_api"
],
- "@spartacus/user/profile": [
- "feature-libs/user/profile/public_api"
- ],
+ "@spartacus/user/profile": ["feature-libs/user/profile/public_api"],
"@spartacus/user/profile/occ": [
"feature-libs/user/profile/occ/public_api"
],
"@spartacus/user/profile/root": [
"feature-libs/user/profile/root/public_api"
],
- "@spartacus/cdc/assets": [
- "integration-libs/cdc/assets/public_api"
- ],
+ "@spartacus/cdc/assets": ["integration-libs/cdc/assets/public_api"],
"@spartacus/cdc/components": [
"integration-libs/cdc/components/public_api"
],
- "@spartacus/cdc/core": [
- "integration-libs/cdc/core/public_api"
- ],
- "@spartacus/cdc": [
- "integration-libs/cdc/public_api"
- ],
+ "@spartacus/cdc/core": ["integration-libs/cdc/core/public_api"],
+ "@spartacus/cdc": ["integration-libs/cdc/public_api"],
"@spartacus/cdc/organization/administration": [
"integration-libs/cdc/organization/administration/public_api"
],
- "@spartacus/cdc/root": [
- "integration-libs/cdc/root/public_api"
+ "@spartacus/cdc/organization/user-registration": [
+ "integration-libs/cdc/organization/user-registration/public_api"
],
+ "@spartacus/cdc/root": ["integration-libs/cdc/root/public_api"],
"@spartacus/cdc/user-account": [
"integration-libs/cdc/user-account/public_api"
],
"@spartacus/cdc/user-profile": [
"integration-libs/cdc/user-profile/public_api"
],
- "@spartacus/cds": [
- "integration-libs/cds/public_api"
- ],
+ "@spartacus/cds": ["integration-libs/cds/public_api"],
"@spartacus/digital-payments/assets": [
"integration-libs/digital-payments/assets/public_api"
],
@@ -591,31 +516,20 @@
"@spartacus/epd-visualization/root": [
"integration-libs/epd-visualization/root/public_api"
],
- "@spartacus/s4om/assets": [
- "integration-libs/s4om/assets/public_api"
- ],
- "@spartacus/s4om": [
- "integration-libs/s4om/public_api"
- ],
- "@spartacus/s4om/root": [
- "integration-libs/s4om/root/public_api"
- ],
- "@spartacus/assets": [
- "projects/assets/src/public_api"
- ],
- "@spartacus/core": [
- "projects/core/public_api"
+ "@spartacus/s4om/assets": ["integration-libs/s4om/assets/public_api"],
+ "@spartacus/s4om": ["integration-libs/s4om/public_api"],
+ "@spartacus/s4om/root": ["integration-libs/s4om/root/public_api"],
+ "@spartacus/segment-refs": ["integration-libs/segment-refs/public_api"],
+ "@spartacus/segment-refs/root": [
+ "integration-libs/segment-refs/root/public_api"
],
- "@spartacus/storefront": [
- "projects/storefrontlib/public_api"
- ]
+ "@spartacus/assets": ["projects/assets/src/public_api"],
+ "@spartacus/core": ["projects/core/public_api"],
+ "@spartacus/storefront": ["projects/storefrontlib/public_api"]
},
"useDefineForClassFields": false
},
- "exclude": [
- "./dist",
- "./projects/storefrontapp-e2e-cypress"
- ],
+ "exclude": ["./dist", "./projects/storefrontapp-e2e-cypress"],
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,