Skip to content

Commit 9cb35f7

Browse files
Merge branch 'develop' into feature/CXSPA-8968
2 parents 432c230 + b3b9360 commit 9cb35f7

File tree

100 files changed

+20493
-23254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+20493
-23254
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
index.d.ts

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"error",
7979
{
8080
"allow": [],
81+
"allowCircularSelfDependency": true,
8182
"depConstraints": [
8283
{
8384
"sourceTag": "*",

.stylelintrc.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,9 @@
3838
"margin-inline"
3939
],
4040
"declaration-property-value-disallowed-list": {
41-
"text-align": [
42-
"right",
43-
"left"
44-
]
41+
"text-align": ["right", "left"]
4542
},
4643
"scss/comment-no-loud": true
4744
},
48-
"ignoreFiles": [
49-
"projects/storefrontstyles/vendor/**/*.scss"
50-
]
45+
"ignoreFiles": ["projects/storefrontstyles/vendor/**/*.scss"]
5146
}

core-libs/setup/package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spartacus/setup",
3-
"version": "2211.37.0-1",
3+
"version": "2211.37.0",
44
"description": "Includes features that makes Spartacus and it's setup easier and streamlined.",
55
"keywords": [
66
"spartacus",
@@ -19,15 +19,15 @@
1919
"tslib": "^2.8.1"
2020
},
2121
"peerDependencies": {
22-
"@angular/core": "^19.0.3",
23-
"@angular/ssr": "^19.0.4",
24-
"@spartacus/cart": "2211.37.0-1",
25-
"@spartacus/core": "2211.37.0-1",
26-
"@spartacus/order": "2211.37.0-1",
27-
"@spartacus/user": "2211.37.0-1"
22+
"@angular/core": "^19.1.8",
23+
"@angular/ssr": "^19.1.9",
24+
"@spartacus/cart": "2211.37.0",
25+
"@spartacus/core": "2211.37.0",
26+
"@spartacus/order": "2211.37.0",
27+
"@spartacus/user": "2211.37.0"
2828
},
2929
"optionalDependencies": {
30-
"@angular/platform-server": "^19.0.3",
30+
"@angular/platform-server": "^19.1.8",
3131
"express": "^4.21.2"
3232
},
3333
"engines": {

core-libs/setup/ssr/engine/__snapshots__/cx-common-engine.spec.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ exports[`CxCommonEngine should handle APP_INITIALIZER errors the standard Angula
77

88
exports[`CxCommonEngine should handle errors propagated from SSR 1`] = `"test error"`;
99

10-
exports[`CxCommonEngine should not override providers passed to options 1`] = `"<html data-beasties-container><head></head><body><cx-token ng-version="19.0.3" ng-server-context="ssr">message:test</cx-token></body></html>"`;
10+
exports[`CxCommonEngine should not override providers passed to options 1`] = `"<html data-beasties-container><head></head><body><cx-token ng-version="19.1.8" ng-server-context="ssr">message:test</cx-token></body></html>"`;
1111

12-
exports[`CxCommonEngine should return html if no errors 1`] = `"<html data-beasties-container><head></head><body><cx-mock ng-version="19.0.3" ng-server-context="ssr">some template</cx-mock></body></html>"`;
12+
exports[`CxCommonEngine should return html if no errors 1`] = `"<html data-beasties-container><head></head><body><cx-mock ng-version="19.1.8" ng-server-context="ssr">some template</cx-mock></body></html>"`;

feature-libs/asm/package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spartacus/asm",
3-
"version": "2211.37.0-1",
3+
"version": "2211.37.0",
44
"description": "ASM feature library for Spartacus",
55
"keywords": [
66
"spartacus",
@@ -25,21 +25,21 @@
2525
"tslib": "^2.8.1"
2626
},
2727
"peerDependencies": {
28-
"@angular-devkit/schematics": "^19.0.4",
29-
"@angular/common": "^19.0.3",
30-
"@angular/core": "^19.0.3",
31-
"@angular/forms": "^19.0.3",
28+
"@angular-devkit/schematics": "^19.1.9",
29+
"@angular/common": "^19.1.8",
30+
"@angular/core": "^19.1.8",
31+
"@angular/forms": "^19.1.8",
3232
"@ng-select/ng-select": "^14.1.0",
33-
"@ngrx/effects": "^19.0.0",
34-
"@ngrx/store": "^19.0.0",
35-
"@spartacus/cart": "2211.37.0-1",
36-
"@spartacus/core": "2211.37.0-1",
37-
"@spartacus/order": "2211.37.0-1",
38-
"@spartacus/schematics": "2211.37.0-1",
39-
"@spartacus/storefinder": "2211.37.0-1",
40-
"@spartacus/storefront": "2211.37.0-1",
41-
"@spartacus/styles": "2211.37.0-1",
42-
"@spartacus/user": "2211.37.0-1",
33+
"@ngrx/effects": "^19.0.1",
34+
"@ngrx/store": "^19.0.1",
35+
"@spartacus/cart": "2211.37.0",
36+
"@spartacus/core": "2211.37.0",
37+
"@spartacus/order": "2211.37.0",
38+
"@spartacus/schematics": "2211.37.0",
39+
"@spartacus/storefinder": "2211.37.0",
40+
"@spartacus/storefront": "2211.37.0",
41+
"@spartacus/styles": "2211.37.0",
42+
"@spartacus/user": "2211.37.0",
4343
"rxjs": "^7.8.0"
4444
},
4545
"engines": {

feature-libs/cart/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spartacus/cart",
3-
"version": "2211.37.0-1",
3+
"version": "2211.37.0",
44
"description": "",
55
"keywords": [
66
"spartacus",
@@ -29,19 +29,19 @@
2929
"tslib": "^2.8.1"
3030
},
3131
"peerDependencies": {
32-
"@angular-devkit/schematics": "^19.0.4",
33-
"@angular/common": "^19.0.3",
34-
"@angular/core": "^19.0.3",
35-
"@angular/forms": "^19.0.3",
36-
"@angular/router": "^19.0.3",
32+
"@angular-devkit/schematics": "^19.1.9",
33+
"@angular/common": "^19.1.8",
34+
"@angular/core": "^19.1.8",
35+
"@angular/forms": "^19.1.8",
36+
"@angular/router": "^19.1.8",
3737
"@ng-select/ng-select": "^14.1.0",
38-
"@ngrx/effects": "^19.0.0",
39-
"@ngrx/store": "^19.0.0",
40-
"@spartacus/core": "2211.37.0-1",
41-
"@spartacus/schematics": "2211.37.0-1",
42-
"@spartacus/storefront": "2211.37.0-1",
43-
"@spartacus/styles": "2211.37.0-1",
44-
"@spartacus/user": "2211.37.0-1",
38+
"@ngrx/effects": "^19.0.1",
39+
"@ngrx/store": "^19.0.1",
40+
"@spartacus/core": "2211.37.0",
41+
"@spartacus/schematics": "2211.37.0",
42+
"@spartacus/storefront": "2211.37.0",
43+
"@spartacus/styles": "2211.37.0",
44+
"@spartacus/user": "2211.37.0",
4545
"rxjs": "^7.8.0"
4646
},
4747
"engines": {

feature-libs/checkout/package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spartacus/checkout",
3-
"version": "2211.37.0-1",
3+
"version": "2211.37.0",
44
"description": "Checkout feature library for Spartacus",
55
"keywords": [
66
"spartacus",
@@ -25,20 +25,20 @@
2525
"tslib": "^2.8.1"
2626
},
2727
"peerDependencies": {
28-
"@angular-devkit/schematics": "^19.0.4",
29-
"@angular/common": "^19.0.3",
30-
"@angular/core": "^19.0.3",
31-
"@angular/forms": "^19.0.3",
32-
"@angular/router": "^19.0.3",
28+
"@angular-devkit/schematics": "^19.1.9",
29+
"@angular/common": "^19.1.8",
30+
"@angular/core": "^19.1.8",
31+
"@angular/forms": "^19.1.8",
32+
"@angular/router": "^19.1.8",
3333
"@ng-select/ng-select": "^14.1.0",
34-
"@ngrx/store": "^19.0.0",
35-
"@spartacus/cart": "2211.37.0-1",
36-
"@spartacus/core": "2211.37.0-1",
37-
"@spartacus/order": "2211.37.0-1",
38-
"@spartacus/schematics": "2211.37.0-1",
39-
"@spartacus/storefront": "2211.37.0-1",
40-
"@spartacus/styles": "2211.37.0-1",
41-
"@spartacus/user": "2211.37.0-1",
34+
"@ngrx/store": "^19.0.1",
35+
"@spartacus/cart": "2211.37.0",
36+
"@spartacus/core": "2211.37.0",
37+
"@spartacus/order": "2211.37.0",
38+
"@spartacus/schematics": "2211.37.0",
39+
"@spartacus/storefront": "2211.37.0",
40+
"@spartacus/styles": "2211.37.0",
41+
"@spartacus/user": "2211.37.0",
4242
"rxjs": "^7.8.0"
4343
},
4444
"engines": {

feature-libs/customer-ticketing/package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spartacus/customer-ticketing",
3-
"version": "2211.37.0-1",
3+
"version": "2211.37.0",
44
"description": "Customer-Ticketing library for Spartacus",
55
"keywords": [
66
"spartacus",
@@ -25,17 +25,17 @@
2525
"tslib": "^2.8.1"
2626
},
2727
"peerDependencies": {
28-
"@angular-devkit/schematics": "^19.0.4",
29-
"@angular/common": "^19.0.3",
30-
"@angular/core": "^19.0.3",
31-
"@angular/forms": "^19.0.3",
32-
"@angular/router": "^19.0.3",
28+
"@angular-devkit/schematics": "^19.1.9",
29+
"@angular/common": "^19.1.8",
30+
"@angular/core": "^19.1.8",
31+
"@angular/forms": "^19.1.8",
32+
"@angular/router": "^19.1.8",
3333
"@ng-select/ng-select": "^14.1.0",
34-
"@spartacus/cart": "2211.37.0-1",
35-
"@spartacus/core": "2211.37.0-1",
36-
"@spartacus/schematics": "2211.37.0-1",
37-
"@spartacus/storefront": "2211.37.0-1",
38-
"@spartacus/styles": "2211.37.0-1",
34+
"@spartacus/cart": "2211.37.0",
35+
"@spartacus/core": "2211.37.0",
36+
"@spartacus/schematics": "2211.37.0",
37+
"@spartacus/storefront": "2211.37.0",
38+
"@spartacus/styles": "2211.37.0",
3939
"rxjs": "^7.8.0"
4040
},
4141
"engines": {

feature-libs/estimated-delivery-date/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spartacus/estimated-delivery-date",
3-
"version": "2211.37.0-1",
3+
"version": "2211.37.0",
44
"description": "Estimated Delivery Date library for Spartacus",
55
"keywords": [
66
"spartacus",
@@ -25,15 +25,15 @@
2525
"tslib": "^2.8.1"
2626
},
2727
"peerDependencies": {
28-
"@angular-devkit/schematics": "^19.0.4",
29-
"@angular/common": "^19.0.3",
30-
"@angular/core": "^19.0.3",
31-
"@spartacus/cart": "2211.37.0-1",
32-
"@spartacus/core": "2211.37.0-1",
33-
"@spartacus/order": "2211.37.0-1",
34-
"@spartacus/schematics": "2211.37.0-1",
35-
"@spartacus/storefront": "2211.37.0-1",
36-
"@spartacus/styles": "2211.37.0-1",
28+
"@angular-devkit/schematics": "^19.1.9",
29+
"@angular/common": "^19.1.8",
30+
"@angular/core": "^19.1.8",
31+
"@spartacus/cart": "2211.37.0",
32+
"@spartacus/core": "2211.37.0",
33+
"@spartacus/order": "2211.37.0",
34+
"@spartacus/schematics": "2211.37.0",
35+
"@spartacus/storefront": "2211.37.0",
36+
"@spartacus/styles": "2211.37.0",
3737
"rxjs": "^7.8.0"
3838
},
3939
"engines": {

feature-libs/order/assets/translations/en/order.json

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"placed": "Placed",
1111
"placedBy": "Placed By",
1212
"unit": "Unit",
13+
"quoteCode": "Quote ID {{id}}",
14+
"quoteDetail": "Quote Detail",
1315
"costCenter": "Cost Center",
1416
"costCenterAndUnit": "Cost Center / Unit",
1517
"costCenterAndUnitValue": "{{costCenterName}} / {{unitName}}",

feature-libs/order/components/order-details/order-overview/order-overview.component.html

+32
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@
6363
[content]="getOrderStatusCardContent(order.statusDisplay) | async"
6464
></cx-card>
6565

66+
<ng-container
67+
*ngTemplateOutlet="
68+
showQuoteCode;
69+
context: { sapQuoteCode: order.sapQuoteCode }
70+
"
71+
></ng-container>
72+
6673
<ng-template
6774
[cxOutlet]="cartOutlets.ORDER_OVERVIEW"
6875
[cxOutletContext]="{ item: order, readonly: true }"
@@ -153,6 +160,13 @@
153160
[content]="getOrderStatusCardContent(order.statusDisplay) | async"
154161
></cx-card>
155162

163+
<ng-container
164+
*ngTemplateOutlet="
165+
showQuoteCode;
166+
context: { sapQuoteCode: order.sapQuoteCode }
167+
"
168+
></ng-container>
169+
156170
<ng-template
157171
[cxOutlet]="cartOutlets.ORDER_OVERVIEW"
158172
[cxOutletContext]="{ item: order, readonly: true }"
@@ -168,3 +182,21 @@
168182
</div>
169183
</ng-container>
170184
</div>
185+
186+
<ng-template #showQuoteCode let-quoteCode="sapQuoteCode">
187+
<ng-container *cxFeature="'showOrderQuoteLink'">
188+
<div id="quote-container" class="card-body cx-card-body" *ngIf="quoteCode">
189+
<div class="cx-card-title">
190+
{{ 'orderDetails.quoteCode' | cxTranslate: { id: quoteCode } }}
191+
</div>
192+
<a
193+
[routerLink]="
194+
{ cxRoute: 'quoteDetails', params: { quoteId: quoteCode } } | cxUrl
195+
"
196+
class="cx-card-actions"
197+
>
198+
{{ 'orderDetails.quoteDetail' | cxTranslate }}
199+
</a>
200+
</div>
201+
</ng-container>
202+
</ng-template>

feature-libs/order/components/order-details/order-overview/order-overview.component.spec.ts

+36-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input } from '@angular/core';
1+
import { Component, Input, Pipe, PipeTransform } from '@angular/core';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { DeliveryMode } from '@spartacus/cart/base/root';
44
import {
@@ -14,6 +14,7 @@ import { EMPTY, Observable, of } from 'rxjs';
1414
import { OrderDetailsService } from '../order-details.service';
1515
import { OrderOverviewComponent } from './order-overview.component';
1616
import { OrderOverviewComponentService } from './order-overview-component.service';
17+
import { MockFeatureDirective } from 'projects/storefrontlib/shared/test/mock-feature-directive';
1718

1819
@Component({
1920
selector: 'cx-card',
@@ -25,6 +26,14 @@ class MockCardComponent {
2526
content: Card;
2627
}
2728

29+
@Pipe({
30+
name: 'cxUrl',
31+
standalone: false,
32+
})
33+
class MockUrlPipe implements PipeTransform {
34+
transform() {}
35+
}
36+
2837
const mockDeliveryAddress: Address = {
2938
firstName: 'John',
3039
lastName: 'Smith',
@@ -154,7 +163,12 @@ describe('OrderOverviewComponent', () => {
154163
beforeEach(() => {
155164
TestBed.configureTestingModule({
156165
imports: [I18nTestingModule],
157-
declarations: [OrderOverviewComponent, MockCardComponent],
166+
declarations: [
167+
OrderOverviewComponent,
168+
MockCardComponent,
169+
MockUrlPipe,
170+
MockFeatureDirective,
171+
],
158172
providers: [
159173
{ provide: TranslationService, useClass: MockTranslationService },
160174
{
@@ -552,4 +566,24 @@ describe('OrderOverviewComponent', () => {
552566
);
553567
});
554568
});
569+
570+
it('should render quote code in UI', () => {
571+
component.order$ = of({ ...mockOrder, sapQuoteCode: '12345' });
572+
fixture.detectChanges();
573+
const quoteContainer =
574+
fixture.nativeElement.querySelector('#quote-container');
575+
expect(quoteContainer).not.toBeNull();
576+
const quoteTemplate = quoteContainer.querySelector('.cx-card-title');
577+
expect(quoteTemplate.textContent).toContain('12345');
578+
const quoteLink = quoteContainer.querySelector('.cx-card-actions');
579+
expect(quoteLink.innerText).toEqual('orderDetails.quoteDetail');
580+
});
581+
582+
it('should not render quote code in UI', () => {
583+
component.order$ = of({ ...mockOrder });
584+
fixture.detectChanges();
585+
const quoteContainer =
586+
fixture.nativeElement.querySelector('#quote-container');
587+
expect(quoteContainer).toBeNull();
588+
});
555589
});

0 commit comments

Comments
 (0)