diff --git a/.eslintrc.json b/.eslintrc.json index 3fe025e9509..864271ccd61 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,7 +15,6 @@ ], "plugins": ["deprecation", "@typescript-eslint", "@nx", "@stylistic/ts"], "rules": { - "@angular-eslint/no-host-metadata-property": "off", "deprecation/deprecation": "warn", "prefer-arrow/prefer-arrow-functions": "off", "space-before-function-paren": "off", @@ -30,6 +29,7 @@ "no-fallthrough": "off", "prefer-const": "off", "@angular-eslint/use-lifecycle-interface": "error", + "@angular-eslint/prefer-standalone": "off", "@stylistic/ts/quotes": "off", "@stylistic/ts/member-delimiter-style": [ "error", diff --git a/.prettierignore b/.prettierignore index fe818b2144f..94b4413c435 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,4 +5,5 @@ feature-libs/smartedit/assets/webApplicationInjector.js coverage /.nx/cache -/.nx/workspace-data \ No newline at end of file +/.nx/workspace-data +projects/storefrontstyles/vendor/**/*.scss diff --git a/.stylelintrc.json b/.stylelintrc.json index 6f1604d6a26..36e4a76486b 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -38,8 +38,14 @@ "margin-inline" ], "declaration-property-value-disallowed-list": { - "text-align": ["right", "left"] + "text-align": [ + "right", + "left" + ] }, "scss/comment-no-loud": true - } + }, + "ignoreFiles": [ + "projects/storefrontstyles/vendor/**/*.scss" + ] } diff --git a/README.md b/README.md index 2d6c8e68657..d0ba84b1dbe 100644 --- a/README.md +++ b/README.md @@ -158,4 +158,3 @@ Many improvements are coming! All tasks will be posted to our GitHub issue track Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the [LICENSE](LICENSE) file. - diff --git a/core-libs/setup/jest.config.js b/core-libs/setup/jest.config.js index 139055562b9..9559c0ad544 100644 --- a/core-libs/setup/jest.config.js +++ b/core-libs/setup/jest.config.js @@ -5,9 +5,18 @@ const { defaultTransformerOptions } = require('jest-preset-angular/presets'); /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ module.exports = { preset: 'jest-preset-angular', - moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, { - prefix: '/', - }), + moduleNameMapper: { + ...pathsToModuleNameMapper(compilerOptions.paths || {}, { + prefix: '/', + }), + // mapping required to use `beasties` from node modules that has proper ES module format + // instead of the version internalized by the Angular Team which file format is not supported + // by Jest. + // for more, see: https://github.com/angular/angular-cli/pull/28228 + // and: https://github.com/angular/angular-cli/pull/28726 + '^../third_party/beasties/index.js$': + '/../../node_modules/beasties', + }, setupFilesAfterEnv: ['/setup-jest.ts'], transform: { '^.+\\.(ts|js|mjs|html|svg)$': [ diff --git a/core-libs/setup/package.json b/core-libs/setup/package.json index 55537ae3115..b721a7f9647 100644 --- a/core-libs/setup/package.json +++ b/core-libs/setup/package.json @@ -19,15 +19,15 @@ "tslib": "^2.6.2" }, "peerDependencies": { - "@angular/core": "^18.2.9", - "@angular/ssr": "^18.2.9", + "@angular/core": "^19.0.3", + "@angular/ssr": "^19.0.4", "@spartacus/cart": "2211.32.0-1", "@spartacus/core": "2211.32.0-1", "@spartacus/order": "2211.32.0-1", "@spartacus/user": "2211.32.0-1" }, "optionalDependencies": { - "@angular/platform-server": "^18.2.9", + "@angular/platform-server": "^19.0.3", "express": "^4.21.2" }, "publishConfig": { diff --git a/core-libs/setup/ssr/engine-decorator/ng-express-engine-decorator.ts b/core-libs/setup/ssr/engine-decorator/ng-express-engine-decorator.ts index ec06b414e53..09085c14050 100644 --- a/core-libs/setup/ssr/engine-decorator/ng-express-engine-decorator.ts +++ b/core-libs/setup/ssr/engine-decorator/ng-express-engine-decorator.ts @@ -4,7 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CommonEngineOptions, CommonEngineRenderOptions } from '@angular/ssr'; +import { + CommonEngineOptions, + CommonEngineRenderOptions, +} from '@angular/ssr/node'; import { NgSetupOptions } from '../engine/ng-express-engine'; import { OptimizedSsrEngine, diff --git a/core-libs/setup/ssr/engine/__snapshots__/cx-common-engine.spec.ts.snap b/core-libs/setup/ssr/engine/__snapshots__/cx-common-engine.spec.ts.snap index 8d434144589..b793968c910 100644 --- a/core-libs/setup/ssr/engine/__snapshots__/cx-common-engine.spec.ts.snap +++ b/core-libs/setup/ssr/engine/__snapshots__/cx-common-engine.spec.ts.snap @@ -7,6 +7,6 @@ exports[`CxCommonEngine should handle APP_INITIALIZER errors the standard Angula exports[`CxCommonEngine should handle errors propagated from SSR 1`] = `"test error"`; -exports[`CxCommonEngine should not override providers passed to options 1`] = `"message:test"`; +exports[`CxCommonEngine should not override providers passed to options 1`] = `"message:test"`; -exports[`CxCommonEngine should return html if no errors 1`] = `"some template"`; +exports[`CxCommonEngine should return html if no errors 1`] = `"some template"`; diff --git a/core-libs/setup/ssr/engine/cx-common-engine.spec.ts b/core-libs/setup/ssr/engine/cx-common-engine.spec.ts index 4a37596fe60..acc547dd0f0 100644 --- a/core-libs/setup/ssr/engine/cx-common-engine.spec.ts +++ b/core-libs/setup/ssr/engine/cx-common-engine.spec.ts @@ -8,7 +8,11 @@ import { PROPAGATE_ERROR_TO_SERVER } from '../error-handling/error-response/prop import { CxCommonEngine } from './cx-common-engine'; // Test how the CxCommonEngine handles successful server-side rendering -@Component({ selector: 'cx-mock', template: 'some template' }) +@Component({ + selector: 'cx-mock', + template: 'some template', + standalone: false, +}) export class SuccessComponent {} @NgModule({ @@ -22,6 +26,7 @@ export class SuccessServerModule {} @Component({ selector: 'cx-response', template: ``, + standalone: false, }) export class WithPropagatedErrorComponent { constructor() { @@ -43,6 +48,7 @@ export const SOME_TOKEN = new InjectionToken('SOME_TOKEN'); @Component({ selector: 'cx-token', template: `message:{{ someToken }}`, + standalone: false, }) export class TokenComponent { someToken = inject(SOME_TOKEN); diff --git a/core-libs/setup/ssr/engine/cx-common-engine.ts b/core-libs/setup/ssr/engine/cx-common-engine.ts index a40f94c37ed..14962f87436 100644 --- a/core-libs/setup/ssr/engine/cx-common-engine.ts +++ b/core-libs/setup/ssr/engine/cx-common-engine.ts @@ -8,7 +8,7 @@ import { CommonEngine, CommonEngineOptions, CommonEngineRenderOptions, -} from '@angular/ssr'; +} from '@angular/ssr/node'; import { PROPAGATE_ERROR_TO_SERVER } from '../error-handling/error-response/propagate-error-to-server'; /** diff --git a/core-libs/setup/ssr/engine/ng-express-engine.spec.ts b/core-libs/setup/ssr/engine/ng-express-engine.spec.ts index 648360d56bd..c213b3726ec 100644 --- a/core-libs/setup/ssr/engine/ng-express-engine.spec.ts +++ b/core-libs/setup/ssr/engine/ng-express-engine.spec.ts @@ -25,7 +25,11 @@ import { ngExpressEngine } from './ng-express-engine'; * - https://github.com/angular/universal/blob/e798d256de5e4377b704e63d993dc56ea35df97d/modules/express-engine/spec/mock.server.module.ts * */ -@Component({ selector: 'cx-mock', template: 'some template' }) +@Component({ + selector: 'cx-mock', + template: 'some template', + standalone: false, +}) export class MockComponent {} /** @@ -57,7 +61,11 @@ export class MockServerModule {} * - https://github.com/angular/universal/blob/e798d256de5e4377b704e63d993dc56ea35df97d/modules/express-engine/spec/mock.server.module.ts * */ -@Component({ selector: 'cx-request', template: `url:{{ _req.url }}` }) +@Component({ + selector: 'cx-request', + template: `url:{{ _req.url }}`, + standalone: false, +}) export class RequestComponent { constructor(@Inject(REQUEST) public readonly _req: any) {} } @@ -94,6 +102,7 @@ export class RequestServerModule {} @Component({ selector: 'cx-response', template: `statusCode:{{ _res.statusCode }}`, + standalone: false, }) export class ResponseComponent { constructor(@Inject(RESPONSE) public readonly _res: any) {} @@ -144,6 +153,7 @@ export const SOME_TOKEN = new InjectionToken('SOME_TOKEN'); @Component({ selector: 'cx-token', template: `message:{{ _someToken.message }}`, + standalone: false, }) export class TokenComponent { constructor(@Inject(SOME_TOKEN) public readonly _someToken: any) {} diff --git a/core-libs/setup/ssr/engine/ng-express-engine.ts b/core-libs/setup/ssr/engine/ng-express-engine.ts index 1dfe1bb2533..faaaeeb58c8 100644 --- a/core-libs/setup/ssr/engine/ng-express-engine.ts +++ b/core-libs/setup/ssr/engine/ng-express-engine.ts @@ -5,7 +5,10 @@ */ import { StaticProvider } from '@angular/core'; -import { CommonEngineOptions, CommonEngineRenderOptions } from '@angular/ssr'; +import { + CommonEngineOptions, + CommonEngineRenderOptions, +} from '@angular/ssr/node'; import { Request, Response } from 'express'; import { REQUEST, RESPONSE } from '../tokens/express.tokens'; import { CxCommonEngine } from './cx-common-engine'; diff --git a/core-libs/setup/ssr/optimized-engine/rendering-cache.ts b/core-libs/setup/ssr/optimized-engine/rendering-cache.ts index 11f87612262..8dd11c68920 100644 --- a/core-libs/setup/ssr/optimized-engine/rendering-cache.ts +++ b/core-libs/setup/ssr/optimized-engine/rendering-cache.ts @@ -28,7 +28,10 @@ export class RenderingCache { if (this.options?.cacheSize) { this.renders.delete(key); if (this.renders.size >= this.options.cacheSize) { - this.renders.delete(this.renders.keys().next().value); + const oldestKey = this.renders.keys().next().value; + if (oldestKey !== undefined) { + this.renders.delete(oldestKey); + } } } // cache only if shouldCacheRenderingResult return true diff --git a/docs/migration/2211_ng18/bootstrap.md b/docs/migration/2211_ng18/bootstrap.md new file mode 100644 index 00000000000..47ec498ff98 --- /dev/null +++ b/docs/migration/2211_ng18/bootstrap.md @@ -0,0 +1,53 @@ +# Spartacus migration - Bootstrap + +1. Uninstall Bootstrap + If the bootstrap package is still installed in your project, uninstall it to avoid conflicts. Use + the following command: + ```npm uninstall bootstrap``` +2. Update `styles.scss` + Modify the `styles.scss` file to integrate Spartacus styles along with Bootstrap. Proper import order is critical for + styles to be applied correctly. +### Steps to Update: +1. Place the following import for styles-config at the top of the file: + ```@import 'styles-config';``` +2. Add Spartacus core styles first. Importing Spartacus styles before Bootstrap ensures core styles load as a + priority. +3. Follow this by importing Bootstrap styles using the Bootstrap copy provided by Spartacus. Ensure the order of + Bootstrap imports matches the sequence below for consistency. +4. Conclude with the Spartacus index styles. + + + Final file structure should look like this: + +```styles.scss +// ORDER IMPORTANT: Spartacus core first +@import '@spartacus/styles/scss/core'; + +// ORDER IMPORTANT: Bootstrap next +@import '@spartacus/styles/vendor/bootstrap/scss/reboot'; +@import '@spartacus/styles/vendor/bootstrap/scss/type'; +@import '@spartacus/styles/vendor/bootstrap/scss/grid'; +@import '@spartacus/styles/vendor/bootstrap/scss/utilities'; +@import '@spartacus/styles/vendor/bootstrap/scss/transitions'; +@import '@spartacus/styles/vendor/bootstrap/scss/dropdown'; +@import '@spartacus/styles/vendor/bootstrap/scss/card'; +@import '@spartacus/styles/vendor/bootstrap/scss/nav'; +@import '@spartacus/styles/vendor/bootstrap/scss/buttons'; +@import '@spartacus/styles/vendor/bootstrap/scss/forms'; +@import '@spartacus/styles/vendor/bootstrap/scss/custom-forms'; +@import '@spartacus/styles/vendor/bootstrap/scss/modal'; +@import '@spartacus/styles/vendor/bootstrap/scss/close'; +@import '@spartacus/styles/vendor/bootstrap/scss/alert'; +@import '@spartacus/styles/vendor/bootstrap/scss/tooltip'; + +@import '@spartacus/styles/index'; +``` +3. Individual imports. + If your application directly imports specific Bootstrap classes in any of your stylesheets, replace those imports with the corresponding Spartacus imports. For example: +``` +// Original import +@import '~bootstrap/scss/reboot'; + +// Replace with +@import '@spartacus/styles/vendor/bootstrap/scss/reboot'; +``` diff --git a/docs/migration/2211_ng18/migration.md b/docs/migration/2211_ng18/migration.md deleted file mode 100644 index 57c9ba61cce..00000000000 --- a/docs/migration/2211_ng18/migration.md +++ /dev/null @@ -1,38 +0,0 @@ -# (EARLY NOTES) Migrating a custom app to use Spartacus with Angular v18 - -Before upgrading Spartacus to the new version with Angular 18, you need to first: -- upgrade to the latest 2211.x of Spartacus -- upgrade Angular to version v18 - -## Update Angular to 17 and 18 - -### Update Angular to 17 and 3rd party deps to be compatible with Angular 18 - -Follow the [Angular guidelines for upgrading from v17 to v18](https://angular.dev/update-guide?v=17.0-18.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 18 (e.g. `@ng-select/ng-select@13`, `@ngrx/store@18`, `ngx-infinite-scroll@18`): - -```bash -ng update @angular/core@18 @angular/cli@18 @ng-select/ng-select@13 @ngrx/store@18 ngx-infinite-scroll@18 --force -git add . -git commit -m "update angular 18 and 3rd party deps angular 18 compatible" -``` -Note: Do not select `use-application-builder` migration when migrating to Angular 18. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already supports it. - -### Run Spartacus update - -After successfully updating the application to Angular 18, execute this command to initiate the Spartacus update process. - -```bash -ng update @spartacus/schematics@latest -``` - -### Adjust Angular configuration - -Due to changes in Angular's application builder, for applications created starting from SPA 2211.19, you need to adjust the `angular.json` file to generate the `index.html` file in the `dist` folder. This is required for CCv2 to map `OCC_BACKEND_BASE_URL_VALUE` and `MEDIA_BACKEND_BASE_URL_VALUE` meta tags to the correct values. Unfortunately, this will contribute to pre-rendering to not work properly (which is a known issue) - -```diff -- "index": "src/index.html" -+ "index": { -+ "input": "src/index.html", -+ "output": "index.html" -+ } -``` diff --git a/docs/migration/2211_ng19/migration.md b/docs/migration/2211_ng19/migration.md new file mode 100644 index 00000000000..6c4e0f482bb --- /dev/null +++ b/docs/migration/2211_ng19/migration.md @@ -0,0 +1,53 @@ +# (EARLY NOTES) Migrating a custom app to use Spartacus with Angular v18 + +Before upgrading Spartacus to the new version with Angular 18, you need to first: +- upgrade to the latest 2211.x of Spartacus +- upgrade Angular to version v18 and then to v19 + +## Update Angular to 18 and 19 + +### Update Angular to 18 and 3rd party deps to be compatible with Angular 18 + +Follow the [Angular guidelines for upgrading from v17 to v18](https://angular.dev/update-guide?v=17.0-18.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 18 (e.g. `@ng-select/ng-select@13`, `@ngrx/store@18`, `ngx-infinite-scroll@18`): + +```bash +ng update @angular/core@18 @angular/cli@18 @ng-select/ng-select@13 @ngrx/store@18 ngx-infinite-scroll@18 --force +git add . +git commit -m "update angular 18 and 3rd party deps angular 18 compatible" +``` +Note: Do not select `use-application-builder` migration when migrating to Angular 18. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already supports it. + +### Update Angular to 19 and 3rd party deps to be compatible with Angular 19 + +Follow the [Angular guidelines for upgrading from v18 to v19](https://angular.dev/update-guide?v=18.0-19.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 19 (e.g. `@ng-select/ng-select@14`, `@ngrx/store@19`, `ngx-infinite-scroll@19`): + +```bash +ng update @angular/cli@19 @angular/core@19 ngx-infinite-scroll@19 @ng-select/ng-select@14 @ngrx/store@19 angular-oauth2-oidc@19 --force +git add . +git commit -m "update angular 19 and 3rd party deps angular 19 compatible" +``` + +Note: Unselect `use-application-builder` migration when migrating to Angular 19. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already supports it. + +## Run Spartacus update + +After successfully updating the application to Angular 19, execute this command to initiate the Spartacus update process. + +```bash +ng update @spartacus/schematics@latest +``` + +### If using Server Side Rendering (SSR) and `application` builder + +For applications using `application` builder having SSR support, you need to adjust the `server.ts` file to be compatible with the output generated by the builder. + +```diff +/* ... */ +- const indexHtml = path.join(browserDistFolder, 'index.html'); ++ const indexHtml = path.join(serverDistFolder, 'index.server.html'); +``` + + + + + diff --git a/feature-libs/asm/.eslintrc.json b/feature-libs/asm/.eslintrc.json index 862b5a870b0..9895500871d 100644 --- a/feature-libs/asm/.eslintrc.json +++ b/feature-libs/asm/.eslintrc.json @@ -1,4 +1,9 @@ { "extends": "../../.eslintrc.json", - "ignorePatterns": ["schematics/**/*.d.ts"] + "ignorePatterns": ["schematics/**/*.d.ts"], + "overrides": [ + { + "files": ["*.ts"] + } + ] } diff --git a/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.spec.ts b/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.spec.ts index de16eefe7c5..cfc8f12349c 100644 --- a/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.spec.ts +++ b/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.spec.ts @@ -9,6 +9,7 @@ import { @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} diff --git a/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.ts b/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.ts index f65eebcbafb..bf70da30dad 100644 --- a/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.ts +++ b/feature-libs/asm/components/asm-bind-cart-dialog/asm-bind-cart-dialog.component.ts @@ -15,6 +15,7 @@ export enum BIND_CART_DIALOG_ACTION { @Component({ selector: 'cx-asm-bind-cart-dialog', templateUrl: './asm-bind-cart-dialog.component.html', + standalone: false, }) export class AsmBindCartDialogComponent { BIND_CART_ACTION = BIND_CART_DIALOG_ACTION; diff --git a/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.spec.ts b/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.spec.ts index 797e40c9092..b6a51f42121 100644 --- a/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.spec.ts +++ b/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.spec.ts @@ -49,6 +49,7 @@ import createSpy = jasmine.createSpy; @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -85,6 +86,7 @@ class MockActiveCartService implements Partial { @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} diff --git a/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.ts b/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.ts index f40504b1340..3eccd96dbef 100644 --- a/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.ts +++ b/feature-libs/asm/components/asm-bind-cart/asm-bind-cart.component.ts @@ -56,6 +56,7 @@ import { AsmComponentService } from '../services/asm-component.service'; selector: 'cx-asm-bind-cart', templateUrl: './asm-bind-cart.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class AsmBindCartComponent implements OnInit, OnDestroy { activeCartValidator: ValidatorFn = (control) => { diff --git a/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.spec.ts b/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.spec.ts index 37a7be58576..7e59c2742fa 100644 --- a/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.spec.ts +++ b/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.spec.ts @@ -80,6 +80,7 @@ const duplicatedUidErrorResponse: HttpErrorModel = { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -99,6 +100,7 @@ class MockAsmCreateCustomerFacade implements Partial { @Directive({ selector: '[cxFocus]', + standalone: false, }) export class MockKeyboadFocusDirective { @Input('cxFocus') config: FocusConfig = {}; diff --git a/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.ts b/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.ts index 404f4a32072..b6db2a1e127 100644 --- a/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.ts +++ b/feature-libs/asm/components/asm-create-customer-form/asm-create-customer-form.component.ts @@ -29,6 +29,7 @@ import { CreatedCustomer } from './asm-create-customer-form.model'; @Component({ selector: 'cx-asm-create-customer-form', templateUrl: './asm-create-customer-form.component.html', + standalone: false, }) export class AsmCreateCustomerFormComponent { createdCustomer: CreatedCustomer; diff --git a/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.spec.ts b/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.spec.ts index a9639e9f823..72e4a81a1d3 100644 --- a/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.spec.ts +++ b/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.spec.ts @@ -48,6 +48,7 @@ class MockAuthService implements Partial { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -103,18 +104,21 @@ class MockLaunchDialogService implements Partial { @Component({ selector: 'cx-asm-toggle-ui', template: '', + standalone: false, }) class MockAsmToggleUiComponent {} @Component({ selector: 'cx-asm-session-timer', template: '', + standalone: false, }) class MockAsmSessionTimerComponent {} @Component({ selector: 'cx-customer-selection', template: '', + standalone: false, }) class MockCustomerSelectionComponent { @Output() @@ -123,6 +127,7 @@ class MockCustomerSelectionComponent { @Component({ selector: 'cx-csagent-login-form', template: '', + standalone: false, }) class MockCSAgentLoginFormComponent { @Output() @@ -133,6 +138,7 @@ class MockCSAgentLoginFormComponent { @Component({ template: '', selector: 'cx-customer-emulation', + standalone: false, }) class MockCustomerEmulationComponent {} diff --git a/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts b/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts index 28a1a6ada46..a61573b2385 100644 --- a/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts +++ b/feature-libs/asm/components/asm-main-ui/asm-main-ui.component.ts @@ -56,6 +56,7 @@ export const CART_TYPE_KEY: CartTypeKey = { @Component({ selector: 'cx-asm-main-ui', templateUrl: './asm-main-ui.component.html', + standalone: false, }) export class AsmMainUiComponent implements OnInit, OnDestroy { customerSupportAgentLoggedIn$: Observable; diff --git a/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.spec.ts b/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.spec.ts index c95ac9e59d9..3ae696898a7 100644 --- a/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.spec.ts +++ b/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.spec.ts @@ -21,6 +21,7 @@ import { GlobalMessageType } from '@spartacus/core'; @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -47,6 +48,7 @@ class MockLaunchDialogService implements Partial { @Component({ selector: 'cx-message', template: '', + standalone: false, }) class MockCxMessageComponent { @Input() text: string; diff --git a/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.ts b/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.ts index 6353c22a663..519621137cc 100644 --- a/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.ts +++ b/feature-libs/asm/components/asm-save-cart-dialog/asm-save-cart-dialog.component.ts @@ -20,6 +20,7 @@ export enum SAVE_CART_DIALOG_ACTION { @Component({ selector: 'cx-asm-save-cart-dialog', templateUrl: './asm-save-cart-dialog.component.html', + standalone: false, }) export class AsmSaveCartDialogComponent implements OnInit { BIND_CART_ACTION = SAVE_CART_DIALOG_ACTION; diff --git a/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.spec.ts b/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.spec.ts index f12b3ccf8df..d5998c4d909 100644 --- a/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.spec.ts +++ b/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.spec.ts @@ -49,6 +49,7 @@ class MockRoutingService implements Partial { @Pipe({ name: 'formatTimer', + standalone: false, }) class MockFormatTimerPipe implements PipeTransform { transform() {} diff --git a/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.ts b/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.ts index edb076e131f..81c4e5f24a6 100644 --- a/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.ts +++ b/feature-libs/asm/components/asm-session-timer/asm-session-timer.component.ts @@ -14,6 +14,7 @@ import { AsmComponentService } from '../services/asm-component.service'; @Component({ selector: 'cx-asm-session-timer', templateUrl: './asm-session-timer.component.html', + standalone: false, }) export class AsmSessionTimerComponent implements OnInit, OnDestroy { protected subscriptions = new Subscription(); diff --git a/feature-libs/asm/components/asm-session-timer/format-timer.pipe.ts b/feature-libs/asm/components/asm-session-timer/format-timer.pipe.ts index 37024dc3fb1..1166e4196e1 100644 --- a/feature-libs/asm/components/asm-session-timer/format-timer.pipe.ts +++ b/feature-libs/asm/components/asm-session-timer/format-timer.pipe.ts @@ -8,6 +8,7 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'formatTimer', + standalone: false, }) export class FormatTimerPipe implements PipeTransform { transform(totalSeconds: number): string { 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 76ae7a06bdd..56d475aab4a 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 @@ -24,6 +24,7 @@ import { @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -46,6 +47,7 @@ class MockAsmComponentService extends AsmComponentService { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.ts b/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.ts index 54d612b2acd..6f3138c26cc 100644 --- a/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.ts +++ b/feature-libs/asm/components/asm-switch-customer-dialog/asm-switch-customer-dialog.component.ts @@ -23,6 +23,7 @@ export interface SwitchCustomerData { @Component({ selector: 'cx-asm-switch-customer-dialog', templateUrl: './asm-switch-customer-dialog.component.html', + standalone: false, }) export class AsmSwitchCustomerDialogComponent implements OnInit { SWITCH_CUSTOMER_DIALOG_ACTION = SWITCH_CUSTOMER_DIALOG_ACTION; diff --git a/feature-libs/asm/components/asm-toggle-ui/asm-toggle-ui.component.ts b/feature-libs/asm/components/asm-toggle-ui/asm-toggle-ui.component.ts index 3a77533f624..e467e3b6df7 100644 --- a/feature-libs/asm/components/asm-toggle-ui/asm-toggle-ui.component.ts +++ b/feature-libs/asm/components/asm-toggle-ui/asm-toggle-ui.component.ts @@ -12,6 +12,7 @@ import { Subscription } from 'rxjs'; @Component({ selector: 'cx-asm-toggle-ui', templateUrl: './asm-toggle-ui.component.html', + standalone: false, }) export class AsmToggleUiComponent implements OnInit, OnDestroy { protected subscription = new Subscription(); diff --git a/feature-libs/asm/components/csagent-login-form/csagent-login-form.component.ts b/feature-libs/asm/components/csagent-login-form/csagent-login-form.component.ts index 0395366b38a..bbff027b8ae 100644 --- a/feature-libs/asm/components/csagent-login-form/csagent-login-form.component.ts +++ b/feature-libs/asm/components/csagent-login-form/csagent-login-form.component.ts @@ -15,6 +15,7 @@ import { useFeatureStyles } from '@spartacus/core'; @Component({ selector: 'cx-csagent-login-form', templateUrl: './csagent-login-form.component.html', + standalone: false, }) export class CSAgentLoginFormComponent implements OnInit { csAgentLoginForm: UntypedFormGroup; diff --git a/feature-libs/asm/components/customer-emulation/customer-emulation.component.spec.ts b/feature-libs/asm/components/customer-emulation/customer-emulation.component.spec.ts index df8228944fa..392c7d03a79 100644 --- a/feature-libs/asm/components/customer-emulation/customer-emulation.component.spec.ts +++ b/feature-libs/asm/components/customer-emulation/customer-emulation.component.spec.ts @@ -32,6 +32,7 @@ describe('CustomerEmulationComponent', () => { @Component({ selector: 'cx-asm-bind-cart', template: '', + standalone: false, }) class MockAsmBindCartComponent {} diff --git a/feature-libs/asm/components/customer-emulation/customer-emulation.component.ts b/feature-libs/asm/components/customer-emulation/customer-emulation.component.ts index 52c17b517f3..b5b63ac5b38 100644 --- a/feature-libs/asm/components/customer-emulation/customer-emulation.component.ts +++ b/feature-libs/asm/components/customer-emulation/customer-emulation.component.ts @@ -27,6 +27,7 @@ import { AsmComponentService } from '../services/asm-component.service'; @Component({ selector: 'cx-customer-emulation', templateUrl: './customer-emulation.component.html', + standalone: false, }) export class CustomerEmulationComponent implements OnInit, OnDestroy { customer: User; diff --git a/feature-libs/asm/components/customer-list/customer-list.component.spec.ts b/feature-libs/asm/components/customer-list/customer-list.component.spec.ts index 52e769fa5b5..f6e84a9d102 100644 --- a/feature-libs/asm/components/customer-list/customer-list.component.spec.ts +++ b/feature-libs/asm/components/customer-list/customer-list.component.spec.ts @@ -167,6 +167,7 @@ class MockLaunchDialogService implements Partial { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -202,6 +203,7 @@ class MockAsmCustomerListFacade implements Partial { @Directive({ selector: '[cxFocus]', + standalone: false, }) export class MockKeyboadFocusDirective { @Input('cxFocus') config: FocusConfig = {}; diff --git a/feature-libs/asm/components/customer-list/customer-list.component.ts b/feature-libs/asm/components/customer-list/customer-list.component.ts index 5331e601c55..1307df74785 100644 --- a/feature-libs/asm/components/customer-list/customer-list.component.ts +++ b/feature-libs/asm/components/customer-list/customer-list.component.ts @@ -41,6 +41,7 @@ import { CustomerListAction } from './customer-list.model'; @Component({ selector: 'cx-customer-list', templateUrl: './customer-list.component.html', + standalone: false, }) export class CustomerListComponent implements OnInit, OnDestroy { protected DEFAULT_PAGE_SIZE = 5; diff --git a/feature-libs/asm/components/customer-selection/customer-selection.component.ts b/feature-libs/asm/components/customer-selection/customer-selection.component.ts index 9b3400928f2..21c9c609c21 100644 --- a/feature-libs/asm/components/customer-selection/customer-selection.component.ts +++ b/feature-libs/asm/components/customer-selection/customer-selection.component.ts @@ -44,6 +44,7 @@ import { debounceTime } from 'rxjs/operators'; host: { '(document:click)': 'onDocumentClick($event)', }, + standalone: false, }) export class CustomerSelectionComponent implements OnInit, OnDestroy { customerSelectionForm: UntypedFormGroup; diff --git a/feature-libs/asm/components/dot-spinner/dot-spinner.component.ts b/feature-libs/asm/components/dot-spinner/dot-spinner.component.ts index ebec0caaaba..f9a0e709d49 100644 --- a/feature-libs/asm/components/dot-spinner/dot-spinner.component.ts +++ b/feature-libs/asm/components/dot-spinner/dot-spinner.component.ts @@ -10,5 +10,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; selector: 'cx-dot-spinner', templateUrl: './dot-spinner.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class DotSpinnerComponent {} diff --git a/feature-libs/asm/core/utils/args/args.pipe.ts b/feature-libs/asm/core/utils/args/args.pipe.ts index 67512604896..9842a0d2afc 100644 --- a/feature-libs/asm/core/utils/args/args.pipe.ts +++ b/feature-libs/asm/core/utils/args/args.pipe.ts @@ -30,7 +30,10 @@ import { Pipe, PipeTransform } from '@angular/core'; * * ``` */ -@Pipe({ name: 'cxArgs' }) +@Pipe({ + name: 'cxArgs', + standalone: false, +}) export class ArgsPipe implements PipeTransform { transform, R>( projectionFunction: (...arglist: A) => R, diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.spec.ts b/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.spec.ts index e4993183da1..890278c5989 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.spec.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.spec.ts @@ -16,6 +16,7 @@ import { AsmCustomer360ProductItemComponent } from './asm-customer-360-product-i @Component({ template: '', selector: 'cx-media', + standalone: false, }) class MockMediaComponent { @Input() container: any; @@ -25,6 +26,7 @@ class MockMediaComponent { @Directive({ selector: '[cxFocus]', + standalone: false, }) export class MockKeyboadFocusDirective { @Input('cxFocus') config: FocusConfig = {}; @@ -55,6 +57,7 @@ describe('AsmCustomer360ProductItemComponent', () => { @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -62,6 +65,7 @@ describe('AsmCustomer360ProductItemComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.ts b/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.ts index f16164063bd..40b335b35de 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-product-item/asm-customer-360-product-item.component.ts @@ -18,6 +18,7 @@ import { ProductItem } from '../asm-customer-360-product-listing/product-item.mo selector: 'cx-asm-customer-360-product-item', templateUrl: './asm-customer-360-product-item.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class AsmCustomer360ProductItemComponent { @Input() product: ProductItem; diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.spec.ts b/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.spec.ts index a9f3b7f89b5..aef6b18bd95 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.spec.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.spec.ts @@ -30,6 +30,7 @@ describe('AsmCustomer360ProductListingComponent', () => { template: '', selector: '[cx-asm-customer-360-product-item], cx-asm-customer-360-product-item', + standalone: false, }) class MockAsmProductItemComponent { @Input() product: Product; @@ -56,6 +57,7 @@ describe('AsmCustomer360ProductListingComponent', () => {
`, + standalone: false, }) // eslint-disable-next-line @angular-eslint/component-class-suffix class AsmCustomerProductListingComponentTest { diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.ts b/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.ts index 41972359ace..4c28f4be33a 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-product-listing/asm-customer-360-product-listing.component.ts @@ -24,6 +24,7 @@ import { ProductItem } from './product-item.model'; selector: 'cx-asm-customer-360-product-listing', templateUrl: './asm-customer-360-product-listing.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class AsmCustomer360ProductListingComponent implements OnInit { @Input() diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.spec.ts b/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.spec.ts index cc59ee8869a..3dc94c6378d 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.spec.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.spec.ts @@ -16,6 +16,7 @@ describe('AsmCustomer360PromotionListingComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -24,6 +25,7 @@ describe('AsmCustomer360PromotionListingComponent', () => { @Component({ selector: 'cx-message', template: '', + standalone: false, }) class MockCxMessageComponent { @Input() text: string; @@ -73,6 +75,7 @@ describe('AsmCustomer360PromotionListingComponent', () => { > `, + standalone: false, }) class TestHostComponent { @Input() headerText: string; diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.ts b/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.ts index d5555d44eab..f4e9f45feef 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-promotion-listing/asm-customer-360-promotion-listing.component.ts @@ -17,6 +17,7 @@ import { PromotionListEntry } from './asm-customer-360-promotion-listing.model'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-promotion-listing', templateUrl: './asm-customer-360-promotion-listing.component.html', + standalone: false, }) export class AsmCustomer360PromotionListingComponent { @Input() headerText: string; diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.spec.ts b/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.spec.ts index e386b53cdc4..5660098ff14 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.spec.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.spec.ts @@ -40,6 +40,7 @@ import { @Directive({ selector: '[cxFocus]', + standalone: false, }) export class MockKeyboadFocusDirective { @Input('cxFocus') config: FocusConfig = {}; @@ -83,6 +84,7 @@ describe('AsmCustomer360TableComponent', () => { }; @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -90,6 +92,7 @@ describe('AsmCustomer360TableComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -217,6 +220,7 @@ describe('AsmCustomer360TableComponent', () => { (selectItem)="itemSelected($event)" > `, + standalone: false, }) class TestHostComponent { @Input() columns: Array; diff --git a/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.ts b/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.ts index 45776a74268..c6060cbc331 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360-table/asm-customer-360-table.component.ts @@ -43,6 +43,7 @@ import { KeyBoardEventCode } from '@spartacus/asm/customer-360/root'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-table', templateUrl: './asm-customer-360-table.component.html', + standalone: false, }) export class AsmCustomer360TableComponent implements OnChanges, AfterViewChecked diff --git a/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.spec.ts b/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.spec.ts index 2db999173f6..f89bc0f39c5 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.spec.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.spec.ts @@ -112,6 +112,7 @@ describe('AsmCustomer360Component', () => { @Component({ selector: 'cx-asm-customer-360-section', template: '', + standalone: false, }) class MockAsmCustomer360SectionComponent {} diff --git a/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.ts b/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.ts index cfc0be1d8cd..cbdf3d2865b 100644 --- a/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.ts +++ b/feature-libs/asm/customer-360/components/asm-customer-360/asm-customer-360.component.ts @@ -49,6 +49,7 @@ import { AsmCustomer360Config } from '../config/asm-customer-360-config'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360', templateUrl: './asm-customer-360.component.html', + standalone: false, }) export class AsmCustomer360Component implements OnDestroy, OnInit { @HostBinding('attr.role') role = 'dialog'; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.spec.ts index eb3accbc8a7..fd0813aa86e 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.spec.ts @@ -122,6 +122,7 @@ describe('AsmCustomer360ActiveCartComponent', () => { @Component({ template: '', selector: 'cx-media', + standalone: false, }) class MockMediaComponent { @Input() container: any; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.ts index bd943302f23..74ef7670c54 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-active-cart/asm-customer-360-active-cart.component.ts @@ -19,6 +19,7 @@ import { changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-active-cart', templateUrl: './asm-customer-360-active-cart.component.html', + standalone: false, }) export class AsmCustomer360ActiveCartComponent { productItems$: Observable>; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.spec.ts index cc6a4eadc87..c14621d5413 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.spec.ts @@ -28,6 +28,7 @@ import { AsmCustomer360ActivityComponent } from './asm-customer-360-activity.com @Directive({ selector: '[cxFocus]', + standalone: false, }) export class MockKeyboadFocusDirective { @Input('cxFocus') config: FocusConfig = {}; @@ -36,6 +37,7 @@ export class MockKeyboadFocusDirective { describe('AsmCustomer360ActivityComponent', () => { @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -43,6 +45,7 @@ describe('AsmCustomer360ActivityComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.ts index 6bf19fc1af5..3aa3268df1c 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-activity/asm-customer-360-activity.component.ts @@ -20,6 +20,7 @@ import { ActivityEntry, TypeCodes } from './asm-customer-360-activity.model'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-activity', templateUrl: './asm-customer-360-activity.component.html', + standalone: false, }) export class AsmCustomer360ActivityComponent implements OnInit { entries$: Observable>; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-coupon/asm-customer-360-coupon.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-coupon/asm-customer-360-coupon.component.ts index 9dbdbd8624f..601c2f3ea2c 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-coupon/asm-customer-360-coupon.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-coupon/asm-customer-360-coupon.component.ts @@ -26,6 +26,7 @@ import { AsmCustomer360SectionContext } from '../asm-customer-360-section-contex changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-coupon', templateUrl: './asm-customer-360-coupon.component.html', + standalone: false, }) export class AsmCustomer360CouponComponent implements OnInit, OnDestroy { showErrorAlert$ = new BehaviorSubject(false); diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html b/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html index 69d5230a641..878cdf9dd51 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.html @@ -56,7 +56,7 @@ [type]="iconTypes.CLOSE" role="button" title="{{ 'common.close' | cxTranslate }}" - (click)="this.searchBox.value = ''" + (click)="searchBox.value = ''" > { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.ts index 52097632544..613ef3e2414 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-customer-coupon/asm-customer-360-customer-coupon.component.ts @@ -27,6 +27,7 @@ import { ICON_TYPE } from '@spartacus/storefront'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-customer-coupon', templateUrl: './asm-customer-360-customer-coupon.component.html', + standalone: false, }) export class AsmCustomer360CustomerCouponComponent implements OnInit, OnDestroy diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-map/asm-customer-360-map.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-map/asm-customer-360-map.component.ts index e8a118ac9d0..9bba34d79af 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-map/asm-customer-360-map.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-map/asm-customer-360-map.component.ts @@ -34,6 +34,7 @@ import { AsmCustomer360SectionContext } from '../asm-customer-360-section-contex changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-map', templateUrl: './asm-customer-360-map.component.html', + standalone: false, }) export class AsmCustomer360MapComponent implements OnDestroy, OnInit { storeData: StoreFinderSearchPage; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.spec.ts index 42e72fbca6a..9d129f1d247 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.spec.ts @@ -97,6 +97,7 @@ describe('AsmCustomer360ProductInterestsComponent', () => { @Component({ template: '', selector: 'cx-media', + standalone: false, }) class MockMediaComponent { @Input() container: any; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.ts index d3777c9afbc..53872dba975 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-interests/asm-customer-360-product-interests.component.ts @@ -16,6 +16,7 @@ import { AsmCustomer360SectionContext } from '../asm-customer-360-section-contex changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-product-interests', templateUrl: './asm-customer-360-product-interests.component.html', + standalone: false, }) export class AsmCustomer360ProductInterestsComponent { products$: Observable>; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.spec.ts index b57f4911690..e049e170303 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.spec.ts @@ -39,6 +39,7 @@ describe('AsmCustomer360ProductReviewsComponent', () => { } @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -47,6 +48,7 @@ describe('AsmCustomer360ProductReviewsComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -55,6 +57,7 @@ describe('AsmCustomer360ProductReviewsComponent', () => { @Component({ selector: 'cx-star-rating', template: '', + standalone: false, }) class MockCxStarRatingnComponent { @Input() rating: number; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.ts index fad968cac87..2b620880006 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-product-reviews/asm-customer-360-product-reviews.component.ts @@ -24,6 +24,7 @@ import { AsmCustomer360Config } from '../../config/asm-customer-360-config'; selector: 'cx-asm-customer-360-product-reviews', templateUrl: './asm-customer-360-product-reviews.component.html', providers: [CxDatePipe], + standalone: false, }) export class AsmCustomer360ProductReviewsComponent implements OnInit { reviewColumns: Array = [ diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.spec.ts index deb9b554f1a..f112283874b 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.spec.ts @@ -23,6 +23,7 @@ import { By } from '@angular/platform-browser'; @Directive({ selector: '[cxFocus]', + standalone: false, }) export class MockKeyboadFocusDirective { @Input('cxFocus') config: FocusConfig = {}; @@ -80,6 +81,7 @@ describe('AsmCustomer360ProfileComponent', () => { }; @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -87,6 +89,7 @@ describe('AsmCustomer360ProfileComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.ts index 1c6e0d48c8e..3ebb497acec 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-profile/asm-customer-360-profile.component.ts @@ -21,6 +21,7 @@ import { AsmCustomer360SectionContext } from '../asm-customer-360-section-contex @Component({ selector: 'cx-asm-customer-360-profile', templateUrl: './asm-customer-360-profile.component.html', + standalone: false, }) export class AsmCustomer360ProfileComponent implements OnInit { focusConfig: FocusConfig = { diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.spec.ts index 5bf7d1da78a..e833dae401c 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.spec.ts @@ -19,6 +19,7 @@ describe('AsmCustomer360PromotionComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.ts index ee649cefe38..2eec73fff0e 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-promotion/asm-customer-360-promotion.component.ts @@ -25,6 +25,7 @@ import { ActiveCartFacade } from '@spartacus/cart/base/root'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-promotion', templateUrl: './asm-customer-360-promotion.component.html', + standalone: false, }) export class AsmCustomer360PromotionComponent implements OnInit, OnDestroy { showErrorAlert$ = new BehaviorSubject(false); diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.spec.ts index 32e2e892e9f..555dc9bc420 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.spec.ts @@ -122,6 +122,7 @@ describe('AsmCustomer360SavedCartComponent', () => { @Component({ template: '', selector: 'cx-media', + standalone: false, }) class MockMediaComponent { @Input() container: any; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.ts index 4a4feca7654..34af60a84bd 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-saved-cart/asm-customer-360-saved-cart.component.ts @@ -20,6 +20,7 @@ import { Product, ProductScope, ProductService } from '@spartacus/core'; selector: 'cx-asm-customer-360-saved-cart', changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './asm-customer-360-saved-cart.component.html', + standalone: false, }) export class AsmCustomer360SavedCartComponent { savedCart$: Observable; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-section/asm-customer-360-section.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-section/asm-customer-360-section.component.ts index fb31fd9cea3..0d60f6944c8 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-section/asm-customer-360-section.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-section/asm-customer-360-section.component.ts @@ -29,6 +29,7 @@ import { AsmCustomer360SectionContext } from '../asm-customer-360-section-contex useExisting: AsmCustomer360SectionContextSource, }, ], + standalone: false, }) export class AsmCustomer360SectionComponent implements OnDestroy { @Input() diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.spec.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.spec.ts index 8aa63f8940b..1c9cfce610a 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.spec.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.spec.ts @@ -39,6 +39,7 @@ describe('AsmCustomer360SupportTicketsComponent', () => { } @Pipe({ name: 'cxTranslate', + standalone: false, }) class MockTranslatePipe implements PipeTransform { transform(): any {} @@ -47,6 +48,7 @@ describe('AsmCustomer360SupportTicketsComponent', () => { @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; diff --git a/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.ts b/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.ts index b106ad89a9b..730e3a6270b 100644 --- a/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.ts +++ b/feature-libs/asm/customer-360/components/sections/asm-customer-360-support-tickets/asm-customer-360-support-tickets.component.ts @@ -20,6 +20,7 @@ import { SupportTicketEntry } from './asm-customer-360-support-tickets.model'; changeDetection: ChangeDetectionStrategy.OnPush, selector: 'cx-asm-customer-360-support-tickets', templateUrl: './asm-customer-360-support-tickets.component.html', + standalone: false, }) export class AsmCustomer360SupportTicketsComponent implements OnInit { supportTicketsColumns: Array = [ diff --git a/feature-libs/asm/customer-360/core/services/asm-customer-360.service.spec.ts b/feature-libs/asm/customer-360/core/services/asm-customer-360.service.spec.ts index be66d764b2f..cdd3905d30a 100644 --- a/feature-libs/asm/customer-360/core/services/asm-customer-360.service.spec.ts +++ b/feature-libs/asm/customer-360/core/services/asm-customer-360.service.spec.ts @@ -16,6 +16,7 @@ import { Component } from '@angular/core'; @Component({ selector: 'cx-dummy', template: '
This is a dummy component
', + standalone: false, }) export class DummyComponent {} diff --git a/feature-libs/asm/package.json b/feature-libs/asm/package.json index fa67208ade4..607c2cec6c2 100644 --- a/feature-libs/asm/package.json +++ b/feature-libs/asm/package.json @@ -25,13 +25,13 @@ "tslib": "^2.6.2" }, "peerDependencies": { - "@angular-devkit/schematics": "^18.2.9", - "@angular/common": "^18.2.9", - "@angular/core": "^18.2.9", - "@angular/forms": "^18.2.9", - "@ng-select/ng-select": "^13.9.1", - "@ngrx/effects": "^18.1.1", - "@ngrx/store": "^18.1.1", + "@angular-devkit/schematics": "^19.0.4", + "@angular/common": "^19.0.3", + "@angular/core": "^19.0.3", + "@angular/forms": "^19.0.3", + "@ng-select/ng-select": "^14.1.0", + "@ngrx/effects": "^19.0.0", + "@ngrx/store": "^19.0.0", "@spartacus/cart": "2211.32.0-1", "@spartacus/core": "2211.32.0-1", "@spartacus/order": "2211.32.0-1", 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 846706340e8..49914c8ba96 100644 --- a/feature-libs/asm/root/services/csagent-auth.service.spec.ts +++ b/feature-libs/asm/root/services/csagent-auth.service.spec.ts @@ -10,17 +10,17 @@ import { OCC_USER_ID_CURRENT, UserIdService, } from '@spartacus/core'; +import { UserAccountFacade } from '@spartacus/user/account/root'; import { TokenResponse } from 'angular-oauth2-oidc'; import { of } from 'rxjs'; import { take } from 'rxjs/operators'; -import { AsmState, ASM_FEATURE } from '../../core/store/asm-state'; +import { ASM_FEATURE, AsmState } from '../../core/store/asm-state'; import * as fromReducers from '../../core/store/reducers/index'; import { AsmAuthStorageService, 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() {} @@ -89,7 +89,7 @@ describe('CsAgentAuthService', () => { oAuthLibWrapperService, 'authorizeWithPasswordFlow' ).and.callThrough(); - spyOn(store, 'dispatch').and.callFake(() => {}); + spyOn(store, 'dispatch').and.callFake(() => null); spyOn(userIdService, 'setUserId').and.callThrough(); spyOn(asmAuthStorageService, 'clearEmulatedUserToken').and.callThrough(); @@ -113,7 +113,7 @@ describe('CsAgentAuthService', () => { }); it('when there was logged in user, should login CS agent and start emulation for that user', async () => { - const dispatch = spyOn(store, 'dispatch').and.callFake(() => {}); + const dispatch = spyOn(store, 'dispatch').and.callFake(() => null); spyOn( oAuthLibWrapperService, 'authorizeWithPasswordFlow' @@ -148,7 +148,7 @@ describe('CsAgentAuthService', () => { }); it('should not changed storage state, when authorization failed', async () => { - spyOn(store, 'dispatch').and.callFake(() => {}); + spyOn(store, 'dispatch').and.callFake(() => null); spyOn(oAuthLibWrapperService, 'authorizeWithPasswordFlow').and.callFake( () => { return Promise.reject(); @@ -181,7 +181,7 @@ describe('CsAgentAuthService', () => { describe('startCustomerEmulationSession()', () => { it('should start emulation of a customer', () => { - const dispatch = spyOn(store, 'dispatch').and.callFake(() => {}); + const dispatch = spyOn(store, 'dispatch').and.callFake(() => null); spyOn(asmAuthStorageService, 'clearEmulatedUserToken').and.callThrough(); spyOn(userIdService, 'setUserId').and.callThrough(); @@ -264,7 +264,7 @@ describe('CsAgentAuthService', () => { describe('logoutCustomerSupportAgent()', () => { it('should logout CS agent', async () => { - const dispatch = spyOn(store, 'dispatch').and.callFake(() => {}); + const dispatch = spyOn(store, 'dispatch').and.callFake(() => null); spyOn(oAuthLibWrapperService, 'revokeAndLogout').and.callThrough(); await service.logoutCustomerSupportAgent(); @@ -283,7 +283,7 @@ describe('CsAgentAuthService', () => { }); it('should restore previous session when there is old session token', async () => { - const dispatch = spyOn(store, 'dispatch').and.callFake(() => {}); + const dispatch = spyOn(store, 'dispatch').and.callFake(() => null); spyOn(asmAuthStorageService, 'setToken').and.callThrough(); spyOn(asmAuthStorageService, 'clearEmulatedUserToken').and.callThrough(); spyOn(userIdService, 'setUserId').and.callThrough(); diff --git a/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap b/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap index 0f744602c76..4a42adf798a 100644 --- a/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap +++ b/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap @@ -123,8 +123,8 @@ exports[`Spartacus Asm schematics: ng-add Asm feature general setup styling shou }, { "type": "anyComponentStyle", - "maximumWarning": "2kB", - "maximumError": "4kB" + "maximumWarning": "4kB", + "maximumError": "8kB" } ], "outputHashing": "all" diff --git a/feature-libs/cart/.eslintrc.json b/feature-libs/cart/.eslintrc.json index 862b5a870b0..9895500871d 100644 --- a/feature-libs/cart/.eslintrc.json +++ b/feature-libs/cart/.eslintrc.json @@ -1,4 +1,9 @@ { "extends": "../../.eslintrc.json", - "ignorePatterns": ["schematics/**/*.d.ts"] + "ignorePatterns": ["schematics/**/*.d.ts"], + "overrides": [ + { + "files": ["*.ts"] + } + ] } diff --git a/feature-libs/cart/_index.scss b/feature-libs/cart/_index.scss index 3ae58ec3189..f8f6762cb7d 100644 --- a/feature-libs/cart/_index.scss +++ b/feature-libs/cart/_index.scss @@ -2,9 +2,9 @@ @import '@spartacus/styles/scss/cxbase/blocks/modal'; @import '@spartacus/styles/scss/misc/table'; -@import 'bootstrap/scss/functions'; -@import 'bootstrap/scss/variables'; -@import 'bootstrap/scss/_mixins'; +@import '@spartacus/styles/vendor/bootstrap/scss/functions'; +@import '@spartacus/styles/vendor/bootstrap/scss/variables'; +@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; @mixin visible-focus { outline-style: solid; diff --git a/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.spec.ts b/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.spec.ts index a06d5161d24..8d4bc44ec9c 100644 --- a/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.spec.ts +++ b/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.spec.ts @@ -15,6 +15,7 @@ let emissionCounterKey = 0; template: ` `, + standalone: false, }) class TestComponent { abstractOrderKey: AbstractOrderKeyInput = { @@ -31,6 +32,7 @@ class TestComponent { {{ key.type }} `, + standalone: false, }) class TestInnerComponent { abstractOrderContext = inject(AbstractOrderContext, { optional: true }); diff --git a/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.ts b/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.ts index 2d6c0795060..5978af629f8 100644 --- a/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.ts +++ b/feature-libs/cart/base/components/abstract-order-context/abstract-order-context.directive.ts @@ -32,6 +32,7 @@ export interface AbstractOrderKeyInput { AbstractOrderContextSource, { provide: AbstractOrderContext, useExisting: AbstractOrderContextSource }, ], + standalone: false, }) export class AbstractOrderContextDirective implements OnChanges { @Input() cxAbstractOrderContext: AbstractOrderKeyInput; diff --git a/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.spec.ts b/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.spec.ts index 5c320f5d9d0..7984b4a1b7d 100644 --- a/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.spec.ts +++ b/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.spec.ts @@ -105,6 +105,7 @@ class MockProductAvailabilityAdapter {} @Component({ template: '', selector: 'cx-item-counter', + standalone: false, }) class MockItemCounterComponent { @Input() min; diff --git a/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.ts b/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.ts index 49a6269dbc2..b2b1e9bf50c 100644 --- a/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.ts +++ b/feature-libs/cart/base/components/add-to-cart/add-to-cart.component.ts @@ -49,6 +49,7 @@ import { filter, map, take } from 'rxjs/operators'; selector: 'cx-add-to-cart', templateUrl: './add-to-cart.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class AddToCartComponent implements OnInit, OnDestroy { @Input() productCode: string; diff --git a/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.spec.ts b/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.spec.ts index 47952a1cdef..02383d32f2b 100644 --- a/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.spec.ts +++ b/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.spec.ts @@ -100,6 +100,7 @@ const mockOrderEntries: OrderEntry[] = [ @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -117,6 +118,7 @@ class MockRoutingService implements Partial { @Component({ selector: 'cx-cart-item', template: '', + standalone: false, }) class MockCartItemComponent { @Input() compact = false; @@ -128,6 +130,7 @@ class MockCartItemComponent { @Pipe({ name: 'cxUrl', + standalone: false, }) class MockUrlPipe implements PipeTransform { transform(): any {} diff --git a/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.ts b/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.ts index b8395030695..8b527bcda3d 100644 --- a/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.ts +++ b/feature-libs/cart/base/components/added-to-cart-dialog/added-to-cart-dialog.component.ts @@ -54,6 +54,7 @@ export interface AddedToCartDialogComponentData { selector: 'cx-added-to-cart-dialog', templateUrl: './added-to-cart-dialog.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class AddedToCartDialogComponent implements OnInit, OnDestroy { iconTypes = ICON_TYPE; diff --git a/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.spec.ts b/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.spec.ts index 3edb006efb3..20758c21155 100644 --- a/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.spec.ts +++ b/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.spec.ts @@ -12,6 +12,7 @@ const coupon2: Voucher = { code: 'coupon2', voucherCode: 'coupon2' }; @Component({ selector: 'cx-icon', template: '', + standalone: false, }) class MockCxIconComponent { @Input() type: ICON_TYPE; @@ -26,6 +27,7 @@ class MockCxIconComponent { > `, + standalone: false, }) class MockedCartCouponComponent { coupons = [coupon2, coupon1]; diff --git a/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.ts b/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.ts index 84b29b15b18..f07503e64a8 100644 --- a/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.ts +++ b/feature-libs/cart/base/components/cart-coupon/applied-coupons/applied-coupons.component.ts @@ -12,6 +12,7 @@ import { ICON_TYPE } from '@spartacus/storefront'; selector: 'cx-applied-coupons', templateUrl: './applied-coupons.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class AppliedCouponsComponent { @Input() diff --git a/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.spec.ts b/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.spec.ts index d8030b4275b..f600767357e 100644 --- a/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.spec.ts +++ b/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.spec.ts @@ -22,6 +22,7 @@ import { CartCouponComponent } from './cart-coupon.component'; @Component({ selector: 'cx-applied-coupons', template: '', + standalone: false, }) class MockAppliedCouponsComponent { @Input() diff --git a/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.ts b/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.ts index 74e5dbebea8..02203fcb72f 100644 --- a/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.ts +++ b/feature-libs/cart/base/components/cart-coupon/cart-coupon.component.ts @@ -27,6 +27,7 @@ import { map, tap } from 'rxjs/operators'; @Component({ selector: 'cx-cart-coupon', templateUrl: './cart-coupon.component.html', + standalone: false, }) export class CartCouponComponent implements OnInit, OnDestroy { MAX_CUSTOMER_COUPON_PAGE = 100; diff --git a/feature-libs/cart/base/components/cart-details/cart-details.component.spec.ts b/feature-libs/cart/base/components/cart-details/cart-details.component.spec.ts index ed2cbf13a69..4fb7f6e4f40 100644 --- a/feature-libs/cart/base/components/cart-details/cart-details.component.spec.ts +++ b/feature-libs/cart/base/components/cart-details/cart-details.component.spec.ts @@ -41,6 +41,7 @@ interface CartItemComponentOptions { @Component({ template: '', selector: 'cx-cart-item-list', + standalone: false, }) class MockCartItemListComponent { @Input() @@ -59,6 +60,7 @@ class MockCartItemListComponent { @Component({ template: '', selector: 'cx-cart-coupon', + standalone: false, }) class MockCartCouponComponent { cartIsLoading = false; @@ -67,6 +69,7 @@ class MockCartCouponComponent { @Component({ selector: 'cx-cart-validation-warnings', template: '', + standalone: false, }) class MockCartValidationWarningsComponent {} diff --git a/feature-libs/cart/base/components/cart-details/cart-details.component.ts b/feature-libs/cart/base/components/cart-details/cart-details.component.ts index f6348055613..3946adc2900 100644 --- a/feature-libs/cart/base/components/cart-details/cart-details.component.ts +++ b/feature-libs/cart/base/components/cart-details/cart-details.component.ts @@ -21,6 +21,7 @@ import { filter, map, tap } from 'rxjs/operators'; selector: 'cx-cart-details', templateUrl: './cart-details.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class CartDetailsComponent implements OnInit { cart$: Observable; diff --git a/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.spec.ts b/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.spec.ts index 054aadd4cc0..e348e056c3e 100644 --- a/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.spec.ts +++ b/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.spec.ts @@ -9,6 +9,7 @@ import createSpy = jasmine.createSpy; @Pipe({ name: 'cxUrl', + standalone: false, }) class MockUrlPipe implements PipeTransform { transform() {} diff --git a/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.ts b/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.ts index 6f9496b24da..9c8522f50fc 100644 --- a/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.ts +++ b/feature-libs/cart/base/components/cart-proceed-to-checkout/cart-proceed-to-checkout.component.ts @@ -23,6 +23,7 @@ import { Subscription } from 'rxjs'; selector: 'cx-cart-proceed-to-checkout', templateUrl: './cart-proceed-to-checkout.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class CartProceedToCheckoutComponent implements OnInit, OnDestroy { cartValidationInProgress = false; diff --git a/feature-libs/cart/base/components/cart-shared/cart-item-list-row/cart-item-list-row.component.ts b/feature-libs/cart/base/components/cart-shared/cart-item-list-row/cart-item-list-row.component.ts index 66e3fe7b75c..8234a937c3f 100644 --- a/feature-libs/cart/base/components/cart-shared/cart-item-list-row/cart-item-list-row.component.ts +++ b/feature-libs/cart/base/components/cart-shared/cart-item-list-row/cart-item-list-row.component.ts @@ -18,6 +18,7 @@ import { CartItemListComponentService } from './cart-item-list-row.component.ser CartItemContextSource, { provide: CartItemContext, useExisting: CartItemContextSource }, ], + standalone: false, }) export class CartItemListRowComponent extends CartItemComponent { protected componentService = inject(CartItemListComponentService); diff --git a/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.spec.ts b/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.spec.ts index 53f7a577c28..1f1b9063d64 100644 --- a/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.spec.ts +++ b/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.spec.ts @@ -87,6 +87,7 @@ const mockUserId = 'test-user'; @Component({ template: '', selector: '[cx-cart-item-list-row], cx-cart-item-list-row', + standalone: false, }) class MockCartItemComponent { @Input() item; diff --git a/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.ts b/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.ts index 66200ff76c1..f336829e26b 100644 --- a/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.ts +++ b/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.ts @@ -48,6 +48,7 @@ interface ItemListContext { selector: 'cx-cart-item-list', templateUrl: './cart-item-list.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class CartItemListComponent implements OnInit, OnDestroy { protected subscription = new Subscription(); diff --git a/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.spec.ts b/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.spec.ts index 1d914c665ef..d6e5dd1faf2 100644 --- a/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.spec.ts +++ b/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.spec.ts @@ -25,12 +25,14 @@ import { CartItemContextSource } from './model/cart-item-context-source.model'; @Pipe({ name: 'cxUrl', + standalone: false, }) class MockUrlPipe implements PipeTransform { transform() {} } @Directive({ selector: '[cxOutlet]', + standalone: false, }) class MockOutletDirective implements Partial { @Input() cxOutlet: string; @@ -39,6 +41,7 @@ class MockOutletDirective implements Partial { @Component({ template: '', selector: 'cx-media', + standalone: false, }) class MockMediaComponent { @Input() container; @@ -48,6 +51,7 @@ class MockMediaComponent { @Component({ template: '', selector: 'cx-item-counter', + standalone: false, }) class MockItemCounterComponent { @Input() control; @@ -59,6 +63,7 @@ class MockItemCounterComponent { @Component({ template: '', selector: 'cx-promotions', + standalone: false, }) class MockPromotionsComponent { @Input() promotions; @@ -89,6 +94,7 @@ const mockProduct = { @Component({ selector: 'cx-cart-item-validation-warning', template: '', + standalone: false, }) class MockCartItemValidationWarningComponent { @Input() code: string; @@ -96,6 +102,7 @@ class MockCartItemValidationWarningComponent { @Directive({ selector: '[cxAtMessage]', + standalone: false, }) class MockAtMessageDirective { @Input() cxAtMessage: string | string[] | undefined; diff --git a/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.ts b/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.ts index 0f299334e0a..02ad2e0dd0b 100644 --- a/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.ts +++ b/feature-libs/cart/base/components/cart-shared/cart-item/cart-item.component.ts @@ -24,6 +24,7 @@ import { CartItemContextSource } from './model/cart-item-context-source.model'; CartItemContextSource, { provide: CartItemContext, useExisting: CartItemContextSource }, ], + standalone: false, }) export class CartItemComponent implements OnChanges { @Input() compact = false; diff --git a/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.spec.ts b/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.spec.ts index 0d62fa2353d..3b410321ea1 100644 --- a/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.spec.ts +++ b/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.spec.ts @@ -10,6 +10,7 @@ import { OrderSummaryComponent } from './order-summary.component'; @Component({ selector: 'cx-applied-coupons', template: '', + standalone: false, }) class MockAppliedCouponsComponent { @Input() diff --git a/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.ts b/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.ts index 9041e5635e4..b200294bdff 100644 --- a/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.ts +++ b/feature-libs/cart/base/components/cart-shared/order-summary/order-summary.component.ts @@ -12,6 +12,7 @@ import { Subscription } from 'rxjs'; @Component({ selector: 'cx-order-summary', templateUrl: './order-summary.component.html', + standalone: false, }) export class OrderSummaryComponent implements OnInit, OnDestroy { @Input() diff --git a/feature-libs/cart/base/components/cart-totals/cart-totals.component.spec.ts b/feature-libs/cart/base/components/cart-totals/cart-totals.component.spec.ts index 71bdf9fb237..b4ac1ee71e2 100644 --- a/feature-libs/cart/base/components/cart-totals/cart-totals.component.spec.ts +++ b/feature-libs/cart/base/components/cart-totals/cart-totals.component.spec.ts @@ -17,6 +17,7 @@ class MockActiveCartService { @Component({ selector: 'cx-order-summary', template: '', + standalone: false, }) class MockOrderSummaryComponent { @Input() cart: Cart; diff --git a/feature-libs/cart/base/components/cart-totals/cart-totals.component.ts b/feature-libs/cart/base/components/cart-totals/cart-totals.component.ts index 11fc7966f78..e1023201120 100644 --- a/feature-libs/cart/base/components/cart-totals/cart-totals.component.ts +++ b/feature-libs/cart/base/components/cart-totals/cart-totals.component.ts @@ -12,6 +12,7 @@ import { Observable } from 'rxjs'; selector: 'cx-cart-totals', templateUrl: './cart-totals.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class CartTotalsComponent implements OnInit { cart$: Observable; diff --git a/feature-libs/cart/base/components/clear-cart/clear-cart-button/clear-cart.component.ts b/feature-libs/cart/base/components/clear-cart/clear-cart-button/clear-cart.component.ts index ef3c920c95c..6a2507d747d 100644 --- a/feature-libs/cart/base/components/clear-cart/clear-cart-button/clear-cart.component.ts +++ b/feature-libs/cart/base/components/clear-cart/clear-cart-button/clear-cart.component.ts @@ -21,6 +21,7 @@ import { take } from 'rxjs/operators'; selector: 'cx-clear-cart', templateUrl: './clear-cart.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + standalone: false, }) export class ClearCartComponent implements OnDestroy { cart$: Observable = this.activeCartFacade.getActive(); diff --git a/feature-libs/cart/base/components/clear-cart/clear-cart-dialog/clear-cart-dialog.component.html b/feature-libs/cart/base/components/clear-cart/clear-cart-dialog/clear-cart-dialog.component.html index 82f0817a62d..7ea08402299 100644 --- a/feature-libs/cart/base/components/clear-cart/clear-cart-dialog/clear-cart-dialog.component.html +++ b/feature-libs/cart/base/components/clear-cart/clear-cart-dialog/clear-cart-dialog.component.html @@ -1,11 +1,11 @@